;
! 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] = "57622e06-1fad-1daf-fa9b-906120f6423f")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 664318, e => {
    "use strict";
    var t = e.i(221628),
        a = e.i(999061),
        r = e.i(766181),
        i = e.i(86831);
    let s = (0, r.cva)("relative overflow-hidden rounded-md bg-skeleton-bg/50 before:absolute before:inset-0 before:-translate-x-full before:-skew-x-12 before:animate-[skeletonShimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:via-skeleton-bg before:to-transparent", {
        variants: {
            size: {
                sm: "h-3 mb-1",
                md: "h-3.5 mb-1.5",
                lg: "h-4 mb-2",
                xl: "h-6 mb-3"
            }
        }
    });
    e.s(["Skeleton", 0, function(e) {
        let r, n, o, l, d, c = (0, a.c)(10);
        return c[0] !== e ? ({
            className: r,
            size: o,
            ...n
        } = e, c[0] = e, c[1] = r, c[2] = n, c[3] = o) : (r = c[1], n = c[2], o = c[3]), c[4] !== r || c[5] !== o ? (l = (0, i.cn)(s({
            size: o
        }), r), c[4] = r, c[5] = o, c[6] = l) : l = c[6], c[7] !== n || c[8] !== l ? (d = (0, t.jsx)("div", {
            className: l,
            ...n
        }), c[7] = n, c[8] = l, c[9] = d) : d = c[9], d
    }])
}, 864076, e => {
    "use strict";
    var t = e.i(221628),
        a = e.i(999061);
    e.s(["TwitterIcon", 0, function(e) {
        let r, i, s = (0, a.c)(3);
        return s[0] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, t.jsx)("path", {
            d: "M15.2719 1.58655H18.0831L11.9414 8.60612L19.1667 18.1582H13.5094L9.07837 12.3649L4.0083 18.1582H1.19537L7.76454 10.65L0.833344 1.58655H6.63427L10.6395 6.88182L15.2719 1.58655ZM14.2853 16.4755H15.843L5.78784 3.18082H4.11623L14.2853 16.4755Z",
            fill: "black"
        }), s[0] = r) : r = s[0], s[1] !== e ? (i = (0, t.jsx)("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 20 20",
            fill: "none",
            ...e,
            children: r
        }), s[1] = e, s[2] = i) : i = s[2], i
    }])
}, 100175, e => {
    "use strict";
    var t = e.i(221628),
        a = e.i(999061),
        r = e.i(212519);
    e.s(["VerifiedBadge", 0, e => {
        let i, s, n = (0, a.c)(6),
            {
                size: o,
                withStroke: l
            } = e,
            d = void 0 === o ? "default" : o,
            c = void 0 !== l && l,
            m = "tiny" === d,
            u = "small" === d || m,
            p = m ? 16 : u ? c ? 22 : 16 : 18,
            f = `flex items-center justify-center ${u?"h-auto":"size-10"}`;
        return n[0] !== p || n[1] !== c ? (i = c ? (0, t.jsxs)("div", {
            className: "relative",
            children: [(0, t.jsx)(r.IconBadgeCheckFill18, {
                size: p,
                className: "text-text-brand relative z-10"
            }), (0, t.jsx)("div", {
                className: "absolute inset-0 bg-white rounded-full size-3 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-5"
            }), (0, t.jsx)(r.IconBadgeCheckFill18, {
                size: p,
                className: "text-white absolute inset-0 stroke-2! stroke-background"
            })]
        }) : (0, t.jsx)(r.IconBadgeCheckFill18, {
            size: p,
            className: "text-text-brand"
        }), n[0] = p, n[1] = c, n[2] = i) : i = n[2], n[3] !== f || n[4] !== i ? (s = (0, t.jsx)("div", {
            className: f,
            children: i
        }), n[3] = f, n[4] = i, n[5] = s) : s = n[5], s
    }])
}, 702502, e => {
    "use strict";
    e.s(["createProfileUrl", 0, e => {
        let t;
        if (e.displayUsernamePublic && e.name && !(t = e.name).includes("/") && !t.includes(".")) {
            var a;
            return `/@${!(a=e.name.toLowerCase())?"":encodeURIComponent(a)}`
        }
        return `/profile/${e.proxyWallet}`
    }, "getShareUsername", 0, (e, t) => e ? .startsWith("@") ? e.substring(1) : e ? .startsWith("%40") ? e.substring(3) : e || t])
}, 635486, 254697, 339309, 781577, 690907, 959831, e => {
    "use strict";
    var t, a = e.i(416340),
        r = e.i(197994);
    e.s(["IconGiftFill18", 0, ({ ...e
    }) => a.default.createElement(r.Icon, {
        size: "18px",
        ...e
    }, a.default.createElement("path", {
        d: "M3,9.5v4.75c0,1.517,1.233,2.75,2.75,2.75h2.5v-7.5H3Z",
        fill: "currentColor"
    }), a.default.createElement("path", {
        d: "M9.75,9.5v7.5h2.5c1.517,0,2.75-1.233,2.75-2.75v-4.75h-5.25Z",
        fill: "currentColor"
    }), a.default.createElement("path", {
        d: "M15.25,4.5h-.462c.135-.307,.212-.644,.212-1,0-1.378-1.121-2.5-2.5-2.5-1.761,0-2.864,1.231-3.5,2.339-.636-1.107-1.739-2.339-3.5-2.339-1.379,0-2.5,1.122-2.5,2.5,0,.356,.077,.693,.212,1h-.462c-.965,0-1.75,.776-1.75,1.75s.785,1.75,1.75,1.75H15.25c.965,0,1.75-.782,1.75-1.75s-.785-1.75-1.75-1.75Zm-2.75-2c.552,0,1,.449,1,1s-.448,1-1,1h-2.419c.405-.86,1.176-2,2.419-2ZM4.5,3.5c0-.551,.448-1,1-1,1.234,0,2.007,1.14,2.415,2h-2.415c-.552,0-1-.449-1-1Z",
        fill: "currentColor",
        "data-color": "color-2"
    }))], 635486);
    var i = e.i(77383),
        s = e.i(105453),
        n = e.i(51387);

    function o(e) {
        return t => {
            let a = (e ? Math[e] : Math.trunc)(t);
            return 0 === a ? 0 : a
        }
    }
    e.s(["getRoundingMethod", 0, o], 254697);
    var l = e.i(104861),
        d = e.i(841252),
        c = e.i(192842);

    function m(e, t) {
        let a = (0, c.toDate)(e) - (0, c.toDate)(t);
        return a < 0 ? -1 : a > 0 ? 1 : a
    }
    e.s(["compareAsc", 0, m], 339309);
    var u = e.i(70549);

    function p(e, t, a) {
        let r, i = (0, n.getDefaultOptions)(),
            c = a ? .locale ? ? i.locale ? ? s.defaultLocale,
            p = m(e, t);
        if (isNaN(p)) throw RangeError("Invalid time value");
        let f = Object.assign({}, a, {
                addSuffix: a ? .addSuffix,
                comparison: p
            }),
            [x, h] = (0, d.normalizeDates)(a ? .in, ...p > 0 ? [t, e] : [e, t]),
            y = o(a ? .roundingMethod ? ? "round"),
            g = h.getTime() - x.getTime(),
            v = g / u.millisecondsInMinute,
            b = (g - ((0, l.getTimezoneOffsetInMilliseconds)(h) - (0, l.getTimezoneOffsetInMilliseconds)(x))) / u.millisecondsInMinute,
            w = a ? .unit;
        if ("second" === (r = w || (v < 1 ? "second" : v < 60 ? "minute" : v < u.minutesInDay ? "hour" : b < u.minutesInMonth ? "day" : b < u.minutesInYear ? "month" : "year"))) {
            let e = y(g / 1e3);
            return c.formatDistance("xSeconds", e, f)
        }
        if ("minute" === r) {
            let e = y(v);
            return c.formatDistance("xMinutes", e, f)
        }
        if ("hour" === r) {
            let e = y(v / 60);
            return c.formatDistance("xHours", e, f)
        }
        if ("day" === r) {
            let e = y(b / u.minutesInDay);
            return c.formatDistance("xDays", e, f)
        }
        if ("month" === r) {
            let e = y(b / u.minutesInMonth);
            return 12 === e && "month" !== w ? c.formatDistance("xYears", 1, f) : c.formatDistance("xMonths", e, f)
        } else {
            let e = y(b / u.minutesInYear);
            return c.formatDistance("xYears", e, f)
        }
    }
    e.s(["formatDistanceStrict", 0, p], 781577);
    var f = e.i(391856),
        x = e.i(600326),
        h = e.i(660006),
        y = e.i(631222);
    let g = e => e.sort((e, t) => e.timestamp > t.timestamp ? -1 : 1);
    e.s(["assemblePolygonscanLink", 0, e => `https://${80001===y.MATIC_CONFIG.chainId?"mumbai.":""}polygonscan.com/tx/${e}`, "cleanNotifications", 0, (e, t) => {
        if (!e.length || !t.length) return {
            cleanedNotifications: g(e.length ? e : t),
            txnsToRemove: []
        };
        let a = [],
            r = e.reduce((e, t) => ("CLOB" === t.data.type && t.data.metadata.hash ? e[t.data.metadata.hash] = t : e[t.id] = t, e), {}),
            i = [];
        return {
            cleanedNotifications: g([...t.map(e => {
                let t = 2 === e.data.type ? e.data.payload.transaction_hash : "",
                    s = r[t];
                if (s) {
                    let n = { ...e,
                        read: s.read || e.read || !1,
                        title: s.title,
                        ...s.subtext && 1 !== e.data.type && 2 !== e.data.type && !e.subtext && {
                            subtext: s.subtext
                        },
                        ...s.data.status === x.TxnStatus.FAILED && {
                            title: s.title.includes("failed") ? s.title : `${s.title.split("placed").shift()} failed`
                        },
                        conditionId: s.data.conditionId
                    };
                    return a.push(n), i.push(s.id), delete r[t], n
                }
                return e
            }) ? ? [], ...Object.values(r).flat()]),
            txnsToRemove: i
        }
    }, "dedupeNotificationsById", 0, e => {
        let t = new Map;
        return e.forEach(e => {
            let a = t.get(e.id);
            if (!a) return void t.set(e.id, e);
            let r = a.lastUpdatedTimestamp ? ? a.timestamp ? ? 0;
            (e.lastUpdatedTimestamp ? ? e.timestamp ? ? 0) > r && t.set(e.id, e)
        }), g(Array.from(t.values()))
    }, "formatRelativeTime", 0, (e, t) => {
        var a, r;
        let s = (a = new Date(e), r = {
            locale: f.enUS
        }, p(a, (0, i.constructNow)(a), r));
        try {
            switch (!0) {
                case s.includes("second"):
                    return t.justNow;
                case s.includes("minute"):
                    return `${s.split(" ").shift()}${t.short.m}`;
                case s.includes("hour"):
                    return `${s.split(" ").shift()}${t.short.h}`;
                case s.includes("day"):
                    return `${s.split(" ").shift()}${t.short.d}`;
                case s.includes("month"):
                    return `${s.split(" ").shift()}${t.short.mo}`;
                case s.includes("year"):
                    return `${s.split(" ").shift()}${t.short.y}`;
                default:
                    return s
            }
        } catch (e) {
            return (0, h.handleError)(e, "formatRelativeTime"), s
        }
    }], 690907);
    var v = ((t = {}).Transaction = "transaction", t.CLOB = "clob", t);
    e.s(["UserNotificationSource", () => v], 959831)
}, 858727, e => {
    "use strict";
    var t = e.i(416340),
        a = e.i(180715);
    e.s(["IconShareUpRightOutline12", 0, ({
        strokeWidth: e = 1.5,
        ...r
    }) => t.default.createElement(a.Icon, {
        size: "12px",
        ...r
    }, t.default.createElement("line", {
        x1: "7.268",
        y1: "4.732",
        x2: "10.573",
        y2: "1.427",
        fill: "none",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round",
        strokeWidth: e,
        "data-color": "color-2"
    }), t.default.createElement("path", {
        d: "m10.75,7.5v1.25c0,1.105-.895,2-2,2H3.25c-1.105,0-2-.895-2-2V3.25c0-1.105.895-2,2-2h1.25",
        fill: "none",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round",
        strokeWidth: e
    }), t.default.createElement("polyline", {
        points: "10.75 5 10.75 1.25 7 1.25",
        fill: "none",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round",
        strokeWidth: e,
        "data-color": "color-2"
    }))])
}, 310245, 847804, 896726, 815964, 177412, 619264, e => {
    "use strict";
    var t, a = e.i(740594),
        r = e.i(140527),
        i = e.i(196593),
        s = e.i(959831),
        n = e.i(221628),
        o = e.i(999061),
        l = e.i(664318),
        d = e.i(208956),
        c = e.i(336896),
        m = e.i(858727),
        u = e.i(416340),
        p = e.i(405891),
        f = e.i(935786),
        x = e.i(690907),
        h = e.i(944891),
        y = e.i(604777),
        g = e.i(870555),
        v = e.i(53950),
        b = e.i(702502),
        w = e.i(722762),
        j = e.i(363966),
        N = e.i(174617),
        k = e.i(608652),
        C = e.i(199786),
        S = e.i(78892),
        T = e.i(127200),
        I = e.i(112466),
        O = e.i(169525),
        $ = e.i(600317),
        _ = e.i(538469),
        P = "HoverCard",
        [L, R] = (0, k.createContextScope)(P, [T.createPopperScope]),
        W = (0, T.createPopperScope)(),
        [F, E] = L(P),
        D = e => {
            let {
                __scopeHoverCard: t,
                children: a,
                open: r,
                defaultOpen: i,
                onOpenChange: s,
                openDelay: o = 700,
                closeDelay: l = 300
            } = e, d = W(t), c = u.useRef(0), m = u.useRef(0), p = u.useRef(!1), f = u.useRef(!1), [x, h] = (0, C.useControllableState)({
                prop: r,
                defaultProp: i ? ? !1,
                onChange: s,
                caller: P
            }), y = u.useCallback(() => {
                clearTimeout(m.current), c.current = window.setTimeout(() => h(!0), o)
            }, [o, h]), g = u.useCallback(() => {
                clearTimeout(c.current), p.current || f.current || (m.current = window.setTimeout(() => h(!1), l))
            }, [l, h]), v = u.useCallback(() => h(!1), [h]);
            return u.useEffect(() => () => {
                clearTimeout(c.current), clearTimeout(m.current)
            }, []), (0, n.jsx)(F, {
                scope: t,
                open: x,
                onOpenChange: h,
                onOpen: y,
                onClose: g,
                onDismiss: v,
                hasSelectionRef: p,
                isPointerDownOnContentRef: f,
                children: (0, n.jsx)(T.Root, { ...d,
                    children: a
                })
            })
        };
    D.displayName = P;
    var H = "HoverCardTrigger",
        U = u.forwardRef((e, t) => {
            let {
                __scopeHoverCard: a,
                ...r
            } = e, i = E(H, a), s = W(a);
            return (0, n.jsx)(T.Anchor, {
                asChild: !0,
                ...s,
                children: (0, n.jsx)($.Primitive.a, {
                    "data-state": i.open ? "open" : "closed",
                    ...r,
                    ref: t,
                    onPointerEnter: (0, N.composeEventHandlers)(e.onPointerEnter, Z(i.onOpen)),
                    onPointerLeave: (0, N.composeEventHandlers)(e.onPointerLeave, Z(i.onClose)),
                    onFocus: (0, N.composeEventHandlers)(e.onFocus, i.onOpen),
                    onBlur: (0, N.composeEventHandlers)(e.onBlur, i.onClose),
                    onTouchStart: (0, N.composeEventHandlers)(e.onTouchStart, e => e.preventDefault())
                })
            })
        });
    U.displayName = H;
    var A = "HoverCardPortal",
        [M, q] = L(A, {
            forceMount: void 0
        }),
        z = e => {
            let {
                __scopeHoverCard: t,
                forceMount: a,
                children: r,
                container: i
            } = e, s = E(A, t);
            return (0, n.jsx)(M, {
                scope: t,
                forceMount: a,
                children: (0, n.jsx)(O.Presence, {
                    present: a || s.open,
                    children: (0, n.jsx)(I.Portal, {
                        asChild: !0,
                        container: i,
                        children: r
                    })
                })
            })
        };
    z.displayName = A;
    var B = "HoverCardContent",
        K = u.forwardRef((e, t) => {
            let a = q(B, e.__scopeHoverCard),
                {
                    forceMount: r = a.forceMount,
                    ...i
                } = e,
                s = E(B, e.__scopeHoverCard);
            return (0, n.jsx)(O.Presence, {
                present: r || s.open,
                children: (0, n.jsx)(Y, {
                    "data-state": s.open ? "open" : "closed",
                    ...i,
                    onPointerEnter: (0, N.composeEventHandlers)(e.onPointerEnter, Z(s.onOpen)),
                    onPointerLeave: (0, N.composeEventHandlers)(e.onPointerLeave, Z(s.onClose)),
                    ref: t
                })
            })
        });
    K.displayName = B;
    var Y = u.forwardRef((e, a) => {
            let {
                __scopeHoverCard: r,
                onEscapeKeyDown: i,
                onPointerDownOutside: s,
                onFocusOutside: o,
                onInteractOutside: l,
                ...d
            } = e, c = E(B, r), m = W(r), p = u.useRef(null), f = (0, S.useComposedRefs)(a, p), [x, h] = u.useState(!1);
            return u.useEffect(() => {
                if (x) {
                    let e = document.body;
                    return t = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
                        e.style.userSelect = t, e.style.webkitUserSelect = t
                    }
                }
            }, [x]), u.useEffect(() => {
                if (p.current) {
                    let e = () => {
                        h(!1), c.isPointerDownOnContentRef.current = !1, setTimeout(() => {
                            document.getSelection() ? .toString() !== "" && (c.hasSelectionRef.current = !0)
                        })
                    };
                    return document.addEventListener("pointerup", e), () => {
                        document.removeEventListener("pointerup", e), c.hasSelectionRef.current = !1, c.isPointerDownOnContentRef.current = !1
                    }
                }
            }, [c.isPointerDownOnContentRef, c.hasSelectionRef]), u.useEffect(() => {
                p.current && (function(e) {
                    let t = [],
                        a = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
                            acceptNode: e => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
                        });
                    for (; a.nextNode();) t.push(a.currentNode);
                    return t
                })(p.current).forEach(e => e.setAttribute("tabindex", "-1"))
            }), (0, n.jsx)(_.DismissableLayer, {
                asChild: !0,
                disableOutsidePointerEvents: !1,
                onInteractOutside: l,
                onEscapeKeyDown: i,
                onPointerDownOutside: s,
                onFocusOutside: (0, N.composeEventHandlers)(o, e => {
                    e.preventDefault()
                }),
                onDismiss: c.onDismiss,
                children: (0, n.jsx)(T.Content, { ...m,
                    ...d,
                    onPointerDown: (0, N.composeEventHandlers)(d.onPointerDown, e => {
                        e.currentTarget.contains(e.target) && h(!0), c.hasSelectionRef.current = !1, c.isPointerDownOnContentRef.current = !0
                    }),
                    ref: f,
                    style: { ...d.style,
                        userSelect: x ? "text" : void 0,
                        WebkitUserSelect: x ? "text" : void 0,
                        "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
                        "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
                        "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
                        "--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
                        "--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
                    }
                })
            })
        }),
        V = u.forwardRef((e, t) => {
            let {
                __scopeHoverCard: a,
                ...r
            } = e, i = W(a);
            return (0, n.jsx)(T.Arrow, { ...i,
                ...r,
                ref: t
            })
        });

    function Z(e) {
        return t => "touch" === t.pointerType ? void 0 : e()
    }
    V.displayName = "HoverCardArrow", e.s(["Arrow", 0, V, "Content", 0, K, "HoverCard", 0, D, "HoverCardArrow", 0, V, "HoverCardContent", 0, K, "HoverCardPortal", 0, z, "HoverCardTrigger", 0, U, "Portal", 0, z, "Root", 0, D, "Trigger", 0, U, "createHoverCardScope", 0, R], 61413);
    var Q = e.i(61413),
        Q = Q,
        G = e.i(335032),
        J = e.i(86831);
    let X = Q.Root,
        ee = Q.Trigger;

    function et(e) {
        let t, a, r, i, s, l, d, c, m = (0, o.c)(16);
        m[0] !== e ? ({
            className: t,
            align: r,
            sideOffset: i,
            portal: s,
            ...a
        } = e, m[0] = e, m[1] = t, m[2] = a, m[3] = r, m[4] = i, m[5] = s) : (t = m[1], a = m[2], r = m[3], i = m[4], s = m[5]);
        let u = void 0 === r ? "center" : r,
            p = void 0 === i ? 4 : i,
            f = void 0 === s || s ? Q.Portal : G.Slot.Slot;
        return m[6] !== t ? (l = (0, J.cn)("z-50 w-64 rounded-lg overflow-hidden border bg-background text-text shadow-[0_8px_16px_rgba(0,0,0,0.06)] outline-none data-[side=bottom]:animate-popoverSlideDownAndFadeIn data-[side=left]:animate-popoverSlideLeftAndFadeIn data-[side=right]:animate-popoverSlideRightAndFadeIn data-[side=top]:animate-popoverSlideUpAndFadeIn origin-[--radix-hover-card-content-transform-origin] data-[state=closed]:animate-out data-[state=closed]:fade-out-0", t), m[6] = t, m[7] = l) : l = m[7], m[8] !== u || m[9] !== a || m[10] !== p || m[11] !== l ? (d = (0, n.jsx)(Q.Content, {
            align: u,
            sideOffset: p,
            className: l,
            ...a
        }), m[8] = u, m[9] = a, m[10] = p, m[11] = l, m[12] = d) : d = m[12], m[13] !== f || m[14] !== d ? (c = (0, n.jsx)(f, {
            children: d
        }), m[13] = f, m[14] = d, m[15] = c) : c = m[15], c
    }
    e.s(["HoverCard", 0, X, "HoverCardContent", 0, et, "HoverCardTrigger", 0, ee], 847804);
    var ea = e.i(964974),
        er = e.i(499390),
        ei = e.i(57096),
        es = e.i(655740),
        en = e.i(558470);
    let eo = async e => es.axios.request((0, en.getLeaderboardAxiosInfo)("profit", ei.LeaderboardRange.All, e, 1)).then(e => {
        if (!Array.isArray(e.data) || 0 === e.data.length) return;
        let t = e.data[0];
        return {
            proxyWallet: t.user_id,
            name: t.user_name,
            pseudonym: t.user_name,
            amount: t.pnl || 0,
            volume: t.vol || 0,
            realized: t.realized || 0,
            unrealized: t.unrealized || 0,
            profileImage: t.profile_image || void 0,
            profileImageOptimized: t.profile_image || void 0
        }
    });
    e.i(284553), e.i(344558), e.i(631222);
    let el = async e => {
        let {
            data: t
        } = await es.axios.get(`/api/profile/userData?address=${e}`);
        return t
    };
    e.s(["getProfileUserDataFetcher", 0, el], 896726);
    var ed = e.i(645352),
        ec = e.i(67670),
        em = e.i(100175),
        eu = e.i(390960),
        ep = e.i(864006),
        ef = e.i(864076),
        ex = e.i(491636),
        eh = e.i(991092);
    let ey = ({
        userData: e,
        updatedAccountProfile: t,
        subgraphCreationTimestamp: a,
        statsJoinDate: r,
        locale: i
    }) => {
        if (r && (0, eh.isValid)(new Date(r))) return (0, ex.format)(new Date(r), "MMM yyyy", i ? {
            locale: i
        } : void 0);
        if (!e) return null;
        let s = "";
        if (t && "created_at" in t && "string" == typeof t ? .created_at ? s = t.created_at : "string" == typeof e ? .createdAt ? s = e.createdAt : Array.isArray(e ? .users) && "string" == typeof e.users ? .[0] ? .createdAt ? s = e.users[0].createdAt : "string" == typeof a && (s = a), !s) return null;
        try {
            let e = new Date(s);
            if ((0, eh.isValid)(e)) return (0, ex.format)(e, "MMM yyyy", i ? {
                locale: i
            } : void 0);
            return null
        } catch {
            return null
        }
    };
    e.s(["getDateJoined", 0, ey], 815964);
    let eg = e => {
            let t, a, r, s = (0, o.c)(9),
                {
                    label: d,
                    value: c,
                    loading: m,
                    isPnl: u
                } = e,
                p = void 0 !== u && u;
            if (s[0] !== p || s[1] !== m || s[2] !== c) {
                var f;
                t = m ? (0, n.jsx)(l.Skeleton, {
                    className: "h-5 mb-1 mt-0 p-0 w-full"
                }) : (0, n.jsx)("p", {
                    className: `text-base font-semibold ${!p||0===(f=c??0)?"text-text-primary":f>0?"text-green-600 dark:text-green-500":"text-red-500"}`,
                    children: (0, i.formatAbbreviated)(c ? ? 0, {
                        decimals: 0,
                        currency: !0
                    })
                }), s[0] = p, s[1] = m, s[2] = c, s[3] = t
            } else t = s[3];
            return s[4] !== d ? (a = (0, n.jsx)("p", {
                className: "text-sm text-text-secondary",
                children: d
            }), s[4] = d, s[5] = a) : a = s[5], s[6] !== t || s[7] !== a ? (r = (0, n.jsxs)("div", {
                className: "flex flex-col col-span-1 w-full items-start",
                children: [t, a]
            }), s[6] = t, s[7] = a, s[8] = r) : r = s[8], r
        },
        ev = e => {
            let t, a, r, i, s, l, d, c, m, u, p, f, x, h, g, v = (0, o.c)(38),
                {
                    proxyWalletAddress: b,
                    isOpen: w
                } = e,
                j = (0, y.useTranslations)();
            v[0] !== b ? (t = ["/api/profile/volume", b], a = () => (0, ed.getProfileVolume)(b), v[0] = b, v[1] = t, v[2] = a) : (t = v[1], a = v[2]);
            let N = !!b && w;
            v[3] === Symbol.for("react.memo_cache_sentinel") ? (r = {
                persist: !0
            }, v[3] = r) : r = v[3], v[4] !== t || v[5] !== a || v[6] !== N ? (i = {
                queryKey: t,
                queryFn: a,
                enabled: N,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1,
                gcTime: 3e5,
                staleTime: 3e5,
                retry: !1,
                meta: r
            }, v[4] = t, v[5] = a, v[6] = N, v[7] = i) : i = v[7];
            let {
                data: k,
                isPending: C
            } = (0, ea.useQuery)(i);
            v[8] !== b ? (s = ["/api/profile/profit", b], l = () => eo(b), v[8] = b, v[9] = s, v[10] = l) : (s = v[9], l = v[10]);
            let S = !!b && w;
            v[11] === Symbol.for("react.memo_cache_sentinel") ? (d = {
                persist: !0
            }, v[11] = d) : d = v[11], v[12] !== s || v[13] !== l || v[14] !== S ? (c = {
                queryKey: s,
                queryFn: l,
                enabled: S,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1,
                gcTime: 3e5,
                staleTime: 3e5,
                retry: !1,
                meta: d
            }, v[12] = s, v[13] = l, v[14] = S, v[15] = c) : c = v[15];
            let {
                data: T,
                isPending: I
            } = (0, ea.useQuery)(c), {
                marketPositionsValue: O,
                isMarketPositionsValuePending: $
            } = (0, ec.useMarketPositionsValue)(w ? b : void 0, 3e5), _ = Math.round(100 * (T ? .amount ? T.amount : 0)) / 100;
            v[16] !== j ? (m = j("profile.tabs.positions"), v[16] = j, v[17] = m) : m = v[17], v[18] !== $ || v[19] !== O || v[20] !== m ? (u = (0, n.jsx)(eg, {
                label: m,
                value: O,
                loading: $
            }), v[18] = $, v[19] = O, v[20] = m, v[21] = u) : u = v[21], v[22] !== j ? (p = j("profile.sortBy.profitLoss"), v[22] = j, v[23] = p) : p = v[23], v[24] !== I || v[25] !== _ || v[26] !== p ? (f = (0, n.jsx)(eg, {
                label: p,
                value: _,
                loading: I,
                isPnl: !0
            }), v[24] = I, v[25] = _, v[26] = p, v[27] = f) : f = v[27], v[28] !== j ? (x = j("leaderboard.volume"), v[28] = j, v[29] = x) : x = v[29];
            let P = k ? k.amount : 0;
            return v[30] !== C || v[31] !== x || v[32] !== P ? (h = (0, n.jsx)(eg, {
                label: x,
                value: P,
                loading: C
            }), v[30] = C, v[31] = x, v[32] = P, v[33] = h) : h = v[33], v[34] !== u || v[35] !== f || v[36] !== h ? (g = (0, n.jsxs)("div", {
                className: "grid grid-cols-3 gap-6 w-full",
                children: [u, f, h]
            }), v[34] = u, v[35] = f, v[36] = h, v[37] = g) : g = v[37], g
        },
        eb = e => {
            let t, a, r, i, s, l, c, m, p, f, x, h, g, v, b, w, N, k, C, S, T, I, O, $, _, P, L, R, W, F, E, D, H = (0, o.c)(93),
                {
                    user: U,
                    address: A,
                    setIsOpen: M,
                    isOpen: q,
                    profileUrl: z,
                    side: B,
                    align: K,
                    onClick: Y
                } = e,
                V = (0, y.useTranslations)(),
                Z = (0, ep.useLocale)();
            H[0] !== A ? (t = ["/api/profile/userData", A], a = () => el(A), H[0] = A, H[1] = t, H[2] = a) : (t = H[1], a = H[2]);
            let Q = !!A;
            H[3] === Symbol.for("react.memo_cache_sentinel") ? (r = {
                persist: !0
            }, H[3] = r) : r = H[3], H[4] !== t || H[5] !== a || H[6] !== Q ? (i = {
                queryKey: t,
                queryFn: a,
                enabled: Q,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1,
                gcTime: 3e5,
                staleTime: 3e5,
                retry: !1,
                meta: r
            }, H[4] = t, H[5] = a, H[6] = Q, H[7] = i) : i = H[7];
            let {
                data: G,
                isPending: J
            } = (0, ea.useQuery)(i), X = U ? .proxyWallet;
            H[8] !== X ? (s = ["/api/profile/volume", X], H[8] = X, H[9] = s) : s = H[9], H[10] !== U ? .proxyWallet ? (l = () => (0, ed.getProfileVolume)(U ? .proxyWallet), H[10] = U ? .proxyWallet, H[11] = l) : l = H[11];
            let ee = !!U ? .proxyWallet;
            H[12] === Symbol.for("react.memo_cache_sentinel") ? (c = {
                persist: !0
            }, H[12] = c) : c = H[12], H[13] !== s || H[14] !== l || H[15] !== ee ? (m = {
                queryKey: s,
                queryFn: l,
                enabled: ee,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1,
                gcTime: 3e5,
                staleTime: 3e5,
                retry: !1,
                meta: c
            }, H[13] = s, H[14] = l, H[15] = ee, H[16] = m) : m = H[16];
            let {
                isPending: ei
            } = (0, ea.useQuery)(m), es = U ? .proxyWallet;
            H[17] !== es ? (p = ["/api/profile/profit", es], H[17] = es, H[18] = p) : p = H[18], H[19] !== U ? .proxyWallet ? (f = () => eo(U ? .proxyWallet), H[19] = U ? .proxyWallet, H[20] = f) : f = H[20];
            let en = !!U ? .proxyWallet;
            H[21] === Symbol.for("react.memo_cache_sentinel") ? (x = {
                persist: !0
            }, H[21] = x) : x = H[21], H[22] !== p || H[23] !== f || H[24] !== en ? (h = {
                queryKey: p,
                queryFn: f,
                enabled: en,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1,
                gcTime: 3e5,
                staleTime: 3e5,
                retry: !1,
                meta: x
            }, H[22] = p, H[23] = f, H[24] = en, H[25] = h) : h = H[25];
            let {
                isPending: ex
            } = (0, ea.useQuery)(h), {
                isMarketPositionsValuePending: eh
            } = (0, ec.useMarketPositionsValue)(U ? .proxyWallet, 3e5);
            H[26] !== eh || H[27] !== ex || H[28] !== J || H[29] !== ei || H[30] !== M || H[31] !== U ? .proxyWallet ? (g = () => {
                J || U ? .proxyWallet && ei || U ? .proxyWallet && ex || U ? .proxyWallet && eh || M(!0)
            }, H[26] = eh, H[27] = ex, H[28] = J, H[29] = ei, H[30] = M, H[31] = U ? .proxyWallet, H[32] = g) : g = H[32];
            let eg = U ? .proxyWallet;
            H[33] !== eh || H[34] !== ex || H[35] !== J || H[36] !== ei || H[37] !== M || H[38] !== eg ? (v = [J, ei, ex, eh, eg, M], H[33] = eh, H[34] = ex, H[35] = J, H[36] = ei, H[37] = M, H[38] = eg, H[39] = v) : v = H[39], u.default.useEffect(g, v), H[40] !== Z || H[41] !== G ? (b = ey({
                userData: G,
                updatedAccountProfile: G,
                subgraphCreationTimestamp: void 0,
                locale: (0, eu.getDateFnsLocale)(Z)
            }), H[40] = Z, H[41] = G, H[42] = b) : b = H[42];
            let eb = b;
            H[43] === Symbol.for("react.memo_cache_sentinel") ? (w = {
                top: 84,
                left: 24
            }, H[43] = w) : w = H[43];
            let ew = U ? .proxyWallet,
                eN = U ? .proxyWallet,
                ek = U ? .proxyWallet ? ? "",
                eC = U ? .profileImage;
            H[44] !== eN || H[45] !== ek || H[46] !== eC ? (N = (0, n.jsx)(j.default, {
                address: eN,
                alt: ek,
                className: "w-12 h-12 min-w-0 min-h-[48px]",
                height: 48,
                profileImage: eC,
                quality: 100,
                width: 48
            }), H[44] = eN, H[45] = ek, H[46] = eC, H[47] = N) : N = H[47], H[48] !== G ? .verifiedBadge ? (k = G ? .verifiedBadge && (0, n.jsx)("div", {
                className: "absolute -bottom-1 -right-1",
                children: (0, n.jsx)(em.VerifiedBadge, {
                    size: "small",
                    withStroke: !0
                })
            }), H[48] = G ? .verifiedBadge, H[49] = k) : k = H[49], H[50] !== Y || H[51] !== z || H[52] !== ew || H[53] !== N || H[54] !== k ? (C = (0, n.jsxs)(d.default, {
                href: z,
                className: "relative cursor-pointer",
                onClick: Y,
                rel: "nofollow ugc",
                children: [N, k]
            }, ew), H[50] = Y, H[51] = z, H[52] = ew, H[53] = N, H[54] = k, H[55] = C) : C = H[55];
            let eS = U ? .proxyWallet;
            H[56] !== U ? (S = (0, er.getDisplayName)(U), H[56] = U, H[57] = S) : S = H[57], H[58] !== S ? (T = (0, n.jsx)("p", {
                className: "text-base font-semibold text-text-primary max-w-[170px] truncate",
                children: S
            }), H[58] = S, H[59] = T) : T = H[59], H[60] !== Y || H[61] !== z || H[62] !== eS || H[63] !== T ? (I = (0, n.jsx)(d.default, {
                href: z,
                className: "cursor-pointer",
                onClick: Y,
                rel: "nofollow ugc",
                children: T
            }, eS), H[60] = Y, H[61] = z, H[62] = eS, H[63] = T, H[64] = I) : I = H[64], H[65] !== G ? (O = G ? .xUsername && (0, n.jsx)("a", {
                href: `https://x.com/${G.xUsername}`,
                target: "_blank",
                rel: "noopener noreferrer",
                className: "hover:opacity-70 transition-opacity cursor-pointer",
                onClick: ej,
                children: (0, n.jsx)(ef.TwitterIcon, {
                    width: "12",
                    height: "12",
                    className: "[&>path]:fill-black dark:[&>path]:fill-white"
                })
            }), H[65] = G, H[66] = O) : O = H[66], H[67] !== I || H[68] !== O ? ($ = (0, n.jsxs)("div", {
                className: "flex items-center gap-1.5",
                children: [I, O]
            }), H[67] = I, H[68] = O, H[69] = $) : $ = H[69], H[70] !== eb || H[71] !== V ? (_ = eb && (0, n.jsxs)("p", {
                className: "text-[13px] text-text-secondary",
                children: [V("profile.joined"), " ", eb]
            }), H[70] = eb, H[71] = V, H[72] = _) : _ = H[72], H[73] !== $ || H[74] !== _ ? (P = (0, n.jsxs)("div", {
                className: "flex flex-col flex-1 w-full overflow-hidden gap-0.5",
                children: [$, _]
            }), H[73] = $, H[74] = _, H[75] = P) : P = H[75], H[76] !== C || H[77] !== P ? (L = (0, n.jsxs)("div", {
                className: "flex gap-3 w-full items-center p-4 pb-0 border-t border-x rounded-t-[10px]",
                children: [C, P]
            }), H[76] = C, H[77] = P, H[78] = L) : L = H[78], H[79] !== U ? (R = !!U ? .bio && (0, n.jsx)("div", {
                className: "px-4 pb-1 pt-4 border-x",
                children: (0, n.jsx)("p", {
                    className: "text-sm text-text-secondary max-w-[280px] line-clamp-3",
                    children: U.bio
                })
            }), H[79] = U, H[80] = R) : R = H[80], H[81] === Symbol.for("react.memo_cache_sentinel") ? (W = (0, n.jsx)("div", {
                className: "w-full h-4 bg-neutral-50/50 flex border-x relative",
                children: (0, n.jsx)("div", {
                    className: "w-[calc(100%+2px)] h-full rounded-b-lg border-b absolute border-x -left-px bg-background"
                })
            }), H[81] = W) : W = H[81];
            let eT = U ? .proxyWallet;
            return H[82] !== q || H[83] !== eT ? (F = (0, n.jsx)("div", {
                className: "p-4 bg-neutral-50/50 border-x border-b rounded-b-[10px]",
                children: (0, n.jsx)(ev, {
                    proxyWalletAddress: eT,
                    isOpen: q
                })
            }), H[82] = q, H[83] = eT, H[84] = F) : F = H[84], H[85] !== L || H[86] !== R || H[87] !== F ? (E = (0, n.jsxs)("div", {
                className: "flex flex-col",
                children: [L, R, W, F]
            }), H[85] = L, H[86] = R, H[87] = F, H[88] = E) : E = H[88], H[89] !== K || H[90] !== B || H[91] !== E ? (D = (0, n.jsx)(et, {
                side: B,
                sideOffset: 5,
                align: K,
                className: "w-fit border-none",
                collisionPadding: w,
                children: E
            }), H[89] = K, H[90] = B, H[91] = E, H[92] = D) : D = H[92], D
        },
        ew = u.default.memo(e => {
            let t, a, r, i, s, l, c, m, p, f, x, h = (0, o.c)(36),
                {
                    user: y,
                    address: g,
                    triggerProps: v,
                    children: w,
                    side: j,
                    align: N,
                    onClick: k,
                    ariaLabel: C
                } = e;
            h[0] !== v ? (t = void 0 === v ? {} : v, h[0] = v, h[1] = t) : t = h[1];
            let S = t,
                T = void 0 === j ? "top" : j,
                I = void 0 === N ? "center" : N,
                [O, $] = u.default.useState(!1),
                [_, P] = u.default.useState(!1);
            h[2] === Symbol.for("react.memo_cache_sentinel") ? (a = e => {
                $(e), e || P(!1)
            }, h[2] = a) : a = h[2];
            let L = a;
            h[3] !== S ? ({
                asChild: i,
                ...r
            } = S, h[3] = S, h[4] = r, h[5] = i) : (r = h[4], i = h[5]);
            let R = void 0 === i || i;
            h[6] !== R || h[7] !== r ? (s = {
                asChild: R,
                ...r
            }, h[6] = R, h[7] = r, h[8] = s) : s = h[8];
            let W = s;
            if (h[9] !== W) {
                let {
                    asChild: e,
                    ...t
                } = W;
                l = t, h[9] = W, h[10] = l
            } else l = h[10];
            h[11] !== g || h[12] !== y.name ? (c = (0, b.createProfileUrl)({
                proxyWallet: g,
                name: y.name
            }), h[11] = g, h[12] = y.name, h[13] = c) : c = h[13];
            let F = c;
            return h[14] !== g || h[15] !== C || h[16] !== w || h[17] !== k || h[18] !== F ? (m = (0, n.jsx)(d.default, {
                href: F,
                prefetch: !1,
                onClick: k,
                rel: "nofollow ugc",
                "aria-label": C,
                children: w
            }, g), h[14] = g, h[15] = C, h[16] = w, h[17] = k, h[18] = F, h[19] = m) : m = h[19], h[20] !== m || h[21] !== l ? (p = (0, n.jsx)(ee, {
                asChild: !0,
                ...l,
                children: m
            }), h[20] = m, h[21] = l, h[22] = p) : p = h[22], h[23] !== g || h[24] !== I || h[25] !== O || h[26] !== _ || h[27] !== k || h[28] !== F || h[29] !== T || h[30] !== y ? (f = O ? (0, n.jsx)(eb, {
                user: y,
                address: g,
                isOpen: _,
                setIsOpen: P,
                profileUrl: F,
                side: T,
                align: I,
                onClick: k
            }) : null, h[23] = g, h[24] = I, h[25] = O, h[26] = _, h[27] = k, h[28] = F, h[29] = T, h[30] = y, h[31] = f) : f = h[31], h[32] !== _ || h[33] !== p || h[34] !== f ? (x = (0, n.jsxs)(X, {
                open: _,
                onOpenChange: L,
                openDelay: 400,
                closeDelay: 100,
                children: [p, f]
            }), h[32] = _, h[33] = p, h[34] = f, h[35] = x) : x = h[35], x
        });

    function ej(e) {
        return e.stopPropagation()
    }
    e.s(["ProfileHoverCard", 0, ew], 177412);
    let eN = /^0x[a-fA-F0-9]{40}$/,
        ek = (e, t = 6, a) => {
            if (!e) return a ? a("activity.loading") : "Loading";
            let r = e.proxyWallet ? ? "";
            if ("string" == typeof e.name && e.name.trim().length > 0 && !e.name.toLowerCase().includes(r.toLowerCase())) {
                let r = (0, w.stripInvisibleCharacters)(e.name) || (a ? a("activity.anon") : "Anon");
                return r.length > t ? `${r.slice(0,t)}...` : r
            }
            return "string" == typeof e.pseudonym && e.pseudonym.length > 0 ? e.pseudonym.length > t ? `${e.pseudonym.slice(0,t)}...` : e.pseudonym : eN.test(r) ? `${r.slice(0,6)}...${r.slice(-6)}` : r.length > t ? `${r.slice(0,t)}...` : r
        },
        eC = (e, t, a) => a ? "var(--color-text-brand)" : "green" === ((e, t) => {
            if (!t || "string" != typeof e && "number" != typeof e) return "green";
            let a = t.toLowerCase();
            return "no" === a ? "red" : "yes" === a ? "green" : "1" === e ? "red" : "green"
        })(e, t) ? "var(--color-green-500)" : "var(--color-red-500)",
        eS = e => {
            if (e) {
                if ("user" in e && e.user) return e.user.profileImageOptimized || e.user.profileImage || void 0;
                if ("profileImage" in e) return e.profileImageOptimized || e.profileImage || void 0
            }
        },
        eT = e => {
            let t, r, s, l, d, c, m, u, p, f, x, h, g, v, b, w, j = (0, o.c)(41),
                {
                    activity: N,
                    value: k
                } = e,
                C = (0, y.useTranslations)();
            j[0] !== N ? (t = N ? .user ? N.user : {
                proxyWallet: N.proxyWallet,
                pseudonym: N.pseudonym,
                name: N.name,
                profileImage: N.profileImage,
                profileImageOptimized: N.profileImageOptimized
            }, j[0] = N, j[1] = t) : t = j[1];
            let S = t,
                T = S.proxyWallet;
            j[2] !== S || j[3] !== C ? (r = ek(S, 16, C), j[2] = S, j[3] = C, j[4] = r) : r = j[4], j[5] !== r ? (s = (0, n.jsx)("p", {
                className: "font-semibold text-sm hover:underline decoration-2 cursor-pointer",
                onClick: eI,
                children: r
            }), j[5] = r, j[6] = s) : s = j[6], j[7] !== S || j[8] !== s ? (l = (0, n.jsx)(ew, {
                user: S,
                address: T,
                children: s
            }), j[7] = S, j[8] = s, j[9] = l) : l = j[9], j[10] !== N || j[11] !== C ? (d = "ORDER" !== N.event_type ? `${N.side===a.Side.BUY?` ${C("activity.bought")} `:` ${C("activity.sold")} `}` : `${N.side===a.Side.BUY?` ${C("activity.placedBuy")} `:` ${C("activity.placedSell")} `}`, j[10] = N, j[11] = C, j[12] = d) : d = j[12], j[13] !== d ? (c = (0, n.jsx)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: d
            }), j[13] = d, j[14] = c) : c = j[14], j[15] !== N ? (m = eC((N ? .outcomeIndex || N ? .outcome_index) ? .toString(), N.outcome), j[15] = N, j[16] = m) : m = j[16], j[17] !== m ? (u = {
                color: m
            }, j[17] = m, j[18] = u) : u = j[18];
            let I = ` ${N.outcome}`;
            j[19] !== u || j[20] !== I ? (p = (0, n.jsx)("p", {
                className: "font-semibold text-sm whitespace-nowrap",
                style: u,
                children: I
            }), j[19] = u, j[20] = I, j[21] = p) : p = j[21], j[22] !== C ? (f = C("activity.at"), j[22] = C, j[23] = f) : f = j[23];
            let O = ` ${f} `;
            j[24] !== O ? (x = (0, n.jsx)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: O
            }), j[24] = O, j[25] = x) : x = j[25], j[26] !== N.price ? (h = (0, i.showCentsOnly)(N.price, 2), j[26] = N.price, j[27] = h) : h = j[27];
            let $ = `${h}\xa2`;
            j[28] !== $ ? (g = (0, n.jsxs)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: [$, " "]
            }), j[28] = $, j[29] = g) : g = j[29], j[30] !== k ? (v = (0, i.formatNumbers)(k), j[30] = k, j[31] = v) : v = j[31];
            let _ = ` ($${v})`;
            return j[32] !== _ ? (b = (0, n.jsx)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: _
            }), j[32] = _, j[33] = b) : b = j[33], j[34] !== p || j[35] !== x || j[36] !== g || j[37] !== b || j[38] !== l || j[39] !== c ? (w = (0, n.jsxs)("div", {
                className: "inline-flex items-end gap-1 min-w-0 flex-wrap",
                children: [l, c, p, x, g, b]
            }), j[34] = p, j[35] = x, j[36] = g, j[37] = b, j[38] = l, j[39] = c, j[40] = w) : w = j[40], w
        };

    function eI(e) {
        e.stopPropagation()
    }

    function eO(e) {
        return e.stopPropagation()
    }

    function e$(e) {
        return e.stopPropagation()
    }
    e.s(["ActivityPageCardDesktop", 0, e => {
        let t, a, r, i, s, u, h, v, b, w, N, k, C, S = (0, o.c)(41),
            {
                activity: T,
                formattedDate: I,
                value: O,
                shouldAnimate: $,
                homepageView: _,
                isLast: P
            } = e,
            L = (0, y.useTranslations)(),
            R = (0, c.useRouter)(),
            W = T ? .eventSlug ? ? "",
            F = T ? .slug;
        S[0] !== W || S[1] !== F ? (t = (0, f.getEventOrSportsLinkFromSlug)("latest", W, F), S[0] = W, S[1] = F, S[2] = t) : t = S[2];
        let {
            href: E,
            url: D
        } = t;
        S[3] !== T ? .slug || S[4] !== R || S[5] !== D ? (a = () => {
            T ? .slug && R.push(D)
        }, S[3] = T ? .slug, S[4] = R, S[5] = D, S[6] = a) : a = S[6];
        let H = !P && "border-b",
            U = _ && "px-1.5 py-3 border-b-0 rounded-lg",
            A = $ && "animate-in fade-in";
        return S[7] !== H || S[8] !== U || S[9] !== A ? (r = (0, g.cn)("flex justify-between items-center p-4 w-full group cursor-pointer transition-all duration-[800ms] relative", H, U, A), S[7] = H, S[8] = U, S[9] = A, S[10] = r) : r = S[10], S[11] === Symbol.for("react.memo_cache_sentinel") ? (i = (0, n.jsx)("div", {
            className: "absolute -left-1 top-0 h-full w-[calc(100%+8px)] rounded-xl group-hover:bg-neutral-50 dark:group-hover:bg-neutral-50/50 pointer-events-none"
        }), S[11] = i) : i = S[11], S[12] !== T ? (s = (0, n.jsx)("div", {
            className: "mr-3 shrink-0",
            children: T ? (0, n.jsx)(p.default, {
                alt: T.title,
                height: 48,
                quality: 80,
                src: T.icon,
                className: "w-12 min-w-[48px] h-12 object-cover rounded",
                width: 48
            }) : (0, n.jsx)(l.Skeleton, {
                className: "h-[48px] w-[48px] rounded-md"
            })
        }), S[12] = T, S[13] = s) : s = S[13], S[14] !== T || S[15] !== E || S[16] !== D ? (u = (0, n.jsx)("div", {
            className: "mb-1",
            children: T ? (0, n.jsx)(d.default, {
                href: E,
                as: D,
                prefetch: !1,
                children: (0, n.jsx)("p", {
                    className: "text-sm text-text-secondary overflow-hidden text-ellipsis whitespace-nowrap hover:underline decoration-2",
                    children: T.title
                })
            }) : (0, n.jsx)(l.Skeleton, {
                className: "h-[16px] w-[224px] rounded-md"
            })
        }), S[14] = T, S[15] = E, S[16] = D, S[17] = u) : u = S[17], S[18] !== T ? (h = T ? (0, n.jsx)(j.default, {
            profileImage: eS(T),
            alt: T.title,
            address: T.proxyWallet,
            width: 24,
            height: 24,
            quality: 80
        }) : (0, n.jsx)(l.Skeleton, {
            className: "h-[24px] w-[24px] rounded-full"
        }), S[18] = T, S[19] = h) : h = S[19], S[20] !== T || S[21] !== O ? (v = T && void 0 !== O ? (0, n.jsx)(eT, {
            activity: T,
            value: O
        }) : (0, n.jsx)(l.Skeleton, {
            className: "h-[16px] w-[251px] mt-2 rounded-md"
        }), S[20] = T, S[21] = O, S[22] = v) : v = S[22], S[23] !== h || S[24] !== v ? (b = (0, n.jsxs)("div", {
            className: "flex items-center gap-2",
            children: [h, v]
        }), S[23] = h, S[24] = v, S[25] = b) : b = S[25], S[26] !== u || S[27] !== b ? (w = (0, n.jsxs)("div", {
            className: "flex flex-col min-w-0",
            children: [u, b]
        }), S[26] = u, S[27] = b, S[28] = w) : w = S[28], S[29] !== s || S[30] !== w ? (N = (0, n.jsxs)("div", {
            className: "flex items-center flex-1 relative min-w-0",
            children: [s, w]
        }), S[29] = s, S[30] = w, S[31] = N) : N = S[31], S[32] !== T || S[33] !== I || S[34] !== L ? (k = I && (0, n.jsxs)("div", {
            className: "flex items-center gap-2 my-auto relative shrink-0 ml-2",
            children: [(0, n.jsx)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: I
            }), T ? .transactionHash && (0, n.jsx)("a", {
                href: (0, x.assemblePolygonscanLink)(T.transactionHash),
                target: "_blank",
                rel: "noopener noreferrer",
                className: "flex items-center text-text-secondary hover:text-text-tertiary",
                title: L("activity.viewOnPolygonscan"),
                "aria-label": L("activity.viewTransactionOnPolygonscan"),
                onClick: eO,
                children: (0, n.jsx)(m.IconShareUpRightOutline12, {})
            })]
        }), S[32] = T, S[33] = I, S[34] = L, S[35] = k) : k = S[35], S[36] !== N || S[37] !== k || S[38] !== a || S[39] !== r ? (C = (0, n.jsxs)("div", {
            onClick: a,
            className: r,
            children: [i, N, k]
        }), S[36] = N, S[37] = k, S[38] = a, S[39] = r, S[40] = C) : C = S[40], C
    }, "ActivityPageCardMobile", 0, e => {
        let t, a, r, i, s, d, u, h, v, b, w, N = (0, o.c)(33),
            {
                activity: k,
                formattedDate: C,
                value: S,
                shouldAnimate: T,
                isLast: I
            } = e,
            O = (0, y.useTranslations)(),
            $ = (0, c.useRouter)(),
            _ = k ? .slug;
        N[0] !== _ ? (t = (0, f.getEventOrSportsLinkFromSlug)("latest", void 0, _), N[0] = _, N[1] = t) : t = N[1];
        let {
            url: P
        } = t;
        N[2] !== k ? .slug || N[3] !== $ || N[4] !== P ? (a = () => {
            k ? .slug && $.push(P)
        }, N[2] = k ? .slug, N[3] = $, N[4] = P, N[5] = a) : a = N[5];
        let L = !I && "border-b",
            R = T && "animate-in fade-in";
        return N[6] !== L || N[7] !== R ? (r = (0, g.cn)("flex flex-col py-4 w-full transition-all duration-[800ms]", L, R), N[6] = L, N[7] = R, N[8] = r) : r = N[8], N[9] !== k ? (i = (0, n.jsxs)("div", {
            className: "flex items-center min-w-0 flex-1",
            children: [k ? (0, n.jsx)(p.default, {
                src: k.icon,
                alt: k.title,
                className: "size-10 object-cover rounded mr-2 shrink-0",
                width: 40,
                height: 40,
                quality: 80
            }) : (0, n.jsx)(l.Skeleton, {
                className: "h-[40px] w-[40px] rounded-md mr-2"
            }), k ? (0, n.jsx)("p", {
                className: "text-text-secondary text-sm overflow-hidden text-ellipsis whitespace-nowrap",
                children: k.title
            }) : (0, n.jsx)(l.Skeleton, {
                className: "h-[16px] w-[80%]"
            })]
        }), N[9] = k, N[10] = i) : i = N[10], N[11] !== k || N[12] !== C || N[13] !== O ? (s = C && (0, n.jsxs)(n.Fragment, {
            children: [(0, n.jsx)("p", {
                className: "text-text-secondary text-sm whitespace-nowrap",
                children: C
            }), k ? .transactionHash && (0, n.jsx)("a", {
                href: (0, x.assemblePolygonscanLink)(k.transactionHash),
                target: "_blank",
                rel: "noopener noreferrer",
                className: "flex items-center text-text-secondary hover:text-text-tertiary",
                title: O("activity.viewOnPolygonscan"),
                "aria-label": O("activity.viewTransactionOnPolygonscan"),
                onClick: e$,
                children: (0, n.jsx)(m.IconShareUpRightOutline12, {})
            })]
        }), N[11] = k, N[12] = C, N[13] = O, N[14] = s) : s = N[14], N[15] !== s ? (d = (0, n.jsx)("div", {
            className: "ml-2 flex items-center gap-2 my-auto shrink-0",
            children: s
        }), N[15] = s, N[16] = d) : d = N[16], N[17] !== i || N[18] !== d ? (u = (0, n.jsxs)("div", {
            className: "flex justify-between mb-3",
            children: [i, d]
        }), N[17] = i, N[18] = d, N[19] = u) : u = N[19], N[20] !== k ? (h = k ? (0, n.jsx)(j.default, {
            address: k.proxyWallet,
            alt: k.title,
            height: 24,
            profileImage: eS(k),
            quality: 80,
            width: 24
        }) : (0, n.jsx)(l.Skeleton, {
            className: "h-[24px] w-[24px] rounded-full"
        }), N[20] = k, N[21] = h) : h = N[21], N[22] !== k || N[23] !== S ? (v = (0, n.jsx)("div", {
            className: "flex-1",
            children: k && void 0 !== S ? (0, n.jsx)(eT, {
                activity: k,
                value: S
            }) : (0, n.jsx)("div", {
                className: "flex flex-col w-full",
                children: (0, n.jsx)(l.Skeleton, {
                    className: "h-[16px] w-[75%]"
                })
            })
        }), N[22] = k, N[23] = S, N[24] = v) : v = N[24], N[25] !== h || N[26] !== v ? (b = (0, n.jsxs)("div", {
            className: "flex items-center gap-2",
            children: [h, v]
        }), N[25] = h, N[26] = v, N[27] = b) : b = N[27], N[28] !== u || N[29] !== b || N[30] !== a || N[31] !== r ? (w = (0, n.jsxs)("div", {
            onClick: a,
            className: r,
            children: [u, b]
        }), N[28] = u, N[29] = b, N[30] = a, N[31] = r, N[32] = w) : w = N[32], w
    }, "ActivitySmpCard", 0, ({
        activity: e,
        formattedDate: t,
        value: a,
        titleForGMP: r,
        onGmpOutcomeClick: s,
        style: o = "events",
        isLast: c
    }) => {
        let p = (0, y.useTranslations)(),
            f = e ? .side === "BUY",
            w = (0, b.createProfileUrl)({
                proxyWallet: e ? .proxyWallet ? ? "",
                name: e ? .name
            }),
            N = (0, u.useCallback)(() => {
                s && "string" == typeof e ? .conditionId && s(e.conditionId)
            }, [e ? .conditionId, s]),
            k = e ? (0, n.jsx)(j.default, {
                address: e.proxyWallet,
                alt: e.name,
                height: 32,
                profileImage: e.profileImage,
                quality: 100,
                width: 32
            }) : null;
        return (0, n.jsxs)("div", {
            className: (0, g.cn)("w-full min-h-15 py-2 items-center flex", !c && "border-b"),
            children: [e ? (0, n.jsxs)(n.Fragment, {
                children: [(0, n.jsx)(h.Media, {
                    greaterThanOrEqual: "lg",
                    children: (0, n.jsx)(ew, {
                        user: e,
                        address: e.proxyWallet,
                        children: k
                    })
                }), (0, n.jsx)(h.Media, {
                    lessThan: "lg",
                    children: (0, n.jsx)(d.default, {
                        href: w,
                        prefetch: !1,
                        children: k
                    })
                })]
            }) : (0, n.jsx)(l.Skeleton, {
                className: "h-[32px] w-[32px] rounded-full"
            }), (0, n.jsx)("div", {
                className: "flex items-center flex-1 ml-2 min-w-0",
                children: (0, n.jsx)("div", {
                    className: "text-sm text-text-primary flex-1 min-w-0",
                    children: e && a ? (0, n.jsxs)(n.Fragment, {
                        children: [(0, n.jsx)(h.Media, {
                            greaterThanOrEqual: "lg",
                            children: (0, n.jsx)(ew, {
                                user: e,
                                address: e.proxyWallet,
                                children: (0, n.jsx)("span", {
                                    className: "text-text-primary font-semibold text-sm",
                                    children: ek(e, 15, p)
                                })
                            })
                        }), (0, n.jsx)(h.Media, {
                            lessThan: "lg",
                            children: (0, n.jsx)(d.default, {
                                href: w,
                                prefetch: !1,
                                children: (0, n.jsx)("span", {
                                    className: "text-text-primary font-semibold text-sm",
                                    children: ek(e, 12, p)
                                })
                            })
                        }), " ", p(f ? "activity.bought" : "activity.sold"), " ", (0, n.jsx)("span", {
                            className: "font-semibold",
                            style: {
                                color: eC(e.outcomeIndex.toString(), e.outcome, "sports" === o)
                            },
                            children: `${(e=>{try{let t="number"==typeof e?e:parseFloat(e);if(t>0&&t<1)return(0,i.formatNumbers)(e,2);return(0,i.formatNumbers)(e,0)}catch(t){return v.logger.error("ActivityCards - formatNumbersLessThanOneCent",{error:t}),(0,i.formatNumbers)(e,0)}})(e.size)} ${e.outcome}`
                        }), " ", "string" == typeof r ? (0, n.jsxs)(n.Fragment, {
                            children: [p("activity.for"), " ", (0, n.jsx)(h.Media, {
                                greaterThanOrEqual: "lg",
                                children: (0, n.jsx)("span", {
                                    className: "font-semibold cursor-pointer",
                                    onClick: N,
                                    children: `${r} `
                                })
                            }), (0, n.jsx)(h.Media, {
                                lessThan: "lg",
                                children: (0, n.jsx)("span", {
                                    className: "font-semibold",
                                    children: `${r} `
                                })
                            })]
                        }) : null, `${p("activity.at")} ${(0,i.showCentsOnly)(e.price,3)}\xa2`, " ", (0, n.jsx)("span", {
                            className: "text-text-secondary",
                            children: `($${(0,i.formatNumbers)(a,0)})`
                        })]
                    }) : (0, n.jsx)(l.Skeleton, {
                        className: "h-[20px] w-[200px] lg:w-[250px]"
                    })
                })
            }), (0, n.jsx)("div", {
                className: "flex items-center gap-2 ml-2",
                children: e ? (0, n.jsxs)(n.Fragment, {
                    children: [(0, n.jsx)("p", {
                        className: "text-text-secondary text-sm whitespace-nowrap",
                        children: t
                    }), e.transactionHash && (0, n.jsx)("a", {
                        href: (0, x.assemblePolygonscanLink)(e.transactionHash),
                        target: "_blank",
                        rel: "noopener noreferrer",
                        className: "flex items-center text-text-secondary hover:text-text-tertiary",
                        title: p("activity.viewOnPolygonscan"),
                        "aria-label": p("activity.viewTransactionOnPolygonscan"),
                        children: (0, n.jsx)(m.IconShareUpRightOutline12, {})
                    })]
                }) : (0, n.jsx)(l.Skeleton, {
                    className: "h-[20px] w-[60px] lg:w-[75px]"
                })
            })]
        })
    }, "formatUserName", 0, ek], 619264);
    var e_ = e.i(313582);
    e.s(["coerceMarketOrderNotificationToFOK", 0, e => {
        try {
            if ((1 === e.type || 2 === e.type || 8 === e.type) && e.payload.type !== a.OrderType.FOK) {
                let t = localStorage.getItem(e_.LS_MARKET_ORDER_NOTIFICATION) === e.payload.order_id.toLowerCase();
                if (t && localStorage.removeItem(e_.LS_MARKET_ORDER_NOTIFICATION), t) return { ...e,
                    ...(1 === e.type || 2 === e.type || 8 === e.type) && {
                        payload: { ...e.payload,
                            type: a.OrderType.FOK
                        }
                    }
                }
            }
            return e
        } catch {
            return e
        }
    }, "convertClobNotificationToUserNotification", 0, e => {
        let t = 0;
        if ("string" == typeof e.timestamp && (t = new Date(e.timestamp).getTime()), "number" == typeof e.timestamp && (t = 1e3 * e.timestamp), 1 === e.type || 2 === e.type || 8 === e.type) return {
            id: 1 === e.type ? `${e.payload.order_id}-${e.id}` : 8 === e.type ? `failed-${e.payload.transaction_hash}-${e.id}` : e.payload.transaction_hash,
            source: s.UserNotificationSource.CLOB,
            timestamp: t,
            lastUpdatedTimestamp: t,
            read: e.read ? ? !1,
            persisted: !1,
            data: e,
            image: e.payload.image,
            market_slug: e.payload.market_slug,
            question: e.payload.question,
            ...8 === e.type && {
                failed: !0
            },
            ...(e => {
                if (1 !== e.type && 2 !== e.type && 8 !== e.type) return {
                    title: "",
                    subtext: ""
                };
                let t = e.payload,
                    s = parseFloat(t.original_size),
                    n = s - parseFloat(t.remaining_size),
                    o = parseFloat(t.matched_size),
                    l = 100 * parseFloat(t.price),
                    d = 2 === e.type,
                    c = 8 === e.type;
                if (t.type === a.OrderType.GTC || t.type === a.OrderType.GTD) {
                    let e = `${t.side===a.Side.BUY?"Limit Buy":"Limit Sell"} ${(0,r.capitalize)(t.outcome)}`,
                        m = `${(0,i.formatNum)(o,{decimals:o>10?0:2})} shares @ ${(0,i.formatNum)(l,{decimals:1,commas:!1})}\xa2`;
                    return d ? (e += `${"0"===t.remaining_size||"0.01"===t.remaining_size?"":" partially"} filled`, m += ` (${(0,i.formatNum)(n,{decimals:n>10?0:2})}/${(0,i.formatNum)(s,{decimals:0})})`) : c ? e += " failed" : e += " cancelled", {
                        title: e,
                        subtext: m
                    }
                }
                let m = `${t.side===a.Side.BUY?"Buy":"Sell"} ${(0,r.capitalize)(t.outcome)}`;
                return {
                    title: c ? `${m} failed` : m,
                    subtext: `${(0,i.formatNum)(s,{decimals:s>1e3?0:2})} shares @ ${(0,i.formatNum)(l,{decimals:1,commas:!1})}\xa2`
                }
            })(e),
            ...!!e.payload.transaction_hash && {
                externalLink: (0, x.assemblePolygonscanLink)(e.payload.transaction_hash)
            },
            tokenId: e.payload.asset_id,
            market: {
                image: e.payload.image,
                slug: e.payload.market_slug,
                question: e.payload.question,
                closed: !1,
                marketMakerAddress: "",
                conditionId: "",
                clobTokenIds: ["", ""],
                active: !0,
                outcomes: ["Yes", "No"],
                outcomePrices: ["0", "0"],
                end_date: "",
                negRisk: !1,
                groupItemTitle: "",
                events: []
            }
        };
        if (3 === e.type || 4 === e.type) {
            let a = { ...e.payload
                },
                r = 4 === e.type,
                i = a ? .tokens ? .find(e => !0 === e.winner),
                n = r && i ? `: ${i.outcome}` : "";
            return {
                id: `${a.condition_id}-${e.id}`,
                source: s.UserNotificationSource.CLOB,
                timestamp: t,
                lastUpdatedTimestamp: t,
                read: e.read ? ? !1,
                persisted: !1,
                data: e,
                image: e.payload.image,
                market_slug: e.payload.market_slug,
                question: e.payload.question,
                title: r ? `Market resolved${n}` : "New market",
                subtext: void 0,
                conditionId: a ? .condition_id ? .toLowerCase(),
                tokenId: a ? .tokens ? .[0] ? .token_id,
                market: {
                    image: a.image,
                    question: a.question,
                    slug: a.market_slug
                }
            }
        }
        if (5 === e.type) {
            let a = { ...e.payload
            };
            return {
                id: `${a.owner}-${e.id}`,
                source: s.UserNotificationSource.CLOB,
                timestamp: t,
                lastUpdatedTimestamp: t,
                read: e.read ? ? !1,
                persisted: !1,
                data: e,
                title: "Reward distributed",
                subtext: `You received ${(0,i.formatCurrency)(a.reward,{decimals:2,commas:!1})}`,
                ...!!e.payload.txnHash && {
                    externalLink: (0, x.assemblePolygonscanLink)(e.payload.txnHash)
                }
            }
        }
        if (6 === e.type) {
            let a = { ...e.payload
                },
                r = ek({
                    name: a ? .profile ? .name ? ? "",
                    pseudonym: a ? .profile ? .pseudonym ? ? "",
                    proxyWallet: a ? .profile ? .proxyWallet ? ? ""
                }, 10),
                i = "string" == typeof a.body ? a.body : "",
                n = i.length > 65 ? `${i.slice(0,65)}...` : i,
                o = "string" == typeof a.eventTitle ? a.eventTitle : "",
                l = o.length > 40 ? `${o.slice(0,40)}...` : o;
            return {
                id: `${a.id}-${a.userAddress}`,
                source: s.UserNotificationSource.CLOB,
                timestamp: t,
                lastUpdatedTimestamp: t,
                read: e ? .read ? ? !1,
                persisted: !1,
                image: e.payload.image ? ? "",
                question: "",
                market: {
                    question: `${r} replied: ${n}`,
                    image: a ? .image ? ? "",
                    events: [{
                        slug: a.eventSlug
                    }]
                },
                data: e,
                title: "Reply to your comment",
                subtext: l
            }
        }
        if (7 === e.type) {
            let a = { ...e.payload
            };
            return {
                id: `${a.owner}-${e.id}`,
                source: s.UserNotificationSource.CLOB,
                timestamp: t,
                lastUpdatedTimestamp: t,
                read: e.read ? ? !1,
                persisted: !1,
                data: e,
                title: "4% Rewards distributed",
                subtext: `You received ${(0,i.formatCurrency)(a.amount,{decimals:2,commas:!1})}`,
                ...!!e.payload.txnHash && {
                    externalLink: (0, x.assemblePolygonscanLink)(e.payload.txnHash)
                }
            }
        }
        if (9 === e.type) {
            let a = { ...e.payload
            };
            return {
                id: `auto-redeem-${a.txnHash}-${e.id}`,
                source: s.UserNotificationSource.CLOB,
                timestamp: t,
                lastUpdatedTimestamp: t,
                read: e.read ? ? !1,
                persisted: !1,
                data: e,
                image: a.image,
                market_slug: a.slug,
                question: a.question,
                title: "Winning position redeemed",
                subtext: `You won ${(0,i.formatCurrency)(a.amount,{decimals:2,commas:!1})}`,
                conditionId: a.conditionId ? .toLowerCase(),
                ...!!a.txnHash && {
                    externalLink: (0, x.assemblePolygonscanLink)(a.txnHash)
                },
                market: {
                    image: a.image,
                    question: a.question,
                    slug: a.slug
                }
            }
        }
        return {
            id: `${e.id}`,
            source: s.UserNotificationSource.CLOB,
            timestamp: t,
            lastUpdatedTimestamp: t,
            read: !1,
            persisted: !1,
            data: e,
            title: "Unknown notification",
            subtext: "",
            conditionId: "0x123",
            tokenId: "0x123",
            image: "",
            market_slug: "",
            question: ""
        }
    }, "getCommentIdFromNotification", 0, e => "payload" in e.data && "parentCommentID" in e.data.payload ? e.data.payload.parentCommentID : "", "getEventSlugFromNotification", 0, e => "payload" in e.data && "eventSlug" in e.data.payload ? e.data.payload.eventSlug : "market" in e.data && Array.isArray(e.data.market ? .events) ? e.data.market ? .events[0].slug : void 0, "getInfoFromMarketNotification", 0, e => {
        if (3 === e.data.type || 4 === e.data.type) {
            let {
                payload: t
            } = e.data;
            return {
                question: t ? .question ? ? "",
                image: t ? .icon ? ? t ? .image ? ? "",
                slug: t ? .market_slug ? ? ""
            }
        }
        if (9 === e.data.type) {
            let {
                payload: t
            } = e.data;
            return {
                question: t ? .question ? ? "",
                image: t ? .image ? ? "",
                slug: t ? .slug ? ? ""
            }
        }
        return {
            image: "",
            question: "",
            slug: ""
        }
    }, "getReplyUserProxy", 0, e => "payload" in e.data && "profile" in e.data.payload ? e.data.payload.profile ? .proxyWallet ? ? e.data.payload.userAddress ? ? "" : "", "getSeriesSlugFromNotification", 0, e => "payload" in e.data && "seriesSlug" in e.data.payload ? e.data.payload.seriesSlug : ""], 310245)
}]);

//# debugId=57622e06-1fad-1daf-fa9b-906120f6423f