;
! 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] = "7e09b0c1-4b1a-ef69-7955-d991245cb086")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 731892, e => {
    "use strict";
    var t, r = e.i(284553),
        a = e.i(221628),
        s = e.i(999061),
        l = e.i(451058),
        n = e.i(756900),
        o = e.i(416340),
        i = e.i(336896),
        c = e.i(233522),
        u = e.i(476979),
        d = e.i(76953),
        m = e.i(313305),
        g = e.i(938),
        p = e.i(870555),
        f = e.i(399336),
        h = e.i(98191);
    let x = () => {
        let e, t, r, l, n, o, i, c, u = (0, s.c)(10);
        u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["activeMarket"], u[0] = e) : e = u[0];
        let {
            activeMarket: d
        } = (0, f.useEventActiveMarketContext)(e);
        u[1] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, p.cn)("bg-surface-1 rounded-lg border border-border shadow-md flex flex-col shrink-0 justify-between", "max-lg:border-none max-lg:rounded-none max-lg:shadow-none max-lg:px-4"), r = {
            width: `${g.EVENT_LAYOUT_BUY_SELL_WIDGET_WIDTH}px`
        }, u[1] = t, u[2] = r) : (t = u[1], r = u[2]), u[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(h.default, {
            className: "h-10 w-10"
        }), n = (0, a.jsx)("p", {
            className: "text-lg font-medium text-text-primary",
            children: "Hold on, determining winner..."
        }), u[3] = l, u[4] = n) : (l = u[3], n = u[4]);
        let m = d.groupItemTitle ? ? d.question;
        return u[5] !== m ? (o = (0, a.jsx)("p", {
            className: "text-sm text-text-secondary",
            children: m
        }), u[5] = m, u[6] = o) : o = u[6], u[7] === Symbol.for("react.memo_cache_sentinel") ? (i = (0, a.jsx)("p", {
            className: "text-sm text-text-secondary max-w-[280px]",
            children: "This market has ended. Final resolution will appear automatically as soon as it is available on-chain."
        }), u[7] = i) : i = u[7], u[8] !== o ? (c = (0, a.jsx)("div", {
            className: t,
            style: r,
            children: (0, a.jsxs)("div", {
                className: "w-full p-8 flex flex-col justify-center items-center gap-3.5 text-center",
                children: [l, n, o, i]
            })
        }), u[8] = o, u[9] = c) : c = u[9], c
    };
    var v = e.i(23128),
        b = e.i(562549),
        y = e.i(805949),
        S = e.i(73836),
        k = e.i(88240),
        w = e.i(116371),
        j = e.i(249792),
        C = e.i(606572),
        N = e.i(51800),
        T = e.i(333223),
        M = e.i(116003),
        _ = e.i(430849),
        I = e.i(460649),
        E = e.i(631503),
        D = e.i(600326),
        P = e.i(502980),
        A = e.i(99417),
        O = e.i(604777),
        R = e.i(922445),
        L = e.i(784521),
        $ = e.i(885092),
        F = e.i(921807),
        B = e.i(113788),
        q = e.i(660006),
        U = e.i(324277),
        z = e.i(196593),
        W = e.i(450091),
        G = e.i(631222),
        H = e.i(504404),
        V = e.i(131262),
        Y = e.i(141438);
    let K = ({
        onComplete: e,
        onClose: t,
        enableToast: r = !0
    }) => {
        let {
            onOpenChange: s
        } = (0, w.useCurrentDrawer)(), l = (0, O.useTranslations)(), n = (0, j.useToast)(), {
            switchChainAsync: i
        } = (0, S.useSwitchChain)(), {
            chain: c
        } = (0, y.useConnection)(), {
            authenticated: u,
            authenticationType: d,
            proxyAddress: m,
            walletMode: h
        } = (0, L.useAccountContext)(["authenticated", "authenticationType", "proxyAddress", "walletMode"]), {
            accountProfile: x
        } = (0, T.default)(), {
            accountWalletPreferences: K
        } = (0, N.default)(), {
            enqueueTransaction: Q
        } = (0, $.useTransactionContext)(), Z = (0, I.default)(), J = (0, F.useTransactionStore)(), X = (0, A.useInvalidatePositions)(), {
            activeMarket: ee
        } = (0, f.useEventActiveMarketContext)(["activeMarket"]), et = (0, o.useMemo)(() => ee.conditionId, [ee.conditionId]), {
            positions: er
        } = (0, M.default)({
            conditionIds: [et],
            proxyAddress: m
        }), ea = (0, _.default)(et), [es, el] = (0, o.useState)(), [en, eo] = (0, o.useState)(!1), [ei, ec] = (0, o.useState)(!1), {
            payoutsString: eu
        } = (0, V.useHandlePayouts)(ee), {
            latestOutcomePrices: ed,
            resolutionSource: em,
            resolutionPhase: eg
        } = (0, V.useLatestFinalResolution)(ee), [ep, ef] = (0, o.useState)(!1), eh = (0, o.useRef)(null), ex = (0, o.useMemo)(() => (er ? ? []).map(e => {
            var t, r;
            let a;
            return a = ea.map(e => (0, z.parseUSDCUnits)(e.toFixed(6))), t = { ...e,
                netQuantity: a ? .[Number(e ? .outcomeIndex)] ? .toString() ? ? e.netQuantity
            }, (r = "chain" === em && "resolved" === eg ? ed : null) && 2 === r.length ? { ...t,
                market: { ...t.market,
                    outcomeTokenPrices: r,
                    conditions: t.market.conditions.length > 0 ? t.market.conditions.map((e, t) => 0 === t ? { ...e,
                        payouts: r
                    } : e) : [{
                        payouts: r
                    }]
                }
            } : t
        }), [er, ea, ed, eg, em]), ev = ex.reduce((e, t) => e + (0, W.getCurrentValueOfPosition)(t), 0 n), eb = (0, o.useMemo)(() => ea.length ? ea.reduce((e, t) => e + t, 0) : 0, [ea]), ey = (0, o.useCallback)((e, t) => {
            r && n.error(new C.ToastBuilder().title("Redeem shares failed").description(e).subtext(t === k.TransactionResponseState.GeneralError ? "An error occurred while submitting your transaction." : "The signature request was rejected."))
        }, [n, r]), eS = "magic" === d, ek = (0, o.useCallback)(async () => {
            if (ef(!1), !u || !x) return (0, q.handleError)("[RedeemSharesWidget > Magiclink is null]", B.PolyError.MagicLinkMissing, m), ey(ee.question, k.TransactionResponseState.GeneralError), k.TransactionResponseState.GeneralError;
            try {
                let {
                    chainId: e
                } = G.MATIC_CONFIG, t = [0 n, 0 n];
                ex.length && ex.forEach(e => {
                    t[parseInt(e.outcomeIndex, 10)] = BigInt(e.netQuantity)
                });
                let a = (0, H.getRedeemPositionsTransaction)({
                    chainId: e,
                    chainConfig: G.chainConfig,
                    conditionId: ee.conditionId,
                    negRisk: !!ee ? .negRisk,
                    outcomeCount: ee.outcomes.length,
                    amounts: t
                });
                if (eS && m) {
                    let e = (0, H.formatSyntheticRedeemTransaction)({
                        conditionId: ee.conditionId,
                        amount: ev,
                        proxyAddress: m
                    });
                    return eh.current = e, await Z(e, ee), X(m), n.success(new C.ToastBuilder().position({
                        side: (0, P.getOrderToastPosition)()
                    }).title(l("portfolio.modals.redeem.claimProceeds")).description(ee.question)), (0, U.executeOptimisticCTFTransaction)({
                        syntheticTxn: e,
                        syntheticTxnRef: eh,
                        transaction: a,
                        market: ee,
                        txnType: D.CTFTxnType.Redeem,
                        outcome: "NA",
                        quantity: ev,
                        usdc: ev,
                        impact: (0, P.computeRedeemImpact)(ev),
                        errorTag: "Redeem Shares (background)",
                        proxyAddress: m,
                        transactionStore: J,
                        enqueueTransaction: Q,
                        gasPreference: K ? .advancedMode ? K.gasPreference : null,
                        customGasPrice: K ? .advancedMode ? K.customGasPrice : null,
                        onFailure: () => n.error(new C.ToastBuilder().position({
                            side: (0, P.getOrderToastPosition)()
                        }).title(l("portfolio.messages.failedToRedeem")).description(l("comments.pleaseTryAgain")))
                    }), k.TransactionResponseState.Success
                }
                return await Q(a, G.Network.Matic, D.CTFTxnType.Redeem, "NA", ev, ev, ee, (0, P.computeRedeemImpact)(ev), K ? .advancedMode ? K.gasPreference : null, K ? .advancedMode ? K.customGasPrice : null, null, null, null, r), k.TransactionResponseState.Success
            } catch (e) {
                return ef(!0), (0, q.handleError)(e, "Redeem Shares", m, q.BUG_CATEGORIES.MISSION_CRITICAL), ey(ee.question, k.TransactionResponseState.GeneralError), k.TransactionResponseState.GeneralError
            }
        }, [x, K ? .advancedMode, K ? .customGasPrice, K ? .gasPreference, ee, u, Q, m, ev, ey, r, eS, Z, J, X]), ew = (0, o.useCallback)(async () => {
            el(ek())
        }, [ek]), ej = async () => {
            ew(), eo(!1)
        }, eC = (0, o.useCallback)(async () => {
            el(void 0), e ? .(), t ? .(), (0, R.isNarrowViewport)() && s && s(!1)
        }, [el, e, t, s]), eN = async () => {
            try {
                ec(!0), await i ? .({
                    chainId: G.MATIC_CONFIG.chainId
                })
            } catch (e) {
                ec(!1), (0, q.handleError)("Error handling network change", e)
            }
        };
        return (0, o.useEffect)(() => {
            eb > 0 || en || eo(!0)
        }, [eb, en, eo]), (0, o.useEffect)(() => {
            ei && c ? .id === G.MATIC_CONFIG.chainId && ec(!1)
        }, [c ? .id, ei]), (0, a.jsxs)("div", {
            className: (0, p.cn)("bg-surface-1 rounded-lg border border-border shadow-md flex flex-col shrink-0 justify-between", "max-lg:border-none max-lg:rounded-none max-lg:shadow-none max-lg:px-4"),
            style: {
                width: `${g.EVENT_LAYOUT_BUY_SELL_WIDGET_WIDTH}px`
            },
            children: [(0, a.jsxs)("div", {
                className: (0, p.cn)("w-full p-8 flex flex-col justify-center items-center gap-3.5", eb > 0 && "lg:border-b lg:border-border"),
                children: [(0, a.jsx)(b.IconCircleCheckFill24, {
                    className: "text-brand-500 size-12"
                }), (0, a.jsxs)("p", {
                    className: "text-lg font-medium text-brand-500",
                    children: ["Outcome: ", eu]
                }), (0, a.jsx)("p", {
                    className: "text-sm text-text-secondary text-center",
                    children: ee.groupItemTitle ? ? ee.question
                })]
            }), ex && eb > 0 && (0, a.jsxs)("div", {
                className: "flex flex-col items-center w-full p-5 gap-4 max-lg:rounded-lg max-lg:border max-lg:border-border",
                children: [(0, a.jsx)("p", {
                    className: "text-lg font-semibold",
                    children: "Your Earnings"
                }), (0, a.jsxs)("div", {
                    className: "w-full flex flex-col gap-2",
                    children: [(0, a.jsxs)("div", {
                        className: "w-full flex justify-between text-sm",
                        children: [(0, a.jsx)("span", {
                            className: "text-text-secondary",
                            children: "Position"
                        }), (0, a.jsx)("span", {
                            className: "font-semibold",
                            children: ex.map(e => `${(0,z.formatNumbers)((0,z.formatUSDCUnits)(BigInt(e.netQuantity)))} ${ee.outcomes[parseInt(e.outcomeIndex,10)]}`).join(" / ")
                        })]
                    }), (0, a.jsxs)("div", {
                        className: "w-full flex justify-between text-sm",
                        children: [(0, a.jsx)("span", {
                            className: "text-text-secondary",
                            children: "Value per share"
                        }), (0, a.jsx)("span", {
                            className: "font-semibold",
                            children: ex.map(e => `$${(0,z.formatNumbers)((0,W.getCurrentSharePrice)(e))}`).join(" / ")
                        })]
                    }), (0, a.jsxs)("div", {
                        className: "w-full flex justify-between text-sm",
                        children: [(0, a.jsx)("span", {
                            className: "text-text-secondary",
                            children: "Total"
                        }), (0, a.jsxs)("span", {
                            className: "font-semibold",
                            children: ["$", (0, z.formatNumbers)((0, z.formatUSDCUnits)(ev))]
                        })]
                    })]
                }), (0, E.requiresManualTradingSetup)(h) && (!c || c.id !== G.MATIC_CONFIG.chainId) ? (0, a.jsx)(v.Button, {
                    onClick: eN,
                    disabled: ei,
                    className: "w-full bg-brand-100 text-brand-500 hover:bg-brand-100 hover:opacity-75 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:opacity-50",
                    children: "Switch to Polygon"
                }) : (0, a.jsx)(Y.default, {
                    restingCopy: "Claim winnings",
                    setHasClickedButton: () => null,
                    onClick: ej,
                    transaction: es,
                    afterTransactionPromise: eC,
                    failFast: !1
                })]
            })]
        })
    };
    var Q = e.i(112014);
    let Z = ["0x505dA8075DB50c4FE971AACF4B56cEa1289C87B2", "0x0682990de7b862979A3cf330a1B088412eCefD43", "0x611B72007ad1Ac74f5f49B5A6F44908730A72389"].map(e => e.toLowerCase()),
        J = () => {
            let e, t, r = (0, s.c)(9),
                {
                    hasLoadedAllowances: l,
                    areSomeAllowancesApproved: n,
                    triggerAllApprovals: o,
                    isUpdatingAllowances: i
                } = (0, Q.useAllowanceContext)();
            r[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["authenticated", "walletMode", "proxyAddress"], r[0] = e) : e = r[0];
            let {
                authenticated: c,
                walletMode: u,
                proxyAddress: d
            } = (0, L.useAccountContext)(e);
            return r[1] !== n || r[2] !== c || r[3] !== l || r[4] !== i || r[5] !== d || r[6] !== o || r[7] !== u ? (t = c && l && n && (0, E.requiresManualTradingSetup)(u) && void 0 !== d && Z.includes(d.toLowerCase()) ? (0, a.jsx)(v.Button, {
                variant: "ghost",
                className: "text-brand-blue",
                onClick: () => o(!0),
                disabled: i,
                children: i ? "Revoking..." : "Revoke Allowances"
            }) : null, r[1] = n, r[2] = c, r[3] = l, r[4] = i, r[5] = d, r[6] = o, r[7] = u, r[8] = t) : t = r[8], t
        };
    var X = e.i(814703),
        ee = e.i(864006);
    let et = (e, t) => ({
            "@type": "Comment",
            "@id": `${t}#comment-${e.id}`,
            datePublished: e.createdAt,
            text: e.text,
            author: {
                "@type": "Person",
                name: e.authorName,
                url: `https://polymarket.com/profile/${e.authorAddress}`
            }
        }),
        er = e => {
            let t, r, l, n, o, i, c = (0, s.c)(25),
                {
                    event: u,
                    market: d,
                    comments: m,
                    totalCommentCount: g,
                    breadcrumbItems: p,
                    serverDate: f
                } = e,
                h = (0, ee.useLocale)(),
                x = (0, ee.useMessages)().seo.structuredData;
            if (!m.length) return null;
            let v = "en" !== h ? `/${h}` : "",
                b = `https://polymarket.com${v}/event/${u.slug}`;
            if (c[0] !== p || c[1] !== b || c[2] !== m || c[3] !== u.closed || c[4] !== u.creationDate || c[5] !== u.deployingTimestamp || c[6] !== u.startDate || c[7] !== u.title || c[8] !== h || c[9] !== d.slug || c[10] !== x.discussionHeadline || c[11] !== x.discussionText || c[12] !== f || c[13] !== g) {
                let e = (e => {
                        if (!e) return null;
                        let t = new Date(e);
                        return Number.isNaN(t.getTime()) ? null : t.toISOString()
                    })(u.creationDate || u.deployingTimestamp || u.startDate),
                    a = (e => {
                        if (!e.length) return null;
                        let t = e[0].createdAt;
                        for (let r of e) r.createdAt > t && (t = r.createdAt);
                        return t
                    })(m) ? ? e,
                    s = !u.closed && f ? f : a,
                    n = (e => {
                        if (!e.length) return null;
                        let t = e[0];
                        for (let r of e) r.createdAt < t.createdAt && (t = r);
                        return t
                    })(m),
                    o = {
                        "@context": "https://schema.org",
                        "@type": "DiscussionForumPosting",
                        "@id": `${b}#discussion`,
                        headline: x.discussionHeadline.replace("{title}", u.title),
                        text: x.discussionText.replace("{title}", u.title),
                        image: `https://polymarket.com/api/og?mslug=${d.slug}`,
                        url: b,
                        datePublished: e,
                        dateModified: s,
                        author: n ? {
                            "@type": "Person",
                            name: n.authorName,
                            url: `https://polymarket.com/profile/${n.authorAddress}`
                        } : {
                            "@type": "Organization",
                            name: "Polymarket",
                            url: "https://polymarket.com"
                        },
                        about: u.closed ? b : {
                            "@id": `${b}#event`
                        },
                        interactionStatistic: {
                            "@type": "InteractionCounter",
                            interactionType: "https://schema.org/CommentAction",
                            userInteractionCount: g
                        },
                        commentCount: g,
                        comment: ((e, t) => {
                            let r = [],
                                a = new Map;
                            for (let t of e)
                                if (t.parentCommentId) {
                                    let e = a.get(t.parentCommentId) ? ? [];
                                    e.push(t), a.set(t.parentCommentId, e)
                                } else r.push(t);
                            return r.map(e => {
                                let r = et(e, t),
                                    s = a.get(e.id);
                                return s ? .length ? { ...r,
                                    comment: s.map(e => et(e, t))
                                } : r
                            })
                        })(m, b)
                    };
                if ("en" === h && (o.inLanguage = "en"), p && p.length > 0) {
                    let e = p[p.length - 1];
                    o.isPartOf = {
                        "@type": "WebPage",
                        url: e.url,
                        name: e.name
                    }
                }
                t = X.default, l = "application/ld+json", r = JSON.stringify(o).replace(/</g, "\\u003c"), c[0] = p, c[1] = b, c[2] = m, c[3] = u.closed, c[4] = u.creationDate, c[5] = u.deployingTimestamp, c[6] = u.startDate, c[7] = u.title, c[8] = h, c[9] = d.slug, c[10] = x.discussionHeadline, c[11] = x.discussionText, c[12] = f, c[13] = g, c[14] = t, c[15] = r, c[16] = l
            } else t = c[14], r = c[15], l = c[16];
            return c[17] !== r ? (n = {
                __html: r
            }, c[17] = r, c[18] = n) : n = c[18], c[19] !== l || c[20] !== n ? (o = (0, a.jsx)("script", {
                type: l,
                dangerouslySetInnerHTML: n
            }), c[19] = l, c[20] = n, c[21] = o) : o = c[21], c[22] !== t || c[23] !== o ? (i = (0, a.jsx)(t, {
                children: o
            }), c[22] = t, c[23] = o, c[24] = i) : i = c[24], i
        };
    var ea = e.i(919503),
        es = e.i(668122),
        el = e.i(944891),
        en = e.i(28589),
        eo = e.i(660635),
        ei = e.i(860106),
        ec = e.i(610162),
        eu = e.i(113927),
        ed = e.i(638317),
        em = e.i(655740);
    let eg = ["America", "Europe", "Asia", "Oceania"],
        ep = /^(?<family>.+)-in-(?<city>.+)-on-(?<month>[a-z]+)-(?<day>\d{1,2})(?:-(?<year>\d{4}))?$/i,
        ef = {
            America: ["new-york-city", "toronto", "chicago", "atlanta", "dallas", "miami", "mexico-city", "seattle", "buenos-aires", "sao-paulo"],
            Europe: ["london", "paris", "madrid", "milan", "munich", "moscow", "warsaw", "ankara", "istanbul"],
            Asia: ["tokyo", "singapore", "seoul", "shanghai", "beijing", "hong-kong", "taipei", "shenzhen", "chengdu", "chongqing", "wuhan", "macau", "lucknow", "tel-aviv"],
            Oceania: ["auckland"]
        },
        eh = new Set(["temperature", "daily temperature"]),
        ex = G.GAMMA_API_URL || "https://gamma-api.polymarket.com",
        ev = e => !!(0, ec.isWeatherEvent)(e.tags) && (e.tags ? ? []).flatMap(e => [e.slug ? .toLowerCase().trim(), e.label ? .toLowerCase().trim()]).some(e => !!e && eh.has(e)),
        eb = e => {
            if (!e) return null;
            let t = e.toLowerCase().match(ep);
            if (!t ? .groups) return null;
            let {
                family: r,
                city: a,
                month: s,
                day: l,
                year: n
            } = t.groups;
            if (!r || !a || !s || !l) return null;
            let o = n ? `${s} ${l} ${n}` : `${s} ${l}`;
            return {
                familySlug: r,
                citySlug: a,
                normalizedCitySlug: (0, ed.normalizeWeatherCitySlug)(a),
                dateSlug: n ? `${s}-${l}-${n}` : `${s}-${l}`,
                searchQuery: `${r.replace(/-/g," ")} on ${o}`
            }
        },
        ey = e => {
            let t = (0, ed.normalizeWeatherCitySlug)(e);
            if (!t) return null;
            for (let e of eg)
                if (ef[e].includes(t)) return e;
            return null
        },
        eS = e => {
            let t = (0, ed.extractWeatherCityTag)(e) ? .slug;
            if (t && (0, ed.hasResolvedWeatherCitySlug)(t)) return t;
            let r = eb(e.slug);
            return r && (0, ed.hasResolvedWeatherCitySlug)(r.normalizedCitySlug) ? r.normalizedCitySlug : null
        },
        ek = e => {
            let t = Number(e.volume ? ? 0);
            return Number.isFinite(t) ? t : 0
        };
    async function ew(e) {
        if (!ev(e)) return {
            currentContinent: null,
            groups: []
        };
        let t = eb(e.slug),
            r = (0, eu.getEventDateKey)(e),
            a = eS(e),
            s = ey(a);
        if (!t || !r || !a) return {
            currentContinent: s,
            groups: []
        };
        let l = new URLSearchParams({
                q: t.searchQuery,
                page: "1",
                limit_per_type: "100",
                type: "events",
                optimized: "true"
            }),
            {
                data: n
            } = await em.axios.get(`${ex}/search-v2?${l.toString()}`),
            o = Array.isArray(n ? .events) ? n.events : [],
            i = new Map;
        for (let r of o) {
            let s = r.slug,
                l = eb(s);
            s && l && s !== e.slug && l.familySlug === t.familySlug && l.dateSlug === t.dateSlug && l.normalizedCitySlug !== a && (0, ed.hasResolvedWeatherCitySlug)(l.normalizedCitySlug) && ey(l.normalizedCitySlug) && (i.has(l.normalizedCitySlug) || i.set(l.normalizedCitySlug, s))
        }
        if (0 === i.size) return {
            currentContinent: s,
            groups: []
        };
        let c = new URLSearchParams({
            limit: String(i.size)
        });
        for (let e of i.values()) c.append("slug", e);
        let {
            data: u
        } = await em.axios.get(`${ex}/events/keyset?${c.toString()}`), d = Array.isArray(u ? .events) ? u.events.map(e => (0, ei.parseEventWithMarkets)(e)) : [], m = new Map;
        for (let s of d) {
            if (!ev(s) || s.slug === e.slug) continue;
            let l = eb(s.slug),
                n = (0, eu.getEventDateKey)(s),
                o = eS(s);
            if (!l || !n || !o || l.familySlug !== t.familySlug || l.dateSlug !== t.dateSlug || n !== r || o === a) continue;
            let i = m.get(o);
            (!i || ek(s) > ek(i)) && m.set(o, s)
        }
        return {
            currentContinent: s,
            groups: eg.map(e => {
                let t = ef[e].map(e => m.get(e)).filter(e => !!e).slice(0, 4);
                return {
                    continent: e,
                    events: t
                }
            }).filter(e => e.events.length > 0)
        }
    }
    var ej = e.i(305457),
        eC = e.i(891685),
        eN = e.i(6204),
        eT = e.i(880809),
        eM = e.i(385773),
        e_ = e.i(53950),
        eI = e.i(213633),
        eE = e.i(635868),
        eD = e.i(779590),
        eP = e.i(732799),
        eA = e.i(477844),
        eO = e.i(26402),
        eR = e.i(449004),
        eL = e.i(86831),
        e$ = e.i(208956);
    let eF = {
            "new-york-city-mayoral-election": {
                slug: "nyc",
                title: "See NYC Mayoral Dashboard",
                hideWhenNavigatedFrom: eA.NavigatedFromIndicator.NYC
            }
        },
        eB = e => {
            let t, r, l, n, o, i = (0, s.c)(16),
                {
                    eventSlug: c,
                    navigatedFrom: u,
                    variant: d,
                    className: m
                } = e,
                g = void 0 === d ? "all" : d;
            e: {
                let e, r = eF[c];
                if (!r) {
                    let e;
                    i[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
                        show: !1
                    }, i[0] = e) : e = i[0], t = e;
                    break e
                }
                if (r.hideWhenNavigatedFrom && u && r.hideWhenNavigatedFrom === u) {
                    let e;
                    i[1] === Symbol.for("react.memo_cache_sentinel") ? (e = {
                        show: !1
                    }, i[1] = e) : e = i[1], t = e;
                    break e
                }
                i[2] !== r.slug || i[3] !== r.title ? (e = {
                    show: !0,
                    title: r.title,
                    slug: r.slug
                }, i[2] = r.slug, i[3] = r.title, i[4] = e) : e = i[4],
                t = e
            }
            let p = t;
            if (!p.show) return null;
            let f = `/${p.slug}`,
                h = "desktop" === g && "hidden lg:flex",
                x = "mobile" === g && "flex lg:hidden";
            return i[5] !== m || i[6] !== h || i[7] !== x ? (r = (0, eL.cn)("group relative flex w-full h-12 px-4 items-center border border-black/8 hover:border-black/12 dark:border-white/10 hover:dark:border-white/20 justify-center gap-2 rounded-lg text-text-primary overflow-hidden", "bg-linear-[90deg,#0035851a_15%,var(--color-background)_30%,var(--color-background)_70%,#FF66021a_85%]", "dark:bg-linear-[90deg,#0093fd1a_15%,var(--color-background)_30%,var(--color-background)_70%,#FF66021a_85%]", h, x, m), i[5] = m, i[6] = h, i[7] = x, i[8] = r) : r = i[8], i[9] !== p.title ? (l = (0, a.jsx)("p", {
                className: "relative z-10 text-sm font-medium transition-all duration-150 ease-in-out",
                children: p.title
            }), i[9] = p.title, i[10] = l) : l = i[10], i[11] === Symbol.for("react.memo_cache_sentinel") ? (n = (0, a.jsx)(eR.IconArrowRightOutline12, {
                className: "relative z-10 group-hover:translate-x-0.5 transition ease-out"
            }), i[11] = n) : n = i[11], i[12] !== f || i[13] !== r || i[14] !== l ? (o = (0, a.jsxs)(e$.default, {
                href: f,
                className: r,
                children: [l, n]
            }), i[12] = f, i[13] = r, i[14] = l, i[15] = o) : o = i[15], o
        };
    var eq = e.i(254380),
        eU = e.i(964974),
        ez = e.i(896414);
    let eW = async e => {
            try {
                let {
                    data: t
                } = await em.axios.get(`${G.GAMMA_API_URL}/events/slug/${e}`);
                if (!t) return null;
                let r = (Array.isArray(t.markets) ? t.markets : []).map(e => {
                    let t, r, a = (0, ei.parseJsonFromStrapi)(e.outcomes),
                        s = (0, ei.parseJsonFromStrapi)(e.outcomePrices);
                    return {
                        raw: e,
                        outcomes: a,
                        outcomePrices: s,
                        yes: (t = a.findIndex(e => e ? .toLowerCase() === "yes"), r = parseFloat(s[-1 === t ? 0 : t] ? ? ""), Number.isFinite(r) ? r : -1)
                    }
                }).filter(e => e.yes >= 0).sort((e, t) => t.yes - e.yes)[0];
                if (!r) return {
                    slug: t.slug,
                    conditionId: t.id ? .toString() ? ? "",
                    question: t.title ? ? "",
                    volume: (t.volume ? ? 0).toString(),
                    startDate: t.startDate ? ? "",
                    image: t.image,
                    outcomes: ["Yes", "No"],
                    outcomePrices: ["0", "0"],
                    clobTokenIds: null
                };
                return {
                    slug: t.slug,
                    conditionId: r.raw.conditionId ? ? t.id ? .toString() ? ? "",
                    question: r.raw.question ? ? t.title ? ? "",
                    volume: (t.volume ? ? 0).toString(),
                    startDate: t.startDate ? ? "",
                    image: t.image,
                    outcomes: r.outcomes,
                    outcomePrices: r.outcomePrices,
                    clobTokenIds: (0, ei.parseTokenIds)({
                        clobTokenIds: r.raw.clobTokenIds
                    }) ? ? null
                }
            } catch {
                return null
            }
        },
        eG = async e => 0 === e.length ? [] : (await Promise.all(e.map(async e => {
            try {
                let {
                    data: t
                } = await em.axios.get(`${G.GAMMA_API_URL}/markets/slug/${e}`);
                if (!t) return eW(e);
                return { ...t,
                    clobTokenIds: (0, ei.parseTokenIds)(t),
                    outcomePrices: (0, ei.parseJsonFromStrapi)(t.outcomePrices),
                    outcomes: (0, ei.parseJsonFromStrapi)(t.outcomes)
                }
            } catch {
                return eW(e)
            }
        }))).filter(e => null !== e),
        eH = async e => 0 === e.length ? {} : (await Promise.all(e.map(async e => {
            try {
                let {
                    data: t
                } = await em.axios.get(`https://clob.polymarket.com/midpoint?token_id=${e}`);
                return {
                    tokenId: e,
                    mid: t.mid
                }
            } catch {
                return {
                    tokenId: e,
                    mid: null
                }
            }
        }))).reduce((e, {
            tokenId: t,
            mid: r
        }) => (r && (e[t] = r), e), {}),
        eV = (e, t) => {
            let r, a, l, n, o, i, c, u, d, m, g, p, f, h, x = (0, s.c)(34),
                v = void 0 === t || t;
            x[0] !== e ? (r = ["recommendation-markets", e.join(",")], x[0] = e, x[1] = r) : r = x[1], x[2] !== e ? (a = () => eG(e), x[2] = e, x[3] = a) : a = x[3];
            let b = e.length > 0;
            x[4] !== r || x[5] !== a || x[6] !== b ? (l = {
                queryKey: r,
                queryFn: a,
                enabled: b,
                staleTime: 6e4,
                gcTime: 6e4
            }, x[4] = r, x[5] = a, x[6] = b, x[7] = l) : l = x[7];
            let {
                data: y,
                isLoading: S
            } = (0, eU.useQuery)(l);
            x[8] !== y ? (u = (n = void 0 === y ? [] : y).map(eY).filter(eK), c = eU.useQuery, o = "recommendation-midpoints", i = u.join(","), x[8] = y, x[9] = n, x[10] = o, x[11] = i, x[12] = c, x[13] = u) : (n = x[9], o = x[10], i = x[11], c = x[12], u = x[13]), x[14] !== o || x[15] !== i ? (d = [o, i], x[14] = o, x[15] = i, x[16] = d) : d = x[16], x[17] !== u ? (m = () => eH(u), x[17] = u, x[18] = m) : m = x[18];
            let k = u.length > 0 && v,
                w = !!v && 1e4;
            x[19] !== m || x[20] !== k || x[21] !== w || x[22] !== d ? (g = {
                queryKey: d,
                queryFn: m,
                enabled: k,
                refetchInterval: w,
                staleTime: 9e3
            }, x[19] = m, x[20] = k, x[21] = w, x[22] = d, x[23] = g) : g = x[23];
            let {
                data: j,
                isLoading: C
            } = c(g);
            x[24] !== j ? (p = void 0 === j ? {} : j, x[24] = j, x[25] = p) : p = x[25];
            let N = p;
            if (x[26] !== n || x[27] !== N) {
                let e;
                x[29] !== N ? (e = e => {
                    let t = Array.isArray(e.clobTokenIds) ? e.clobTokenIds[0] : null,
                        r = e.outcomePrices;
                    if (t && N[t]) {
                        let e = parseFloat(N[t]);
                        r = [e.toString(), (1 - e).toString()]
                    }
                    return { ...e,
                        outcomePrices: r
                    }
                }, x[29] = N, x[30] = e) : e = x[30], f = n.map(e), x[26] = n, x[27] = N, x[28] = f
            } else f = x[28];
            let T = f,
                M = S || C;
            return x[31] !== T || x[32] !== M ? (h = {
                markets: T,
                isLoading: M
            }, x[31] = T, x[32] = M, x[33] = h) : h = x[33], h
        };

    function eY(e) {
        return Array.isArray(e.clobTokenIds) ? e.clobTokenIds[0] : null
    }

    function eK(e) {
        return null !== e
    }
    var eQ = e.i(562806),
        eZ = e.i(847979);
    async function eJ(e, t, r = !0) {
        if (!e && !t) return [];
        let a = new URLSearchParams;
        e && a.append("event_title", e), t && a.append("event_slug", t), a.append("active", String(r));
        let s = `/api/market/similar?${a.toString()}`;
        try {
            let e = await fetch(s, {
                method: "GET",
                headers: {
                    "Content-Type": "application/json"
                }
            });
            if (!e.ok) return [];
            return await e.json()
        } catch {
            return []
        }
    }
    var eX = e.i(256244),
        e0 = e.i(987222),
        e1 = e.i(491163);
    let e2 = e => {
            let t, r, l, n, o, i, c, u, d = (0, s.c)(32),
                {
                    slug: m
                } = e,
                g = (0, ej.useAmplitudeAnalytics)();
            d[0] !== m ? (t = {
                queryKey: ["event", m],
                queryFn: () => (0, e1.getEvent)(m),
                staleTime: 3e5
            }, d[0] = m, d[1] = t) : t = d[1];
            let {
                data: p
            } = (0, eU.useQuery)(t);
            e: {
                let e, t, a, s;
                if (!p ? .markets) {
                    let e;
                    d[2] === Symbol.for("react.memo_cache_sentinel") ? (e = {
                        odds: null,
                        candidate: null
                    }, d[2] = e) : e = d[2], r = e;
                    break e
                }
                d[3] !== p.markets || d[4] !== m ? (e = 0, t = null, p.markets.forEach(r => {
                    if (!r.outcomes || !r.outcomePrices) return;
                    let a = r.outcomes.findIndex(e5);
                    if (-1 !== a && r.outcomePrices[a]) {
                        let s = parseFloat(r.outcomePrices[a]);
                        if (s > e)
                            if (e = s, m.includes("which-party-wins")) {
                                let e = r.question || "";
                                t = e.toLowerCase().includes("democrat") ? "Democratic" : e.toLowerCase().includes("republican") ? "Republican" : null
                            } else {
                                let e = r.question ? .match(/Will\s+([^?]+?)\s+(?:be|win)/i);
                                t = e ? .[1] ? .trim() || null
                            }
                    }
                }), d[3] = p.markets, d[4] = m, d[5] = e, d[6] = t) : (e = d[5], t = d[6]),
                d[7] !== e ? (a = e > 0 ? Math.round(100 * e) : null, d[7] = e, d[8] = a) : a = d[8],
                d[9] !== a || d[10] !== t ? (s = {
                    odds: a,
                    candidate: t
                }, d[9] = a, d[10] = t, d[11] = s) : s = d[11],
                r = s
            }
            let {
                odds: f,
                candidate: h
            } = r;
            d[12] !== g || d[13] !== p ? .slug || d[14] !== p ? .title ? (l = () => {
                g.trackEvent(es.Events.RecommendedMarketPillClick, {
                    market_slug: p ? .slug,
                    market_question: p ? .title,
                    event_slug: p ? .slug
                })
            }, d[12] = g, d[13] = p ? .slug, d[14] = p ? .title, d[15] = l) : l = d[15];
            let x = l;
            if (!p) return null;
            let v = `/event/${m}`;
            d[16] !== p.image || d[17] !== p.title ? (n = (0, a.jsx)(ez.MarketImage, {
                image: p.image,
                marketName: p.title,
                size: 40,
                containerClassName: "rounded-md"
            }), d[16] = p.image, d[17] = p.title, d[18] = n) : n = d[18];
            let b = p ? .title;
            return d[19] !== b ? (o = (0, a.jsx)("div", {
                className: "flex flex-col flex-1 gap-0.5",
                children: (0, a.jsx)("p", {
                    className: "text-text font-medium line-clamp-2 text-sm",
                    children: b
                })
            }), d[19] = b, d[20] = o) : o = d[20], d[21] !== h || d[22] !== f ? (i = f && (0, a.jsxs)("div", {
                className: "flex flex-col my-auto items-end ml-1",
                children: [(0, a.jsxs)("span", {
                    className: "text-text font-medium text-base lg:text-lg leading-normal",
                    children: [f, "%"]
                }), h && (0, a.jsx)("div", {
                    className: "text-xs text-text-secondary",
                    children: h
                })]
            }), d[21] = h, d[22] = f, d[23] = i) : i = d[23], d[24] !== n || d[25] !== o || d[26] !== i ? (c = (0, a.jsxs)("div", {
                className: "relative py-1 lg:px-2.5 lg:py-2 flex flex-row items-center gap-2.5 w-full cursor-pointer rounded-lg bg-button-ghost-bg lg:hover:bg-button-ghost-bg-hover",
                children: [n, o, i]
            }), d[24] = n, d[25] = o, d[26] = i, d[27] = c) : c = d[27], d[28] !== x || d[29] !== v || d[30] !== c ? (u = (0, a.jsx)(e$.default, {
                href: v,
                onClick: x,
                children: c
            }), d[28] = x, d[29] = v, d[30] = c, d[31] = u) : u = d[31], u
        },
        e3 = e => {
            let t, r, l, n, o, i, c, u, d = (0, s.c)(17),
                {
                    eventSlug: m
                } = e,
                g = (0, O.useTranslations)();
            d[0] !== m ? (t = (0, eQ.isPresidentialEventSlug)(m), d[0] = m, d[1] = t) : t = d[1];
            let p = t;
            d[2] !== m || d[3] !== p ? (r = p ? (0, eQ.getRecommendedPresidentialSlugs)(m) : [], d[2] = m, d[3] = p, d[4] = r) : r = d[4];
            let f = r;
            return p && 0 !== f.length ? (d[5] !== g ? (l = g("events.lowerState.related"), d[5] = g, d[6] = l) : l = d[6], d[7] !== l ? (n = (0, a.jsx)("h3", {
                className: "text-text font-medium mb-4 lg:hidden",
                children: l
            }), d[7] = l, d[8] = n) : n = d[8], d[9] === Symbol.for("react.memo_cache_sentinel") ? (o = (0, a.jsx)("div", {
                className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
            }), d[9] = o) : o = d[9], d[10] !== f ? (i = f.map(e4), d[10] = f, d[11] = i) : i = d[11], d[12] !== i ? (c = (0, a.jsx)("div", {
                className: "flex flex-col w-full gap-4 lg:gap-2",
                children: i
            }), d[12] = i, d[13] = c) : c = d[13], d[14] !== n || d[15] !== c ? (u = (0, a.jsxs)("div", {
                className: "flex flex-col w-full px-0 lg:px-1",
                children: [n, o, c]
            }), d[14] = n, d[15] = c, d[16] = u) : u = d[16], u) : null
        };

    function e5(e) {
        return "yes" === e.toLowerCase()
    }

    function e4(e) {
        return (0, a.jsx)(e2, {
            slug: e
        }, e)
    }
    let e6 = e => {
            let t, r, l, n, i, c, u, d, m, g, p, f, h, x, v, b, y, S, k, w = (0, s.c)(55),
                {
                    market: j
                } = e,
                C = (0, ej.useAmplitudeAnalytics)();
            w[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["authenticated"], w[0] = t) : t = w[0];
            let {
                authenticated: N
            } = (0, L.useAccountContext)(t), T = j.outcomePrices && ("0" !== j.outcomePrices[0] || "0" !== j.outcomePrices[1]);
            if (w[1] !== j) {
                let e = j ? {
                    id: 0,
                    slug: j.slug,
                    title: j.question,
                    image: j.image,
                    closed: !1,
                    ended: !1,
                    archived: !1,
                    negRisk: !1,
                    enableNegRisk: !1,
                    negRiskAugmented: !1,
                    markets: [{
                        id: 0,
                        slug: j.slug,
                        question: j.question,
                        outcomes: j.outcomes || ["Yes", "No"],
                        outcomePrices: j.outcomePrices || ["0.5", "0.5"],
                        groupItemTitle: "groupItemTitle" in j ? j.groupItemTitle : null,
                        closed: !1,
                        archived: !1
                    }]
                } : null;
                r = e ? (0, eX.getResultData)(e, "") : {
                    event_title: "",
                    title: "-",
                    subtitle: null
                }, w[1] = j, w[2] = r
            } else r = w[2];
            let M = r,
                _ = j ? .slug || "",
                I = j ? .question || "";
            if (w[3] !== _ || w[4] !== I) {
                let e = (_ + I).toLowerCase();
                l = ["btc", "eth", "sol", "xrp", "up or down"].some(t => e.includes(t)), n = ["aapl", "tsla", "msft", "googl", "amzn", "meta", "nvda", "nflx", "pltr", "open", "rklb", "abnb"].some(t => e.includes(t)), i = ["hourly", "daily", "hour", "day"].some(t => e.includes(t)) || /\d{1,2}(am|pm)/.test(e), w[3] = _, w[4] = I, w[5] = l, w[6] = n, w[7] = i
            } else l = w[5], n = w[6], i = w[7];
            let E = i,
                D = j ? .slug && l && E;
            w[8] !== n || w[9] !== j.slug ? (c = j ? .slug && n && j.slug.includes("-up-or-down-on-"), w[8] = n, w[9] = j.slug, w[10] = c) : c = w[10];
            let P = c;
            w[11] !== j ? (u = () => {
                if (!j) return "";
                let e = (0, eQ.getMarketDateTimeFromTitle)(j.question || "", j.slug);
                if (!e && j.slug)
                    if (j.slug.includes("-price-") && j.slug.includes("-5pm-et")) {
                        let t = j.slug.match(/-([a-z]+)-(\d+)-5pm-et$/);
                        if (t) {
                            let [, r, a] = t, s = r.charAt(0).toUpperCase() + r.slice(1);
                            e = `${s} ${a}, 5PM ET`
                        }
                    } else {
                        let t = j.slug.match(/-([a-z]+)-(\d+)-(\d{1,2})(am|pm)-et$/);
                        if (t) {
                            let [, r, a, s, l] = t, n = r.charAt(0).toUpperCase() + r.slice(1);
                            e = `${n} ${a}, ${s}${l.toUpperCase()} ET`
                        }
                    }
                return e || ""
            }, w[11] = j, w[12] = u) : u = w[12];
            let A = u;
            w[13] !== j.slug ? (d = (0, e0.matchesFifteenMinuteUpDown)(j.slug) || (0, e0.matchesFourHourUpDown)(j.slug), w[13] = j.slug, w[14] = d) : d = w[14];
            let O = d,
                R = D && !O,
                [$] = o.default.useState(tr);
            e: {
                if (!j || j.closed) {
                    m = !1;
                    break e
                }
                let e = j.endDate || j.endDateIso;
                if (e) try {
                    let t;
                    w[15] !== e ? (t = new Date(e).getTime(), w[15] = e, w[16] = t) : t = w[16], m = t > $;
                    break e
                } catch {
                    m = j.active || !1;
                    break e
                }
                m = j.active || !1
            }
            let F = m,
                B = j.eventSlug ? `/event/${j.eventSlug}` : `/event/${j.slug}`;
            if (!j) return null;
            w[17] !== C || w[18] !== N || w[19] !== j.eventSlug || w[20] !== j.question || w[21] !== j.slug ? (g = () => {
                N && C.trackEvent(es.Events.RecommendedMarketPillClick, {
                    market_slug: j.slug,
                    market_question: j.question,
                    event_slug: j.eventSlug
                })
            }, w[17] = C, w[18] = N, w[19] = j.eventSlug, w[20] = j.question, w[21] = j.slug, w[22] = g) : g = w[22];
            let q = g;
            return w[23] !== j.question || w[24] !== j.slug ? (p = (0, eQ.getCleanCryptoTitle)(j.slug) || (0, eZ.getCleanEquityTitle)(j.slug) || j.question, w[23] = j.question, w[24] = j.slug, w[25] = p) : p = w[25], w[26] !== j.image || w[27] !== p ? (f = (0, a.jsx)(ez.MarketImage, {
                image: j.image,
                marketName: p,
                size: 40,
                containerClassName: "rounded-md"
            }), w[26] = j.image, w[27] = p, w[28] = f) : f = w[28], w[29] !== j.question || w[30] !== j.slug ? (h = (0, eQ.getCleanCryptoTitle)(j.slug) || (0, eZ.getCleanEquityTitle)(j.slug) || j.question, w[29] = j.question, w[30] = j.slug, w[31] = h) : h = w[31], w[32] !== h ? (x = (0, a.jsx)("p", {
                className: "text-text font-semibold line-clamp-2 text-[13px] tracking-[-0.09px]",
                children: h
            }), w[32] = h, w[33] = x) : x = w[33], w[34] !== A || w[35] !== R ? (v = R && (0, a.jsx)("p", {
                className: "text-text-secondary text-body-sm",
                children: A()
            }), w[34] = A, w[35] = R, w[36] = v) : v = w[36], w[37] !== x || w[38] !== v ? (b = (0, a.jsxs)("div", {
                className: "flex flex-col flex-1 gap-0.5",
                children: [x, v]
            }), w[37] = x, w[38] = v, w[39] = b) : b = w[39], w[40] !== T || w[41] !== P || w[42] !== D || w[43] !== F || w[44] !== j.outcomes || w[45] !== M ? (y = T && (0, a.jsxs)("div", {
                className: "flex flex-col my-auto items-end ml-1",
                children: [(0, a.jsxs)("div", {
                    className: "flex flex-row gap-2 items-center",
                    children: [F && (D || P) && (0, a.jsxs)("div", {
                        className: "relative",
                        children: [(0, a.jsx)("div", {
                            className: "w-1.5 h-1.5 bg-red-500 rounded-full"
                        }), (0, a.jsx)("div", {
                            className: "absolute -inset-0.5 w-2.5 h-2.5 bg-red-500 rounded-full opacity-75 animate-ping"
                        })]
                    }), (0, a.jsx)("span", {
                        className: "text-text font-medium text-base lg:text-lg leading-normal",
                        children: M.title
                    })]
                }), (() => {
                    let e = j.outcomes;
                    if ("string" == typeof e) try {
                        e = JSON.parse(e)
                    } catch {
                        return null
                    }
                    let t = e && Array.isArray(e) && e.length > 0 ? e[0] : "Yes";
                    return "Yes" === t ? null : (0, a.jsx)("div", {
                        className: "text-xs text-text-secondary",
                        children: t
                    })
                })()]
            }), w[40] = T, w[41] = P, w[42] = D, w[43] = F, w[44] = j.outcomes, w[45] = M, w[46] = y) : y = w[46], w[47] !== f || w[48] !== b || w[49] !== y ? (S = (0, a.jsxs)("div", {
                className: "relative py-1 lg:px-2.5 lg:py-2 flex flex-row items-center gap-2.5 w-full cursor-pointer rounded-lg bg-button-ghost-bg lg:hover:bg-button-ghost-bg-hover",
                children: [f, b, y]
            }), w[47] = f, w[48] = b, w[49] = y, w[50] = S) : S = w[50], w[51] !== q || w[52] !== B || w[53] !== S ? (k = (0, a.jsx)(e$.default, {
                href: B,
                prefetch: !1,
                onClick: q,
                children: S
            }), w[51] = q, w[52] = B, w[53] = S, w[54] = k) : k = w[54], k
        },
        e7 = e => {
            let t = e.markets[0];
            return {
                id: t.id ? .toString() ? ? e.id.toString(),
                conditionId: t.conditionId ? ? "",
                slug: t.slug ? ? e.slug,
                image: t.image ? ? e.image ? ? "",
                volume: t.volume ? .toString() ? ? "0",
                question: t.question ? ? e.title,
                outcomes: t.outcomes ? ? ["Yes", "No"],
                outcomePrices: t.outcomePrices ? ? ["0.5", "0.5"],
                startDate: t.startDate ? ? new Date().toISOString(),
                eventSlug: e.slug,
                endDate: t.endDate,
                endDateIso: t.endDateIso,
                active: t.active,
                closed: t.closed ? ? !1
            }
        },
        e8 = e => {
            let t, r, l, n, i, c, u, d, m, g, f, h, x, b, y, S, k, w, j, C = (0, s.c)(71),
                {
                    derivativeType: N,
                    derivativeData: T,
                    activeMarketSlug: M
                } = e,
                _ = (0, O.useTranslations)();
            C[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], C[0] = t) : t = C[0];
            let {
                event: I
            } = (0, eC.useEventContext)(t), [E, D] = o.default.useState(null), P = o.default.useRef(null), A = o.default.useRef(null), R = I ? .markets ? .length > 1, L = I ? .title || "", $ = I ? .slug || "";
            C[1] !== I.slug ? (r = (0, eQ.shouldShowRecommendedPills)(I.slug) || (0, eZ.shouldShowRecommendedPills)(I.slug), C[1] = I.slug, C[2] = r) : r = C[2];
            let F = r;
            C[3] !== I.markets || C[4] !== F ? (l = F ? void 0 : I.markets.find(ts), C[3] = I.markets, C[4] = F, C[5] = l) : l = C[5];
            let B = l,
                q = F ? I.slug : B ? B.slug : R ? I ? .slug || "" : M || "";
            C[6] !== $ || C[7] !== L ? (n = ["similar-markets", L, $], i = () => eJ(L, $, !0), C[6] = $, C[7] = L, C[8] = n, C[9] = i) : (n = C[8], i = C[9]);
            let U = !!(L || $);
            C[10] !== n || C[11] !== i || C[12] !== U ? (c = {
                queryKey: n,
                queryFn: i,
                enabled: U,
                staleTime: 3e5,
                gcTime: 6e5,
                refetchOnMount: !1,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1
            }, C[10] = n, C[11] = i, C[12] = U, C[13] = c) : c = C[13];
            let {
                data: z,
                isLoading: W
            } = (0, eU.useQuery)(c);
            C[14] !== M || C[15] !== I.markets || C[16] !== $ || C[17] !== R ? (u = e => {
                let t = e.slug;
                return !((e.eventSlug || e.slug) === $ || !R && t === M || R && I ? .markets ? .some(e => e.slug === t))
            }, C[14] = M, C[15] = I.markets, C[16] = $, C[17] = R, C[18] = u) : u = C[18];
            let G = (void 0 === z ? [] : z).filter(u),
                H = new Map,
                V = [],
                Y = new Map;
            G.forEach(e => {
                let t = e.eventSlug || e.slug;
                Y.has(t) || Y.set(t, []), Y.get(t).push(e)
            }), Y.forEach((e, t) => {
                e.length > 1 ? H.set(t, e) : V.push(...e)
            });
            let K = Array.from(H.keys());
            if (C[19] !== M || C[20] !== $ || C[21] !== q) {
                let e;
                C[23] !== M || C[24] !== $ ? (e = e => e.slug !== $ && e.slug !== M, C[23] = M, C[24] = $, C[25] = e) : e = C[25], d = (0, eQ.getRecommendedCryptoMarkets)(q).filter(e).slice(0, 3).map(tl), C[19] = M, C[20] = $, C[21] = q, C[22] = d
            } else d = C[22];
            let Q = d,
                {
                    markets: Z,
                    isLoading: J
                } = eV(Q);
            C[26] !== q ? (m = new Map((0, eQ.getRecommendedCryptoMarkets)(q).map(tn)), C[26] = q, C[27] = m) : m = C[27];
            let X = m;
            C[28] !== X ? (g = (e, t) => {
                let r = X.get(e.slug);
                if (!r) return null;
                let a = eQ.CRYPTO_CONFIG[r.crypto];
                return {
                    id: e.conditionId || `crypto-rec-${t}`,
                    conditionId: e.conditionId,
                    slug: e.slug,
                    image: a.logo,
                    volume: e.volume || "0",
                    question: e.question || `${a.displayName} Price`,
                    outcomes: e.outcomes && e.outcomes.length > 0 ? e.outcomes : ["Up", "Down"],
                    outcomePrices: e.outcomePrices && e.outcomePrices.length > 0 ? e.outcomePrices : ["0.5", "0.5"],
                    startDate: e.startDate || new Date().toISOString(),
                    eventSlug: e.slug
                }
            }, C[28] = X, C[29] = g) : g = C[29];
            let ee = Z.map(g).filter(to);
            if (C[30] !== M || C[31] !== $ || C[32] !== q) {
                let e;
                C[34] !== M || C[35] !== $ ? (e = e => e.slug !== $ && e.slug !== M, C[34] = M, C[35] = $, C[36] = e) : e = C[36], f = (0, eZ.getRecommendedEquityMarkets)(q).filter(e).slice(0, 3).map(ti), C[30] = M, C[31] = $, C[32] = q, C[33] = f
            } else f = C[33];
            let et = f,
                {
                    markets: er,
                    isLoading: ea
                } = eV(et);
            C[37] !== q ? (h = new Map((0, eZ.getRecommendedEquityMarkets)(q).map(tc)), C[37] = q, C[38] = h) : h = C[38];
            let es = h;
            C[39] !== es ? (x = (e, t) => {
                let r = es.get(e.slug);
                if (!r) return null;
                let a = eZ.EQUITY_CONFIG[r.equity];
                return {
                    id: e.conditionId || `equity-rec-${t}`,
                    conditionId: e.conditionId,
                    slug: e.slug,
                    image: a.logo,
                    volume: e.volume || "0",
                    question: e.question || `${a.displayName} Price`,
                    outcomes: e.outcomes && e.outcomes.length > 0 ? e.outcomes : ["Up", "Down"],
                    outcomePrices: e.outcomePrices && e.outcomePrices.length > 0 ? e.outcomePrices : ["0.5", "0.5"],
                    startDate: e.startDate || new Date().toISOString(),
                    eventSlug: e.slug
                }
            }, C[39] = es, C[40] = x) : x = C[40];
            let el = er.map(x).filter(tu);
            e: {
                let e;
                if (!T) {
                    let e;
                    C[41] === Symbol.for("react.memo_cache_sentinel") ? (e = [], C[41] = e) : e = C[41], b = e;
                    break e
                }
                C[42] !== T || C[43] !== N || C[44] !== I.id ? (e = [], "parent" === N ? T.children.filter(e => e.id !== I.id).slice(0, 3).forEach(t => {
                    e.push({
                        type: "market",
                        market: e7(t)
                    })
                }) : "derivative" === N && (e.push({
                    type: "market",
                    market: e7(T.parent)
                }), T.children.filter(e => e.id !== I.id && e.id !== T.parent.id).slice(0, 2).forEach(t => {
                    e.push({
                        type: "market",
                        market: e7(t)
                    })
                })), C[42] = T, C[43] = N, C[44] = I.id, C[45] = e) : e = C[45],
                b = e
            }
            let en = b,
                eo = en.length > 0,
                ei = V.map(td);
            if ((0, eQ.isPresidentialEventSlug)($)) {
                let e;
                return C[46] !== $ ? (e = (0, a.jsx)(e3, {
                    eventSlug: $
                }), C[46] = $, C[47] = e) : e = C[47], e
            }
            let ec = (0, eQ.shouldShowRecommendedPills)(q) && Q.length > 0,
                eu = (0, eZ.shouldShowRecommendedPills)(q) && et.length > 0;
            if (ec && J || eu && ea) return null;
            let ed = ec && ee.length > 0,
                em = eu && el.length > 0,
                eg = [...K.map(tm), ...ei.map(tg)],
                {
                    marketsByTag: ep,
                    sortedTags: ef
                } = (() => {
                    let e = new Map,
                        t = new Map;
                    eg.forEach(e => {
                        if ("market" === e.type) {
                            let r = G.find(t => t.slug === e.market.slug);
                            (r ? .tags || []).forEach(e => {
                                let r = e.label || e.slug;
                                r && /[A-Z]/.test(r) && t.set(r, (t.get(r) || 0) + 1)
                            })
                        } else if ("event" === e.type) {
                            let r = G.filter(t => (t.eventSlug || t.slug) === e.eventSlug),
                                a = new Set;
                            r.forEach(e => {
                                (e.tags || []).forEach(e => {
                                    let r = e.label || e.slug;
                                    r && /[A-Z]/.test(r) && !a.has(r) && (a.add(r), t.set(r, (t.get(r) || 0) + 1))
                                })
                            })
                        }
                    });
                    let r = Array.from(t.entries()).sort(tp).map(tf),
                        a = new Map;
                    eg.forEach(e => {
                        let t = "market" === e.type ? e.market.slug : e.eventSlug,
                            s = [];
                        if ("market" === e.type) {
                            let t = G.find(t => t.slug === e.market.slug);
                            (t ? .tags || []).forEach(e => {
                                let t = e.label || e.slug;
                                t && /[A-Z]/.test(t) && r.includes(t) && s.push(t)
                            })
                        } else {
                            let t = G.filter(t => (t.eventSlug || t.slug) === e.eventSlug),
                                a = new Set;
                            t.forEach(e => {
                                (e.tags || []).forEach(e => {
                                    let t = e.label || e.slug;
                                    t && /[A-Z]/.test(t) && r.includes(t) && !a.has(t) && (a.add(t), s.push(t))
                                })
                            })
                        }
                        a.set(t, s)
                    });
                    let s = new Set;
                    for (let t of (r.forEach(t => {
                            e.set(t, [])
                        }), eg)) {
                        let l = "market" === t.type ? t.market.slug : t.eventSlug;
                        if (!s.has(l))
                            for (let n of a.get(l) || []) {
                                if (!r.includes(n)) continue;
                                let a = e.get(n);
                                if (a && a.length < 3) {
                                    a.push(t), s.add(l);
                                    break
                                }
                            }
                    }
                    let l = new Map;
                    e.forEach((e, t) => {
                        e.length > 0 && l.set(t, e)
                    }), e = l;
                    let n = eg.slice(0, 3),
                        o = new Map;
                    n.length > 0 && o.set("All", n), e.forEach((e, t) => {
                        e.length > 2 && o.set(t, e)
                    });
                    let i = Array.from(e.entries()).filter(th).sort(tx).map(tv);
                    return {
                        marketsByTag: o,
                        sortedTags: n.length > 0 ? ["All", ...i] : i
                    }
                })(),
                eh = new Map(ep),
                ex = [...ef];
            if (eo) {
                eh.set("Derivatives", en);
                let e = ex.length >= 3 ? 3 : ex.length;
                ex.splice(e, 0, "Derivatives")
            }
            let ev = E || (ex.length > 0 ? ex[0] : null),
                eb = ev && eh.get(ev) || [];
            if (ed) {
                let e = ee.map(tb);
                if (e.length > 0) {
                    let t, r, s;
                    return C[48] !== _ ? (t = _("events.lowerState.related"), C[48] = _, C[49] = t) : t = C[49], C[50] !== t ? (r = (0, a.jsx)("h3", {
                        className: "text-text text-base font-medium mb-2 mt-2 lg:hidden",
                        children: t
                    }), C[50] = t, C[51] = r) : r = C[51], C[52] === Symbol.for("react.memo_cache_sentinel") ? (s = (0, a.jsx)("div", {
                        className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
                    }), C[52] = s) : s = C[52], (0, a.jsxs)("div", {
                        className: "flex flex-col w-full px-0 lg:px-1",
                        children: [r, s, (0, a.jsx)("div", {
                            ref: A,
                            className: "flex flex-col w-full gap-4 lg:gap-2",
                            children: e.slice(0, 3).map(ty)
                        })]
                    })
                }
            }
            if (em) {
                let e = el.map(tS);
                if (e.length > 0) {
                    let t, r, s;
                    return C[53] !== _ ? (t = _("events.lowerState.related"), C[53] = _, C[54] = t) : t = C[54], C[55] !== t ? (r = (0, a.jsx)("h3", {
                        className: "text-text text-base font-medium mb-2 mt-2 lg:hidden",
                        children: t
                    }), C[55] = t, C[56] = r) : r = C[56], C[57] === Symbol.for("react.memo_cache_sentinel") ? (s = (0, a.jsx)("div", {
                        className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
                    }), C[57] = s) : s = C[57], (0, a.jsxs)("div", {
                        className: "flex flex-col w-full px-0 lg:px-1",
                        children: [r, s, (0, a.jsx)("div", {
                            ref: A,
                            className: "flex flex-col w-full gap-4 lg:gap-2",
                            children: e.slice(0, 3).map(tk)
                        })]
                    })
                }
            }
            if (W || 0 === eg.length && !eo) return null;
            C[58] !== _ ? (y = _("events.lowerState.related"), C[58] = _, C[59] = y) : y = C[59], C[60] !== y ? (S = (0, a.jsx)("h3", {
                className: "text-text text-base font-medium mb-2 mt-2 lg:hidden",
                children: y
            }), C[60] = y, C[61] = S) : S = C[61], C[62] === Symbol.for("react.memo_cache_sentinel") ? (k = (0, a.jsx)("div", {
                className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
            }), C[62] = k) : k = C[62];
            let ey = ex.length > 1 && (0, a.jsx)("div", {
                    className: "mb-4 -mx-1 lg:mx-0",
                    children: (0, a.jsx)(eq.ScrollContainer, {
                        containerRef: P,
                        scrollDirection: "horizontal",
                        className: "flex overflow-x-auto snap-x scroll-px-3 snap-mandatory no-scrollbar px-2 items-center",
                        children: (0, a.jsx)("div", {
                            className: "flex gap-2",
                            children: ex.map(e => (0, a.jsx)(v.Button, {
                                variant: "ghost",
                                size: "sm",
                                className: (0, p.cn)("whitespace-nowrap rounded-lg snap-start shrink-0", ev === e ? "bg-surface text-text hover:bg-surface" : "text-text-secondary hover:bg-surface hover:text-text"),
                                onClick: () => {
                                    D(e), window.requestAnimationFrame(() => {
                                        let t = ex.findIndex(t => t === e);
                                        if (P.current && -1 !== t) {
                                            let e = P.current.getElementsByTagName("button")[t];
                                            if (e) {
                                                let t = P.current,
                                                    r = e.offsetLeft + e.offsetWidth / 2,
                                                    a = t.offsetWidth / 2;
                                                t.scrollTo({
                                                    left: r - a,
                                                    behavior: "smooth"
                                                })
                                            }
                                        }
                                        A.current && setTimeout(() => {
                                            let e = A.current ? .parentElement;
                                            for (; e && e !== document.body;) {
                                                let t = window.getComputedStyle(e);
                                                if ("auto" === t.overflow || "scroll" === t.overflow || "auto" === t.overflowY || "scroll" === t.overflowY) break;
                                                e = e.parentElement
                                            }
                                            if (e && e !== document.body && A.current) {
                                                let t = A.current.offsetTop,
                                                    r = e.scrollTop,
                                                    a = e.clientHeight,
                                                    s = A.current.offsetHeight;
                                                (t < r || t + s > r + a) && e.scrollTo({
                                                    top: t - 20,
                                                    behavior: "smooth"
                                                })
                                            } else if (A.current) {
                                                let e = A.current.getBoundingClientRect();
                                                e.top >= 0 && e.bottom <= window.innerHeight || window.scrollTo({
                                                    top: window.scrollY + e.top - 100,
                                                    behavior: "smooth"
                                                })
                                            }
                                        }, 100)
                                    })
                                },
                                children: e
                            }, e))
                        })
                    })
                }),
                eS = eb.slice(0, 3).map(e => {
                    if ("event" === e.type) {
                        let t = G.find(t => (t.eventSlug || t.slug) === e.eventSlug);
                        if (!t) return null;
                        let r = ei.find(e => e.slug === t.slug);
                        if (!r) {
                            let {
                                outcomes: a
                            } = t;
                            if ("string" == typeof a) try {
                                a = JSON.parse(a)
                            } catch {
                                a = ["Yes", "No"]
                            }
                            let {
                                outcomePrices: s
                            } = t;
                            if ("string" == typeof s) try {
                                s = JSON.parse(s)
                            } catch {
                                s = ["0.5", "0.5"]
                            }
                            r = {
                                id: t.id,
                                conditionId: `0x${t.id}`,
                                slug: t.slug,
                                image: t.image || "",
                                volume: t.volume.toString(),
                                question: t.title,
                                outcomes: Array.isArray(a) ? a : ["Yes", "No"],
                                outcomePrices: Array.isArray(s) ? s : ["0.5", "0.5"],
                                startDate: t.startDate || new Date().toISOString(),
                                eventSlug: e.eventSlug,
                                endDate: t.endDate,
                                endDateIso: t.endDateIso,
                                startDateIso: t.startDateIso,
                                active: t.active,
                                closed: t.closed
                            }
                        }
                        return (0, a.jsx)(e6, {
                            market: r
                        }, e.eventSlug)
                    }
                    return (0, a.jsx)(e6, {
                        market: e.market
                    }, e.market.slug)
                });
            return C[63] !== A || C[64] !== eS ? (w = (0, a.jsx)("div", {
                ref: A,
                className: "flex flex-col w-full gap-4 lg:gap-2",
                children: eS
            }), C[63] = A, C[64] = eS, C[65] = w) : w = C[65], C[66] !== S || C[67] !== k || C[68] !== ey || C[69] !== w ? (j = (0, a.jsxs)("div", {
                className: "flex flex-col w-full px-0 lg:px-1",
                children: [S, k, ey, w]
            }), C[66] = S, C[67] = k, C[68] = ey, C[69] = w, C[70] = j) : j = C[70], j
        },
        e9 = o.default.memo(function(e) {
            let t, r, l = (0, s.c)(5),
                {
                    derivativeType: n,
                    derivativeData: o
                } = e;
            l[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], l[0] = t) : t = l[0];
            let {
                activeMarket: i
            } = (0, f.useEventActiveMarketContext)(t), c = i ? .slug;
            return l[1] !== o || l[2] !== n || l[3] !== c ? (r = (0, a.jsx)(e8, {
                derivativeType: n,
                derivativeData: o,
                activeMarketSlug: c
            }), l[1] = o, l[2] = n, l[3] = c, l[4] = r) : r = l[4], r
        }),
        te = o.default.memo(function(e) {
            let t, r = (0, s.c)(3),
                {
                    derivativeType: l,
                    derivativeData: n
                } = e;
            return r[0] !== n || r[1] !== l ? (t = (0, a.jsx)(e8, {
                derivativeType: l,
                derivativeData: n
            }), r[0] = n, r[1] = l, r[2] = t) : t = r[2], t
        }),
        tt = o.default.memo(function() {
            var e;
            let t, r, l, n, o, i, c, u = (0, s.c)(7);
            u[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], u[0] = t) : t = u[0];
            let {
                event: d
            } = (0, eC.useEventContext)(t), m = (0, ee.useLocale)(), g = d.tags ? .some(tw) ? ? !1, p = d.tags ? .some(tj) ? ? !1, f = !!d.parentEventId, h = g ? "parent" : p && f ? "derivative" : null, x = "derivative" === h ? d.parentEventId ? ? 0 : d.id, v = "derivative" === h ? d.id : void 0, {
                data: b
            } = (e = h ? x : 0, (i = (0, s.c)(8))[0] !== v || i[1] !== e ? (l = ["derivative-data", e, v], n = async () => {
                let [t, r] = await Promise.all([em.axios.get(`${G.GAMMA_API_URL}/events/${e}`), em.axios.get(`${G.GAMMA_API_URL}/events/keyset?${new URLSearchParams({active:"true",closed:"false",limit:"4",parent_event_id:e.toString(),include_children:"true",order:"volume",ascending:"false"}).toString()}`)]);
                return {
                    parent: (0, ei.parseEventWithMarkets)(t.data),
                    children: r.data.events.map(ta).filter(e => e.id !== v)
                }
            }, i[0] = v, i[1] = e, i[2] = l, i[3] = n) : (l = i[2], n = i[3]), c = !!e, i[4] !== l || i[5] !== n || i[6] !== c ? (o = {
                queryKey: l,
                queryFn: n,
                enabled: c,
                staleTime: 3e5,
                gcTime: 6e5,
                refetchOnMount: !1,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1
            }, i[4] = l, i[5] = n, i[6] = c, i[7] = o) : o = i[7], (0, eU.useQuery)(o));
            if ("en" !== m) return null;
            if (d.markets.length > 1) {
                let e;
                return u[1] !== b || u[2] !== h ? (e = (0, a.jsx)(te, {
                    derivativeType: h,
                    derivativeData: b
                }), u[1] = b, u[2] = h, u[3] = e) : e = u[3], e
            }
            return u[4] !== b || u[5] !== h ? (r = (0, a.jsx)(e9, {
                derivativeType: h,
                derivativeData: b
            }), u[4] = b, u[5] = h, u[6] = r) : r = u[6], r
        });

    function tr() {
        return (0, eo.getServerNow)()
    }

    function ta(e) {
        return (0, ei.parseEventWithMarkets)(e)
    }

    function ts(e) {
        return (0, eQ.shouldShowRecommendedPills)(e.slug) || (0, eZ.shouldShowRecommendedPills)(e.slug)
    }

    function tl(e) {
        return e.slug
    }

    function tn(e) {
        return [e.slug, e]
    }

    function to(e) {
        return null !== e
    }

    function ti(e) {
        return e.slug
    }

    function tc(e) {
        return [e.slug, e]
    }

    function tu(e) {
        return null !== e
    }

    function td(e) {
        let {
            outcomes: t
        } = e;
        if ("string" == typeof t) try {
            t = JSON.parse(t)
        } catch {
            t = ["Yes", "No"]
        }
        let {
            outcomePrices: r
        } = e;
        if ("string" == typeof r) try {
            r = JSON.parse(r)
        } catch {
            r = ["0.5", "0.5"]
        }
        return {
            id: e.id,
            conditionId: `0x${e.id}`,
            slug: e.slug,
            image: e.image || "",
            volume: e.volume.toString(),
            question: e.title,
            outcomes: Array.isArray(t) ? t : ["Yes", "No"],
            outcomePrices: Array.isArray(r) ? r : ["0.5", "0.5"],
            startDate: e.startDate || new Date().toISOString(),
            eventSlug: e.eventSlug || e.slug,
            endDate: e.endDate,
            endDateIso: e.endDateIso,
            startDateIso: e.startDateIso,
            active: e.active,
            closed: e.closed
        }
    }

    function tm(e) {
        return {
            type: "event",
            eventSlug: e
        }
    }

    function tg(e) {
        return {
            type: "market",
            market: e
        }
    }

    function tp(e, t) {
        return t[1] - e[1]
    }

    function tf(e) {
        let [t] = e;
        return t
    }

    function th(e) {
        let [, t] = e;
        return t.length > 2
    }

    function tx(e, t) {
        return t[1].length - e[1].length
    }

    function tv(e) {
        let [t] = e;
        return t
    }

    function tb(e) {
        return {
            type: "market",
            market: e
        }
    }

    function ty(e) {
        return (0, a.jsx)(e6, {
            market: e.market
        }, e.market.slug)
    }

    function tS(e) {
        return {
            type: "market",
            market: e
        }
    }

    function tk(e) {
        return (0, a.jsx)(e6, {
            market: e.market
        }, e.market.slug)
    }

    function tw(e) {
        return "parent-for-derivative" === e.slug
    }

    function tj(e) {
        return "derivatives" === e.slug
    }
    let tC = e => {
            let t, r, l, n, o, i, c, u, d, m, g = (0, s.c)(29),
                {
                    event: p
                } = e,
                f = (0, ej.useAmplitudeAnalytics)();
            g[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["authenticated"], g[0] = t) : t = g[0];
            let {
                authenticated: h
            } = (0, L.useAccountContext)(t);
            g[1] !== p ? (r = (0, eX.getResultData)(p, ""), g[1] = p, g[2] = r) : r = g[2];
            let x = r,
                v = `/event/${p.slug}`,
                b = p.image || p.markets[0] ? .image || "";
            g[3] !== f || g[4] !== h || g[5] !== p.markets || g[6] !== p.slug || g[7] !== p.title ? (l = () => {
                h && f.trackEvent(es.Events.RecommendedMarketPillClick, {
                    market_slug: p.markets[0] ? .slug,
                    market_question: p.title,
                    event_slug: p.slug
                })
            }, g[3] = f, g[4] = h, g[5] = p.markets, g[6] = p.slug, g[7] = p.title, g[8] = l) : l = g[8];
            let y = l;
            return g[9] !== p.title || g[10] !== b ? (n = (0, a.jsx)(ez.MarketImage, {
                image: b,
                marketName: p.title,
                size: 40,
                containerClassName: "rounded-md"
            }), g[9] = p.title, g[10] = b, g[11] = n) : n = g[11], g[12] !== p.title ? (o = (0, a.jsx)("div", {
                className: "flex flex-col flex-1 gap-0.5",
                children: (0, a.jsx)("p", {
                    className: "text-text font-medium line-clamp-2 text-[13px]",
                    children: p.title
                })
            }), g[12] = p.title, g[13] = o) : o = g[13], g[14] !== x.title ? (i = (0, a.jsx)("span", {
                className: "text-text font-medium text-base lg:text-lg leading-normal",
                children: x.title
            }), g[14] = x.title, g[15] = i) : i = g[15], g[16] !== x.subtitle ? (c = x.subtitle && (0, a.jsx)("div", {
                className: "text-xs text-text-secondary text-right max-w-[96px] line-clamp-2",
                children: x.subtitle
            }), g[16] = x.subtitle, g[17] = c) : c = g[17], g[18] !== i || g[19] !== c ? (u = (0, a.jsxs)("div", {
                className: "flex flex-col my-auto items-end ml-1",
                children: [i, c]
            }), g[18] = i, g[19] = c, g[20] = u) : u = g[20], g[21] !== n || g[22] !== o || g[23] !== u ? (d = (0, a.jsxs)("div", {
                className: "relative py-1 lg:px-2.5 lg:py-2 flex flex-row items-center gap-2.5 w-full cursor-pointer rounded-lg bg-button-ghost-bg lg:hover:bg-button-ghost-bg-hover",
                children: [n, o, u]
            }), g[21] = n, g[22] = o, g[23] = u, g[24] = d) : d = g[24], g[25] !== y || g[26] !== v || g[27] !== d ? (m = (0, a.jsx)(e$.default, {
                href: v,
                prefetch: !1,
                onClick: y,
                children: d
            }), g[25] = y, g[26] = v, g[27] = d, g[28] = m) : m = g[28], m
        },
        tN = () => {
            let e, t, r, l, n, i, c, u, d, m, g, f, h, x, b, y = (0, s.c)(34);
            y[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], y[0] = e) : e = y[0];
            let {
                event: S
            } = (0, eC.useEventContext)(e), k = o.default.useRef(null), [w, j] = o.default.useState(null);
            y[1] !== S.slug ? (t = ["daily-temperature-recommendations", S.slug], y[1] = S.slug, y[2] = t) : t = y[2], y[3] !== S ? (r = () => ew(S), y[3] = S, y[4] = r) : r = y[4];
            let C = !!S ? .slug;
            y[5] !== t || y[6] !== r || y[7] !== C ? (l = {
                queryKey: t,
                queryFn: r,
                enabled: C,
                staleTime: 3e5,
                gcTime: 6e5,
                refetchOnMount: !1,
                refetchOnWindowFocus: !1,
                refetchOnReconnect: !1
            }, y[5] = t, y[6] = r, y[7] = C, y[8] = l) : l = y[8];
            let {
                data: N
            } = (0, eU.useQuery)(l);
            y[9] !== N ? .groups ? (n = N ? .groups ? ? [], y[9] = N ? .groups, y[10] = n) : n = y[10];
            let T = n;
            N ? .currentContinent;
            e: {
                if (0 === T.length) {
                    i = null;
                    break e
                }
                let e = N ? .currentContinent;
                if (e && T.some(t => t.continent === e)) {
                    i = e;
                    break e
                }
                i = T[0] ? .continent ? ? null
            }
            let M = i;
            y[11] !== T || y[12] !== M || y[13] !== w ? (c = () => {
                !M || w && T.some(e => e.continent === w) || j(M)
            }, u = [T, M, w], y[11] = T, y[12] = M, y[13] = w, y[14] = c, y[15] = u) : (c = y[14], u = y[15]), o.default.useEffect(c, u);
            let _ = w ? ? M;
            t: {
                let e;
                if (!_) {
                    d = T[0] ? ? null;
                    break t
                }
                y[16] !== _ || y[17] !== T ? (e = T.find(e => e.continent === _) ? ? null, y[16] = _, y[17] = T, y[18] = e) : e = y[18],
                d = e
            }
            let I = d;
            if (!I || 0 === T.length) return null;
            if (y[19] === Symbol.for("react.memo_cache_sentinel") ? (m = (0, a.jsx)("div", {
                    className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
                }), y[19] = m) : m = y[19], y[20] !== _ || y[21] !== T) {
                let e;
                y[23] !== _ ? (e = e => (0, a.jsx)(v.Button, {
                    variant: "ghost",
                    size: "sm",
                    className: (0, p.cn)("whitespace-nowrap rounded-lg snap-start shrink-0", _ === e.continent ? "bg-surface text-text hover:bg-surface" : "text-text-secondary hover:bg-surface hover:text-text"),
                    onClick: () => j(e.continent),
                    children: e.continent
                }, e.continent), y[23] = _, y[24] = e) : e = y[24], g = T.map(e), y[20] = _, y[21] = T, y[22] = g
            } else g = y[22];
            return y[25] !== g ? (f = (0, a.jsx)("div", {
                className: "mb-4 -mx-1 lg:mx-0",
                children: (0, a.jsx)(eq.ScrollContainer, {
                    containerRef: k,
                    scrollDirection: "horizontal",
                    className: "flex overflow-x-auto snap-x scroll-px-3 snap-mandatory no-scrollbar px-2 items-center",
                    children: (0, a.jsx)("div", {
                        className: "flex gap-2",
                        children: g
                    })
                })
            }), y[25] = g, y[26] = f) : f = y[26], y[27] !== I.events ? (h = I.events.map(tT), y[27] = I.events, y[28] = h) : h = y[28], y[29] !== h ? (x = (0, a.jsx)("div", {
                className: "flex flex-col w-full gap-4 lg:gap-2",
                children: h
            }), y[29] = h, y[30] = x) : x = y[30], y[31] !== f || y[32] !== x ? (b = (0, a.jsxs)("div", {
                className: "flex flex-col w-full px-0 lg:px-1",
                children: [m, f, x]
            }), y[31] = f, y[32] = x, y[33] = b) : b = y[33], b
        };

    function tT(e) {
        return (0, a.jsx)(tC, {
            event: e
        }, e.id)
    }
    e.i(304697);
    var tM = e.i(179645),
        t_ = e.i(485078);
    let tI = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"],
        tE = [{
            short: "btc",
            long: "bitcoin",
            crypto: "bitcoin"
        }, {
            short: "eth",
            long: "ethereum",
            crypto: "ethereum"
        }, {
            short: "sol",
            long: "solana",
            crypto: "solana"
        }, {
            short: "xrp",
            long: "xrp",
            crypto: "xrp"
        }, {
            short: "doge",
            long: "dogecoin",
            crypto: "dogecoin"
        }, {
            short: "hype",
            long: "hype",
            crypto: "hype"
        }, {
            short: "bnb",
            long: "bnb",
            crypto: "bnb"
        }],
        tD = /^(bitcoin|btc|ethereum|eth|solana|sol|xrp|dogecoin|doge|hype|bnb)-up(?:-or-down|down)-[a-z]+-\d+-\d+(?:am|pm)-et$/i,
        tP = /^(bitcoin|btc|ethereum|eth|solana|sol|xrp|dogecoin|doge|hype|bnb)-up-or-down-on-[a-z]+-\d+$/i;

    function tA(e) {
        return !!e && tD.test(e.toLowerCase())
    }

    function tO(e) {
        return !!e && tP.test(e.toLowerCase())
    }
    let tR = ["5m", "15m", "1h", "1d"],
        tL = e => {
            let t, r, l, n, o, i, c, u, d = (0, s.c)(26),
                {
                    market: m
                } = e,
                g = (0, ej.useAmplitudeAnalytics)();
            d[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["authenticated"], d[0] = t) : t = d[0];
            let {
                authenticated: p
            } = (0, L.useAccountContext)(t), f = m.outcomePrices && ("0" !== m.outcomePrices[0] || "0" !== m.outcomePrices[1]);
            if (d[1] !== m) {
                let e = m ? {
                    id: 0,
                    slug: m.slug,
                    title: m.question,
                    image: m.image,
                    closed: !1,
                    ended: !1,
                    archived: !1,
                    negRisk: !1,
                    enableNegRisk: !1,
                    negRiskAugmented: !1,
                    markets: [{
                        id: 0,
                        slug: m.slug,
                        question: m.question,
                        outcomes: m.outcomes || ["Yes", "No"],
                        outcomePrices: m.outcomePrices || ["0.5", "0.5"],
                        groupItemTitle: null,
                        closed: !1,
                        archived: !1
                    }]
                } : null;
                r = e ? (0, eX.getResultData)(e, "") : {
                    event_title: "",
                    title: "-",
                    subtitle: null
                }, d[1] = m, d[2] = r
            } else r = d[2];
            let h = r,
                x = m.eventSlug ? `/event/${m.eventSlug}` : `/event/${m.slug}`;
            d[3] !== g || d[4] !== p || d[5] !== m.eventSlug || d[6] !== m.question || d[7] !== m.slug ? (l = () => {
                p && g.trackEvent(es.Events.RecommendedMarketPillClick, {
                    market_slug: m.slug,
                    market_question: m.question,
                    event_slug: m.eventSlug
                })
            }, d[3] = g, d[4] = p, d[5] = m.eventSlug, d[6] = m.question, d[7] = m.slug, d[8] = l) : l = d[8];
            let v = l;
            return d[9] !== m.image || d[10] !== m.question ? (n = (0, a.jsx)(ez.MarketImage, {
                image: m.image,
                marketName: m.question,
                size: 40,
                containerClassName: "rounded-md"
            }), d[9] = m.image, d[10] = m.question, d[11] = n) : n = d[11], d[12] !== m.question ? (o = (0, a.jsx)("div", {
                className: "flex flex-col flex-1 gap-0.5",
                children: (0, a.jsx)("p", {
                    className: "text-text font-medium line-clamp-2 text-[13px]",
                    children: m.question
                })
            }), d[12] = m.question, d[13] = o) : o = d[13], d[14] !== f || d[15] !== m.outcomes || d[16] !== h ? (i = f && (0, a.jsxs)("div", {
                className: "flex flex-col my-auto items-end ml-1",
                children: [(0, a.jsxs)("div", {
                    className: "flex flex-row gap-2 items-center",
                    children: [(0, a.jsxs)("div", {
                        className: "relative",
                        children: [(0, a.jsx)("div", {
                            className: "w-1.5 h-1.5 bg-red-500 rounded-full"
                        }), (0, a.jsx)("div", {
                            className: "absolute -inset-0.5 w-2.5 h-2.5 bg-red-500 rounded-full opacity-75 animate-ping"
                        })]
                    }), (0, a.jsx)("span", {
                        className: "text-text font-medium text-base lg:text-lg leading-normal",
                        children: h.title
                    })]
                }), (() => {
                    let e = m.outcomes;
                    if ("string" == typeof e) try {
                        e = JSON.parse(e)
                    } catch {
                        return null
                    }
                    let t = e && Array.isArray(e) && e.length > 0 ? e[0] : "Yes";
                    return "Yes" === t ? null : (0, a.jsx)("div", {
                        className: "text-xs text-text-secondary",
                        children: t
                    })
                })()]
            }), d[14] = f, d[15] = m.outcomes, d[16] = h, d[17] = i) : i = d[17], d[18] !== n || d[19] !== o || d[20] !== i ? (c = (0, a.jsxs)("div", {
                className: "relative py-1 lg:px-2.5 lg:py-2 flex flex-row items-center gap-2.5 w-full cursor-pointer rounded-lg bg-button-ghost-bg lg:hover:bg-button-ghost-bg-hover",
                children: [n, o, i]
            }), d[18] = n, d[19] = o, d[20] = i, d[21] = c) : c = d[21], d[22] !== v || d[23] !== x || d[24] !== c ? (u = (0, a.jsx)(e$.default, {
                href: x,
                prefetch: !1,
                onClick: v,
                children: c
            }), d[22] = v, d[23] = x, d[24] = c, d[25] = u) : u = d[25], u
        },
        t$ = () => {
            let e, t, r, l, n, i, c, u, d, m, g, h, x, b, y, S, k, w, j, C, N, T, M, _, I, E, D, P, A, R, L, $, F, B, q, U, z = (0, s.c)(108);
            z[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], z[0] = e) : e = z[0];
            let {
                event: W
            } = (0, eC.useEventContext)(e);
            z[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], z[1] = t) : t = z[1];
            let {
                activeMarket: G
            } = (0, f.useEventActiveMarketContext)(t);
            W ? .slug, G ? .slug, W ? .markets;
            let H = [W ? .slug, G ? .slug];
            W ? .markets && W.markets.forEach(e => {
                e.slug && H.push(e.slug)
            });
            let V = H.filter(Boolean);
            e: {
                if (V.some(tF)) {
                    r = "5m";
                    break e
                }
                if (V.some(tB)) {
                    r = "15m";
                    break e
                }
                if (V.some(tq)) {
                    r = "1h";
                    break e
                }
                if (V.some(tU)) {
                    r = "1d";
                    break e
                }
                r = null
            }
            let Y = r;
            z[2] !== G ? .slug || z[3] !== W ? .slug ? (l = () => {
                let e = (G ? .slug || W ? .slug || "").toLowerCase();
                for (let t of tE)
                    if (e.startsWith(t.short) || e.startsWith(t.long)) return t.crypto;
                return null
            }, z[2] = G ? .slug, z[3] = W ? .slug, z[4] = l) : l = z[4], G ? .slug, W ? .slug, z[5] !== l ? (n = l(), z[5] = l, z[6] = n) : n = z[6];
            let K = n,
                Q = (0, O.useTranslations)();
            z[7] !== Q ? (i = Q("trading.timeframes.fiveMin"), z[7] = Q, z[8] = i) : i = z[8], z[9] !== Q ? (c = Q("trading.timeframes.fifteenMin"), z[9] = Q, z[10] = c) : c = z[10], z[11] !== Q ? (u = Q("trading.timeframes.oneHour"), z[11] = Q, z[12] = u) : u = z[12], z[13] !== Q ? (d = Q("trading.timeframes.oneDay"), z[13] = Q, z[14] = d) : d = z[14], z[15] !== i || z[16] !== c || z[17] !== u || z[18] !== d ? (m = {
                "5m": i,
                "15m": c,
                "1h": u,
                "1d": d
            }, z[15] = i, z[16] = c, z[17] = u, z[18] = d, z[19] = m) : m = z[19];
            let Z = m,
                [J, X] = o.default.useState(""),
                ee = o.default.useRef(null),
                et = null !== Y,
                [er, ea] = o.default.useState(tz),
                [es, el] = o.default.useState(tW);
            z[20] !== et ? (g = () => {
                if (!et) return;
                let e = setTimeout(() => {
                    ea(300 * Math.floor(Math.floor((0, eo.getServerNow)() / 1e3) / 300))
                }, 3e5 - (0, eo.getServerNow)() % 3e5);
                return () => clearTimeout(e)
            }, z[20] = et, z[21] = g) : g = z[21], z[22] !== et || z[23] !== er ? (h = [er, et], z[22] = et, z[23] = er, z[24] = h) : h = z[24], o.default.useEffect(g, h), z[25] !== et ? (x = () => {
                if (!et) return;
                let e = setTimeout(() => {
                    el(900 * Math.floor(Math.floor((0, eo.getServerNow)() / 1e3) / 900))
                }, 9e5 - (0, eo.getServerNow)() % 9e5);
                return () => clearTimeout(e)
            }, z[25] = et, z[26] = x) : x = z[26], z[27] !== et || z[28] !== es ? (b = [es, et], z[27] = et, z[28] = es, z[29] = b) : b = z[29], o.default.useEffect(x, b), z[30] !== et || z[31] !== er ? (y = et ? t_.CRYPTO_5M_ASSETS.map(e => (0, t_.getFiveMinSlug)(e, er)) : [], z[30] = et, z[31] = er, z[32] = y) : y = z[32];
            let en = y;
            z[33] !== et || z[34] !== es ? (S = et ? tE.map(e => {
                let {
                    short: t
                } = e;
                return `${t}-updown-15m-${es}`
            }) : [], z[33] = et, z[34] = es, z[35] = S) : S = z[35];
            let ei = S;
            if (z[36] !== et) {
                let e, t, r, a, s, l;
                k = et ? (e = new Date, r = tI[(t = new tM.TZDate(e, "America/New_York")).getMonth()], a = t.getDate(), l = (s = t.getHours()) >= 12 ? "pm" : "am", s > 12 && (s -= 12), 0 === s && (s = 12), tE.map(({
                    long: e
                }) => `${e}-up-or-down-${r}-${a}-${s}${l}-et`)) : [], z[36] = et, z[37] = k
            } else k = z[37];
            let ec = k;
            if (z[38] !== et) {
                let e, t, r, a;
                w = et ? (e = new Date, r = tI[(t = new tM.TZDate(e, "America/New_York")).getMonth()], a = t.getDate(), tE.map(({
                    long: e
                }) => `${e}-up-or-down-on-${r}-${a}`)) : [], z[38] = et, z[39] = w
            } else w = z[39];
            let eu = w,
                {
                    markets: ed
                } = eV(en, "5m" === J),
                {
                    markets: em
                } = eV(ei, "15m" === J),
                {
                    markets: eg
                } = eV(ec, "1h" === J),
                {
                    markets: ep
                } = eV(eu, "1d" === J),
                ef = tG;
            z[40] !== Q ? (j = (e, t) => {
                let r = ef(e.slug),
                    a = r && r in eQ.CRYPTO_CONFIG ? eQ.CRYPTO_CONFIG[r] : null,
                    s = e.question;
                return a && ((0, e0.matchesFiveMinuteUpDown)(e.slug) ? s = `${a.displayName} Up or Down - ${Q("trading.timeframes.fiveMin")}` : (0, e0.matchesFifteenMinuteUpDown)(e.slug) && (s = `${a.displayName} Up or Down - ${Q("trading.timeframes.fifteenMin")}`)), {
                    id: e.conditionId || `timeframe-rec-${t}`,
                    conditionId: e.conditionId,
                    slug: e.slug,
                    image: a ? .logo || e.image || "",
                    volume: e.volume || "0",
                    question: s,
                    outcomes: e.outcomes && e.outcomes.length > 0 ? e.outcomes : ["Up", "Down"],
                    outcomePrices: e.outcomePrices && e.outcomePrices.length > 0 ? e.outcomePrices : ["0.5", "0.5"],
                    startDate: e.startDate || new Date().toISOString(),
                    eventSlug: e.slug
                }
            }, z[40] = Q, z[41] = j) : j = z[41];
            let eh = j;
            z[42] !== K || z[43] !== Y ? (C = (e, t) => t === Y && K ? e.filter(e => ef(e.slug) !== K) : e, z[42] = K, z[43] = Y, z[44] = C) : C = z[44];
            let ex = C;
            if (z[45] !== ex || z[46] !== ed || z[47] !== eh) {
                let e;
                z[49] !== eh ? (e = (e, t) => eh(e, t), z[49] = eh, z[50] = e) : e = z[50], N = ex(ed.map(e), "5m"), z[45] = ex, z[46] = ed, z[47] = eh, z[48] = N
            } else N = z[48];
            let ev = N;
            if (z[51] !== em || z[52] !== ex || z[53] !== eh) {
                let e;
                z[55] !== eh ? (e = (e, t) => eh(e, t), z[55] = eh, z[56] = e) : e = z[56], T = ex(em.map(e), "15m"), z[51] = em, z[52] = ex, z[53] = eh, z[54] = T
            } else T = z[54];
            let eb = T;
            if (z[57] !== ex || z[58] !== eg || z[59] !== eh) {
                let e;
                z[61] !== eh ? (e = (e, t) => eh(e, t), z[61] = eh, z[62] = e) : e = z[62], M = ex(eg.map(e), "1h"), z[57] = ex, z[58] = eg, z[59] = eh, z[60] = M
            } else M = z[60];
            let ey = M;
            if (z[63] !== ep || z[64] !== ex || z[65] !== eh) {
                let e;
                z[67] !== eh ? (e = (e, t) => eh(e, t), z[67] = eh, z[68] = e) : e = z[68], _ = ex(ep.map(e), "1d"), z[63] = ep, z[64] = ex, z[65] = eh, z[66] = _
            } else _ = z[66];
            let eS = _;
            z[69] !== eS || z[70] !== eb || z[71] !== ev || z[72] !== ey ? (I = {
                "5m": ev,
                "15m": eb,
                "1h": ey,
                "1d": eS
            }, z[69] = eS, z[70] = eb, z[71] = ev, z[72] = ey, z[73] = I) : I = z[73];
            let ek = I;
            z[74] !== ek ? (E = tR.filter(e => ek[e].length > 0), z[74] = ek, z[75] = E) : E = z[75];
            let ew = E;
            t: {
                if (Y && ew.includes(Y)) {
                    D = Y;
                    break t
                }
                D = ew[0] || ""
            }
            let ej = D;
            if (z[76] !== ej || z[77] !== J || z[78] !== ew ? (P = () => {
                    !(ew.length > 0) || J && ew.includes(J) || X(ej)
                }, A = [ew, J, ej], z[76] = ej, z[77] = J, z[78] = ew, z[79] = P, z[80] = A) : (P = z[79], A = z[80]), o.default.useEffect(P, A), !Y || 0 === ew.length) return null;
            if (z[81] !== ek || z[82] !== J || z[83] !== Z || z[84] !== ew) {
                let e, t = J ? ek[J] : [];
                if ($ = "flex flex-col w-full px-0 lg:px-1", z[90] === Symbol.for("react.memo_cache_sentinel") ? (F = (0, a.jsx)("div", {
                        className: "w-[95%] mx-auto h-px border-t border-dashed border-neutral-100 mb-6 not-lg:hidden"
                    }), z[90] = F) : F = z[90], z[91] !== J || z[92] !== Z || z[93] !== ew) {
                    let t;
                    z[95] !== J || z[96] !== Z ? (t = e => (0, a.jsx)(v.Button, {
                        variant: "ghost",
                        size: "sm",
                        className: (0, p.cn)("whitespace-nowrap rounded-lg snap-start shrink-0", J === e ? "bg-surface text-text hover:bg-surface" : "text-text-secondary hover:bg-surface hover:text-text"),
                        onClick: () => X(e),
                        children: Z[e]
                    }, e), z[95] = J, z[96] = Z, z[97] = t) : t = z[97], e = ew.map(t), z[91] = J, z[92] = Z, z[93] = ew, z[94] = e
                } else e = z[94];
                z[98] !== e ? (B = (0, a.jsx)("div", {
                    className: "mb-4 -mx-1 lg:mx-0",
                    children: (0, a.jsx)(eq.ScrollContainer, {
                        containerRef: ee,
                        scrollDirection: "horizontal",
                        className: "flex overflow-x-auto snap-x scroll-px-3 snap-mandatory no-scrollbar px-2 items-center",
                        children: (0, a.jsx)("div", {
                            className: "flex gap-2",
                            children: e
                        })
                    })
                }), z[98] = e, z[99] = B) : B = z[99], R = "flex flex-col w-full gap-4 lg:gap-2", L = t.slice(0, 4).map(tH), z[81] = ek, z[82] = J, z[83] = Z, z[84] = ew, z[85] = R, z[86] = L, z[87] = $, z[88] = F, z[89] = B
            } else R = z[85], L = z[86], $ = z[87], F = z[88], B = z[89];
            return z[100] !== R || z[101] !== L ? (q = (0, a.jsx)("div", {
                className: R,
                children: L
            }), z[100] = R, z[101] = L, z[102] = q) : q = z[102], z[103] !== $ || z[104] !== F || z[105] !== B || z[106] !== q ? (U = (0, a.jsxs)("div", {
                className: $,
                children: [F, B, q]
            }), z[103] = $, z[104] = F, z[105] = B, z[106] = q, z[107] = U) : U = z[107], U
        };

    function tF(e) {
        return (0, e0.matchesFiveMinuteUpDown)(e)
    }

    function tB(e) {
        return (0, e0.matchesFifteenMinuteUpDown)(e)
    }

    function tq(e) {
        return tA(e)
    }

    function tU(e) {
        return tO(e)
    }

    function tz() {
        return 300 * Math.floor(Math.floor((0, eo.getServerNow)() / 1e3) / 300)
    }

    function tW() {
        return 900 * Math.floor(Math.floor((0, eo.getServerNow)() / 1e3) / 900)
    }

    function tG(e) {
        let t = e.toLowerCase();
        for (let e of tE)
            if (t.startsWith(e.short) || t.startsWith(e.long)) return e.crypto;
        return null
    }

    function tH(e) {
        return (0, a.jsx)(tL, {
            market: e
        }, e.slug)
    }
    var tV = e.i(425010);
    let tY = function() {
        let e, t, r, l, n, i, c = (0, s.c)(11);
        c[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], c[0] = e) : e = c[0];
        let {
            event: u
        } = (0, eC.useEventContext)(e), {
            resolvedTheme: d
        } = (0, tV.useTheme)(), [m, g] = o.default.useState(800), p = u ? .gameId, f = "dark" !== d;
        if (c[1] === Symbol.for("react.memo_cache_sentinel") ? (t = () => {
                let e = e => {
                    "https://widget.pandascore.co" === e.origin && "object" == typeof e.data && e.data ? .type === "resize" && "number" == typeof e.data ? .height && Number.isFinite(e.data.height) && e.data.height > 0 && g(e.data.height)
                };
                return window.addEventListener("message", e), () => window.removeEventListener("message", e)
            }, r = [], c[1] = t, c[2] = r) : (t = c[1], r = c[2]), o.default.useEffect(t, r), !p) return null;
        let h = `https://widget.pandascore.co/v2/polymarket/match?id=${p}&user=polymarket&full_height=true`,
            x = `${m}px`;
        return c[3] !== f ? (l = f ? {
            filter: "invert(1) hue-rotate(180deg) brightness(1.1) contrast(1.05)"
        } : {
            mixBlendMode: "lighten"
        }, c[3] = f, c[4] = l) : l = c[4], c[5] !== x || c[6] !== l ? (n = {
            height: x,
            overflow: "hidden",
            ...l
        }, c[5] = x, c[6] = l, c[7] = n) : n = c[7], c[8] !== h || c[9] !== n ? (i = (0, a.jsx)("div", {
            className: "w-full mt-5",
            children: (0, a.jsx)("div", {
                className: "rounded-lg overflow-hidden bg-(--color-background)",
                children: (0, a.jsx)("iframe", {
                    src: h,
                    title: "Match Statistics",
                    className: "w-full border-0 overflow-hidden",
                    scrolling: "no",
                    style: n,
                    allow: "autoplay; encrypted-media",
                    loading: "lazy"
                })
            })
        }), c[8] = h, c[9] = n, c[10] = i) : i = c[10], i
    };
    var tK = e.i(491636),
        tQ = e.i(390960),
        tZ = e.i(184612),
        tJ = e.i(402947),
        tX = e.i(593332);

    function t0({
        game: e
    }) {
        let t = (0, O.useTranslations)(),
            r = (0, ee.useLocale)(),
            s = {
                locale: (0, tQ.getDateFnsLocale)(r)
            },
            l = o.default.useMemo(() => {
                let t = e.outcomes ? ? [],
                    r = e.outcomePrices ? ? [],
                    a = e.teams;
                if (a && 2 === a.length) return a.map((e, a) => ({
                    name: e.alias ? ? e.name ? ? t[a] ? ? `Team ${a+1}`,
                    logo: e.logo ? ? void 0,
                    price: r[a] ? ? void 0
                }));
                if (t.length >= 2) return t.slice(0, 2).map((e, t) => ({
                    name: e,
                    logo: void 0,
                    price: r[t]
                }));
                let s = e.title ? .match(/(.+?)\s+vs\.?\s+(.+)/i);
                return s ? [{
                    name: s[1].trim(),
                    logo: void 0,
                    price: void 0
                }, {
                    name: s[2].trim(),
                    logo: void 0,
                    price: void 0
                }] : []
            }, [e]),
            n = !0 === e.live,
            i = o.default.useMemo(() => {
                if (n) return null;
                if (!e.startTime) return "TBD";
                try {
                    let r = new Date(e.startTime),
                        a = new Date,
                        l = r.toDateString() === a.toDateString(),
                        n = new Date(a);
                    n.setDate(n.getDate() + 1);
                    let o = r.toDateString() === n.toDateString();
                    if (l) return `${t("cards.today")} ${(0,tK.format)(r,"p",s)}`;
                    if (o) return `${t("cards.tomorrow")} ${(0,tK.format)(r,"p",s)}`;
                    return (0, tK.format)(r, "MMM d, p", s)
                } catch {
                    return "TBD"
                }
            }, [e.startTime, n, t, r]),
            c = o.default.useMemo(() => {
                if (!e.seriesSlug) return `/event/${e.slug}`;
                let t = (0, tX.canonicalSportSlug)(e.seriesSlug);
                return (0, u.isEsportsSlug)(t) ? (0, u.getEsportsEventHref)({
                    slug: e.slug,
                    seriesSlug: e.seriesSlug,
                    eventMetadata: e.eventMetadata
                }) : void 0 !== e.eventWeek || e.eventDate ? `/sports/${t}/${e.slug}` : `/event/${e.slug}`
            }, [e.seriesSlug, e.eventWeek, e.eventDate, e.slug, e.eventMetadata]);
        return l.length < 2 ? null : (0, a.jsx)(e$.default, {
            href: c,
            prefetch: !1,
            className: "block",
            children: (0, a.jsx)("div", {
                className: "flex items-center gap-3 p-3 rounded-lg hover:bg-surface-1 cursor-pointer",
                children: (0, a.jsxs)("div", {
                    className: "flex flex-col flex-1 min-w-0 gap-1.5",
                    children: [(0, a.jsxs)("div", {
                        className: "flex items-center gap-1.5 text-xs text-text-secondary",
                        children: [n ? (0, a.jsxs)(a.Fragment, {
                            children: [(0, a.jsx)(tJ.default, {}), (0, a.jsx)("span", {
                                className: "text-[#F9452D] font-medium",
                                children: t("cards.live")
                            })]
                        }) : (0, a.jsx)("span", {
                            children: i
                        }), (0, a.jsx)("span", {
                            children: "·"
                        }), (0, a.jsxs)("span", {
                            children: [(0, z.formatAbbreviated)(e.volume ? ? 0, {
                                decimals: 1,
                                currency: !0
                            }), " ", t("events.headerMeta.volume")]
                        })]
                    }), l.map((e, t) => {
                        let r = function(e) {
                            if (!e) return null;
                            try {
                                let t = parseFloat(e);
                                if (Number.isNaN(t)) return null;
                                let r = Math.round(100 * t);
                                return `${r}\xa2`
                            } catch {
                                return null
                            }
                        }(e.price);
                        return (0, a.jsxs)("div", {
                            className: "flex items-center gap-2",
                            children: [e.logo ? (0, a.jsx)(tZ.default, {
                                src: e.logo,
                                alt: "",
                                width: 20,
                                height: 20,
                                className: "rounded-sm object-contain",
                                unoptimized: !0
                            }) : (0, a.jsx)("div", {
                                className: "w-5 h-5 bg-surface-2 rounded-sm"
                            }), (0, a.jsx)("span", {
                                className: "text-sm font-medium text-text truncate flex-1",
                                children: e.name
                            }), r && (0, a.jsx)("span", {
                                className: "text-sm font-semibold text-text-secondary",
                                children: r
                            })]
                        }, `${e.name}-${t}`)
                    })]
                })
            })
        })
    }
    async function t1(e, t, r) {
        let a = new URLSearchParams({
            seriesId: e,
            currentEventSlug: t
        });
        r && a.set("league", r);
        let s = await fetch(`/api/sports/series-recommendations?${a.toString()}`);
        return s.ok ? s.json() : {
            games: []
        }
    }

    function t2() {
        let e, t, r, l, n, o, i, c, d, m, g, p, f, h, x, v = (0, s.c)(37);
        v[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], v[0] = e) : e = v[0];
        let {
            event: b
        } = (0, eC.useEventContext)(e);
        v[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["isLive", "seriesRecommendations", "eventSlug", "seriesId"], v[1] = t) : t = v[1];
        let {
            isLive: y,
            seriesRecommendations: S,
            eventSlug: k,
            seriesId: w
        } = (0, eN.useSportsContext)(t), j = b ? .slug ? ? k, C = b ? .series ? .[0] ? .id ? String(b.series[0].id) : w, N = b ? .seriesSlug ? ? b ? .series ? .[0] ? .slug ? ? "";
        v[2] !== N ? (r = (0, tX.canonicalSportSlug)(N), v[2] = N, v[3] = r) : r = v[3];
        let T = r,
            M = C ? ? "",
            _ = j ? ? "";
        v[4] !== M || v[5] !== _ ? (l = ["sports-series-recommendations", M, _], v[4] = M, v[5] = _, v[6] = l) : l = v[6], v[7] !== j || v[8] !== T || v[9] !== C ? (n = () => t1(C, j, T || void 0), v[7] = j, v[8] = T, v[9] = C, v[10] = n) : n = v[10];
        let I = !!(k && C && j && !y),
            E = S ? ? void 0;
        v[11] !== l || v[12] !== n || v[13] !== I || v[14] !== E ? (o = {
            queryKey: l,
            queryFn: n,
            enabled: I,
            staleTime: 3e5,
            gcTime: 6e5,
            refetchOnMount: !1,
            refetchOnWindowFocus: !1,
            initialData: E
        }, v[11] = l, v[12] = n, v[13] = I, v[14] = E, v[15] = o) : o = v[15];
        let {
            data: D,
            isPending: P
        } = (0, eU.useQuery)(o);
        v[16] !== D ? .games ? (i = D ? .games ? ? [], v[16] = D ? .games, v[17] = i) : i = v[17];
        let A = i;
        if (!k || y || !C || P && 0 === A.length || 0 === A.length) return null;
        let O = T || D ? .league || S ? .league;
        v[18] !== b ? .series ? .[0] ? .title ? (c = b ? .series ? .[0] ? .title ? .replace(/\s*\d{4}\s*$/g, "").trim(), v[18] = b ? .series ? .[0] ? .title, v[19] = c) : c = v[19];
        let R = c;
        v[20] !== O || v[21] !== R ? (d = R || O ? .toUpperCase() || "Upcoming", v[20] = O, v[21] = R, v[22] = d) : d = v[22];
        let L = d;
        v[23] !== O ? (m = O ? (0, u.getSportHref)(O) : null, v[23] = O, v[24] = m) : m = v[24];
        let $ = m;
        return v[25] !== L || v[26] !== $ ? (g = $ ? (0, a.jsx)(e$.default, {
            href: $,
            prefetch: !1,
            className: "hover:underline cursor-pointer",
            children: L
        }) : L, v[25] = L, v[26] = $, v[27] = g) : g = v[27], v[28] !== g ? (p = (0, a.jsxs)("h3", {
            className: "text-sm font-semibold text-text-secondary mb-3",
            children: ["More", " ", g, " ", "Games"]
        }), v[28] = g, v[29] = p) : p = v[29], v[30] !== A ? (f = A.map(t3), v[30] = A, v[31] = f) : f = v[31], v[32] !== f ? (h = (0, a.jsx)("div", {
            className: "flex flex-col gap-2",
            children: f
        }), v[32] = f, v[33] = h) : h = v[33], v[34] !== p || v[35] !== h ? (x = (0, a.jsxs)("div", {
            className: "flex flex-col w-full mt-6",
            children: [p, h]
        }), v[34] = p, v[35] = h, v[36] = x) : x = v[36], x
    }

    function t3(e) {
        return (0, a.jsx)(t0, {
            game: e
        }, e.slug)
    }
    var t5 = e.i(525962),
        t4 = e.i(992805),
        t6 = e.i(566160),
        t7 = e.i(960867),
        t8 = e.i(854219),
        t9 = e.i(591925),
        re = e.i(944277),
        rt = e.i(445930),
        rr = e.i(85914);
    let ra = new Set(["BTC", "ETH", "SOL", "XRP", "DOGE", "BNB", "HYPE"]);
    var rs = e.i(96515),
        rl = e.i(578740),
        rn = e.i(606231);
    let ro = e => {
            if ("number" != typeof e && "string" != typeof e) return null;
            let t = Number(e);
            return Number.isFinite(t) ? t : null
        },
        ri = e => "object" == typeof e && null !== e;

    function rc(e) {
        return e.updateData
    }

    function ru(e) {
        return e.setData
    }

    function rd(e) {
        return e.updateData
    }

    function rm(e) {
        return e.symbol
    }

    function rg(e) {
        return e.setData
    }

    function rp(e) {
        return e.updateData
    }

    function rf(e) {
        return Number.isFinite(e.timestamp) && Number.isFinite(e.value)
    }

    function rh(e, t) {
        return e.timestamp - t.timestamp
    }
    var rx = e.i(529311),
        rv = e.i(619305),
        rb = e.i(1637),
        ry = e.i(794823),
        rS = e.i(265725),
        rk = e.i(636357),
        rw = ((t = {}).YoutubeVideo = "YoutubeVideo", t.TwitchVideo = "TwitchVideo", t.KickVideo = "KickVideo", t.TweetCounter = "TweetCounter", t);
    let rj = new Set(["elon-tweets", "elon-tweets-48h", "trump-truth-social", "trump-truths"]),
        rC = new Set(["truthsocial.com", "www.truthsocial.com"]);
    var rN = e.i(664318),
        rT = e.i(30408),
        rM = e.i(844520),
        r_ = e.i(134709),
        rI = e.i(510954),
        rE = e.i(57096);
    let rD = "https://xtracker.polymarket.com",
        rP = async (e, t, r, a) => {
            try {
                let {
                    data: s
                } = await em.axios.get(`${rD}/api/users/${e}/trackings`, {
                    params: {
                        platform: a
                    }
                });
                if (!s.success || !s.data) return console.warn("[XTracker] No trackings found for handle:", e), null;
                let l = t.getTime(),
                    n = s.data.find(e => new Date(e.startDate).getTime() === l) ? ? s.data.find(e => {
                        let a, s;
                        return a = new Date(e.startDate).getTime(), s = new Date(e.endDate).getTime(), 36e5 >= Math.abs(a - t.getTime()) && 3601e3 >= Math.abs(s - r.getTime())
                    });
                if (!n) return console.warn("[XTracker] No tracking found for startDate:", t.toISOString()), null;
                let {
                    data: o
                } = await em.axios.get(`${rD}/api/trackings/${n.id}`, {
                    params: {
                        includeStats: "true"
                    }
                });
                if (!o.success || !o.data ? .stats) return console.warn("[XTracker] Failed to fetch stats for tracking:", n.id), null;
                return o.data.stats.total
            } catch (e) {
                return console.warn("[XTracker] Failed to fetch tweet count:", e), null
            }
        },
        rA = async e => {
            let {
                data: t
            } = await em.axios.get(`${G.GAMMA_API_URL}/events/${e}/tweet-count`);
            return t.tweetCount
        },
        rO = async e => {
            if (e.handle && e.startDate) {
                let t = "truthsocial" === e.source ? "TRUTH_SOCIAL" : "X",
                    r = await rP(e.handle, e.startDate, e.targetDate, t);
                if (null !== r) return r
            }
            return rA(e.eventId)
        };

    function rR(e) {
        let t, r, l, n, i, c, u, d, m, g, p, f, h, x, v, b = (0, s.c)(42),
            {
                embedSource: y,
                isMobile: S
            } = e,
            k = (0, O.useTranslations)();
        if (b[0] !== y) t = (0, rT.queryOptions)({
            queryKey: rI.queryKeys[rE.QueryKey.EventEmbeds].tweetCountEmbed(y.eventId).queryKey,
            queryFn: () => rO(y),
            gcTime: 3e4,
            staleTime: 0,
            refetchOnMount: !0,
            refetchInterval: 3e4,
            initialData: void 0 !== y.initialTweetCount ? () => y.initialTweetCount : void 0
        }), b[0] = y, b[1] = t;
        else t = b[1];
        let {
            data: w,
            isLoading: j
        } = (0, eU.useQuery)(t), [C, N] = (0, o.useState)(y.isFinal), T = (0, r_.default)();
        b[2] !== y.isFinal || b[3] !== y.targetDate ? (r = () => {
            let e = null;
            return N(y.isFinal), y.isFinal || (e = setTimeout(() => {
                N(!0)
            }, new Date(y.targetDate).getTime() + 9e5 - Date.now())), () => {
                e && clearTimeout(e)
            }
        }, b[2] = y.isFinal, b[3] = y.targetDate, b[4] = r) : r = b[4], b[5] !== y ? (l = [y], b[5] = y, b[6] = l) : l = b[6], (0, o.useEffect)(r, l);
        let M = "truthsocial" === y.source ? "POST" : "TWEET";
        if (void 0 === w && !j) return null;
        let _ = "truthsocial" === y.source ? "https://xtracker.polymarket.com/?platform=TRUTH_SOCIAL" : "https://xtracker.polymarket.com";
        b[7] !== C ? (n = !C && (0, a.jsx)(tJ.default, {}), b[7] = C, b[8] = n) : n = b[8];
        let I = `text-[11px] tracking-[2px] font-bold underline decoration-1 decoration-transparent group-hover:decoration-current ${C?"text-text-secondary":"text-[#F9452D]"}`;
        return b[9] !== C || b[10] !== S || b[11] !== M || b[12] !== k ? (i = C ? k("sports.final") : S ? `${M}S` : `${M} COUNT`, b[9] = C, b[10] = S, b[11] = M, b[12] = k, b[13] = i) : i = b[13], b[14] !== I || b[15] !== i ? (c = (0, a.jsx)("span", {
            className: I,
            children: i
        }), b[14] = I, b[15] = i, b[16] = c) : c = b[16], b[17] !== n || b[18] !== c ? (u = (0, a.jsxs)("div", {
            className: "flex flex-row gap-1 items-center",
            children: [n, c]
        }), b[17] = n, b[18] = c, b[19] = u) : u = b[19], b[20] !== j || b[21] !== w ? (d = j && void 0 === w ? (0, a.jsx)(rN.Skeleton, {
            className: "h-7 w-14"
        }) : (0, a.jsx)("span", {
            className: "text-2xl font-bold tracking-[0.25px] leading-7",
            children: w
        }), b[20] = j, b[21] = w, b[22] = d) : d = b[22], b[23] !== d || b[24] !== u ? (m = (0, a.jsxs)("div", {
            className: "flex flex-col gap-1 justify-center max-lg:gap-0.5",
            children: [u, d]
        }), b[23] = d, b[24] = u, b[25] = m) : m = b[25], b[26] !== k ? (g = k("time.timeLeft"), b[26] = k, b[27] = g) : g = b[27], b[28] !== g ? (p = (0, a.jsx)("span", {
            className: "text-sm font-normal text-text-secondary tracking-[0.15px] max-lg:hidden",
            children: g
        }), b[28] = g, b[29] = p) : p = b[29], b[30] !== y.targetDate || b[31] !== T ? (f = T && (0, a.jsx)(rM.Countdown, {
            targetDate: y.targetDate
        }), b[30] = y.targetDate, b[31] = T, b[32] = f) : f = b[32], b[33] !== f ? (h = (0, a.jsx)("div", {
            children: f
        }), b[33] = f, b[34] = h) : h = b[34], b[35] !== p || b[36] !== h ? (x = (0, a.jsxs)("div", {
            className: "flex flex-row items-center gap-4",
            children: [p, h]
        }), b[35] = p, b[36] = h, b[37] = x) : x = b[37], b[38] !== m || b[39] !== x || b[40] !== _ ? (v = (0, a.jsxs)("a", {
            href: _,
            target: "_blank",
            rel: "noopener noreferrer",
            className: "group flex flex-row justify-between border border-border rounded-md p-4 mb-4 transition-all duration-100 hover:shadow-md lg:hover:scale-[1.01]",
            children: [m, x]
        }), b[38] = m, b[39] = x, b[40] = _, b[41] = v) : v = b[41], v
    }
    var rL = e.i(755330),
        r$ = e.i(662855),
        rF = e.i(752728);

    function rB(e) {
        let t, r, l, n = (0, s.c)(6),
            {
                onClick: o
            } = e,
            i = (0, O.useTranslations)();
        return n[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)(r$.Radio, {
            size: 12,
            className: "shrink-0 text-red-500"
        }), n[0] = t) : t = n[0], n[1] !== i ? (r = i("events.videoEmbed.watchStream"), n[1] = i, n[2] = r) : r = n[2], n[3] !== o || n[4] !== r ? (l = (0, a.jsxs)("button", {
            type: "button",
            onClick: o,
            className: "px-2 py-1 text-xs font-medium text-text-secondary hover:text-text-tertiary rounded-lg cursor-pointer flex items-center gap-1 whitespace-nowrap border border-neutral-200 hover:bg-neutral-50 scale-95 active:scale-90 transition duration-300",
            children: [t, r]
        }), n[3] = o, n[4] = r, n[5] = l) : l = n[5], l
    }

    function rq(e) {
        let t, r, l, n, i, c, u, d = (0, s.c)(18),
            {
                embedSource: m,
                isMobile: g
            } = e;
        d[0] !== m.type ? (t = function(e) {
            switch (e) {
                case rw.TwitchVideo:
                    return "Twitch";
                case rw.KickVideo:
                    return "Kick";
                case rw.YoutubeVideo:
                    return "YouTube";
                default:
                    return ""
            }
        }(m.type), d[0] = m.type, d[1] = t) : t = d[1];
        let p = t;
        d[2] !== m ? (r = function(e) {
            if (!e.embedSrc) return;
            let t = "";
            try {
                let r = new URL(e.embedSrc);
                if (e.type === rw.TwitchVideo) t = r.searchParams.get("channel") ? ? "";
                else {
                    let e = r.pathname.split("/").filter(Boolean);
                    t = e[e.length - 1] ? ? ""
                }
            } catch {
                return
            }
            if (!t) return;
            let r = {
                [rw.YoutubeVideo]: "youtube",
                [rw.TwitchVideo]: "twitch",
                [rw.KickVideo]: "kick"
            };
            return {
                id: t,
                type: "iframe",
                src: e.embedSrc,
                site: r[e.type] ? ? "other"
            }
        }(m), d[2] = m, d[3] = r) : r = d[3];
        let f = r;
        d[4] !== f ? (l = f ? function(e) {
            try {
                let t = new URL(e.src),
                    r = t.hostname.toLowerCase();
                if (r.includes("youtube.com") || r.includes("youtube-nocookie.com")) return t.searchParams.set("autoplay", "0"), { ...e,
                    src: t.toString()
                };
                if (r.includes("twitch.tv") || r.includes("kick.com")) return t.searchParams.set("autoplay", "false"), { ...e,
                    src: t.toString()
                };
                return e
            } catch {
                return e
            }
        }(f) : void 0, d[4] = f, d[5] = l) : l = d[5];
        let h = l,
            {
                startStreaming: x,
                stopStreaming: v
            } = (0, rL.useLivestream)(),
            b = (0, o.useRef)(null);
        d[6] !== g || d[7] !== h || d[8] !== x || d[9] !== v ? (n = () => {
            let e = b.current;
            if (!e || !h || g) return;
            let t = new IntersectionObserver(e => {
                let [t] = e;
                t.isIntersecting ? v() : x(h)
            }, {
                threshold: .1
            });
            return t.observe(e), () => {
                t.disconnect(), v()
            }
        }, i = [h, g, x, v], d[6] = g, d[7] = h, d[8] = x, d[9] = v, d[10] = n, d[11] = i) : (n = d[10], i = d[11]), (0, o.useEffect)(n, i);
        let y = `w-full mb-6 overflow-hidden rounded-md bg-neutral-200 ${g?"h-[calc(100vw*9/16)]":"h-[768px] max-h-[430px]"}`,
            S = `${p} video player`;
        return d[12] !== m.embedSrc || d[13] !== S ? (c = (0, a.jsx)("iframe", {
            width: "100%",
            height: "100%",
            src: m.embedSrc,
            title: S,
            allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
            referrerPolicy: "strict-origin-when-cross-origin",
            frameBorder: "0",
            allowFullScreen: !0
        }), d[12] = m.embedSrc, d[13] = S, d[14] = c) : c = d[14], d[15] !== y || d[16] !== c ? (u = (0, a.jsx)("div", {
            ref: b,
            className: y,
            children: c
        }), d[15] = y, d[16] = c, d[17] = u) : u = d[17], u
    }

    function rU(e) {
        let t, r, l, n, o = (0, s.c)(10),
            {
                embedSource: i
            } = e,
            c = (0, O.useTranslations)(),
            u = i.href;
        return o[0] !== i.logoImageProps ? (t = (0, a.jsx)(tZ.default, {
            alt: "Logo",
            ...i.logoImageProps
        }), o[0] = i.logoImageProps, o[1] = t) : t = o[1], o[2] !== c ? (r = c("events.videoEmbed.watchStream"), o[2] = c, o[3] = r) : r = o[3], o[4] !== r ? (l = (0, a.jsx)("span", {
            children: r
        }), o[4] = r, o[5] = l) : l = o[5], o[6] !== i.href || o[7] !== t || o[8] !== l ? (n = (0, a.jsxs)("a", {
            target: "_blank",
            rel: "noopener noreferrer",
            href: u,
            className: "cursor-pointer h-8 flex items-center flex-row border border-border text-xs rounded-full gap-2 py-[7px] px-3 transition-colors hover:bg-neutral-100",
            children: [t, l]
        }), o[6] = i.href, o[7] = t, o[8] = l, o[9] = n) : n = o[9], n
    }

    function rz(e) {
        let t, r, l, n, o = (0, s.c)(13),
            {
                embedSource: i,
                isMobile: c
            } = e,
            u = (0, O.useTranslations)();
        if (i.embedSrc) {
            let e;
            return o[0] !== i || o[1] !== c ? (e = (0, a.jsx)(rq, {
                embedSource: i,
                isMobile: c
            }), o[0] = i, o[1] = c, o[2] = e) : e = o[2], e
        }
        let d = i.href;
        return o[3] !== i.logoImageProps ? (t = (0, a.jsx)(tZ.default, {
            alt: "Logo",
            ...i.logoImageProps
        }), o[3] = i.logoImageProps, o[4] = t) : t = o[4], o[5] !== u ? (r = u("events.videoEmbed.watchStream"), o[5] = u, o[6] = r) : r = o[6], o[7] !== r ? (l = (0, a.jsx)("span", {
            className: "text-base font-semibold",
            children: r
        }), o[7] = r, o[8] = l) : l = o[8], o[9] !== i.href || o[10] !== t || o[11] !== l ? (n = (0, a.jsxs)("a", {
            target: "_blank",
            rel: "noopener noreferrer",
            href: d,
            className: "cursor-pointer flex py-3.5 mb-7 rounded-md border border-border items-center justify-center transition-colors gap-1 hover:bg-neutral-100",
            children: [t, l]
        }), o[9] = i.href, o[10] = t, o[11] = l, o[12] = n) : n = o[12], n
    }

    function rW(e) {
        let t, r, l, n, o = (0, s.c)(11),
            {
                embedSource: i
            } = e,
            {
                href: c,
                logoImageProps: u,
                type: d
            } = i,
            m = (0, O.useTranslations)(),
            g = `${d} Logo`;
        return o[0] !== u || o[1] !== g ? (t = (0, a.jsx)(tZ.default, {
            alt: g,
            ...u
        }), o[0] = u, o[1] = g, o[2] = t) : t = o[2], o[3] !== m ? (r = m("events.videoEmbed.ended"), o[3] = m, o[4] = r) : r = o[4], o[5] !== r ? (l = (0, a.jsx)("span", {
            className: "text-base font-semibold",
            children: r
        }), o[5] = r, o[6] = l) : l = o[6], o[7] !== c || o[8] !== t || o[9] !== l ? (n = (0, a.jsxs)("a", {
            target: "_blank",
            rel: "noopener noreferrer",
            href: c,
            className: "cursor-pointer flex py-3.5 mb-7 rounded-md border border-border items-center justify-center transition-colors gap-1 hover:bg-neutral-100",
            children: [t, l]
        }), o[7] = c, o[8] = t, o[9] = l, o[10] = n) : n = o[10], n
    }

    function rG(e) {
        let t, r, l, n, o, i, c, u, d, m, g, p, f = (0, s.c)(29),
            {
                embedSource: h,
                onClickWatch: x
            } = e,
            v = (0, O.useTranslations)(),
            b = (0, ee.useLocale)();
        if (f[0] !== h.targetDate || f[1] !== b) {
            let e = (0, tQ.getDateFnsLocale)(b);
            t = (0, tK.format)(h.targetDate, "EEE, MMM d", {
                locale: e
            }), r = (0, tK.format)(h.targetDate, "p", {
                locale: e
            }), f[0] = h.targetDate, f[1] = b, f[2] = t, f[3] = r
        } else t = f[2], r = f[3];
        let y = r;
        return f[4] !== t ? (l = (0, a.jsx)("span", {
            className: "text-xs font-bold",
            children: t
        }), f[4] = t, f[5] = l) : l = f[5], f[6] !== y ? (n = (0, a.jsx)("span", {
            className: "bg-neutral-100 rounded-sm text-xs tracking-[0.15px] py-[3px] px-[5px] font-normal",
            children: y
        }), f[6] = y, f[7] = n) : n = f[7], f[8] !== l || f[9] !== n ? (o = (0, a.jsxs)("div", {
            className: "flex flex-row gap-2 items-center",
            children: [l, n]
        }), f[8] = l, f[9] = n, f[10] = o) : o = f[10], f[11] !== h || f[12] !== x ? (i = h.embedSrc ? (0, a.jsx)(rB, {
            onClick: x
        }) : (0, a.jsx)(rU, {
            embedSource: h
        }), f[11] = h, f[12] = x, f[13] = i) : i = f[13], f[14] !== o || f[15] !== i ? (c = (0, a.jsxs)("div", {
            className: "flex flex-col gap-2",
            children: [o, i]
        }), f[14] = o, f[15] = i, f[16] = c) : c = f[16], f[17] !== v ? (u = v("events.videoEmbed.beginsIn"), f[17] = v, f[18] = u) : u = f[18], f[19] !== u ? (d = (0, a.jsx)("span", {
            className: "text-sm font-normal text-[#8297A3] mr-2 max-[360px]:text-xs",
            children: u
        }), f[19] = u, f[20] = d) : d = f[20], f[21] !== h.targetDate ? (m = (0, a.jsx)("div", {
            children: (0, a.jsx)(rM.Countdown, {
                targetDate: h.targetDate
            })
        }), f[21] = h.targetDate, f[22] = m) : m = f[22], f[23] !== d || f[24] !== m ? (g = (0, a.jsxs)("div", {
            className: "flex flex-row items-center justify-center",
            children: [d, m]
        }), f[23] = d, f[24] = m, f[25] = g) : g = f[25], f[26] !== g || f[27] !== c ? (p = (0, a.jsxs)("div", {
            className: "flex rounded-md border border-border p-4 mb-7 justify-between flex-row",
            children: [c, g]
        }), f[26] = g, f[27] = c, f[28] = p) : p = f[28], p
    }

    function rH(e) {
        let t, r, l, n, o, i, c, u, d, m, g, p, f = (0, s.c)(29),
            {
                embedSource: h,
                onClickWatch: x
            } = e,
            v = (0, O.useTranslations)(),
            b = (0, ee.useLocale)();
        if (f[0] !== h.targetDate || f[1] !== b) {
            let e = (0, tQ.getDateFnsLocale)(b);
            t = (0, tK.format)(h.targetDate, "EEE, MMM d", {
                locale: e
            }), r = (0, tK.format)(h.targetDate, "p", {
                locale: e
            }), f[0] = h.targetDate, f[1] = b, f[2] = t, f[3] = r
        } else t = f[2], r = f[3];
        let y = r;
        return f[4] !== t ? (l = (0, a.jsx)("span", {
            className: "text-xs font-bold",
            children: t
        }), f[4] = t, f[5] = l) : l = f[5], f[6] !== y ? (n = (0, a.jsx)("span", {
            className: "bg-neutral-100 rounded-sm text-xs tracking-[0.15px] py-[3px] px-[5px] font-normal",
            children: y
        }), f[6] = y, f[7] = n) : n = f[7], f[8] !== l || f[9] !== n ? (o = (0, a.jsxs)("div", {
            className: "flex flex-col items-start gap-1",
            children: [l, n]
        }), f[8] = l, f[9] = n, f[10] = o) : o = f[10], f[11] !== h || f[12] !== x ? (i = h.embedSrc ? (0, a.jsx)(rB, {
            onClick: x
        }) : (0, a.jsx)(rU, {
            embedSource: h
        }), f[11] = h, f[12] = x, f[13] = i) : i = f[13], f[14] !== o || f[15] !== i ? (c = (0, a.jsxs)("div", {
            className: "flex justify-between self-stretch",
            children: [o, i]
        }), f[14] = o, f[15] = i, f[16] = c) : c = f[16], f[17] !== v ? (u = v("events.videoEmbed.beginsIn"), f[17] = v, f[18] = u) : u = f[18], f[19] !== u ? (d = (0, a.jsx)("span", {
            className: "text-sm font-normal text-[#8297A3] mr-2 max-[360px]:text-xs",
            children: u
        }), f[19] = u, f[20] = d) : d = f[20], f[21] !== h.targetDate ? (m = (0, a.jsx)(rM.Countdown, {
            targetDate: h.targetDate
        }), f[21] = h.targetDate, f[22] = m) : m = f[22], f[23] !== d || f[24] !== m ? (g = (0, a.jsxs)("div", {
            className: "flex justify-start flex-row items-center",
            children: [d, m]
        }), f[23] = d, f[24] = m, f[25] = g) : g = f[25], f[26] !== g || f[27] !== c ? (p = (0, a.jsxs)("div", {
            className: "flex rounded-md border border-border p-4 mb-7 flex-col items-start gap-5",
            children: [c, g]
        }), f[26] = g, f[27] = c, f[28] = p) : p = f[28], p
    }

    function rV(e) {
        let t, r, l = (0, s.c)(7),
            {
                embedSource: n,
                isMobile: i
            } = e,
            [c, u] = (0, o.useState)(!1);
        l[0] === Symbol.for("react.memo_cache_sentinel") ? (t = () => u(!0), l[0] = t) : t = l[0];
        let d = t;
        if (c && n.embedSrc) {
            let e;
            return l[1] !== n || l[2] !== i ? (e = (0, a.jsx)(rq, {
                embedSource: n,
                isMobile: i
            }), l[1] = n, l[2] = i, l[3] = e) : e = l[3], e
        }
        return l[4] !== n || l[5] !== i ? (r = i ? (0, a.jsx)(rH, {
            embedSource: n,
            onClickWatch: d
        }) : (0, a.jsx)(rG, {
            embedSource: n,
            onClickWatch: d
        }), l[4] = n, l[5] = i, l[6] = r) : r = l[6], r
    }

    function rY(e) {
        let t = (0, s.c)(11),
            {
                embedSource: r,
                isMobile: l
            } = e;
        switch (r.resolutionSourceStatus) {
            case rF.EventStreamStatus.UPCOMING:
                {
                    let e;
                    if (r.targetDate.getTime() <= Date.now()) {
                        let e;
                        return t[0] !== r || t[1] !== l ? (e = (0, a.jsx)(rz, {
                            embedSource: r,
                            isMobile: l
                        }), t[0] = r, t[1] = l, t[2] = e) : e = t[2], e
                    }
                    return t[3] !== r || t[4] !== l ? (e = (0, a.jsx)(rV, {
                        embedSource: r,
                        isMobile: l
                    }), t[3] = r, t[4] = l, t[5] = e) : e = t[5],
                    e
                }
            case rF.EventStreamStatus.LIVE:
                {
                    let e;
                    return t[6] !== r || t[7] !== l ? (e = (0, a.jsx)(rz, {
                        embedSource: r,
                        isMobile: l
                    }), t[6] = r, t[7] = l, t[8] = e) : e = t[8],
                    e
                }
            case rF.EventStreamStatus.ENDED:
                {
                    let e;
                    return t[9] !== r ? (e = (0, a.jsx)(rW, {
                        embedSource: r
                    }), t[9] = r, t[10] = e) : e = t[10],
                    e
                }
            default:
                return null
        }
    }
    let rK = e => {
        let t = (0, s.c)(6),
            {
                embedSource: r,
                isMobile: l
            } = e,
            n = void 0 !== l && l;
        switch (r.type) {
            case rw.YoutubeVideo:
            case rw.TwitchVideo:
            case rw.KickVideo:
                {
                    let e;
                    return t[0] !== r || t[1] !== n ? (e = (0, a.jsx)(rY, {
                        embedSource: r,
                        isMobile: n
                    }), t[0] = r, t[1] = n, t[2] = e) : e = t[2],
                    e
                }
            case rw.TweetCounter:
                {
                    let e;
                    return t[3] !== r || t[4] !== n ? (e = (0, a.jsx)(rR, {
                        embedSource: r,
                        isMobile: n
                    }), t[3] = r, t[4] = n, t[5] = e) : e = t[5],
                    e
                }
            default:
                return null
        }
    };
    var rQ = e.i(994883),
        rZ = e.i(215959),
        rJ = e.i(401527),
        rX = e.i(452090),
        r0 = e.i(308579);
    let r1 = () => {
        let e, t, r, a = (0, s.c)(6),
            [l, n] = (0, o.useState)(!1),
            i = (() => {
                let e, t, r = (0, s.c)(3),
                    [a, l] = (0, o.useState)(0),
                    n = (0, r_.default)();
                return r[0] !== n ? (e = () => {
                    if (!n) return;
                    let e = () => {
                        let e = document.getElementById("tag-banner");
                        e ? l(e.getBoundingClientRect().height + parseInt(window.getComputedStyle(e).marginBottom || "0", 10)) : l(0)
                    };
                    e();
                    let t = null,
                        r = document.getElementById("tag-banner");
                    r && "u" > typeof ResizeObserver ? (t = new ResizeObserver(e)).observe(r) : window.addEventListener("resize", e);
                    let a = setTimeout(e, 100);
                    return () => {
                        t ? t.disconnect() : window.removeEventListener("resize", e), clearTimeout(a)
                    }
                }, t = [n], r[0] = n, r[1] = e, r[2] = t) : (e = r[1], t = r[2]), (0, o.useEffect)(e, t), a
            })();
        return a[0] !== i ? (e = () => {
            let e = () => {
                n(window.scrollY > 200 + i)
            };
            return window.addEventListener("scroll", e), e(), () => {
                window.removeEventListener("scroll", e)
            }
        }, t = [i], a[0] = i, a[1] = e, a[2] = t) : (e = a[1], t = a[2]), (0, o.useEffect)(e, t), a[3] !== i || a[4] !== l ? (r = {
            showHeader: l,
            bannerHeight: i
        }, a[3] = i, a[4] = l, a[5] = r) : r = a[5], r
    };
    var r2 = e.i(379224),
        r3 = e.i(678274),
        r5 = e.i(377960),
        r4 = e.i(534532),
        r6 = e.i(169010);
    let r7 = e => {
        let t, r, l = (0, s.c)(3),
            {
                onClose: n
            } = e;
        return l[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)(r5.IconXmarkOutline18, {}), l[0] = t) : t = l[0], l[1] !== n ? (r = (0, a.jsx)(r6.Tooltip, {
            content: "Close",
            showArrow: !1,
            sideOffset: 4,
            children: (0, a.jsx)(v.Button, {
                variant: "ghost",
                size: "iconSm",
                className: "rounded-full",
                onClick: n,
                children: t
            })
        }), l[1] = n, l[2] = r) : r = l[2], r
    };
    var r8 = e.i(695787),
        r9 = e.i(799275),
        ae = e.i(90026),
        at = e.i(816332),
        ar = e.i(867487),
        aa = e.i(913909),
        as = e.i(158789),
        al = e.i(237493),
        an = e.i(565575),
        ao = e.i(721747);

    function ai(e) {
        let t, r, l, n = (0, s.c)(14),
            {
                label: o,
                getShareLink: i,
                marketId: c,
                clickedItem: u,
                setClickedItem: d,
                itemId: m
            } = e,
            g = (0, O.useTranslations)(),
            [, p] = (0, ao.useCopyToClipboard)();
        n[0] !== p || n[1] !== i || n[2] !== m || n[3] !== c || n[4] !== d ? (t = async () => {
            let e = await i();
            await p(e) && (d(m), (0, ar.trackEvent)("market_shared", {
                market_id: c,
                channel: "link_copy"
            }), window.gtag && window.gtag("event", "share", {
                content_type: "market",
                item_id: c,
                method: "clipboard",
                platform: "web"
            }))
        }, n[0] = p, n[1] = i, n[2] = m, n[3] = c, n[4] = d, n[5] = t) : t = n[5];
        let f = t;
        return n[6] !== u || n[7] !== m || n[8] !== o || n[9] !== g ? (r = u === m ? g("shareCards.copied") : o, n[6] = u, n[7] = m, n[8] = o, n[9] = g, n[10] = r) : r = n[10], n[11] !== f || n[12] !== r ? (l = (0, a.jsx)(as.DropdownMenuItem, {
            onSelect: ac,
            onClick: f,
            children: r
        }), n[11] = f, n[12] = r, n[13] = l) : l = n[13], l
    }

    function ac(e) {
        return e.preventDefault()
    }
    let au = e => {
            let t, r, l, n, i, c, u, d, m, g, f, h, x, b, y, S, k, w, j, C, N, T, M, _, I, E, D, P = (0, s.c)(84),
                {
                    iconClassName: A
                } = e;
            P[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event", "markets", "lowChanceMarkets", "resolvedMarkets"], P[0] = t) : t = P[0];
            let {
                event: R,
                markets: L,
                lowChanceMarkets: $,
                resolvedMarkets: F
            } = (0, eC.useEventContext)(t), B = (0, O.useTranslations)(), q = (0, an.useCreateShareLink)(), [U, z] = o.default.useState(), [W, H] = o.default.useState(!1), V = o.default.useRef(void 0);
            if (P[1] !== U ? (r = () => (U && (V.current = setTimeout(() => {
                    z(void 0)
                }, 2e3)), () => {
                    V.current && clearTimeout(V.current)
                }), l = [U], P[1] = U, P[2] = r, P[3] = l) : (r = P[2], l = P[3]), o.default.useEffect(r, l), P[4] !== U || P[5] !== q || P[6] !== R.slug || P[7] !== A || P[8] !== $ || P[9] !== L || P[10] !== W || P[11] !== F || P[12] !== B) {
                let e, t, r, s, l, o, _, I = L.slice(0, 6);
                P[33] !== $ || P[34] !== F ? (e = [...$, ...F], P[33] = $, P[34] = F, P[35] = e) : e = P[35];
                let E = e,
                    D = L.slice(6),
                    O = D.length > 0 || E.length > 0;
                P[36] !== U ? (t = {
                    clickedItem: U,
                    setClickedItem: z
                }, P[36] = U, P[37] = t) : t = P[37];
                let V = t,
                    Y = `${G.CURRENT_ORIGIN}/event/${R.slug}`;
                P[38] !== q || P[39] !== Y ? (r = () => q(Y), P[38] = q, P[39] = Y, P[40] = r) : r = P[40];
                let K = r;
                u = r6.Tooltip, P[41] === Symbol.for("react.memo_cache_sentinel") ? (f = (0, a.jsx)(r9.ShareTooltipContent, {}), P[41] = f) : f = P[41], h = !1, x = "top", b = 50, y = 4, S = !0, k = !W && void 0, c = as.DropdownMenu, d = W, m = H, P[42] !== A ? (s = (0, p.cn)("rounded-full", A), P[42] = A, P[43] = s) : s = P[43], P[44] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(al.IconLinkOutline18, {}), P[44] = l) : l = P[44], P[45] !== s ? (g = (0, a.jsx)(as.DropdownMenuTrigger, {
                    asChild: !0,
                    children: (0, a.jsx)(v.Button, {
                        variant: "ghost",
                        size: "icon",
                        className: s,
                        children: l
                    })
                }), P[45] = s, P[46] = g) : g = P[46], i = as.DropdownMenuContent, T = "start", M = "w-44 max-h-60", n = as.DropdownMenuGroup, P[47] !== B ? (o = B("shareCards.copyLink"), P[47] = B, P[48] = o) : o = P[48], P[49] !== K || P[50] !== V || P[51] !== o ? (w = (0, a.jsx)(ai, {
                    label: o,
                    getShareLink: K,
                    marketId: "event",
                    itemId: "event",
                    ...V
                }), P[49] = K, P[50] = V, P[51] = o, P[52] = w) : w = P[52], j = I.length > 0 && (0, a.jsx)(as.DropdownMenuSeparator, {}), P[53] !== q || P[54] !== R.slug || P[55] !== V ? (_ = e => (0, a.jsx)(ai, {
                    label: e.groupItemTitle ? ? e.question,
                    getShareLink: () => q(`${G.CURRENT_ORIGIN}/event/${R.slug}/${e.slug}`),
                    marketId: e.conditionId,
                    itemId: e.slug,
                    ...V
                }, e.id), P[53] = q, P[54] = R.slug, P[55] = V, P[56] = _) : _ = P[56], C = I.map(_), N = O && (0, a.jsxs)(a.Fragment, {
                    children: [(0, a.jsx)(as.DropdownMenuSeparator, {}), D.map(e => (0, a.jsx)(ai, {
                        label: e.groupItemTitle ? ? e.question,
                        getShareLink: () => q(`${G.CURRENT_ORIGIN}/event/${R.slug}/${e.slug}`),
                        marketId: e.conditionId,
                        itemId: e.slug,
                        ...V
                    }, e.id)), E.map(e => (0, a.jsx)(ai, {
                        label: e.groupItemTitle ? ? e.question,
                        getShareLink: () => q(`${G.CURRENT_ORIGIN}/event/${R.slug}/${e.slug}`),
                        marketId: e.conditionId,
                        itemId: e.slug,
                        ...V
                    }, e.id))]
                }), P[4] = U, P[5] = q, P[6] = R.slug, P[7] = A, P[8] = $, P[9] = L, P[10] = W, P[11] = F, P[12] = B, P[13] = n, P[14] = i, P[15] = c, P[16] = u, P[17] = d, P[18] = m, P[19] = g, P[20] = f, P[21] = h, P[22] = x, P[23] = b, P[24] = y, P[25] = S, P[26] = k, P[27] = w, P[28] = j, P[29] = C, P[30] = N, P[31] = T, P[32] = M
            } else n = P[13], i = P[14], c = P[15], u = P[16], d = P[17], m = P[18], g = P[19], f = P[20], h = P[21], x = P[22], b = P[23], y = P[24], S = P[25], k = P[26], w = P[27], j = P[28], C = P[29], N = P[30], T = P[31], M = P[32];
            return P[57] !== n || P[58] !== w || P[59] !== j || P[60] !== C || P[61] !== N ? (_ = (0, a.jsxs)(n, {
                children: [w, j, C, N]
            }), P[57] = n, P[58] = w, P[59] = j, P[60] = C, P[61] = N, P[62] = _) : _ = P[62], P[63] !== i || P[64] !== _ || P[65] !== T || P[66] !== M ? (I = (0, a.jsx)(i, {
                align: T,
                className: M,
                children: _
            }), P[63] = i, P[64] = _, P[65] = T, P[66] = M, P[67] = I) : I = P[67], P[68] !== c || P[69] !== d || P[70] !== m || P[71] !== g || P[72] !== I ? (E = (0, a.jsxs)(c, {
                open: d,
                onOpenChange: m,
                children: [g, I]
            }), P[68] = c, P[69] = d, P[70] = m, P[71] = g, P[72] = I, P[73] = E) : E = P[73], P[74] !== u || P[75] !== f || P[76] !== h || P[77] !== x || P[78] !== b || P[79] !== y || P[80] !== S || P[81] !== k || P[82] !== E ? (D = (0, a.jsx)(u, {
                content: f,
                showArrow: h,
                side: x,
                delayDuration: b,
                sideOffset: y,
                triggerAsChild: S,
                open: k,
                children: E
            }), P[74] = u, P[75] = f, P[76] = h, P[77] = x, P[78] = b, P[79] = y, P[80] = S, P[81] = k, P[82] = E, P[83] = D) : D = P[83], D
        },
        ad = ({
            isMobile: e,
            isGMPEvent: t,
            activeMarket: r,
            event: a,
            coerceToMarket: s
        }) => e && (!t || s) ? `${G.CURRENT_ORIGIN}/event/${a.slug}/${r.slug}` : `${G.CURRENT_ORIGIN}/event/${a.slug}`,
        am = e => {
            let t, r, l, n, o, i, c, d, m = (0, s.c)(27),
                {
                    activeMarket: g,
                    event: p,
                    coerceToMarket: f,
                    onClose: h,
                    hideBookmarkAndShare: x
                } = e,
                v = p.markets.length > 1;
            m[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["authenticated"], m[0] = t) : t = m[0];
            let {
                authenticated: b
            } = (0, L.useAccountContext)(t), {
                toggleFavoriteEvent: y,
                favoriteEvents: S
            } = (0, ae.default)();
            m[1] !== p.id ? (r = p.id.toString(), m[1] = p.id, m[2] = r) : r = m[2];
            let k = r,
                w = b && !!S && void 0 !== S[k];
            m[3] !== p.seriesSlug ? (l = p.seriesSlug && (0, u.isSportSupported)(p.seriesSlug), m[3] = p.seriesSlug, m[4] = l) : l = m[4];
            let j = !!l;
            m[5] !== g || m[6] !== f || m[7] !== p || m[8] !== v ? (n = ad({
                isMobile: !0,
                isGMPEvent: v,
                activeMarket: g,
                event: p,
                coerceToMarket: f
            }), m[5] = g, m[6] = f, m[7] = p, m[8] = v, m[9] = n) : n = m[9];
            let C = n;
            m[10] !== g.question || m[11] !== C ? (o = {
                title: g.question,
                url: C
            }, m[10] = g.question, m[11] = C, m[12] = o) : o = m[12];
            let {
                share: N
            } = (0, at.default)(o);
            return m[13] !== k || m[14] !== x || m[15] !== w || m[16] !== v || m[17] !== j || m[18] !== N || m[19] !== y ? (i = !x && (0, a.jsxs)(a.Fragment, {
                children: [v ? (0, a.jsx)(au, {}) : (0, a.jsx)("button", {
                    type: "button",
                    onClick: N,
                    className: "px-0.5",
                    "aria-label": "Share",
                    children: (0, a.jsx)(r4.IconUpload4Outline18, {
                        className: "w-[18px] h-[18px]"
                    })
                }), (0, a.jsx)("button", {
                    type: "button",
                    onClick: () => {
                        j && !w && (0, ar.trackEvent)("event_bookmarked", {
                            event_id: k
                        }), y(k)
                    },
                    className: "px-0.5",
                    "aria-label": w ? "Remove from favorites" : "Add to favorites",
                    children: (0, a.jsx)(r3.Bookmark, {
                        active: w
                    })
                })]
            }), m[13] = k, m[14] = x, m[15] = w, m[16] = v, m[17] = j, m[18] = N, m[19] = y, m[20] = i) : i = m[20], m[21] !== f || m[22] !== h ? (c = f && (0, a.jsx)("button", {
                type: "button",
                onClick: h,
                className: "px-0.5 text-text-secondary",
                "aria-label": "Close",
                children: (0, a.jsx)(r5.IconXmarkOutline18, {
                    className: "w-[18px] h-[18px]"
                })
            }), m[21] = f, m[22] = h, m[23] = c) : c = m[23], m[24] !== i || m[25] !== c ? (d = (0, a.jsxs)("div", {
                className: "flex gap-1 items-center w-fit",
                children: [i, c]
            }), m[24] = i, m[25] = c, m[26] = d) : d = m[26], d
        },
        ag = e => {
            let t, r, l, n, o, i, c, d = (0, s.c)(31),
                {
                    activeMarket: m,
                    event: g,
                    coerceToMarket: p,
                    isMobile: f,
                    onClose: h,
                    hideBookmarkAndShare: x
                } = e,
                v = g.markets.length > 1;
            if (f) {
                let e;
                return d[0] !== m || d[1] !== p || d[2] !== g || d[3] !== x || d[4] !== h ? (e = (0, a.jsx)(am, {
                    activeMarket: m,
                    event: g,
                    coerceToMarket: p,
                    onClose: h,
                    hideBookmarkAndShare: x
                }), d[0] = m, d[1] = p, d[2] = g, d[3] = x, d[4] = h, d[5] = e) : e = d[5], e
            }
            d[6] !== m || d[7] !== g ? (t = (0, a.jsx)(aa.EmbedMarketResponsiveDialog, {
                event: g,
                market: m
            }), d[6] = m, d[7] = g, d[8] = t) : t = d[8], d[9] !== m || d[10] !== p || d[11] !== g || d[12] !== v || d[13] !== f ? (r = v ? (0, a.jsx)(au, {}) : (0, a.jsx)(r9.default, {
                params: {
                    title: m.question,
                    url: ad({
                        isMobile: f,
                        isGMPEvent: v,
                        activeMarket: m,
                        event: g,
                        coerceToMarket: p
                    })
                }
            }), d[9] = m, d[10] = p, d[11] = g, d[12] = v, d[13] = f, d[14] = r) : r = d[14], d[15] !== g.id ? (l = g.id.toString(), d[15] = g.id, d[16] = l) : l = d[16];
            let b = g.slug;
            d[17] !== g.seriesSlug ? (n = g.seriesSlug && (0, u.isSportSupported)(g.seriesSlug), d[17] = g.seriesSlug, d[18] = n) : n = d[18];
            let y = !!n;
            return d[19] !== g.slug || d[20] !== l || d[21] !== y ? (o = (0, a.jsx)(r8.default, {
                eventId: l,
                eventSlug: b,
                isSportsEvent: y
            }), d[19] = g.slug, d[20] = l, d[21] = y, d[22] = o) : o = d[22], d[23] !== p || d[24] !== h ? (i = p && (0, a.jsx)(r7, {
                onClose: h
            }), d[23] = p, d[24] = h, d[25] = i) : i = d[25], d[26] !== t || d[27] !== r || d[28] !== o || d[29] !== i ? (c = (0, a.jsxs)("div", {
                className: "flex gap-1 items-center",
                children: [t, r, o, i]
            }), d[26] = t, d[27] = r, d[28] = o, d[29] = i, d[30] = c) : c = d[30], c
        };
    var ap = e.i(846396),
        af = e.i(444298),
        ah = e.i(841241),
        ax = e.i(403604);
    let av = () => {
        let e, t, r, l, n = (0, s.c)(22),
            {
                locale: o
            } = (0, i.useRouter)();
        n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["categoryBreadcrumb", "event"], n[0] = e) : e = n[0];
        let {
            categoryBreadcrumb: c,
            event: u
        } = (0, eC.useEventContext)(e), d = u ? .eventCreators ? .[0], m = o && "en" !== o ? `/${o}` : "";
        e: {
            let e, r, a, s, l, o;
            if (!c) {
                let e;
                n[1] === Symbol.for("react.memo_cache_sentinel") ? (e = [], n[1] = e) : e = n[1], t = e;
                break e
            }
            n[2] !== c.categoryLabel ? (e = (0, af.capitalizeWords)(c.categoryLabel), n[2] = c.categoryLabel, n[3] = e) : e = n[3],
            n[4] !== c.category ? (r = (0, ax.getCategoryUrl)(c.category), n[4] = c.category, n[5] = r) : r = n[5];
            let i = `${m}${r}`;n[6] !== e || n[7] !== i ? (a = {
                label: e,
                href: i
            }, n[6] = e, n[7] = i, n[8] = a) : a = n[8],
            n[9] !== c.subcategoryLabel ? (s = (0, af.capitalizeWords)(c.subcategoryLabel), n[9] = c.subcategoryLabel, n[10] = s) : s = n[10];
            let u = `${m}/predictions/${c.subcategory}`;n[11] !== s || n[12] !== u ? (l = {
                label: s,
                href: u
            }, n[11] = s, n[12] = u, n[13] = l) : l = n[13],
            n[14] !== a || n[15] !== l ? (o = [a, l], n[14] = a, n[15] = l, n[16] = o) : o = n[16],
            t = o
        }
        let g = t;
        return c ? (n[17] !== d ? (r = d ? (0, a.jsx)(ah.CreatorChip, {
            creator: d
        }) : void 0, n[17] = d, n[18] = r) : r = n[18], n[19] !== g || n[20] !== r ? (l = (0, a.jsx)(ap.Breadcrumbs, {
            items: g,
            suffix: r
        }), n[19] = g, n[20] = r, n[21] = l) : l = n[21], l) : null
    };
    var ab = e.i(479399);

    function ay() {
        let e, t, r, a, l = (0, s.c)(5),
            n = (0, o.useRef)(null),
            [i, c] = (0, o.useState)(!1);
        l[0] === Symbol.for("react.memo_cache_sentinel") ? (e = () => {
            let e = n.current;
            if (!e) return;
            let t = parseFloat(getComputedStyle(e).lineHeight) || 24;
            c(e.scrollHeight > 1.5 * t)
        }, l[0] = e) : e = l[0];
        let u = e;
        return l[1] === Symbol.for("react.memo_cache_sentinel") ? (t = () => (u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u)), r = [u], l[1] = t, l[2] = r) : (t = l[1], r = l[2]), (0, o.useLayoutEffect)(t, r), l[3] !== i ? (a = {
            ref: n,
            isMultiLine: i
        }, l[3] = i, l[4] = a) : a = l[4], a
    }
    var aS = e.i(162923),
        ak = e.i(255760);
    let aw = (0, ab.cubicBezier)(.165, .84, .44, 1);

    function aj(e, t) {
        if (!e || !(0, e0.isUpDownSlug)(e)) return null;
        let r = e.toLowerCase();
        return r.includes("-5m-") ? t("filters.frequencyOptions.fiveMinutes") : r.includes("-15m-") ? t("filters.frequencyOptions.fifteenMinutes") : r.includes("-4h-") && !r.includes("-multistrike-") ? t("filters.frequencyOptions.fourHour") : aS.HOURLY_UP_OR_DOWN_PREFIXES.some(e => r.startsWith(e)) && /-[0-9]+(am|pm)-et$/.test(r) ? t("filters.frequencyOptions.hourly") : null
    }
    let aC = (0, o.memo)(e => {
        let {
            coerceToMarket: t,
            activeMarket: r,
            event: s,
            imageScale: l,
            borderRadius: n,
            size: i,
            titleClassName: c,
            isPriceMarket: u = !1,
            variant: d
        } = e, m = (0, o.useMemo)(() => t ? r.image : s.image, [t, r.image, s.image]), {
            title: g,
            subtitle: f
        } = function({
            coerceToMarket: e,
            activeMarket: t,
            event: r,
            isPriceMarket: a,
            isMobile: s
        }) {
            let l = (0, O.useTranslations)(),
                n = (0, ee.useLocale)(),
                i = (0, tQ.getDateFnsLocale)(n);
            return (0, o.useMemo)(() => {
                let o = e ? t.groupItemTitle ? ? t.question : r.title;
                if (!a) {
                    let e = aj(r.slug, l);
                    if (e) {
                        let t = o.replace(/\s*-\s*\d+\s*(minute|min|hour)s?\s*$/i, "").trim();
                        return {
                            title: `${t} - ${e}`,
                            subtitle: void 0
                        }
                    }
                    return {
                        title: o,
                        subtitle: void 0
                    }
                }
                let [c, u] = o.split("-"), d = u, m = r.slug.includes("-5m"), g = r.slug.includes("-15m");
                try {
                    var p;
                    let {
                        timezone: e
                    } = (0, aS.getSeriesSettings)(r.slug), a = /-[0-9]+(am|pm)-et$/.test(r.slug);
                    if (((p = r.slug).startsWith("ethereum-price") || p.startsWith("bitcoin-price")) && /-price-.*-5pm-et/.test(p)) {
                        let e = r.slug.match(/-([a-z]+)-(\d+)-5pm-et$/);
                        if (e) {
                            let [, t, r] = e, a = t.charAt(0).toUpperCase() + t.slice(1);
                            d = `${a} ${r}, 5PM ET`
                        }
                    } else if (a || g || m) {
                        let a, l = t.endDate ? new Date(t.endDate) : t.endDateIso ? (0, rQ.parse)(t.endDateIso, "yyyy-MM-dd", new Date) : void 0;
                        if (t.eventStartTime ? a = new Date(t.eventStartTime) : r.eventStartTime && (a = new Date(r.eventStartTime)), !a && l && (a = new Date(l.getTime() - 36e5)), a && l && !Number.isNaN(a.getTime()) && !Number.isNaN(l.getTime())) {
                            let t = new tM.TZDate(a, e),
                                r = new tM.TZDate(l, e),
                                o = (() => {
                                    if (!g) return t;
                                    let r = new tM.TZDate(t.getTime(), e),
                                        a = r.getMinutes(),
                                        s = m ? 5 : 15,
                                        l = Math.floor(a / s) * s;
                                    return r.setMinutes(l, 0, 0), r
                                })(),
                                c = g || m ? new tM.TZDate(o.getTime() + (m ? 5 : 15) * 6e4, e) : r,
                                u = (0, tK.format)(o, "yyyy-MM-dd"),
                                p = (0, tK.format)(c, "yyyy-MM-dd"),
                                f = !n || "en" === n,
                                h = (0, tK.format)(o, "p", {
                                    locale: i
                                }),
                                x = (0, tK.format)(c, "p", {
                                    locale: i
                                }),
                                v = s && (m || g) ? "MMM d" : "MMMM d";
                            if (u !== p) {
                                let e = (0, tK.format)(o, v, {
                                        locale: i
                                    }),
                                    t = (0, tK.format)(c, v, {
                                        locale: i
                                    });
                                d = `${e}, ${h} ET - ${t}, ${x} ET`
                            } else {
                                let e = (0, tK.format)(o, v, {
                                    locale: i
                                });
                                if (f) {
                                    let t = o.getMinutes(),
                                        r = c.getMinutes(),
                                        a = 0 === t ? (0, tK.format)(o, "h") : (0, tK.format)(o, "h:mm"),
                                        s = 0 === r ? (0, tK.format)(c, "h") : (0, tK.format)(c, "h:mm"),
                                        l = (0, tK.format)(o, "a"),
                                        n = (0, tK.format)(c, "a");
                                    d = l === n ? `${e}, ${a}-${s}${n} ET` : `${e}, ${h}-${x} ET`
                                } else d = `${e}, ${h}-${x} ET`
                            }
                        }
                    }
                } catch {}
                let f = (0, e0.isUpDownSlug)(r.slug) ? r.series ? .[0] ? .title : void 0;
                if (f) return {
                    title: f,
                    subtitle: d
                };
                let h = aj(r.slug, l),
                    x = (c || "").trim();
                if (s && (m || g) && h) {
                    let [e] = r.slug.toLowerCase().split("-"), {
                        name: t,
                        abbreviation: a
                    } = (0, ak.getAssetNames)(e);
                    t && a && (x = x.replace(RegExp(t, "gi"), a.toUpperCase()))
                }
                return {
                    title: h ? `${x} - ${h}` : x,
                    subtitle: d
                }
            }, [e, s, t.groupItemTitle, t.question, r.title, a, t.eventStartTime, t.endDate, t.endDateIso, r.slug, i, n, l])
        }({
            coerceToMarket: t,
            activeMarket: r,
            event: s,
            isPriceMarket: u,
            isMobile: "mobile" === d
        });
        if ("mobile" === d) {
            let {
                textScale: t,
                titleRef: r,
                isScrolled: s,
                isMultiLine: o
            } = e;
            return (0, a.jsxs)("div", {
                className: (0, p.cn)("flex gap-3", !s && o ? "items-start" : "items-center"),
                children: [(0, a.jsx)("div", {
                    style: {
                        flexShrink: 0
                    },
                    children: (0, a.jsx)(rZ.motion.div, {
                        style: {
                            scale: l,
                            borderRadius: n,
                            overflow: "hidden",
                            transformOrigin: "left top"
                        },
                        children: (0, a.jsx)(ez.MarketImage, {
                            image: m,
                            marketName: g,
                            size: i,
                            containerClassName: "rounded-sm overflow-hidden relative !h-10 !w-10 !min-w-10 min-[480px]:!h-16 min-[480px]:!w-16 min-[480px]:!min-w-16"
                        })
                    })
                }), (0, a.jsxs)(rZ.motion.div, {
                    className: (0, p.cn)("flex-1 min-w-0", !s && "-mt-1"),
                    style: {
                        scale: t,
                        transformOrigin: "left center"
                    },
                    children: [!u && (0, a.jsxs)("div", {
                        className: "flex flex-col items-start gap-1",
                        children: [(0, a.jsx)("div", {
                            className: "overflow-hidden transition-[max-height,opacity] duration-200 ease-out",
                            style: {
                                maxHeight: 24 * !s,
                                opacity: +!s
                            },
                            children: (0, a.jsx)(av, {})
                        }), (0, a.jsx)("h1", {
                            ref: r,
                            className: c,
                            children: g
                        })]
                    }), u && (0, a.jsxs)("div", {
                        className: "flex flex-col text-left",
                        children: [(0, a.jsx)("h1", {
                            ref: r,
                            className: c,
                            children: g
                        }), (0, a.jsx)("p", {
                            className: "text-text-secondary mt-1 font-medium",
                            children: f
                        })]
                    })]
                })]
            })
        }
        let {
            isScrolled: h,
            titleRef: x
        } = e;
        return (0, a.jsxs)(rZ.motion.div, {
            style: {
                scale: l,
                transformOrigin: "left"
            },
            className: "flex gap-4 w-full items-center",
            children: [(0, a.jsx)(rZ.motion.div, {
                style: {
                    borderRadius: n,
                    overflow: "hidden",
                    flexShrink: 0
                },
                children: (0, a.jsx)(ez.MarketImage, {
                    image: m,
                    marketName: g,
                    size: i,
                    containerClassName: "rounded-sm overflow-hidden relative"
                })
            }), !u && (0, a.jsxs)("div", {
                className: "flex flex-col items-start gap-1 min-w-0 flex-1",
                children: [(0, a.jsx)("div", {
                    className: "overflow-hidden transition-[max-height,opacity] duration-200 ease-out",
                    style: {
                        maxHeight: 24 * !h,
                        opacity: +!h
                    },
                    children: (0, a.jsx)(av, {})
                }), (0, a.jsx)("h1", {
                    ref: x,
                    className: c,
                    children: g
                })]
            }), u && (0, a.jsxs)("div", {
                className: "flex flex-col min-w-0 flex-1",
                children: [(0, a.jsx)("h1", {
                    ref: x,
                    className: c,
                    children: g
                }), (0, a.jsx)("p", {
                    className: "text-text-secondary mt-1 font-medium",
                    children: f
                })]
            })]
        }, "image")
    });
    aC.displayName = "EventTitleImage";
    let aN = ({
            coerceToMarket: e,
            onClose: t,
            activeMarket: r,
            event: s
        }) => {
            let {
                bannerHeight: l
            } = r1(), {
                scrollY: n
            } = (0, rX.useScroll)(), {
                eventSettings: i
            } = (0, eC.useEventContext)(["eventSettings"]), [c, u] = (0, o.useState)(!1), {
                ref: d,
                isMultiLine: m
            } = ay();
            (0, rJ.useMotionValueEvent)(n, "change", e => {
                u(e > l)
            }), (0, o.useEffect)(() => {
                u(n.get() > l)
            }, [n, l]);
            let g = (0, r0.useTransform)(n, [l, l + 120], [1, .625], {
                    ease: aw
                }),
                f = (0, r0.useTransform)(n, [l, l + 120], [4, 6]),
                h = (0, r0.useTransform)(n, [l, l + 120], [0, 1]),
                {
                    shouldShowDetailedTime: x
                } = (0, o.useMemo)(() => i.seriesSettings.shouldShowLockedPrice && i.priceMarketSettings.priceMarketsUiEnabled ? {
                    shouldShowDetailedTime: !1
                } : {
                    shouldShowDetailedTime: i.seriesSettings.shouldShowDetailedTime
                }, [i.priceMarketSettings, i.seriesSettings]),
                [v] = (0, o.useState)(() => (0, eo.getServerNow)()),
                b = (0, o.useMemo)(() => {
                    if (!x || !r.endDate && !r.endDateIso) return !1;
                    try {
                        let e = r.endDate ? new Date(r.endDate) : (0, rQ.parse)(r.endDateIso, "yyyy-MM-dd", new Date);
                        if (Number.isNaN(e.getTime())) return !1;
                        let t = e.getTime() - v;
                        if (t < 0) return !1;
                        return 30 > Math.floor(t / 864e5)
                    } catch {
                        return !1
                    }
                }, [x, r.endDate, r.endDateIso, v]);
            return (0, a.jsxs)("div", {
                className: "w-full flex flex-col justify-center sticky top-[116px] py-1 z-20 bg-background mb-2",
                children: [(0, a.jsx)("div", {
                    className: "absolute pointer-events-none h-[72px] w-3 bg-background left-full top-0"
                }), (0, a.jsx)("div", {
                    className: "absolute pointer-events-none h-[72px] w-3 bg-background right-full top-0"
                }), (0, a.jsx)(rZ.motion.div, {
                    style: {
                        opacity: h
                    },
                    className: "w-full h-px absolute bottom-0 left-0 bg-border"
                }), (0, a.jsxs)(rZ.motion.div, {
                    layout: "position",
                    initial: !1,
                    className: (0, p.cn)("w-full flex justify-between gap-4 relative", !c && m ? "items-start" : "items-center"),
                    transition: {
                        duration: .3,
                        ease: [.4, 0, .2, 1]
                    },
                    children: [(0, a.jsx)(aC, {
                        variant: "desktop",
                        coerceToMarket: e,
                        activeMarket: r,
                        event: s,
                        imageScale: g,
                        borderRadius: f,
                        size: 64,
                        titleClassName: "!font-semibold text-heading-2xl text-pretty",
                        isPriceMarket: i.priceMarketSettings.priceMarketsUiEnabled,
                        isScrolled: c,
                        titleRef: d,
                        isMultiLine: m
                    }), (0, a.jsx)(rZ.motion.div, {
                        layout: "position",
                        initial: !1,
                        className: (0, p.cn)("flex gap-3 ml-4", !c && m ? "items-start" : "items-center"),
                        transition: {
                            duration: .3,
                            ease: [.4, 0, .2, 1]
                        },
                        children: b ? (0, a.jsx)(r2.MarketCountdownTimer, {
                            endDate: r.endDate,
                            endDateIso: r.endDateIso,
                            slug: s.slug,
                            closed: r.closed ? ? !1
                        }) : (0, a.jsx)("div", {
                            className: "overflow-hidden",
                            children: (0, a.jsx)(ag, {
                                activeMarket: r,
                                event: s,
                                coerceToMarket: e,
                                isMobile: !1,
                                onClose: t
                            })
                        })
                    })]
                })]
            })
        },
        aT = ({
            coerceToMarket: e,
            onClose: t,
            activeMarket: r,
            event: s,
            isPWA: l
        }) => {
            let {
                bannerHeight: n
            } = r1(), {
                scrollY: i
            } = (0, rX.useScroll)(), {
                eventSettings: c
            } = (0, eC.useEventContext)(["eventSettings"]), {
                ref: u,
                isMultiLine: d
            } = ay(), [m, g] = (0, o.useState)(!1);
            (0, rJ.useMotionValueEvent)(i, "change", e => {
                g(e > n)
            }), (0, o.useEffect)(() => {
                g(i.get() > n)
            }, [i, n]);
            let {
                shouldShowDetailedTime: f
            } = (0, o.useMemo)(() => ({
                shouldShowDetailedTime: c.seriesSettings.shouldShowDetailedTime
            }), [c.seriesSettings]), [h] = (0, o.useState)(() => (0, eo.getServerNow)()), x = (0, o.useMemo)(() => {
                if (!f || !r.endDate && !r.endDateIso) return !1;
                try {
                    let e = r.endDate ? new Date(r.endDate) : (0, rQ.parse)(r.endDateIso, "yyyy-MM-dd", new Date);
                    if (Number.isNaN(e.getTime())) return !1;
                    let t = e.getTime() - h;
                    if (t < 0) return !1;
                    return 30 > Math.floor(t / 864e5)
                } catch {
                    return !1
                }
            }, [f, r.endDate, r.endDateIso, h]), v = (0, r0.useTransform)(i, [0, 1], [1, 1]), b = (0, r0.useTransform)(i, [n, n + 120], [1, l ? 1 : .75], {
                ease: aw
            }), y = (0, r0.useTransform)(i, [n, n + 120], [4, 6]), S = (0, r0.useTransform)(i, [n, n + 120], [0, 1]);
            return (0, a.jsxs)("div", {
                className: (0, p.cn)("w-full flex flex-col z-20 bg-background mb-2 pt-2 pb-3", !l && "sticky top-(--navbar-height)"),
                children: [(0, a.jsx)(rZ.motion.div, {
                    style: {
                        opacity: S
                    },
                    className: "absolute pointer-events-none h-full w-4 bg-background left-full top-0 border-b"
                }), (0, a.jsx)(rZ.motion.div, {
                    style: {
                        opacity: S
                    },
                    className: "absolute pointer-events-none h-full w-4 bg-background right-full top-0 border-b"
                }), (0, a.jsx)(rZ.motion.div, {
                    style: {
                        opacity: S
                    },
                    className: "w-full h-px absolute bottom-0 left-0 bg-border"
                }), (0, a.jsxs)(rZ.motion.div, {
                    layout: !0,
                    initial: !1,
                    className: (0, p.cn)("flex justify-between w-full", !m && d ? "items-start" : "items-center"),
                    transition: {
                        duration: .3,
                        ease: [.4, 0, .2, 1]
                    },
                    children: [(0, a.jsx)(aC, {
                        variant: "mobile",
                        coerceToMarket: e,
                        activeMarket: r,
                        event: s,
                        imageScale: v,
                        textScale: b,
                        borderRadius: y,
                        size: 64,
                        titleClassName: "!font-semibold text-heading-xl !my-0 w-full",
                        isPriceMarket: c.priceMarketSettings.priceMarketsUiEnabled,
                        titleRef: u,
                        isMultiLine: d,
                        isScrolled: m
                    }), (0, a.jsxs)(rZ.motion.div, {
                        layout: !0,
                        initial: !1,
                        className: (0, p.cn)("flex gap-1 shrink-0 ml-3", !m && d ? "items-start" : "items-center"),
                        transition: {
                            duration: .3,
                            ease: [.4, 0, .2, 1]
                        },
                        children: [x && (0, a.jsx)(r2.MarketCountdownTimer, {
                            endDate: r.endDate,
                            endDateIso: r.endDateIso,
                            slug: s.slug,
                            closed: r.closed ? ? !1
                        }), (0, a.jsx)(ag, {
                            activeMarket: r,
                            event: s,
                            coerceToMarket: e,
                            isMobile: !0,
                            onClose: t,
                            hideBookmarkAndShare: x
                        })]
                    })]
                })]
            })
        },
        aM = e => {
            let t, r, l, n = (0, s.c)(9),
                {
                    coerceToMarket: i,
                    isMobile: c,
                    onClose: u
                } = e,
                d = void 0 !== i && i;
            n[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], n[0] = t) : t = n[0];
            let {
                event: m
            } = (0, eC.useEventContext)(t);
            n[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["activeMarket"], n[1] = r) : r = n[1];
            let {
                activeMarket: g
            } = (0, f.useEventActiveMarketContext)(r), p = function() {
                let [e, t] = o.useState(!1);
                return o.useEffect(() => {
                    t(function() {
                        try {
                            let e = window.matchMedia("(display-mode: standalone)").matches,
                                t = window.navigator ? .standalone === !0;
                            return e || t
                        } catch {
                            return !1
                        }
                    }())
                }, []), e
            }();
            return n[2] !== g || n[3] !== d || n[4] !== m || n[5] !== c || n[6] !== p || n[7] !== u ? (l = c ? (0, a.jsx)(aT, {
                coerceToMarket: d,
                onClose: u,
                activeMarket: g,
                event: m,
                isPWA: p
            }) : (0, a.jsx)(aN, {
                coerceToMarket: d,
                onClose: u,
                activeMarket: g,
                event: m
            }), n[2] = g, n[3] = d, n[4] = m, n[5] = c, n[6] = p, n[7] = u, n[8] = l) : l = n[8], l
        },
        a_ = () => {
            let e, t = (0, s.c)(1);
            return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)("div", {
                className: "hidden lg:block w-0.5 bg-border rounded-full shrink-0 self-stretch my-2"
            }), t[0] = e) : e = t[0], e
        },
        aI = e => {
            let t, r, l = (0, s.c)(4),
                {
                    items: n
                } = e;
            return l[0] !== n ? (t = n.map(aE), l[0] = n, l[1] = t) : t = l[1], l[2] !== t ? (r = (0, a.jsx)("div", {
                className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:gap-4",
                children: t
            }), l[2] = t, l[3] = r) : r = l[3], r
        };

    function aE(e, t) {
        return (0, a.jsxs)(o.Fragment, {
            children: [t > 0 && (0, a.jsx)(a_, {}), e.component]
        }, t)
    }
    var aD = e.i(357325),
        aP = e.i(748960),
        aA = e.i(229629);
    let aO = e => {
        let t, r, l, n, o = (0, s.c)(8),
            {
                navigatedFrom: c
            } = e,
            u = (0, i.useRouter)();
        o[0] !== u ? (t = () => u.back(), o[0] = u, o[1] = t) : t = o[1], o[2] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(aA.IconArrowLeftOutline12, {
            className: "group-hover:-translate-x-0.5 transition ease-out"
        }), o[2] = r) : r = o[2];
        let d = "Earnings Calendar" === c ? "Earnings Calendar" : `Back to ${c}`;
        return o[3] !== d ? (l = (0, a.jsx)("span", {
            className: "text-body-sm",
            children: d
        }), o[3] = d, o[4] = l) : l = o[4], o[5] !== t || o[6] !== l ? (n = (0, a.jsxs)(v.Button, {
            variant: "link",
            size: "sm",
            className: "group mb-3 text-text-secondary hover:text-text-primary",
            onClick: t,
            children: [r, l]
        }), o[5] = t, o[6] = l, o[7] = n) : n = o[7], n
    };
    var aR = e.i(99645),
        aL = e.i(148031);
    let a$ = e => {
        let t, r, l, n, o, i = (0, s.c)(12),
            {
                resolutionDataToView: c
            } = e,
            u = (0, O.useTranslations)();
        return i[0] !== u ? (t = u("events.tabs.resolution"), i[0] = u, i[1] = t) : t = i[1], i[2] !== t ? (r = (0, a.jsx)(t5.ModalTitle, {
            children: (0, a.jsx)("p", {
                className: "font-medium text-lg",
                children: t
            })
        }), i[2] = t, i[3] = r) : r = i[3], i[4] !== c ? (l = (0, a.jsx)(aL.EventResolutionStepper, {
            market: c,
            resolutionData: c.resolutionData
        }), i[4] = c, i[5] = l) : l = i[5], i[6] !== c.resolutionData ? (n = (0, a.jsx)("div", {
            className: "flex items-center justify-end w-full",
            children: (0, a.jsx)(aL.UmaExternalLink, {
                resolutionData: c.resolutionData
            })
        }), i[6] = c.resolutionData, i[7] = n) : n = i[7], i[8] !== r || i[9] !== l || i[10] !== n ? (o = (0, a.jsxs)(t5.ModalContent, {
            children: [r, l, n]
        }), i[8] = r, i[9] = l, i[10] = n, i[11] = o) : o = i[11], o
    };
    var aF = e.i(935786),
        aB = e.i(470080),
        aq = e.i(186568),
        aU = e.i(561992),
        az = e.i(840216),
        aW = e.i(909576);
    let aG = o.default.createContext({}),
        aH = e => {
            let t, r, l = (0, s.c)(9),
                {
                    lowerState: n,
                    setLowerState: o,
                    lowerStateOptions: i,
                    marketsForSocial: c,
                    mode: u,
                    children: d
                } = e;
            l[0] !== n || l[1] !== i || l[2] !== c || l[3] !== u || l[4] !== o ? (t = {
                lowerState: n,
                setLowerState: o,
                lowerStateOptions: i,
                marketsForSocial: c,
                mode: u
            }, l[0] = n, l[1] = i, l[2] = c, l[3] = u, l[4] = o, l[5] = t) : t = l[5];
            let m = t;
            return l[6] !== d || l[7] !== m ? (r = (0, a.jsx)(aG.Provider, {
                value: m,
                children: d
            }), l[6] = d, l[7] = m, l[8] = r) : r = l[8], r
        };
    var aV = e.i(882960),
        aY = e.i(354712);
    let aK = {
            cmd: "Meta",
            command: "Meta",
            ctrl: "Control",
            shift: "Shift",
            alt: "Alt",
            option: "Alt",
            esc: "Escape",
            return: "Enter",
            space: " ",
            tab: "Tab",
            del: "Delete",
            backspace: "Backspace",
            rightarrow: "ArrowRight",
            leftarrow: "ArrowLeft",
            uparrow: "ArrowUp",
            downarrow: "ArrowDown",
            plus: "+",
            minus: "_",
            period: ".",
            comma: ",",
            slash: "/",
            backslash: "\\",
            rightbracket: "]",
            leftbracket: "["
        },
        aQ = e => e.includes("+") ? "combination" : e.includes(".") ? "successive" : "single",
        aZ = e => aK[e.toLowerCase()] || e;

    function aJ(e) {
        return !1 !== e.enabled
    }
    let aX = {
            id: "switch-sides",
            mode: "combination",
            pattern: "shift+b"
        },
        a0 = e => ({
            bookAccordionSlug: e.gamesAccordionValue,
            setBookAccordionSlug: e.setGamesAccordionValue
        }),
        a1 = (0, aY.createSplitContext)("SportsReorderContext", {
            scrollTo: void 0,
            setScrollTo: () => void 0,
            bookAccordionSlug: "",
            setBookAccordionSlug: () => void 0,
            mode: "desktop"
        }),
        a2 = e => {
            let t, r, l, n, i = (0, s.c)(14),
                {
                    mode: c,
                    children: u
                } = e,
                d = (0, ej.useAmplitudeAnalytics)(),
                m = (0, eT.useTradeContextValue)(),
                [g, p] = o.default.useState(),
                {
                    bookAccordionSlug: f,
                    setBookAccordionSlug: h
                } = (0, az.useSportsStore)(a0);
            i[0] !== h ? (t = () => {
                h("")
            }, i[0] = h, i[1] = t) : t = i[1];
            let x = t;
            (0, aV.useGlobalEscapeKey)(x), i[2] !== d || i[3] !== c || i[4] !== m ? (r = () => {
                if ("desktop" === c) {
                    let {
                        selectedOutcomeIdx: e,
                        setSelectedOutcomeIdx: t
                    } = m.current;
                    t((e + 1) % 2), d.trackEvent(es.Events.SportsToggleSide, {
                        location: "card",
                        method: "shortcut"
                    })
                }
            }, i[2] = d, i[3] = c, i[4] = m, i[5] = r) : r = i[5], ((e, t) => {
                let r, a, l, n, i, c, u, d, m, g, p, f = (0, s.c)(26);
                void 0 !== f[0] ? (r = {}, f[0] = void 0, f[1] = r) : r = f[1];
                let h = r;
                if (f[2] !== h.disableOnInputFocus || f[3] !== h.shouldExecute || f[4] !== h.timeout || f[5] !== e) {
                    let t = Array.isArray(e) ? e : [e];
                    a = h.timeout ? ? 2e3, l = h.shouldExecute, n = h.disableOnInputFocus ? ? !0, i = [...t.filter(aJ)].sort((e, t) => {
                        let r = e.mode ? ? aQ(e.pattern),
                            a = t.mode ? ? aQ(t.pattern);
                        if ("single" === r && "single" !== a) return -1;
                        if ("single" === a && "single" !== r) return 1;
                        if ("combination" === r && "successive" === a) return -1;
                        if ("combination" === a && "successive" === r) return 1;
                        let s = e.pattern.split(/[+.]/).length;
                        return t.pattern.split(/[+.]/).length - s
                    }), f[2] = h.disableOnInputFocus, f[3] = h.shouldExecute, f[4] = h.timeout, f[5] = e, f[6] = a, f[7] = l, f[8] = n, f[9] = i
                } else a = f[6], l = f[7], n = f[8], i = f[9];
                f[10] !== a || f[11] !== l || f[12] !== n || f[13] !== i ? (c = {
                    timeout: a,
                    shouldExecute: l,
                    disableOnInputFocus: n,
                    filteredShortcuts: i
                }, f[10] = a, f[11] = l, f[12] = n, f[13] = i, f[14] = c) : c = f[14];
                let {
                    timeout: x,
                    shouldExecute: v,
                    disableOnInputFocus: b,
                    filteredShortcuts: y
                } = c, S = void 0 === x ? 2e3 : x, k = void 0 === b || b, w = o.default.useRef(void 0), j = o.default.useRef(null);
                f[15] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
                    j.current && (clearTimeout(j.current), j.current = null)
                }, f[15] = u) : u = f[15];
                let C = u;
                f[16] !== t || f[17] !== k || f[18] !== v ? (d = (e, r) => {
                    let a;
                    v && !v(e) || k && ("input" === (a = e).target.tagName.toLowerCase() || "textarea" === a.target.tagName.toLowerCase() || a.target.isContentEditable) || t(r, e)
                }, f[16] = t, f[17] = k, f[18] = v, f[19] = d) : d = f[19];
                let N = d;
                f[20] !== y || f[21] !== N || f[22] !== S ? (m = e => {
                    y.some(t => {
                        let r = t.mode ? ? aQ(t.pattern);
                        if ("combination" === r) {
                            let r = t.pattern.split("+").map(aZ),
                                a = r[r.length - 1],
                                s = r.slice(0, -1),
                                l = e.key.toLowerCase() === a.toLowerCase(),
                                n = s.every(t => {
                                    switch (t.toLowerCase()) {
                                        case "meta":
                                        case "cmd":
                                        case "command":
                                            return e.metaKey;
                                        case "control":
                                        case "ctrl":
                                            return e.ctrlKey;
                                        case "alt":
                                        case "option":
                                            return e.altKey;
                                        case "shift":
                                            return e.shiftKey;
                                        default:
                                            return !1
                                    }
                                });
                            if (l && n) return N(e, t), w.current = void 0, !0
                        }
                        if ("successive" === r) {
                            let [r, a] = t.pattern.split(".").map(aZ);
                            if (e.key === r) return w.current = r, C(), j.current = setTimeout(() => {
                                w.current = void 0
                            }, S), !1;
                            if (w.current === aZ(r) && e.key === aZ(a)) return N(e, t), w.current = void 0, !0
                        }
                        return e.key === aZ(t.pattern) && (N(e, t), w.current = void 0, !0)
                    })
                }, f[20] = y, f[21] = N, f[22] = S, f[23] = m) : m = f[23];
                let T = m;
                (0, aV.useGlobalKeydown)(T), f[24] === Symbol.for("react.memo_cache_sentinel") ? (g = () => () => C(), p = [], f[24] = g, f[25] = p) : (g = f[24], p = f[25]), o.default.useEffect(g, p)
            })(aX, r), i[6] !== f || i[7] !== c || i[8] !== g || i[9] !== h ? (l = {
                mode: c,
                scrollTo: g,
                setScrollTo: p,
                bookAccordionSlug: f,
                setBookAccordionSlug: h
            }, i[6] = f, i[7] = c, i[8] = g, i[9] = h, i[10] = l) : l = i[10];
            let v = l;
            return i[11] !== u || i[12] !== v ? (n = (0, a.jsx)(a1.Provider, {
                values: v,
                children: u
            }), i[11] = u, i[12] = v, i[13] = n) : n = i[13], n
        },
        a3 = e => (0, aY.useSplitContext)(a1, e);

    function a5(e) {
        return e.mergeLeagueData
    }
    var a4 = e.i(813899),
        a6 = e.i(723823),
        a7 = e.i(3269),
        a8 = e.i(213333),
        a9 = e.i(140527),
        se = e.i(261391),
        st = e.i(986558),
        sr = e.i(269101),
        sa = e.i(488758),
        ss = e.i(295038),
        sl = e.i(3740),
        sn = e.i(909420),
        so = e.i(488224),
        si = e.i(754738),
        sc = e.i(505300),
        su = e.i(93641),
        sd = e.i(204996),
        sm = e.i(415013),
        sg = e.i(186897),
        sp = e.i(134850),
        sf = e.i(246290),
        sh = e.i(628684),
        sx = e.i(635103),
        sv = e.i(294884),
        sb = e.i(588110),
        sy = e.i(389497),
        sS = e.i(343999),
        sk = e.i(306941),
        sw = e.i(423582),
        sj = e.i(202187),
        sC = e.i(928810);
    let sN = e => {
        let t, r, l, n, o, i, c, u = (0, s.c)(22),
            {
                sublabel: d,
                disabled: m,
                onTap: g,
                orderCreationState: p
            } = e,
            h = (0, O.useTranslations)(),
            {
                cashOut: x,
                orderCreationState: v,
                canCashOut: b,
                setCashOutDialogOpen: y
            } = (0, aW.useCashOutTxContext)(),
            S = p ? ? v,
            {
                confetti: k
            } = (0, sj.useOnTapConfetti)();
        u[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], u[0] = t) : t = u[0];
        let {
            activeMarket: w
        } = (0, f.useEventActiveMarketContext)(t), j = (0, ej.useAmplitudeAnalytics)();
        u[1] !== k ? (r = (e, t) => k({
            e,
            info: t,
            mode: {
                type: "event",
                location: "center"
            }
        }), u[1] = k, u[2] = r) : r = u[2];
        let C = r;
        u[3] !== y ? (l = () => {
            y(!1)
        }, u[3] = y, u[4] = l) : l = u[4];
        let N = l;
        u[5] !== j || u[6] !== x || u[7] !== N || u[8] !== w.closed || u[9] !== C || u[10] !== g ? (n = async (e, t) => {
            g ? await g() : await x(e, t, C, void 0, N), j.trackEvent(es.Events.SportsCashOutModalClick, {
                closed: w.closed
            })
        }, u[5] = j, u[6] = x, u[7] = N, u[8] = w.closed, u[9] = C, u[10] = g, u[11] = n) : n = u[11];
        let T = n;
        u[12] === Symbol.for("react.memo_cache_sentinel") ? (o = {
            scale: .9999
        }, u[12] = o) : o = u[12], u[13] !== w.closed || u[14] !== h ? (i = h(w.closed ? "trading.redeem" : "trading.cashOut"), u[13] = w.closed, u[14] = h, u[15] = i) : i = u[15];
        let M = !b || m;
        return u[16] !== T || u[17] !== S || u[18] !== d || u[19] !== i || u[20] !== M ? (c = (0, a.jsx)(rZ.motion.div, {
            className: "flex overflow-hidden w-full",
            layout: "preserve-aspect",
            style: o,
            children: (0, a.jsx)(sC.AnimatedButton, {
                color: "green",
                label: i,
                sublabel: d,
                disabled: M,
                orderCreationState: S,
                type: "button",
                onTap: T,
                height: 48,
                shadowHeight: 5,
                hoverHeightOffset: 2
            })
        }), u[16] = T, u[17] = S, u[18] = d, u[19] = i, u[20] = M, u[21] = c) : c = u[21], c
    };
    var sT = e.i(519322),
        sM = e.i(474280),
        s_ = e.i(629141);
    let sI = {
            containerClassName: "overflow-visible bg-transparent flex justify-center items-center",
            style: {
                width: "auto",
                height: 44
            }
        },
        sE = e => {
            let t, r, l, n, o, i, c, u, d, m, g = (0, s.c)(33),
                {
                    market: f,
                    image: h,
                    outcome: x,
                    mode: b,
                    isNegRiskDraw: y,
                    onClose: S,
                    images: k,
                    injectedHeading: w,
                    injectedSubheading: j
                } = e,
                C = void 0 !== y && y;
            g[0] !== w || g[1] !== f.closed || g[2] !== x ? (t = w ? ? `${f.closed?"Redeem":"Sell"} ${(0,a9.capitalize)(x)}`, g[0] = w, g[1] = f.closed, g[2] = x, g[3] = t) : t = g[3];
            let N = j ? ? f.groupItemTitle;
            g[4] !== t || g[5] !== N ? (r = {
                heading: t,
                subheading: N
            }, g[4] = t, g[5] = N, g[6] = r) : r = g[6];
            let {
                heading: T,
                subheading: M
            } = r, _ = "desktop" === b && "py-4";
            return g[7] !== _ ? (l = (0, p.cn)("flex flex-col items-center pt-4 pb-8 gap-1 relative", _), g[7] = _, g[8] = l) : l = g[8], g[9] !== b || g[10] !== S ? (n = "desktop" === b && (0, a.jsx)("div", {
                className: "flex h-0 w-full justify-end -translate-y-4",
                children: (0, a.jsx)(t5.ModalClose, {
                    "aria-label": "Close",
                    asChild: !0,
                    children: (0, a.jsx)(v.Button, {
                        variant: "ghost",
                        className: "size-6 p-0",
                        children: (0, a.jsx)(sM.IconXmarkFill18, {
                            className: "size-5",
                            onClick: () => S ? .()
                        })
                    })
                })
            }), g[9] = b, g[10] = S, g[11] = n) : n = g[11], g[12] !== h || g[13] !== k || g[14] !== C || g[15] !== b ? (o = !k && (0, a.jsxs)("div", {
                className: (0, p.cn)("relative overflow-hidden", "desktop" === b ? "size-[60px] mb-2" : "size-[42px]"),
                children: [!C && (0, a.jsx)(tZ.default, {
                    src: h,
                    alt: "Redeem icon",
                    fill: !0,
                    style: {
                        objectFit: "cover",
                        borderRadius: "4px"
                    },
                    priority: !0
                }), C && (0, a.jsx)("div", {
                    className: (0, p.cn)("rounded-full bg-neutral-50 flex justify-center items-center", "desktop" === b ? "size-[60px]" : "size-[42px]"),
                    children: (0, a.jsx)(sT.IconArrowsFilterFill18, {
                        className: "size-5 text-text rotate-90"
                    })
                })]
            }), g[12] = h, g[13] = k, g[14] = C, g[15] = b, g[16] = o) : o = g[16], g[17] !== k ? (i = !!k && (0, a.jsxs)("div", {
                className: "w-[70px] h-[60px] relative mb-2",
                children: [(0, a.jsx)("div", {
                    className: "absolute left-0 top-0",
                    children: (0, a.jsx)(s_.SportsMarketImage, {
                        src: k[0],
                        alt: "home icon",
                        borderRadius: "0px",
                        ...sI
                    }, k[0])
                }), (0, a.jsx)("div", {
                    className: "absolute right-0 bottom-0",
                    children: (0, a.jsx)(s_.SportsMarketImage, {
                        src: k[1],
                        alt: "away icon",
                        borderRadius: "0px",
                        ...sI
                    }, k[1])
                })]
            }), g[17] = k, g[18] = i) : i = g[18], g[19] !== T ? (c = (0, a.jsx)("p", {
                className: "text-base font-semibold text-text-primary leading-6 tracking-[0.15px]",
                children: T
            }), g[19] = T, g[20] = c) : c = g[20], g[21] !== f.groupItemTitle || g[22] !== M ? (u = !!f.groupItemTitle && (0, a.jsx)("p", {
                className: "text-xs font-medium text-neutral-500 leading-[18px] tracking-[0.15px]",
                children: M
            }), g[21] = f.groupItemTitle, g[22] = M, g[23] = u) : u = g[23], g[24] !== c || g[25] !== u ? (d = (0, a.jsxs)("div", {
                className: "flex flex-col items-center gap-1",
                children: [c, u]
            }), g[24] = c, g[25] = u, g[26] = d) : d = g[26], g[27] !== d || g[28] !== l || g[29] !== n || g[30] !== o || g[31] !== i ? (m = (0, a.jsxs)("div", {
                className: l,
                children: [n, o, i, d]
            }), g[27] = d, g[28] = l, g[29] = n, g[30] = o, g[31] = i, g[32] = m) : m = g[32], m
        },
        sD = e => {
            let t, r, l, n, o, i, c, u, d = (0, s.c)(42),
                {
                    injectedHeading: m,
                    injectedSubheading: g,
                    injectedImages: p
                } = e;
            d[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["isNegRiskSportsEvent", "event"], d[0] = t) : t = d[0];
            let {
                isNegRiskSportsEvent: h,
                event: x
            } = (0, eC.useEventContext)(t), {
                setCashOutDialogOpen: v
            } = (0, aW.useCashOutTxContext)();
            d[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["selectedOutcomeIdx", "side"], d[1] = r) : r = d[1];
            let {
                selectedOutcomeIdx: b,
                side: y
            } = (0, eT.useTradeContext)(r);
            d[2] === Symbol.for("react.memo_cache_sentinel") ? (l = ["activeMarket"], d[2] = l) : l = d[2];
            let {
                activeMarket: S
            } = (0, f.useEventActiveMarketContext)(l);
            d[3] === Symbol.for("react.memo_cache_sentinel") ? (n = ["isSportsPage"], d[3] = n) : n = d[3];
            let {
                isSportsPage: k
            } = (0, eN.useSportsContext)(n);
            e: {
                if (!h) {
                    o = !1;
                    break e
                }
                o = x.closed || x.markets.some(sP)
            }
            let w = o;
            t: {
                let e, t;
                if (h && w) {
                    let e;
                    d[4] !== S.icon || d[5] !== m || d[6] !== p || d[7] !== g ? (e = {
                        image: S.icon,
                        injectedHeading: m,
                        injectedSubheading: g,
                        images: p
                    }, d[4] = S.icon, d[5] = m, d[6] = p, d[7] = g, d[8] = e) : e = d[8], i = e;
                    break t
                }
                if (h) {
                    let e;
                    if ("draw" === S.negRiskSportsMarketType) {
                        let e;
                        d[9] !== S.icon ? (e = {
                            image: S.icon,
                            images: void 0,
                            injectedHeading: void 0,
                            injectedSubheading: void 0
                        }, d[9] = S.icon, d[10] = e) : e = d[10], i = e;
                        break t
                    }
                    if (S.negRiskSportsMarketType) {
                        let e, t;
                        d[11] !== S ? (e = (0, sn.getTeam)({
                            market: S
                        }), d[11] = S, d[12] = e) : e = d[12];
                        let r = e,
                            a = r ? .logo ? ? S.icon;
                        d[13] !== a ? (t = {
                            image: a,
                            images: void 0,
                            injectedHeading: void 0,
                            injectedSubheading: void 0
                        }, d[13] = a, d[14] = t) : t = d[14], i = t;
                        break t
                    }
                    d[15] !== S.icon ? (e = {
                        image: S.icon,
                        images: void 0,
                        injectedHeading: void 0,
                        injectedSubheading: void 0
                    }, d[15] = S.icon, d[16] = e) : e = d[16], i = e;
                    break t
                }
                d[17] !== S || d[18] !== b ? (e = (0, sn.getTeam)({
                    market: S,
                    outcomeIndex: b
                }), d[17] = S, d[18] = b, d[19] = e) : e = d[19];
                let r = e;
                if (k && r && S.teams && 2 === S.teams.length && "nrfi" !== S.sportsMarketType && "both_teams_to_score" !== S.sportsMarketType) {
                    let e, t, a;
                    d[20] !== S || d[21] !== b ? (e = (0, sn.getTeamLabelWithLine)({
                        market: S,
                        outcomeIndex: b,
                        variant: "alias"
                    }), d[20] = S, d[21] = b, d[22] = e) : e = d[22];
                    let s = e,
                        l = "";
                    "spreads" === S.sportsMarketType && (l = "Spread: "), "totals" === S.sportsMarketType && (l = "Total: "), "child_moneyline" === S.sportsMarketType && (l = `${S.groupItemTitle??"Game Winner"}: `);
                    let n = r ? .logo ? ? S.icon;
                    d[23] !== y ? (t = (0, a9.capitalize)(y), d[23] = y, d[24] = t) : t = d[24];
                    let o = `${t} ${s}`,
                        c = `${l}${S.teams[0].alias??S.teams[0].name} vs ${S.teams[1].alias??S.teams[1].name}`;
                    d[25] !== o || d[26] !== c || d[27] !== n ? (a = {
                        image: n,
                        images: void 0,
                        injectedHeading: o,
                        injectedSubheading: c
                    }, d[25] = o, d[26] = c, d[27] = n, d[28] = a) : a = d[28], i = a;
                    break t
                }
                d[29] !== S.icon ? (t = {
                    image: S.icon,
                    images: void 0,
                    injectedHeading: void 0,
                    injectedSubheading: void 0
                }, d[29] = S.icon, d[30] = t) : t = d[30],
                i = t
            }
            let {
                image: j,
                images: C,
                injectedHeading: N,
                injectedSubheading: T
            } = i, M = S.outcomes[b];
            d[31] !== v ? (c = () => v(!1), d[31] = v, d[32] = c) : c = d[32];
            let _ = "draw" === S.negRiskSportsMarketType;
            return d[33] !== S || d[34] !== j || d[35] !== C || d[36] !== N || d[37] !== T || d[38] !== M || d[39] !== c || d[40] !== _ ? (u = (0, a.jsx)(sE, {
                market: S,
                image: j,
                outcome: M,
                onClose: c,
                mode: "desktop",
                isNegRiskDraw: _,
                injectedHeading: N,
                injectedSubheading: T,
                images: C
            }), d[33] = S, d[34] = j, d[35] = C, d[36] = N, d[37] = T, d[38] = M, d[39] = c, d[40] = _, d[41] = u) : u = d[41], u
        };

    function sP(e) {
        return e.closed
    }
    var sA = e.i(977781),
        sO = e.i(766181),
        sR = e.i(260259),
        sL = e.i(196627),
        s$ = e.i(575865);
    let sF = (0, sO.cva)("flex items-center gap-0.5", {
        variants: {
            variant: {
                orders: "",
                positions: "w-fit"
            }
        }
    });

    function sB(e) {
        let t, r, l, n, o, i = (0, s.c)(10);
        return i[0] !== e ? ({
            className: t,
            variant: l,
            ...r
        } = e, i[0] = e, i[1] = t, i[2] = r, i[3] = l) : (t = i[1], r = i[2], l = i[3]), i[4] !== t || i[5] !== l ? (n = (0, p.cn)(sF({
            variant: l
        }), t), i[4] = t, i[5] = l, i[6] = n) : n = i[6], i[7] !== r || i[8] !== n ? (o = (0, a.jsx)("span", {
            className: n,
            ...r
        }), i[7] = r, i[8] = n, i[9] = o) : o = i[9], o
    }
    let sq = e => {
            let t = (0, z.formatUSDCUnits)((0, W.getTotalProfit)(e)),
                r = (0, z.formatCurrency)(t, {
                    decimals: 2
                }),
                a = parseFloat(t),
                s = 0 === a ? "even" : a > 0 ? "gain" : "loss";
            return {
                totalReturn: r,
                totalReturnPercent: `${(0,W.getProfitPercent)(e,!0).toFixed(2)}%`,
                totalReturnColor: "gain" === s ? "green" : "loss" === s ? "red" : "black"
            }
        },
        sU = e => {
            let t, r, l, n, o, i, c, u, d, m, g = (0, s.c)(80),
                {
                    position: f,
                    isWinningPosition: h
                } = e,
                x = void 0 !== h && h;
            e: {
                let e, r, a, s, l, n, o, i, c, u, d, m, p, h = parseInt(f.outcomeIndex, 10);
                if (g[0] !== f) e = f.trackedPositionMetadata ? (0, z.formatNum)(f.trackedPositionMetadata.netQuantity.optimistic, {
                    decimals: 0
                }) : (0, z.formatNum)((0, z.formatUSDCUnits)(BigInt(f.netQuantity)), {
                    decimals: 0
                }),
                g[0] = f,
                g[1] = e;
                else e = g[1];
                let v = e;
                if (g[2] !== f) r = (0, z.formatCurrency)((0, z.formatUSDCUnits)((0, W.getValuePaidForShares)(f)), {
                    decimals: 2
                }),
                g[2] = f,
                g[3] = r;
                else r = g[3];
                let b = r,
                    y = 0 === h ? "Yes" : "No",
                    S = 100 * (0, W.getAveragePricePerShare)(f);g[4] !== S ? (a = (0, z.formatNum)(S, {
                    decimals: 1,
                    optionalDecimals: !0,
                    commas: !1
                }), g[4] = S, g[5] = a) : a = g[5];
                let k = `${a}\xa2`;
                if ("draw" === f.mkt.negRiskSportsMarketType) {
                    let e, r, a, s, l = `${v} Draw - ${y} @ ${k}`;
                    g[6] !== x || g[7] !== v ? (e = x && {
                        value: `$${v}`
                    }, g[6] = x, g[7] = v, g[8] = e) : e = g[8], g[9] !== f ? (r = sq(f), g[9] = f, g[10] = r) : r = g[10], g[11] === Symbol.for("react.memo_cache_sentinel") ? (a = {
                        color: "var(--neutral-700)",
                        backgroundColor: "$gray6"
                    }, g[11] = a) : a = g[11], g[12] !== b || g[13] !== h || g[14] !== l || g[15] !== e || g[16] !== r ? (s = {
                        isNegRiskDraw: !0,
                        cost: b,
                        outcomeIndex: h,
                        image: void 0,
                        chipLabel: l,
                        value: "$0",
                        ...e,
                        ...r,
                        customColors: a
                    }, g[12] = b, g[13] = h, g[14] = l, g[15] = e, g[16] = r, g[17] = s) : s = g[17], t = s;
                    break e
                }
                if (g[18] !== k || g[19] !== b || g[20] !== x || g[21] !== y || g[22] !== h || g[23] !== f || g[24] !== v) {
                    let e = (0, sn.getTeam)({
                        market: f.mkt
                    });
                    c = !1, u = b, d = h, m = f.mkt.image, s = `${v} ${f.mkt.groupItemTitle} - ${y} @ ${k}`, l = "$0", g[34] !== x || g[35] !== v ? (n = x && {
                        value: `$${v}`
                    }, g[34] = x, g[35] = v, g[36] = n) : n = g[36], g[37] !== f ? (o = sq(f), g[37] = f, g[38] = o) : o = g[38], i = e && {
                        image: e.logo ? ? f.mkt.image,
                        label: e.name,
                        ...e.color && {
                            customColors: {
                                color: e.color,
                                backgroundColor: `${e.color}1A`
                            }
                        }
                    }, g[18] = k, g[19] = b, g[20] = x, g[21] = y, g[22] = h, g[23] = f, g[24] = v, g[25] = s, g[26] = l, g[27] = n, g[28] = o, g[29] = i, g[30] = c, g[31] = u, g[32] = d, g[33] = m
                } else s = g[25],
                l = g[26],
                n = g[27],
                o = g[28],
                i = g[29],
                c = g[30],
                u = g[31],
                d = g[32],
                m = g[33];g[39] !== s || g[40] !== l || g[41] !== n || g[42] !== o || g[43] !== i || g[44] !== c || g[45] !== u || g[46] !== d || g[47] !== m ? (p = {
                    isNegRiskDraw: c,
                    cost: u,
                    outcomeIndex: d,
                    image: m,
                    chipLabel: s,
                    value: l,
                    ...n,
                    ...o,
                    ...i
                }, g[39] = s, g[40] = l, g[41] = n, g[42] = o, g[43] = i, g[44] = c, g[45] = u, g[46] = d, g[47] = m, g[48] = p) : p = g[48],
                t = p
            }
            let {
                isNegRiskDraw: v,
                cost: b,
                image: y,
                chipLabel: S,
                outcomeIndex: k,
                customColors: w,
                totalReturn: j,
                totalReturnPercent: C,
                totalReturnColor: N,
                value: T
            } = t;
            g[49] !== S || g[50] !== y || g[51] !== v || g[52] !== f.outcomeIndex ? (r = !!y && !v && (0, a.jsx)(rZ.motion.div, {
                className: "min-w-[30px] size-[30px] max-w-[30px] min-h-[30px] max-h-[30px] relative overflow-hidden col-1",
                children: (0, a.jsx)(tZ.default, {
                    src: y,
                    alt: `${S} icon`,
                    className: "object-cover rounded-[4px]",
                    fill: !0,
                    priority: !0
                })
            }, `${f.outcomeIndex}-position-img`), g[49] = S, g[50] = y, g[51] = v, g[52] = f.outcomeIndex, g[53] = r) : r = g[53], g[54] !== v ? (l = v && (0, a.jsx)(sR.DrawIcon, {
                size: 30
            }), g[54] = v, g[55] = l) : l = g[55], g[56] !== S || g[57] !== w || g[58] !== k ? (n = (0, a.jsx)("div", {
                className: "flex",
                children: (0, a.jsx)(sL.OutcomeChip, {
                    outcomeIndex: k,
                    customColors: w,
                    className: "text-sm leading-[15px] tracking-[0.15px] font-medium px-1.5 h-6 whitespace-nowrap",
                    children: S
                })
            }), g[56] = S, g[57] = w, g[58] = k, g[59] = n) : n = g[59], g[60] !== r || g[61] !== l || g[62] !== n ? (o = (0, a.jsxs)("div", {
                className: "flex items-center gap-2 col-1",
                children: [r, l, n]
            }), g[60] = r, g[61] = l, g[62] = n, g[63] = o) : o = g[63], g[64] !== T ? (i = (0, a.jsx)(s$.SportsItemPositionDataPoint, {
                value: T,
                className: "col-2"
            }), g[64] = T, g[65] = i) : i = g[65], g[66] !== b ? (c = (0, a.jsx)(s$.SportsItemPositionDataPoint, {
                value: b,
                className: "col-3"
            }), g[66] = b, g[67] = c) : c = g[67];
            let M = `${j}`,
                _ = `(${C})`,
                I = "red" === N && "text-red-400",
                E = "green" === N && "text-green-500";
            return g[68] !== I || g[69] !== E ? (u = (0, p.cn)("ml-[6px] font-medium text-neutral-400", I, E), g[68] = I, g[69] = E, g[70] = u) : u = g[70], g[71] !== _ || g[72] !== u || g[73] !== M ? (d = (0, a.jsx)(s$.SportsItemPositionDataPoint, {
                value: M,
                valueSuffix: _,
                valueClassname: u,
                className: "col-4"
            }), g[71] = _, g[72] = u, g[73] = M, g[74] = d) : d = g[74], g[75] !== d || g[76] !== o || g[77] !== i || g[78] !== c ? (m = (0, a.jsxs)("div", {
                className: "contents w-full overflow-hidden",
                children: [o, i, c, d]
            }), g[75] = d, g[76] = o, g[77] = i, g[78] = c, g[79] = m) : m = g[79], m
        },
        sz = () => {
            let e, t, r, l, n, o, i, c, u, d = (0, s.c)(21),
                m = (0, O.useTranslations)();
            return d[0] !== m ? (e = m("trading.outcome"), d[0] = m, d[1] = e) : e = d[1], d[2] !== e ? (t = (0, a.jsx)("span", {
                children: e
            }), d[2] = e, d[3] = t) : t = d[3], d[4] !== m ? (r = m("trading.value"), d[4] = m, d[5] = r) : r = d[5], d[6] !== r ? (l = (0, a.jsx)("span", {
                className: "text-right",
                children: r
            }), d[6] = r, d[7] = l) : l = d[7], d[8] !== m ? (n = m("trading.cost"), d[8] = m, d[9] = n) : n = d[9], d[10] !== n ? (o = (0, a.jsx)("span", {
                className: "text-right",
                children: n
            }), d[10] = n, d[11] = o) : o = d[11], d[12] !== m ? (i = m("trading.return"), d[12] = m, d[13] = i) : i = d[13], d[14] !== i ? (c = (0, a.jsx)("span", {
                className: "text-right",
                children: i
            }), d[14] = i, d[15] = c) : c = d[15], d[16] !== t || d[17] !== l || d[18] !== o || d[19] !== c ? (u = (0, a.jsxs)("div", {
                className: "contents text-xs text-text-tertiary",
                children: [t, l, o, c]
            }), d[16] = t, d[17] = l, d[18] = o, d[19] = c, d[20] = u) : u = d[20], u
        },
        sW = e => {
            let t, r, l, n, o = (0, s.c)(8),
                {
                    winningPosition: i,
                    losingPositions: c
                } = e;
            return o[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)(sz, {}), o[0] = t) : t = o[0], o[1] !== i ? (r = !!i && (0, a.jsx)("div", {
                className: "grid col-span-full grid-cols-subgrid w-full items-center",
                children: (0, a.jsx)(sU, {
                    position: i,
                    isWinningPosition: !0
                })
            }, "winning-position"), o[1] = i, o[2] = r) : r = o[2], o[3] !== c ? (l = c.map(sH), o[3] = c, o[4] = l) : l = o[4], o[5] !== r || o[6] !== l ? (n = (0, a.jsx)("div", {
                className: "h-auto max-h-[200px] w-full overflow-x-auto",
                children: (0, a.jsxs)("div", {
                    className: "grid relative min-w-max w-full items-center gap-y-3 gap-x-5 grid-rows-[1fr] grid-cols-[auto_minmax(50px,auto)_minmax(50px,auto)_minmax(80px,auto)]",
                    children: [t, r, l]
                })
            }), o[5] = r, o[6] = l, o[7] = n) : n = o[7], n
        },
        sG = e => {
            let t, r, l, n, i, c, u, d = (0, s.c)(15),
                {
                    winningPosition: m,
                    losingPositions: g
                } = e,
                p = (0, O.useTranslations)(),
                [f, h] = o.default.useState("");
            d[0] === Symbol.for("react.memo_cache_sentinel") ? (t = () => {
                h(sV)
            }, d[0] = t) : t = d[0];
            let x = t;
            return d[1] !== p ? (r = p("sports.positionBreakdown"), d[1] = p, d[2] = r) : r = d[2], d[3] !== r ? (l = (0, a.jsx)(sA.AccordionTrigger, {
                onClick: x,
                className: "px-2 hover:bg-surface-2 dark:hover:bg-surface-2",
                children: (0, a.jsx)(sB, {
                    children: (0, a.jsx)("span", {
                        children: r
                    })
                })
            }), d[3] = r, d[4] = l) : l = d[4], d[5] === Symbol.for("react.memo_cache_sentinel") ? (n = (0, a.jsx)("div", {
                className: "w-full h-2"
            }), d[5] = n) : n = d[5], d[6] !== g || d[7] !== m ? (i = (0, a.jsxs)(sA.AccordionContent, {
                children: [n, (0, a.jsx)(sW, {
                    winningPosition: m,
                    losingPositions: g
                })]
            }), d[6] = g, d[7] = m, d[8] = i) : i = d[8], d[9] !== l || d[10] !== i ? (c = (0, a.jsxs)(sA.AccordionItem, {
                value: "positions",
                children: [l, i]
            }), d[9] = l, d[10] = i, d[11] = c) : c = d[11], d[12] !== c || d[13] !== f ? (u = (0, a.jsx)(sA.Accordion, {
                type: "single",
                value: f,
                onValueChange: h,
                className: "w-full h-fit p-0 z-auto",
                children: c
            }), d[12] = c, d[13] = f, d[14] = u) : u = d[14], u
        };

    function sH(e) {
        return (0, a.jsx)("div", {
            className: "grid col-span-full grid-cols-subgrid w-full items-center",
            children: (0, a.jsx)(sU, {
                position: e
            })
        }, `${e.market}-${e.outcomeIndex}`)
    }

    function sV(e) {
        return "positions" === e ? "" : "positions"
    }
    let sY = ({
            winningPosition: e,
            losingPositions: t
        }) => {
            let r = (0, O.useTranslations)(),
                {
                    activeMarket: s
                } = (0, f.useEventActiveMarketContext)(["activeMarket"]),
                {
                    event: l
                } = (0, eC.useEventContext)(["event"]),
                {
                    setCashOutDialogOpen: n
                } = (0, aW.useCashOutTxContext)(),
                i = (0, ej.useGoogleAnalytics)(),
                c = (0, ej.useAmplitudeAnalytics)(),
                {
                    updatePositions: u
                } = (0, sr.useEventPositionsContext)(["updatePositions"]),
                d = (0, j.useToast)(),
                m = o.default.useRef(null),
                g = o.default.useRef(null),
                p = o.default.useRef(new Map),
                {
                    refreshNonce: h
                } = (0, sh.useSafe)(),
                {
                    nonce: x,
                    incrementNonce: b,
                    refreshNonce: y
                } = (0, sx.useDepositWallet)(),
                {
                    sendTransaction: S
                } = (0, E.default)(),
                k = (0, I.default)(),
                w = (0, F.useTransactionStore)(),
                [N, T] = o.default.useState("rest"),
                [M, _] = o.default.useState(0),
                [A, R] = o.default.useState(0),
                {
                    authenticated: $,
                    authenticationType: U,
                    walletMode: W
                } = (0, L.useAccountContext)(["authenticated", "authenticationType", "walletMode"]),
                {
                    proxyAddress: V
                } = (0, sf.useAccount)(),
                {
                    positions: Y,
                    markets: K
                } = (0, sv.useRedeemablePositions)({
                    proxyAddress: V,
                    fetchAll: !0
                }),
                Q = o.default.useCallback(() => {
                    u([...t, ...e ? [e] : []].map(e => ({ ...e,
                        ...e.trackedPositionMetadata && {
                            trackedPositionMetadata: { ...e.trackedPositionMetadata,
                                netQuantity: {
                                    current: 0,
                                    optimistic: 0,
                                    pending: 0
                                }
                            }
                        }
                    })), !0)
                }, [u, t, e]),
                Z = o.default.useMemo(() => {
                    if (Y ? .length && K && K.length) {
                        let r = t.map(e => e.market.id.toLowerCase());
                        e && r.push(e.market.id.toLowerCase());
                        let a = Y.filter(e => r.includes(e.market.id.toLowerCase()));
                        return (0, sy.formatMarketAndValue)({
                            positions: a,
                            markets: K
                        })
                    }
                    return []
                }, [Y, K, t, e]),
                J = o.default.useCallback(async () => {
                    try {
                        if (!$) return void(0, q.handleError)("[RedeemAll > Magiclink is null]", B.PolyError.MagicLinkMissing, V);
                        let {
                            chainId: e
                        } = G.MATIC_CONFIG, t = "magic" === U, a = (Z || []).map(t => ({
                            txns: (0, H.getRedeemPositionsTransaction)({
                                chainId: e,
                                chainConfig: G.chainConfig,
                                conditionId: t.conditionId,
                                negRisk: t.negRisk,
                                outcomeCount: t.outcomes ? .length ? ? 0,
                                amounts: t.amounts
                            }),
                            market: t,
                            metadata: {
                                quantity: BigInt(t.value ? ? 0),
                                positionChangeData: (0, P.computeRedeemImpact)(BigInt(t.value ? ? 0))
                            }
                        }));
                        if (R(a.length), t && V) {
                            for (let {
                                    market: e
                                } of (p.current.clear(), a)) {
                                let t = (0, H.formatSyntheticRedeemTransaction)({
                                    conditionId: e.conditionId,
                                    amount: BigInt(e.value ? ? 0),
                                    proxyAddress: V
                                });
                                p.current.set(e.conditionId, t), await k(t, e)
                            }
                            d.success(new C.ToastBuilder().position({
                                side: "top"
                            }).title(r("portfolio.modals.redeem.claimProceeds"))), Q(), n(!1), T("rest");
                            let e = (0, su.chunk)(a, sb.numberOfTxnsPerBundle);
                            (async () => {
                                for (let [t, a] of e.entries()) {
                                    let s = null;
                                    for (let r = 0; r < 2; r++) try {
                                        let r = Date.now(),
                                            l = (0, E.getTransactionType)(W),
                                            n = await S(l, a.flatMap(e => e.txns), 0, G.Network.Matic, t, void 0, l === E.TransactionType.DepositWallet ? x : void 0, void 0, l === E.TransactionType.DepositWallet ? V : void 0);
                                        if (l === E.TransactionType.DepositWallet && await b(), !n) throw Error("Transaction response is null.");
                                        let o = !n.hash;
                                        o && await (0, sw.waitTillMined)(n);
                                        let {
                                            chainId: c
                                        } = G.MATIC_CONFIG;
                                        for (let {
                                                txns: e,
                                                market: t,
                                                metadata: s
                                            } of a) {
                                            let a = (0, sm.keccak256)((0, sg.toHex)(V + t.conditionId + r)),
                                                l = new sS.CTFTxnBuilder(a, o ? D.TxnStatus.MINED : D.TxnStatus.PENDING).metadata({
                                                    txns: e,
                                                    chainId: c,
                                                    outcome: "NA",
                                                    outcomeIndex: -1,
                                                    usdc: s.quantity,
                                                    enqueuedAt: r,
                                                    lastUpdatedAt: r,
                                                    ctfTxnType: D.CTFTxnType.Redeem,
                                                    hash: n.hash,
                                                    ...s
                                                }).conditionId(t.conditionId).build();
                                            await k(l, t);
                                            let i = p.current.get(t.conditionId);
                                            if (i) {
                                                try {
                                                    w.removeTransaction(V, G.MATIC_CONFIG.chainId, i.txId, !0)
                                                } catch {}
                                                p.current.delete(t.conditionId)
                                            }
                                        }
                                        i.trackEvent(sp.GAEventAction.TRANSACTION, {
                                            trade_type: "redeem_all",
                                            trade_status: `${t+1}_${e.length}`,
                                            event_status: "success"
                                        }), s = null;
                                        break
                                    } catch (e) {
                                        s = e
                                    }
                                    if (s) {
                                        let a = s;
                                        for (let r of ((0, q.handleError)(a, "Redeem All Shares", V, q.BUG_CATEGORIES.MISSION_CRITICAL), e.slice(t)))
                                            for (let {
                                                    market: e
                                                } of r) {
                                                let t = p.current.get(e.conditionId);
                                                t && (w.handleFailedTransaction(V, G.MATIC_CONFIG.chainId, t, e), p.current.delete(e.conditionId))
                                            }
                                        d.error(new C.ToastBuilder().position({
                                            side: "top"
                                        }).title(r("portfolio.messages.failedToRedeem")).description(r("comments.pleaseTryAgain"))), i.trackEvent(sp.GAEventAction.TRANSACTION, {
                                            trade_type: "redeem_all",
                                            trade_status: `${t+1}_${e.length}`,
                                            event_status: "error",
                                            event_error_msg: a.message || JSON.stringify(a)
                                        });
                                        break
                                    }
                                }
                                p.current.clear(), (0, E.getTransactionType)(W) === E.TransactionType.DepositWallet ? y() : h()
                            })();
                            return
                        }
                        T("submitting");
                        let s = (0, su.chunk)(a, sb.numberOfTxnsPerBundle),
                            l = [];
                        for (let [e, t] of s.entries()) try {
                            _(e => e + t.length);
                            let r = (0, E.getTransactionType)(W),
                                a = await S(r, t.flatMap(e => e.txns), 0, G.Network.Matic, e, void 0, r === E.TransactionType.DepositWallet ? x : void 0, E.TransactionMetadata.Redeem.valueOf(), r === E.TransactionType.DepositWallet ? V : void 0);
                            r === E.TransactionType.DepositWallet && await b(), l.push((0, sw.waitTillMined)(a))
                        } catch (e) {
                            (0, q.handleError)(e, "Redeem All Shares", V, q.BUG_CATEGORIES.MISSION_CRITICAL), (0, sk.isUserRejection)(e) && T("rest");
                            return
                        }
                        await Promise.all(l), T("success"), Q(), m.current = setTimeout(() => {
                            n(!1)
                        }, 2e3), g.current = setTimeout(() => {
                            T("rest")
                        }, 3e3), (0, E.getTransactionType)(W) === E.TransactionType.DepositWallet ? y() : h()
                    } catch {
                        T("rest")
                    }
                }, [Z, $, U, W, Y, V, K, h, y, x, b, S, k, w, T, Q, i, r, d]),
                {
                    injectedHeading: X,
                    injectedSubheading: ee,
                    injectedImages: et
                } = o.default.useMemo(() => {
                    let a = [...t, ...e ? [e] : []];
                    if (a.length < 2) return {
                        injectedHeading: void 0,
                        injectedSubheading: void 0,
                        injectedImages: void 0
                    };
                    let n = new Set(a.map(e => e.market.id)).size > 1;
                    return {
                        injectedHeading: r("trading.redeemNPositions", {
                            count: String(a.length)
                        }),
                        ...n && {
                            injectedSubheading: l.title,
                            ...s.teams && {
                                injectedSubheading: `${(0,sd.upperCase)(s.teams[1].abbreviation)} @ ${(0,sd.upperCase)(s.teams[0].abbreviation)}`,
                                injectedImages: s.teams.map(e => e.logo)
                            }
                        }
                    }
                }, [s, l.slug, l.title, e, t.length]),
                er = o.default.useRef(null),
                {
                    amountToReceive: ea
                } = o.default.useMemo(() => {
                    if (!e) return {
                        amountToReceive: "$0"
                    };
                    if (er.current) return er.current;
                    let t = e.trackedPositionMetadata ? e.trackedPositionMetadata.netQuantity.optimistic : (0, z.formatUSDCUnits)(BigInt(e.netQuantity));
                    return {
                        amountToReceive: (0, z.formatCurrency)(t, {
                            decimals: 2
                        })
                    }
                }, [s.orderPriceMinTickSize, e]);
            return o.default.useEffect(() => {
                "rest" === N ? er.current = null : er.current = {
                    amountToReceive: ea
                }
            }, [N, ea]), o.default.useEffect(() => () => {
                m.current && clearTimeout(m.current), g.current && clearTimeout(g.current)
            }, []), (0, a.jsxs)("div", {
                className: "flex flex-col gap-2",
                children: [(0, a.jsx)(sD, {
                    injectedHeading: X,
                    injectedSubheading: ee,
                    injectedImages: et
                }), (0, a.jsx)("div", {
                    className: "flex flex-col gap-2",
                    children: (0, a.jsxs)("div", {
                        className: "flex flex-col w-full gap-2",
                        children: [(0, a.jsx)(sc.RedeemAmount, {
                            amount: ea
                        }), (0, a.jsxs)("div", {
                            className: "flex flex-col gap-2",
                            children: [(0, a.jsx)("div", {
                                className: "flex flex-1 overflow-hidden",
                                children: (0, a.jsx)(sN, {
                                    onTap: Z.length > 1 ? J : void 0,
                                    orderCreationState: Z.length > 1 ? N : void 0
                                })
                            }), !s.closed && (0, a.jsx)(v.Button, {
                                variant: "link",
                                onClick: () => {
                                    n(!1), c.trackEvent(es.Events.SportsCashOutEditClick)
                                },
                                children: "Edit order"
                            }), (!!e && t.length > 0 || t.length > 1) && (0, a.jsx)(sG, {
                                winningPosition: e,
                                losingPositions: t
                            })]
                        })]
                    })
                })]
            })
        },
        sK = () => {
            let e, t, r, l, n, o, i = (0, s.c)(12);
            i[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], i[0] = e) : e = i[0];
            let {
                event: c
            } = (0, eC.useEventContext)(e);
            i[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["positions"], i[1] = t) : t = i[1];
            let {
                positions: u
            } = (0, sr.useEventPositionsContext)(t);
            if (i[2] !== c.markets || i[3] !== u) {
                let e;
                i[5] !== c.markets ? (e = (e, t) => {
                    if (t.trackedPositionMetadata ? t.trackedPositionMetadata.netQuantity.optimistic : parseFloat((0, z.formatUSDCUnits)(BigInt(t.netQuantity)))) {
                        let r = c.markets.find(e => e.conditionId.toLowerCase() === t.market.id.toLowerCase());
                        r && (t.market.outcomeTokenPrices.indexOf("1") === parseInt(t.outcomeIndex, 10) ? e.winningPosition = { ...t,
                            mkt: r
                        } : e.losingPositions.push({ ...t,
                            mkt: r
                        }))
                    }
                    return e
                }, i[5] = c.markets, i[6] = e) : e = i[6], r = (u ? ? []).reduce(e, {
                    winningPosition: void 0,
                    losingPositions: []
                }), i[2] = c.markets, i[3] = u, i[4] = r
            } else r = i[4];
            let {
                winningPosition: d,
                losingPositions: m
            } = r;
            return d || m.length ? (i[7] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(t5.ModalTitle, {
                className: "sr-only",
                children: "Cash out"
            }), n = (0, a.jsx)(t5.ModalDescription, {
                className: "sr-only",
                children: "Cash out"
            }), i[7] = l, i[8] = n) : (l = i[7], n = i[8]), i[9] !== m || i[10] !== d ? (o = (0, a.jsxs)(t5.ModalContent, {
                children: [l, n, (0, a.jsx)(sY, {
                    winningPosition: d,
                    losingPositions: m
                })]
            }), i[9] = m, i[10] = d, i[11] = o) : o = i[11], o) : null
        };
    sK.displayName = "NegRiskCashOutModalContent";
    let sQ = [0, 25, 50, 75, 100],
        sZ = ({
            position: e
        }) => {
            var t;
            let r, s, {
                    activeMarket: l
                } = (0, f.useEventActiveMarketContext)(["activeMarket"]),
                {
                    enrichedPosition: n
                } = (0, sl.useEnrichedPosition)(e, -1, l),
                {
                    setCashOutDialogOpen: i,
                    cashOut: c,
                    canCashOut: u,
                    orderCreationState: d
                } = (0, aW.useCashOutTxContext)(),
                {
                    usdcReceived: m,
                    averagePrice: g
                } = (0, se.useMarketOrderDetail)(),
                h = (0, ej.useAmplitudeAnalytics)(),
                x = (t = parseInt(e.outcomeIndex, 10), r = (0, a6.useBids)(l, t), s = o.default.useDeferredValue(r), !!s ? .hasLiquidity && s.totalValue > 0),
                {
                    sellable: b
                } = (0, st.default)(l.conditionId),
                {
                    shares: y,
                    setShares: S,
                    setAmountUpdateLocation: k
                } = (0, eT.useTradeContext)(["shares", "setShares", "setAmountUpdateLocation"]),
                w = (0, O.useTranslations)(),
                {
                    heading: j,
                    subheading: C
                } = function() {
                    let e = (0, O.useTranslations)(),
                        {
                            isNegRiskSportsEvent: t
                        } = (0, eC.useEventContext)(["isNegRiskSportsEvent"]),
                        {
                            selectedOutcomeIdx: r,
                            side: a
                        } = (0, eT.useTradeContext)(["selectedOutcomeIdx", "side"]),
                        {
                            activeMarket: s
                        } = (0, f.useEventActiveMarketContext)(["activeMarket"]),
                        {
                            isSportsPage: l
                        } = (0, eN.useSportsContext)(["isSportsPage"]);
                    return o.default.useMemo(() => {
                        let n = s.icon,
                            o = `${s.closed?e("trading.redeem"):e("trading.sell")} ${(0,a9.capitalize)(s.outcomes[r])}`,
                            i = s.groupItemTitle ? ? void 0;
                        if (t) {
                            if (s.negRiskSportsMarketType && "draw" !== s.negRiskSportsMarketType) {
                                let e = (0, sn.getTeam)({
                                    market: s
                                });
                                n = e ? .logo ? ? s.icon
                            }
                        } else if (l && s.teams && 2 === s.teams.length && "nrfi" !== s.sportsMarketType && "both_teams_to_score" !== s.sportsMarketType) {
                            let e = "tennis_completed_match" === s.sportsMarketType || "cricket_completed_match" === s.sportsMarketType,
                                t = (0, sn.getTeam)({
                                    market: s,
                                    outcomeIndex: r
                                });
                            if (t || e) {
                                if (!e && t) {
                                    let e = (0, sn.getTeamLabelWithLine)({
                                        market: s,
                                        outcomeIndex: r,
                                        variant: "alias"
                                    });
                                    n = t ? .logo ? ? s.icon, o = `${(0,a9.capitalize)(a)} ${e}`
                                }
                                let l = "";
                                "spreads" === s.sportsMarketType && (l = "Spread: "), "totals" === s.sportsMarketType && (l = "Total: "), "child_moneyline" === s.sportsMarketType && (l = `${s.groupItemTitle??"Game Winner"}: `), e && (l = "Completed Match: "), i = `${l}${s.teams[0].alias??s.teams[0].name} vs ${s.teams[1].alias??s.teams[1].name}`
                            }
                        }
                        return {
                            image: n,
                            heading: o,
                            subheading: i
                        }
                    }, [t, r, s, l, a])
                }(),
                [N, T] = o.default.useState(100),
                M = o.default.useRef(0);
            o.default.useEffect(() => {
                if (0 === M.current && y) {
                    let e = parseFloat(y);
                    Number.isFinite(e) && e > 0 && (M.current = e)
                }
            }, [y]);
            let _ = o.default.useCallback(e => {
                    if (T(e), M.current <= 0) return;
                    let t = M.current * e / 100;
                    S((0, z.formatNoRound)(t)), k("slider")
                }, [S, k]),
                I = o.default.useMemo(() => !1, [l.closed, x]),
                E = o.default.useMemo(() => {
                    let t = e.trackedPositionMetadata ? .netQuantity ? .optimistic;
                    if ("number" == typeof t && Number.isFinite(t)) return t;
                    try {
                        let t = Number.parseFloat((0, z.formatUSDCUnits)(BigInt(e.netQuantity)));
                        return Number.isFinite(t) ? t : 0
                    } catch {
                        return 0
                    }
                }, [e]),
                D = o.default.useMemo(() => {
                    let t = Number.parseInt(e.outcomeIndex, 10);
                    return Number.isFinite(t) ? b ? .[t] ? ? 0 : 0
                }, [b, e.outcomeIndex]),
                P = o.default.useMemo(() => !l.closed && !!Number.isFinite(E) && !(E <= 0) && E > D + 1e-6, [l.closed, E, D]),
                A = o.default.useRef(null),
                {
                    shareQuantity: R,
                    averagePrice: L,
                    amountToReceive: $
                } = o.default.useMemo(() => {
                    if (!n) return {
                        shareQuantity: "--",
                        averagePrice: "--",
                        amountToReceive: l.closed ? "$0.00" : "--"
                    };
                    if (A.current) return A.current;
                    let e = l.closed && "1" === l.outcomePrices[n.sell.outcomeIdx];
                    return {
                        shareQuantity: n.qty,
                        averagePrice: `${(0,z.formatNum)(100*g,{decimals:1,optionalDecimals:!0,commas:!1})}\xa2`,
                        amountToReceive: l.closed ? e ? (0, z.formatCurrency)(parseFloat(n.sell.qty), {
                            decimals: 2
                        }) : "$0.00" : `${(0,z.formatCurrency)(m,{decimals:2})??"$0.00"}`
                    }
                }, [n, m, g, l.closed, l.outcomePrices]),
                F = o.default.useMemo(() => {
                    if (l.closed || 100 === N || M.current <= 0) return R;
                    let e = M.current * N / 100;
                    return e < 10 ? (0, z.formatToDecimal)(e, 2) : (0, z.formatNum)(e, {
                        decimals: 0,
                        commas: !1
                    })
                }, [N, R, l.closed]);
            o.default.useEffect(() => {
                "rest" === d ? A.current = null : A.current = {
                    shareQuantity: R,
                    averagePrice: L,
                    amountToReceive: $
                }
            }, [d, R, L, $]);
            let B = o.default.useCallback(async e => {
                    await c(e.nativeEvent, {
                        point: {
                            x: e.clientX,
                            y: e.clientY
                        }
                    }, void 0, void 0, () => i(!1)), h.trackEvent(es.Events.SportsCashOutModalClick, {
                        closed: l.closed,
                        percentage: N
                    })
                }, [c, i, h, l.closed, N]),
                q = o.default.useMemo(() => u ? l.closed ? `${w("trading.redeem")} ${$}` : `${w("trading.cashOut")} ${$}` : w("trading.unavailable"), [u, l.closed, $, w]);
            return (0, a.jsxs)(a.Fragment, {
                children: [(0, a.jsx)(t5.ModalHeader, {
                    children: (0, a.jsx)(t5.ModalTitle, {
                        children: j
                    })
                }), C && (0, a.jsx)(t5.ModalDescription, {
                    children: C
                }), (0, a.jsx)(sc.RedeemAmount, {
                    amount: $,
                    shares: l.closed ? void 0 : F,
                    avgPrice: l.closed ? void 0 : L
                }), !l.closed && (0, a.jsxs)("div", {
                    className: "px-1 pb-4",
                    children: [(0, a.jsxs)("div", {
                        className: "relative",
                        children: [(0, a.jsx)(a7.Slider, {
                            min: 0,
                            max: 100,
                            step: 1,
                            value: [N],
                            onValueChange: ([e]) => _(e),
                            thumbClassName: "bg-brand-500 size-[18px] z-10",
                            trackClassName: "h-1 mx-[9px]"
                        }), (0, a.jsx)("div", {
                            className: "absolute top-1/2 left-0 right-0 -translate-y-1/2 pointer-events-none",
                            children: sQ.map(e => (0, a.jsx)("div", {
                                style: {
                                    left: `calc(9px + (100% - 18px) * ${e/100})`
                                },
                                className: (0, p.cn)("absolute top-1/2 -translate-x-1/2 -translate-y-1/2 size-1.5 rounded-full", N >= e ? "bg-brand-500" : "bg-neutral-300 dark:bg-neutral-500")
                            }, e))
                        })]
                    }), (0, a.jsx)("div", {
                        className: "relative mt-1 h-4",
                        children: sQ.map(e => (0, a.jsxs)("button", {
                            type: "button",
                            onClick: () => _(e),
                            style: {
                                left: `calc(9px + (100% - 18px) * ${e/100})`
                            },
                            className: (0, p.cn)("absolute -translate-x-1/2 text-xs font-medium cursor-pointer transition-colors hover:text-brand-500", N >= e ? "text-brand-500" : "text-text-tertiary"),
                            children: [e, "%"]
                        }, e))
                    })]
                }), (0, a.jsxs)(t5.ModalFooter, {
                    children: [!l.closed && (0, a.jsx)(v.Button, {
                        variant: "outline",
                        onClick: () => {
                            i(!1), h.trackEvent(es.Events.SportsCashOutEditClick)
                        },
                        children: "Edit order"
                    }), (0, a.jsx)(v.Button, {
                        onClick: B,
                        disabled: I || P || !u || "rest" !== d && "success" !== d,
                        children: q
                    })]
                })]
            })
        },
        sJ = () => {
            let e, t, r, l, n, o, i, c, u = (0, s.c)(15);
            u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["positions"], u[0] = e) : e = u[0];
            let {
                positions: d
            } = (0, sr.useEventPositionsContext)(e);
            u[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], u[1] = t) : t = u[1];
            let {
                activeMarket: m
            } = (0, f.useEventActiveMarketContext)(t);
            u[2] === Symbol.for("react.memo_cache_sentinel") ? (r = ["selectedOutcomeIdx"], u[2] = r) : r = u[2];
            let {
                selectedOutcomeIdx: g
            } = (0, eT.useTradeContext)(r);
            u[3] !== m.conditionId || u[4] !== d || u[5] !== g ? (l = d ? .find(e => parseInt(e.outcomeIndex, 10) === g && e.market.id.toLowerCase() === m.conditionId.toLowerCase()), u[3] = m.conditionId, u[4] = d, u[5] = g, u[6] = l) : l = u[6], u[7] !== l ? (n = {
                position: l
            }, u[7] = l, u[8] = n) : n = u[8];
            let {
                position: p
            } = n, h = (0, a8.usePrevious)(p), x = p ? ? h;
            return x ? (u[9] === Symbol.for("react.memo_cache_sentinel") ? (o = {
                book: "never",
                lastPrice: "never"
            }, u[9] = o) : o = u[9], u[10] !== x ? (i = (0, a.jsx)(t5.ModalContent, {
                children: (0, a.jsx)(sZ, {
                    position: x
                })
            }), u[10] = x, u[11] = i) : i = u[11], u[12] !== m || u[13] !== i ? (c = (0, a.jsx)(eE.BookContextProvider, {
                market: m,
                prefetch: o,
                poll: "never",
                subscribe: "never",
                defer: "never",
                children: i
            }), u[12] = m, u[13] = i, u[14] = c) : c = u[14], c) : null
        };
    sJ.displayName = "BinaryActiveMarketCashOutContent";
    let sX = e => {
        let t, r, l, n, i, c = (0, s.c)(12),
            {
                cashOutMode: u,
                redemptionConditionIds: d
            } = e;
        c[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], c[0] = t) : t = c[0];
        let {
            event: m
        } = (0, eC.useEventContext)(t);
        c[1] !== m ? (r = () => ({
            event: m,
            variant: "card",
            orientation: "desktop"
        }), c[1] = m, c[2] = r) : r = c[2];
        let [g] = o.default.useState(r);
        return c[3] !== u || c[4] !== d ? (l = (0, a.jsx)(si.SportsRedeemContent, {
            variant: u,
            conditionIds: d
        }), c[3] = u, c[4] = d, c[5] = l) : l = c[5], c[6] !== m || c[7] !== l ? (n = (0, a.jsx)(sa.SportsItemContextProvider, {
            children: (0, a.jsx)(ss.SportsPositionContextProvider, {
                event: m,
                children: l
            })
        }), c[6] = m, c[7] = l, c[8] = n) : n = c[8], c[9] !== g || c[10] !== n ? (i = (0, a.jsx)(t5.ModalContent, {
            children: (0, a.jsx)(so.SportsItemStoreProvider, {
                initialState: g,
                children: n
            })
        }), c[9] = g, c[10] = n, c[11] = i) : i = c[11], i
    };
    sX.displayName = "BinaryClosedMarketCashOutContent";
    let s0 = e => {
        let t, r, l, n = (0, s.c)(7),
            {
                cashOutMode: o,
                redemptionConditionIds: i
            } = e;
        n[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event", "isNegRiskSportsEvent"], n[0] = t) : t = n[0];
        let {
            event: c,
            isNegRiskSportsEvent: u
        } = (0, eC.useEventContext)(t);
        e: {
            if (!u) {
                r = !1;
                break e
            }
            r = c.closed || c.markets.some(s1)
        }
        let d = r;
        if (c.closed && o && "single" !== o) {
            let e;
            return n[1] !== o || n[2] !== c.slug || n[3] !== i ? (e = (0, a.jsx)(sX, {
                cashOutMode: o,
                redemptionConditionIds: i
            }, c.slug), n[1] = o, n[2] = c.slug, n[3] = i, n[4] = e) : e = n[4], e
        }
        if (d) {
            let e;
            return n[5] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(sK, {}), n[5] = e) : e = n[5], e
        }
        return n[6] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(sJ, {}), n[6] = l) : l = n[6], l
    };

    function s1(e) {
        return e.closed
    }

    function s2(e) {
        let t, r, l = (0, s.c)(3);
        return l[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)("path", {
            fill: "currentColor",
            d: "M3.75 2.875c.483 0 .875.392.875.875v5.887l2.152-2.152.105-.094a1.376 1.376 0 0 1 1.735 0l.105.094 3.027 3.028 3.88-3.881a.876.876 0 0 1 1.24 1.238l-4.147 4.146a1.375 1.375 0 0 1-1.945 0L7.75 8.987l-3.124 3.125v1.638c0 .622.503 1.125 1.125 1.125h10.5a.875.875 0 0 1 0 1.75H5.75a2.874 2.874 0 0 1-2.875-2.875v-10c0-.483.392-.875.875-.875"
        }), l[0] = t) : t = l[0], l[1] !== e ? (r = (0, a.jsx)("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: 20,
            height: 20,
            fill: "none",
            viewBox: "0 0 20 20",
            "aria-hidden": !0,
            ...e,
            children: t
        }), l[1] = e, l[2] = r) : r = l[2], r
    }

    function s3(e) {
        let t, r, l = (0, s.c)(3);
        return l[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)("path", {
            fill: "currentColor",
            fillRule: "evenodd",
            d: "M3.901 3.9a.875.875 0 0 1 1.237 1.24 6.874 6.874 0 0 0 0 9.72.876.876 0 0 1-1.237 1.24 8.625 8.625 0 0 1 0-12.2m10.96.002a.875.875 0 0 1 1.237-.001 8.625 8.625 0 0 1 .001 12.198.876.876 0 0 1-1.238-1.238 6.874 6.874 0 0 0 0-9.722.875.875 0 0 1 0-1.237m-8.839 2.12A.875.875 0 0 1 7.26 7.26a3.876 3.876 0 0 0 0 5.48.875.875 0 0 1-1.237 1.238 5.627 5.627 0 0 1 0-7.956m6.718 0a.876.876 0 0 1 1.238 0 5.627 5.627 0 0 1 0 7.956.876.876 0 0 1-1.238-1.237 3.875 3.875 0 0 0 0-5.48.876.876 0 0 1 0-1.24M10 7.374a2.626 2.626 0 1 1 0 5.252 2.626 2.626 0 0 1 0-5.252m0 1.75a.875.875 0 1 0 .001 1.751.875.875 0 0 0 0-1.75",
            clipRule: "evenodd"
        }), l[0] = t) : t = l[0], l[1] !== e ? (r = (0, a.jsx)("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: 20,
            height: 20,
            fill: "none",
            viewBox: "0 0 20 20",
            "aria-hidden": !0,
            ...e,
            children: t
        }), l[1] = e, l[2] = r) : r = l[2], r
    }
    s0.displayName = "CashOutModalContent";
    var s5 = e.i(402972),
        s4 = e.i(827681),
        s6 = e.i(863828),
        s7 = e.i(59874);
    let s8 = {
        dark: {
            colors: {
                primary: ["--color-neutral-950", "--color-neutral-900", "--color-neutral-800"],
                secondary: ["--color-neutral-500", "--color-neutral-600", "--color-neutral-700"],
                slate: ["--color-neutral-600", "--color-neutral-700", "--color-neutral-500", "--color-neutral-400"],
                dark: ["--surface-1", "--surface-1", "--surface-1", "--surface-1"],
                light: ["--color-neutral-950", "--color-neutral-800", "--color-neutral-700", "--color-neutral-600"],
                base: {
                    0: "--color-neutral-950",
                    5: "--color-neutral-950",
                    10: "--color-neutral-900",
                    15: "--color-neutral-900",
                    20: "--color-neutral-800",
                    25: "--color-neutral-700",
                    30: "--color-neutral-600",
                    35: "--color-neutral-500",
                    40: "--color-neutral-400",
                    45: "--color-neutral-300",
                    50: "--color-neutral-200",
                    55: "--color-neutral-200",
                    60: "--color-neutral-100",
                    65: "--color-neutral-100",
                    70: "--color-neutral-50",
                    75: "--color-neutral-0",
                    80: "--surface-1",
                    85: "--surface-1",
                    90: "--surface-1",
                    95: "--surface-1",
                    100: "--surface-1"
                },
                main: {
                    background: ["--surface-1", "--surface-1", "--surface-1", "--surface-1"],
                    typography: ["--color-neutral-950", "--color-neutral-700", "--color-neutral-600", "--color-neutral-500"]
                }
            }
        },
        light: {
            colors: {
                primary: ["--color-neutral-950", "--color-neutral-900", "--color-neutral-800"],
                secondary: ["--color-neutral-500", "--color-neutral-600", "--color-neutral-700"],
                slate: ["--color-neutral-600", "--color-neutral-700", "--color-neutral-500", "--color-neutral-400"],
                dark: ["--color-neutral-0", "--color-neutral-0", "--color-neutral-0", "--color-neutral-0"],
                light: ["--color-neutral-950", "--color-neutral-800", "--color-neutral-700", "--color-neutral-600"],
                base: {
                    0: "--color-neutral-950",
                    5: "--color-neutral-950",
                    10: "--color-neutral-900",
                    15: "--color-neutral-900",
                    20: "--color-neutral-800",
                    25: "--color-neutral-700",
                    30: "--color-neutral-600",
                    35: "--color-neutral-500",
                    40: "--color-neutral-400",
                    45: "--color-neutral-300",
                    50: "--color-neutral-200",
                    55: "--color-neutral-200",
                    60: "--color-neutral-100",
                    65: "--color-neutral-100",
                    70: "--color-neutral-50",
                    75: "--color-neutral-0",
                    80: "--color-neutral-0",
                    85: "--color-neutral-0",
                    90: "--color-neutral-0",
                    95: "--color-neutral-0",
                    100: "--color-neutral-0"
                },
                main: {
                    background: ["--color-neutral-0", "--color-neutral-0", "--color-neutral-0", "--color-neutral-0"],
                    typography: ["--color-neutral-950", "--color-neutral-700", "--color-neutral-600", "--color-neutral-500"]
                }
            }
        }
    };

    function s9(e, t) {
        return e ? .getPropertyValue(t).trim() ? ? ""
    }

    function le(e, t) {
        return e.map(e => s9(t, e))
    }
    let lt = null;

    function lr() {}

    function la() {
        return !!window.grid ? .loadWidget
    }

    function ls(e) {
        let t, r, l, n, i, c = (0, s.c)(14),
            {
                type: u,
                gridSeriesId: d,
                className: m,
                style: g,
                widgetOptions: p
            } = e,
            {
                resolvedTheme: f
            } = (0, tV.useTheme)(),
            h = (0, o.useRef)(null),
            {
                isReady: x
            } = function() {
                let e, t, r, a = (0, s.c)(5),
                    [l, n] = (0, o.useState)(la);
                return a[0] !== l ? (e = () => {
                    l || (lt || (window.grid ? .loadWidget ? Promise.resolve() : lt = new Promise((e, t) => {
                        let r = document.createElement("script");
                        r.src = "https://cdn.grid.gg/widgets/latest/embed.js", r.defer = !0, r.addEventListener("load", () => e()), r.addEventListener("error", () => {
                            lt = null, t(Error("Failed to load Grid embed script"))
                        }), document.head.appendChild(r)
                    }))).then(() => n(!0)).catch(lr)
                }, t = [l], a[0] = l, a[1] = e, a[2] = t) : (e = a[1], t = a[2]), (0, o.useEffect)(e, t), a[3] !== l ? (r = {
                    isReady: l
                }, a[3] = l, a[4] = r) : r = a[4], r
            }(),
            [v, b] = (0, o.useState)(ll);
        c[0] !== v ? (t = () => {
            if (v) return;
            if ("complete" === document.readyState) return void b(!0);
            let e = () => b(!0);
            return window.addEventListener("load", e, {
                once: !0
            }), () => {
                window.removeEventListener("load", e)
            }
        }, r = [v], c[0] = v, c[1] = t, c[2] = r) : (t = c[1], r = c[2]), (0, o.useEffect)(t, r), c[3] !== d || c[4] !== v || c[5] !== x || c[6] !== f || c[7] !== u || c[8] !== p ? (l = () => {
            let e = h.current;
            if (!e || !v || !x || !window.grid ? .loadWidget) return;
            let t = null,
                r = window.requestAnimationFrame(() => {
                    var r;
                    let a, s;
                    (t = document.createElement("div")).className = "w-full", e.replaceChildren(t), window.grid ? .loadWidget({
                        el: t,
                        type: u,
                        scope: {
                            type: "series",
                            id: d
                        },
                        options: {
                            teamColorType: "team",
                            ...p
                        },
                        theme: (a = s8["dark" === f ? "dark" : "light"], s = window.getComputedStyle(document.documentElement), {
                            colors: {
                                primary: le(a.colors.primary, s),
                                secondary: le(a.colors.secondary, s),
                                slate: le(a.colors.slate, s),
                                dark: le(a.colors.dark, s),
                                light: le(a.colors.light, s),
                                base: (r = a.colors.base, Object.fromEntries(Object.entries(r).map(([e, t]) => [Number(e), s9(s, t)]))),
                                main: {
                                    background: le(a.colors.main.background, s),
                                    typography: le(a.colors.main.typography, s)
                                }
                            }
                        }),
                        delay: "zero"
                    })
                });
            return () => {
                window.cancelAnimationFrame(r), t && e.contains(t) && t.remove()
            }
        }, n = [u, d, v, x, p, f], c[3] = d, c[4] = v, c[5] = x, c[6] = f, c[7] = u, c[8] = p, c[9] = l, c[10] = n) : (l = c[9], n = c[10]), (0, o.useEffect)(l, n);
        let y = `w-full ${m??""}`;
        return c[11] !== g || c[12] !== y ? (i = (0, a.jsx)("div", {
            ref: h,
            className: y,
            style: g
        }), c[11] = g, c[12] = y, c[13] = i) : i = c[13], i
    }

    function ll() {
        return "u" > typeof document && "complete" === document.readyState
    }
    let ln = [{
        id: "scoreboard",
        label: "Scoreboard",
        kind: "scoreboard",
        showInTabs: !1
    }, {
        id: "overview",
        label: "Map",
        kind: "grid",
        showInTabs: !0,
        layout: "single",
        widgetType: "game-overview"
    }, {
        id: "kd",
        label: "Team Stats",
        kind: "grid",
        showInTabs: !0,
        layout: "split",
        widgetType: "series-team-scoreboard"
    }, {
        id: "player-stats",
        label: "Player Stats",
        kind: "grid",
        showInTabs: !0,
        layout: "single",
        widgetType: "series-table"
    }, {
        id: "live-log",
        label: "Live Logs",
        kind: "grid",
        showInTabs: !0,
        layout: "single",
        widgetType: "series-livelog",
        enabled: !1
    }, {
        id: "comparison",
        label: "Comparison",
        kind: "grid",
        showInTabs: !0,
        layout: "single",
        widgetType: "series-comparison"
    }, {
        id: "livestream",
        label: "Livestream",
        kind: "livestream",
        showInTabs: !1
    }];

    function lo() {
        return ln.filter(e => "grid" === e.kind && (!("enabled" in e) || !1 !== e.enabled))
    }
    var li = e.i(269324),
        lc = e.i(234097),
        lu = e.i(100825),
        ld = e.i(66674),
        lm = e.i(421569);

    function lg(e) {
        let t, r, l, n = (0, s.c)(7),
            {
                items: i
            } = e;
        n[0] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, v.buttonVariants)({
            variant: "link",
            size: "sm",
            className: "!px-0.5 first:!pl-0 text-text-secondary hover:text-text-tertiary text-sm !font-[540]"
        }), n[0] = t) : t = n[0];
        let c = t;
        if (n[1] !== i) {
            let e;
            n[3] !== i.length ? (e = (e, t) => (0, a.jsxs)(o.Fragment, {
                children: [e.disabled ? (0, a.jsx)("span", {
                    className: (0, v.buttonVariants)({
                        variant: "link",
                        size: "sm",
                        className: "px-0.5! first:pl-0! text-text-secondary text-sm font-[540]!"
                    }),
                    children: e.label
                }) : (0, a.jsx)(e$.default, {
                    className: c,
                    href: e.href,
                    onClick: e.onClick,
                    prefetch: !0,
                    children: e.label
                }), t < i.length - 1 && (0, a.jsx)("span", {
                    className: "text-text-secondary",
                    children: "·"
                })]
            }, e.href), n[3] = i.length, n[4] = e) : e = n[4], r = i.map(e), n[1] = i, n[2] = r
        } else r = n[2];
        return n[5] !== r ? (l = (0, a.jsx)("div", {
            className: "flex items-center gap-1 [&_svg]:text-text-secondary",
            children: r
        }), n[5] = r, n[6] = l) : l = n[6], l
    }

    function lp(e) {
        let t, r, l, n, o, i, c, u, d, m = (0, s.c)(27),
            {
                breadcrumbs: g,
                breadcrumbsSlot: p,
                title: f,
                subtitle: h,
                backHref: x,
                actions: v,
                centerOnMobile: b,
                className: y
            } = e,
            S = void 0 === b || b;
        m[0] !== y ? (t = (0, eL.cn)("relative flex w-full justify-between items-start mb-7", y), m[0] = y, m[1] = t) : t = m[1], m[2] !== x ? (r = x && (0, a.jsx)(e$.default, {
            href: x,
            className: "absolute top-0 left-0 flex items-center text-text-secondary p-1 lg:hidden",
            children: (0, a.jsx)(lm.IconChevronLeftOutline12, {})
        }), m[2] = x, m[3] = r) : r = m[3];
        let k = S ? "max-lg:items-center" : "max-lg:items-start",
            w = S && x && "max-lg:pl-6";
        m[4] !== k || m[5] !== w ? (l = (0, eL.cn)("flex flex-col gap-2 max-lg:w-full max-lg:gap-3", k, w), m[4] = k, m[5] = w, m[6] = l) : l = m[6], m[7] !== g || m[8] !== p ? (n = p ? ? (g && (0, a.jsx)(lg, {
            items: g
        })), m[7] = g, m[8] = p, m[9] = n) : n = m[9];
        let j = S && "max-lg:text-center";
        return m[10] !== j ? (o = (0, eL.cn)("text-lg max-lg:font-medium lg:text-heading-2xl font-semibold", j), m[10] = j, m[11] = o) : o = m[11], m[12] !== o || m[13] !== f ? (i = (0, a.jsx)("h1", {
            className: o,
            children: f
        }), m[12] = o, m[13] = f, m[14] = i) : i = m[14], m[15] !== h || m[16] !== i || m[17] !== l || m[18] !== n ? (c = (0, a.jsxs)("div", {
            className: l,
            children: [n, i, h]
        }), m[15] = h, m[16] = i, m[17] = l, m[18] = n, m[19] = c) : c = m[19], m[20] !== v ? (u = v && (0, a.jsx)("div", {
            className: "flex items-center gap-0.5 max-lg:absolute max-lg:-top-1 max-lg:right-0",
            children: v
        }), m[20] = v, m[21] = u) : u = m[21], m[22] !== c || m[23] !== u || m[24] !== t || m[25] !== r ? (d = (0, a.jsxs)("div", {
            className: t,
            children: [r, c, u]
        }), m[22] = c, m[23] = u, m[24] = t, m[25] = r, m[26] = d) : d = m[26], d
    }
    var lf = e.i(97271),
        lh = e.i(27235),
        lx = e.i(327673),
        lv = e.i(394341),
        lb = e.i(30704),
        ly = e.i(982214),
        lS = e.i(715877),
        lk = e.i(925437),
        lw = e.i(222691),
        lj = e.i(661879),
        lC = e.i(560127),
        lN = e.i(909838);
    let lT = e => {
        let t, r, l, n, o, i, c = (0, s.c)(20),
            {
                market: u,
                isPriceMarket: d,
                filledOrders: m,
                hasAllHistory: g
            } = e;
        c[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["positions"], c[0] = t) : t = c[0];
        let {
            positions: f
        } = (0, sr.useEventPositionsContext)(t);
        c[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["authenticated"], c[1] = r) : r = c[1];
        let {
            authenticated: h
        } = (0, L.useAccountContext)(r), x = (0, a6.usePositionValuationPrice)(u, 0), v = (0, a6.usePositionValuationPrice)(u, 1);
        e: {
            let e;
            if (!h) {
                l = null;
                break e
            }
            let t = x || parseFloat(u.outcomePrices ? .[0] ? ? "0"),
                r = v || parseFloat(u.outcomePrices ? .[1] ? ? "0"),
                a = m && m.length > 0;
            if (a && g) {
                let e;
                c[2] !== m || c[3] !== u || c[4] !== r || c[5] !== t ? (e = ((e, t, r, a) => {
                    let s = 0,
                        l = {};
                    for (let t of e) {
                        let e = t.outcome;
                        "BUY" === t.side ? (s -= t.totalValue, l[e] = (l[e] ? ? 0) + t.filledSize) : (s += t.totalValue, l[e] = (l[e] ? ? 0) - t.filledSize)
                    }
                    for (let [e, n] of Object.entries(l))
                        if (Math.abs(n) > .01) {
                            let l = t.outcomes.findIndex(t => t.toLowerCase() === e.toLowerCase());
                            s += n * (0 === l ? r : 1 === l ? a : 0)
                        }
                    return s
                })(m, u, t, r), c[2] = m, c[3] = u, c[4] = r, c[5] = t, c[6] = e) : e = c[6], l = e;
                break e
            }
            c[7] !== u || c[8] !== f || c[9] !== r || c[10] !== t ? (e = f ? ((e, t, r, a) => {
                let s = e.filter(e => e.market ? .id ? .toLowerCase() === a.toLowerCase());
                if (0 === s.length) return null;
                let l = 0;
                for (let e of s) try {
                    let a = (0, P.augmentTrackedPositionOptimistically)({ ...e,
                            market: { ...e.market,
                                outcomeTokenPrices: [t.toString(), r.toString()]
                            }
                        }),
                        s = (0, W.getTotalProfit)(a);
                    l += parseFloat((0, z.formatUSDCUnits)(s))
                } catch {}
                return l
            })(f, t, r, u.conditionId) : null, c[7] = u, c[8] = f, c[9] = r, c[10] = t, c[11] = e) : e = c[11];
            let s = e;
            if (null !== s) {
                l = s;
                break e
            }
            if (a && !g) {
                l = null;
                break e
            }
            l = null
        }
        let b = l;
        if (null === b) return null;
        let y = d ? "top-16 lg:top-[72px]" : "top-[60px]",
            S = Math.round(100 * b) / 100 >= 0 ? "bg-green-600/10 text-green-600 dark:bg-green-400/15 dark:text-green-400" : "bg-red-500/10 text-red-500";
        return c[12] !== y || c[13] !== S ? (n = (0, p.cn)("absolute left-0 z-10 px-2.5 py-1 rounded-full text-xs font-semibold", y, S), c[12] = y, c[13] = S, c[14] = n) : n = c[14], c[15] !== b ? (o = (0, z.toUSCurrency)(b, {
            signDisplay: "always"
        }), c[15] = b, c[16] = o) : o = c[16], c[17] !== n || c[18] !== o ? (i = (0, a.jsxs)("div", {
            className: n,
            children: ["ROI ", o]
        }), c[17] = n, c[18] = o, c[19] = i) : i = c[19], i
    };
    var lM = e.i(532766),
        l_ = e.i(987228),
        lI = e.i(344500),
        lE = e.i(798631),
        lD = e.i(810912),
        lP = e.i(884446),
        lA = e.i(953144);
    let lO = e => {
        let t, r, l, n, o, i, c, u, d = (0, s.c)(17);
        d[0] !== e ? ({
            ref: r,
            ...t
        } = e, d[0] = e, d[1] = t, d[2] = r) : (t = d[1], r = d[2]);
        let m = (0, O.useTranslations)(),
            {
                openOrders: g
            } = (0, ss.useSportsPositionContext)(),
            {
                orders: p
            } = (0, lP.useSportsItemOrders)(g);
        return p.length ? (d[3] !== m ? (l = m("events.tabs.openOrders"), d[3] = m, d[4] = l) : l = d[4], d[5] !== l ? (n = (0, a.jsx)("p", {
            className: "text-sm font-semibold",
            children: l
        }), d[5] = l, d[6] = n) : n = d[6], d[7] === Symbol.for("react.memo_cache_sentinel") ? (o = (0, a.jsx)("div", {
            className: "flex w-[32px] h-[32px] justify-center items-center rounded-full group-data-[state=open]:rotate-180 transition-all",
            children: (0, a.jsx)(lE.IconChevronDownOutline12, {})
        }), d[7] = o) : o = d[7], d[8] !== n ? (i = (0, a.jsxs)(lD.Accordion.Trigger, {
            className: "flex w-full h-[64px] justify-between items-center px-4 cursor-pointer outline-none group",
            children: [n, o]
        }), d[8] = n, d[9] = i) : i = d[9], d[10] !== p || d[11] !== t || d[12] !== r ? (c = (0, a.jsx)(lD.Accordion.Content, {
            className: "overflow-hidden w-full data-[state=closed]:animate-accordionSlideUp data-[state=open]:animate-accordionSlideDown",
            children: (0, a.jsx)(lA.DesktopSportsItemOrders, {
                ref: r,
                orders: p,
                view: "smp",
                ...t
            })
        }), d[10] = p, d[11] = t, d[12] = r, d[13] = c) : c = d[13], d[14] !== i || d[15] !== c ? (u = (0, a.jsx)(lD.Accordion.Root, {
            type: "single",
            defaultValue: "",
            collapsible: !0,
            children: (0, a.jsxs)(lD.Accordion.Item, {
                value: "orders",
                className: "rounded-xl mt-4 border bg-surface-1",
                children: [i, c]
            })
        }), d[14] = i, d[15] = c, d[16] = u) : u = d[16], u) : null
    };
    lO.displayName = "DesktopSmpSportsItemOrders";
    var lR = e.i(85510),
        lL = e.i(605797),
        l$ = e.i(507909),
        lF = e.i(898777);
    let lB = {
            duration: .2,
            ease: l$.transition.ease
        },
        lq = e => {
            let t, r, l, n, o, i, c, u, d, m, g, p, f, h = (0, s.c)(29);
            h[0] !== e ? ({
                ref: r,
                ...t
            } = e, h[0] = e, h[1] = t, h[2] = r) : (t = h[1], r = h[2]);
            let x = (0, O.useTranslations)(),
                {
                    positions: b
                } = (0, ss.useSportsPositionContext)(),
                {
                    positions: y
                } = (0, lL.useSportsItemPositions)(b),
                [S, k] = (0, lR.useMeasure)();
            return y.length ? (h[3] !== x ? (l = x("trading.allPositions"), h[3] = x, h[4] = l) : l = h[4], h[5] !== l ? (n = (0, a.jsx)("p", {
                className: "text-sm font-semibold",
                children: l
            }), h[5] = l, h[6] = n) : n = h[6], h[7] === Symbol.for("react.memo_cache_sentinel") ? (o = (0, a.jsx)(v.Button, {
                variant: "ghost",
                size: "iconSm",
                className: "rounded-full",
                children: (0, a.jsx)(lE.IconChevronDownOutline12, {
                    className: "transition ease-out group-data-[state=open]:rotate-180"
                })
            }), h[7] = o) : o = h[7], h[8] !== n ? (i = (0, a.jsxs)(lD.Accordion.Trigger, {
                className: "flex w-full h-[64px] justify-between items-center px-4 cursor-pointer outline-none group hover:bg-neutral-50/50 dark:hover:bg-neutral-100/50",
                children: [n, o]
            }), h[8] = n, h[9] = i) : i = h[9], h[10] !== k.height ? (c = {
                height: k.height
            }, u = {
                height: k.height
            }, d = {
                height: k.height
            }, h[10] = k.height, h[11] = c, h[12] = u, h[13] = d) : (c = h[11], u = h[12], d = h[13]), h[14] !== y || h[15] !== t || h[16] !== r ? (m = (0, a.jsx)(lF.DesktopSportsItemPositions, {
                ref: r,
                positions: y,
                view: "smp",
                ...t
            }), h[14] = y, h[15] = t, h[16] = r, h[17] = m) : m = h[17], h[18] !== S || h[19] !== m ? (g = (0, a.jsx)("div", {
                ref: S,
                children: m
            }), h[18] = S, h[19] = m, h[20] = g) : g = h[20], h[21] !== c || h[22] !== u || h[23] !== d || h[24] !== g ? (p = (0, a.jsx)(lD.Accordion.Content, {
                className: "w-full h-fit bg-transparent shrink-0 overflow-hidden data-[state=closed]:animate-accordionSlideUp data-[state=open]:animate-accordionSlideDown max-h-[300px] overflow-y-auto",
                children: (0, a.jsx)(rZ.motion.div, {
                    initial: c,
                    animate: u,
                    exit: d,
                    transition: lB,
                    className: "w-full bg-transparent overflow-visible",
                    children: g
                })
            }), h[21] = c, h[22] = u, h[23] = d, h[24] = g, h[25] = p) : p = h[25], h[26] !== p || h[27] !== i ? (f = (0, a.jsx)(lD.Accordion.Root, {
                type: "single",
                defaultValue: "",
                collapsible: !0,
                children: (0, a.jsxs)(lD.Accordion.Item, {
                    value: "positions",
                    className: "rounded-xl mt-4 border bg-surface-1",
                    children: [i, p]
                })
            }), h[26] = p, h[27] = i, h[28] = f) : f = h[28], f) : null
        };
    lq.displayName = "DesktopSmpSportsItemPositions";
    let lU = (0, lf.default)(() => e.A(427769), {
            loadableGenerated: {
                modules: [276325]
            },
            ssr: !1
        }),
        lz = e => {
            let t, r, l, n, o, i, c, u, d, m, g, h, x, v, b, y, S, k, w, j, C, N = (0, s.c)(88),
                {
                    isSportsOverlay: T,
                    teamColors: M,
                    tab: _
                } = e;
            N[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket", "activeMarketTickSize"], N[0] = t) : t = N[0];
            let {
                activeMarket: I,
                activeMarketTickSize: E
            } = (0, f.useEventActiveMarketContext)(t);
            N[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["event", "eventSettings", "hitMarketChartData"], N[1] = r) : r = N[1];
            let {
                event: D,
                eventSettings: P,
                hitMarketChartData: A
            } = (0, eC.useEventContext)(r), {
                filledOrders: O,
                hasNextPage: R,
                fetchNextPage: $,
                isFetching: F
            } = (0, lv.useFilledOrders)(), B = I ? .clobTokenIds, q = I ? .conditionId;
            N[2] !== E || N[3] !== B || N[4] !== q ? (l = {
                clobTokenIds: B,
                conditionId: q,
                orderPriceMinTickSize: E
            }, N[2] = E, N[3] = B, N[4] = q, N[5] = l) : l = N[5];
            let {
                userOpenOrders: U
            } = (0, lb.default)(l);
            N[6] === Symbol.for("react.memo_cache_sentinel") ? (n = ["authenticated"], N[6] = n) : n = N[6];
            let {
                authenticated: z
            } = (0, L.useAccountContext)(n);
            N[7] === Symbol.for("react.memo_cache_sentinel") ? (o = ["isSportsPage"], N[7] = o) : o = N[7];
            let {
                isSportsPage: W
            } = (0, eN.useSportsContext)(o), H = T && W, V = !!A;
            N[8] !== I.closed ? (i = I.closed && {
                chartWindow: lk.CHART_WINDOWS[lk.CHART_WINDOWS.length - 1]
            }, N[8] = I.closed, N[9] = i) : i = N[9], N[10] !== i ? (c = {
                annotationMode: "bottom-bar",
                mode: "single",
                outcomeMode: "single",
                height: 320,
                ...i,
                showOptions: !1,
                oddsDisplay: "tooltip"
            }, N[10] = i, N[11] = c) : c = N[11];
            let Y = c;
            N[12] !== D.tags ? (u = D.tags ? .some(lW), N[12] = D.tags, N[13] = u) : u = N[13];
            let K = u;
            N[14] !== K ? (d = K && {
                initialWindow: "1h"
            }, N[14] = K, N[15] = d) : d = N[15], N[16] !== Y || N[17] !== d ? (m = { ...Y,
                ...d
            }, N[16] = Y, N[17] = d, N[18] = m) : m = N[18];
            let Q = m,
                Z = (0, lj.useAnnotations)(D.slug),
                J = (0, lS.useConvertBinaryMarketToChartMarkets)(I),
                {
                    priceMarketSettings: X
                } = P,
                ee = !!X.priceMarketsUiEnabled && ("hourly" === X.variant || "daily" === X.variant || "fiveminute" === X.variant || "fifteen" === X.variant || "fourhour" === X.variant);
            return N[19] !== I || N[20] !== Z || N[21] !== J || N[22] !== D || N[23] !== O || N[24] !== R || N[25] !== A || N[26] !== H || N[27] !== V || N[28] !== ee || N[29] !== Q || N[30] !== X.abbreviation || N[31] !== X.assetType || N[32] !== X.etDate || N[33] !== X.name || N[34] !== X.priceMarketsUiEnabled || N[35] !== X.timestamp || N[36] !== X.utcDate || N[37] !== X.variant ? (g = !H && 137 === G.MATIC_CONFIG.chainId && I.enableOrderBook && (0, a.jsxs)("div", {
                className: "overflow-visible relative",
                children: [(0, a.jsx)(lT, {
                    market: I,
                    isPriceMarket: ee,
                    filledOrders: O,
                    hasAllHistory: !R
                }), ee && (0, a.jsx)(lw.PriceChart, {
                    event: D,
                    height: 320,
                    timestamp: X.timestamp,
                    etDate: X.etDate,
                    utcDate: X.utcDate,
                    name: X.name,
                    abbreviation: X.abbreviation,
                    assetType: X.assetType
                }), !ee && V && A.symbol && A.data.length > 0 && (0, a.jsx)(lC.HitMarketChart, {
                    data: A.data,
                    strikePrice: A.strikePrice,
                    symbol: A.symbol,
                    startDate: A.startDate,
                    endDate: A.endDate
                }), !ee && (!V || !A ? .symbol || 0 === A.data.length) && (0, a.jsx)(ly.GroupChart, {
                    markets: J,
                    lowChanceMarkets: [],
                    resolvedMarkets: [],
                    event: D,
                    options: Q,
                    annotations: Z
                }), (0, a.jsx)(lN.LiveActivityIndicator, {
                    conditionIds: [I.conditionId].filter(Boolean),
                    className: (0, p.cn)(X.priceMarketsUiEnabled && ("hourly" === X.variant || "fiveminute" === X.variant || "fifteen" === X.variant) && "bottom-[110px]")
                })]
            }), N[19] = I, N[20] = Z, N[21] = J, N[22] = D, N[23] = O, N[24] = R, N[25] = A, N[26] = H, N[27] = V, N[28] = ee, N[29] = Q, N[30] = X.abbreviation, N[31] = X.assetType, N[32] = X.etDate, N[33] = X.name, N[34] = X.priceMarketsUiEnabled, N[35] = X.timestamp, N[36] = X.utcDate, N[37] = X.variant, N[38] = g) : g = N[38], N[39] !== I || N[40] !== H ? (h = !H && (0, a.jsx)("div", {
                children: (0, a.jsx)(lM.default, {
                    market: I,
                    containerVariant: "primary",
                    containerStyles: {
                        marginTop: "1.5rem"
                    },
                    headerStyles: {
                        display: "flex",
                        flexDirection: "row",
                        justifyContent: "space-between",
                        alignItems: "center"
                    },
                    bodyStyles: {
                        paddingLeft: 0,
                        paddingRight: 0
                    },
                    tableHeaderItemStyles: {
                        paddingLeft: "1rem",
                        paddingRight: "1rem"
                    },
                    tableBodyRowStyles: {
                        paddingLeft: "1rem",
                        paddingRight: "1rem",
                        display: "flex",
                        alignItems: "center"
                    }
                })
            }), N[39] = I, N[40] = H, N[41] = h) : h = N[41], N[42] !== I.closed || N[43] !== I.enableOrderBook || N[44] !== T || N[45] !== X.priceMarketsUiEnabled || N[46] !== X.variant ? (x = !T && I.enableOrderBook && !I.closed && (0, a.jsx)("div", {
                className: "block",
                children: (0, a.jsx)(lx.OrderBookAccordion, {
                    className: "mt-6",
                    withSideToggle: T,
                    withRecenterButton: T,
                    withVolume: X.priceMarketsUiEnabled && ("hourly" === X.variant || "daily" === X.variant || "fiveminute" === X.variant || "fifteen" === X.variant)
                })
            }), N[42] = I.closed, N[43] = I.enableOrderBook, N[44] = T, N[45] = X.priceMarketsUiEnabled, N[46] = X.variant, N[47] = x) : x = N[47], N[48] !== I || N[49] !== H || N[50] !== T || N[51] !== W || N[52] !== U || N[53] !== M ? (v = I.enableOrderBook && !I.closed && !H && (0, a.jsx)("div", {
                children: (0, a.jsx)(lU, {
                    market: I,
                    openOrders: U,
                    containerClassName: (0, p.cn)("mt-6", T && W && "rounded-xl"),
                    bodyClassName: (0, p.cn)("px-0", T && "[&>table]:max-w-full!"),
                    tableHeaderItemClassName: (0, p.cn)(T && "px-4 first:pl-6 whitespace-nowrap"),
                    tableBodyItemClassName: (0, p.cn)(T && "whitespace-nowrap px-4 flex items-center first:pl-6 last:justify-center"),
                    hasHeader: !0,
                    isSports: T,
                    colors: M
                })
            }), N[48] = I, N[49] = H, N[50] = T, N[51] = W, N[52] = U, N[53] = M, N[54] = v) : v = N[54], N[55] !== I.closed || N[56] !== I.enableOrderBook || N[57] !== H ? (b = I.enableOrderBook && !I.closed && H && (0, a.jsx)(lO, {}), N[55] = I.closed, N[56] = I.enableOrderBook, N[57] = H, N[58] = b) : b = N[58], N[59] !== H ? (y = H && (0, a.jsx)(lq, {}), N[59] = H, N[60] = y) : y = N[60], N[61] !== T || N[62] !== _ ? (S = T && (0, a.jsx)(l_.SportsMarketsSection, {
                tab: _
            }), N[61] = T, N[62] = _, N[63] = S) : S = N[63], N[64] !== D.slug || N[65] !== H ? (k = H && (0, a.jsx)(t8.RulesAndContextTabs, {}, D.slug), N[64] = D.slug, N[65] = H, N[66] = k) : k = N[66], N[67] !== H ? (w = H && (0, a.jsx)(lI.SportsFooterSection, {}), N[67] = H, N[68] = w) : w = N[68], N[69] !== I || N[70] !== z || N[71] !== $ || N[72] !== O || N[73] !== R || N[74] !== F || N[75] !== T ? (j = !T && I.enableOrderBook && (0, a.jsx)("div", {
                className: "block",
                children: (0, a.jsx)(lh.default, {
                    containerClassName: "mt-6",
                    filledOrders: O,
                    hasNextPage: R,
                    fetchNextPage: $,
                    isFetchingNextPage: F,
                    isAuthenticated: !!z,
                    activeMarket: I
                })
            }), N[69] = I, N[70] = z, N[71] = $, N[72] = O, N[73] = R, N[74] = F, N[75] = T, N[76] = j) : j = N[76], N[77] !== g || N[78] !== h || N[79] !== x || N[80] !== v || N[81] !== b || N[82] !== y || N[83] !== S || N[84] !== k || N[85] !== w || N[86] !== j ? (C = (0, a.jsxs)("div", {
                className: "flex flex-col w-full relative",
                children: [g, h, x, v, b, y, S, k, w, j]
            }), N[77] = g, N[78] = h, N[79] = x, N[80] = v, N[81] = b, N[82] = y, N[83] = S, N[84] = k, N[85] = w, N[86] = j, N[87] = C) : C = N[87], C
        };

    function lW(e) {
        return "1H" === e.slug
    }
    var lG = e.i(91070),
        lH = e.i(193789),
        lV = e.i(467772),
        lY = e.i(34873),
        lK = e.i(817109);

    function lQ(e) {
        let t, r, l, n, i, c, u, d, m = (0, s.c)(29),
            {
                value: g,
                onValueChange: p,
                title: f,
                formats: h,
                labels: x,
                showSpreadsTotals: b,
                onShowSpreadsTotalsChange: y,
                spreadsTotalsLabel: S
            } = e,
            [k, w] = o.default.useState(!1);
        m[0] !== k ? (t = (0, a.jsx)(as.DropdownMenuTrigger, {
            asChild: !0,
            children: (0, a.jsx)(v.Button, {
                variant: "ghost",
                size: "iconSm",
                "aria-label": "Odds format settings",
                className: "rounded-full focus-visible:ring-0 focus-visible:ring-offset-0",
                children: (0, a.jsx)(lY.default, {
                    active: k
                })
            })
        }), m[0] = k, m[1] = t) : t = m[1];
        let j = f ? ? "Odds Format";
        m[2] !== j ? (r = (0, a.jsx)("div", {
            className: "px-3 py-2 text-body-sm font-medium text-text-secondary",
            children: j
        }), m[2] = j, m[3] = r) : r = m[3], m[4] !== p ? (l = e => p(e), m[4] = p, m[5] = l) : l = m[5];
        let C = h ? ? lK.ODDS_FORMATS;
        if (m[6] !== x || m[7] !== C || m[8] !== g) {
            let e;
            m[10] !== x || m[11] !== g ? (e = e => (0, a.jsx)(as.DropdownMenuRadioItem, {
                value: e,
                className: (0, eL.cn)("capitalize", g === e && "text-text-primary"),
                children: x ? .[e] ? ? lK.ODDS_FORMAT_LABELS[e]
            }, e), m[10] = x, m[11] = g, m[12] = e) : e = m[12], n = C.map(e), m[6] = x, m[7] = C, m[8] = g, m[9] = n
        } else n = m[9];
        return m[13] !== l || m[14] !== n || m[15] !== g ? (i = (0, a.jsx)(as.DropdownMenuRadioGroup, {
            value: g,
            onValueChange: l,
            children: n
        }), m[13] = l, m[14] = n, m[15] = g, m[16] = i) : i = m[16], m[17] !== y || m[18] !== b || m[19] !== S ? (c = y && (0, a.jsxs)(a.Fragment, {
            children: [(0, a.jsx)(as.DropdownMenuSeparator, {}), (0, a.jsx)(as.DropdownMenuCheckboxItem, {
                checked: b,
                onCheckedChange: y,
                children: S ? ? "Show Spreads + Totals"
            })]
        }), m[17] = y, m[18] = b, m[19] = S, m[20] = c) : c = m[20], m[21] !== r || m[22] !== i || m[23] !== c ? (u = (0, a.jsx)(as.DropdownMenuPortal, {
            children: (0, a.jsxs)(as.DropdownMenuContent, {
                side: "bottom",
                align: "end",
                sideOffset: 6,
                className: "w-[220px]",
                children: [r, i, c]
            })
        }), m[21] = r, m[22] = i, m[23] = c, m[24] = u) : u = m[24], m[25] !== k || m[26] !== t || m[27] !== u ? (d = (0, a.jsxs)(as.DropdownMenu, {
            open: k,
            onOpenChange: w,
            children: [t, u]
        }), m[25] = k, m[26] = t, m[27] = u, m[28] = d) : d = m[28], d
    }

    function lZ() {
        let e, t, r, l, n = (0, s.c)(11),
            o = (0, O.useTranslations)(),
            i = (0, az.useBoundSportsStore)(),
            c = (0, az.useSportsStore)(lX),
            u = (0, az.useSportsStore)(lJ);
        n[0] !== o ? (e = Object.fromEntries(lK.ODDS_FORMATS.map(e => [e, o(`sports.${e}`)])), n[0] = o, n[1] = e) : e = n[1];
        let d = e;
        return i ? (n[2] !== u ? (t = e => u(e), n[2] = u, n[3] = t) : t = n[3], n[4] !== o ? (r = o("sports.oddsFormat"), n[4] = o, n[5] = r) : r = n[5], n[6] !== d || n[7] !== c || n[8] !== t || n[9] !== r ? (l = (0, a.jsx)(lQ, {
            value: c,
            onValueChange: t,
            title: r,
            labels: d
        }), n[6] = d, n[7] = c, n[8] = t, n[9] = r, n[10] = l) : l = n[10], l) : null
    }

    function lJ(e) {
        return e.setOddsFormat
    }

    function lX(e) {
        return e.oddsFormat
    }
    var l0 = e.i(627287),
        l1 = e.i(294472);
    let l2 = ["gameState"],
        l3 = [{
            visibileTeamId: 0
        }, {
            visibileTeamId: 1
        }];

    function l5(e) {
        let t, r, l, n, i, c, u = (0, s.c)(12),
            {
                shortTime: d,
                startTime: m
            } = e,
            g = (0, l0.useServerDate)(),
            p = Date.parse(m);
        u[0] !== g ? (t = () => g ? new Date(g).getTime() : (0, eo.getServerNow)(), u[0] = g, u[1] = t) : t = u[1];
        let [f, h] = o.default.useState(t);
        if (u[2] !== p ? (r = () => {
                if (!Number.isFinite(p)) return;
                let e = () => {
                    let e = (0, eo.getServerNow)();
                    return h(e), e
                };
                if (e() >= p) return;
                let t = window.setInterval(() => {
                    e() >= p && window.clearInterval(t)
                }, 1e3);
                return () => window.clearInterval(t)
            }, l = [p], u[2] = p, u[3] = r, u[4] = l) : (r = u[3], l = u[4]), o.default.useEffect(r, l), !Number.isFinite(p)) return null;
        u[5] !== f || u[6] !== d || u[7] !== p ? (n = function({
            nowMs: e,
            startMs: t,
            shortTime: r
        }) {
            if (t <= e) return null;
            let a = Math.floor((t - e) / 1e3);
            return (0, l1.formatShortCountdown)(a, r, {
                includeSeconds: !0
            })
        }({
            nowMs: f,
            startMs: p,
            shortTime: d
        }), u[5] = f, u[6] = d, u[7] = p, u[8] = n) : n = u[8];
        let x = n;
        return x ? (u[9] === Symbol.for("react.memo_cache_sentinel") ? (i = (0, a.jsx)(s5.IconClockOutline12, {
            className: "shrink-0"
        }), u[9] = i) : i = u[9], u[10] !== x ? (c = (0, a.jsxs)("div", {
            className: "flex items-center gap-1 text-body-sm text-text-secondary tabular-nums max-lg:text-center",
            children: [i, (0, a.jsx)("span", {
                suppressHydrationWarning: !0,
                children: x
            })]
        }), u[10] = x, u[11] = c) : c = u[11], c) : null
    }
    let l4 = e => {
        let t, r, l, n, i, c, u, d, m, g = (0, s.c)(31),
            {
                tabs: p,
                teamColors: f,
                eventSlug: h,
                isEsports: x,
                isLive: v,
                gridSeriesId: b,
                activeGridTab: y,
                loadedGridTabs: S,
                setActiveGridTab: k
            } = e,
            w = (0, O.useTranslations)(),
            j = (0, lH.useSportsSlugInit)(),
            [C, N] = o.default.useState(j ? ? lV.DEFAULT_TAB),
            T = (0, lG.useFilteredTabs)(p, h);
        g[0] !== T || g[1] !== w ? (t = T ? .map(e => ({
            value: e.value,
            label: w(e.labelKey)
        })) ? ? [], g[0] = T, g[1] = w, g[2] = t) : t = g[2];
        let M = t;
        g[3] !== C || g[4] !== T ? (r = () => {
            T && !T.some(e => e.value === C) && N(T[0] ? .value ? ? lV.DEFAULT_TAB)
        }, l = [T, C], g[3] = C, g[4] = T, g[5] = r, g[6] = l) : (r = g[5], l = g[6]), o.default.useEffect(r, l);
        let _ = T && T.length > 0;
        g[7] === Symbol.for("react.memo_cache_sentinel") ? (n = lo(), g[7] = n) : n = g[7];
        let I = n;
        g[8] !== S ? (i = I.filter(e => S ? .includes(e.id)), g[8] = S, g[9] = i) : i = g[9];
        let E = i;
        return g[10] !== y || g[11] !== b || g[12] !== x || g[13] !== v || g[14] !== E ? (c = x && v && b && E.map(e => "split" === e.layout ? (0, a.jsxs)("div", {
            className: "mb-4 grid grid-cols-1 gap-4 lg:grid-cols-2",
            style: {
                display: y === e.id ? "grid" : "none"
            },
            children: [(0, a.jsx)("div", {
                className: "border rounded-xl overflow-hidden",
                children: (0, a.jsx)(ls, {
                    type: e.widgetType,
                    gridSeriesId: b,
                    widgetOptions: l3[0]
                })
            }), (0, a.jsx)("div", {
                className: "border rounded-xl overflow-hidden",
                children: (0, a.jsx)(ls, {
                    type: e.widgetType,
                    gridSeriesId: b,
                    widgetOptions: l3[1]
                })
            })]
        }, e.id) : (0, a.jsx)("div", {
            className: "mb-4 border rounded-xl overflow-hidden",
            style: {
                display: y === e.id ? "block" : "none"
            },
            children: (0, a.jsx)(ls, {
                type: e.widgetType,
                gridSeriesId: b
            })
        }, e.id)), g[10] = y, g[11] = b, g[12] = x, g[13] = v, g[14] = E, g[15] = c) : c = g[15], g[16] !== C || g[17] !== _ || g[18] !== k || g[19] !== M ? (u = _ && (0, a.jsx)(t4.TextTabs, {
            items: M,
            value: C,
            onValueChange: e => {
                N(e), k ? .(null)
            },
            className: "mt-8 mb-1"
        }), g[16] = C, g[17] = _, g[18] = k, g[19] = M, g[20] = u) : u = g[20], g[21] !== C || g[22] !== T || g[23] !== _ || g[24] !== x || g[25] !== f ? (d = _ ? x ? T.map(e => (0, a.jsx)("div", {
            className: "[&>div>div]:mb-4!",
            style: {
                display: C === e.value ? "block" : "none"
            },
            children: (0, a.jsx)(lz, {
                isSportsOverlay: !0,
                tab: e.value,
                teamColors: f
            })
        }, e.value)) : (0, a.jsx)("div", {
            children: (0, a.jsx)(lz, {
                isSportsOverlay: !0,
                tab: C,
                teamColors: f
            })
        }, C) : (0, a.jsx)("div", {
            className: (0, eL.cn)("block", x && "[&>div>div]:mb-4!"),
            children: (0, a.jsx)(lz, {
                isSportsOverlay: !0,
                teamColors: f
            })
        }), g[21] = C, g[22] = T, g[23] = _, g[24] = x, g[25] = f, g[26] = d) : d = g[26], g[27] !== c || g[28] !== u || g[29] !== d ? (m = (0, a.jsxs)("div", {
            children: [c, u, d]
        }), g[27] = c, g[28] = u, g[29] = d, g[30] = m) : m = g[30], m
    };

    function l6() {
        let {
            lowerState: e,
            lowerStateOptions: t,
            setLowerState: r
        } = o.default.useContext(aG), s = (0, az.useSportsStore)(e => e.dragItems, c.shallow), l = (0, az.useSportsStore)(e => e.hiddenDragItems, c.shallow), n = (0, lu.useSportSlug)(), {
            activeMarket: i
        } = (0, f.useEventActiveMarketContext)(["activeMarket"]), {
            event: d
        } = (0, eC.useEventContext)(["event"]), {
            gameState: m
        } = (0, lu.useSportsGameSelector)(d.slug, l2), g = o.default.useMemo(() => [...s, ...l].find(e => "item" === e.type && e.event === d.slug), [d.slug, s, l]), p = (0, o.useMemo)(() => (0, aF.getEventOrSportsLinkFromSlug)("slug", d.slug).url, [d.slug]), h = o.default.useMemo(() => ({
            title: i.question,
            url: `${G.CURRENT_ORIGIN}${p}`
        }), [i.question]), x = o.default.useMemo(() => t.filter(e => e === aP.LowerState.Comments || e !== aP.LowerState.Related).map(e => ({
            label: e === aP.LowerState.Holders ? "Top Holders" : e === aP.LowerState.Positions ? "Positions" : (0, a9.capitalize)(e),
            value: e
        })), [t]), b = (0, lV.getLeagueFromSlug)(d.seriesSlug) || (0, lV.getLeagueFromSlug)(d.slug), y = o.default.useMemo(() => (0, lV.getTabsForLeague)(b), [b]), {
            zeroIndexedTeam: S,
            oneIndexedTeam: k
        } = (0, lc.useSportsTeams)();
        o.default.useEffect(() => {
            x.length && !x.find(t => t.value === e) && r(x[0].value)
        }, [x, e]);
        let w = (0, o.useMemo)(() => {
                if (!S || !k) return "";
                let e = S.name ? ? S.alias,
                    t = k.name ? ? k.alias;
                return `${e} vs ${t}`
            }, [S, k]),
            j = (0, O.useTranslations)(),
            C = (0, ee.useLocale)(),
            N = (0, ee.useMessages)(),
            T = !!n && (0, u.isEsportsSlug)(n),
            M = d ? .eventMetadata ? .league,
            [_, I] = o.default.useState(!1),
            [E, D] = o.default.useState(null),
            [P, A] = o.default.useState([]),
            {
                startStreaming: R,
                stopStreaming: $,
                isStreaming: F
            } = (0, rL.useLivestream)(),
            {
                authenticated: B
            } = (0, L.useAccountContext)(["authenticated"]),
            {
                setConnectorRoute: q,
                setOpen: U
            } = (0, s6.useSiwx)(),
            z = o.default.useCallback(e => {
                q(e), U(!0)
            }, [q, U]),
            W = o.default.useMemo(() => lo().filter(e => e.showInTabs).map(e => ({
                value: e.id,
                label: e.label
            })), []),
            H = o.default.useMemo(() => lo(), []),
            V = d ? .markets ? .[0] ? .gameStartTime ? ? d.startDate,
            Y = m === tX.GameState.NotStarted && V ? (0, a.jsx)(l5, {
                shortTime: N.time.short,
                startTime: V
            }) : null,
            K = T ? d.eventMetadata ? .gridSeriesId ? ? null : null;
        o.default.useEffect(() => {
            A(K ? ["overview"] : [])
        }, [K]);
        let Q = o.default.useCallback(e => {
            let t = E === e ? null : e;
            t && A(e => "overview" === t ? Array.from(new Set([...e, ...H.map(e => e.id)])) : e.includes(t) ? e : [...e, t]), D(t)
        }, [E, H]);
        o.default.useEffect(() => {
            _ && F && $()
        }, [_, F, $]);
        let Z = (0, o.useMemo)(() => {
                if (T && d.resolutionSource) try {
                    let e = new URL(d.resolutionSource),
                        t = e.hostname.toLowerCase();
                    if (["twitch.tv", "www.twitch.tv"].includes(t)) {
                        let t = e.pathname.split("/").filter(Boolean)[0];
                        if (!t) return;
                        let r = window.location.hostname;
                        return {
                            id: t,
                            type: "iframe",
                            src: `https://player.twitch.tv/?channel=${t}&parent=${r}`,
                            site: "twitch"
                        }
                    }
                    if (["youtube.com", "www.youtube.com", "m.youtube.com"].includes(t)) {
                        let t = e.searchParams.get("v") ? ? e.pathname.split("/").filter(Boolean)[1];
                        if (!t) return;
                        return {
                            id: t,
                            type: "iframe",
                            src: `https://www.youtube.com/embed/${t}?autoplay=1`,
                            site: "youtube"
                        }
                    }
                    if (["kick.com", "www.kick.com"].includes(t)) {
                        let t = e.pathname.split("/").filter(Boolean)[0];
                        if (!t) return;
                        return {
                            id: t,
                            type: "iframe",
                            src: `https://player.kick.com/${t}`,
                            site: "kick"
                        }
                    }
                } catch {}
            }, [T, d.resolutionSource]),
            J = (0, a.jsxs)(s7.ToggleGroup, {
                type: "single",
                value: _ ? "livestream" : "market",
                onValueChange: e => {
                    "livestream" === e && Z && I(!0), "market" === e && I(!1)
                },
                orientation: "horizontal",
                className: "gap-1 shrink-0",
                wrapperClassName: "rounded-lg",
                indicatorClassName: "!h-7 !rounded-lg",
                children: [(0, a.jsxs)(s7.ToggleGroupItem, {
                    value: "market",
                    size: "sm",
                    className: "text-body-xs gap-1 px-1.5 h-7",
                    children: [(0, a.jsx)(s2, {}), "Market"]
                }), (0, a.jsxs)(s7.ToggleGroupItem, {
                    value: "livestream",
                    size: "sm",
                    className: "text-body-xs gap-1 px-1.5 h-7",
                    disabled: !Z,
                    children: [_ ? (0, a.jsx)(s3, {}) : "live" === m && Z ? (0, a.jsx)(r$.Radio, {
                        className: "text-red-500!",
                        enabled: !0
                    }) : (0, a.jsx)(s3, {}), "Livestream"]
                })]
            }),
            X = (0, a.jsxs)("div", {
                className: "flex items-center gap-1",
                children: [(0, a.jsxs)(v.Button, {
                    type: "button",
                    variant: "outline",
                    size: "sm",
                    onClick: () => {
                        I(!1)
                    },
                    className: (0, eL.cn)("text-body-xs h-7 shrink-0 rounded-lg px-2", _ ? "text-text-secondary hover:text-text-tertiary" : "bg-bg-brand/10 text-text-brand hover:bg-bg-brand/10 dark:bg-bg-brand/20 dark:hover:bg-bg-brand/20"),
                    children: [(0, a.jsx)(s2, {}), "Market"]
                }), (0, a.jsxs)(v.Button, {
                    type: "button",
                    variant: "outline",
                    size: "sm",
                    onClick: () => {
                        Z && I(!0)
                    },
                    disabled: !Z,
                    className: (0, eL.cn)("text-body-xs h-7 shrink-0 rounded-lg px-2", _ ? "bg-bg-brand/10 text-text-brand hover:bg-bg-brand/10 dark:bg-bg-brand/20 dark:hover:bg-bg-brand/20" : "text-text-secondary hover:text-text-tertiary"),
                    children: [_ ? (0, a.jsx)(s3, {}) : "live" === m && Z ? (0, a.jsx)(r$.Radio, {
                        className: "text-red-500!",
                        enabled: !0
                    }) : (0, a.jsx)(s3, {}), "Livestream"]
                })]
            }),
            et = (0, o.useMemo)(() => {
                if (n) return u.sportMap[n] ? .href
            }, [n]),
            er = (0, az.useSportsStore)(e => e.events),
            ea = (0, o.useMemo)(() => T && M ? Object.values(er).filter(e => e.eventMetadata ? .league === M && e.slug !== d.slug).sort((e, t) => {
                let r = e.markets ? .[0] ? .gameStartTime ? ? e.startDate ? ? "",
                    a = t.markets ? .[0] ? .gameStartTime ? ? t.startDate ? ? "";
                return new Date(r).getTime() - new Date(a).getTime()
            }).slice(0, 20).map(e => {
                let t, r = e.markets ? .[0] ? .gameStartTime ? ? e.startDate;
                try {
                    t = r ? (0, tK.format)(new Date(r), "EEEE, MMMM d", {
                        locale: (0, tQ.getDateFnsLocale)(C)
                    }) : void 0
                } catch {}
                let a = e.markets ? .[0] ? .outcomes,
                    s = Array.isArray(a) ? a : "string" == typeof a ? (() => {
                        try {
                            return JSON.parse(a)
                        } catch {
                            return []
                        }
                    })() : [];
                return {
                    label: s.length >= 2 ? `${s[0]} vs. ${s[1]}` : e.title,
                    href: (0, u.getEsportsEventHref)(e),
                    dateGroup: t
                }
            }) : [], [T, M, er, d.slug]),
            es = (0, o.useMemo)(() => {
                if (!n) return [];
                let e = u.sportMap[n];
                if (!e) return [];
                if (T) {
                    let t = [{
                        label: "Esports",
                        href: "/esports/live"
                    }, {
                        label: e.displayNav,
                        href: `/esports/${n}/games`
                    }];
                    return M && t.push({
                        label: M,
                        href: `/esports/${n}/${(0,u.slugifyTournament)(M)}`,
                        dropdownItems: ea.length ? ea : void 0
                    }), t
                }
                return [{
                    label: j("dashboards.sports"),
                    href: "/sports/live"
                }, {
                    label: e.displayNav,
                    href: e.href
                }]
            }, [n, j, T, M, ea]);
        return S && k && m && g && n ? (0, a.jsxs)(a.Fragment, {
            children: [(0, a.jsx)(ld.default, {
                event: d
            }), (0, a.jsx)(lp, {
                breadcrumbsSlot: (0, a.jsx)(ap.Breadcrumbs, {
                    items: es
                }),
                title: w,
                subtitle: Y,
                backHref: T ? void 0 : et,
                centerOnMobile: !T,
                actions: (0, a.jsxs)(a.Fragment, {
                    children: [(0, a.jsxs)("div", {
                        className: "hidden lg:contents",
                        children: [(0, a.jsx)(lZ, {}), (0, a.jsx)(aa.EmbedMarketResponsiveDialog, {
                            event: d,
                            market: i
                        })]
                    }), (0, a.jsx)(r8.default, {
                        eventId: d.id.toString(),
                        eventSlug: d.slug,
                        isSportsEvent: !0
                    }), (0, a.jsx)(r9.default, {
                        params: h
                    })]
                })
            }), T ? (0, a.jsxs)(a.Fragment, {
                children: [(0, a.jsx)("div", {
                    className: "w-full max-w-full",
                    children: (0, a.jsx)(li.GameScoreboardV2, {
                        showTimeWindows: !1,
                        mobileControlsSlot: Z ? X : void 0,
                        contentSlot: _ && Z ? (0, a.jsx)("div", {
                            className: "w-full overflow-visible pt-6 pb-2 px-1",
                            children: (0, a.jsx)("div", {
                                className: (0, eL.cn)("relative aspect-video overflow-hidden rounded-lg", B ? "bg-neutral-100" : "bg-neutral-50"),
                                children: B ? (0, a.jsxs)(a.Fragment, {
                                    children: [(0, a.jsx)("iframe", {
                                        src: Z.src,
                                        title: j("events.liveStream"),
                                        className: "h-full w-full border-0",
                                        allowFullScreen: !0,
                                        allow: "autoplay; encrypted-media"
                                    }), (0, a.jsx)("button", {
                                        type: "button",
                                        onClick: () => {
                                            R(Z), I(!1)
                                        },
                                        className: "absolute top-3 right-3 z-10 cursor-pointer rounded-lg bg-black/60 p-2 text-white transition-colors hover:bg-black/80",
                                        title: "Minimize to picture-in-picture",
                                        children: (0, a.jsx)("svg", {
                                            width: "18",
                                            height: "18",
                                            viewBox: "0 0 18 18",
                                            fill: "none",
                                            xmlns: "http://www.w3.org/2000/svg",
                                            children: (0, a.jsx)("path", {
                                                d: "M6.75 2.25V6.75H2.25M11.25 15.75V11.25H15.75",
                                                stroke: "currentColor",
                                                strokeWidth: "1.5",
                                                strokeLinecap: "round",
                                                strokeLinejoin: "round"
                                            })
                                        })
                                    })]
                                }) : (0, a.jsxs)("div", {
                                    className: "absolute inset-0 flex flex-col items-center justify-center gap-4 px-6 text-center",
                                    children: [(0, a.jsx)("p", {
                                        className: "text-body-base text-text-primary",
                                        children: j("events.logInToViewStream")
                                    }), (0, a.jsxs)("div", {
                                        className: "flex items-center gap-2",
                                        children: [(0, a.jsx)(v.Button, {
                                            type: "button",
                                            variant: "secondary",
                                            onClick: () => z(s4.ConnectorRoute.LOGIN),
                                            children: j("auth.logIn")
                                        }), (0, a.jsx)(v.Button, {
                                            type: "button",
                                            onClick: () => z(s4.ConnectorRoute.SIGNUP),
                                            children: j("auth.signUp")
                                        })]
                                    })]
                                })
                            })
                        }) : void 0
                    })
                }), "live" === m && K && (0, a.jsx)(el.Media, {
                    lessThan: "lg",
                    children: (0, a.jsx)("div", {
                        className: "mb-4 mt-2 flex w-full justify-center overflow-x-auto px-1 no-scrollbar",
                        children: (0, a.jsx)("div", {
                            className: "flex min-w-max items-center justify-center gap-1",
                            children: W.map(e => (0, a.jsx)(v.Button, {
                                type: "button",
                                variant: "outline",
                                size: "sm",
                                onClick: () => {
                                    Q(e.value)
                                },
                                className: (0, eL.cn)("text-body-xs h-7 shrink-0 rounded-lg px-2", E === e.value ? "bg-bg-brand/10 text-text-brand hover:bg-bg-brand/10 dark:bg-bg-brand/20 dark:hover:bg-bg-brand/20" : "text-text-secondary hover:text-text-tertiary"),
                                children: e.label
                            }, e.value))
                        })
                    })
                }), (Z || "live" === m && K) && (0, a.jsx)(el.Media, {
                    greaterThanOrEqual: "lg",
                    children: (0, a.jsxs)("div", {
                        className: (0, eL.cn)("mb-4 mt-2 flex items-center gap-2", "live" === m && K && Z ? "justify-between" : "justify-center"),
                        children: ["live" === m && K && (0, a.jsx)("div", {
                            className: "flex min-w-0 items-center gap-1 overflow-x-auto no-scrollbar",
                            children: W.map(e => (0, a.jsx)(v.Button, {
                                type: "button",
                                variant: "outline",
                                size: "sm",
                                onClick: () => {
                                    Q(e.value)
                                },
                                className: (0, eL.cn)("text-body-xs h-7 shrink-0 rounded-lg px-2", E === e.value ? "bg-bg-brand/10 text-text-brand hover:bg-bg-brand/10 dark:bg-bg-brand/20 dark:hover:bg-bg-brand/20" : "text-text-secondary hover:text-text-tertiary"),
                                children: e.label
                            }, e.value))
                        }), Z && J]
                    })
                })]
            }) : (0, a.jsx)(li.GameScoreboardV2, {}), (0, a.jsx)(l4, {
                tabs: y,
                eventSlug: d.slug,
                teamColors: S.color && k.color ? [S.color, k.color] : void 0,
                isEsports: T,
                isLive: "live" === m,
                gridSeriesId: K,
                activeGridTab: E,
                loadedGridTabs: P,
                setActiveGridTab: D
            })]
        }) : null
    }

    function l7() {
        let e, t, r, l, n, i = (0, s.c)(9);
        i[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], i[0] = e) : e = i[0];
        let {
            event: c
        } = (0, eC.useEventContext)(e);
        i[1] !== c ? (t = () => ({
            event: c,
            variant: "card",
            orientation: "desktop"
        }), i[1] = c, i[2] = t) : t = i[2];
        let [u] = o.default.useState(t);
        return (0, lu.useGameExists)(c.slug) ? (i[3] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(l6, {}), i[3] = r) : r = i[3], i[4] !== c ? (l = (0, a.jsx)(sa.SportsItemContextProvider, {
            children: (0, a.jsx)(ss.SportsPositionContextProvider, {
                event: c,
                children: r
            })
        }), i[4] = c, i[5] = l) : l = i[5], i[6] !== u || i[7] !== l ? (n = (0, a.jsx)(so.SportsItemStoreProvider, {
            initialState: u,
            children: l
        }), i[6] = u, i[7] = l, i[8] = n) : n = i[8], n) : null
    }
    var l8 = e.i(588216),
        l9 = e.i(826341),
        ne = e.i(149534);
    let nt = ({
            strokeWidth: e = 1.5,
            ...t
        }) => o.default.createElement(ne.Icon, {
            size: "18px",
            ...t
        }, o.default.createElement("circle", {
            cx: "9",
            cy: "9",
            r: "7.25",
            fill: "none",
            stroke: "currentColor",
            strokeLinecap: "round",
            strokeLinejoin: "round",
            strokeWidth: e
        }), o.default.createElement("line", {
            x1: "5.75",
            y1: "9",
            x2: "12.25",
            y2: "9",
            fill: "none",
            stroke: "currentColor",
            strokeLinecap: "round",
            strokeLinejoin: "round",
            strokeWidth: e,
            "data-color": "color-2"
        })),
        nr = ({
            strokeWidth: e = 1.5,
            ...t
        }) => o.default.createElement(ne.Icon, {
            size: "18px",
            ...t
        }, o.default.createElement("circle", {
            cx: "9",
            cy: "9",
            r: "7.25",
            fill: "none",
            stroke: "currentColor",
            strokeLinecap: "round",
            strokeLinejoin: "round",
            strokeWidth: e
        }), o.default.createElement("line", {
            x1: "5.75",
            y1: "9",
            x2: "12.25",
            y2: "9",
            fill: "none",
            stroke: "currentColor",
            strokeLinecap: "round",
            strokeLinejoin: "round",
            strokeWidth: e,
            "data-color": "color-2"
        }), o.default.createElement("line", {
            x1: "9",
            y1: "5.75",
            x2: "9",
            y2: "12.25",
            fill: "none",
            stroke: "currentColor",
            strokeLinecap: "round",
            strokeLinejoin: "round",
            strokeWidth: e,
            "data-color": "color-2"
        })),
        na = e => {
            let t, r, l, n, o, i, c = (0, s.c)(23);
            if ("load-more" === e.variant) {
                let t, r, s;
                c[0] !== e.isLoading ? (t = e.isLoading ? (0, a.jsx)("div", {
                    className: "size-4 border-2 border-text-secondary/30 border-t-text-secondary rounded-full animate-spin shrink-0"
                }) : (0, a.jsx)(nr, {
                    size: 16,
                    className: "text-text-secondary group-hover:text-text-primary transition duration-75 shrink-0"
                }), c[0] = e.isLoading, c[1] = t) : t = c[1];
                let l = e.isLoading ? "Loading..." : "Load More";
                return c[2] !== l ? (r = (0, a.jsx)("p", {
                    className: "text-[13px] font-medium text-text-secondary group-hover:text-text-primary transition-colors duration-75 shrink-0",
                    children: l
                }), c[2] = l, c[3] = r) : r = c[3], c[4] !== e.handleClick || c[5] !== e.isLoading || c[6] !== t || c[7] !== r ? (s = (0, a.jsx)("div", {
                    className: "w-full flex items-center justify-center py-3",
                    children: (0, a.jsxs)(v.Button, {
                        onClick: e.handleClick,
                        variant: "ghost",
                        size: "sm",
                        disabled: e.isLoading,
                        className: "bg-transparent! group px-4 gap-1.5",
                        children: [t, r]
                    })
                }), c[4] = e.handleClick, c[5] = e.isLoading, c[6] = t, c[7] = r, c[8] = s) : s = c[8], s
            }
            let {
                isOpen: u,
                handleClick: d,
                isLoading: m
            } = e, g = void 0 !== m && m;
            c[9] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsx)("div", {
                className: "w-full bg-border/50 h-px"
            }), c[9] = t) : t = c[9], c[10] !== g || c[11] !== u ? (r = g ? (0, a.jsx)("div", {
                className: "size-4 border-2 border-text-secondary/30 border-t-text-secondary rounded-full animate-spin shrink-0"
            }) : u ? (0, a.jsx)(nt, {
                size: 16,
                className: "text-text-secondary group-hover:text-text-primary transition duration-75 shrink-0"
            }) : (0, a.jsx)(nr, {
                size: 16,
                className: "text-text-secondary group-hover:text-text-primary transition duration-75 shrink-0"
            }), c[10] = g, c[11] = u, c[12] = r) : r = c[12];
            let p = g ? "Loading..." : u ? "Hide Finished" : "View Finished";
            return c[13] !== p ? (l = (0, a.jsx)("p", {
                className: "text-[13px] font-medium text-text-secondary group-hover:text-text-primary transition-colors duration-75 shrink-0",
                children: p
            }), c[13] = p, c[14] = l) : l = c[14], c[15] !== d || c[16] !== g || c[17] !== r || c[18] !== l ? (n = (0, a.jsxs)(v.Button, {
                onClick: d,
                variant: "ghost",
                size: "sm",
                disabled: g,
                className: "bg-transparent! group px-4 gap-1.5",
                children: [r, l]
            }), c[15] = d, c[16] = g, c[17] = r, c[18] = l, c[19] = n) : n = c[19], c[20] === Symbol.for("react.memo_cache_sentinel") ? (o = (0, a.jsx)("div", {
                className: "w-full bg-border/50 h-px"
            }), c[20] = o) : o = c[20], c[21] !== n ? (i = (0, a.jsxs)("div", {
                className: "w-full flex items-center justify-between gap-1 mt-2",
                children: [t, n, o]
            }), c[21] = n, c[22] = i) : i = c[22], i
        };
    var ns = e.i(996076),
        nl = e.i(293028);
    e.i(940472), e.i(183592);
    var nn = e.i(289981);
    let no = async e => {
            try {
                let t = new Map;
                for (let r of e) {
                    let e = (0, tX.getEventLeague)(r),
                        {
                            teamA: a,
                            teamB: s
                        } = (0, tX.getEventTeamAbbreviations)(r),
                        l = t.get(e) ? ? new Set;
                    a && l.add(a), s && l.add(s), t.set(e, l)
                }
                let r = [];
                for (let [e, a] of t) {
                    let t = (0, u.mapLeagueToGammaLeague)(e),
                        s = await (0, u.getSportsTeams)(t, Array.from(a));
                    r.push(...s)
                }
                return r
            } catch (e) {
                return console.error("Error fetching sports teams for events: ", e), []
            }
        },
        ni = async e => {
            let {
                sportSlug: t,
                limit: r,
                week: a,
                cursor: s
            } = e, l = (0, u.fromSlugToSeriesId)(t);
            if (!l) return {
                events: [],
                teams: [],
                hasMore: !1
            };
            try {
                let e = new URLSearchParams;
                e.append("tag_id", "100639"), e.append("series_id", l), e.append("closed", "true"), e.append("order", "startTime"), e.append("ascending", "false"), e.append("limit", r.toString()), (0, u.usesBestLines)(t) && e.append("include_best_lines", "true"), a && e.append("event_week", a), s && e.append("after_cursor", s);
                let n = `${G.GAMMA_API_URL}/events/keyset?${e.toString()}`,
                    o = await em.axios.get(n),
                    i = o.data ? .events ? ? [],
                    c = !!o.data ? .next_cursor;
                if (!i.length) return {
                    events: [],
                    teams: [],
                    hasMore: c
                };
                let d = i.map(nc),
                    m = await no(d);
                return {
                    events: (0, aF.parseSportsEvents)({
                        events: d,
                        teams: m,
                        filterDelayed: !1
                    }),
                    teams: m,
                    hasMore: c,
                    nextCursor: o.data ? .next_cursor
                }
            } catch (e) {
                return (0, q.handleError)(e, "fetchFinishedGames"), {
                    events: [],
                    teams: [],
                    hasMore: !1
                }
            }
        },
        nc = e => ({ ...e,
            image_raw: e.image,
            image: (0, nl.getOptimizedImageField)(e, "image"),
            icon: (0, nl.getOptimizedImageField)(e, "icon"),
            featuredImage: (0, nl.getOptimizedImageField)(e, "featuredImage"),
            markets: (e.markets ? ? []).map(t => {
                let {
                    markets: r,
                    tags: a,
                    seriesColor: s,
                    gameId: l,
                    ...n
                } = t, o = e.endDate && t.endDate && t.endDate !== e.endDate ? e.endDate : t.endDate ? ? e.endDate ? ? null;
                return { ...n,
                    sportsMarketType: t.sportsMarketType ? ? "moneyline",
                    line: t.line ? ? null,
                    outcomes: (0, ei.parseJsonFromStrapi)(t ? .outcomes) ? ? null,
                    outcomePrices: (0, ei.parseJsonFromStrapi)(t ? .outcomePrices) ? ? null,
                    clobTokenIds: (0, ei.parseTokenIds)(t),
                    lower_bound_date: t.lowerBoundDate ? ? null,
                    upper_bound_date: t.upperBoundDate ? ? null,
                    market_type: t.marketType ? ? null,
                    resolution_source: t.resolutionSource ? ? null,
                    end_date: o,
                    endDate: o,
                    eventStartTime: t.eventStartTime ? ? null,
                    amm_type: t.ammType ? ? null,
                    x_axis_value: t.xAxisValue ? ? null
                }
            })
        }),
        nu = {
            eventSlugs: [],
            cursor: void 0,
            hasMore: !0,
            status: "idle",
            hasFetched: !1
        },
        nd = (e, t) => {
            switch (t.type) {
                case "FETCH_START":
                    return { ...e,
                        status: "loading"
                    };
                case "FETCH_SUCCESS":
                    return { ...e,
                        status: "success",
                        hasFetched: !0,
                        eventSlugs: [...e.eventSlugs, ...t.slugs],
                        cursor: t.nextCursor,
                        hasMore: t.hasMore
                    };
                case "FETCH_ERROR":
                    return { ...e,
                        status: "error",
                        hasFetched: !0
                    };
                case "RESET":
                    return nu;
                default:
                    return e
            }
        },
        nm = (e = "desktop") => {
            let t = (0, az.useBoundSportsStore)(),
                r = (0, az.useSportsStore)(e => e.sportSlug),
                a = (0, az.useSportsStore)(e => e.week),
                s = (0, az.useSportsStore)(e => e.tierFilter),
                l = (0, az.useSportsStore)(e => e.events),
                n = (0, az.useSportsStore)(e => e.teams),
                i = (0, az.useSportsStore)(e => e.games),
                [c, u] = o.default.useReducer(nd, nu),
                d = o.default.useRef(0),
                m = o.default.useRef(`${r}-${a}`),
                g = `${r}-${a}`;
            g !== m.current && (m.current = g, d.current += 1, u({
                type: "RESET"
            }));
            let p = o.default.useRef(c);
            p.current = c;
            let f = o.default.useRef(!1),
                h = o.default.useCallback(async e => {
                    let s = p.current;
                    if (f.current || "loading" === s.status || !e && !s.hasMore) return;
                    f.current = !0;
                    let l = e ? void 0 : s.cursor,
                        n = d.current;
                    u({
                        type: "FETCH_START"
                    });
                    try {
                        let o = await ni({
                            sportSlug: r,
                            cursor: l,
                            limit: 25,
                            week: a ? .toString()
                        });
                        if (n !== d.current) return;
                        let i = Object.keys(t ? .getState().events ? ? {}),
                            c = new Set([...i, ...e ? [] : s.eventSlugs]),
                            m = o.events.filter(e => !c.has(e.slug));
                        if (m.length > 0 && t) {
                            let e = (0, ns.createTeamMap)(o.teams),
                                a = {},
                                s = {},
                                l = {};
                            m.forEach(t => {
                                a[t.slug] = t;
                                let [n, o] = (0, ns.getTeamsForEvent)(t, e);
                                s[t.slug] = {
                                    home: n,
                                    away: o
                                }, l[t.slug] = (0, ns.convertEventToGame)({
                                    event: t,
                                    sportSlug: r
                                })
                            });
                            let {
                                marketsSections: n,
                                marketsSectionsState: i
                            } = (0, ns.getSportsMarketsForEvents)({
                                events: a
                            });
                            t.getState().mergeFinishedEvents({
                                events: a,
                                teams: s,
                                games: l,
                                marketsSections: n,
                                marketsSectionsState: i
                            })
                        }
                        let g = m.map(e => e.slug);
                        u({
                            type: "FETCH_SUCCESS",
                            slugs: g,
                            hasMore: o.hasMore,
                            nextCursor: o.nextCursor
                        })
                    } catch {
                        if (n !== d.current) return;
                        u({
                            type: "FETCH_ERROR"
                        })
                    } finally {
                        f.current = !1
                    }
                }, [r, a, t]),
                x = o.default.useCallback(() => {
                    h(!0)
                }, [h]),
                v = o.default.useCallback(() => {
                    h(!1)
                }, [h]);
            return {
                finishedItems: o.default.useMemo(() => {
                    if (!c.eventSlugs.length) return [];
                    let t = ((e, t, r, a) => {
                            if (!e.length) return [];
                            let s = [],
                                l = new Map;
                            for (let r of e) {
                                let e = t[r];
                                if (!e) continue;
                                let a = e.eventDate ? ? "",
                                    n = l.get(a);
                                void 0 !== n ? s[n].slugs.push(r) : (l.set(a, s.length), s.push({
                                    date: a,
                                    slugs: [r]
                                }))
                            }
                            for (let e of (s.sort((e, t) => t.date.localeCompare(e.date)), s)) e.slugs.sort((e, r) => {
                                let a = t[e] ? .markets ? .[0] ? .gameStartTime ? ? t[e] ? .startTime ? ? "";
                                return new Date(t[r] ? .markets ? .[0] ? .gameStartTime ? ? t[r] ? .startTime ? ? "").getTime() - new Date(a).getTime()
                            });
                            let n = [],
                                o = !0;
                            for (let e of s) n.push({
                                type: "header",
                                subtype: "date",
                                key: `finished-header-${r}-${e.date}`,
                                sectionType: "expanded",
                                eventDate: e.date,
                                sport: r,
                                headerText: (0, sn.getDayForAccordion)(e.date),
                                mode: a,
                                isFirstDateHeader: o
                            }), o = !1, e.slugs.forEach((t, s) => {
                                n.push({
                                    type: "item",
                                    key: t,
                                    event: t,
                                    sectionType: "expanded",
                                    eventDate: e.date,
                                    sport: r,
                                    mode: a,
                                    hasBorder: s + 1 < e.slugs.length
                                })
                            });
                            return n
                        })(c.eventSlugs, l, r, e),
                        a = e => {
                            let t = l[e];
                            if (!t || !t.markets ? .length) return !1;
                            let r = n[e];
                            return (!!r ? .home || !!r ? .away) && !!i[e]
                        },
                        o = new Set;
                    for (let e of t) "item" === e.type && a(e.event) && ("all" === s || (0, l9.doesEventMatchTier)(l[e.event], s)) && o.add(e.eventDate);
                    return t.filter(e => {
                        if ("header" === e.type) return o.has(e.eventDate);
                        if ("item" === e.type) {
                            if (!a(e.event)) return !1;
                            if ("all" !== s) return (0, l9.doesEventMatchTier)(l[e.event], s)
                        }
                        return !0
                    })
                }, [c.eventSlugs, l, n, i, r, s, e]),
                isLoading: "loading" === c.status,
                hasMore: c.hasMore,
                fetchFirstPage: x,
                fetchNextPage: v,
                hasFetched: c.hasFetched
            }
        },
        ng = ({
            expandedItems: e,
            hiddenItems: t,
            paginatedItems: r,
            isPastVisible: a,
            isLoadingPast: s,
            hasMore: l,
            hideFinishedToggle: n
        }) => [...e.map(e => ({
            type: "item",
            data: e
        })), ...a && !s ? (r.length > 0 ? r : (e => {
            let t = new Map,
                r = "";
            for (let a of e)
                if ("view-all-button" === a.type) t.set("", [...t.get("") ? ? [], a]);
                else if ("header" === a.type && "date" === a.subtype) {
                r = a.eventDate;
                let e = t.get(r) ? ? [];
                e.push(a), t.set(r, e)
            } else if (r) {
                let e = t.get(r) ? ? [];
                e.push(a), t.set(r, e)
            }
            return [...t.entries()].sort(([e], [t]) => "" === e ? 1 : "" === t ? -1 : t.localeCompare(e)).flatMap(([, e]) => e)
        })(t)).map(e => ({
            type: "item",
            data: e
        })) : [], ...a && !s && l ? [{
            type: "load-more"
        }] : [], ...n || a && !s ? [] : [{
            type: "hidden-toggle"
        }]];
    var np = e.i(188474),
        nf = e.i(16674),
        nh = e.i(875890),
        nx = e.i(737183);
    let nv = ["moneyline", "spread", "total"];

    function nb() {
        let e, t, r = (0, s.c)(4),
            l = (0, O.useTranslations)();
        return r[0] !== l ? (e = nv.map(e => (0, a.jsx)("div", {
            className: "flex flex-1 justify-center items-center h-full",
            children: (0, a.jsx)("p", {
                className: "text-text-secondary text-[10px] font-semibold tracking-wide uppercase",
                children: l(`sports.${e}`)
            })
        }, e)), r[0] = l, r[1] = e) : e = r[1], r[2] !== e ? (t = (0, a.jsx)("div", {
            className: "min-[1200px]:flex flex-1 gap-2 hidden h-full max-w-[372px] min-w-[372px] mr-3",
            children: e
        }), r[2] = e, r[3] = t) : t = r[3], t
    }

    function ny(e) {
        let t, r = (0, s.c)(4),
            {
                className: l,
                children: n,
                isPageLevel: o
            } = e,
            i = o ? "h1" : "h2";
        return r[0] !== i || r[1] !== n || r[2] !== l ? (t = (0, a.jsx)(i, {
            className: l,
            children: n
        }), r[0] = i, r[1] = n, r[2] = l, r[3] = t) : t = r[3], t
    }
    let nS = o.default.memo(function(e) {
        let t, r, l, n, c, d, m, g, f, h, x, v, b, y, S, k, w, j, C, N, T = (0, s.c)(70);
        T[0] !== e ? ({
            item: r,
            className: t,
            ...l
        } = e, T[0] = e, T[1] = t, T[2] = r, T[3] = l) : (t = T[1], r = T[2], l = T[3]), T[4] === Symbol.for("react.memo_cache_sentinel") ? (n = ["scrollTo", "setScrollTo"], T[4] = n) : n = T[4];
        let {
            scrollTo: M,
            setScrollTo: _
        } = a3(n), I = (0, lu.useSportSlug)(), E = (0, lu.useSportsViewSetting)(), {
            pathname: D
        } = (0, i.useRouter)(), P = (0, O.useTranslations)(), A = D.startsWith("/esports"), R = "/esports/soon" === D, L = o.default.useRef(null), $ = o.default.useRef(null);
        T[5] === Symbol.for("react.memo_cache_sentinel") ? (c = {
            threshold: 0,
            rootMargin: "-118px 0px 50% 0px"
        }, T[5] = c) : c = T[5];
        let {
            ref: F,
            inView: B
        } = (0, nf.useInView)(c), q = "league" === r.subtype ? r.sport : r.eventDate, U = !!M && !!q && q === M, z = U && B;
        T[6] !== U || T[7] !== z ? (d = {
            isScrolling: U,
            isUnderlined: z
        }, T[6] = U, T[7] = z, T[8] = d) : d = T[8];
        let {
            isScrolling: W,
            isUnderlined: G
        } = d, H = (0, np.useComposedRefs)(F, $);
        T[9] !== _ ? (m = () => {
            L.current = setTimeout(() => {
                _(void 0)
            }, 500)
        }, T[9] = _, T[10] = m) : m = T[10];
        let V = m;
        T[11] !== V || T[12] !== B || T[13] !== W ? (g = () => {
            W && $.current && ($.current.scrollIntoView({
                behavior: "smooth"
            }), B && V())
        }, T[11] = V, T[12] = B, T[13] = W, T[14] = g) : g = T[14], T[15] !== W ? (f = [W], T[15] = W, T[16] = f) : f = T[16], o.default.useEffect(g, f), T[17] !== V || T[18] !== B || T[19] !== W ? (h = () => {
            B && W && B && V()
        }, T[17] = V, T[18] = B, T[19] = W, T[20] = h) : h = T[20], T[21] !== B ? (x = [B], T[21] = B, T[22] = x) : x = T[22], o.default.useEffect(h, x);
        e: {
            if (("live" === r.sectionType || "soon" === r.sectionType) && ("date" === r.subtype || "league" === r.subtype)) {
                v = !0;
                break e
            }
            v = !1
        }
        let Y = v,
            K = I === tX.SportSlug.LIVE;
        t: {
            if ("league" === r.subtype) {
                let e;
                T[23] !== r.headerText || T[24] !== r.sport ? (e = r.headerText || (0, u.getSportDisplayHeader)(r.sport), T[23] = r.headerText, T[24] = r.sport, T[25] = e) : e = T[25], b = e;
                break t
            }
            if ("live-header" === r.key && K) {
                let e;
                if (R) {
                    let e;
                    T[26] !== P ? (e = P("sports.upcomingEsportsGames"), T[26] = P, T[27] = e) : e = T[27], b = e;
                    break t
                }
                if (A) {
                    let e;
                    T[28] !== P ? (e = P("seo.esports.categoryH1"), T[28] = P, T[29] = e) : e = T[29], b = e;
                    break t
                }
                T[30] !== P ? (e = P("seo.sports.categoryH1"), T[30] = P, T[31] = e) : e = T[31], b = e;
                break t
            }
            if (R && "heading" === r.subtype && "soon" === r.sectionType) {
                b = null;
                break t
            }
            b = r.headerText
        }
        let Q = b;
        if (null === Q) return null;
        let Z = `${r.headerEmoji?`${r.headerEmoji} `:""}${Q}`;
        if (T[32] !== t || T[33] !== H || T[34] !== Y || T[35] !== Z || T[36] !== K || T[37] !== G || T[38] !== r.containerClassName || T[39] !== r.headerClassName || T[40] !== r.headerHref || T[41] !== r.includeSettingsWidget || T[42] !== r.key || T[43] !== r.showColumnSubgrid || T[44] !== r.subtype || T[45] !== l) {
            let e = (0, p.cn)("text-text tracking-[0.25px]", "transition-[text-decoration-color] duration-[120ms] ease-out", "[font-variant-numeric:slashed-zero]", !r.headerClassName && "text-heading-lg mb-2", G && "underline decoration-2 decoration-[var(--color-text)]", Y && !r.headerClassName && "text-heading-lg max-lg:mb-1", "heading" === r.subtype && "font-semibold", r.headerClassName);
            y = H;
            let s = "date" === r.subtype && "max-lg:mt-2 max-lg:mb-4 lg:mb-1",
                n = r.showColumnSubgrid && "lg:justify-between lg:gap-3",
                o = r.includeSettingsWidget && "lg:justify-between",
                i = K && "date" === r.subtype && "max-lg:bg-transparent",
                c = K && "league" === r.subtype && "max-lg:bg-transparent max-lg:pl-0 max-lg:h-auto lg:pb-1";
            T[50] !== t || T[51] !== r.containerClassName || T[52] !== s || T[53] !== n || T[54] !== o || T[55] !== i || T[56] !== c ? (S = (0, p.cn)("flex flex-1 scroll-mt-4 h-max items-center my-0", s, n, o, i, c, r.containerClassName, t), T[50] = t, T[51] = r.containerClassName, T[52] = s, T[53] = n, T[54] = o, T[55] = i, T[56] = c, T[57] = S) : S = T[57], k = l, w = "live-header" === r.key ? (0, a.jsx)(ny, {
                className: (0, p.cn)("font-normal", e),
                isPageLevel: K,
                children: Z
            }) : "heading" === r.subtype ? (0, a.jsx)("h2", {
                className: (0, p.cn)("font-normal", e),
                children: Z
            }) : r.headerHref ? (0, a.jsx)(e$.default, {
                href: r.headerHref,
                prefetch: !1,
                className: (0, p.cn)("font-semibold hover:underline decoration-2", e),
                children: Z
            }) : "league" === r.subtype ? (0, a.jsx)("h2", {
                className: (0, p.cn)("font-semibold", e),
                children: Z
            }) : (0, a.jsx)("p", {
                className: (0, p.cn)("font-semibold", e),
                children: Z
            }), T[32] = t, T[33] = H, T[34] = Y, T[35] = Z, T[36] = K, T[37] = G, T[38] = r.containerClassName, T[39] = r.headerClassName, T[40] = r.headerHref, T[41] = r.includeSettingsWidget, T[42] = r.key, T[43] = r.showColumnSubgrid, T[44] = r.subtype, T[45] = l, T[46] = y, T[47] = S, T[48] = k, T[49] = w
        } else y = T[46], S = T[47], k = T[48], w = T[49];
        return T[58] !== r.showColumnSubgrid || T[59] !== E ? (j = r.showColumnSubgrid && "aggregate" === E && (0, a.jsx)(el.Media, {
            greaterThanOrEqual: "lg",
            children: (0, a.jsx)(nb, {})
        }), T[58] = r.showColumnSubgrid, T[59] = E, T[60] = j) : j = T[60], T[61] !== r.includeSettingsWidget ? (C = r.includeSettingsWidget && (0, a.jsxs)("div", {
            className: "ml-auto flex items-center gap-0.5",
            children: [(0, a.jsx)(el.Media, {
                greaterThanOrEqual: "lg",
                children: (0, a.jsx)(nh.SportsSearchBar, {
                    compact: !0
                })
            }), (0, a.jsx)(el.Media, {
                greaterThanOrEqual: "lg",
                children: (0, a.jsx)(nx.SportsSettingsPopover, {})
            }), (0, a.jsxs)(el.Media, {
                lessThan: "lg",
                className: "flex items-center gap-1",
                children: [(0, a.jsx)(nh.SportsSearchBar, {
                    compact: !0
                }), (0, a.jsx)(nx.SportsSettingsPopover, {})]
            })]
        }), T[61] = r.includeSettingsWidget, T[62] = C) : C = T[62], T[63] !== y || T[64] !== S || T[65] !== k || T[66] !== w || T[67] !== j || T[68] !== C ? (N = (0, a.jsxs)("div", {
            ref: y,
            className: S,
            ...k,
            children: [w, j, C]
        }), T[63] = y, T[64] = S, T[65] = k, T[66] = w, T[67] = j, T[68] = C, T[69] = N) : N = T[69], N
    }, (e, t) => e.className === t.className && e.item.key === t.item.key && e.item.eventDate === t.item.eventDate && e.item.sport === t.item.sport && e.item.mode === t.item.mode && e.item.sectionType === t.item.sectionType && e.item.subtype === t.item.subtype && e.item.headerText === t.item.headerText && e.item.headerEmoji === t.item.headerEmoji && e.item.headerClassName === t.item.headerClassName && e.item.containerClassName === t.item.containerClassName && e.item.showColumnSubgrid === t.item.showColumnSubgrid && e.item.includeSettingsWidget === t.item.includeSettingsWidget && e.item.headerHref === t.item.headerHref);

    function nk(e) {
        let t, r, l, n, o, i = (0, s.c)(11),
            {
                sportText: c,
                sportSlug: d
            } = e,
            m = (0, O.useTranslations)(),
            g = (0, u.isEsportsSlug)(c) ? "/esports" : "/sports",
            p = `${g}/${c}/games`;
        return i[0] !== d || i[1] !== m ? (t = m("sports.viewAllGames", {
            league: d
        }), i[0] = d, i[1] = m, i[2] = t) : t = i[2], i[3] !== t ? (r = (0, a.jsx)("p", {
            className: "text-xs",
            children: t
        }), i[3] = t, i[4] = r) : r = i[4], i[5] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(eR.IconArrowRightOutline12, {
            className: "group-hover:translate-x-0.5 transition ease-out"
        }), i[5] = l) : l = i[5], i[6] !== r ? (n = (0, a.jsxs)(v.Button, {
            variant: "link",
            size: "sm",
            className: "group text-text-secondary hover:text-text-primary",
            children: [r, l]
        }), i[6] = r, i[7] = n) : n = i[7], i[8] !== p || i[9] !== n ? (o = (0, a.jsx)("div", {
            className: "flex justify-end mt-0 mb-4",
            children: (0, a.jsx)(e$.default, {
                href: p,
                children: n
            })
        }), i[8] = p, i[9] = n, i[10] = o) : o = i[10], o
    }
    var nw = e.i(329905),
        nj = e.i(147931),
        nC = e.i(323481),
        nN = e.i(82489),
        nT = e.i(929581),
        nM = e.i(500324);

    function n_(e) {
        let t, r, l, n, o, i, c, u = (0, s.c)(14);
        u[0] !== e ? ({
            ref: l,
            mode: o,
            className: r,
            children: t,
            ...n
        } = e, u[0] = e, u[1] = t, u[2] = r, u[3] = l, u[4] = n, u[5] = o) : (t = u[1], r = u[2], l = u[3], n = u[4], o = u[5]);
        let d = "desktop" === (void 0 === o ? "desktop" : o) && "p-3 rounded-none";
        return u[6] !== r || u[7] !== d ? (i = (0, eL.cn)("z-1 group relative flex flex-col w-full h-max rounded-lg cursor-pointer bg-surface-1 hover:bg-neutral-50/50 dark:hover:bg-neutral-100/50 transition-colors", "scroll-mt-[calc(var(--navbar-height)+var(--expanded-scoreboard-height)+16px)]", d, r), u[6] = r, u[7] = d, u[8] = i) : i = u[8], u[9] !== t || u[10] !== l || u[11] !== n || u[12] !== i ? (c = (0, a.jsx)("div", {
            ref: l,
            className: i,
            ...n,
            children: t
        }), u[9] = t, u[10] = l, u[11] = n, u[12] = i, u[13] = c) : c = u[13], c
    }
    n_.displayName = "SportsItemAccordionHeader";
    let nI = e => {
        let t, r, l, n, o, i, c = (0, s.c)(13);
        if (c[0] !== e) {
            let {
                ref: a,
                sport: s,
                className: o,
                children: i,
                ...u
            } = e;
            l = a, r = o, t = i, n = u, c[0] = e, c[1] = t, c[2] = r, c[3] = l, c[4] = n
        } else t = c[1], r = c[2], l = c[3], n = c[4];
        let {
            event: u,
            mode: d
        } = (0, sa.useSportsItemContext)();
        return u ? (c[5] !== t || c[6] !== r || c[7] !== d ? (o = (0, a.jsx)(n_, {
            mode: d,
            className: r,
            children: t
        }), c[5] = t, c[6] = r, c[7] = d, c[8] = o) : o = c[8], c[9] !== l || c[10] !== n || c[11] !== o ? (i = (0, a.jsx)(lD.Accordion.Header, {
            ref: l,
            asChild: !0,
            ...n,
            children: o
        }), c[9] = l, c[10] = n, c[11] = o, c[12] = i) : i = c[12], i) : null
    };

    function nE(e) {
        let t, r, l, n = (0, s.c)(11),
            {
                header: o,
                scoreGrid: i,
                buttons: c,
                footer: u,
                isTennis: d,
                className: m
            } = e,
            g = `flex flex-col gap-3 w-full @container${m?` ${m}`:""}`,
            p = `flex w-full flex-row @max-[490px]:flex-col ${void 0!==d&&d?"gap-5":"gap-3"}`;
        return n[0] !== c || n[1] !== i || n[2] !== p ? (t = (0, a.jsxs)("div", {
            className: p,
            children: [i, c]
        }), n[0] = c, n[1] = i, n[2] = p, n[3] = t) : t = n[3], n[4] !== u || n[5] !== t ? (r = (0, a.jsxs)("div", {
            className: "flex flex-col w-full gap-3",
            children: [t, u]
        }), n[4] = u, n[5] = t, n[6] = r) : r = n[6], n[7] !== o || n[8] !== g || n[9] !== r ? (l = (0, a.jsxs)("div", {
            className: g,
            children: [o, r]
        }), n[7] = o, n[8] = g, n[9] = r, n[10] = l) : l = n[10], l
    }

    function nD(e) {
        let t, r = (0, s.c)(4),
            {
                gameStatus: l,
                aggregated: n,
                isTennis: o,
                children: i,
                className: c,
                style: u
            } = e,
            d = "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start";
        o ? d = n ? "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[min-content_auto] grid-rows-[24px_24px] lg:grid-rows-[40px_40px] lg:gap-y-2 [grid-template-areas:'team-0-logo_team-0-name'_'team-1-logo_team-1-name']" : "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[min-content_auto] grid-rows-[24px_24px] [grid-template-areas:'team-0-logo_team-0-name'_'team-1-logo_team-1-name']" : ("not_started" === l || "postponed" === l) && n ? d = "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[min-content_auto] grid-rows-[24px_24px] lg:grid-rows-[40px_40px] lg:gap-y-2 [grid-template-areas:'team-0-logo_team-0-name'_'team-1-logo_team-1-name']" : ("live" === l || "finished" === l) && n ? d = "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[var(--highest-score-length)_min-content_auto] grid-rows-[24px_24px] lg:grid-rows-[40px_40px] lg:gap-y-2 [grid-template-areas:'team-0-score_team-0-logo_team-0-name'_'team-1-score_team-1-logo_team-1-name']" : "not_started" !== l && "postponed" !== l || n ? "live" !== l && "finished" !== l || n || (d = "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[var(--highest-score-length)_min-content_auto] grid-rows-[24px_24px] [grid-template-areas:'team-0-score_team-0-logo_team-0-name'_'team-1-score_team-1-logo_team-1-name']") : d = "grid grid-rows-1 gap-x-3 gap-y-3 items-center lg:self-center lg:flex-1 lg:min-w-0 @max-[490px]:self-start grid-cols-[min-content_auto] grid-rows-[24px_24px] [grid-template-areas:'team-0-logo_team-0-name'_'team-1-logo_team-1-name']";
        let m = `${d}${c?` ${c}`:""}`;
        return r[0] !== i || r[1] !== u || r[2] !== m ? (t = (0, a.jsx)("div", {
            className: m,
            style: u,
            children: i
        }), r[0] = i, r[1] = u, r[2] = m, r[3] = t) : t = r[3], t
    }

    function nP(e) {
        let t, r, l, n = (0, s.c)(10),
            {
                gameResult: o,
                children: i,
                gridArea: c,
                className: u
            } = e,
            d = "win" === o;
        n[0] !== u ? (t = (0, eL.cn)("flex px-1.5 text-xs font-semibold rounded-sm h-[20px] justify-center items-center", u), n[0] = u, n[1] = t) : t = n[1];
        let m = d ? "var(--color-text)" : "var(--color-neutral-100)",
            g = d ? "var(--color-background)" : "var(--color-text-primary)";
        return n[2] !== c || n[3] !== m || n[4] !== g ? (r = {
            lineHeight: "15px",
            gridArea: c,
            transition: "background-color 0.1s cubic-bezier(0.26, 0.08, 0.25, 1)",
            backgroundColor: m,
            color: g
        }, n[2] = c, n[3] = m, n[4] = g, n[5] = r) : r = n[5], n[6] !== i || n[7] !== t || n[8] !== r ? (l = (0, a.jsx)("div", {
            className: t,
            style: r,
            children: i
        }), n[6] = i, n[7] = t, n[8] = r, n[9] = l) : l = n[9], l
    }

    function nA(e) {
        let t, r, l, n, i, c = (0, s.c)(17),
            {
                team: u,
                isScorebug: d,
                smallerWidth: m,
                className: g,
                style: p
            } = e,
            f = void 0 !== d && d,
            h = void 0 !== m && m,
            [x, v] = o.default.useState(!1);
        if (c[0] === Symbol.for("react.memo_cache_sentinel") ? (t = () => {
                v(!1)
            }, c[0] = t) : t = c[0], c[1] !== u.logo ? (r = [u.logo], c[1] = u.logo, c[2] = r) : r = c[2], o.default.useEffect(t, r), !u.logo) return null;
        let b = f && h,
            y = f && !h;
        return c[3] !== g || c[4] !== b || c[5] !== y ? (l = (0, eL.cn)("relative overflow-hidden", {
            "min-w-8 w-8": b,
            "min-w-[50px] w-[50px]": y
        }, g), c[3] = g, c[4] = b, c[5] = y, c[6] = l) : l = c[6], c[7] !== x || c[8] !== f || c[9] !== u.abbreviation || c[10] !== u.logo || c[11] !== u.name ? (n = x ? null : (0, a.jsx)(tZ.default, {
            src: u.logo,
            alt: `${u.abbreviation??u.name} icon`,
            fill: !0,
            sizes: "24px",
            style: {
                objectFit: f ? "cover" : "scale-down",
                borderRadius: "4px"
            },
            onError: () => v(!0),
            priority: !0
        }), c[7] = x, c[8] = f, c[9] = u.abbreviation, c[10] = u.logo, c[11] = u.name, c[12] = n) : n = c[12], c[13] !== p || c[14] !== l || c[15] !== n ? (i = (0, a.jsx)("div", {
            className: l,
            style: p,
            children: n
        }), c[13] = p, c[14] = l, c[15] = n, c[16] = i) : i = c[16], i
    }

    function nO(e) {
        let t, r, l, n, o, i, c, u, d, m, g, p, f, h, x = (0, s.c)(52),
            {
                team: v,
                teamIndex: b,
                score: y,
                gameStatus: S,
                gameResult: k,
                showScore: w,
                isScorebug: j,
                isEsports: C,
                isTennis: N,
                tennisContent: T,
                logoClassName: M,
                className: _
            } = e,
            I = void 0 === w || w,
            E = void 0 !== j && j,
            D = void 0 !== C && C,
            P = void 0 !== N && N,
            A = 1 === b ? "team-1-score" : "team-0-score",
            O = 1 === b ? "team-1-logo" : "team-0-logo",
            R = 1 === b ? "team-1-name" : "team-0-name",
            L = v.name;
        x[0] !== _ ? (t = (0, eL.cn)("contents", _), x[0] = _, x[1] = t) : t = x[1], x[2] !== k || x[3] !== S || x[4] !== P || x[5] !== y || x[6] !== A || x[7] !== I ? (r = "not_started" !== S && "postponed" !== S && I && !P && (0, a.jsx)(nP, {
            gameResult: k,
            className: "score-container h-6",
            gridArea: A,
            children: y
        }), x[2] = k, x[3] = S, x[4] = P, x[5] = y, x[6] = A, x[7] = I, x[8] = r) : r = x[8];
        let $ = M ? ? "size-6",
            F = "loss" === k && "opacity-35",
            B = "draw" === k && "opacity-85";
        x[9] !== $ || x[10] !== F || x[11] !== B ? (l = (0, eL.cn)($, F, B), x[9] = $, x[10] = F, x[11] = B, x[12] = l) : l = x[12], x[13] !== O ? (n = {
            gridArea: O
        }, x[13] = O, x[14] = n) : n = x[14], x[15] !== E || x[16] !== P || x[17] !== l || x[18] !== n || x[19] !== v ? (o = (0, a.jsx)(nA, {
            team: v,
            isScorebug: E,
            smallerWidth: P,
            className: l,
            style: n
        }), x[15] = E, x[16] = P, x[17] = l, x[18] = n, x[19] = v, x[20] = o) : o = x[20], x[21] !== R ? (i = {
            gridArea: R
        }, x[21] = R, x[22] = i) : i = x[22];
        let q = "loss" === k && "opacity-35",
            U = "draw" === k && "opacity-85";
        x[23] !== q || x[24] !== U ? (c = (0, eL.cn)("text-body-base font-semibold line-clamp-1 text-text-primary w-fit! whitespace-nowrap!", q, U), x[23] = q, x[24] = U, x[25] = c) : c = x[25];
        let z = E ? "0px" : "4px";
        return x[26] !== z ? (u = {
            marginLeft: z
        }, x[26] = z, x[27] = u) : u = x[27], x[28] !== u || x[29] !== L ? (d = (0, a.jsx)("span", {
            className: "capitalize",
            style: u,
            children: L
        }), x[28] = u, x[29] = L, x[30] = d) : d = x[30], x[31] !== c || x[32] !== d ? (m = (0, a.jsx)("span", {
            className: c,
            children: d
        }), x[31] = c, x[32] = d, x[33] = m) : m = x[33], x[34] !== k || x[35] !== D || x[36] !== P || x[37] !== v.playoffSeed || x[38] !== v.record || x[39] !== T ? (g = P && T ? T : (0, a.jsxs)("span", {
            className: (0, eL.cn)("text-xs font-normal w-fit! whitespace-nowrap!", "in-game" === k ? "text-text-secondary" : "text-text-primary", "loss" === k && "opacity-35", "draw" === k && "opacity-85", D && "hidden"),
            children: [v.record, !!v.playoffSeed && (0, a.jsx)("span", {
                className: "text-[11px] ml-1",
                children: `(${v.playoffSeed})`
            })]
        }), x[34] = k, x[35] = D, x[36] = P, x[37] = v.playoffSeed, x[38] = v.record, x[39] = T, x[40] = g) : g = x[40], x[41] !== i || x[42] !== m || x[43] !== g ? (p = (0, a.jsxs)("div", {
            className: "flex flex-1 items-baseline min-w-0 max-w-full gap-[5px] overflow-hidden",
            style: i,
            children: [m, g]
        }), x[41] = i, x[42] = m, x[43] = g, x[44] = p) : p = x[44], x[45] !== o || x[46] !== p || x[47] !== r ? (f = (0, a.jsxs)("div", {
            className: "w-full contents overflow-hidden",
            children: [r, o, p]
        }), x[45] = o, x[46] = p, x[47] = r, x[48] = f) : f = x[48], x[49] !== f || x[50] !== t ? (h = (0, a.jsx)("div", {
            className: t,
            children: f
        }), x[49] = f, x[50] = t, x[51] = h) : h = x[51], h
    }

    function nR(e) {
        let t, r, l, n = (0, s.c)(15),
            {
                sets: o,
                currentGames: i,
                teamIndex: c,
                gameResult: u
            } = e;
        if (0 === o.length && 0 === i.home && 0 === i.away) return null;
        let d = 0 === c ? "home" : "away",
            m = 0 === c ? "away" : "home";
        if (n[0] !== u || n[1] !== m || n[2] !== d || n[3] !== o) {
            let e;
            n[5] !== u || n[6] !== m || n[7] !== d ? (e = e => {
                let t = e[d],
                    r = e[m],
                    s = t > r,
                    l = e.tiebreak ? .[d];
                return (0, a.jsxs)("span", {
                    className: (0, eL.cn)("font-medium", s ? "text-text-primary" : "text-text-secondary opacity-50", "loss" === u && !s && "opacity-35", "draw" === u && "opacity-85"),
                    children: [t, void 0 !== l && (0, a.jsx)("sup", {
                        className: "text-[9px]",
                        children: l
                    })]
                }, `set-${t}-${r}`)
            }, n[5] = u, n[6] = m, n[7] = d, n[8] = e) : e = n[8], t = o.map(e), n[0] = u, n[1] = m, n[2] = d, n[3] = o, n[4] = t
        } else t = n[4];
        return n[9] !== i || n[10] !== d ? (r = (i.home > 0 || i.away > 0) && (0, a.jsx)("span", {
            className: "text-text-primary font-medium",
            children: i[d]
        }), n[9] = i, n[10] = d, n[11] = r) : r = n[11], n[12] !== t || n[13] !== r ? (l = (0, a.jsxs)("div", {
            className: "flex items-center justify-end gap-1.5 text-xs ml-auto not-lg:pr-2",
            children: [t, r]
        }), n[12] = t, n[13] = r, n[14] = l) : l = n[14], l
    }
    nI.displayName = "SportsItemAccordionHeader";
    var nL = e.i(434360);
    let n$ = e => {
        let t, r, l = (0, s.c)(5),
            {
                event: n,
                gameResult: o,
                teamIndex: i
            } = e,
            {
                sets: c,
                currentGames: u
            } = {
                sets: (r = (0, nL.parseTennisScore)({
                    score: n.score,
                    period: n.period,
                    live: "NS" !== n.period && !n.period ? .includes("FT")
                })).sets,
                currentGames: r.currentSetGames ? ? {
                    home: 0,
                    away: 0
                }
            };
        return l[0] !== u || l[1] !== c || l[2] !== i || l[3] !== o ? (t = (0, a.jsx)(nR, {
            sets: c,
            currentGames: u,
            teamIndex: i,
            gameResult: o
        }), l[0] = u, l[1] = c, l[2] = i, l[3] = o, l[4] = t) : t = l[4], t
    };
    var nF = e.i(29438);

    function nB(e) {
        switch (e) {
            case tX.GameState.NotStarted:
                return "not_started";
            case tX.GameState.Live:
                return "live";
            case tX.GameState.Finished:
                return "finished";
            case tX.GameState.Postponed:
                return "postponed";
            default:
                return "not_started"
        }
    }

    function nq(e) {
        let t = e.alias || e.name,
            r = e.record ? .length ? e.record.replace("(", "").replace(")", "") : void 0;
        return {
            name: t,
            abbreviation: e.abbreviation,
            logo: e.logo ? ? null,
            record: r,
            playoffSeed: e.playoffSeed,
            color: e.color
        }
    }

    function nU(e, t, r) {
        return r === tX.GameState.Finished && e ? .length ? (0, nF.getWinStatus)(e[0], e[1], t) : "in-game"
    }

    function nz(e) {
        let t, r, l, n, o, i, c, u, d, m, g = (0, s.c)(31),
            {
                isLive: p,
                liveLabel: f,
                categoryLabel: h,
                timeLabel: x,
                volume: v,
                leagueName: b,
                showLeagueName: y,
                mode: S,
                actions: k,
                className: w
            } = e,
            j = void 0 !== p && p,
            C = void 0 !== y && y;
        g[0] !== x ? (t = x && "live" !== x.toLowerCase(), g[0] = x, g[1] = t) : t = g[1];
        let N = t,
            T = `flex flex-1 justify-between items-center h-[32px] min-h-[32px] gap-2${w?` ${w}`:""}`,
            M = `h-5 flex justify-start items-center gap-2.5 whitespace-nowrap flex-shrink-0${j?"mobile"===(void 0===S?"desktop":S)?" pl-1.5":"":" rounded-sm bg-neutral-50 px-1.5"}`;
        return g[2] !== j || g[3] !== f ? (r = j && (0, a.jsxs)("div", {
            className: "flex items-center gap-0.5",
            children: [(0, a.jsxs)("div", {
                className: "relative flex items-center justify-center",
                children: [(0, a.jsx)("div", {
                    className: "size-[7px] rounded-full bg-red-500 relative z-10"
                }), (0, a.jsx)("div", {
                    className: "absolute -inset-px size-[9px] rounded-full bg-red-500 opacity-75 animate-ping"
                })]
            }), (0, a.jsx)("p", {
                className: "text-body-sm text-red-500 uppercase ml-1 font-bold",
                children: f ? ? "LIVE"
            })]
        }), g[2] = j, g[3] = f, g[4] = r) : r = g[4], g[5] !== h || g[6] !== j || g[7] !== N || g[8] !== x ? (l = (h || N) && (0, a.jsxs)("p", {
            className: `text-body-sm ${j?"font-semibold":"font-medium"}`,
            children: [h && (0, a.jsxs)("span", {
                className: "text-text-primary",
                children: [h, N && " · "]
            }), N && (0, a.jsx)("span", {
                className: "text-text-primary",
                children: x
            })]
        }), g[5] = h, g[6] = j, g[7] = N, g[8] = x, g[9] = l) : l = g[9], g[10] !== M || g[11] !== r || g[12] !== l ? (n = (0, a.jsxs)("div", {
            className: M,
            children: [r, l]
        }), g[10] = M, g[11] = r, g[12] = l, g[13] = n) : n = g[13], g[14] !== v ? (o = v && (0, a.jsx)("span", {
            className: "whitespace-nowrap shrink-0",
            children: v
        }), g[14] = v, g[15] = o) : o = g[15], g[16] !== b || g[17] !== C ? (i = b && C && (0, a.jsxs)("span", {
            className: "truncate min-w-0",
            children: [" · ", b]
        }), g[16] = b, g[17] = C, g[18] = i) : i = g[18], g[19] !== o || g[20] !== i ? (c = (0, a.jsxs)("div", {
            className: "flex items-center text-body-sm text-text-secondary font-semibold min-w-0 overflow-hidden",
            children: [o, i]
        }), g[19] = o, g[20] = i, g[21] = c) : c = g[21], g[22] !== c || g[23] !== n ? (u = (0, a.jsx)("div", {
            className: "flex flex-1 items-center gap-2 min-w-0",
            children: (0, a.jsxs)("div", {
                className: "flex items-center gap-2 min-w-0 flex-1",
                children: [n, c]
            })
        }), g[22] = c, g[23] = n, g[24] = u) : u = g[24], g[25] !== k ? (d = k && (0, a.jsx)("div", {
            className: "flex overflow-visible gap-1 shrink-0",
            children: k
        }), g[25] = k, g[26] = d) : d = g[26], g[27] !== u || g[28] !== d || g[29] !== T ? (m = (0, a.jsxs)("div", {
            className: T,
            children: [u, d]
        }), g[27] = u, g[28] = d, g[29] = T, g[30] = m) : m = g[30], m
    }
    var nW = e.i(882261),
        nG = e.i(642871),
        nH = e.i(371124),
        nV = e.i(572795);

    function nY(e) {
        let t, r, l, n, o, i, c = (0, s.c)(14),
            {
                label: u,
                sublabel: d,
                className: m
            } = e,
            g = !!d && "pl-2";
        return c[0] !== m || c[1] !== g ? (t = (0, eL.cn)("flex h-[32px] group gap-1 items-center justify-center rounded-lg pl-3 pr-1.5 bg-neutral-50 dark:bg-neutral-100 hover:bg-neutral-100 dark:hover:bg-neutral-200 cursor-pointer outline-none", g, m), c[0] = m, c[1] = g, c[2] = t) : t = c[2], c[3] !== d ? (r = !!d && (0, a.jsx)("span", {
            className: "flex items-center justify-center font-medium mr-1.5 text-[10px] px-1 py-0.5 rounded-sm text-text-secondary border bg-neutral-0 dark:bg-neutral-200 dark:text-neutral-600 dark:border-0 border-neutral-200 border-b-2",
            children: d
        }), c[3] = d, c[4] = r) : r = c[4], c[5] !== u ? (l = (0, a.jsx)("span", {
            className: "text-text text-body-sm",
            children: u
        }), c[5] = u, c[6] = l) : l = c[6], c[7] !== r || c[8] !== l ? (n = (0, a.jsxs)("span", {
            className: "flex items-center",
            children: [r, l]
        }), c[7] = r, c[8] = l, c[9] = n) : n = c[9], c[10] === Symbol.for("react.memo_cache_sentinel") ? (o = (0, a.jsx)(nV.ChevronRightSmallIcon20, {
            className: "size-[14px]"
        }), c[10] = o) : o = c[10], c[11] !== t || c[12] !== n ? (i = (0, a.jsxs)("span", {
            className: t,
            children: [n, o]
        }), c[11] = t, c[12] = n, c[13] = i) : i = c[13], i
    }
    let nK = e => {
        let t, r, l, n, o, i, c, d = (0, s.c)(19),
            {
                className: m
            } = e,
            g = (0, O.useTranslations)(),
            {
                event: p,
                isNegRisk: f
            } = (0, sa.useSportsItemContext)(),
            h = (0, so.useSportsItemStore)(nQ);
        e: {
            let e, r;
            if (d[0] !== p.seriesSlug ? (e = (0, tX.canonicalSportSlug)(p.seriesSlug ? ? ""), r = (0, u.isEsportsSlug)(e), d[0] = p.seriesSlug, d[1] = e, d[2] = r) : (e = d[1], r = d[2]), r) {
                let e;
                d[3] !== p ? (e = (0, u.getEsportsEventHref)(p), d[3] = p, d[4] = e) : e = d[4], t = e;
                break e
            }
            t = `/sports/${e}/${p.slug}`
        }
        let x = t;
        t: {
            let e = p.markets.length;
            if (f) {
                if (0 == e - p.markets.filter(nZ).length) {
                    r = void 0;
                    break t
                }
                r = `${e}`;
                break t
            }
            if (1 === e) {
                r = void 0;
                break t
            }
            r = `${e}`
        }
        let v = r;
        return d[5] !== h ? (l = () => h(!0), n = () => h(!1), d[5] = h, d[6] = l, d[7] = n) : (l = d[6], n = d[7]), d[8] !== g ? (o = g("sports.gameView"), d[8] = g, d[9] = o) : o = d[9], d[10] !== m || d[11] !== v || d[12] !== o ? (i = (0, a.jsx)(nY, {
            label: o,
            sublabel: v,
            className: m
        }), d[10] = m, d[11] = v, d[12] = o, d[13] = i) : i = d[13], d[14] !== x || d[15] !== l || d[16] !== n || d[17] !== i ? (c = (0, a.jsx)(e$.default, {
            prefetch: !0,
            href: x,
            onPointerEnter: l,
            onPointerLeave: n,
            onClick: nJ,
            children: i
        }), d[14] = x, d[15] = l, d[16] = n, d[17] = i, d[18] = c) : c = d[18], c
    };

    function nQ(e) {
        return e.setPreventAccordionHover
    }

    function nZ(e) {
        return (e.sportsMarketType ? ? "moneyline") === "moneyline"
    }

    function nJ(e) {
        return e.stopPropagation()
    }
    nK.displayName = "GameViewButton";
    var nX = e.i(625797);
    let n0 = e => {
            let t, r, l, n, o, i = (0, s.c)(11),
                c = (0, O.useTranslations)(),
                {
                    startStreaming: u
                } = (0, rL.useLivestream)();
            i[0] !== e || i[1] !== u ? (t = t => {
                t.preventDefault(), t.stopPropagation(), u(e)
            }, i[0] = e, i[1] = u, i[2] = t) : t = i[2];
            let d = t;
            return i[3] !== c ? (r = c("tooltips.watchLivestream"), i[3] = c, i[4] = r) : r = i[4], i[5] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(nX.IconRadioOutline18, {
                size: 14
            }), i[5] = l) : l = i[5], i[6] !== d ? (n = (0, a.jsx)("button", {
                type: "button",
                onClick: d,
                className: "flex w-[32px] h-[32px] items-center justify-center rounded-lg bg-neutral-50 dark:bg-neutral-100 hover:bg-neutral-100 dark:hover:bg-neutral-200 cursor-pointer outline-none",
                children: l
            }), i[6] = d, i[7] = n) : n = i[7], i[8] !== r || i[9] !== n ? (o = (0, a.jsx)(r6.Tooltip, {
                content: r,
                children: n
            }), i[8] = r, i[9] = n, i[10] = o) : o = i[10], o
        },
        n1 = ["gameState", "delayedStatus"],
        n2 = ["youtube.com", "www.youtube.com", "m.youtube.com"],
        n3 = ["twitch.tv", "www.twitch.tv"],
        n5 = ["kick.com", "www.kick.com"];

    function n4() {
        let {
            event: e,
            moneylineMarket: t,
            mode: r
        } = (0, sa.useSportsItemContext)(), s = (0, O.useTranslations)(), l = (0, ee.useLocale)(), n = (0, lu.useSportSlug)(), {
            gameState: i,
            delayedStatus: c
        } = (0, lu.useSportsGameSelector)(e.slug, n1), {
            time: d
        } = (0, nH.useElapsedTime)(e.slug), m = o.default.useMemo(() => (0, tX.canonicalSportSlug)(e.seriesSlug ? ? ""), [e.seriesSlug]), g = o.default.useMemo(() => !!n && (0, u.isSportCategory)(n), [n]), p = o.default.useMemo(() => {
            if (g && e.seriesSlug && n && (!(0, u.isSportCategory)(n) || !((0, u.getLeaguesForCategory)(n).length <= 1))) return (0, u.getSportDisplayName)(e.seriesSlug) ? ? void 0
        }, [g, e.seriesSlug, n]), f = o.default.useMemo(() => u.SPORT_SLUGS_WITH_LEAGUE_NAME.includes(m), [m]), h = o.default.useMemo(() => u.sportMap[m] ? .sportId === u.SportId.Esports, [m]), x = o.default.useMemo(() => {
            if (!f) return;
            if (h && e.eventMetadata ? .league) return e.eventMetadata.league;
            if (!e ? .title) return;
            let t = e.title.split(" - ");
            if (t.length > 1) return h ? t[t.length - 1].trim() : t[0].trim();
            let r = e.title.split(":");
            if (r.length > 1) return r[0].trim()
        }, [f, h, e.eventMetadata ? .league, e ? .title]), v = o.default.useMemo(() => {
            let t = (0, nn.getGameLinesVolume)(e.markets, e.volume);
            return t ? `${(0,z.formatAbbreviated)(t,{decimals:2,currency:!0})} ${s("events.headerMeta.volume")}` : `$0.00 ${s("events.headerMeta.volume")}`
        }, [e.markets, e.volume, s]), b = o.default.useMemo(() => {
            if (!h) return;
            let t = e ? .markets ? .[0] ? .gameStartTime ? ? e.startDate;
            if (t) try {
                let e = new Date(t);
                if ((0, nW.isToday)(e)) return s("cards.today");
                if ((0, nG.isTomorrow)(e)) return s("cards.tomorrow");
                return (0, tK.format)(e, "MMM d", {
                    locale: (0, tQ.getDateFnsLocale)(l)
                })
            } catch {
                return
            }
        }, [e, h, s, l]), y = c ? (0, a9.capitalize)(c) : d, S = i === tX.GameState.Finished || y ? .toUpperCase() === "FINAL" ? y : b && y && "live" !== y.toLowerCase() ? `${b}, ${y}` : y, k = i === tX.GameState.Live, w = o.default.useMemo(() => (function(e) {
            let t;
            if (!e) return;
            try {
                t = new URL(e)
            } catch {
                return
            }
            if ("https:" !== t.protocol) return;
            let r = t.hostname.toLowerCase();
            if (n2.includes(r)) {
                let e;
                if (t.pathname.startsWith("/watch") ? e = t.searchParams.get("v") ? ? void 0 : t.pathname.startsWith("/embed/") ? e = t.pathname.split("/").filter(Boolean)[1] : t.pathname.startsWith("/live/") && (e = t.pathname.split("/").filter(Boolean)[1]), !e) return;
                return {
                    id: e,
                    type: "iframe",
                    src: `https://www.youtube.com/embed/${e}?autoplay=1`,
                    site: "youtube"
                }
            }
            if (n3.includes(r)) {
                let e = t.pathname.split("/").filter(Boolean)[0];
                if (!e) return;
                let r = new URL(G.CURRENT_ORIGIN).hostname;
                return {
                    id: e,
                    type: "iframe",
                    src: `https://player.twitch.tv/?channel=${e}&parent=${r}`,
                    site: "twitch"
                }
            }
            if (n5.includes(r)) {
                let e = t.pathname.split("/").filter(Boolean)[0];
                if (!e) return;
                return {
                    id: e,
                    type: "iframe",
                    src: `https://player.kick.com/${e}`,
                    site: "kick"
                }
            }
        })(e.resolutionSource ? ? t ? .resolution_source), [e.resolutionSource, t ? .resolution_source]), j = "live" === n || h, C = o.default.useMemo(() => (0, a.jsxs)(a.Fragment, {
            children: [!!w && (0, a.jsx)(n0, { ...w
            }), "desktop" === r && (0, a.jsx)(nK, {})]
        }), [w, r]);
        return (0, a.jsx)(nz, {
            isLive: k,
            liveLabel: s("sports.live"),
            categoryLabel: p,
            timeLabel: S,
            volume: v,
            leagueName: x,
            showLeagueName: j,
            mode: r,
            actions: C
        })
    }
    var n6 = e.i(983707),
        n7 = e.i(740849),
        n8 = e.i(893959),
        n9 = e.i(255128),
        oe = e.i(294241),
        ot = e.i(413002);
    let or = {
            type: "default",
            font: "small"
        },
        oa = {
            hoverHeightOffset: 0,
            height: 40,
            shadowHeight: 4,
            maxWidth: "auto",
            color: "gray",
            customColors: void 0,
            css: {
                width: "100%"
            }
        },
        os = {
            hoverHeightOffset: 2,
            height: 40,
            shadowHeight: 4,
            maxWidth: "auto",
            css: {
                width: "100%"
            }
        },
        ol = () => {
            let e, t, r = (0, s.c)(2);
            return r[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)("span", {
                className: "transition-opacity duration-100 w-full h-full opacity-50",
                children: (0, a.jsx)(ot.OutcomeButton, { ...oa,
                    onClick: ou,
                    children: (0, a.jsx)("p", {
                        className: "text-text-secondary text-sm font-normal flex-1",
                        children: "--"
                    })
                })
            }), r[0] = e) : e = r[0], r[1] === Symbol.for("react.memo_cache_sentinel") ? (t = (0, a.jsxs)("div", {
                className: "flex flex-col w-full gap-2",
                children: [e, (0, a.jsx)("span", {
                    className: "transition-opacity duration-100 w-full h-full opacity-50",
                    children: (0, a.jsx)(ot.OutcomeButton, { ...oa,
                        onClick: od,
                        children: (0, a.jsx)("p", {
                            className: "text-text-secondary text-sm font-normal flex-1",
                            children: "--"
                        })
                    })
                })]
            }), r[1] = t) : t = r[1], t
        };

    function on() {
        let e, t, r, l, n, o = (0, s.c)(15),
            {
                event: i
            } = (0, sa.useSportsItemContext)();
        o[0] !== i.slug ? (e = e => e.marketsSectionsState[i.slug], o[0] = i.slug, o[1] = e) : e = o[1];
        let u = e,
            d = (0, az.useSportsStore)(u, c.shallow);
        e: {
            let e = d.spreads ? .market || d.setHandicap ? .market || d.mapHandicap ? .market;
            if (e) {
                let r;
                if (o[2] !== i.markets || o[3] !== e) {
                    let t;
                    o[5] !== e ? (t = t => t.slug === e, o[5] = e, o[6] = t) : t = o[6], r = i.markets.find(t), o[2] = i.markets, o[3] = e, o[4] = r
                } else r = o[4];
                t = r;
                break e
            }
            t = void 0
        }
        let m = t,
            g = d.setHandicap ? .market ? "tennis_set_handicap" : d.mapHandicap ? .market ? "map_handicap" : "spreads";
        if (!m) {
            let e;
            return o[7] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(ol, {}), o[7] = e) : e = o[7], e
        }
        return o[8] === Symbol.for("react.memo_cache_sentinel") ? (r = {
            book: "never",
            lastPrice: "once-when-stale"
        }, o[8] = r) : r = o[8], o[9] !== m || o[10] !== g ? (l = (0, a.jsx)(n9.MarketSpreadButtons, {
            view: "card",
            market: m,
            variant: g
        }), o[9] = m, o[10] = g, o[11] = l) : l = o[11], o[12] !== m || o[13] !== l ? (n = (0, a.jsx)(eE.BookContextProvider, {
            market: m,
            prefetch: r,
            poll: "when-inactive",
            subscribe: "never",
            defer: "after-virtualized",
            children: l
        }), o[12] = m, o[13] = l, o[14] = n) : n = o[14], n
    }
    let oo = () => {
            let e, t, r, l, n, o = (0, s.c)(15),
                {
                    event: i
                } = (0, sa.useSportsItemContext)();
            o[0] !== i.slug ? (e = e => e.marketsSectionsState[i.slug], o[0] = i.slug, o[1] = e) : e = o[1];
            let u = e,
                d = (0, az.useSportsStore)(u, c.shallow);
            e: {
                let e = d.totals ? .market || d.matchTotals ? .market;
                if (e) {
                    let r;
                    if (o[2] !== i.markets || o[3] !== e) {
                        let t;
                        o[5] !== e ? (t = t => t.slug === e, o[5] = e, o[6] = t) : t = o[6], r = i.markets.find(t), o[2] = i.markets, o[3] = e, o[4] = r
                    } else r = o[4];
                    t = r;
                    break e
                }
                t = void 0
            }
            let m = t,
                g = d.matchTotals ? .market ? "tennis_match_totals" : "totals";
            if (!m) {
                let e;
                return o[7] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(ol, {}), o[7] = e) : e = o[7], e
            }
            return o[8] === Symbol.for("react.memo_cache_sentinel") ? (r = {
                book: "never",
                lastPrice: "once-when-stale"
            }, o[8] = r) : r = o[8], o[9] !== m || o[10] !== g ? (l = (0, a.jsx)(oe.MarketTotalButtons, {
                view: "card",
                market: m,
                variant: g
            }), o[9] = m, o[10] = g, o[11] = l) : l = o[11], o[12] !== m || o[13] !== l ? (n = (0, a.jsx)(eE.BookContextProvider, {
                market: m,
                prefetch: r,
                poll: "when-inactive",
                subscribe: "never",
                defer: "after-virtualized",
                children: l
            }), o[12] = m, o[13] = l, o[14] = n) : n = o[14], n
        },
        oi = () => {
            let e, t, r, l, n, o, i, c, u, d, m = (0, s.c)(44),
                {
                    event: g,
                    moneylineMarket: p
                } = (0, sa.useSportsItemContext)(),
                {
                    colors: h,
                    prices: x,
                    onOutcomeClick: v
                } = (0, n8.useOutcomeButtons)();
            m[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], m[0] = e) : e = m[0];
            let {
                event: b
            } = (0, eC.useEventContext)(e), {
                slug: y
            } = b;
            m[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], m[1] = t) : t = m[1];
            let {
                activeMarket: S
            } = (0, f.useEventActiveMarketContext)(t);
            m[2] === Symbol.for("react.memo_cache_sentinel") ? (r = ["selectedOutcomeIdx"], m[2] = r) : r = m[2];
            let {
                selectedOutcomeIdx: k
            } = (0, eT.useTradeContext)(r), w = (0, so.useSportsItemStore)(om), j = (0, so.useSportsItemStore)(og);
            m[3] !== p || m[4] !== v ? (l = () => {
                p && v(0, p.id)
            }, m[3] = p, m[4] = v, m[5] = l) : l = m[5];
            let C = l;
            m[6] !== p || m[7] !== v ? (n = () => {
                p && v(1, p.id)
            }, m[6] = p, m[7] = v, m[8] = n) : n = m[8];
            let N = n;
            m[9] !== w ? (o = () => {
                w(!0)
            }, m[9] = w, m[10] = o) : o = m[10];
            let T = o;
            m[11] !== w ? (i = () => {
                w(!1)
            }, m[11] = w, m[12] = i) : i = m[12];
            let M = i;
            e: {
                let e, t = y === g.slug,
                    r = (S.sportsMarketType ? ? "moneyline") === "moneyline";
                if (t && r) {
                    let e;
                    m[13] !== h[0] || m[14] !== h[1] ? (e = {
                        moneylineZeroColors: h[0],
                        moneylineOneColors: h[1],
                        dimState: "moderate"
                    }, m[13] = h[0], m[14] = h[1], m[15] = e) : e = m[15], c = e;
                    break e
                }
                if (!t && "card" === j) {
                    let e;
                    m[16] !== h[0] || m[17] !== h[1] ? (e = {
                        moneylineZeroColors: h[0],
                        moneylineOneColors: h[1],
                        dimState: "none"
                    }, m[16] = h[0], m[17] = h[1], m[18] = e) : e = m[18], c = e;
                    break e
                }
                m[19] === Symbol.for("react.memo_cache_sentinel") ? (e = {
                    moneylineZeroColors: {
                        color: "gray",
                        customColors: void 0
                    },
                    moneylineOneColors: {
                        color: "gray",
                        customColors: void 0
                    },
                    dimState: "light"
                }, m[19] = e) : e = m[19],
                c = e
            }
            let {
                moneylineZeroColors: _,
                moneylineOneColors: I,
                dimState: E
            } = c, D = p ? .teams;
            if (!p || !D) {
                let e;
                return m[20] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(ol, {}), m[20] = e) : e = m[20], e
            }
            if (m[21] !== E || m[22] !== p.outcomes || m[23] !== I || m[24] !== _ || m[25] !== N || m[26] !== x || m[27] !== k || m[28] !== D || m[29] !== C) {
                let e;
                m[31] !== E || m[32] !== I || m[33] !== _ || m[34] !== N || m[35] !== x || m[36] !== k || m[37] !== D || m[38] !== C ? (e = (e, t) => (0, a.jsx)("span", {
                    className: `w-full h-full ${"light"===E?"opacity-80":""} ${"moderate"===E&&k!==t?"opacity-60":""}`,
                    children: (0, a.jsx)(ot.SportsTeamOutcomeButton, {
                        team: D[t],
                        onTap: 0 === t ? C : N,
                        price: x[t],
                        outcomeIndex: t,
                        animationMode: "arrows",
                        priceMode: or,
                        ...os,
                        ...0 === t ? _ : I
                    })
                }, `outcome-button-${e}`), m[31] = E, m[32] = I, m[33] = _, m[34] = N, m[35] = x, m[36] = k, m[37] = D, m[38] = C, m[39] = e) : e = m[39], u = p.outcomes.map(e), m[21] = E, m[22] = p.outcomes, m[23] = I, m[24] = _, m[25] = N, m[26] = x, m[27] = k, m[28] = D, m[29] = C, m[30] = u
            } else u = m[30];
            return m[40] !== T || m[41] !== M || m[42] !== u ? (d = (0, a.jsx)("div", {
                className: "flex justify-between items-end w-full lg:justify-end",
                children: (0, a.jsx)("div", {
                    className: "flex flex-col gap-2 w-full",
                    onPointerEnter: T,
                    onPointerLeave: M,
                    children: u
                })
            }), m[40] = T, m[41] = M, m[42] = u, m[43] = d) : d = m[43], d
        },
        oc = () => {
            let e, t, r, l, n, o, i, c = (0, s.c)(18),
                u = (0, O.useTranslations)(),
                {
                    event: d,
                    moneylineMarket: m,
                    gameState: g
                } = (0, sa.useSportsItemContext)(),
                {
                    setSportsCashOutState: p,
                    canRedeem: f
                } = (0, aW.useCashOutTxContext)(),
                h = (0, lH.useSetActiveSportsMarket)(),
                x = (0, n7.useHasSportsPositions)(),
                v = d.closed || m.closed,
                {
                    isClosed: b
                } = {
                    isClosed: v,
                    isFinished: v || g === tX.GameState.Finished
                };
            c[0] !== d.slug || c[1] !== m || c[2] !== h || c[3] !== p ? (e = e => {
                e.stopPropagation(), p({
                    open: !0,
                    mode: "all"
                }), h(m, {
                    variant: "moneyline",
                    eventSlug: d.slug,
                    closeGamesAccordionIfOpen: !1,
                    closeOverlayAccordionIfOpen: !1
                })
            }, c[0] = d.slug, c[1] = m, c[2] = h, c[3] = p, c[4] = e) : e = c[4];
            let y = e;
            if (b && f && x) {
                let e, t;
                return c[5] !== u ? (e = u("trading.redeem"), c[5] = u, c[6] = e) : e = c[6], c[7] !== y || c[8] !== e ? (t = (0, a.jsx)("div", {
                    className: "flex flex-1 mt-1.5 lg:mt-0 lg:justify-end w-full",
                    children: (0, a.jsx)("div", {
                        className: "flex flex-1 h-full items-center justify-end w-full lg:w-[125px] @max-[490px]:w-full lg:@max-[490px]:w-full",
                        children: (0, a.jsx)(n6.TradingButton, {
                            color: "blue",
                            hoverHeightOffset: 2,
                            height: 44,
                            shadowHeight: 4,
                            maxWidth: "100%",
                            onClick: y,
                            children: e
                        })
                    })
                }), c[7] = y, c[8] = e, c[9] = t) : t = c[9], t
            }
            return b ? null : (c[10] === Symbol.for("react.memo_cache_sentinel") ? (t = {
                book: "never",
                lastPrice: "once-when-stale"
            }, c[10] = t) : t = c[10], c[11] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(oi, {}), c[11] = r) : r = c[11], c[12] !== m ? (l = (0, a.jsx)(eE.BookContextProvider, {
                market: m,
                prefetch: t,
                poll: "when-inactive",
                subscribe: "never",
                defer: "after-virtualized",
                children: r
            }), c[12] = m, c[13] = l) : l = c[13], c[14] === Symbol.for("react.memo_cache_sentinel") ? (n = (0, a.jsx)(on, {}), o = (0, a.jsx)(oo, {}), c[14] = n, c[15] = o) : (n = c[14], o = c[15]), c[16] !== l ? (i = (0, a.jsx)("div", {
                className: "flex flex-1 mt-1.5 lg:mt-0 lg:justify-end",
                children: (0, a.jsxs)("div", {
                    className: "grid flex-1 grid-cols-3 gap-2 lg:w-[372px] lg:@max-[490px]:w-full",
                    children: [l, n, o]
                })
            }), c[16] = l, c[17] = i) : i = c[17], i)
        };

    function ou(e) {
        e.preventDefault(), e.stopPropagation()
    }

    function od(e) {
        e.preventDefault(), e.stopPropagation()
    }

    function om(e) {
        return e.setPreventAccordionHover
    }

    function og(e) {
        return e.variant
    }
    var op = e.i(67767);
    let of = o.default.memo(e => {
        let t, r, l, n, o, i, c, u, d, m, g, p, f, h, x, v, b, y = (0, s.c)(63),
            {
                teamZero: S,
                teamOne: k,
                view: w
            } = e,
            {
                event: j,
                mode: C,
                teams: N,
                gameState: T,
                scores: M,
                isTennis: _,
                isEsports: I
            } = (0, sa.useSportsItemContext)(),
            E = (0, so.useSportsItemStore)(oh),
            D = (0, lu.useSportsViewSetting)(),
            P = M[0] >= 10 || M[1] >= 10 ? "34px" : "28px";
        y[0] !== T ? (t = nB(T), y[0] = T, y[1] = t) : t = y[1];
        let A = t,
            O = T !== tX.GameState.Finished && !j.closed && "aggregate" === D;
        y[2] !== S ? (r = nq(S), y[2] = S, y[3] = r) : r = y[3];
        let R = r;
        y[4] !== k ? (l = nq(k), y[4] = k, y[5] = l) : l = y[5];
        let L = l;
        y[6] !== T || y[7] !== N ? (n = nU(N, 0, T), y[6] = T, y[7] = N, y[8] = n) : n = y[8];
        let $ = n;
        y[9] !== T || y[10] !== N ? (o = nU(N, 1, T), y[9] = T, y[10] = N, y[11] = o) : o = y[11];
        let F = o,
            B = S.league;
        y[12] !== B ? (i = (0, sn.isScorebug)(B), y[12] = B, y[13] = i) : i = y[13];
        let q = i,
            U = k.league;
        y[14] !== U ? (c = (0, sn.isScorebug)(U), y[14] = U, y[15] = c) : c = y[15];
        let z = c;
        if (!N) return null;
        y[16] === Symbol.for("react.memo_cache_sentinel") ? (u = (0, a.jsx)(n4, {}), y[16] = u) : u = y[16], y[17] !== P ? (d = {
            "--highest-score-length": P
        }, y[17] = P, y[18] = d) : d = y[18];
        let W = d;
        return y[19] !== j || y[20] !== $ || y[21] !== _ ? (m = _ ? (0, a.jsx)(n$, {
            event: j,
            gameResult: $,
            teamIndex: 0
        }) : void 0, y[19] = j, y[20] = $, y[21] = _, y[22] = m) : m = y[22], y[23] !== $ || y[24] !== A || y[25] !== I || y[26] !== _ || y[27] !== M[0] || y[28] !== q || y[29] !== m || y[30] !== R ? (g = (0, a.jsx)(nO, {
            team: R,
            teamIndex: 0,
            score: M[0],
            gameStatus: A,
            gameResult: $,
            isScorebug: q,
            isEsports: I,
            isTennis: _,
            logoClassName: "size-7",
            tennisContent: m
        }), y[23] = $, y[24] = A, y[25] = I, y[26] = _, y[27] = M[0], y[28] = q, y[29] = m, y[30] = R, y[31] = g) : g = y[31], y[32] !== j || y[33] !== F || y[34] !== _ ? (p = _ ? (0, a.jsx)(n$, {
            event: j,
            gameResult: F,
            teamIndex: 1
        }) : void 0, y[32] = j, y[33] = F, y[34] = _, y[35] = p) : p = y[35], y[36] !== F || y[37] !== A || y[38] !== I || y[39] !== _ || y[40] !== M[1] || y[41] !== z || y[42] !== p || y[43] !== L ? (f = (0, a.jsx)(nO, {
            team: L,
            teamIndex: 1,
            score: M[1],
            gameStatus: A,
            gameResult: F,
            isScorebug: z,
            isEsports: I,
            isTennis: _,
            logoClassName: "size-7",
            tennisContent: p
        }), y[36] = F, y[37] = A, y[38] = I, y[39] = _, y[40] = M[1], y[41] = z, y[42] = p, y[43] = L, y[44] = f) : f = y[44], y[45] !== O || y[46] !== A || y[47] !== _ || y[48] !== W || y[49] !== g || y[50] !== f ? (h = (0, a.jsxs)(nD, {
            gameStatus: A,
            aggregated: O,
            isTennis: _,
            style: W,
            className: "w-full lg:w-auto lg:flex-1 @max-[490px]:w-full",
            children: [g, f]
        }), y[45] = O, y[46] = A, y[47] = _, y[48] = W, y[49] = g, y[50] = f, y[51] = h) : h = y[51], y[52] !== C || y[53] !== D ? (x = "mobile" === C || "moneyline" === D ? (0, a.jsx)(op.BinaryButtonSection, {}) : (0, a.jsx)(oc, {}), y[52] = C, y[53] = D, y[54] = x) : x = y[54], y[55] !== C || y[56] !== E ? (v = "mobile" === C ? (0, a.jsxs)("div", {
            className: "flex flex-col empty:hidden",
            onClick: ox,
            children: [(0, a.jsx)(nT.AccordionPositions, {
                expandMobile: "card" === E
            }), (0, a.jsx)(nN.AccordionOrders, {
                expandMobile: "card" === E
            })]
        }) : void 0, y[55] = C, y[56] = E, y[57] = v) : v = y[57], y[58] !== _ || y[59] !== h || y[60] !== x || y[61] !== v ? (b = (0, a.jsx)(nE, {
            isTennis: _,
            header: u,
            scoreGrid: h,
            buttons: x,
            footer: v
        }), y[58] = _, y[59] = h, y[60] = x, y[61] = v, y[62] = b) : b = y[62], b
    });

    function oh(e) {
        return e.variant
    }

    function ox(e) {
        return e.preventDefault()
    }
    var ov = e.i(557033),
        ob = e.i(458164),
        oy = e.i(879756),
        oS = e.i(123341),
        ok = e.i(156591),
        ow = e.i(228032),
        oj = e.i(693141);
    let oC = e => {
            let t, r, l, n, o, i, c, u, d, m = (0, s.c)(29),
                {
                    market: g,
                    team: p
                } = e,
                {
                    event: f,
                    markets: h,
                    teams: x,
                    gameState: v,
                    scores: b,
                    isTennis: y,
                    isEsports: S
                } = (0, sa.useSportsItemContext)();
            e: {
                if ("home" === g.negRiskSportsMarketType) {
                    t = 0;
                    break e
                }
                if ("away" === g.negRiskSportsMarketType) {
                    t = 1;
                    break e
                }
                let e = h.findIndex(e => e.slug === g.slug);
                if (0 === e) {
                    t = 0;
                    break e
                }
                if (2 === e) {
                    t = 1;
                    break e
                }
                t = 0
            }
            let k = t;
            m[0] !== p ? (r = nq(p), m[0] = p, m[1] = r) : r = m[1];
            let w = r;
            m[2] !== v ? (l = nB(v), m[2] = v, m[3] = l) : l = m[3];
            let j = l;
            m[4] !== v || m[5] !== k || m[6] !== x ? (n = nU(x, k, v), m[4] = v, m[5] = k, m[6] = x, m[7] = n) : n = m[7];
            let C = n,
                N = p.league;
            m[8] !== N ? (o = (0, sn.isScorebug)(N), m[8] = N, m[9] = o) : o = m[9];
            let T = o;
            m[10] === Symbol.for("react.memo_cache_sentinel") ? (i = {
                book: "never",
                lastPrice: "once-when-stale"
            }, m[10] = i) : i = m[10];
            let M = b[k];
            return m[11] !== f || m[12] !== C || m[13] !== y || m[14] !== k ? (c = y ? (0, a.jsx)(n$, {
                event: f,
                gameResult: C,
                teamIndex: k
            }) : void 0, m[11] = f, m[12] = C, m[13] = y, m[14] = k, m[15] = c) : c = m[15], m[16] !== C || m[17] !== j || m[18] !== S || m[19] !== y || m[20] !== T || m[21] !== c || m[22] !== k || m[23] !== M || m[24] !== w ? (u = (0, a.jsx)(nO, {
                team: w,
                teamIndex: k,
                score: M,
                gameStatus: j,
                gameResult: C,
                isScorebug: T,
                isEsports: S,
                isTennis: y,
                logoClassName: "size-7",
                tennisContent: c
            }), m[16] = C, m[17] = j, m[18] = S, m[19] = y, m[20] = T, m[21] = c, m[22] = k, m[23] = M, m[24] = w, m[25] = u) : u = m[25], m[26] !== g || m[27] !== u ? (d = (0, a.jsx)(eE.BookContextProvider, {
                market: g,
                prefetch: i,
                poll: "never",
                subscribe: "never",
                defer: "after-virtualized",
                children: u
            }), m[26] = g, m[27] = u, m[28] = d) : d = m[28], d
        },
        oN = e => {
            let t, r, l, n, o, i, c, u, d, m, g, p, f, h, x, v, b, y, S = (0, s.c)(40);
            if (S[0] !== e) {
                let {
                    teamZero: a,
                    teamOne: s,
                    sport: n,
                    closed: o,
                    withLayoutTransition: i,
                    view: c,
                    ...u
                } = e;
                r = n, l = c, t = u, S[0] = e, S[1] = t, S[2] = r, S[3] = l
            } else t = S[1], r = S[2], l = S[3];
            let k = void 0 === l ? "default" : l,
                {
                    event: w,
                    markets: j,
                    mode: C,
                    teams: N,
                    gameState: T,
                    scores: M,
                    isTennis: _
                } = (0, sa.useSportsItemContext)(),
                I = (0, so.useSportsItemStore)(oI),
                E = (0, lu.useSportsViewSetting)(),
                {
                    moneyline: D,
                    spreads: P,
                    totals: A
                } = (0, lu.useSportsMarketsSections)(w.slug);
            S[4] === Symbol.for("react.memo_cache_sentinel") ? (n = ["event"], S[4] = n) : n = S[4];
            let {
                event: O
            } = (0, eC.useEventContext)(n), R = (0, az.useSportsStore)(oE), L = O.slug === w.slug;
            e: {
                if ("aggregate" === E) {
                    let e = !!D && !!P ? .length && !!A ? .length;
                    if ("mobile" === C) {
                        o = e && L && ("smp" === k || !!R);
                        break e
                    }
                    o = e;
                    break e
                }
                o = !1
            }
            let $ = o;
            S[5] !== j[0] || S[6] !== j[2] ? (i = [j[0], j[2]], S[5] = j[0], S[6] = j[2], S[7] = i) : i = S[7];
            let F = i;
            t: {
                if (M[0] >= 10 || M[1] >= 10) {
                    c = "34px";
                    break t
                }
                c = "28px"
            }
            let B = c;
            S[8] !== T ? (u = nB(T), S[8] = T, S[9] = u) : u = S[9];
            let q = u;
            if (!N) return null;
            S[10] === Symbol.for("react.memo_cache_sentinel") ? (d = (0, a.jsx)(n4, {}), S[10] = d) : d = S[10], S[11] !== B ? (m = {
                "--highest-score-length": B
            }, S[11] = B, S[12] = m) : m = S[12];
            let U = m;
            return S[13] !== r || S[14] !== F || S[15] !== N ? (g = F.map((e, t) => (0, a.jsx)(oC, {
                market: e,
                team: N[t],
                sport: r
            }, e.slug)), S[13] = r, S[14] = F, S[15] = N, S[16] = g) : g = S[16], S[17] !== $ || S[18] !== q || S[19] !== _ || S[20] !== g || S[21] !== U ? (p = (0, a.jsx)("div", {
                className: "flex justify-between lg:min-w-0 lg:flex-1 lg:shrink-0",
                children: (0, a.jsx)(nD, {
                    gameStatus: q,
                    aggregated: $,
                    className: "relative w-full",
                    style: U,
                    isTennis: _,
                    children: g
                })
            }), S[17] = $, S[18] = q, S[19] = _, S[20] = g, S[21] = U, S[22] = p) : p = S[22], S[23] !== $ || S[24] !== T ? (f = T !== tX.GameState.Finished && ($ ? (0, a.jsx)(oT, {}) : (0, a.jsx)(ow.NegRiskButtonSection, {})), S[23] = $, S[24] = T, S[25] = f) : f = S[25], S[26] !== f ? (h = (0, a.jsx)("div", {
                className: "flex flex-1 justify-end @max-[490px]:w-full",
                children: f
            }), S[26] = f, S[27] = h) : h = S[27], S[28] !== p || S[29] !== h ? (x = (0, a.jsxs)("div", {
                className: "flex w-full gap-3 flex-row @max-[490px]:flex-col",
                children: [p, h]
            }), S[28] = p, S[29] = h, S[30] = x) : x = S[30], S[31] !== C || S[32] !== I ? (v = "mobile" === C && (0, a.jsxs)("div", {
                className: "flex flex-col empty:hidden",
                onClick: oD,
                children: [(0, a.jsx)(nT.AccordionPositions, {
                    expandMobile: "card" === I
                }), (0, a.jsx)(nN.AccordionOrders, {
                    expandMobile: "card" === I
                })]
            }), S[31] = C, S[32] = I, S[33] = v) : v = S[33], S[34] !== x || S[35] !== v ? (b = (0, a.jsxs)("div", {
                className: "w-full flex flex-col gap-3",
                children: [d, (0, a.jsxs)("div", {
                    className: "flex flex-col w-full gap-3",
                    children: [x, v]
                })]
            }), S[34] = x, S[35] = v, S[36] = b) : b = S[36], S[37] !== t || S[38] !== b ? (y = (0, a.jsx)("div", {
                className: "relative flex flex-col w-full @container",
                ...t,
                children: b
            }), S[37] = t, S[38] = b, S[39] = y) : y = S[39], y
        };
    oN.displayName = "NegRiskItem";
    let oT = () => {
            let e, t, r, l, n, o, i, u, d, m, g = (0, s.c)(24),
                {
                    event: p
                } = (0, sa.useSportsItemContext)();
            g[0] !== p.slug ? (e = e => e.marketsSectionsState[p.slug], g[0] = p.slug, g[1] = e) : e = g[1];
            let f = e,
                h = (0, az.useSportsStore)(f, c.shallow);
            h ? .spreads;
            e: {
                let e, r = h ? .spreads ? .market;
                if (!r) {
                    t = void 0;
                    break e
                }
                if (g[2] !== p.markets || g[3] !== r) {
                    let t;
                    g[5] !== r ? (t = e => e.slug === r, g[5] = r, g[6] = t) : t = g[6], e = p.markets.find(t), g[2] = p.markets, g[3] = r, g[4] = e
                } else e = g[4];t = e
            }
            let x = t;
            g[7] !== p.markets || g[8] !== h ? .totals ? .market ? (r = () => {
                let e = h ? .totals ? .market;
                if (e) return p.markets.find(t => t.slug === e)
            }, g[7] = p.markets, g[8] = h ? .totals ? .market, g[9] = r) : r = g[9], h ? .totals, g[10] !== r ? (l = r(), g[10] = r, g[11] = l) : l = g[11];
            let v = l;
            return g[12] === Symbol.for("react.memo_cache_sentinel") ? (n = (0, a.jsx)(oM, {}), g[12] = n) : n = g[12], g[13] !== x ? (o = x ? (0, a.jsx)(eE.BookContextProvider, {
                market: x,
                prefetch: {
                    book: "never",
                    lastPrice: "once-when-stale"
                },
                poll: "when-inactive",
                subscribe: "never",
                defer: "after-virtualized",
                children: (0, a.jsx)(n9.MarketSpreadButtons, {
                    view: "card",
                    market: x
                })
            }) : null, g[13] = x, g[14] = o) : o = g[14], g[15] !== o ? (i = (0, a.jsx)("div", {
                className: "flex w-full",
                children: o
            }), g[15] = o, g[16] = i) : i = g[16], g[17] !== v ? (u = v ? (0, a.jsx)(eE.BookContextProvider, {
                market: v,
                prefetch: {
                    book: "never",
                    lastPrice: "once-when-stale"
                },
                poll: "when-inactive",
                subscribe: "never",
                defer: "after-virtualized",
                children: (0, a.jsx)(oe.MarketTotalButtons, {
                    view: "card",
                    market: v
                })
            }) : null, g[17] = v, g[18] = u) : u = g[18], g[19] !== u ? (d = (0, a.jsx)("div", {
                className: "flex w-full",
                children: u
            }), g[19] = u, g[20] = d) : d = g[20], g[21] !== i || g[22] !== d ? (m = (0, a.jsx)("div", {
                className: "flex flex-1 mt-1.5 lg:mt-0 lg:justify-end",
                children: (0, a.jsxs)("div", {
                    className: "grid flex-1 grid-cols-3 gap-2 lg:w-[372px] @max-[490px]:grid-cols-1 @max-[490px]:w-full lg:@max-[490px]:w-full",
                    children: [n, i, d]
                })
            }), g[21] = i, g[22] = d, g[23] = m) : m = g[23], m
        },
        oM = () => {
            let e, t, r, l, n, o = (0, s.c)(24),
                {
                    event: i,
                    teams: c
                } = (0, sa.useSportsItemContext)();
            o[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["activeMarket"], o[0] = e) : e = o[0];
            let {
                activeMarket: u
            } = (0, f.useEventActiveMarketContext)(e);
            o[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], o[1] = t) : t = o[1];
            let {
                event: d
            } = (0, eC.useEventContext)(t), m = d.slug === i.slug, g = (u.sportsMarketType ? ? "moneyline") === "moneyline", h = (0, lu.useNegRiskSportsMarkets)(i.slug, "moneyline");
            if (o[2] !== m || o[3] !== g || o[4] !== h || o[5] !== c ? .[0] || o[6] !== c ? .[1]) {
                let e;
                o[8] !== m || o[9] !== g || o[10] !== c ? .[0] || o[11] !== c ? .[1] ? (e = (e, t) => {
                    if (0 === t) {
                        let t = c ? .[0],
                            r = m && !g ? {
                                color: "gray",
                                customColors: void 0
                            } : (0, oS.getSportsButtonColors)({
                                team: t
                            });
                        return {
                            market: e,
                            label: t ? .abbreviation ? .toUpperCase() ? ? "HOME",
                            ...r
                        }
                    }
                    if (2 === t) {
                        let t = c ? .[1],
                            r = m && !g ? {
                                color: "gray",
                                customColors: void 0
                            } : (0, oS.getSportsButtonColors)({
                                team: t
                            });
                        return {
                            market: e,
                            label: t ? .abbreviation ? .toUpperCase() ? ? "AWAY",
                            ...r
                        }
                    }
                    return {
                        market: e,
                        label: "DRAW",
                        color: "gray",
                        customColors: void 0
                    }
                }, o[8] = m, o[9] = g, o[10] = c ? .[0], o[11] = c ? .[1], o[12] = e) : e = o[12], r = h.map(e), o[2] = m, o[3] = g, o[4] = h, o[5] = c ? .[0], o[6] = c ? .[1], o[7] = r
            } else r = o[7];
            let x = r;
            if (o[13] !== u.slug || o[14] !== m || o[15] !== g || o[16] !== x) {
                let e;
                o[18] !== u.slug || o[19] !== m || o[20] !== g ? (e = e => {
                    let {
                        market: t,
                        label: r,
                        color: s,
                        customColors: l
                    } = e, n = m && g && u.slug === t.slug;
                    return (0, a.jsx)("span", {
                        className: (0, p.cn)("w-full h-full", m && g && !n && "opacity-60"),
                        children: (0, a.jsx)(eE.BookContextProvider, {
                            market: t,
                            prefetch: {
                                book: "never",
                                lastPrice: "once-when-stale"
                            },
                            poll: "when-inactive",
                            subscribe: "never",
                            defer: "after-virtualized",
                            children: (0, a.jsx)(o_, {
                                market: t,
                                label: r,
                                color: s,
                                customColors: l
                            })
                        })
                    }, t.slug)
                }, o[18] = u.slug, o[19] = m, o[20] = g, o[21] = e) : e = o[21], l = x.map(e), o[13] = u.slug, o[14] = m, o[15] = g, o[16] = x, o[17] = l
            } else l = o[17];
            return o[22] !== l ? (n = (0, a.jsx)("div", {
                className: "flex w-full flex-col gap-2 @max-[490px]:flex-row",
                children: l
            }), o[22] = l, o[23] = n) : n = o[23], n
        },
        o_ = ({
            market: e,
            label: t,
            color: r,
            customColors: l
        }) => {
            let n = (e => {
                    let t, r, a = (0, s.c)(13),
                        l = (0, lH.useSetActiveSportsMarket)();
                    a[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["setSelectedOutcomeIdx", "setPrice", "setPriceUpdateLocation", "setCursorActive", "side"], a[0] = t) : t = a[0];
                    let {
                        setSelectedOutcomeIdx: n,
                        setPrice: o,
                        setPriceUpdateLocation: i,
                        setCursorActive: c,
                        side: u
                    } = (0, eT.useTradeContext)(t), {
                        mode: d,
                        event: m
                    } = (0, sa.useSportsItemContext)(), {
                        slug: g
                    } = m, {
                        setTradeState: p
                    } = (0, oy.useMobileTradeContext)();
                    return a[1] !== e || a[2] !== d || 0 !== a[3] || a[4] !== l || a[5] !== c || a[6] !== o || a[7] !== i || a[8] !== n || a[9] !== p || a[10] !== u || a[11] !== g ? (r = t => {
                        let {
                            paddedPrice: r,
                            newMarket: a
                        } = t || {}, s = void 0 === a ? e : a;
                        "desktop" === d ? (s && l(s, {
                            eventSlug: g,
                            openGamesAccordion: !0,
                            openOverlayAccordion: !1,
                            closeGamesAccordionIfOpen: !1
                        }), n(0), "string" == typeof r && (o(r), i("click")), c(!0)) : p ? .({
                            type: "trade",
                            side: u,
                            outcomeIdx: 0,
                            market: s,
                            open: !0,
                            orderType: ob.OrderType.Market,
                            price: r,
                            updatePriceLocation: !1
                        })
                    }, a[1] = e, a[2] = d, a[3] = 0, a[4] = l, a[5] = c, a[6] = o, a[7] = i, a[8] = n, a[9] = p, a[10] = u, a[11] = g, a[12] = r) : r = a[12], r
                })(e),
                i = o.default.useCallback(() => {
                    n()
                }, [n]),
                c = (0, a6.useMarketBestPrices)(e),
                {
                    oddsFormat: u
                } = (0, lu.useOddsFormat)(),
                {
                    side: d
                } = (0, eT.useTradeContext)(["side"]),
                m = o.default.useMemo(() => {
                    let t = c ? .["~zero"] ? .[d ? .toLowerCase()];
                    if (!t) return {
                        formattedPrice: "0¢",
                        paddedPrice: void 0,
                        price: "0"
                    };
                    let r = (0, ok.getPrecisionFromTickSize)(e.orderPriceMinTickSize),
                        a = (0, z.showPaddedCentsOnly)(t, r),
                        {
                            formatted: s
                        } = (0, ov.convertPrice)({
                            price: parseFloat(t),
                            precision: r,
                            inputMode: "decimal",
                            outputMode: u
                        });
                    return {
                        formattedPrice: s,
                        paddedPrice: a,
                        price: t
                    }
                }, [c, e ? .outcomes, u, d]),
                g = {
                    market: e,
                    outcomeIndex: 0,
                    onTap: i,
                    color: r,
                    customColors: l,
                    price: m,
                    label: t,
                    hoverHeightOffset: 2,
                    maxWidth: "auto",
                    className: "w-full",
                    style: {
                        minWidth: 0
                    }
                };
            return (0, a.jsxs)(a.Fragment, {
                children: [(0, a.jsx)("div", {
                    className: "hidden @min-[490px]:block w-full",
                    children: (0, a.jsx)(oj.NegRiskOutcomeButton, { ...g,
                        height: 36,
                        shadowHeight: 3
                    })
                }), (0, a.jsx)("div", {
                    className: "block @max-[490px]:block @min-[490px]:hidden w-full",
                    children: (0, a.jsx)(oj.NegRiskOutcomeButton, { ...g,
                        height: 44,
                        shadowHeight: 4
                    })
                })]
            })
        };

    function oI(e) {
        return e.variant
    }

    function oE(e) {
        return e.evt
    }

    function oD(e) {
        return e.preventDefault()
    }
    let oP = e => {
            let t, r = (0, s.c)(14),
                {
                    teamZero: l,
                    teamOne: n,
                    sport: o,
                    closed: i,
                    withLayoutTransition: c,
                    view: u,
                    isNegRisk: d
                } = e,
                m = void 0 === u ? "default" : u;
            if (void 0 !== d && d) {
                let e;
                return r[0] !== i || r[1] !== o || r[2] !== n || r[3] !== l || r[4] !== m || r[5] !== c ? (e = (0, a.jsx)(oN, {
                    teamZero: l,
                    teamOne: n,
                    sport: o,
                    closed: i,
                    withLayoutTransition: c,
                    view: m
                }), r[0] = i, r[1] = o, r[2] = n, r[3] = l, r[4] = m, r[5] = c, r[6] = e) : e = r[6], e
            }
            return r[7] !== i || r[8] !== o || r[9] !== n || r[10] !== l || r[11] !== m || r[12] !== c ? (t = (0, a.jsx)( of , {
                teamZero: l,
                teamOne: n,
                sport: o,
                closed: i,
                withLayoutTransition: c,
                view: m
            }), r[7] = i, r[8] = o, r[9] = n, r[10] = l, r[11] = m, r[12] = c, r[13] = t) : t = r[13], t
        },
        oA = o.default.memo(e => {
            let t, r, l, n, i, c, u, d, m, g, h, x, v, b, y, S, k, w, j, C, N = (0, s.c)(62),
                {
                    item: T
                } = e,
                {
                    moneylineMarket: M,
                    event: _,
                    isNegRisk: I,
                    teams: E,
                    gameState: D,
                    mode: P
                } = (0, sa.useSportsItemContext)();
            N[0] !== _.slug ? (t = e => e.gamesAccordionValue === _.slug, N[0] = _.slug, N[1] = t) : t = N[1];
            let A = (0, az.useSportsStore)(t),
                O = (0, az.useSportsStore)(oO),
                R = (0, lH.useSetActiveSportsMarket)();
            N[2] === Symbol.for("react.memo_cache_sentinel") ? (r = ["event"], N[2] = r) : r = N[2];
            let {
                event: L
            } = (0, eC.useEventContext)(r), {
                slug: $
            } = L;
            N[3] === Symbol.for("react.memo_cache_sentinel") ? (l = ["activeMarket"], N[3] = l) : l = N[3];
            let {
                activeMarket: F
            } = (0, f.useEventActiveMarketContext)(l), B = (0, lu.useSportsViewSetting)(), q = F.sportsMarketType ? ? "moneyline";
            N[4] !== q ? (n = (0, nn.isSpreadMarket)(q), N[4] = q, N[5] = n) : n = N[5];
            let U = n;
            N[6] !== q ? (i = (0, nn.isTotalMarket)(q), N[6] = q, N[7] = i) : i = N[7];
            let z = i,
                W = "aggregate" === B && $ === _.slug && (U || z);
            e: {
                if ("tennis_set_handicap" === q || "tennis_match_totals" === q) {
                    c = q;
                    break e
                }
                c = U ? "spreads" : "totals"
            }
            let G = c,
                H = E ? .[0],
                V = E ? .[1];
            N[8] !== _.markets || N[9] !== T || N[10] !== M ? (u = e => {
                if (e && T.event) {
                    let t = _.markets.find(t => t.id.toString() === e.toString());
                    if (t) return t
                }
                return M
            }, N[8] = _.markets, N[9] = T, N[10] = M, N[11] = u) : u = N[11];
            let Y = u;
            N[12] !== $ || N[13] !== _.slug || N[14] !== Y || N[15] !== A || N[16] !== M || N[17] !== R || N[18] !== O ? (d = () => {
                $ !== _.slug ? R(Y(M.id), {
                    eventSlug: _.slug,
                    openGamesAccordion: !0
                }) : A ? O("") : O(_.slug)
            }, N[12] = $, N[13] = _.slug, N[14] = Y, N[15] = A, N[16] = M, N[17] = R, N[18] = O, N[19] = d) : d = N[19];
            let K = d,
                [Q, Z] = o.default.useState(null);
            N[20] !== G || N[21] !== W ? (m = () => {
                W && Z(G)
            }, g = [W, G], N[20] = G, N[21] = W, N[22] = m, N[23] = g) : (m = N[22], g = N[23]), o.default.useEffect(m, g);
            let J = W ? G : Q ? ? G;
            N[24] !== _.slug || N[25] !== W || N[26] !== J ? (h = (0, a.jsx)(nM.LineSelector, {
                type: J,
                eventSlug: _.slug,
                location: "card",
                visible: W
            }), N[24] = _.slug, N[25] = W, N[26] = J, N[27] = h) : h = N[27];
            let X = h;
            if (!H || !V || !D) return null;
            let ee = T.event,
                et = "mobile" === P && T.hasBorder && "after:content-[''] after:absolute after:left-0 after:right-0 after:h-px after:bg-border after:-bottom-2",
                er = "desktop" === P && "rounded-xl border overflow-hidden";
            N[28] !== et || N[29] !== er ? (x = (0, p.cn)("mb-2 relative bg-surface-1", et, er), N[28] = et, N[29] = er, N[30] = x) : x = N[30];
            let ea = M.closed || D === tX.GameState.Finished;
            N[31] !== I || N[32] !== T.sport || N[33] !== V || N[34] !== ea || N[35] !== H ? (v = (0, a.jsx)(oP, {
                teamZero: H,
                teamOne: V,
                sport: T.sport,
                closed: ea,
                view: "default",
                isNegRisk: I
            }), N[31] = I, N[32] = T.sport, N[33] = V, N[34] = ea, N[35] = H, N[36] = v) : v = N[36], N[37] !== T.sport || N[38] !== K || N[39] !== v ? (b = (0, a.jsx)(nI, {
                sport: T.sport,
                onClick: K,
                children: v
            }), N[37] = T.sport, N[38] = K, N[39] = v, N[40] = b) : b = N[40];
            let es = W ? "auto" : 0;
            N[41] !== X ? (y = (0, a.jsx)("div", {
                className: "flex w-full",
                children: X
            }), N[41] = X, N[42] = y) : y = N[42], N[43] !== es || N[44] !== y ? (S = (0, a.jsx)(nw.AnimateHeight, {
                height: es,
                duration: 300,
                animateOpacity: !0,
                easing: "cubic-bezier(0.77,0,0.175,1)",
                children: y
            }), N[43] = es, N[44] = y, N[45] = S) : S = N[45];
            let el = `sports-accordion-item-${T.event}`,
                en = `sports-accordion-item-${T.event}-tabs`;
            return N[46] !== el || N[47] !== en ? (k = (0, a.jsx)(nC.SportsAccordionItemContent, {
                accordionId: el,
                tabsId: en
            }), N[46] = el, N[47] = en, N[48] = k) : k = N[48], N[49] !== P ? (w = "desktop" === P && (0, a.jsx)(nT.AccordionPositions, {}), N[49] = P, N[50] = w) : w = N[50], N[51] !== P ? (j = "desktop" === P && (0, a.jsx)(nN.AccordionOrders, {}), N[51] = P, N[52] = j) : j = N[52], N[53] !== T.event || N[54] !== M || N[55] !== x || N[56] !== b || N[57] !== S || N[58] !== k || N[59] !== w || N[60] !== j ? (C = (0, a.jsx)("div", {
                className: "pb-2 w-full",
                children: (0, a.jsxs)(nj.SportsAccordionItem, {
                    market: M,
                    event: ee,
                    className: x,
                    children: [b, S, k, w, j]
                })
            }), N[53] = T.event, N[54] = M, N[55] = x, N[56] = b, N[57] = S, N[58] = k, N[59] = w, N[60] = j, N[61] = C) : C = N[61], C
        });

    function oO(e) {
        return e.setGamesAccordionValue
    }
    let oR = o.default.memo(function(e) {
            let t, r, l, n = (0, s.c)(7),
                {
                    item: i,
                    virtualized: c
                } = e,
                u = (0, lu.useSportsEventSelector)(i.event);
            n[0] !== u ? (t = () => ({
                event: u,
                variant: "card",
                orientation: "desktop"
            }), n[0] = u, n[1] = t) : t = n[1];
            let [d] = o.default.useState(t);
            return !u || void 0 !== c && c ? null : (n[2] !== i ? (r = (0, a.jsx)(sa.SportsItemContextProvider, {
                children: (0, a.jsx)(oA, {
                    item: i
                })
            }), n[2] = i, n[3] = r) : r = n[3], n[4] !== d || n[5] !== r ? (l = (0, a.jsx)(so.SportsItemStoreProvider, {
                initialState: d,
                children: r
            }), n[4] = d, n[5] = r, n[6] = l) : l = n[6], l)
        }),
        oL = o.default.memo(function() {
            let e, t, r, l, n, u, d, m, g, p, f, h, x, v, b, y, S, k, w = (0, s.c)(71);
            w[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["isPastVisible", "setIsPastVisible"], w[0] = e) : e = w[0];
            let {
                isPastVisible: j,
                setIsPastVisible: C
            } = (0, eC.useEventContext)(e);
            w[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["setVirtualized"], w[1] = t) : t = w[1];
            let {
                setVirtualized: N
            } = (0, eN.useSportsContext)(t);
            w[2] === Symbol.for("react.memo_cache_sentinel") ? (r = ["scrollTo", "setScrollTo"], w[2] = r) : r = w[2];
            let {
                scrollTo: T,
                setScrollTo: M
            } = a3(r), _ = (0, i.useRouter)(), I = "/esports/live" === _.pathname || "/esports/soon" === _.pathname, E = o.default.useRef(null), D = o.default.useRef(null), P = (0, az.useSportsStore)(oB, c.shallow), A = (0, az.useSportsStore)(oq, c.shallow), O = (0, az.useSportsStore)(oU), R = (0, az.useSportsStore)(oz), L = (0, az.useSportsStore)(oW), $ = (0, az.useSportsStore)(oG), {
                finishedItems: F,
                isLoading: B,
                hasMore: q,
                fetchFirstPage: U,
                fetchNextPage: z,
                hasFetched: W
            } = nm();
            w[3] !== L || w[4] !== O || w[5] !== R ? (l = e => (0, l9.doesEventMatchTier)(e, O) && (0, l9.doesEventMatchTournament)(e, R) && (0, l9.doesEventMatchSearch)(e, L), w[3] = L, w[4] = O, w[5] = R, w[6] = l) : l = w[6];
            let G = l,
                H = "all" !== O || "all" !== R || "" !== L;
            e: {
                let e, t;
                if (!H) {
                    n = P;
                    break e
                }
                if (w[7] !== G || w[8] !== P || w[9] !== $) {
                    e = new Set;
                    for (let t = P.length - 1; t >= 0; t--) {
                        let r = P[t];
                        if ("item" === r.type && G($[r.event]))
                            for (let r = t - 1; r >= 0; r--)
                                if ("header" === P[r].type) e.add(r);
                                else break
                    }
                    w[7] = G, w[8] = P, w[9] = $, w[10] = e
                } else e = w[10];
                if (w[11] !== G || w[12] !== P || w[13] !== $ || w[14] !== e) {
                    let r;
                    w[16] !== G || w[17] !== $ || w[18] !== e ? (r = (t, r) => "view-all-button" === t.type || ("header" === t.type ? !!t.includeSettingsWidget || e.has(r) : "item" !== t.type || G($[t.event])), w[16] = G, w[17] = $, w[18] = e, w[19] = r) : r = w[19], t = P.filter(r), w[11] = G, w[12] = P, w[13] = $, w[14] = e, w[15] = t
                } else t = w[15];n = t
            }
            let V = n;
            t: {
                let e, t;
                if (!H) {
                    u = A;
                    break t
                }
                if (w[20] !== G || w[21] !== $ || w[22] !== A) {
                    e = new Set;
                    for (let t = A.length - 1; t >= 0; t--) {
                        let r = A[t];
                        if ("item" === r.type && G($[r.event]))
                            for (let r = t - 1; r >= 0; r--)
                                if ("header" === A[r].type) e.add(r);
                                else break
                    }
                    w[20] = G, w[21] = $, w[22] = A, w[23] = e
                } else e = w[23];
                if (w[24] !== G || w[25] !== $ || w[26] !== e || w[27] !== A) {
                    let r;
                    w[29] !== G || w[30] !== $ || w[31] !== e ? (r = (t, r) => "view-all-button" === t.type || ("header" === t.type ? e.has(r) : "item" !== t.type || G($[t.event])), w[29] = G, w[30] = $, w[31] = e, w[32] = r) : r = w[32], t = A.filter(r), w[24] = G, w[25] = $, w[26] = e, w[27] = A, w[28] = t
                } else t = w[28];u = t
            }
            let Y = u;
            w[33] !== V ? (d = V.map((e, t) => "view-all-button" === e.type ? e : { ...e,
                hasBorder: "item" === e.type && t + 1 < V.length && "item" === V[t + 1].type
            }), w[33] = V, w[34] = d) : d = w[34];
            let K = d;
            w[35] !== Y ? (m = Y.map((e, t) => "view-all-button" === e.type ? e : { ...e,
                hasBorder: "item" === e.type && t + 1 < Y.length && "item" === Y[t + 1].type
            }), w[35] = Y, w[36] = m) : m = w[36];
            let Q = m;
            w[37] !== U || w[38] !== W || w[39] !== j || w[40] !== C ? (g = () => {
                let e = !j;
                C(e), e && !W && U()
            }, w[37] = U, w[38] = W, w[39] = j, w[40] = C, w[41] = g) : g = w[41];
            let Z = g,
                J = j && B && !W;
            w[42] !== K || w[43] !== q || w[44] !== Q || w[45] !== I || w[46] !== J || w[47] !== j || w[48] !== F ? (p = ng({
                expandedItems: K,
                hiddenItems: Q,
                paginatedItems: F,
                isPastVisible: j,
                isLoadingPast: J,
                hasMore: q,
                hideFinishedToggle: I
            }), w[42] = K, w[43] = q, w[44] = Q, w[45] = I, w[46] = J, w[47] = j, w[48] = F, w[49] = p) : p = w[49];
            let X = p;
            w[50] !== N ? (f = () => {
                setTimeout(() => N(!0), 1e3)
            }, w[50] = N, w[51] = f) : f = w[51], w[52] === Symbol.for("react.memo_cache_sentinel") ? (h = [], w[52] = h) : h = w[52], o.default.useEffect(f, h), w[53] !== X || w[54] !== T || w[55] !== M ? (x = () => {
                if (!T) return;
                let e = X.findIndex(e => "item" === e.type && "item" === e.data.type && e.data.event === T); - 1 !== e && E.current ? (E.current.scrollToIndex({
                    index: e,
                    behavior: "smooth",
                    align: "center"
                }), D.current = setTimeout(() => {
                    M(void 0)
                }, 750)) : M(void 0)
            }, v = [T, X, M], w[53] = X, w[54] = T, w[55] = M, w[56] = x, w[57] = v) : (x = w[56], v = w[57]), o.default.useEffect(x, v), w[58] === Symbol.for("react.memo_cache_sentinel") ? (b = () => () => {
                D.current && clearTimeout(D.current)
            }, y = [], w[58] = b, w[59] = y) : (b = w[58], y = w[59]), o.default.useEffect(b, y);
            let ee = `virtuoso-${O}-${R}-${L}`,
                et = Math.min(X.length, 20);
            return w[60] !== z || w[61] !== Z || w[62] !== B || w[63] !== J || w[64] !== j ? (S = (e, t) => "hidden-toggle" === t.type ? (0, a.jsx)(na, {
                isOpen: j,
                handleClick: Z,
                isLoading: J
            }) : "load-more" === t.type ? (0, a.jsx)(na, {
                variant: "load-more",
                handleClick: z,
                isLoading: B
            }) : "header" === t.data.type ? (0, a.jsx)(nS, {
                item: t.data
            }) : "view-all-button" === t.data.type ? (0, a.jsx)(nk, {
                sportSlug: t.data.sportSlug,
                sportText: t.data.sportText
            }) : (0, a.jsx)(oR, {
                item: t.data
            }), w[60] = z, w[61] = Z, w[62] = B, w[63] = J, w[64] = j, w[65] = S) : S = w[65], w[66] !== X || w[67] !== ee || w[68] !== et || w[69] !== S ? (k = (0, a.jsx)(l8.Virtuoso, {
                ref: E,
                className: "h-full",
                useWindowScroll: !0,
                defaultItemHeight: 100,
                initialItemCount: et,
                data: X,
                itemContent: S,
                overscan: 400,
                logLevel: l8.LogLevel.ERROR
            }, ee), w[66] = X, w[67] = ee, w[68] = et, w[69] = S, w[70] = k) : k = w[70], k
        });

    function o$(e) {
        let t, r, l, n, i = (0, s.c)(10);
        i[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["bookAccordionSlug", "setBookAccordionSlug"], i[0] = t) : t = i[0];
        let {
            bookAccordionSlug: c,
            setBookAccordionSlug: u
        } = a3(t), d = (0, ej.useAmplitudeAnalytics)();
        return (() => {
            let e, t, r, a, l = (0, s.c)(11),
                n = (0, lu.useSportsViewSetting)();
            l[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], l[0] = e) : e = l[0];
            let {
                event: i
            } = (0, eC.useEventContext)(e);
            l[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], l[1] = t) : t = l[1];
            let {
                activeMarket: c
            } = (0, f.useEventActiveMarketContext)(t), u = (0, lH.useSetActiveSportsMarket)(), d = (0, az.useSportsStore)(oF), m = (0, az.useBoundSportsStore)();
            l[2] !== c || l[3] !== i || l[4] !== u || l[5] !== m || l[6] !== n ? (r = () => {
                let e = m ? .getState() ? .marketsSectionsState[i.slug],
                    t = e ? .moneyline ? .type === "binary" ? [e.moneyline.market] : e ? .moneyline ? .markets ? ? [],
                    r = e ? .spreads ? .market,
                    a = e ? .totals ? .market;
                if ("moneyline" === n && t.length > 0 && !t.includes(c.slug) || "moneyline" !== n && (r || a) && (!r || r !== c.slug) && (!a || a !== c.slug)) {
                    let e = i.markets.find(e => e.slug === t[0]);
                    e && u(e, {
                        closeGamesAccordionIfOpen: !1,
                        closeOverlayAccordionIfOpen: !1,
                        openGamesAccordion: !1,
                        openOverlayAccordion: !1
                    })
                }
            }, l[2] = c, l[3] = i, l[4] = u, l[5] = m, l[6] = n, l[7] = r) : r = l[7], l[8] !== d || l[9] !== n ? (a = [d, n], l[8] = d, l[9] = n, l[10] = a) : a = l[10], o.default.useEffect(r, a)
        })(), i[1] !== d || i[2] !== c || i[3] !== u ? (r = e => {
            u(e), "" === c && d.trackEvent(es.Events.SportsViewOrderbookClick, {
                location: "card"
            })
        }, i[1] = d, i[2] = c, i[3] = u, i[4] = r) : r = i[4], i[5] === Symbol.for("react.memo_cache_sentinel") ? (l = (0, a.jsx)(oL, {}), i[5] = l) : l = i[5], i[6] !== c || i[7] !== e || i[8] !== r ? (n = (0, a.jsx)(lD.Accordion.Root, {
            type: "single",
            value: c,
            onValueChange: r,
            ...e,
            children: l
        }), i[6] = c, i[7] = e, i[8] = r, i[9] = n) : n = i[9], n
    }

    function oF(e) {
        return e.evt
    }

    function oB(e) {
        return e.dragItems
    }

    function oq(e) {
        return e.hiddenDragItems
    }

    function oU(e) {
        return e.tierFilter
    }

    function oz(e) {
        return e.tournamentFilter
    }

    function oW(e) {
        return e.searchQuery
    }

    function oG(e) {
        return e.events
    }
    var oH = e.i(118818);
    let oV = e => {
            let t, r, l, n, o, i = (0, s.c)(26),
                {
                    event: c,
                    sport: u
                } = e,
                {
                    isNegRisk: d
                } = (0, sa.useSportsItemContext)(),
                m = (0, lu.useMoneylineMarkets)(c.slug);
            e: {
                let e, r, a;
                if ("binary" === m.type) {
                    let e, r, a;
                    m.market.teams && 2 === m.market.teams.length && ([e, r] = m.market.teams), i[0] !== m.market || i[1] !== r || i[2] !== e ? (a = {
                        market: m.market,
                        zeroTeam: e,
                        oneTeam: r
                    }, i[0] = m.market, i[1] = r, i[2] = e, i[3] = a) : a = i[3], t = a;
                    break e
                }
                let s = m.markets.length ? m.markets[0] : m.activeNegRiskMarket;s.teams && 2 === s.teams.length && ([e, r] = s.teams),
                i[4] !== s || i[5] !== r || i[6] !== e ? (a = {
                    market: s,
                    zeroTeam: e,
                    oneTeam: r
                }, i[4] = s, i[5] = r, i[6] = e, i[7] = a) : a = i[7],
                t = a
            }
            let {
                market: g,
                zeroTeam: p,
                oneTeam: f
            } = t, h = c.seriesSlug ? ? "";
            i[8] !== h ? (r = (0, tX.canonicalSportSlug)(h), i[8] = h, i[9] = r) : r = i[9];
            let x = `/sports/${r}/${c.slug}`;
            return p && f ? (i[10] !== d || i[11] !== g || i[12] !== f || i[13] !== u || i[14] !== p ? (l = d && (0, a.jsx)(oN, {
                teamZero: p,
                teamOne: f,
                sport: u,
                closed: !!g.closed
            }), i[10] = d, i[11] = g, i[12] = f, i[13] = u, i[14] = p, i[15] = l) : l = i[15], i[16] !== d || i[17] !== g || i[18] !== f || i[19] !== u || i[20] !== p ? (n = !d && (0, a.jsx)( of , {
                teamZero: p,
                teamOne: f,
                sport: u,
                closed: !!g.closed
            }), i[16] = d, i[17] = g, i[18] = f, i[19] = u, i[20] = p, i[21] = n) : n = i[21], i[22] !== x || i[23] !== l || i[24] !== n ? (o = (0, a.jsx)("div", {
                className: "pb-3",
                children: (0, a.jsxs)(e$.default, {
                    href: x,
                    className: "block w-full rounded-xl border overflow-hidden bg-surface-1 p-3",
                    children: [l, n]
                })
            }), i[22] = x, i[23] = l, i[24] = n, i[25] = o) : o = i[25], o) : null
        },
        oY = e => {
            let t, r, l, n, o, i, c, u, d = (0, s.c)(16),
                {
                    initialEvent: m,
                    item: g
                } = e,
                {
                    event: p,
                    moneylineMarket: h
                } = (0, sa.useSportsItemContext)();
            d[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], d[0] = t) : t = d[0];
            let {
                event: x
            } = (0, eC.useEventContext)(t);
            d[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["activeMarket"], d[1] = r) : r = d[1];
            let {
                activeMarket: v
            } = (0, f.useEventActiveMarketContext)(r);
            e: {
                if (x.slug === p.slug) {
                    l = v;
                    break e
                }
                l = h
            }
            let b = l;
            return d[2] === Symbol.for("react.memo_cache_sentinel") ? (n = {
                book: "never",
                lastPrice: "never"
            }, d[2] = n) : n = d[2], d[3] !== p || d[4] !== m || d[5] !== g.sport ? (o = (0, a.jsx)(oV, {
                sport: g.sport,
                initialEvent: m,
                event: p
            }), d[3] = p, d[4] = m, d[5] = g.sport, d[6] = o) : o = d[6], d[7] !== b || d[8] !== o ? (i = (0, a.jsx)(oH.MobileMarketContextProvider, {
                market: b,
                hideControls: !0,
                children: o
            }), d[7] = b, d[8] = o, d[9] = i) : i = d[9], d[10] !== p || d[11] !== i ? (c = (0, a.jsx)(ss.SportsPositionContextProvider, {
                event: p,
                children: i
            }), d[10] = p, d[11] = i, d[12] = c) : c = d[12], d[13] !== h || d[14] !== c ? (u = (0, a.jsx)(eE.BookContextProvider, {
                market: h,
                prefetch: n,
                poll: "never",
                subscribe: "never",
                defer: "after-virtualized",
                children: c
            }), d[13] = h, d[14] = c, d[15] = u) : u = d[15], u
        },
        oK = e => {
            let t, r, l, n = (0, s.c)(7),
                {
                    item: i
                } = e,
                c = (0, lu.useSportsEventSelector)(i.event);
            n[0] !== c ? (t = () => ({
                event: c,
                variant: "card",
                orientation: "mobile"
            }), n[0] = c, n[1] = t) : t = n[1];
            let [u] = o.default.useState(t);
            return c ? (n[2] !== i ? (r = (0, a.jsx)(sa.SportsItemContextProvider, {
                children: (0, a.jsx)(oY, {
                    item: i,
                    initialEvent: i.event
                })
            }), n[2] = i, n[3] = r) : r = n[3], n[4] !== u || n[5] !== r ? (l = (0, a.jsx)(so.SportsItemStoreProvider, {
                initialState: u,
                children: r
            }), n[4] = u, n[5] = r, n[6] = l) : l = n[6], l) : null
        },
        oQ = e => {
            let t, r, l, n, o, i, u, d, m, g, p, f, h, x, v = (0, s.c)(66);
            v[0] !== e ? ({
                ref: r,
                className: t,
                ...l
            } = e, v[0] = e, v[1] = t, v[2] = r, v[3] = l) : (t = v[1], r = v[2], l = v[3]);
            let b = (0, az.useSportsStore)(oZ, c.shallow),
                y = (0, az.useSportsStore)(oJ, c.shallow),
                S = (0, az.useSportsStore)(oX),
                k = (0, az.useSportsStore)(o0),
                w = (0, az.useSportsStore)(o1),
                j = (0, az.useSportsStore)(o2);
            v[4] === Symbol.for("react.memo_cache_sentinel") ? (n = ["isPastVisible", "setIsPastVisible"], v[4] = n) : n = v[4];
            let {
                isPastVisible: C,
                setIsPastVisible: N
            } = (0, eC.useEventContext)(n), {
                finishedItems: T,
                isLoading: M,
                hasMore: _,
                fetchFirstPage: I,
                fetchNextPage: E,
                hasFetched: D
            } = nm("mobile");
            v[5] !== w || v[6] !== S || v[7] !== k ? (o = e => (0, l9.doesEventMatchTier)(e, S) && (0, l9.doesEventMatchTournament)(e, k) && (0, l9.doesEventMatchSearch)(e, w), v[5] = w, v[6] = S, v[7] = k, v[8] = o) : o = v[8];
            let P = o,
                A = "all" !== S || "all" !== k || "" !== w;
            e: {
                let e, t;
                if (!A) {
                    i = b;
                    break e
                }
                if (v[9] !== P || v[10] !== b || v[11] !== j) {
                    e = new Set;
                    for (let t = b.length - 1; t >= 0; t--) {
                        let r = b[t];
                        if ("item" === r.type && P(j[r.event]))
                            for (let r = t - 1; r >= 0; r--)
                                if ("header" === b[r].type) e.add(r);
                                else break
                    }
                    v[9] = P, v[10] = b, v[11] = j, v[12] = e
                } else e = v[12];
                if (v[13] !== P || v[14] !== b || v[15] !== j || v[16] !== e) {
                    let r;
                    v[18] !== P || v[19] !== j || v[20] !== e ? (r = (t, r) => "view-all-button" === t.type || ("header" === t.type ? !!t.includeSettingsWidget || e.has(r) : "item" !== t.type || P(j[t.event])), v[18] = P, v[19] = j, v[20] = e, v[21] = r) : r = v[21], t = b.filter(r), v[13] = P, v[14] = b, v[15] = j, v[16] = e, v[17] = t
                } else t = v[17];i = t
            }
            let O = i;
            t: {
                let e, t;
                if (!A) {
                    u = y;
                    break t
                }
                if (v[22] !== P || v[23] !== j || v[24] !== y) {
                    e = new Set;
                    for (let t = y.length - 1; t >= 0; t--) {
                        let r = y[t];
                        if ("item" === r.type && P(j[r.event]))
                            for (let r = t - 1; r >= 0; r--)
                                if ("header" === y[r].type) e.add(r);
                                else break
                    }
                    v[22] = P, v[23] = j, v[24] = y, v[25] = e
                } else e = v[25];
                if (v[26] !== P || v[27] !== j || v[28] !== e || v[29] !== y) {
                    let r;
                    v[31] !== P || v[32] !== j || v[33] !== e ? (r = (t, r) => "view-all-button" === t.type || ("header" === t.type ? e.has(r) : "item" !== t.type || P(j[t.event])), v[31] = P, v[32] = j, v[33] = e, v[34] = r) : r = v[34], t = y.filter(r), v[26] = P, v[27] = j, v[28] = e, v[29] = y, v[30] = t
                } else t = v[30];u = t
            }
            let R = u;
            v[35] !== I || v[36] !== D || v[37] !== C || v[38] !== N ? (d = () => {
                let e = !C;
                N(e), e && !D && I()
            }, v[35] = I, v[36] = D, v[37] = C, v[38] = N, v[39] = d) : d = v[39];
            let L = d,
                $ = C && M && !D;
            v[40] !== O || v[41] !== _ || v[42] !== R || v[43] !== $ || v[44] !== C || v[45] !== T ? (m = ng({
                expandedItems: O,
                hiddenItems: R,
                paginatedItems: T,
                isPastVisible: C,
                isLoadingPast: $,
                hasMore: _
            }), v[40] = O, v[41] = _, v[42] = R, v[43] = $, v[44] = C, v[45] = T, v[46] = m) : m = v[46];
            let F = m;
            v[47] !== t ? (g = (0, eL.cn)("flex flex-col w-full h-full overflow-hidden", t), v[47] = t, v[48] = g) : g = v[48];
            let B = `virtuoso-mobile-${S}-${k}-${w}`;
            v[49] === Symbol.for("react.memo_cache_sentinel") ? (p = {
                height: "100%",
                width: "100%"
            }, v[49] = p) : p = v[49];
            let q = Math.min(F.length, 20);
            return v[50] !== E || v[51] !== L || v[52] !== M || v[53] !== $ || v[54] !== C ? (f = (e, t) => "hidden-toggle" === t.type ? (0, a.jsx)(na, {
                isOpen: C,
                handleClick: L,
                isLoading: $
            }) : "load-more" === t.type ? (0, a.jsx)(na, {
                variant: "load-more",
                handleClick: E,
                isLoading: M
            }) : "header" === t.data.type ? (0, a.jsx)(nS, {
                item: t.data
            }) : "view-all-button" === t.data.type ? (0, a.jsx)(nk, {
                sportSlug: t.data.sportSlug,
                sportText: t.data.sportText
            }) : (0, a.jsx)(oK, {
                item: t.data
            }), v[50] = E, v[51] = L, v[52] = M, v[53] = $, v[54] = C, v[55] = f) : f = v[55], v[56] !== F || v[57] !== q || v[58] !== f || v[59] !== B ? (h = (0, a.jsx)(l8.Virtuoso, {
                style: p,
                useWindowScroll: !0,
                defaultItemHeight: 100,
                initialItemCount: q,
                data: F,
                itemContent: f,
                overscan: 800,
                logLevel: l8.LogLevel.ERROR
            }, B), v[56] = F, v[57] = q, v[58] = f, v[59] = B, v[60] = h) : h = v[60], v[61] !== r || v[62] !== l || v[63] !== h || v[64] !== g ? (x = (0, a.jsx)("div", {
                ref: r,
                className: g,
                ...l,
                children: h
            }), v[61] = r, v[62] = l, v[63] = h, v[64] = g, v[65] = x) : x = v[65], x
        };

    function oZ(e) {
        return e.dragItems
    }

    function oJ(e) {
        return e.hiddenDragItems
    }

    function oX(e) {
        return e.tierFilter
    }

    function o0(e) {
        return e.tournamentFilter
    }

    function o1(e) {
        return e.searchQuery
    }

    function o2(e) {
        return e.events
    }
    oQ.displayName = "MobileSportsItems";
    var o3 = e.i(934666);

    function o5(e) {
        let t, r, l, n = (0, s.c)(113),
            {
                leagueName: o
            } = e,
            i = (0, O.useTranslations)();
        e: {
            let e, r, a, s, l, c, u, d, m, g, p, f, h, x, v, b, y, S, k;
            if (o) {
                let e, r, a, s, l, c, u, d, m, g, p, f, h, x, v, b, y, S, k;
                n[0] !== o || n[1] !== i ? (e = i("sports.esportsFaq.league.q1", {
                    league: o
                }), n[0] = o, n[1] = i, n[2] = e) : e = n[2], n[3] !== o || n[4] !== i ? (r = i("sports.esportsFaq.league.a1", {
                    league: o
                }), n[3] = o, n[4] = i, n[5] = r) : r = n[5], n[6] !== e || n[7] !== r ? (a = {
                    question: e,
                    answer: r
                }, n[6] = e, n[7] = r, n[8] = a) : a = n[8], n[9] !== o || n[10] !== i ? (s = i("sports.esportsFaq.league.q2", {
                    league: o
                }), n[9] = o, n[10] = i, n[11] = s) : s = n[11], n[12] !== o || n[13] !== i ? (l = i("sports.esportsFaq.league.a2", {
                    league: o
                }), n[12] = o, n[13] = i, n[14] = l) : l = n[14], n[15] !== s || n[16] !== l ? (c = {
                    question: s,
                    answer: l
                }, n[15] = s, n[16] = l, n[17] = c) : c = n[17], n[18] !== o || n[19] !== i ? (u = i("sports.esportsFaq.league.q3", {
                    league: o
                }), n[18] = o, n[19] = i, n[20] = u) : u = n[20], n[21] !== o || n[22] !== i ? (d = i("sports.esportsFaq.league.a3", {
                    league: o
                }), n[21] = o, n[22] = i, n[23] = d) : d = n[23], n[24] !== u || n[25] !== d ? (m = {
                    question: u,
                    answer: d
                }, n[24] = u, n[25] = d, n[26] = m) : m = n[26], n[27] !== o || n[28] !== i ? (g = i("sports.esportsFaq.league.q4", {
                    league: o
                }), n[27] = o, n[28] = i, n[29] = g) : g = n[29], n[30] !== o || n[31] !== i ? (p = i("sports.esportsFaq.league.a4", {
                    league: o
                }), n[30] = o, n[31] = i, n[32] = p) : p = n[32], n[33] !== g || n[34] !== p ? (f = {
                    question: g,
                    answer: p
                }, n[33] = g, n[34] = p, n[35] = f) : f = n[35], n[36] !== o || n[37] !== i ? (h = i("sports.esportsFaq.league.q5", {
                    league: o
                }), n[36] = o, n[37] = i, n[38] = h) : h = n[38], n[39] !== o || n[40] !== i ? (x = i("sports.esportsFaq.league.a5", {
                    league: o
                }), n[39] = o, n[40] = i, n[41] = x) : x = n[41], n[42] !== h || n[43] !== x ? (v = {
                    question: h,
                    answer: x
                }, n[42] = h, n[43] = x, n[44] = v) : v = n[44], n[45] !== i ? (b = i("sports.esportsFaq.league.q6"), n[45] = i, n[46] = b) : b = n[46], n[47] !== i ? (y = i("sports.esportsFaq.league.a6"), n[47] = i, n[48] = y) : y = n[48], n[49] !== b || n[50] !== y ? (S = {
                    question: b,
                    answer: y
                }, n[49] = b, n[50] = y, n[51] = S) : S = n[51], n[52] !== m || n[53] !== f || n[54] !== v || n[55] !== S || n[56] !== a || n[57] !== c ? (k = [a, c, m, f, v, S], n[52] = m, n[53] = f, n[54] = v, n[55] = S, n[56] = a, n[57] = c, n[58] = k) : k = n[58], t = k;
                break e
            }
            n[59] !== i ? (e = i("sports.esportsFaq.general.q1"), n[59] = i, n[60] = e) : e = n[60],
            n[61] !== i ? (r = i("sports.esportsFaq.general.a1"), n[61] = i, n[62] = r) : r = n[62],
            n[63] !== e || n[64] !== r ? (a = {
                question: e,
                answer: r
            }, n[63] = e, n[64] = r, n[65] = a) : a = n[65],
            n[66] !== i ? (s = i("sports.esportsFaq.general.q2"), n[66] = i, n[67] = s) : s = n[67],
            n[68] !== i ? (l = i("sports.esportsFaq.general.a2"), n[68] = i, n[69] = l) : l = n[69],
            n[70] !== s || n[71] !== l ? (c = {
                question: s,
                answer: l
            }, n[70] = s, n[71] = l, n[72] = c) : c = n[72],
            n[73] !== i ? (u = i("sports.esportsFaq.general.q3"), n[73] = i, n[74] = u) : u = n[74],
            n[75] !== i ? (d = i("sports.esportsFaq.general.a3"), n[75] = i, n[76] = d) : d = n[76],
            n[77] !== u || n[78] !== d ? (m = {
                question: u,
                answer: d
            }, n[77] = u, n[78] = d, n[79] = m) : m = n[79],
            n[80] !== i ? (g = i("sports.esportsFaq.general.q4"), n[80] = i, n[81] = g) : g = n[81],
            n[82] !== i ? (p = i("sports.esportsFaq.general.a4"), n[82] = i, n[83] = p) : p = n[83],
            n[84] !== g || n[85] !== p ? (f = {
                question: g,
                answer: p
            }, n[84] = g, n[85] = p, n[86] = f) : f = n[86],
            n[87] !== i ? (h = i("sports.esportsFaq.general.q5"), n[87] = i, n[88] = h) : h = n[88],
            n[89] !== i ? (x = i("sports.esportsFaq.general.a5"), n[89] = i, n[90] = x) : x = n[90],
            n[91] !== h || n[92] !== x ? (v = {
                question: h,
                answer: x
            }, n[91] = h, n[92] = x, n[93] = v) : v = n[93],
            n[94] !== i ? (b = i("sports.esportsFaq.general.q6"), n[94] = i, n[95] = b) : b = n[95],
            n[96] !== i ? (y = i("sports.esportsFaq.general.a6"), n[96] = i, n[97] = y) : y = n[97],
            n[98] !== b || n[99] !== y ? (S = {
                question: b,
                answer: y
            }, n[98] = b, n[99] = y, n[100] = S) : S = n[100],
            n[101] !== m || n[102] !== f || n[103] !== v || n[104] !== S || n[105] !== a || n[106] !== c ? (k = [a, c, m, f, v, S], n[101] = m, n[102] = f, n[103] = v, n[104] = S, n[105] = a, n[106] = c, n[107] = k) : k = n[107],
            t = k
        }
        let c = t;
        return n[108] !== i ? (r = i("sports.esportsFaq.title"), n[108] = i, n[109] = r) : r = n[109], n[110] !== c || n[111] !== r ? (l = (0, a.jsx)(o3.FAQAccordionSection, {
            title: r,
            items: c,
            className: "pt-16"
        }), n[110] = c, n[111] = r, n[112] = l) : l = n[112], l
    }

    function o4() {
        return (0, a4.useSetSportsPriceOnLoad)(), null
    }
    let o6 = o.default.memo(function(e) {
        let t, r, l, n, d, m, g, f, h, x, v, b, y = (0, s.c)(49),
            {
                mode: S
            } = e,
            {
                cashOutDialogOpen: k,
                setCashOutDialogOpen: w,
                cashOutMode: j,
                redemptionConditionIds: C
            } = (0, aW.useCashOutTxContext)(),
            {
                open: N,
                sportSlug: T,
                secondarySlug: M,
                week: _,
                status: I
            } = (0, az.useSportsStore)(o8, c.shallow);
        y[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["seriesId", "eventSlug"], y[0] = t) : t = y[0];
        let {
            seriesId: E,
            eventSlug: D
        } = (0, eN.useSportsContext)(t), P = !!D, A = P ? null : E, O = D ? ? "";
        y[1] !== T || y[2] !== A || y[3] !== O || y[4] !== _ ? (r = {
                seriesId: A,
                sportSlug: T,
                week: _,
                currentSlug: O
            }, y[1] = T, y[2] = A, y[3] = O, y[4] = _, y[5] = r) : r = y[5],
            function(e) {
                let t, r, a, l, n, i = (0, s.c)(18),
                    {
                        seriesId: c,
                        sportSlug: u,
                        week: d,
                        currentSlug: m
                    } = e,
                    g = (0, az.useSportsStore)(a5),
                    p = o.default.useRef("");
                i[0] !== m || i[1] !== c || i[2] !== u || i[3] !== d ? (t = ["league-events", c, u, d, m], r = async () => {
                    let e = new URLSearchParams;
                    c && e.append("seriesId", c), e.append("sportSlug", u), e.append("currentSlug", m), d && e.append("week", d.toString());
                    let t = await fetch(`/api/sports/league-events?${e.toString()}`);
                    if (!t.ok) throw Error("Failed to fetch league events");
                    return t.json()
                }, i[0] = m, i[1] = c, i[2] = u, i[3] = d, i[4] = t, i[5] = r) : (t = i[4], r = i[5]);
                let f = !!c;
                i[6] !== t || i[7] !== r || i[8] !== f ? (a = {
                    queryKey: t,
                    queryFn: r,
                    enabled: f,
                    staleTime: 6e4
                }, i[6] = t, i[7] = r, i[8] = f, i[9] = a) : a = i[9];
                let h = (0, eU.useQuery)(a);
                i[10] !== m || i[11] !== g || i[12] !== h.data || i[13] !== c || i[14] !== u || i[15] !== d ? (l = () => {
                    if (!h.data) return;
                    let e = `${c}-${u}-${d}-${m}`;
                    e !== p.current && (p.current = e, g(h.data))
                }, n = [h.data, g, c, u, d, m], i[10] = m, i[11] = g, i[12] = h.data, i[13] = c, i[14] = u, i[15] = d, i[16] = l, i[17] = n) : (l = i[16], n = i[17]), o.default.useEffect(l, n)
            }(r);
        let R = `sports-items-${T}-${_}`,
            L = "pending" === I;
        y[6] !== R || y[7] !== S ? (l = "mobile" === S ? (0, a.jsx)(oQ, {}, R) : (0, a.jsx)(o$, {}, R), y[6] = R, y[7] = S, y[8] = l) : l = y[8];
        let $ = l,
            F = T === tX.SportSlug.LIVE || M === tX.SecondarySlug.GAMES,
            {
                pathname: B
            } = (0, i.useRouter)();
        y[9] !== B ? (n = B.startsWith("/esports"), y[9] = B, y[10] = n) : n = y[10];
        let q = n,
            U = F ? " lg:pl-8" : "",
            z = "desktop" === S ? "pt-8" : "pt-2 pb-8";
        y[11] !== U || y[12] !== z ? (d = (0, p.cn)("relative h-fit max-w-[756px] w-full lg:min-w-full md:max-w-none xl:max-w-[756px] max-lg:w-[calc(100vw-2rem)] max-lg:px-0 max-lg:pt-0", U, z), y[11] = U, y[12] = z, y[13] = d) : d = y[13];
        let W = d;
        if (P) {
            let e, t, r, s;
            return y[14] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(o4, {}), y[14] = e) : e = y[14], y[15] !== N ? (t = N && (0, a.jsx)(l7, {}), y[15] = N, y[16] = t) : t = y[16], y[17] !== k || y[18] !== j || y[19] !== S || y[20] !== C || y[21] !== w ? (r = "desktop" === S && (0, a.jsx)(t5.Modal, {
                open: k,
                onOpenChange: w,
                children: (0, a.jsx)(s0, {
                    cashOutMode: j,
                    redemptionConditionIds: C
                })
            }), y[17] = k, y[18] = j, y[19] = S, y[20] = C, y[21] = w, y[22] = r) : r = y[22], y[23] !== W || y[24] !== t || y[25] !== r ? (s = (0, a.jsxs)(a.Fragment, {
                children: [e, (0, a.jsxs)("div", {
                    className: W,
                    children: [t, r]
                })]
            }), y[23] = W, y[24] = t, y[25] = r, y[26] = s) : s = y[26], s
        }
        return y[27] === Symbol.for("react.memo_cache_sentinel") ? (m = (0, a.jsx)(o4, {}), y[27] = m) : m = y[27], y[28] !== T ? (g = T !== tX.SportSlug.LIVE && (0, a.jsx)("div", {
            className: "flex h-fit relative sm:mb-2",
            children: (0, a.jsx)(aB.default, {})
        }), y[28] = T, y[29] = g) : g = y[29], y[30] !== $ || y[31] !== q || y[32] !== L || y[33] !== T ? (f = !L && (0, a.jsxs)("div", {
            children: [$, T !== tX.SportSlug.LIVE && (0, a.jsx)("div", {
                className: "w-full max-w-[1858px] mx-auto mt-3 lg:mt-4",
                children: (0, a.jsx)(t6.SportsComments, {})
            }), q && (0, a.jsx)(o5, {
                leagueName: T !== tX.SportSlug.LIVE ? u.sportMap[T] ? .displayHeader : void 0
            })]
        }), y[30] = $, y[31] = q, y[32] = L, y[33] = T, y[34] = f) : f = y[34], y[35] !== g || y[36] !== f ? (h = (0, a.jsxs)("div", {
            className: "w-full h-full relative",
            children: [g, f]
        }), y[35] = g, y[36] = f, y[37] = h) : h = y[37], y[38] !== j || y[39] !== C ? (x = (0, a.jsx)(s0, {
            cashOutMode: j,
            redemptionConditionIds: C
        }), y[38] = j, y[39] = C, y[40] = x) : x = y[40], y[41] !== k || y[42] !== w || y[43] !== x ? (v = (0, a.jsx)(t5.Modal, {
            open: k,
            onOpenChange: w,
            children: x
        }), y[41] = k, y[42] = w, y[43] = x, y[44] = v) : v = y[44], y[45] !== W || y[46] !== h || y[47] !== v ? (b = (0, a.jsxs)("div", {
            className: W,
            children: [m, h, v]
        }), y[45] = W, y[46] = h, y[47] = v, y[48] = b) : b = y[48], b
    });

    function o7() {
        let e, t, r, l = (0, s.c)(7),
            {
                mode: n
            } = o.default.useContext(aG);
        l[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["eventSlug"], l[0] = e) : e = l[0];
        let {
            eventSlug: i
        } = (0, eN.useSportsContext)(e), c = !!i;
        l[1] !== n ? (t = (0, a.jsx)(o6, {
            mode: n
        }), l[1] = n, l[2] = t) : t = l[2];
        let u = t;
        return l[3] !== u || l[4] !== c || l[5] !== n ? (r = (0, a.jsx)(aW.CashOutTxContextProvider, {
            orderTrackingPage: "sports",
            children: c ? u : (0, a.jsx)(a2, {
                mode: n,
                children: u
            })
        }), l[3] = u, l[4] = c, l[5] = n, l[6] = r) : r = l[6], r
    }

    function o8(e) {
        return {
            open: !!e.evt,
            sportSlug: e.sportSlug,
            secondarySlug: e.secondarySlug,
            week: e.week,
            status: e.status
        }
    }
    var o9 = e.i(960334),
        ie = e.i(918007),
        it = e.i(12884),
        ir = e.i(73903),
        ia = e.i(882078),
        is = e.i(378876),
        il = e.i(130278),
        io = e.i(675702);

    function ii(e) {
        return "failure" === e.status ? [0 n, 0 n] : e.result ? ? [0 n, 0 n]
    }

    function ic(e) {
        return e.toString()
    }
    var iu = e.i(251127),
        id = e.i(571798),
        im = e.i(370877);
    let ig = ({ ...e
    }) => o.default.createElement(im.Icon, {
        size: "12px",
        ...e
    }, o.default.createElement("path", {
        d: "m6,9.25c-.192,0-.384-.073-.53-.22L1.22,4.78c-.293-.293-.293-.768,0-1.061s.768-.293,1.061,0l3.72,3.72,3.72-3.72c.293-.293.768-.293,1.061,0s.293.768,0,1.061l-4.25,4.25c-.146.146-.338.22-.53.22Z",
        strokeWidth: "0",
        fill: "currentColor"
    }));
    var ip = e.i(916884),
        ip = ip,
        ih = e.i(918997),
        ix = e.i(227865);
    let iv = function(e) {
        let t, r, l, n, o, i, c, u = (0, s.c)(23),
            {
                markets: d,
                events: m,
                text: g,
                selectedAccordionMarket: p,
                setSelectedAccordionMarket: f,
                open: h,
                setOpen: x
            } = e;
        u[0] !== h || u[1] !== x ? (t = {
            prop: h,
            defaultProp: !1,
            onChange: x
        }, u[0] = h, u[1] = x, u[2] = t) : t = u[2];
        let [b, y] = (0, ih.useControllableState)(t), S = void 0 !== b && b, k = S ? "Hide" : "View";
        return u[3] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(ig, {
            className: "text-text-secondary transition-transform duration-250 ease"
        }), u[3] = r) : r = u[3], u[4] !== k || u[5] !== g ? (l = (0, a.jsx)(ip.Trigger, {
            asChild: !0,
            children: (0, a.jsxs)(v.Button, {
                variant: "outline",
                size: "sm",
                className: "border-none p-0 hover:bg-transparent text-text-secondary hover:text-text-tertiary text-sm data-[state=open]:[&_svg]:rotate-180",
                children: [k, " ", g, r]
            })
        }), u[4] = k, u[5] = g, u[6] = l) : l = u[6], u[7] !== d || u[8] !== f ? (n = Array.isArray(d) ? d.map(e => (0, a.jsx)(ix.EventDetailTabContextProvider, {
            market: e,
            event: void 0,
            children: (0, a.jsx)(id.EventDetailAccordionItem, {
                onOutcomeSelect: f
            })
        }, e.slug)) : null, u[7] = d, u[8] = f, u[9] = n) : n = u[9], u[10] !== m || u[11] !== f ? (o = Array.isArray(m) ? m.map(e => (0, a.jsx)(ix.EventDetailTabContextProvider, {
            market: void 0,
            event: e,
            children: (0, a.jsx)(id.EventDetailAccordionItem, {
                onOutcomeSelect: f
            })
        }, e.slug)) : null, u[10] = m, u[11] = f, u[12] = o) : o = u[12], u[13] !== p || u[14] !== f || u[15] !== n || u[16] !== o ? (i = (0, a.jsx)(ip.Content, {
            children: (0, a.jsxs)(lD.Accordion.Root, {
                type: "single",
                collapsible: !0,
                value: p,
                onValueChange: f,
                children: [n, o]
            })
        }), u[13] = p, u[14] = f, u[15] = n, u[16] = o, u[17] = i) : i = u[17], u[18] !== S || u[19] !== y || u[20] !== l || u[21] !== i ? (c = (0, a.jsxs)(ip.Root, {
            open: S,
            onOpenChange: y,
            className: "mt-2 mb-5",
            children: [l, i]
        }), u[18] = S, u[19] = y, u[20] = l, u[21] = i, u[22] = c) : c = u[22], c
    };
    var ib = e.i(318121);
    let iy = () => {
        let e, t, r, l, n = (0, s.c)(7);
        n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], n[0] = e) : e = n[0];
        let {
            event: o
        } = (0, eC.useEventContext)(e), {
            userOpenOrders: i,
            areOpenOrdersLoading: c
        } = (0, lb.default)();
        if (n[1] !== o.markets || n[2] !== i) {
            let e = new Map(o.markets.map(iS));
            t = i.filter(t => e.has(t.market.toLowerCase())).map(t => ({ ...t,
                associatedMarket: e.get(t.market.toLowerCase())
            })), n[1] = o.markets, n[2] = i, n[3] = t
        } else t = n[3];
        let u = t;
        return c || 0 === u.length ? null : (n[4] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(v.Button, {
            variant: "red-outline",
            size: "sm",
            className: "border",
            children: "Cancel all orders"
        }), n[4] = r) : r = n[4], n[5] !== u ? (l = (0, a.jsx)(ib.EventDetailCancelAllDialog, {
            openOrders: u,
            Trigger: r
        }), n[5] = u, n[6] = l) : l = n[6], l)
    };

    function iS(e) {
        return [e.conditionId.toLowerCase(), e]
    }
    var ik = e.i(412879);
    let iw = (0, o.memo)(function() {
            let e, t = (0, s.c)(1);
            return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(ie.PolymarketLogoFull, {
                className: "h-6 mb-1 w-auto text-text-secondary [&_path]:fill-neutral-200"
            }), t[0] = e) : e = t[0], e
        }),
        ij = () => {
            let e, t, r = (0, s.c)(4),
                {
                    cashOutDialogOpen: l,
                    setCashOutDialogOpen: n
                } = (0, aW.useCashOutTxContext)();
            return r[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(s0, {}), r[0] = e) : e = r[0], r[1] !== l || r[2] !== n ? (t = (0, a.jsx)(t5.Modal, {
                open: l,
                onOpenChange: n,
                children: e
            }), r[1] = l, r[2] = n, r[3] = t) : t = r[3], t
        },
        iC = (0, o.memo)(function(e) {
            let t, r, l, n, i, c, u, d, m, g, h, x, v, b, y, S, k, w, j, C, N, T, M, _, I, E, D, P, A, O = (0, s.c)(98),
                {
                    lowChanceMarkets: R,
                    resolvedMarkets: L,
                    markets: $,
                    setResolutionDataToView: F,
                    setResolutionDialogOpen: B,
                    negRiskOtherSize: U
                } = e;
            O[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["accordionMarketSlug", "setAccordionMarketSlug", "setActiveMarketFromSlug"], O[0] = t) : t = O[0];
            let {
                accordionMarketSlug: z,
                setAccordionMarketSlug: W,
                setActiveMarketFromSlug: H
            } = (0, f.useEventActiveMarketContext)(t);
            O[1] === Symbol.for("react.memo_cache_sentinel") ? (r = ["event", "lowChanceMarketsOpen", "resolvedMarketsOpen", "setLowChanceMarketsOpen", "setResolvedMarketsOpen", "hitMarketChartData"], O[1] = r) : r = O[1];
            let {
                event: V,
                lowChanceMarketsOpen: Y,
                resolvedMarketsOpen: K,
                setLowChanceMarketsOpen: Q,
                setResolvedMarketsOpen: Z,
                hitMarketChartData: J
            } = (0, eC.useEventContext)(r);
            O[2] !== V.markets ? (l = V.markets.filter(iN).map(iT), O[2] = V.markets, O[3] = l) : l = O[3];
            let {
                poolPricesMap: X
            } = (e => {
                let t, r, a, l, n, i, c, u, d = (0, s.c)(24);
                if (d[0] !== e) {
                    let r = {
                        address: G.CONDITIONAL_TOKENS_ADDRESS,
                        abi: io.ConditionalTokensAbi,
                        functionName: "balanceOfBatch",
                        chainId: 137
                    };
                    t = e.map(e => ({ ...r,
                        args: [e.poolPositionIds.map(() => e.marketMakerAddress), e.poolPositionIds]
                    })), d[0] = e, d[1] = t
                } else t = d[1];
                let m = t,
                    g = m.length > 0;
                d[2] !== g ? (r = {
                    enabled: g
                }, d[2] = g, d[3] = r) : r = d[3], d[4] !== m || d[5] !== r ? (a = {
                    contracts: m,
                    query: r
                }, d[4] = m, d[5] = r, d[6] = a) : a = d[6];
                let {
                    data: p,
                    refetch: f,
                    isLoading: h,
                    isPending: x,
                    isFetching: v,
                    isError: b,
                    error: y
                } = (0, il.useReadContracts)(a);
                d[7] !== y || d[8] !== b ? (l = () => {
                    b && y && (0, q.handleError)(y, "useChainPricesBatched")
                }, n = [b, y], d[7] = y, d[8] = b, d[9] = l, d[10] = n) : (l = d[9], n = d[10]), o.default.useEffect(l, n), d[11] !== p ? (i = p ? .map(ii), d[11] = p, d[12] = i) : i = d[12];
                let S = i;
                if (d[13] !== S || d[14] !== e) {
                    let t = {},
                        r = {};
                    S && e.length && e.forEach((e, a) => {
                        if (Array.isArray(S ? .[a])) {
                            let s = e.marketMakerAddress,
                                l = S[a],
                                n = (0, is.calcPrice)([...l]).map(ic);
                            r[s], r[s] = [...l], t[s], t[s] = [...n]
                        }
                    }), c = {
                        priceMap: t,
                        poolBalanceMap: r
                    }, d[13] = S, d[14] = e, d[15] = c
                } else c = d[15];
                let k = c;
                return d[16] !== b || d[17] !== v || d[18] !== h || d[19] !== x || d[20] !== k.poolBalanceMap || d[21] !== k.priceMap || d[22] !== f ? (u = {
                    arePoolValuesFetching: v,
                    arePoolValuesLoading: h,
                    arePoolValuesPending: x,
                    doesPoolValuesHaveError: b,
                    poolBalancesMap: k.poolBalanceMap,
                    poolPricesMap: k.priceMap,
                    refetchPoolPrices: f
                }, d[16] = b, d[17] = v, d[18] = h, d[19] = x, d[20] = k.poolBalanceMap, d[21] = k.priceMap, d[22] = f, d[23] = u) : u = d[23], u
            })(l);
            O[4] === Symbol.for("react.memo_cache_sentinel") ? (n = ["setOrderType"], O[4] = n) : n = O[4];
            let {
                setOrderType: ee
            } = (0, eT.useTradeContext)(n), [et, er] = (0, o.useState)(z ? ? "");
            O[5] !== z ? (i = () => {
                z && er(z)
            }, c = [z], O[5] = z, O[6] = i, O[7] = c) : (i = O[6], c = O[7]), (0, iu.useIsomorphicLayoutEffect)(i, c), O[8] !== $ ? (u = $.map(iM), O[8] = $, O[9] = u) : u = O[9];
            let ea = u,
                es = (0, lj.useAnnotations)(V.slug),
                {
                    colors: el
                } = (0, ir.useChartTheme)();
            O[10] !== V || O[11] !== R || O[12] !== $ || O[13] !== L || O[14] !== el ? (d = {
                markets: $,
                lowChanceMarkets: R,
                resolvedMarkets: L,
                event: V,
                colorsProp: el,
                mode: "group"
            }, O[10] = V, O[11] = R, O[12] = $, O[13] = L, O[14] = el, O[15] = d) : d = O[15];
            let {
                visibleMarkets: en
            } = (0, lS.useChartMarkets)(d);
            if (O[16] !== en || O[17] !== el) {
                let e;
                O[19] !== el ? (e = e => ({ ...e,
                    color: el[e.color] ? .color || "#27AE60"
                }), O[19] = el, O[20] = e) : e = O[20], m = en.map(e), O[16] = en, O[17] = el, O[18] = m
            } else m = O[18];
            let eo = m,
                ei = V.negRisk && 2 === en.length;
            O[21] !== V.tags ? (g = V.tags ? .some(i_), O[21] = V.tags, O[22] = g) : g = O[22];
            let ec = g,
                eu = ei ? "side" : "tooltip";
            O[23] !== ec ? (h = ec && {
                initialWindow: "1h"
            }, O[23] = ec, O[24] = h) : h = O[24], O[25] !== eu || O[26] !== h ? (x = {
                showLogo: "only-on-large-devices",
                backfillData: !0,
                oddsDisplay: eu,
                ...h
            }, O[25] = eu, O[26] = h, O[27] = x) : x = O[27];
            let ed = x;
            O[28] !== V.tags ? (v = V.tags ? .some(iI), O[28] = V.tags, O[29] = v) : v = O[29];
            let em = v;
            O[30] === Symbol.for("react.memo_cache_sentinel") ? (b = {
                enabled: !1
            }, O[30] = b) : b = O[30], O[31] === Symbol.for("react.memo_cache_sentinel") ? (y = {
                mode: "default"
            }, O[31] = y) : y = O[31];
            let eg = ei ? "side" : "tooltip";
            O[32] !== em ? (S = em && {
                initialWindow: "1h"
            }, O[32] = em, O[33] = S) : S = O[33], O[34] !== eg || O[35] !== S ? (k = {
                mode: "group",
                outcomeMode: "default",
                showLegend: !0,
                showSettings: !0,
                showOptions: !0,
                showAnnotationsDrawer: !1,
                showTimeWindows: !0,
                showLogo: "only-on-large-devices",
                showSingleModeLegend: !1,
                yAxisOrientation: "right",
                backfillData: !0,
                customLabels: b,
                tooltipOptions: y,
                oddsDisplay: eg,
                yAxisEnabled: !0,
                xAxisEnabled: !0,
                forceShowAllMarkets: !1,
                marketType: "default",
                ...S
            }, O[34] = eg, O[35] = S, O[36] = k) : k = O[36];
            let ep = k;
            O[37] !== J ? (w = J && J.symbol && J.data.length > 0 && (0, a.jsx)(lC.HitMarketChart, {
                data: J.data,
                strikePrice: J.strikePrice,
                symbol: J.symbol,
                startDate: J.startDate,
                endDate: J.endDate
            }), O[37] = J, O[38] = w) : w = O[38], O[39] !== es || O[40] !== eo || O[41] !== ea || O[42] !== V.cantEstimate || O[43] !== V.estimateValue || O[44] !== V.estimatedValue || O[45] !== V.negRisk || O[46] !== $ || O[47] !== ed || O[48] !== ei ? (j = V.negRisk ? (0, a.jsxs)(a.Fragment, {
                children: [ei && (0, a.jsx)("div", {
                    className: "flex items-center justify-end",
                    children: (0, a.jsx)(iy, {})
                }), (0, a.jsxs)("div", {
                    className: "overflow-visible relative",
                    children: [(0, a.jsx)(ly.GroupChartWithoutProvider, {
                        options: ed,
                        annotations: es
                    }), 137 === G.MATIC_CONFIG.chainId && $.some(iE) && (0, a.jsx)(lN.LiveActivityIndicator, {
                        conditionIds: ea.filter((e, t) => $[t] ? .enableOrderBook),
                        chartMarkets: eo
                    })]
                })]
            }) : V.estimateValue && V.estimatedValue && !V.cantEstimate ? (0, a.jsxs)("div", {
                className: "overflow-visible relative",
                children: [(0, a.jsx)(ly.GroupChartWithoutProvider, {
                    options: ed,
                    annotations: es
                }), 137 === G.MATIC_CONFIG.chainId && $.some(iD) && (0, a.jsx)(lN.LiveActivityIndicator, {
                    conditionIds: ea.filter((e, t) => $[t] ? .enableOrderBook),
                    chartMarkets: eo
                })]
            }) : (0, a.jsx)("div", {
                className: "pb-2 pt-2 flex flex-col gap-1",
                children: (0, a.jsxs)("div", {
                    className: "w-full flex items-center justify-between",
                    children: [(0, a.jsx)(ik.EventMetadata, {
                        className: "flex gap-x-2.5 items-center"
                    }), (0, a.jsxs)("div", {
                        className: "flex items-center gap-4",
                        children: [(0, a.jsx)(iy, {}), (0, a.jsx)(iw, {})]
                    })]
                })
            }), O[39] = es, O[40] = eo, O[41] = ea, O[42] = V.cantEstimate, O[43] = V.estimateValue, O[44] = V.estimatedValue, O[45] = V.negRisk, O[46] = $, O[47] = ed, O[48] = ei, O[49] = j) : j = O[49];
            let ef = V.markets.length > 1 && V.negRisk && "mt-3";
            if (O[50] !== ef ? (C = (0, p.cn)("border-t border-border", ef), O[50] = ef, O[51] = C) : C = O[51], O[52] !== V.markets || O[53] !== W || O[54] !== H || O[55] !== ee ? (N = e => {
                    if ("" === e) W(void 0), er(e);
                    else {
                        let t = V.markets.find(t => t.slug === e);
                        t ? .enableOrderBook || ee(ob.OrderType.AMM), H(e), W(e), er(e)
                    }
                }, O[52] = V.markets, O[53] = W, O[54] = H, O[55] = ee, O[56] = N) : N = O[56], O[57] !== $ || O[58] !== X || O[59] !== F || O[60] !== B) {
                let e;
                O[62] !== X || O[63] !== F || O[64] !== B ? (e = e => (0, a.jsx)(ix.EventDetailTabContextProvider, {
                    market: e,
                    event: void 0,
                    children: (0, a.jsx)(id.EventDetailAccordionItem, {
                        ammChainPrices: e.marketMakerAddress ? X ? .[e.marketMakerAddress] ? ? ["0", "0"] : ["0", "0"],
                        setResolutionDialogOpen: B,
                        setResolutionDataToView: F,
                        onOutcomeSelect: er
                    })
                }, e.slug), O[62] = X, O[63] = F, O[64] = B, O[65] = e) : e = O[65], T = $.map(e), O[57] = $, O[58] = X, O[59] = F, O[60] = B, O[61] = T
            } else T = O[61];
            return O[66] !== et || O[67] !== C || O[68] !== N || O[69] !== T ? (M = (0, a.jsx)(lD.Accordion.Root, {
                type: "single",
                collapsible: !0,
                value: et,
                className: C,
                onValueChange: N,
                children: T
            }), O[66] = et, O[67] = C, O[68] = N, O[69] = T, O[70] = M) : M = O[70], O[71] === Symbol.for("react.memo_cache_sentinel") ? (_ = (0, a.jsx)(ij, {}), O[71] = _) : _ = O[71], O[72] !== w || O[73] !== j || O[74] !== M ? (I = (0, a.jsxs)("div", {
                className: "flex w-full flex-col",
                children: [w, j, M, _]
            }), O[72] = w, O[73] = j, O[74] = M, O[75] = I) : I = O[75], O[76] !== U ? (E = U > 0 && (0, a.jsx)(id.EventDetailAccordionItemOther, {
                size: U
            }), O[76] = U, O[77] = E) : E = O[77], O[78] !== R || O[79] !== Y || O[80] !== et || O[81] !== Q ? (D = R.length ? (0, a.jsx)(iv, {
                markets: R,
                text: "more",
                selectedAccordionMarket: et,
                setSelectedAccordionMarket: er,
                open: Y,
                setOpen: Q
            }) : null, O[78] = R, O[79] = Y, O[80] = et, O[81] = Q, O[82] = D) : D = O[82], O[83] !== L || O[84] !== K || O[85] !== et || O[86] !== Z ? (P = L.length ? (0, a.jsx)(iv, {
                markets: L,
                text: "resolved",
                selectedAccordionMarket: et,
                setSelectedAccordionMarket: er,
                open: K,
                setOpen: Z
            }) : null, O[83] = L, O[84] = K, O[85] = et, O[86] = Z, O[87] = P) : P = O[87], O[88] !== ep || O[89] !== V || O[90] !== R || O[91] !== $ || O[92] !== L || O[93] !== I || O[94] !== E || O[95] !== D || O[96] !== P ? (A = (0, a.jsx)(aW.CashOutTxContextProvider, {
                orderTrackingPage: "events",
                children: (0, a.jsxs)(it.ChartContextProvider, {
                    markets: $,
                    lowChanceMarkets: R,
                    resolvedMarkets: L,
                    event: V,
                    options: ep,
                    children: [I, E, D, P]
                })
            }), O[88] = ep, O[89] = V, O[90] = R, O[91] = $, O[92] = L, O[93] = I, O[94] = E, O[95] = D, O[96] = P, O[97] = A) : A = O[97], A
        });

    function iN(e) {
        return !!e.marketMakerAddress
    }

    function iT(e) {
        return {
            marketMakerAddress: e.marketMakerAddress,
            poolPositionIds: (0, ia.getPoolPositionIds)(e)
        }
    }

    function iM(e) {
        return e.conditionId.toLowerCase()
    }

    function i_(e) {
        return "1H" === e.slug
    }

    function iI(e) {
        return "1H" === e.slug
    }

    function iE(e) {
        return e.enableOrderBook
    }

    function iD(e) {
        return e.enableOrderBook
    }
    var iP = e.i(949447),
        ip = ip,
        iA = e.i(210308),
        iO = e.i(740594),
        iR = e.i(219469),
        iL = e.i(11408),
        i$ = e.i(831089),
        iF = e.i(273587),
        iB = e.i(661267),
        iq = e.i(816864),
        iU = e.i(184062),
        iz = e.i(724210),
        iz = iz,
        iW = e.i(3643),
        iG = e.i(845923),
        iH = e.i(422868);

    function iV(e) {
        let t, r, l, n = (0, s.c)(13),
            {
                market: o,
                showOutcome: i
            } = e,
            c = void 0 !== i && i,
            u = (0, O.useTranslations)(),
            {
                hasSomeShares: d,
                redemptionValueFormatted: m
            } = (0, iH.useMobileMarketPositionContext)(),
            {
                setTradeState: g
            } = (0, oy.useMobileTradeContext)(),
            {
                payoutsString: p
            } = (0, V.useHandlePayouts)(o);
        return n[0] !== p || n[1] !== c || n[2] !== u ? (t = c && (0, a.jsxs)("div", {
            className: "flex items-center justify-start w-full gap-1",
            children: [(0, a.jsx)(b.IconCircleCheckFill24, {
                className: "fill-brand-500 size-6"
            }), (0, a.jsxs)("p", {
                className: "text-sm font-medium text-brand-500",
                children: [u("trading.outcome"), ": ", p]
            })]
        }), n[0] = p, n[1] = c, n[2] = u, n[3] = t) : t = n[3], n[4] !== d || n[5] !== o || n[6] !== m || n[7] !== g || n[8] !== u ? (r = d && (0, a.jsx)(n6.TradingButton, {
            color: "green",
            onClick: iY,
            onTap: e => {
                e.stopPropagation(), e.preventDefault(), g({
                    type: "redeem",
                    market: o
                })
            },
            children: (0, a.jsxs)("span", {
                className: "flex flex-col items-center w-full",
                children: [(0, a.jsx)("span", {
                    children: u("trading.cashOut")
                }), m && (0, a.jsx)("span", {
                    className: "text-xs font-normal",
                    children: `${u("portfolio.redeemAmount.receive")}: ${m}`
                })]
            })
        }), n[4] = d, n[5] = o, n[6] = m, n[7] = g, n[8] = u, n[9] = r) : r = n[9], n[10] !== t || n[11] !== r ? (l = (0, a.jsxs)("div", {
            className: "flex gap-2 w-full flex-col items-center justify-center",
            children: [t, r]
        }), n[10] = t, n[11] = r, n[12] = l) : l = n[12], l
    }

    function iY(e) {
        e.stopPropagation(), e.preventDefault()
    }

    function iK(e) {
        let t, r = (0, s.c)(2),
            {
                market: l
            } = e,
            n = "0" === l.resolutionData.proposedPrice ? "0%" : "100%";
        return r[0] !== n ? (t = (0, a.jsx)("span", {
            className: "font-medium text-heading-3xl text-text-primary",
            children: n
        }), r[0] = n, r[1] = t) : t = r[1], t
    }

    function iQ(e) {
        let t, r, l, n, o, i, c = (0, s.c)(14),
            {
                payoutsString: u
            } = e;
        c[0] !== u ? (t = u.toLowerCase(), c[0] = u, c[1] = t) : t = c[1];
        let d = "yes" === t;
        c[2] !== u ? (r = u.toLowerCase(), c[2] = u, c[3] = r) : r = c[3];
        let m = "no" === r,
            g = u || "-";
        return c[4] !== g ? (l = (0, a.jsx)("p", {
            className: "font-medium text-text text-right whitespace-nowrap text-base",
            children: g
        }), c[4] = g, c[5] = l) : l = c[5], c[6] !== d ? (n = d && (0, a.jsx)("div", {
            className: "text-green-600 dark:text-green-500",
            children: (0, a.jsx)(iL.IconCircleCheckFill18, {})
        }), c[6] = d, c[7] = n) : n = c[7], c[8] !== m ? (o = m && (0, a.jsx)("div", {
            className: "text-red-500",
            children: (0, a.jsx)(i$.IconCircleXmarkFill18, {})
        }), c[8] = m, c[9] = o) : o = c[9], c[10] !== l || c[11] !== n || c[12] !== o ? (i = (0, a.jsxs)("div", {
            className: "flex items-center gap-1.5",
            children: [l, n, o]
        }), c[10] = l, c[11] = n, c[12] = o, c[13] = i) : i = c[13], i
    }
    let iZ = {
        initial: {
            height: 0,
            opacity: 0
        },
        animate: {
            height: "fit-content",
            opacity: 1,
            animationDelay: "0.2s",
            transition: {
                ease: "linear",
                duration: .2,
                delay: 0
            }
        },
        exit: {
            height: 0,
            opacity: 0,
            transition: {
                ease: "linear",
                duration: .2,
                delay: 0
            }
        }
    };

    function iJ(e) {
        let t, r, l, n, i, c, u, d, m, g, f, h, x, b, y, S, k, w, j, C, N, T, M, _, I, E, D, P, A, R, L, $, F, B, q = (0, s.c)(93);
        q[0] !== e ? ({
            setResolutionDialogOpen: n,
            setResolutionDataToView: l,
            className: t,
            ...r
        } = e, q[0] = e, q[1] = t, q[2] = r, q[3] = l, q[4] = n) : (t = q[1], r = q[2], l = q[3], n = q[4]);
        let U = (0, O.useTranslations)();
        q[5] === Symbol.for("react.memo_cache_sentinel") ? (i = ["isNegRiskSportsEvent"], q[5] = i) : i = q[5];
        let {
            isNegRiskSportsEvent: W
        } = (0, eC.useEventContext)(i);
        q[6] === Symbol.for("react.memo_cache_sentinel") ? (c = ["positions"], q[6] = c) : c = q[6];
        let {
            positions: G
        } = (0, sr.useEventPositionsContext)(c);
        q[7] === Symbol.for("react.memo_cache_sentinel") ? (u = ["event", "market"], q[7] = u) : u = q[7];
        let {
            event: H,
            market: Y
        } = (0, ix.useEventDetailTabContext)(u);
        q[8] === Symbol.for("react.memo_cache_sentinel") ? (d = ["side", "orderType"], q[8] = d) : d = q[8];
        let {
            side: K,
            orderType: Q
        } = (0, eT.useTradeContext)(d), {
            setTradeState: Z
        } = (0, oy.useMobileTradeContext)();
        (0, ej.useAmplitudeAnalytics)(), Y ? .orderPriceMinTickSize;
        let J = Y ? .orderPriceMinTickSize;
        q[9] !== J ? (m = (0, ok.getPrecisionFromTickSize)(J), q[9] = J, q[10] = m) : m = q[10];
        let X = m,
            ee = (0, a6.useMarketBestPrices)(Y);
        q[11] === Symbol.for("react.memo_cache_sentinel") ? (g = ["isSportsPage"], q[11] = g) : g = q[11];
        let {
            isSportsPage: et
        } = (0, eN.useSportsContext)(g), er = Y ? .clobTokenIds, ea = Y ? .conditionId, es = Y ? .orderPriceMinTickSize;
        q[12] !== es || q[13] !== er || q[14] !== ea ? (f = {
            clobTokenIds: er,
            conditionId: ea,
            orderPriceMinTickSize: es
        }, q[12] = es, q[13] = er, q[14] = ea, q[15] = f) : f = q[15];
        let {
            userLimitOrderCountMap: el,
            getUserLimitOrderCountMap: en
        } = (0, lb.default)(f), eo = et && W;
        H ? .markets;
        e: {
            if (eo) {
                let e;
                q[16] !== H ? .markets || q[17] !== en ? (e = en(H ? .markets.map(iX) ? ? []), q[16] = H ? .markets, q[17] = en, q[18] = e) : e = q[18], h = e;
                break e
            }
            h = el ? .[Y ? .conditionId] ? ? 0
        }
        let ei = h,
            {
                zeroLastPrice: ec,
                oneLastPrice: eu
            } = (0, iF.useLastExecutedTrade)();
        q[19] !== H || q[20] !== eo || q[21] !== Y || q[22] !== eu || q[23] !== Q || q[24] !== G || q[25] !== ec ? (x = {
            event: H,
            market: Y,
            positions: G,
            isNegRiskSportsMarket: eo,
            orderType: Q,
            zeroLastPrice: ec,
            oneLastPrice: eu
        }, q[19] = H, q[20] = eo, q[21] = Y, q[22] = eu, q[23] = Q, q[24] = G, q[25] = ec, q[26] = x) : x = q[26];
        let ed = function({
            event: e,
            market: t,
            positions: r,
            isNegRiskSportsMarket: a,
            orderType: s,
            zeroLastPrice: l,
            oneLastPrice: n
        }) {
            let i = o.default.useMemo(() => e ? .markets && Array.isArray(e.markets) ? e.markets.flatMap(e => (0, iG.fromPositionToPortfolioInjectedPrices)(e, r ? ? [], !1, [0, 0]).filter(e => parseFloat(e.qty) > .01)) : [], [e ? .markets, r]),
                c = o.default.useMemo(() => (0, iG.fromPositionToPortfolioInjectedPrices)(t, r ? ? [], s !== ob.OrderType.AMM, [parseFloat(l ? .price ? .toString() ? ? "0"), parseFloat(n ? .price ? .toString() ? ? "0")]).filter(e => parseFloat(e.qty) > .01), [t, n, s, r, l]);
            return a ? i : c
        }(x);
        q[27] !== Y || q[28] !== Z ? (b = () => {
            Z({
                view: "smp",
                open: !1,
                market: Y
            })
        }, q[27] = Y, q[28] = Z, q[29] = b) : b = q[29];
        let em = b,
            eg = (0, iW.usePercentChance)(Y, 2),
            ep = (F = Y ? .resolutionData ? .proposedPrice === "0", B = (0, a6.useAsks)(Y, +!!F), !!Y ? .resolutionData && "69" !== Y.resolutionData.proposedPrice && !!B && !B.hasLiquidity),
            {
                payoutsString: ef
            } = (0, V.useHandlePayouts)(Y),
            {
                hasSomeShares: eh
            } = (0, iH.useMobileMarketPositionContext)(),
            ex = Y.closed && !eh && "pb-0!";
        q[30] !== t || q[31] !== ex ? (y = (0, p.cn)("group flex flex-col w-full overflow-visible gap-4 py-4 border-b border-neutral-50 bg-background transition-all duration-200 relative", ex, t), q[30] = t, q[31] = ex, q[32] = y) : y = q[32], q[33] === Symbol.for("react.memo_cache_sentinel") ? (S = (0, a.jsx)("div", {
            className: "absolute top-0 bottom-0 -left-2.5 -right-2.5 rounded-md transition-all duration-200 group-active:bg-neutral-50/50 dark:group-active:bg-neutral-50"
        }), q[33] = S) : S = q[33];
        let ev = Y.groupItemTitle ? ? Y.question;
        q[34] !== Y.image || q[35] !== ev ? (k = (0, a.jsx)(iB.EventDetailAccordionMarketImage, {
            marketImage: Y.image,
            marketName: ev
        }), q[34] = Y.image, q[35] = ev, q[36] = k) : k = q[36], q[37] === Symbol.for("react.memo_cache_sentinel") ? (w = (0, p.cn)("relative overflow-hidden text-ellipsis font-semibold text-base leading-normal mr-auto w-full pr-3", "grow max-w-[calc(100vw-2rem-70px)] lg:max-w-[400px] lg:grow-0 lg:[@media(min-width:1024px)_and_(max-width:1080px)]:max-w-[240px] lg:[@media(min-width:1080px)_and_(max-width:1140px)]:max-w-[280px] lg:[@media(min-width:1140px)_and_(max-width:1220px)]:max-w-[320px]"), q[37] = w) : w = q[37];
        let eb = Y.groupItemTitle ? ? Y.question;
        return (q[38] !== eb ? (j = (0, a.jsx)("div", {
            className: "flex w-full justify-between items-start",
            children: (0, a.jsx)("p", {
                className: w,
                children: eb
            })
        }), q[38] = eb, q[39] = j) : j = q[39], q[40] !== Y.volume ? (C = (0, z.formatCurrency)(Y.volume, {
            decimals: 0
        }), q[40] = Y.volume, q[41] = C) : C = q[41], q[42] !== U ? (N = U("events.headerMeta.volume"), q[42] = U, q[43] = N) : N = q[43], q[44] !== C || q[45] !== N ? (T = (0, a.jsx)("div", {
            className: "flex items-center gap-3",
            children: (0, a.jsxs)("span", {
                className: "text-xs whitespace-nowrap font-normal text-neutral-500",
                children: [C, " ", N]
            })
        }), q[44] = C, q[45] = N, q[46] = T) : T = q[46], q[47] !== j || q[48] !== T ? (M = (0, a.jsxs)("div", {
            className: "flex flex-col w-full gap-1.5",
            children: [j, T]
        }), q[47] = j, q[48] = T, q[49] = M) : M = q[49], q[50] !== Y.closed || q[51] !== ef ? (_ = Y.closed && (0, a.jsx)(iQ, {
            payoutsString: ef
        }), q[50] = Y.closed, q[51] = ef, q[52] = _) : _ = q[52], q[53] !== ep || q[54] !== et || q[55] !== eg || q[56] !== Y || q[57] !== l || q[58] !== n) ? (I = !Y.closed && !et && (0, a.jsxs)("div", {
            className: "flex items-center gap-2",
            children: [(0, a.jsx)("div", {
                className: "flex justify-end items-center",
                children: (0, a.jsx)(iR.AnimatePresence, {
                    initial: !1,
                    children: ep ? (0, a.jsx)(iK, {
                        market: Y
                    }) : (0, a.jsx)(iq.EventDetailPercentChance, {
                        lastPriceDetail: eg
                    })
                })
            }), !!Y.resolutionData && !["initialized", "posed", "resolved", "challenged"].includes(Y.resolutionData.status) && (0, a.jsx)(iz.default, {
                onClick: e => {
                    e.preventDefault(), e.stopPropagation(), l && l(Y), n && n(!0)
                }
            })]
        }), q[53] = ep, q[54] = et, q[55] = eg, q[56] = Y, q[57] = l, q[58] = n, q[59] = I) : I = q[59], q[60] !== M || q[61] !== _ || q[62] !== I ? (E = (0, a.jsxs)("div", {
            className: "flex w-full justify-between",
            children: [M, _, I]
        }), q[60] = M, q[61] = _, q[62] = I, q[63] = E) : E = q[63], q[64] !== k || q[65] !== E ? (D = (0, a.jsx)("div", {
            className: "flex justify-between z-1",
            children: (0, a.jsxs)("div", {
                className: "flex gap-3 w-full",
                children: [k, E]
            })
        }), q[64] = k, q[65] = E, q[66] = D) : D = q[66], q[67] !== H || q[68] !== eo || q[69] !== et || q[70] !== Y || q[71] !== ed || q[72] !== ei ? (P = (ed.length || ei > 0) && !Y.closed ? (0, a.jsx)(rZ.motion.div, {
            className: "z-1",
            variants: iZ,
            initial: "initial",
            animate: "animate",
            exit: "exit",
            children: (0, a.jsx)("div", {
                className: "flex flex-wrap gap-y-1",
                children: (0, a.jsx)(iU.default, {
                    event: H,
                    market: Y,
                    portfolioPositions: ed,
                    openOrdersCount: ei,
                    isNeutral: !!et && !eo,
                    shouldShowGroupItemTitle: eo,
                    shouldAbbreviate: ed.length > 4 && eo
                })
            })
        }) : null, q[67] = H, q[68] = eo, q[69] = et, q[70] = Y, q[71] = ed, q[72] = ei, q[73] = P) : P = q[73], q[74] !== P ? (A = (0, a.jsx)(iR.AnimatePresence, {
            children: P
        }), q[74] = P, q[75] = A) : A = q[75], q[76] !== Y ? (R = Y.closed && (0, a.jsx)(iV, {
            market: Y,
            showOutcome: !1
        }), q[76] = Y, q[77] = R) : R = q[77], q[78] !== ee || q[79] !== Y || q[80] !== X || q[81] !== Z || q[82] !== K || q[83] !== U ? (L = !Y.closed && ee ? (0, a.jsx)("div", {
            className: "flex justify-end gap-3 z-1",
            children: Y.outcomes.map((e, t) => {
                let r = ee[0 === t ? "~zero" : "~one"] ? .[K.toLowerCase()] ? ? "0";
                return (0, a.jsx)(v.Button, {
                    className: "flex-1 h-11 cursor-pointer gap-1",
                    onClick: e => {
                        e.stopPropagation(), Z({
                            outcomeIdx: t,
                            price: r,
                            side: iO.Side.BUY,
                            market: Y
                        })
                    },
                    variant: 0 === t ? "outcome-yes" : "outcome-no",
                    children: (0, aF.getOutcome)({
                        outcome: e,
                        price: r,
                        precision: X,
                        side: K.toLowerCase(),
                        translatedSide: "buy" === K.toLowerCase() ? U("trading.buy") : U("trading.sell")
                    })
                }, `${e}-${t}`)
            })
        }) : null, q[78] = ee, q[79] = Y, q[80] = X, q[81] = Z, q[82] = K, q[83] = U, q[84] = L) : L = q[84], q[85] !== em || q[86] !== r || q[87] !== y || q[88] !== D || q[89] !== A || q[90] !== R || q[91] !== L ? ($ = (0, a.jsxs)("div", {
            onClick: em,
            className: y,
            ...r,
            children: [S, D, A, R, L]
        }), q[85] = em, q[86] = r, q[87] = y, q[88] = D, q[89] = A, q[90] = R, q[91] = L, q[92] = $) : $ = q[92], $
    }

    function iX(e) {
        return e.conditionId
    }

    function i0(e) {
        let t, r, l, n, o, i, c, u, d, m, g, f, h = (0, s.c)(23);
        h[0] !== e ? ({
            ref: r,
            className: t,
            wrapperClassName: n,
            ...l
        } = e, h[0] = e, h[1] = t, h[2] = r, h[3] = l, h[4] = n) : (t = h[1], r = h[2], l = h[3], n = h[4]), h[5] === Symbol.for("react.memo_cache_sentinel") ? (o = ["market"], h[5] = o) : o = h[5];
        let {
            market: x
        } = (0, ix.useEventDetailTabContext)(o);
        h[6] !== x ? (i = () => x, c = [x], h[6] = x, h[7] = i, h[8] = c) : (i = h[7], c = h[8]);
        let v = (0, iA.useDeepCompareMemo)(i, c);
        return h[9] === Symbol.for("react.memo_cache_sentinel") ? (u = {
            book: "never",
            lastPrice: "never"
        }, h[9] = u) : u = h[9], h[10] !== t || h[11] !== n ? (d = (0, p.cn)(n, t), h[10] = t, h[11] = n, h[12] = d) : d = h[12], h[13] !== r || h[14] !== l || h[15] !== d ? (m = (0, a.jsx)(iJ, {
            ref: r,
            className: d,
            ...l
        }), h[13] = r, h[14] = l, h[15] = d, h[16] = m) : m = h[16], h[17] !== v || h[18] !== m ? (g = (0, a.jsx)(oH.MobileMarketContextProvider, {
            market: v,
            children: m
        }), h[17] = v, h[18] = m, h[19] = g) : g = h[19], h[20] !== v || h[21] !== g ? (f = (0, a.jsx)(eE.BookContextProvider, {
            market: v,
            prefetch: u,
            poll: "never",
            subscribe: "never",
            defer: "never",
            children: g
        }), h[20] = v, h[21] = g, h[22] = f) : f = h[22], f
    }

    function i1(e) {
        return (0, a.jsx)(ix.EventDetailTabContextProvider, {
            event: e,
            market: void 0,
            children: (0, a.jsx)(i0, {})
        }, e.id)
    }

    function i2(e) {
        return (0, a.jsx)(ix.EventDetailTabContextProvider, {
            event: void 0,
            market: e,
            children: (0, a.jsx)(i0, {})
        }, e.id)
    }
    let i3 = function(e) {
        let t, r, l, n, o, i, c, u = (0, s.c)(19),
            {
                events: d,
                markets: m,
                open: g,
                setOpen: p,
                text: f
            } = e;
        u[0] !== g || u[1] !== p ? (t = {
            prop: g,
            defaultProp: !1,
            onChange: p
        }, u[0] = g, u[1] = p, u[2] = t) : t = u[2];
        let [h, x] = (0, ih.useControllableState)(t), v = void 0 !== h && h, b = v ? "Hide" : "View";
        return u[3] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(iP.IconChevronDownFill18, {
            className: "text-2xl text-text-secondary transition-transform duration-250 ease"
        }), u[3] = r) : r = u[3], u[4] !== b || u[5] !== f ? (l = (0, a.jsx)(ip.Trigger, {
            asChild: !0,
            children: (0, a.jsxs)("button", {
                type: "button",
                className: "inline-flex items-center justify-center gap-1 mt-4 font-medium text-sm text-text-secondary transition-all duration-200 cursor-pointer hover:opacity-75 data-[state=open]:[&>svg]:rotate-180",
                children: [b, " ", f, r]
            })
        }), u[4] = b, u[5] = f, u[6] = l) : l = u[6], u[7] !== m ? (n = Array.isArray(m) ? m.map(i2) : null, u[7] = m, u[8] = n) : n = u[8], u[9] !== d ? (o = Array.isArray(d) ? d.map(i1) : null, u[9] = d, u[10] = o) : o = u[10], u[11] !== n || u[12] !== o ? (i = (0, a.jsx)(ip.Content, {
            children: (0, a.jsxs)("div", {
                children: [n, o]
            })
        }), u[11] = n, u[12] = o, u[13] = i) : i = u[13], u[14] !== v || u[15] !== x || u[16] !== l || u[17] !== i ? (c = (0, a.jsxs)(ip.Root, {
            open: v,
            onOpenChange: x,
            className: "mb-4",
            children: [l, i]
        }), u[14] = v, u[15] = x, u[16] = l, u[17] = i, u[18] = c) : c = u[18], c
    };
    var i5 = e.i(680625);
    let i4 = ({
        lowChanceMarkets: e,
        resolvedMarkets: t,
        markets: r,
        setResolutionDialogOpen: s,
        setResolutionDataToView: l,
        negRiskOtherSize: n,
        navigatedFrom: i,
        hideLogo: c = !1
    }) => {
        let {
            event: u,
            hitMarketChartData: d
        } = (0, eC.useEventContext)(["event", "hitMarketChartData"]), {
            colors: m
        } = (0, ir.useChartTheme)(), g = (0, o.useMemo)(() => r.map(e => e.conditionId), [r]), {
            visibleMarkets: f
        } = (0, lS.useChartMarkets)({
            markets: r,
            lowChanceMarkets: e,
            resolvedMarkets: t,
            event: u,
            colorsProp: m,
            mode: "group"
        }), {
            chartOptions: h
        } = (0, o.useMemo)(() => {
            let e = u ? .tags ? .some(e => "1H" === e.slug);
            return {
                chartOptions: {
                    showAnnotationsDrawer: !0,
                    backfillData: !0,
                    oddsDisplay: 2 === f.length && (u ? .negRisk || u ? .seriesSlug) ? "side" : "tooltip",
                    ...e && {
                        initialWindow: "1h"
                    }
                }
            }
        }, [u ? .negRisk, u ? .seriesSlug, u ? .tags, f.length]), x = (0, o.useMemo)(() => f.map(e => ({ ...e,
            color: m[e.color] ? .color || "#27AE60"
        })), [f, m]), v = (0, lj.useAnnotations)(u ? .slug), b = "side" === h.oddsDisplay;
        return (0, a.jsxs)("div", {
            className: "w-full",
            children: [d && d.symbol && d.data.length > 0 && (0, a.jsx)(lC.HitMarketChart, {
                data: d.data,
                strikePrice: d.strikePrice,
                symbol: d.symbol,
                startDate: d.startDate,
                endDate: d.endDate
            }), u ? .negRisk ? (0, a.jsxs)("div", {
                className: "overflow-visible relative",
                children: [b && (0, a.jsxs)("div", {
                    className: "w-full flex items-center justify-end gap-2 mb-0",
                    children: [(0, a.jsx)(iy, {}), !c && (0, a.jsx)(ie.PolymarketLogoFull, {
                        className: " h-6 opacity-60 text-text-secondary [&_path]:fill-current"
                    })]
                }), (0, a.jsx)(ly.GroupChart, {
                    markets: r,
                    lowChanceMarkets: e,
                    resolvedMarkets: t,
                    event: u,
                    options: h,
                    annotations: v
                }), 137 === G.MATIC_CONFIG.chainId && r.some(e => e.enableOrderBook) && (0, a.jsx)(lN.LiveActivityIndicator, {
                    conditionIds: g.filter((e, t) => r[t] ? .enableOrderBook),
                    chartMarkets: x
                })]
            }) : u ? .estimateValue && u ? .estimatedValue && !u ? .cantEstimate ? (0, a.jsxs)("div", {
                className: "overflow-visible relative",
                children: [(0, a.jsx)(ly.GroupChart, {
                    markets: r,
                    lowChanceMarkets: e,
                    resolvedMarkets: t,
                    event: u,
                    options: h,
                    annotations: v
                }), 137 === G.MATIC_CONFIG.chainId && r.some(e => e.enableOrderBook) && (0, a.jsx)(lN.LiveActivityIndicator, {
                    conditionIds: g.filter((e, t) => r[t] ? .enableOrderBook),
                    chartMarkets: x
                })]
            }) : (0, a.jsx)("div", {
                className: "pb-2 flex flex-col gap-1",
                children: (0, a.jsxs)("div", {
                    className: "flex items-center justify-between",
                    children: [(0, a.jsx)(i5.VolumeDisplay, {
                        baseVolume: u.volume
                    }), (0, a.jsxs)("div", {
                        className: "flex items-center gap-2",
                        children: [(0, a.jsx)(iy, {}), (0, a.jsx)(ie.PolymarketLogoFull, {
                            className: "h-6 w-auto text-text-secondary [&_path]:fill-neutral-200"
                        })]
                    })]
                })
            }), (0, a.jsx)(eB, {
                eventSlug: u.slug,
                navigatedFrom: i,
                variant: "mobile",
                className: "my-2 h-[40px]"
            }), r.map((e, t) => (0, a.jsx)(ix.EventDetailTabContextProvider, {
                event: void 0,
                market: e,
                children: (0, a.jsx)(i0, {
                    setResolutionDialogOpen: s,
                    setResolutionDataToView: l,
                    wrapperClassName: 0 === t ? (0, p.cn)("border-t border-border", u.markets.length > 1 && u.negRisk && "mt-2") : void 0
                })
            }, e.id)), n > 0 && (0, a.jsx)(id.EventDetailAccordionItemOther, {
                size: n
            }), e.length ? (0, a.jsx)(i3, {
                events: void 0,
                markets: e,
                text: "more"
            }) : null, t.length ? (0, a.jsx)(i3, {
                events: void 0,
                markets: t,
                text: "resolved"
            }) : null]
        })
    };
    var i6 = e.i(85457);
    let i7 = (0, o.memo)(function() {
            let e, t = (0, s.c)(1);
            return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(ie.PolymarketLogoFull, {
                className: "h-6 w-auto text-text-secondary [&_path]:fill-neutral-200 max-lg:shrink-0"
            }), t[0] = e) : e = t[0], e
        }),
        i8 = e => {
            let t, l, n, i, c, u, d, m, p, h, x, v, b, y, S, k, w, j, C, N, T, M = (0, s.c)(91),
                {
                    navigatedFromIndicator: _
                } = e,
                I = (0, O.useTranslations)(),
                {
                    handleTrade: E
                } = (0, ry.useEventTrade)(),
                {
                    commentHandlers: D
                } = (0, rb.useEventCommentHandlers)(),
                {
                    view: P
                } = (0, aU.useMobileEventContext)(),
                {
                    lowChanceMarkets: A,
                    lowerState: R,
                    markets: L,
                    marketsForSocial: $,
                    negRiskOtherSize: F,
                    resolutionDataToView: B,
                    resolutionDialogOpen: q,
                    resolvedMarkets: U,
                    setLowerState: z,
                    setResolutionDataToView: W,
                    setResolutionDialogOpen: H,
                    tagBanner: V
                } = (0, aq.useEventDetail)();
            M[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["events", "event", "eventSettings"], M[0] = t) : t = M[0];
            let {
                events: Y,
                event: K,
                eventSettings: Q
            } = (0, eC.useEventContext)(t);
            M[1] === Symbol.for("react.memo_cache_sentinel") ? (l = ["isSportsPage", "isLive"], M[1] = l) : l = M[1];
            let {
                isSportsPage: Z,
                isLive: J
            } = (0, eN.useSportsContext)(l), X = (0, o9.useSportsV2Enabled)();
            M[2] !== Z || M[3] !== X ? (n = (0, aq.getLowerStateOptions)(Z, X), M[2] = Z, M[3] = X, M[4] = n) : n = M[4];
            let ee = n;
            M[5] !== K ? (i = (e => {
                if (!e) return "";
                let t = e.series ? .[0] ? .commentCount,
                    r = e.commentCount,
                    a = Number.isFinite(t) && t > 0 ? t : Number.isFinite(r) && r > 0 ? r : "";
                return "" !== a ? `(${a.toLocaleString("en-US")})` : ""
            })(K), M[5] = K, M[6] = i) : i = M[6];
            let et = i;
            if (M[7] !== et || M[8] !== ee || M[9] !== I) {
                let e;
                M[11] !== et || M[12] !== I ? (e = e => ({
                    value: e,
                    label: e === aP.LowerState.Comments && et ? (0, a.jsxs)(a.Fragment, {
                        children: [(0, aq.getLowerStateLabel)(e, I), (0, a.jsxs)("span", {
                            className: "hidden lg:inline",
                            children: [" ", et]
                        })]
                    }) : (0, aq.getLowerStateLabel)(e, I)
                }), M[11] = et, M[12] = I, M[13] = e) : e = M[13], c = ee.map(e), M[7] = et, M[8] = ee, M[9] = I, M[10] = c
            } else c = M[10];
            let er = c;
            M[14] !== Y ? (u = (0, aF.getAllSportsMarkets)(Y), M[14] = Y, M[15] = u) : u = M[15];
            let ea = u;
            M[16] !== K ? (d = {
                event: K
            }, M[16] = K, M[17] = d) : d = M[17];
            let es = (0, rx.useEventStreamStatus)(d);
            M[18] !== K || M[19] !== es ? (m = (({
                event: e,
                resolutionSourceStatus: t
            }) => {
                if (!e.resolutionSource) return null;
                if (e.resolutionSource) {
                    let r, a = !1;
                    try {
                        let t = new URL(e.resolutionSource);
                        if ("https:" !== t.protocol) throw Error();
                        let s = t.hostname.toLowerCase();
                        ["youtube.com", "www.youtube.com", "m.youtube.com"].includes(s) && (a = !0, t.pathname.startsWith("/watch") ? r = t.searchParams.get("v") ? ? void 0 : t.pathname.startsWith("/embed/") ? r = t.pathname.split("/").filter(Boolean)[1] : t.pathname.startsWith("/live/") && (r = t.pathname.split("/").filter(Boolean)[1]))
                    } catch {}
                    if (a) return {
                        type: "YoutubeVideo",
                        logoImageProps: {
                            src: "/images/youtube-logo.png",
                            width: 20,
                            height: 13
                        },
                        href: e.resolutionSource,
                        embedSrc: r ? `https://www.youtube.com/embed/${r}?autoplay=0` : void 0,
                        resolutionSourceStatus: t,
                        targetDate: new Date(e.startTime ? ? Date.now())
                    }
                }
                if (e.resolutionSource) {
                    let r, a = !1;
                    try {
                        let t = new URL(e.resolutionSource);
                        if ("https:" !== t.protocol) throw Error();
                        let s = t.hostname.toLowerCase();
                        if (["twitch.tv", "www.twitch.tv"].includes(s)) {
                            a = !0;
                            let e = t.pathname.split("/").filter(Boolean);
                            e.length >= 1 && (r = `channel=${e[0]}`)
                        }
                    } catch {}
                    if (a) return {
                        type: "TwitchVideo",
                        logoImageProps: {
                            src: "/images/twitch-logo.png",
                            width: 20,
                            height: 20
                        },
                        href: e.resolutionSource,
                        embedSrc: r ? `https://player.twitch.tv/?${r}&parent=${new URL(G.CURRENT_ORIGIN).hostname}` : void 0,
                        targetDate: new Date(e.startTime ? ? Date.now()),
                        resolutionSourceStatus: t
                    }
                }
                if (e.resolutionSource) {
                    let r, a = !1;
                    try {
                        let t = new URL(e.resolutionSource);
                        if ("https:" !== t.protocol) throw Error();
                        let s = t.hostname.toLowerCase();
                        if (["kick.com", "www.kick.com"].includes(s)) {
                            a = !0;
                            let e = t.pathname.split("/").filter(Boolean);
                            e.length >= 1 && (r = e[0])
                        }
                    } catch {}
                    if (a) return {
                        type: "KickVideo",
                        logoImageProps: {
                            src: "/images/kick-logo.png",
                            width: 20,
                            height: 20
                        },
                        href: e.resolutionSource,
                        embedSrc: r ? `https://player.kick.com/${r}` : void 0,
                        targetDate: new Date(e.startTime ? ? Date.now()),
                        resolutionSourceStatus: t
                    }
                }
                let r = rj.has(e.seriesSlug ? ? "");
                if (!e.closed && (void 0 !== e.tweetCount || r)) {
                    let t, r = new Date(e.endDate),
                        a = r.getTime() < Date.now() - 9e5,
                        s = "x";
                    try {
                        let r = new URL(e.resolutionSource);
                        rC.has(r.hostname.toLowerCase()) && (s = "truthsocial");
                        let a = r.pathname.split("/").filter(Boolean);
                        a.length > 0 && (t = a[0]).startsWith("@") && (t = t.slice(1))
                    } catch {}
                    return {
                        type: "TweetCounter",
                        targetDate: r,
                        eventId: String(e.id),
                        initialTweetCount: e.tweetCount ? ? 0,
                        source: s,
                        isFinal: a,
                        handle: t,
                        startDate: e.startTime ? new Date(e.startTime) : void 0
                    }
                }
                return null
            })({
                event: K,
                resolutionSourceStatus: es
            }), M[18] = K, M[19] = es, M[20] = m) : m = M[20];
            let en = m,
                {
                    subscriptions: ei,
                    handlers: ec
                } = (() => {
                    let e, t, a, l, n, i, c, u, d, m, g, p, h, x, v, b, y, S, k, w, j, C, N, T, M, _, I, E, D, P, A, O, R, L, $, F, B, q = (0, s.c)(52);
                    q[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["eventSettings"], q[0] = e) : e = q[0];
                    let {
                        eventSettings: U
                    } = (0, eC.useEventContext)(e);
                    q[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["activeMarket"], q[1] = t) : t = q[1];
                    let {
                        activeMarket: z
                    } = (0, f.useEventActiveMarketContext)(t), W = (0, rt.useBoundChartDataStore)(), G = (0, rt.useChartDataStore)(rg), H = (0, rt.useChartDataStore)(rp), V = U.priceMarketSettings, Y = V.priceMarketsUiEnabled ? V.variant : void 0, K = V.priceMarketsUiEnabled ? V.eventStartTime : void 0, Q = z ? .eventStartTime ? ? K;
                    z ? .endDate, z ? .endDateIso;
                    e: {
                        let e;
                        if (!V.priceMarketsUiEnabled) {
                            a = null;
                            break e
                        }
                        let t = z ? .endDate ? ? z ? .endDateIso;q[2] !== Q || q[3] !== Y || q[4] !== t ? (e = (0, rr.getPriceMarketEndMs)({
                            endDate: t,
                            eventStartTime: Q,
                            variant: Y
                        }), q[2] = Q, q[3] = Y, q[4] = t, q[5] = e) : e = q[5],
                        a = e
                    }
                    let Z = a,
                        {
                            hasEnded: J
                        } = (0, rl.useMarketEnd)(Z, V.priceMarketsUiEnabled);
                    t: {
                        let e = U.priceMarketSettings;
                        if (e.priceMarketsUiEnabled) {
                            let t;
                            q[6] !== e.abbreviation || q[7] !== e.assetType ? (t = (0, rs.getChartSymbol)(e.abbreviation, e.assetType), q[6] = e.abbreviation, q[7] = e.assetType, q[8] = t) : t = q[8], l = t;
                            break t
                        }
                        l = void 0
                    }
                    let X = l;
                    r: {
                        if (U.priceMarketSettings.priceMarketsUiEnabled) {
                            let e = U.priceMarketSettings.variant;
                            n = "fifteen" === e || "fiveminute" === e || "fourhour" === e;
                            break r
                        }
                        n = !1
                    }
                    let ee = n,
                        et = V.priceMarketsUiEnabled ? V.abbreviation : void 0,
                        er = V.priceMarketsUiEnabled ? V.assetType : void 0,
                        ea = !V.priceMarketsUiEnabled || (null !== Z ? J : !0 === V.hasEnded);
                    q[9] !== et ? (i = et ? .toLowerCase ? .() ? ? "", q[9] = et, q[10] = i) : i = q[10];
                    let es = `${i}-usd`,
                        el = ee && !!X && !!r.default.env.NEXT_PUBLIC_CHAINLINK_STREAMS_WS && !!V.priceMarketsUiEnabled && !0 === V.hasStarted && !ea,
                        en = X || "";
                    q[11] !== el || q[12] !== Z || q[13] !== es || q[14] !== en ? (c = {
                        enabled: el,
                        storeSymbol: en,
                        streamSymbol: es,
                        marketEndMs: Z
                    }, q[11] = el, q[12] = Z, q[13] = es, q[14] = en, q[15] = c) : c = q[15], (e => {
                        let t, a, l, n, o = (0, s.c)(12),
                            {
                                enabled: i,
                                storeSymbol: c,
                                streamSymbol: u,
                                marketEndMs: d
                            } = e,
                            m = (0, rt.useChartDataStore)(rc),
                            g = r.default.env.NEXT_PUBLIC_CHAINLINK_STREAMS_WS || "",
                            p = i && !!g && !!c && !!u,
                            f = `symbol=${encodeURIComponent(u)}`;
                        e: {
                            if (!p) {
                                t = null;
                                break e
                            }
                            if (g.includes("?")) {
                                t = `${g}&${f}`;
                                break e
                            }
                            t = `${g}?${f}`
                        }
                        let h = t;
                        o[0] !== p ? (a = () => p, o[0] = p, o[1] = a) : a = o[1], o[2] !== d || o[3] !== p || o[4] !== c || o[5] !== u || o[6] !== m ? (l = e => {
                            if (!p) return;
                            let t = (e => {
                                try {
                                    let t = "string" == typeof e ? JSON.parse(e) : e;
                                    if (!ri(t)) return null;
                                    let r = ro(t.timestamp);
                                    if ("number" == typeof t.price && null !== r) return {
                                        price: t.price,
                                        timestamp: r
                                    };
                                    let a = ri(t.data) ? t.data : null,
                                        s = ro(a ? .timestamp);
                                    if (a && "number" == typeof a.price && null !== s) return {
                                        price: a.price,
                                        timestamp: s
                                    };
                                    let l = ro(t.ts);
                                    if ("update" === t.type && "number" == typeof t.value && null !== l) return {
                                        price: t.value,
                                        timestamp: l
                                    };
                                    return null
                                } catch {
                                    return null
                                }
                            })(e.data);
                            if (!t || (0, rr.isTimestampAfterMarketEnd)(t.timestamp, d) || !Number.isFinite(t.price)) return;
                            let r = null != d ? Math.min((0, eo.getServerNow)(), d) : (0, eo.getServerNow)(),
                                a = Math.round((r - t.timestamp) / 6e4);
                            a > 0 && e_.logger.info("[PriceChart] stale chainlink update timestamp", {
                                symbol: u,
                                minutesBehind: a,
                                value: t.price
                            }), m(c, {
                                time: Math.floor(r / 1e3),
                                value: t.price
                            })
                        }, o[2] = d, o[3] = p, o[4] = c, o[5] = u, o[6] = m, o[7] = l) : l = o[7], o[8] !== a || o[9] !== l || o[10] !== h ? (n = {
                            url: h,
                            shouldReconnect: a,
                            maxReconnectAttempts: 50,
                            reconnectInterval: 2e3,
                            onMessage: l
                        }, o[8] = a, o[9] = l, o[10] = h, o[11] = n) : n = o[11], (0, rn.useWebSocket)(n)
                    })(c);
                    let ei = ((e, t, r, a) => {
                            let l, n = (0, s.c)(9);
                            e: {
                                if (e) {
                                    let s, o, i;
                                    n[0] !== r || n[1] !== e || n[2] !== t ? (s = t && r ? `${r.toLowerCase()}/usd` : e, n[0] = r, n[1] = e, n[2] = t, n[3] = s) : s = n[3];
                                    let c = s,
                                        u = "equity" === a ? "equity_prices" : t ? "crypto_prices_chainlink" : "crypto_prices";
                                    n[4] !== c ? (o = JSON.stringify({
                                        symbol: c
                                    }), n[4] = c, n[5] = o) : o = n[5], n[6] !== o || n[7] !== u ? (i = [{
                                        topic: u,
                                        type: "update",
                                        filters: o
                                    }], n[6] = o, n[7] = u, n[8] = i) : i = n[8], l = i;
                                    break e
                                }
                                l = void 0
                            }
                            return l
                        })(X, ee, et, er),
                        ec = (M = (0, s.c)(18), _ = void 0 === X ? "" : X, I = (0, rt.useBoundChartDataStore)(), E = (0, rt.useChartDataStore)(ru), D = (0, rt.useChartDataStore)(rd), P = o.default.useRef(!1), M[0] === Symbol.for("react.memo_cache_sentinel") ? (k = [], M[0] = k) : k = M[0], A = o.default.useRef(k), M[1] !== I ? (w = e => {
                            let t = I.getState().chartData[e] ? .data;
                            if (t ? .length) return t[t.length - 1]
                        }, M[1] = I, M[2] = w) : w = M[2], O = w, M[3] !== O || M[4] !== D ? (j = () => {
                            let e = [...A.current];
                            A.current = [];
                            let t = [...new Set(e.map(rm))].reduce((e, t) => {
                                let r = O(t);
                                return r && (e[t] = r), e
                            }, {});
                            e.forEach(e => {
                                let r = t[e.symbol] ? .time;
                                (!r || e.point.time >= r) && D(e.symbol, e.point)
                            })
                        }, M[3] = O, M[4] = D, M[5] = j) : j = M[5], R = j, M[6] !== R || M[7] !== ea || M[8] !== Z || M[9] !== E ? (C = e => {
                            let t = ((e, t, r) => {
                                let a = e.symbol.toUpperCase();
                                a.includes("/USD") && (a = a.replace("/USD", "USDT"));
                                let s = (0, rr.filterPointsAtOrBeforeMarketEnd)(e.data, t);
                                if (s.length > 0 && s.length < 60) {
                                    let e = s[0],
                                        t = 60 - s.length,
                                        r = [];
                                    for (let a = t; a > 0; a--) r.push({
                                        timestamp: e.timestamp - 1e3 * a,
                                        value: e.value
                                    });
                                    s = [...r, ...s]
                                }
                                let l = (0, rr.dedupePoints)(s.filter(e => Number.isFinite(e.timestamp) && Number.isFinite(e.value)).sort((e, t) => e.timestamp - t.timestamp).map(rr.toLineDataPoint));
                                return {
                                    symbol: a,
                                    data: r ? (0, rr.appendFrozenPointAtMarketEnd)(l, t) : l
                                }
                            })(e, Z, ea);
                            E(t.symbol, t.data), A.current.length > 0 && R(), P.current = !0
                        }, M[6] = R, M[7] = ea, M[8] = Z, M[9] = E, M[10] = C) : C = M[10], L = C, M[11] !== R || M[12] !== Z || M[13] !== _ ? (N = e => {
                            let t = ((e, t) => {
                                if ((0, rr.isTimestampAfterMarketEnd)(e.timestamp, t)) return null;
                                let r = e.symbol.toUpperCase();
                                r.includes("/USD") && (r = r.replace("/USD", "USDT"));
                                let a = null != t ? Math.min((0, eo.getServerNow)(), t) : (0, eo.getServerNow)(),
                                    s = Math.round((a - e.timestamp) / 6e4);
                                return s > 0 && e_.logger.info("[PriceChart] stale update timestamp", {
                                    symbol: r,
                                    minutesBehind: s,
                                    value: e.value
                                }), {
                                    symbol: r,
                                    time: Math.floor(a / 1e3),
                                    value: e.value
                                }
                            })(e, Z);
                            t && t.symbol === _ && (P.current || (P.current = !0), A.current.push({
                                symbol: t.symbol,
                                point: t
                            }), P.current && R())
                        }, M[11] = R, M[12] = Z, M[13] = _, M[14] = N) : N = M[14], $ = N, F = _ ? L : void 0, B = _ ? $ : void 0, M[15] !== F || M[16] !== B ? (T = {
                            subscribe: F,
                            update: B
                        }, M[15] = F, M[16] = B, M[17] = T) : T = M[17], T);
                    q[16] !== X ? (u = e => !!X && !!e.chartData[X] ? .data ? .length, q[16] = X, q[17] = u) : u = q[17];
                    let eu = (0, rt.useChartDataStore)(u),
                        ed = z ? .endDate;
                    q[18] !== et || q[19] !== Q || q[20] !== Y || q[21] !== ed ? (d = ["price-market-history", et, Q, Y, ed], q[18] = et, q[19] = Q, q[20] = Y, q[21] = ed, q[22] = d) : d = q[22], q[23] !== et || q[24] !== z || q[25] !== Q || q[26] !== Y ? (m = async () => {
                        let e = new URLSearchParams;
                        et && e.set("symbol", et.toUpperCase()), Q && e.set("eventStartTime", Q), Y && e.set("variant", Y), z ? .endDate && e.set("endDate", z.endDate);
                        let t = await fetch(`/api/crypto/price-history?${e.toString()}`);
                        return t.ok ? t.json() : null
                    }, q[23] = et, q[24] = z, q[25] = Q, q[26] = Y, q[27] = m) : m = q[27];
                    let em = !!et && !!Q && "crypto" === er && ea && !eu;
                    q[28] !== d || q[29] !== m || q[30] !== em ? (g = {
                        queryKey: d,
                        queryFn: m,
                        enabled: em,
                        staleTime: 1 / 0,
                        gcTime: 1 / 0
                    }, q[28] = d, q[29] = m, q[30] = em, q[31] = g) : g = q[31];
                    let eg = (0, eU.useQuery)(g);
                    q[32] !== er || q[33] !== ea || q[34] !== eu || q[35] !== eg.data || q[36] !== Z || q[37] !== G || q[38] !== X ? (p = () => {
                        if ("crypto" !== er || !X || !ea || eu || !eg.data ? .length) return;
                        let e = (0, rr.appendFrozenPointAtMarketEnd)((0, rr.dedupePoints)((0, rr.filterPointsAtOrBeforeMarketEnd)(eg.data, Z).filter(rf).sort(rh).map(rr.toLineDataPoint)), Z);
                        e.length && G(X, e)
                    }, h = [er, ea, eu, eg.data, Z, G, X], q[32] = er, q[33] = ea, q[34] = eu, q[35] = eg.data, q[36] = Z, q[37] = G, q[38] = X, q[39] = p, q[40] = h) : (p = q[39], h = q[40]), o.default.useEffect(p, h), q[41] !== W || q[42] !== ea || q[43] !== Z || q[44] !== X || q[45] !== H ? (x = () => {
                        if (!X || null == Z || !ea) return;
                        let e = W.getState().chartData[X] ? .data,
                            t = e ? .[e.length - 1];
                        if (!t) return;
                        let r = Math.floor(Z / 1e3);
                        t.time >= r || H(X, {
                            time: r,
                            value: t.value
                        })
                    }, v = [W, ea, Z, X, H], q[41] = W, q[42] = ea, q[43] = Z, q[44] = X, q[45] = H, q[46] = x, q[47] = v) : (x = q[46], v = q[47]), o.default.useEffect(x, v);
                    a: {
                        if (ee && el) {
                            b = void 0;
                            break a
                        }
                        b = ei
                    }
                    let ep = b;
                    s: {
                        if (ee && el) {
                            let e;
                            q[48] === Symbol.for("react.memo_cache_sentinel") ? (e = {}, q[48] = e) : e = q[48], y = e;
                            break s
                        }
                        y = ec
                    }
                    let ef = y;
                    return q[49] !== ef || q[50] !== ep ? (S = {
                        subscriptions: ep,
                        handlers: ef
                    }, q[49] = ef, q[50] = ep, q[51] = S) : S = q[51], S
                })(),
                {
                    subscriptions: eu,
                    handlers: ed
                } = (() => {
                    let {
                        hitMarketChartData: e,
                        eventSettings: t
                    } = (0, eC.useEventContext)(["hitMarketChartData", "eventSettings"]), r = (0, rt.useChartDataStore)(e => e.updateData), a = e ? .symbol, s = !!a && ra.has(a), l = o.default.useMemo(() => {
                        if (!e ? .endDate) return null;
                        let t = new Date(e.endDate).getTime();
                        return Number.isFinite(t) ? t : null
                    }, [e ? .endDate]), n = !!t.priceMarketSettings.priceMarketsUiEnabled, i = s && !n && (null == l || Date.now() < l), c = i && a ? `${a}USDT` : "", u = o.default.useMemo(() => {
                        if (i && c) return [{
                            topic: "crypto_prices",
                            type: "update",
                            filters: JSON.stringify({
                                symbol: c
                            })
                        }]
                    }, [i, c]), d = o.default.useCallback(e => {
                        if (!c || (0, rr.isTimestampAfterMarketEnd)(e.timestamp, l)) return;
                        let t = e.symbol.toUpperCase();
                        t.includes("/USD") && (t = t.replace("/USD", "USDT")), t === c && Number.isFinite(e.value) && r(c, {
                            time: Math.floor((null != l ? Math.min((0, eo.getServerNow)(), l) : (0, eo.getServerNow)()) / 1e3),
                            value: e.value
                        })
                    }, [c, l, r]), m = o.default.useMemo(() => i ? {
                        update: d
                    } : {}, [i, d]);
                    return o.default.useMemo(() => ({
                        subscriptions: u,
                        handlers: m
                    }), [u, m])
                })();
            M[21] !== K ? (p = (0, t7.getCommentEntity)(K), M[21] = K, M[22] = p) : p = M[22];
            let {
                entityType: em,
                entityId: eg
            } = p;
            M[23] !== D || M[24] !== E || M[25] !== ed || M[26] !== ec ? (h = {
                trades: E,
                ...D,
                ...ec,
                ...ed
            }, M[23] = D, M[24] = E, M[25] = ed, M[26] = ec, M[27] = h) : h = M[27];
            let ep = h;
            M[28] !== ei ? (x = ei || [], M[28] = ei, M[29] = x) : x = M[29], M[30] !== eu ? (v = eu || [], M[30] = eu, M[31] = v) : v = M[31], M[32] !== x || M[33] !== v ? (b = [...x, ...v], M[32] = x, M[33] = v, M[34] = b) : b = M[34];
            let ef = b;
            M[35] !== K.slug ? (y = (0, eQ.shouldHideSeriesPills)(K.slug) || (0, eZ.shouldShowRecommendedPills)(K.slug), M[35] = K.slug, M[36] = y) : y = M[36];
            let eh = y,
                ex = K.series && K.series.length > 0,
                ev = (() => {
                    let e, t = (0, s.c)(1);
                    t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["event"], t[0] = e) : e = t[0];
                    let {
                        event: r
                    } = (0, eC.useEventContext)(e);
                    return !!r ? .estimatedValue && !!r ? .estimateValue && !r.closed && !r ? .cantEstimate
                })();
            if (M[37] !== K || M[38] !== ex) {
                if (S = [], ex) {
                    let e;
                    M[40] !== K ? (e = {
                        component: (0, a.jsx)(aR.EventSeriesPills, {
                            currentEvent: K,
                            series: K.series[0]
                        })
                    }, M[40] = K, M[41] = e) : e = M[41], S.push(e)
                }
                M[37] = K, M[38] = ex, M[39] = S
            } else S = M[39];
            let eb = S,
                ey = eb.length >= 2,
                eS = Array.isArray(K.series) && K.series.length > 0 || !!K.seriesSlug,
                ek = K.negRisk && 2 === K.markets.length && !ey && !ev && eS;
            M[42] !== ea || M[43] !== en || M[44] !== K || M[45] !== Q || M[46] !== eS || M[47] !== eb || M[48] !== eh || M[49] !== J || M[50] !== Z || M[51] !== A || M[52] !== R || M[53] !== ee.length || M[54] !== er || M[55] !== L || M[56] !== $ || M[57] !== _ || M[58] !== F || M[59] !== U || M[60] !== z || M[61] !== W || M[62] !== H || M[63] !== ek || M[64] !== X || M[65] !== V || M[66] !== ey || M[67] !== P ? (k = !X && (0, a.jsx)("div", {
                id: "event-detail-container",
                className: (0, eL.cn)("h-full", "max-lg:w-[calc(100vw-2rem)]", K ? .markets ? .length === 1 ? "max-lg:mb-24" : "max-lg:mb-5", "lg:py-8 lg:px-2 lg:relative lg:pt-4", !Z && "lg:max-w-[938px]", Z ? "lg:w-full" : "lg:w-(--event-detail-width)"),
                style: {
                    "--event-detail-width": `calc(100vw - ${g.EVENT_LAYOUT_PADDING_LEFT}px - ${g.EVENT_LAYOUT_COLUMN_GAP}px - ${g.EVENT_LAYOUT_BUY_SELL_WIDGET_WIDTH}px - ${g.EVENT_LAYOUT_PADDING_RIGHT}px)`
                },
                children: (0, a.jsxs)("div", {
                    className: "flex flex-col w-full h-full",
                    children: [_ && (0, a.jsx)("div", {
                        children: (0, a.jsx)(aO, {
                            navigatedFrom: _
                        })
                    }), V, Z ? J ? null : (0, a.jsx)("div", {
                        className: (0, eL.cn)("lg:mb-6", X ? "max-lg:mb-2" : "max-lg:mb-8"),
                        children: (0, a.jsx)(aB.default, {})
                    }) : (0, a.jsxs)(a.Fragment, {
                        children: [(0, a.jsx)(el.Media, {
                            greaterThanOrEqual: "lg",
                            children: (0, a.jsx)(aM, {})
                        }), (0, a.jsx)(el.Media, {
                            lessThan: "lg",
                            children: (0, a.jsx)(aM, {
                                isMobile: !0
                            })
                        })]
                    }), !Z && K && !Q.priceMarketSettings.priceMarketsUiEnabled && !eh && (ey ? (0, a.jsx)("div", {
                        className: "max-lg:pb-5 lg:mb-3 lg:my-3",
                        children: (0, a.jsx)(aI, {
                            items: eb
                        })
                    }) : eS && (0, a.jsxs)("div", {
                        className: "max-lg:pb-4 lg:mb-3 lg:my-3 flex justify-between max-lg:items-center",
                        children: [(0, a.jsx)(aR.EventSeriesPills, {
                            currentEvent: K,
                            series: K.series[0]
                        }), ek && (0, a.jsx)(i7, {})]
                    })), en && (0, a.jsxs)(a.Fragment, {
                        children: [(0, a.jsx)(el.Media, {
                            greaterThanOrEqual: "lg",
                            children: (0, a.jsx)(rK, {
                                embedSource: en
                            })
                        }), (0, a.jsx)(el.Media, {
                            lessThan: "lg",
                            children: (0, a.jsx)(rK, {
                                embedSource: en,
                                isMobile: !0
                            })
                        })]
                    }), (0, a.jsx)("div", {
                        className: "max-lg:flex max-lg:flex-col max-lg:justify-center max-lg:items-center",
                        children: 1 === K.markets.length ? (0, a.jsxs)(a.Fragment, {
                            children: [(0, a.jsx)(el.Media, {
                                greaterThanOrEqual: "lg",
                                children: (0, a.jsx)(lz, {})
                            }), (0, a.jsx)(el.Media, {
                                lessThan: "lg",
                                children: (0, a.jsx)(oH.MobileMarketContextProvider, {
                                    children: (0, a.jsx)(i6.default, {
                                        navigatedFrom: _
                                    })
                                })
                            })]
                        }) : (0, a.jsxs)(a.Fragment, {
                            children: [(0, a.jsx)(el.Media, {
                                greaterThanOrEqual: "lg",
                                children: (0, a.jsx)(iC, {
                                    lowChanceMarkets: A,
                                    resolvedMarkets: U,
                                    markets: L,
                                    setResolutionDialogOpen: H,
                                    setResolutionDataToView: W,
                                    negRiskOtherSize: F
                                })
                            }), (0, a.jsx)(el.Media, {
                                lessThan: "lg",
                                children: (0, a.jsx)(i4, {
                                    lowChanceMarkets: A,
                                    resolvedMarkets: U,
                                    markets: L,
                                    setResolutionDialogOpen: H,
                                    setResolutionDataToView: W,
                                    negRiskOtherSize: F,
                                    navigatedFrom: _,
                                    hideLogo: !!ek
                                })
                            })]
                        })
                    }), (0, a.jsx)(el.Media, {
                        greaterThanOrEqual: "lg",
                        children: (0, a.jsx)(t8.RulesAndContextTabs, {}, K.slug)
                    }), (0, a.jsx)(el.Media, {
                        lessThan: "lg",
                        children: (0, a.jsx)(t8.RulesAndContextTabs, {
                            isMobileEventLevel: !0,
                            isSMP: Z || K.markets ? .length === 1
                        }, K.slug)
                    }), !Z && (0, a.jsx)(el.Media, {
                        lessThan: "lg",
                        children: (0, a.jsx)("div", {
                            className: "mt-4",
                            children: (0, a.jsx)(tt, {})
                        })
                    }), er.length ? (0, a.jsx)(t4.TextTabs, {
                        items: er,
                        value: R,
                        onValueChange: e => z(e),
                        className: "max-lg:mt-8 lg:mt-6 mb-1",
                        id: "comments",
                        headingLevel: "h2"
                    }) : null, 0 === ee.length || "smp" === P ? null : (0, a.jsx)("div", {
                        children: (0, a.jsxs)("div", {
                            className: "lg:min-h-[496px] lg:pb-16 lg:pt-4 max-lg:pt-2 max-lg:min-h-[400px]",
                            children: [R === aP.LowerState.Activity && (0, a.jsx)("div", {
                                className: "w-full",
                                children: (0, a.jsx)(t9.default, {
                                    sortedMarkets: $
                                })
                            }), R === aP.LowerState.Comments && "default" === P && (0, a.jsx)("div", {
                                className: "w-full",
                                children: Z ? (0, a.jsx)(t6.SportsComments, {}) : (0, a.jsx)(t6.Comments, {})
                            }), R === aP.LowerState.Holders && (0, a.jsx)("div", {
                                className: "w-full",
                                children: (0, a.jsx)(rv.default, {
                                    sortedMarkets: Z ? ea : $
                                })
                            }), R === aP.LowerState.Positions && (0, a.jsx)("div", {
                                className: "w-full",
                                children: (0, a.jsx)(re.default, {
                                    sortedMarkets: Z ? ea : $
                                })
                            })]
                        })
                    })]
                })
            }), M[42] = ea, M[43] = en, M[44] = K, M[45] = Q, M[46] = eS, M[47] = eb, M[48] = eh, M[49] = J, M[50] = Z, M[51] = A, M[52] = R, M[53] = ee.length, M[54] = er, M[55] = L, M[56] = $, M[57] = _, M[58] = F, M[59] = U, M[60] = z, M[61] = W, M[62] = H, M[63] = ek, M[64] = X, M[65] = V, M[66] = ey, M[67] = P, M[68] = k) : k = M[68], M[69] !== R || M[70] !== ee || M[71] !== $ || M[72] !== z || M[73] !== X ? (w = X && (0, a.jsxs)(a.Fragment, {
                children: [(0, a.jsx)(el.Media, {
                    greaterThanOrEqual: "lg",
                    children: (0, a.jsx)(aH, {
                        lowerState: R,
                        setLowerState: z,
                        lowerStateOptions: ee,
                        marketsForSocial: $,
                        mode: "desktop",
                        children: (0, a.jsx)(o7, {})
                    })
                }), (0, a.jsx)(el.Media, {
                    lessThan: "lg",
                    children: (0, a.jsx)(oH.MobileMarketContextProvider, {
                        children: (0, a.jsx)(aH, {
                            mode: "mobile",
                            lowerState: R,
                            setLowerState: z,
                            lowerStateOptions: ee,
                            marketsForSocial: $,
                            children: (0, a.jsx)(o7, {})
                        })
                    })
                })]
            }), M[69] = R, M[70] = ee, M[71] = $, M[72] = z, M[73] = X, M[74] = w) : w = M[74], M[75] === Symbol.for("react.memo_cache_sentinel") ? (j = (0, a.jsx)(el.Media, {
                greaterThanOrEqual: "lg",
                children: (0, a.jsx)(aD.BackToTop, {
                    variant: "centered"
                })
            }), M[75] = j) : j = M[75], M[76] !== B || M[77] !== q || M[78] !== H ? (C = q && B && (0, a.jsx)(t5.Modal, {
                onOpenChange: H,
                open: q,
                children: (0, a.jsx)(a$, {
                    resolutionDataToView: B
                })
            }), M[76] = B, M[77] = q, M[78] = H, M[79] = C) : C = M[79], M[80] !== k || M[81] !== w || M[82] !== C ? (N = (0, a.jsxs)(a.Fragment, {
                children: [k, w, j, C]
            }), M[80] = k, M[81] = w, M[82] = C, M[83] = N) : N = M[83];
            let ew = N;
            return M[84] !== eg || M[85] !== em || M[86] !== K.slug || M[87] !== ew || M[88] !== ep || M[89] !== ef ? (T = (0, a.jsx)(rS.EventWebsocketProvider, {
                eventSlug: K.slug,
                entityId: eg,
                entityType: em,
                eventHandlers: ep,
                subscriptions: ef,
                children: ew
            }), M[84] = eg, M[85] = em, M[86] = K.slug, M[87] = ew, M[88] = ep, M[89] = ef, M[90] = T) : T = M[90], T
        },
        i9 = e => {
            let t, r, l, n, o, i = (0, s.c)(10),
                {
                    navigatedFromIndicator: c
                } = e;
            i[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], i[0] = t) : t = i[0];
            let {
                event: u
            } = (0, eC.useEventContext)(t);
            i[1] !== u.slug ? (r = (0, rs.shouldDisableLivePriceChart)(u.slug) ? "asset-price" : (0, rk.getCookie)("crypto_chart_type") || "crypto-price", i[1] = u.slug, i[2] = r) : r = i[2];
            let d = r;
            return i[3] !== d ? (l = {
                chartType: d
            }, i[3] = d, i[4] = l) : l = i[4], i[5] !== c ? (n = (0, a.jsx)(ry.EventTradeProvider, {
                children: (0, a.jsx)(rb.EventCommentHandlersProvider, {
                    children: (0, a.jsx)(i8, {
                        navigatedFromIndicator: c
                    })
                })
            }), i[5] = c, i[6] = n) : n = i[6], i[7] !== l || i[8] !== n ? (o = (0, a.jsx)(rt.ChartDataStoreProvider, {
                initialState: l,
                children: n
            }), i[7] = l, i[8] = n, i[9] = o) : o = i[9], o
        };
    var ce = e.i(130041),
        ct = e.i(364917);
    let cr = () => {
            let e, t, l, n, c, d, m, g, h, v, b, y, S, k, w, j, C, N, T, M, _, I = (0, s.c)(59),
                E = (0, i.useRouter)();
            I[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["isSportsPage", "sportSlug", "eventSlug"], I[0] = e) : e = I[0];
            let {
                isSportsPage: D,
                sportSlug: P,
                eventSlug: A
            } = (0, eN.useSportsContext)(e);
            I[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["event"], I[1] = t) : t = I[1];
            let {
                event: O
            } = (0, eC.useEventContext)(t);
            I[2] === Symbol.for("react.memo_cache_sentinel") ? (l = ["activeMarket"], I[2] = l) : l = I[2];
            let {
                activeMarket: R
            } = (0, f.useEventActiveMarketContext)(l), $ = (0, eM.useVisualStateStore)(co), {
                isAutoResolvingMarket: F,
                resolutionPhase: B
            } = (0, V.useLatestFinalResolution)(R), q = (0, ej.useAmplitudeAnalytics)();
            I[3] === Symbol.for("react.memo_cache_sentinel") ? (n = ["proxyAddress"], I[3] = n) : n = I[3];
            let {
                proxyAddress: U
            } = (0, L.useAccountContext)(n), z = (0, o.useRef)(null), W = (0, o.useRef)(null), H = (0, o.useRef)(null), {
                navigatedFromIndicator: Y
            } = (0, eA.useNavigatedFromIndicator)();
            I[4] !== O ? (c = ev(O), I[4] = O, I[5] = c) : c = I[5];
            let Q = c,
                Z = F && "determining" === B,
                X = !Z && (R.closed || F && "resolved" === B);
            I[6] !== R.conditionId || I[7] !== R.slug || I[8] !== q || I[9] !== O.slug || I[10] !== F || I[11] !== B || I[12] !== E.asPath ? (d = () => {
                if (!F) {
                    z.current = null, W.current = null, H.current = null;
                    return
                }
                let e = R.conditionId;
                if (z.current !== e && (z.current = e, W.current = null, H.current = null), W.current === B) return;
                let t = {
                    conditionId: R.conditionId,
                    event_slug: O.slug,
                    market_slug: R.slug,
                    path: E.asPath,
                    resolution_phase: B
                };
                if ("determining" === B) {
                    let e = (0, eo.getServerNow)();
                    H.current = e, e_.logger.info("[EventPage] auto resolving market entered pending state", { ...t,
                        pendingStartedAt: e
                    }), q.trackEvent(es.Events.AutoResolvingMarketPending, { ...t,
                        pendingStartedAt: e
                    })
                }
                if ("resolved" === B) {
                    let e = (0, eo.getServerNow)(),
                        r = null != H.current ? e - H.current : void 0;
                    e_.logger.info("[EventPage] auto resolving market entered resolved state", { ...t,
                        resolvedAt: e,
                        pendingDurationMs: r
                    }), q.trackEvent(es.Events.AutoResolvingMarketResolved, { ...t,
                        resolvedAt: e,
                        pendingDurationMs: r
                    })
                }
                W.current = B
            }, m = [R.conditionId, R.slug, q, O.slug, F, B, E.asPath], I[6] = R.conditionId, I[7] = R.slug, I[8] = q, I[9] = O.slug, I[10] = F, I[11] = B, I[12] = E.asPath, I[13] = d, I[14] = m) : (d = I[13], m = I[14]), (0, o.useEffect)(d, m);
            let ee = !D && "lg:max-w-[938px]",
                et = D && "lg:flex-1 lg:min-w-0 lg:w-full md:max-xl:lg:max-w-none";
            if (I[15] !== ee || I[16] !== et ? (g = (0, p.cn)("flex w-full px-4 pt-4 h-full box-border", "lg:px-0 lg:pt-0 lg:h-fit lg:z-1 lg:relative", ee, et), I[15] = ee, I[16] = et, I[17] = g) : g = I[17], I[18] !== Y ? (h = (0, a.jsx)(i9, {
                    navigatedFromIndicator: Y
                }), I[18] = Y, I[19] = h) : h = I[19], I[20] !== h || I[21] !== g ? (v = (0, a.jsx)(aU.MobileEventContextProvider, {
                    children: (0, a.jsx)("div", {
                        className: g,
                        children: h
                    })
                }), I[20] = h, I[21] = g, I[22] = v) : v = I[22], I[23] !== O.slug || I[24] !== Y ? (b = (0, a.jsx)(eB, {
                    eventSlug: O.slug,
                    navigatedFrom: Y,
                    variant: "desktop",
                    className: "mb-3"
                }), I[23] = O.slug, I[24] = Y, I[25] = b) : b = I[25], I[26] !== Z || I[27] !== X ? (y = Z ? (0, a.jsx)(x, {}) : X ? (0, a.jsx)(K, {}) : (0, a.jsx)(ct.TradeWidget, {}), I[26] = Z, I[27] = X, I[28] = y) : y = I[28], I[29] === Symbol.for("react.memo_cache_sentinel") ? (S = (0, a.jsx)("div", {
                    className: "flex flex-col w-full mt-4 gap-4 items-center",
                    children: (0, a.jsx)(ce.TermsOfService, {
                        className: "w-full"
                    })
                }), I[29] = S) : S = I[29], I[30] !== R.slug || I[31] !== D || I[32] !== Q) {
                var er;
                k = !D && (0, a.jsxs)("div", {
                    className: "flex flex-col w-full mt-7",
                    children: [(0, a.jsx)(t$, {}), (0, a.jsx)(tN, {}), (er = R ? .slug, !((0, e0.matchesFiveMinuteUpDown)(er) || (0, e0.matchesFifteenMinuteUpDown)(er) || tA(er) || tO(er)) && !Q && (0, a.jsx)(tt, {}))]
                }), I[30] = R.slug, I[31] = D, I[32] = Q, I[33] = k
            } else k = I[33];
            return I[34] !== P || I[35] !== D ? (w = D && !(P && (0, u.isEsportsSlug)(P)) && (0, a.jsx)(t2, {}), I[34] = P, I[35] = D, I[36] = w) : w = I[36], I[37] !== R.enableOrderBook ? (j = R.enableOrderBook && (0, a.jsx)("div", {
                className: "flex justify-center mt-4",
                children: (0, a.jsx)(J, {})
            }), I[37] = R.enableOrderBook, I[38] = j) : j = I[38], I[39] !== U ? (C = G.internalTestProxyAddresses[U ? U.toLowerCase() : ""] || "true" === r.default.env.NEXT_PUBLIC_ENABLE_WS_CONNECTION_DETAIL ? (0, a.jsx)(eD.default, {}) : null, I[39] = U, I[40] = C) : C = I[40], I[41] !== P || I[42] !== A || I[43] !== D ? (N = D && !!A && P && (0, u.isEsportsSlug)(P) && (0, a.jsx)(tY, {}), I[41] = P, I[42] = A, I[43] = D, I[44] = N) : N = I[44], I[45] !== b || I[46] !== y || I[47] !== k || I[48] !== w || I[49] !== j || I[50] !== C || I[51] !== N ? (T = (0, a.jsx)("div", {
                id: "trade-widget",
                className: "sticky top-(--navbar-height) max-h-[calc(100vh-var(--navbar-height))] h-fit w-full pt-8 pb-4 px-4 lg:pr-0 box-border overflow-y-scroll scrollbar-none max-lg:hidden",
                children: (0, a.jsxs)("div", {
                    className: "flex flex-col w-full",
                    children: [b, y, S, k, w, j, C, N]
                })
            }), I[45] = b, I[46] = y, I[47] = k, I[48] = w, I[49] = j, I[50] = C, I[51] = N, I[52] = T) : T = I[52], I[53] !== $ || I[54] !== T ? (M = (0, a.jsx)(el.Media, {
                greaterThanOrEqual: "lg",
                children: (0, a.jsx)(en.InPortal, {
                    node: $,
                    children: T
                })
            }), I[53] = $, I[54] = T, I[55] = M) : M = I[55], I[56] !== v || I[57] !== M ? (_ = (0, a.jsxs)(a.Fragment, {
                children: [v, M]
            }), I[56] = v, I[57] = M, I[58] = _) : _ = I[58], _
        },
        ca = () => {
            let e, t, r = (0, s.c)(3),
                n = (0, l.useBookConnectionStore)(ci, c.shallow);
            return r[0] === Symbol.for("react.memo_cache_sentinel") ? (e = (0, a.jsx)(eO.default, {
                children: (0, a.jsx)(cr, {})
            }), r[0] = e) : e = r[0], r[1] !== n ? (t = (0, a.jsx)(eP.MarketWsContextProvider, {
                markets: n,
                children: e
            }), r[1] = n, r[2] = t) : t = r[2], t
        },
        cs = () => {
            let e, t, r, l, o = (0, s.c)(6);
            o[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["activeMarket"], o[0] = e) : e = o[0];
            let {
                activeMarket: i
            } = (0, f.useEventActiveMarketContext)(e);
            return o[1] !== i ? (t = [i], o[1] = i, o[2] = t) : t = o[2], o[3] === Symbol.for("react.memo_cache_sentinel") ? (r = (0, a.jsx)(eO.default, {
                children: (0, a.jsx)(cr, {})
            }), o[3] = r) : r = o[3], o[4] !== t ? (l = (0, a.jsx)(n.Livestream, {
                children: (0, a.jsx)(eP.MarketWsContextProvider, {
                    markets: t,
                    children: r
                })
            }), o[4] = t, o[5] = l) : l = o[5], l
        },
        cl = () => {
            let e, t, r, l, n, o = (0, s.c)(9);
            o[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["activeMarket"], o[0] = e) : e = o[0];
            let {
                activeMarket: i
            } = (0, f.useEventActiveMarketContext)(e);
            o[1] === Symbol.for("react.memo_cache_sentinel") ? (t = ["isSportsPage"], o[1] = t) : t = o[1];
            let {
                isSportsPage: c
            } = (0, eN.useSportsContext)(t), u = c ? ca : cs;
            o[2] === Symbol.for("react.memo_cache_sentinel") ? (r = {
                book: "never",
                lastPrice: "never"
            }, o[2] = r) : r = o[2];
            let d = c ? "after-virtualized" : "never";
            return o[3] !== u ? (l = (0, a.jsx)(u, {}), o[3] = u, o[4] = l) : l = o[4], o[5] !== i || o[6] !== d || o[7] !== l ? (n = (0, a.jsx)(eT.TradeContextProvider, {
                children: (0, a.jsx)(eE.BookContextProvider, {
                    market: i,
                    prefetch: r,
                    poll: "never",
                    subscribe: "when-active",
                    defer: d,
                    children: l
                })
            }), o[5] = i, o[6] = d, o[7] = l, o[8] = n) : n = o[8], n
        },
        cn = (0, o.memo)(function(e) {
            let t, r, l = (0, s.c)(15),
                {
                    event: n,
                    marketSlug: o,
                    originalMarketSlug: i,
                    serverDate: c,
                    breadcrumbItems: u,
                    categoryBreadcrumb: g,
                    ssrComments: p,
                    hitMarketChartData: f
                } = e;
            if (l[0] !== n.markets || l[1] !== o) {
                let e;
                l[3] !== o ? (e = e => e.slug === o, l[3] = o, l[4] = e) : e = l[4], t = n.markets.find(e), l[0] = n.markets, l[1] = o, l[2] = t
            } else t = l[2];
            let h = t;
            return l[5] !== u || l[6] !== g || l[7] !== n || l[8] !== f || l[9] !== h || l[10] !== o || l[11] !== i || l[12] !== c || l[13] !== p ? (r = h ? (0, a.jsxs)(d.default, {
                skipHeadContent: !0,
                children: [!n.closed && (0, a.jsx)(ea.StructuredData, {
                    type: "event",
                    event: n,
                    market: h
                }), u && u.length >= 2 && (0, a.jsx)(ea.StructuredData, {
                    type: "breadcrumb",
                    breadcrumbItems: u
                }), p && p.comments.length > 0 && (0, a.jsx)(er, {
                    event: n,
                    market: h,
                    comments: p.comments,
                    totalCommentCount: p.totalCount,
                    breadcrumbItems: u ? ? void 0,
                    serverDate: c
                }), (0, a.jsx)(eC.EventContextProvider, {
                    event: n,
                    market: h,
                    categoryBreadcrumb: g,
                    hitMarketChartData: f,
                    children: (0, a.jsx)(m.MarketRewardContextProvider, {
                        children: (0, a.jsx)(cl, {})
                    })
                })]
            }, "/event") : (0, a.jsx)(d.default, {
                title: "Polymarket",
                description: "Polymarket",
                children: (0, a.jsx)(eI.NotForecasted, {
                    source: "EventPageLayout",
                    reason: "event-layout-missing-event-or-market",
                    context: {
                        eventSlug: n.slug,
                        eventId: n.id,
                        marketSlug: o,
                        originalMarketSlug: i,
                        hasMarket: !!h
                    }
                })
            }, "/event-not-found"), l[5] = u, l[6] = g, l[7] = n, l[8] = f, l[9] = h, l[10] = o, l[11] = i, l[12] = c, l[13] = p, l[14] = r) : r = l[14], r
        }, (e, t) => e.event.id === t.event.id && e.event.updatedAt === t.event.updatedAt && e.marketSlug === t.marketSlug && e.originalMarketSlug === t.originalMarketSlug && e.serverDate === t.serverDate);

    function co(e) {
        return e.buySellWidgetPortalNode
    }

    function ci(e) {
        return e.activeMarkets
    }
    e.s(["EventPageUI", 0, cl, "default", 0, cn], 731892)
}]);

//# debugId=7e09b0c1-4b1a-ef69-7955-d991245cb086