;
! function() {
    try {
        var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof global ? global : "undefined" != typeof window ? window : "undefined" != typeof self ? self : {},
            n = (new e.Error).stack;
        n && ((e._debugIds || (e._debugIds = {}))[n] = "939f59a9-2434-6630-438f-f64be186176f")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 673694, 508785, 974539, 142953, e => {
    "use strict";
    var t = e.i(416340),
        r = e.i(174617),
        n = e.i(78892),
        o = e.i(608652),
        a = e.i(199786),
        s = e.i(600317),
        i = e.i(76992),
        l = e.i(221628);

    function u(e) {
        let r = e + "CollectionProvider",
            [a, s] = (0, o.createContextScope)(r),
            [u, c] = a(r, {
                collectionRef: {
                    current: null
                },
                itemMap: new Map
            }),
            d = e => {
                let {
                    scope: r,
                    children: n
                } = e, o = t.default.useRef(null), a = t.default.useRef(new Map).current;
                return (0, l.jsx)(u, {
                    scope: r,
                    itemMap: a,
                    collectionRef: o,
                    children: n
                })
            };
        d.displayName = r;
        let p = e + "CollectionSlot",
            f = (0, i.createSlot)(p),
            h = t.default.forwardRef((e, t) => {
                let {
                    scope: r,
                    children: o
                } = e, a = c(p, r), s = (0, n.useComposedRefs)(t, a.collectionRef);
                return (0, l.jsx)(f, {
                    ref: s,
                    children: o
                })
            });
        h.displayName = p;
        let v = e + "CollectionItemSlot",
            m = "data-radix-collection-item",
            w = (0, i.createSlot)(v),
            g = t.default.forwardRef((e, r) => {
                let {
                    scope: o,
                    children: a,
                    ...s
                } = e, i = t.default.useRef(null), u = (0, n.useComposedRefs)(r, i), d = c(v, o);
                return t.default.useEffect(() => (d.itemMap.set(i, {
                    ref: i,
                    ...s
                }), () => void d.itemMap.delete(i))), (0, l.jsx)(w, { ...{
                        [m]: ""
                    },
                    ref: u,
                    children: a
                })
            });
        return g.displayName = v, [{
            Provider: d,
            Slot: h,
            ItemSlot: g
        }, function(r) {
            let n = c(e + "CollectionConsumer", r);
            return t.default.useCallback(() => {
                let e = n.collectionRef.current;
                if (!e) return [];
                let t = Array.from(e.querySelectorAll(`[${m}]`));
                return Array.from(n.itemMap.values()).sort((e, r) => t.indexOf(e.ref.current) - t.indexOf(r.ref.current))
            }, [n.collectionRef, n.itemMap])
        }, s]
    }
    var c = new WeakMap;

    function d(e, t) {
        var r, n;
        let o, a, s;
        if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
        let i = (r = e, n = t, o = r.length, (s = (a = p(n)) >= 0 ? a : o + a) < 0 || s >= o ? -1 : s);
        return -1 === i ? void 0 : e[i]
    }

    function p(e) {
        return e != e || 0 === e ? 0 : Math.trunc(e)
    }(class e extends Map {#
        e;
        constructor(e) {
            super(e), this.#e = [...super.keys()], c.set(this, !0)
        }
        set(e, t) {
            return c.get(this) && (this.has(e) ? this.#e[this.#e.indexOf(e)] = e : this.#e.push(e)), super.set(e, t), this
        }
        insert(e, t, r) {
            let n, o = this.has(t),
                a = this.#e.length,
                s = p(e),
                i = s >= 0 ? s : a + s,
                l = i < 0 || i >= a ? -1 : i;
            if (l === this.size || o && l === this.size - 1 || -1 === l) return this.set(t, r), this;
            let u = this.size + +!o;
            s < 0 && i++;
            let c = [...this.#e],
                d = !1;
            for (let e = i; e < u; e++)
                if (i === e) {
                    let a = c[e];
                    c[e] === t && (a = c[e + 1]), o && this.delete(t), n = this.get(a), this.set(t, r)
                } else {
                    d || c[e - 1] !== t || (d = !0);
                    let r = c[d ? e : e - 1],
                        o = n;
                    n = this.get(r), this.delete(r), this.set(r, o)
                }
            return this
        }
        with(t, r, n) {
            let o = new e(this);
            return o.insert(t, r, n), o
        }
        before(e) {
            let t = this.#e.indexOf(e) - 1;
            if (!(t < 0)) return this.entryAt(t)
        }
        setBefore(e, t, r) {
            let n = this.#e.indexOf(e);
            return -1 === n ? this : this.insert(n, t, r)
        }
        after(e) {
            let t = this.#e.indexOf(e);
            if (-1 !== (t = -1 === t || t === this.size - 1 ? -1 : t + 1)) return this.entryAt(t)
        }
        setAfter(e, t, r) {
            let n = this.#e.indexOf(e);
            return -1 === n ? this : this.insert(n + 1, t, r)
        }
        first() {
            return this.entryAt(0)
        }
        last() {
            return this.entryAt(-1)
        }
        clear() {
            return this.#e = [], super.clear()
        }
        delete(e) {
            let t = super.delete(e);
            return t && this.#e.splice(this.#e.indexOf(e), 1), t
        }
        deleteAt(e) {
            let t = this.keyAt(e);
            return void 0 !== t && this.delete(t)
        }
        at(e) {
            let t = d(this.#e, e);
            if (void 0 !== t) return this.get(t)
        }
        entryAt(e) {
            let t = d(this.#e, e);
            if (void 0 !== t) return [t, this.get(t)]
        }
        indexOf(e) {
            return this.#e.indexOf(e)
        }
        keyAt(e) {
            return d(this.#e, e)
        }
        from(e, t) {
            let r = this.indexOf(e);
            if (-1 === r) return;
            let n = r + t;
            return n < 0 && (n = 0), n >= this.size && (n = this.size - 1), this.at(n)
        }
        keyFrom(e, t) {
            let r = this.indexOf(e);
            if (-1 === r) return;
            let n = r + t;
            return n < 0 && (n = 0), n >= this.size && (n = this.size - 1), this.keyAt(n)
        }
        find(e, t) {
            let r = 0;
            for (let n of this) {
                if (Reflect.apply(e, t, [n, r, this])) return n;
                r++
            }
        }
        findIndex(e, t) {
            let r = 0;
            for (let n of this) {
                if (Reflect.apply(e, t, [n, r, this])) return r;
                r++
            }
            return -1
        }
        filter(t, r) {
            let n = [],
                o = 0;
            for (let e of this) Reflect.apply(t, r, [e, o, this]) && n.push(e), o++;
            return new e(n)
        }
        map(t, r) {
            let n = [],
                o = 0;
            for (let e of this) n.push([e[0], Reflect.apply(t, r, [e, o, this])]), o++;
            return new e(n)
        }
        reduce(...e) {
            let [t, r] = e, n = 0, o = r ? ? this.at(0);
            for (let r of this) o = 0 === n && 1 === e.length ? r : Reflect.apply(t, this, [o, r, n, this]), n++;
            return o
        }
        reduceRight(...e) {
            let [t, r] = e, n = r ? ? this.at(-1);
            for (let r = this.size - 1; r >= 0; r--) {
                let o = this.at(r);
                n = r === this.size - 1 && 1 === e.length ? o : Reflect.apply(t, this, [n, o, r, this])
            }
            return n
        }
        toSorted(t) {
            return new e([...this.entries()].sort(t))
        }
        toReversed() {
            let t = new e;
            for (let e = this.size - 1; e >= 0; e--) {
                let r = this.keyAt(e),
                    n = this.get(r);
                t.set(r, n)
            }
            return t
        }
        toSpliced(...t) {
            let r = [...this.entries()];
            return r.splice(...t), new e(r)
        }
        slice(t, r) {
            let n = new e,
                o = this.size - 1;
            if (void 0 === t) return n;
            t < 0 && (t += this.size), void 0 !== r && r > 0 && (o = r - 1);
            for (let e = t; e <= o; e++) {
                let t = this.keyAt(e),
                    r = this.get(t);
                n.set(t, r)
            }
            return n
        }
        every(e, t) {
            let r = 0;
            for (let n of this) {
                if (!Reflect.apply(e, t, [n, r, this])) return !1;
                r++
            }
            return !0
        }
        some(e, t) {
            let r = 0;
            for (let n of this) {
                if (Reflect.apply(e, t, [n, r, this])) return !0;
                r++
            }
            return !1
        }
    }), e.s(["createCollection", 0, u], 508785);
    var f = t.createContext(void 0);

    function h(e) {
        let r = t.useContext(f);
        return e || r || "ltr"
    }
    e.s(["useDirection", 0, h], 974539);
    var v = e.i(538469),
        m = e.i(203158),
        w = e.i(548163),
        g = e.i(40266),
        y = e.i(127200),
        x = e.i(112466),
        R = e.i(169525),
        C = e.i(886449),
        b = "rovingFocusGroup.onEntryFocus",
        M = {
            bubbles: !1,
            cancelable: !0
        },
        D = "RovingFocusGroup",
        [k, E, j] = u(D),
        [S, I] = (0, o.createContextScope)(D, [j]),
        [P, A] = S(D),
        _ = t.forwardRef((e, t) => (0, l.jsx)(k.Provider, {
            scope: e.__scopeRovingFocusGroup,
            children: (0, l.jsx)(k.Slot, {
                scope: e.__scopeRovingFocusGroup,
                children: (0, l.jsx)(T, { ...e,
                    ref: t
                })
            })
        }));
    _.displayName = D;
    var T = t.forwardRef((e, o) => {
            let {
                __scopeRovingFocusGroup: i,
                orientation: u,
                loop: c = !1,
                dir: d,
                currentTabStopId: p,
                defaultCurrentTabStopId: f,
                onCurrentTabStopIdChange: v,
                onEntryFocus: m,
                preventScrollOnEntryFocus: w = !1,
                ...g
            } = e, y = t.useRef(null), x = (0, n.useComposedRefs)(o, y), R = h(d), [k, j] = (0, a.useControllableState)({
                prop: p,
                defaultProp: f ? ? null,
                onChange: v,
                caller: D
            }), [S, I] = t.useState(!1), A = (0, C.useCallbackRef)(m), _ = E(i), T = t.useRef(!1), [O, F] = t.useState(0);
            return t.useEffect(() => {
                let e = y.current;
                if (e) return e.addEventListener(b, A), () => e.removeEventListener(b, A)
            }, [A]), (0, l.jsx)(P, {
                scope: i,
                orientation: u,
                dir: R,
                loop: c,
                currentTabStopId: k,
                onItemFocus: t.useCallback(e => j(e), [j]),
                onItemShiftTab: t.useCallback(() => I(!0), []),
                onFocusableItemAdd: t.useCallback(() => F(e => e + 1), []),
                onFocusableItemRemove: t.useCallback(() => F(e => e - 1), []),
                children: (0, l.jsx)(s.Primitive.div, {
                    tabIndex: S || 0 === O ? -1 : 0,
                    "data-orientation": u,
                    ...g,
                    ref: x,
                    style: {
                        outline: "none",
                        ...e.style
                    },
                    onMouseDown: (0, r.composeEventHandlers)(e.onMouseDown, () => {
                        T.current = !0
                    }),
                    onFocus: (0, r.composeEventHandlers)(e.onFocus, e => {
                        let t = !T.current;
                        if (e.target === e.currentTarget && t && !S) {
                            let t = new CustomEvent(b, M);
                            if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
                                let e = _().filter(e => e.focusable);
                                H([e.find(e => e.active), e.find(e => e.id === k), ...e].filter(Boolean).map(e => e.ref.current), w)
                            }
                        }
                        T.current = !1
                    }),
                    onBlur: (0, r.composeEventHandlers)(e.onBlur, () => I(!1))
                })
            })
        }),
        O = "RovingFocusGroupItem",
        F = t.forwardRef((e, n) => {
            let {
                __scopeRovingFocusGroup: o,
                focusable: a = !0,
                active: i = !1,
                tabStopId: u,
                children: c,
                ...d
            } = e, p = (0, g.useId)(), f = u || p, h = A(O, o), v = h.currentTabStopId === f, m = E(o), {
                onFocusableItemAdd: w,
                onFocusableItemRemove: y,
                currentTabStopId: x
            } = h;
            return t.useEffect(() => {
                if (a) return w(), () => y()
            }, [a, w, y]), (0, l.jsx)(k.ItemSlot, {
                scope: o,
                id: f,
                focusable: a,
                active: i,
                children: (0, l.jsx)(s.Primitive.span, {
                    tabIndex: v ? 0 : -1,
                    "data-orientation": h.orientation,
                    ...d,
                    ref: n,
                    onMouseDown: (0, r.composeEventHandlers)(e.onMouseDown, e => {
                        a ? h.onItemFocus(f) : e.preventDefault()
                    }),
                    onFocus: (0, r.composeEventHandlers)(e.onFocus, () => h.onItemFocus(f)),
                    onKeyDown: (0, r.composeEventHandlers)(e.onKeyDown, e => {
                        if ("Tab" === e.key && e.shiftKey) return void h.onItemShiftTab();
                        if (e.target !== e.currentTarget) return;
                        let t = function(e, t, r) {
                            var n;
                            let o = (n = e.key, "rtl" !== r ? n : "ArrowLeft" === n ? "ArrowRight" : "ArrowRight" === n ? "ArrowLeft" : n);
                            if (!("vertical" === t && ["ArrowLeft", "ArrowRight"].includes(o)) && !("horizontal" === t && ["ArrowUp", "ArrowDown"].includes(o))) return N[o]
                        }(e, h.orientation, h.dir);
                        if (void 0 !== t) {
                            if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
                            e.preventDefault();
                            let o = m().filter(e => e.focusable).map(e => e.ref.current);
                            if ("last" === t) o.reverse();
                            else if ("prev" === t || "next" === t) {
                                var r, n;
                                "prev" === t && o.reverse();
                                let a = o.indexOf(e.currentTarget);
                                o = h.loop ? (r = o, n = a + 1, r.map((e, t) => r[(n + t) % r.length])) : o.slice(a + 1)
                            }
                            setTimeout(() => H(o))
                        }
                    }),
                    children: "function" == typeof c ? c({
                        isCurrentTabStop: v,
                        hasTabStop: null != x
                    }) : c
                })
            })
        });
    F.displayName = O;
    var N = {
        ArrowLeft: "prev",
        ArrowUp: "prev",
        ArrowRight: "next",
        ArrowDown: "next",
        PageUp: "first",
        Home: "first",
        PageDown: "last",
        End: "last"
    };

    function H(e, t = !1) {
        let r = document.activeElement;
        for (let n of e)
            if (n === r || (n.focus({
                    preventScroll: t
                }), document.activeElement !== r)) return
    }
    e.s(["Item", 0, F, "Root", 0, _, "createRovingFocusGroupScope", 0, I], 142953);
    var L = e.i(3300),
        K = e.i(235663),
        G = ["Enter", " "],
        z = ["ArrowUp", "PageDown", "End"],
        U = ["ArrowDown", "PageUp", "Home", ...z],
        B = {
            ltr: [...G, "ArrowRight"],
            rtl: [...G, "ArrowLeft"]
        },
        V = {
            ltr: ["ArrowLeft"],
            rtl: ["ArrowRight"]
        },
        X = "Menu",
        [W, Y, q] = u(X),
        [Z, $] = (0, o.createContextScope)(X, [q, y.createPopperScope, I]),
        J = (0, y.createPopperScope)(),
        Q = I(),
        [ee, et] = Z(X),
        [er, en] = Z(X),
        eo = e => {
            let {
                __scopeMenu: r,
                open: n = !1,
                children: o,
                dir: a,
                onOpenChange: s,
                modal: i = !0
            } = e, u = J(r), [c, d] = t.useState(null), p = t.useRef(!1), f = (0, C.useCallbackRef)(s), v = h(a);
            return t.useEffect(() => {
                let e = () => {
                        p.current = !0, document.addEventListener("pointerdown", t, {
                            capture: !0,
                            once: !0
                        }), document.addEventListener("pointermove", t, {
                            capture: !0,
                            once: !0
                        })
                    },
                    t = () => p.current = !1;
                return document.addEventListener("keydown", e, {
                    capture: !0
                }), () => {
                    document.removeEventListener("keydown", e, {
                        capture: !0
                    }), document.removeEventListener("pointerdown", t, {
                        capture: !0
                    }), document.removeEventListener("pointermove", t, {
                        capture: !0
                    })
                }
            }, []), (0, l.jsx)(y.Root, { ...u,
                children: (0, l.jsx)(ee, {
                    scope: r,
                    open: n,
                    onOpenChange: f,
                    content: c,
                    onContentChange: d,
                    children: (0, l.jsx)(er, {
                        scope: r,
                        onClose: t.useCallback(() => f(!1), [f]),
                        isUsingKeyboardRef: p,
                        dir: v,
                        modal: i,
                        children: o
                    })
                })
            })
        };
    eo.displayName = X;
    var ea = t.forwardRef((e, t) => {
        let {
            __scopeMenu: r,
            ...n
        } = e, o = J(r);
        return (0, l.jsx)(y.Anchor, { ...o,
            ...n,
            ref: t
        })
    });
    ea.displayName = "MenuAnchor";
    var es = "MenuPortal",
        [ei, el] = Z(es, {
            forceMount: void 0
        }),
        eu = e => {
            let {
                __scopeMenu: t,
                forceMount: r,
                children: n,
                container: o
            } = e, a = et(es, t);
            return (0, l.jsx)(ei, {
                scope: t,
                forceMount: r,
                children: (0, l.jsx)(R.Presence, {
                    present: r || a.open,
                    children: (0, l.jsx)(x.Portal, {
                        asChild: !0,
                        container: o,
                        children: n
                    })
                })
            })
        };
    eu.displayName = es;
    var ec = "MenuContent",
        [ed, ep] = Z(ec),
        ef = t.forwardRef((e, t) => {
            let r = el(ec, e.__scopeMenu),
                {
                    forceMount: n = r.forceMount,
                    ...o
                } = e,
                a = et(ec, e.__scopeMenu),
                s = en(ec, e.__scopeMenu);
            return (0, l.jsx)(W.Provider, {
                scope: e.__scopeMenu,
                children: (0, l.jsx)(R.Presence, {
                    present: n || a.open,
                    children: (0, l.jsx)(W.Slot, {
                        scope: e.__scopeMenu,
                        children: s.modal ? (0, l.jsx)(eh, { ...o,
                            ref: t
                        }) : (0, l.jsx)(ev, { ...o,
                            ref: t
                        })
                    })
                })
            })
        }),
        eh = t.forwardRef((e, o) => {
            let a = et(ec, e.__scopeMenu),
                s = t.useRef(null),
                i = (0, n.useComposedRefs)(o, s);
            return t.useEffect(() => {
                let e = s.current;
                if (e) return (0, L.hideOthers)(e)
            }, []), (0, l.jsx)(ew, { ...e,
                ref: i,
                trapFocus: a.open,
                disableOutsidePointerEvents: a.open,
                disableOutsideScroll: !0,
                onFocusOutside: (0, r.composeEventHandlers)(e.onFocusOutside, e => e.preventDefault(), {
                    checkForDefaultPrevented: !1
                }),
                onDismiss: () => a.onOpenChange(!1)
            })
        }),
        ev = t.forwardRef((e, t) => {
            let r = et(ec, e.__scopeMenu);
            return (0, l.jsx)(ew, { ...e,
                ref: t,
                trapFocus: !1,
                disableOutsidePointerEvents: !1,
                disableOutsideScroll: !1,
                onDismiss: () => r.onOpenChange(!1)
            })
        }),
        em = (0, i.createSlot)("MenuContent.ScrollLock"),
        ew = t.forwardRef((e, o) => {
            let {
                __scopeMenu: a,
                loop: s = !1,
                trapFocus: i,
                onOpenAutoFocus: u,
                onCloseAutoFocus: c,
                disableOutsidePointerEvents: d,
                onEntryFocus: p,
                onEscapeKeyDown: f,
                onPointerDownOutside: h,
                onFocusOutside: g,
                onInteractOutside: x,
                onDismiss: R,
                disableOutsideScroll: C,
                ...b
            } = e, M = et(ec, a), D = en(ec, a), k = J(a), E = Q(a), j = Y(a), [S, I] = t.useState(null), P = t.useRef(null), A = (0, n.useComposedRefs)(o, P, M.onContentChange), T = t.useRef(0), O = t.useRef(""), F = t.useRef(0), N = t.useRef(null), H = t.useRef("right"), L = t.useRef(0), G = C ? K.RemoveScroll : t.Fragment;
            t.useEffect(() => () => window.clearTimeout(T.current), []), (0, m.useFocusGuards)();
            let B = t.useCallback(e => {
                var t, r;
                return H.current === N.current ? .side && (t = e, !!(r = N.current ? .area) && function(e, t) {
                    let {
                        x: r,
                        y: n
                    } = e, o = !1;
                    for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
                        let s = t[e],
                            i = t[a],
                            l = s.x,
                            u = s.y,
                            c = i.x,
                            d = i.y;
                        u > n != d > n && r < (c - l) * (n - u) / (d - u) + l && (o = !o)
                    }
                    return o
                }({
                    x: t.clientX,
                    y: t.clientY
                }, r))
            }, []);
            return (0, l.jsx)(ed, {
                scope: a,
                searchRef: O,
                onItemEnter: t.useCallback(e => {
                    B(e) && e.preventDefault()
                }, [B]),
                onItemLeave: t.useCallback(e => {
                    B(e) || (P.current ? .focus(), I(null))
                }, [B]),
                onTriggerLeave: t.useCallback(e => {
                    B(e) && e.preventDefault()
                }, [B]),
                pointerGraceTimerRef: F,
                onPointerGraceIntentChange: t.useCallback(e => {
                    N.current = e
                }, []),
                children: (0, l.jsx)(G, { ...C ? {
                        as: em,
                        allowPinchZoom: !0
                    } : void 0,
                    children: (0, l.jsx)(w.FocusScope, {
                        asChild: !0,
                        trapped: i,
                        onMountAutoFocus: (0, r.composeEventHandlers)(u, e => {
                            e.preventDefault(), P.current ? .focus({
                                preventScroll: !0
                            })
                        }),
                        onUnmountAutoFocus: c,
                        children: (0, l.jsx)(v.DismissableLayer, {
                            asChild: !0,
                            disableOutsidePointerEvents: d,
                            onEscapeKeyDown: f,
                            onPointerDownOutside: h,
                            onFocusOutside: g,
                            onInteractOutside: x,
                            onDismiss: R,
                            children: (0, l.jsx)(_, {
                                asChild: !0,
                                ...E,
                                dir: D.dir,
                                orientation: "vertical",
                                loop: s,
                                currentTabStopId: S,
                                onCurrentTabStopIdChange: I,
                                onEntryFocus: (0, r.composeEventHandlers)(p, e => {
                                    D.isUsingKeyboardRef.current || e.preventDefault()
                                }),
                                preventScrollOnEntryFocus: !0,
                                children: (0, l.jsx)(y.Content, {
                                    role: "menu",
                                    "aria-orientation": "vertical",
                                    "data-state": eV(M.open),
                                    "data-radix-menu-content": "",
                                    dir: D.dir,
                                    ...k,
                                    ...b,
                                    ref: A,
                                    style: {
                                        outline: "none",
                                        ...b.style
                                    },
                                    onKeyDown: (0, r.composeEventHandlers)(b.onKeyDown, e => {
                                        let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget,
                                            r = e.ctrlKey || e.altKey || e.metaKey,
                                            n = 1 === e.key.length;
                                        if (t) {
                                            var o;
                                            let t, a, s, i, l, u;
                                            "Tab" === e.key && e.preventDefault(), !r && n && (o = e.key, t = O.current + o, a = j().filter(e => !e.disabled), s = document.activeElement, i = a.find(e => e.ref.current === s) ? .textValue, l = function(e, t, r) {
                                                var n;
                                                let o = t.length > 1 && Array.from(t).every(e => e === t[0]) ? t[0] : t,
                                                    a = r ? e.indexOf(r) : -1,
                                                    s = (n = Math.max(a, 0), e.map((t, r) => e[(n + r) % e.length]));
                                                1 === o.length && (s = s.filter(e => e !== r));
                                                let i = s.find(e => e.toLowerCase().startsWith(o.toLowerCase()));
                                                return i !== r ? i : void 0
                                            }(a.map(e => e.textValue), t, i), u = a.find(e => e.textValue === l) ? .ref.current, function e(t) {
                                                O.current = t, window.clearTimeout(T.current), "" !== t && (T.current = window.setTimeout(() => e(""), 1e3))
                                            }(t), u && setTimeout(() => u.focus()))
                                        }
                                        let a = P.current;
                                        if (e.target !== a || !U.includes(e.key)) return;
                                        e.preventDefault();
                                        let s = j().filter(e => !e.disabled).map(e => e.ref.current);
                                        z.includes(e.key) && s.reverse(),
                                            function(e) {
                                                let t = document.activeElement;
                                                for (let r of e)
                                                    if (r === t || (r.focus(), document.activeElement !== t)) return
                                            }(s)
                                    }),
                                    onBlur: (0, r.composeEventHandlers)(e.onBlur, e => {
                                        e.currentTarget.contains(e.target) || (window.clearTimeout(T.current), O.current = "")
                                    }),
                                    onPointerMove: (0, r.composeEventHandlers)(e.onPointerMove, eY(e => {
                                        let t = e.target,
                                            r = L.current !== e.clientX;
                                        e.currentTarget.contains(t) && r && (H.current = e.clientX > L.current ? "right" : "left", L.current = e.clientX)
                                    }))
                                })
                            })
                        })
                    })
                })
            })
        });
    ef.displayName = ec;
    var eg = t.forwardRef((e, t) => {
        let {
            __scopeMenu: r,
            ...n
        } = e;
        return (0, l.jsx)(s.Primitive.div, {
            role: "group",
            ...n,
            ref: t
        })
    });
    eg.displayName = "MenuGroup";
    var ey = t.forwardRef((e, t) => {
        let {
            __scopeMenu: r,
            ...n
        } = e;
        return (0, l.jsx)(s.Primitive.div, { ...n,
            ref: t
        })
    });
    ey.displayName = "MenuLabel";
    var ex = "MenuItem",
        eR = "menu.itemSelect",
        eC = t.forwardRef((e, o) => {
            let {
                disabled: a = !1,
                onSelect: i,
                ...u
            } = e, c = t.useRef(null), d = en(ex, e.__scopeMenu), p = ep(ex, e.__scopeMenu), f = (0, n.useComposedRefs)(o, c), h = t.useRef(!1);
            return (0, l.jsx)(eb, { ...u,
                ref: f,
                disabled: a,
                onClick: (0, r.composeEventHandlers)(e.onClick, () => {
                    let e = c.current;
                    if (!a && e) {
                        let t = new CustomEvent(eR, {
                            bubbles: !0,
                            cancelable: !0
                        });
                        e.addEventListener(eR, e => i ? .(e), {
                            once: !0
                        }), (0, s.dispatchDiscreteCustomEvent)(e, t), t.defaultPrevented ? h.current = !1 : d.onClose()
                    }
                }),
                onPointerDown: t => {
                    e.onPointerDown ? .(t), h.current = !0
                },
                onPointerUp: (0, r.composeEventHandlers)(e.onPointerUp, e => {
                    h.current || e.currentTarget ? .click()
                }),
                onKeyDown: (0, r.composeEventHandlers)(e.onKeyDown, e => {
                    let t = "" !== p.searchRef.current;
                    a || t && " " === e.key || G.includes(e.key) && (e.currentTarget.click(), e.preventDefault())
                })
            })
        });
    eC.displayName = ex;
    var eb = t.forwardRef((e, o) => {
            let {
                __scopeMenu: a,
                disabled: i = !1,
                textValue: u,
                ...c
            } = e, d = ep(ex, a), p = Q(a), f = t.useRef(null), h = (0, n.useComposedRefs)(o, f), [v, m] = t.useState(!1), [w, g] = t.useState("");
            return t.useEffect(() => {
                let e = f.current;
                e && g((e.textContent ? ? "").trim())
            }, [c.children]), (0, l.jsx)(W.ItemSlot, {
                scope: a,
                disabled: i,
                textValue: u ? ? w,
                children: (0, l.jsx)(F, {
                    asChild: !0,
                    ...p,
                    focusable: !i,
                    children: (0, l.jsx)(s.Primitive.div, {
                        role: "menuitem",
                        "data-highlighted": v ? "" : void 0,
                        "aria-disabled": i || void 0,
                        "data-disabled": i ? "" : void 0,
                        ...c,
                        ref: h,
                        onPointerMove: (0, r.composeEventHandlers)(e.onPointerMove, eY(e => {
                            i ? d.onItemLeave(e) : (d.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({
                                preventScroll: !0
                            }))
                        })),
                        onPointerLeave: (0, r.composeEventHandlers)(e.onPointerLeave, eY(e => d.onItemLeave(e))),
                        onFocus: (0, r.composeEventHandlers)(e.onFocus, () => m(!0)),
                        onBlur: (0, r.composeEventHandlers)(e.onBlur, () => m(!1))
                    })
                })
            })
        }),
        eM = t.forwardRef((e, t) => {
            let {
                checked: n = !1,
                onCheckedChange: o,
                ...a
            } = e;
            return (0, l.jsx)(eA, {
                scope: e.__scopeMenu,
                checked: n,
                children: (0, l.jsx)(eC, {
                    role: "menuitemcheckbox",
                    "aria-checked": eX(n) ? "mixed" : n,
                    ...a,
                    ref: t,
                    "data-state": eW(n),
                    onSelect: (0, r.composeEventHandlers)(a.onSelect, () => o ? .(!!eX(n) || !n), {
                        checkForDefaultPrevented: !1
                    })
                })
            })
        });
    eM.displayName = "MenuCheckboxItem";
    var eD = "MenuRadioGroup",
        [ek, eE] = Z(eD, {
            value: void 0,
            onValueChange: () => {}
        }),
        ej = t.forwardRef((e, t) => {
            let {
                value: r,
                onValueChange: n,
                ...o
            } = e, a = (0, C.useCallbackRef)(n);
            return (0, l.jsx)(ek, {
                scope: e.__scopeMenu,
                value: r,
                onValueChange: a,
                children: (0, l.jsx)(eg, { ...o,
                    ref: t
                })
            })
        });
    ej.displayName = eD;
    var eS = "MenuRadioItem",
        eI = t.forwardRef((e, t) => {
            let {
                value: n,
                ...o
            } = e, a = eE(eS, e.__scopeMenu), s = n === a.value;
            return (0, l.jsx)(eA, {
                scope: e.__scopeMenu,
                checked: s,
                children: (0, l.jsx)(eC, {
                    role: "menuitemradio",
                    "aria-checked": s,
                    ...o,
                    ref: t,
                    "data-state": eW(s),
                    onSelect: (0, r.composeEventHandlers)(o.onSelect, () => a.onValueChange ? .(n), {
                        checkForDefaultPrevented: !1
                    })
                })
            })
        });
    eI.displayName = eS;
    var eP = "MenuItemIndicator",
        [eA, e_] = Z(eP, {
            checked: !1
        }),
        eT = t.forwardRef((e, t) => {
            let {
                __scopeMenu: r,
                forceMount: n,
                ...o
            } = e, a = e_(eP, r);
            return (0, l.jsx)(R.Presence, {
                present: n || eX(a.checked) || !0 === a.checked,
                children: (0, l.jsx)(s.Primitive.span, { ...o,
                    ref: t,
                    "data-state": eW(a.checked)
                })
            })
        });
    eT.displayName = eP;
    var eO = t.forwardRef((e, t) => {
        let {
            __scopeMenu: r,
            ...n
        } = e;
        return (0, l.jsx)(s.Primitive.div, {
            role: "separator",
            "aria-orientation": "horizontal",
            ...n,
            ref: t
        })
    });
    eO.displayName = "MenuSeparator";
    var eF = t.forwardRef((e, t) => {
        let {
            __scopeMenu: r,
            ...n
        } = e, o = J(r);
        return (0, l.jsx)(y.Arrow, { ...o,
            ...n,
            ref: t
        })
    });
    eF.displayName = "MenuArrow";
    var eN = "MenuSub",
        [eH, eL] = Z(eN),
        eK = e => {
            let {
                __scopeMenu: r,
                children: n,
                open: o = !1,
                onOpenChange: a
            } = e, s = et(eN, r), i = J(r), [u, c] = t.useState(null), [d, p] = t.useState(null), f = (0, C.useCallbackRef)(a);
            return t.useEffect(() => (!1 === s.open && f(!1), () => f(!1)), [s.open, f]), (0, l.jsx)(y.Root, { ...i,
                children: (0, l.jsx)(ee, {
                    scope: r,
                    open: o,
                    onOpenChange: f,
                    content: d,
                    onContentChange: p,
                    children: (0, l.jsx)(eH, {
                        scope: r,
                        contentId: (0, g.useId)(),
                        triggerId: (0, g.useId)(),
                        trigger: u,
                        onTriggerChange: c,
                        children: n
                    })
                })
            })
        };
    eK.displayName = eN;
    var eG = "MenuSubTrigger",
        ez = t.forwardRef((e, o) => {
            let a = et(eG, e.__scopeMenu),
                s = en(eG, e.__scopeMenu),
                i = eL(eG, e.__scopeMenu),
                u = ep(eG, e.__scopeMenu),
                c = t.useRef(null),
                {
                    pointerGraceTimerRef: d,
                    onPointerGraceIntentChange: p
                } = u,
                f = {
                    __scopeMenu: e.__scopeMenu
                },
                h = t.useCallback(() => {
                    c.current && window.clearTimeout(c.current), c.current = null
                }, []);
            return t.useEffect(() => h, [h]), t.useEffect(() => {
                let e = d.current;
                return () => {
                    window.clearTimeout(e), p(null)
                }
            }, [d, p]), (0, l.jsx)(ea, {
                asChild: !0,
                ...f,
                children: (0, l.jsx)(eb, {
                    id: i.triggerId,
                    "aria-haspopup": "menu",
                    "aria-expanded": a.open,
                    "aria-controls": i.contentId,
                    "data-state": eV(a.open),
                    ...e,
                    ref: (0, n.composeRefs)(o, i.onTriggerChange),
                    onClick: t => {
                        e.onClick ? .(t), e.disabled || t.defaultPrevented || (t.currentTarget.focus(), a.open || a.onOpenChange(!0))
                    },
                    onPointerMove: (0, r.composeEventHandlers)(e.onPointerMove, eY(t => {
                        u.onItemEnter(t), !t.defaultPrevented && (e.disabled || a.open || c.current || (u.onPointerGraceIntentChange(null), c.current = window.setTimeout(() => {
                            a.onOpenChange(!0), h()
                        }, 100)))
                    })),
                    onPointerLeave: (0, r.composeEventHandlers)(e.onPointerLeave, eY(e => {
                        h();
                        let t = a.content ? .getBoundingClientRect();
                        if (t) {
                            let r = a.content ? .dataset.side,
                                n = "right" === r,
                                o = t[n ? "left" : "right"],
                                s = t[n ? "right" : "left"];
                            u.onPointerGraceIntentChange({
                                area: [{
                                    x: e.clientX + (n ? -5 : 5),
                                    y: e.clientY
                                }, {
                                    x: o,
                                    y: t.top
                                }, {
                                    x: s,
                                    y: t.top
                                }, {
                                    x: s,
                                    y: t.bottom
                                }, {
                                    x: o,
                                    y: t.bottom
                                }],
                                side: r
                            }), window.clearTimeout(d.current), d.current = window.setTimeout(() => u.onPointerGraceIntentChange(null), 300)
                        } else {
                            if (u.onTriggerLeave(e), e.defaultPrevented) return;
                            u.onPointerGraceIntentChange(null)
                        }
                    })),
                    onKeyDown: (0, r.composeEventHandlers)(e.onKeyDown, t => {
                        let r = "" !== u.searchRef.current;
                        e.disabled || r && " " === t.key || B[s.dir].includes(t.key) && (a.onOpenChange(!0), a.content ? .focus(), t.preventDefault())
                    })
                })
            })
        });
    ez.displayName = eG;
    var eU = "MenuSubContent",
        eB = t.forwardRef((e, o) => {
            let a = el(ec, e.__scopeMenu),
                {
                    forceMount: s = a.forceMount,
                    ...i
                } = e,
                u = et(ec, e.__scopeMenu),
                c = en(ec, e.__scopeMenu),
                d = eL(eU, e.__scopeMenu),
                p = t.useRef(null),
                f = (0, n.useComposedRefs)(o, p);
            return (0, l.jsx)(W.Provider, {
                scope: e.__scopeMenu,
                children: (0, l.jsx)(R.Presence, {
                    present: s || u.open,
                    children: (0, l.jsx)(W.Slot, {
                        scope: e.__scopeMenu,
                        children: (0, l.jsx)(ew, {
                            id: d.contentId,
                            "aria-labelledby": d.triggerId,
                            ...i,
                            ref: f,
                            align: "start",
                            side: "rtl" === c.dir ? "left" : "right",
                            disableOutsidePointerEvents: !1,
                            disableOutsideScroll: !1,
                            trapFocus: !1,
                            onOpenAutoFocus: e => {
                                c.isUsingKeyboardRef.current && p.current ? .focus(), e.preventDefault()
                            },
                            onCloseAutoFocus: e => e.preventDefault(),
                            onFocusOutside: (0, r.composeEventHandlers)(e.onFocusOutside, e => {
                                e.target !== d.trigger && u.onOpenChange(!1)
                            }),
                            onEscapeKeyDown: (0, r.composeEventHandlers)(e.onEscapeKeyDown, e => {
                                c.onClose(), e.preventDefault()
                            }),
                            onKeyDown: (0, r.composeEventHandlers)(e.onKeyDown, e => {
                                let t = e.currentTarget.contains(e.target),
                                    r = V[c.dir].includes(e.key);
                                t && r && (u.onOpenChange(!1), d.trigger ? .focus(), e.preventDefault())
                            })
                        })
                    })
                })
            })
        });

    function eV(e) {
        return e ? "open" : "closed"
    }

    function eX(e) {
        return "indeterminate" === e
    }

    function eW(e) {
        return eX(e) ? "indeterminate" : e ? "checked" : "unchecked"
    }

    function eY(e) {
        return t => "mouse" === t.pointerType ? e(t) : void 0
    }
    eB.displayName = eU;
    var eq = "DropdownMenu",
        [eZ, e$] = (0, o.createContextScope)(eq, [$]),
        eJ = $(),
        [eQ, e0] = eZ(eq),
        e1 = e => {
            let {
                __scopeDropdownMenu: r,
                children: n,
                dir: o,
                open: s,
                defaultOpen: i,
                onOpenChange: u,
                modal: c = !0
            } = e, d = eJ(r), p = t.useRef(null), [f, h] = (0, a.useControllableState)({
                prop: s,
                defaultProp: i ? ? !1,
                onChange: u,
                caller: eq
            });
            return (0, l.jsx)(eQ, {
                scope: r,
                triggerId: (0, g.useId)(),
                triggerRef: p,
                contentId: (0, g.useId)(),
                open: f,
                onOpenChange: h,
                onOpenToggle: t.useCallback(() => h(e => !e), [h]),
                modal: c,
                children: (0, l.jsx)(eo, { ...d,
                    open: f,
                    onOpenChange: h,
                    dir: o,
                    modal: c,
                    children: n
                })
            })
        };
    e1.displayName = eq;
    var e6 = "DropdownMenuTrigger",
        e3 = t.forwardRef((e, t) => {
            let {
                __scopeDropdownMenu: o,
                disabled: a = !1,
                ...i
            } = e, u = e0(e6, o), c = eJ(o);
            return (0, l.jsx)(ea, {
                asChild: !0,
                ...c,
                children: (0, l.jsx)(s.Primitive.button, {
                    type: "button",
                    id: u.triggerId,
                    "aria-haspopup": "menu",
                    "aria-expanded": u.open,
                    "aria-controls": u.open ? u.contentId : void 0,
                    "data-state": u.open ? "open" : "closed",
                    "data-disabled": a ? "" : void 0,
                    disabled: a,
                    ...i,
                    ref: (0, n.composeRefs)(t, u.triggerRef),
                    onPointerDown: (0, r.composeEventHandlers)(e.onPointerDown, e => {
                        !a && 0 === e.button && !1 === e.ctrlKey && (u.onOpenToggle(), u.open || e.preventDefault())
                    }),
                    onKeyDown: (0, r.composeEventHandlers)(e.onKeyDown, e => {
                        !a && (["Enter", " "].includes(e.key) && u.onOpenToggle(), "ArrowDown" === e.key && u.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(e.key) && e.preventDefault())
                    })
                })
            })
        });
    e3.displayName = e6;
    var e5 = e => {
        let {
            __scopeDropdownMenu: t,
            ...r
        } = e, n = eJ(t);
        return (0, l.jsx)(eu, { ...n,
            ...r
        })
    };
    e5.displayName = "DropdownMenuPortal";
    var e2 = "DropdownMenuContent",
        e9 = t.forwardRef((e, n) => {
            let {
                __scopeDropdownMenu: o,
                ...a
            } = e, s = e0(e2, o), i = eJ(o), u = t.useRef(!1);
            return (0, l.jsx)(ef, {
                id: s.contentId,
                "aria-labelledby": s.triggerId,
                ...i,
                ...a,
                ref: n,
                onCloseAutoFocus: (0, r.composeEventHandlers)(e.onCloseAutoFocus, e => {
                    u.current || s.triggerRef.current ? .focus(), u.current = !1, e.preventDefault()
                }),
                onInteractOutside: (0, r.composeEventHandlers)(e.onInteractOutside, e => {
                    let t = e.detail.originalEvent,
                        r = 0 === t.button && !0 === t.ctrlKey,
                        n = 2 === t.button || r;
                    (!s.modal || n) && (u.current = !0)
                }),
                style: { ...e.style,
                    "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
                    "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
                    "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
                    "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
                    "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
                }
            })
        });
    e9.displayName = e2;
    var e4 = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eg, { ...o,
            ...n,
            ref: t
        })
    });
    e4.displayName = "DropdownMenuGroup";
    var e8 = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(ey, { ...o,
            ...n,
            ref: t
        })
    });
    e8.displayName = "DropdownMenuLabel";
    var e7 = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eC, { ...o,
            ...n,
            ref: t
        })
    });
    e7.displayName = "DropdownMenuItem";
    var te = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eM, { ...o,
            ...n,
            ref: t
        })
    });
    te.displayName = "DropdownMenuCheckboxItem";
    var tt = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(ej, { ...o,
            ...n,
            ref: t
        })
    });
    tt.displayName = "DropdownMenuRadioGroup";
    var tr = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eI, { ...o,
            ...n,
            ref: t
        })
    });
    tr.displayName = "DropdownMenuRadioItem";
    var tn = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eT, { ...o,
            ...n,
            ref: t
        })
    });
    tn.displayName = "DropdownMenuItemIndicator";
    var to = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eO, { ...o,
            ...n,
            ref: t
        })
    });
    to.displayName = "DropdownMenuSeparator";
    var ta = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eF, { ...o,
            ...n,
            ref: t
        })
    });
    ta.displayName = "DropdownMenuArrow";
    var ts = e => {
            let {
                __scopeDropdownMenu: t,
                children: r,
                open: n,
                onOpenChange: o,
                defaultOpen: s
            } = e, i = eJ(t), [u, c] = (0, a.useControllableState)({
                prop: n,
                defaultProp: s ? ? !1,
                onChange: o,
                caller: "DropdownMenuSub"
            });
            return (0, l.jsx)(eK, { ...i,
                open: u,
                onOpenChange: c,
                children: r
            })
        },
        ti = t.forwardRef((e, t) => {
            let {
                __scopeDropdownMenu: r,
                ...n
            } = e, o = eJ(r);
            return (0, l.jsx)(ez, { ...o,
                ...n,
                ref: t
            })
        });
    ti.displayName = "DropdownMenuSubTrigger";
    var tl = t.forwardRef((e, t) => {
        let {
            __scopeDropdownMenu: r,
            ...n
        } = e, o = eJ(r);
        return (0, l.jsx)(eB, { ...o,
            ...n,
            ref: t,
            style: { ...e.style,
                "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
                "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
                "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
                "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
                "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
            }
        })
    });
    tl.displayName = "DropdownMenuSubContent", e.s(["Arrow", 0, ta, "CheckboxItem", 0, te, "Content", 0, e9, "DropdownMenu", 0, e1, "DropdownMenuArrow", 0, ta, "DropdownMenuCheckboxItem", 0, te, "DropdownMenuContent", 0, e9, "DropdownMenuGroup", 0, e4, "DropdownMenuItem", 0, e7, "DropdownMenuItemIndicator", 0, tn, "DropdownMenuLabel", 0, e8, "DropdownMenuPortal", 0, e5, "DropdownMenuRadioGroup", 0, tt, "DropdownMenuRadioItem", 0, tr, "DropdownMenuSeparator", 0, to, "DropdownMenuSub", 0, ts, "DropdownMenuSubContent", 0, tl, "DropdownMenuSubTrigger", 0, ti, "DropdownMenuTrigger", 0, e3, "Group", 0, e4, "Item", 0, e7, "ItemIndicator", 0, tn, "Label", 0, e8, "Portal", 0, e5, "RadioGroup", 0, tt, "RadioItem", 0, tr, "Root", 0, e1, "Separator", 0, to, "Sub", 0, ts, "SubContent", 0, tl, "SubTrigger", 0, ti, "Trigger", 0, e3, "createDropdownMenuScope", 0, e$], 673694)
}]);

//# debugId=939f59a9-2434-6630-438f-f64be186176f