const __vite__mapDeps = (i, m=__vite__mapDeps, d=(m.f || (m.f = ["assets/chunk-Home-DjiTwsgP.js", "assets/chunk-Instance-BUMsJWAb.js", "assets/chunk-PingChart-BoZ15evw.js", "assets/chunk-chartHelper-CoSPeqLf.js", "assets/chunk-react-vendor-c5ypKtDW.js", "assets/chunk-index-CqfZ9x-B.js", "assets/chunk-NotFound-Dnb-a4KN.js", "assets/chunk-Private-DyxNhVGz.js"]))) => i.map(i => d[i]);
import {r as Iv, g as cd, a as Xv} from "./chunk-react-vendor-c5ypKtDW.js";
function XS(n, r) {
    for (var l = 0; l < r.length; l++) {
        const i = r[l];
        if (typeof i != "string" && !Array.isArray(i)) {
            for (const c in i)
                if (c !== "default" && !(c in n)) {
                    const u = Object.getOwnPropertyDescriptor(i, c);
                    u && Object.defineProperty(n, c, u.get ? u : {
                        enumerable: !0,
                        get: () => i[c]
                    })
                }
        }
    }
    return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, {
        value: "Module"
    }))
}
(function() {
    const r = document.createElement("link").relList;
    if (r && r.supports && r.supports("modulepreload"))
        return;
    for (const c of document.querySelectorAll('link[rel="modulepreload"]'))
        i(c);
    new MutationObserver(c => {
        for (const u of c)
            if (u.type === "childList")
                for (const d of u.addedNodes)
                    d.tagName === "LINK" && d.rel === "modulepreload" && i(d)
    }
    ).observe(document, {
        childList: !0,
        subtree: !0
    });
    function l(c) {
        const u = {};
        return c.integrity && (u.integrity = c.integrity),
        c.referrerPolicy && (u.referrerPolicy = c.referrerPolicy),
        c.crossOrigin === "use-credentials" ? u.credentials = "include" : c.crossOrigin === "anonymous" ? u.credentials = "omit" : u.credentials = "same-origin",
        u
    }
    function i(c) {
        if (c.ep)
            return;
        c.ep = !0;
        const u = l(c);
        fetch(c.href, u)
    }
}
)();
const $S = "modulepreload"
  , KS = function(n) {
    return "/" + n
}
  , Ug = {}
  , Us = function(r, l, i) {
    let c = Promise.resolve();
    if (l && l.length > 0) {
        let g = function(p) {
            return Promise.all(p.map(b => Promise.resolve(b).then(v => ({
                status: "fulfilled",
                value: v
            }), v => ({
                status: "rejected",
                reason: v
            }))))
        };
        document.getElementsByTagName("link");
        const d = document.querySelector("meta[property=csp-nonce]")
          , h = d?.nonce || d?.getAttribute("nonce");
        c = g(l.map(p => {
            if (p = KS(p),
            p in Ug)
                return;
            Ug[p] = !0;
            const b = p.endsWith(".css")
              , v = b ? '[rel="stylesheet"]' : "";
            if (document.querySelector(`link[href="${p}"]${v}`))
                return;
            const w = document.createElement("link");
            if (w.rel = b ? "stylesheet" : $S,
            b || (w.as = "script"),
            w.crossOrigin = "",
            w.href = p,
            h && w.setAttribute("nonce", h),
            document.head.appendChild(w),
            b)
                return new Promise( (C, R) => {
                    w.addEventListener("load", C),
                    w.addEventListener("error", () => R(new Error(`Unable to preload CSS for ${p}`)))
                }
                )
        }
        ))
    }
    function u(d) {
        const h = new Event("vite:preloadError",{
            cancelable: !0
        });
        if (h.payload = d,
        window.dispatchEvent(h),
        !h.defaultPrevented)
            throw d
    }
    return c.then(d => {
        for (const h of d || [])
            h.status === "rejected" && u(h.reason);
        return r().catch(u)
    }
    )
};
var gf = {
    exports: {}
}
  , Cl = {};
/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Hg;
function QS() {
    if (Hg)
        return Cl;
    Hg = 1;
    var n = Symbol.for("react.transitional.element")
      , r = Symbol.for("react.fragment");
    function l(i, c, u) {
        var d = null;
        if (u !== void 0 && (d = "" + u),
        c.key !== void 0 && (d = "" + c.key),
        "key"in c) {
            u = {};
            for (var h in c)
                h !== "key" && (u[h] = c[h])
        } else
            u = c;
        return c = u.ref,
        {
            $$typeof: n,
            type: i,
            key: d,
            ref: c !== void 0 ? c : null,
            props: u
        }
    }
    return Cl.Fragment = r,
    Cl.jsx = l,
    Cl.jsxs = l,
    Cl
}
var Pg;
function ZS() {
    return Pg || (Pg = 1,
    gf.exports = QS()),
    gf.exports
}
var y = ZS()
  , m = Iv();
const F = cd(m)
  , $v = XS({
    __proto__: null,
    default: F
}, [m]);
var vf = {
    exports: {}
}
  , Tl = {}
  , yf = {
    exports: {}
}
  , bf = {};
/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Vg;
function FS() {
    return Vg || (Vg = 1,
    function(n) {
        function r(_, G) {
            var B = _.length;
            _.push(G);
            e: for (; 0 < B; ) {
                var Q = B - 1 >>> 1
                  , ie = _[Q];
                if (0 < c(ie, G))
                    _[Q] = G,
                    _[B] = ie,
                    B = Q;
                else
                    break e
            }
        }
        function l(_) {
            return _.length === 0 ? null : _[0]
        }
        function i(_) {
            if (_.length === 0)
                return null;
            var G = _[0]
              , B = _.pop();
            if (B !== G) {
                _[0] = B;
                e: for (var Q = 0, ie = _.length, be = ie >>> 1; Q < be; ) {
                    var ve = 2 * (Q + 1) - 1
                      , J = _[ve]
                      , ne = ve + 1
                      , pe = _[ne];
                    if (0 > c(J, B))
                        ne < ie && 0 > c(pe, J) ? (_[Q] = pe,
                        _[ne] = B,
                        Q = ne) : (_[Q] = J,
                        _[ve] = B,
                        Q = ve);
                    else if (ne < ie && 0 > c(pe, B))
                        _[Q] = pe,
                        _[ne] = B,
                        Q = ne;
                    else
                        break e
                }
            }
            return G
        }
        function c(_, G) {
            var B = _.sortIndex - G.sortIndex;
            return B !== 0 ? B : _.id - G.id
        }
        if (n.unstable_now = void 0,
        typeof performance == "object" && typeof performance.now == "function") {
            var u = performance;
            n.unstable_now = function() {
                return u.now()
            }
        } else {
            var d = Date
              , h = d.now();
            n.unstable_now = function() {
                return d.now() - h
            }
        }
        var g = []
          , p = []
          , b = 1
          , v = null
          , w = 3
          , C = !1
          , R = !1
          , E = !1
          , A = !1
          , T = typeof setTimeout == "function" ? setTimeout : null
          , D = typeof clearTimeout == "function" ? clearTimeout : null
          , N = typeof setImmediate < "u" ? setImmediate : null;
        function j(_) {
            for (var G = l(p); G !== null; ) {
                if (G.callback === null)
                    i(p);
                else if (G.startTime <= _)
                    i(p),
                    G.sortIndex = G.expirationTime,
                    r(g, G);
                else
                    break;
                G = l(p)
            }
        }
        function U(_) {
            if (E = !1,
            j(_),
            !R)
                if (l(g) !== null)
                    R = !0,
                    K || (K = !0,
                    W());
                else {
                    var G = l(p);
                    G !== null && de(U, G.startTime - _)
                }
        }
        var K = !1
          , Y = -1
          , V = 5
          , $ = -1;
        function ee() {
            return A ? !0 : !(n.unstable_now() - $ < V)
        }
        function se() {
            if (A = !1,
            K) {
                var _ = n.unstable_now();
                $ = _;
                var G = !0;
                try {
                    e: {
                        R = !1,
                        E && (E = !1,
                        D(Y),
                        Y = -1),
                        C = !0;
                        var B = w;
                        try {
                            t: {
                                for (j(_),
                                v = l(g); v !== null && !(v.expirationTime > _ && ee()); ) {
                                    var Q = v.callback;
                                    if (typeof Q == "function") {
                                        v.callback = null,
                                        w = v.priorityLevel;
                                        var ie = Q(v.expirationTime <= _);
                                        if (_ = n.unstable_now(),
                                        typeof ie == "function") {
                                            v.callback = ie,
                                            j(_),
                                            G = !0;
                                            break t
                                        }
                                        v === l(g) && i(g),
                                        j(_)
                                    } else
                                        i(g);
                                    v = l(g)
                                }
                                if (v !== null)
                                    G = !0;
                                else {
                                    var be = l(p);
                                    be !== null && de(U, be.startTime - _),
                                    G = !1
                                }
                            }
                            break e
                        } finally {
                            v = null,
                            w = B,
                            C = !1
                        }
                        G = void 0
                    }
                } finally {
                    G ? W() : K = !1
                }
            }
        }
        var W;
        if (typeof N == "function")
            W = function() {
                N(se)
            }
            ;
        else if (typeof MessageChannel < "u") {
            var te = new MessageChannel
              , le = te.port2;
            te.port1.onmessage = se,
            W = function() {
                le.postMessage(null)
            }
        } else
            W = function() {
                T(se, 0)
            }
            ;
        function de(_, G) {
            Y = T(function() {
                _(n.unstable_now())
            }, G)
        }
        n.unstable_IdlePriority = 5,
        n.unstable_ImmediatePriority = 1,
        n.unstable_LowPriority = 4,
        n.unstable_NormalPriority = 3,
        n.unstable_Profiling = null,
        n.unstable_UserBlockingPriority = 2,
        n.unstable_cancelCallback = function(_) {
            _.callback = null
        }
        ,
        n.unstable_forceFrameRate = function(_) {
            0 > _ || 125 < _ ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : V = 0 < _ ? Math.floor(1e3 / _) : 5
        }
        ,
        n.unstable_getCurrentPriorityLevel = function() {
            return w
        }
        ,
        n.unstable_next = function(_) {
            switch (w) {
            case 1:
            case 2:
            case 3:
                var G = 3;
                break;
            default:
                G = w
            }
            var B = w;
            w = G;
            try {
                return _()
            } finally {
                w = B
            }
        }
        ,
        n.unstable_requestPaint = function() {
            A = !0
        }
        ,
        n.unstable_runWithPriority = function(_, G) {
            switch (_) {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                break;
            default:
                _ = 3
            }
            var B = w;
            w = _;
            try {
                return G()
            } finally {
                w = B
            }
        }
        ,
        n.unstable_scheduleCallback = function(_, G, B) {
            var Q = n.unstable_now();
            switch (typeof B == "object" && B !== null ? (B = B.delay,
            B = typeof B == "number" && 0 < B ? Q + B : Q) : B = Q,
            _) {
            case 1:
                var ie = -1;
                break;
            case 2:
                ie = 250;
                break;
            case 5:
                ie = 1073741823;
                break;
            case 4:
                ie = 1e4;
                break;
            default:
                ie = 5e3
            }
            return ie = B + ie,
            _ = {
                id: b++,
                callback: G,
                priorityLevel: _,
                startTime: B,
                expirationTime: ie,
                sortIndex: -1
            },
            B > Q ? (_.sortIndex = B,
            r(p, _),
            l(g) === null && _ === l(p) && (E ? (D(Y),
            Y = -1) : E = !0,
            de(U, B - Q))) : (_.sortIndex = ie,
            r(g, _),
            R || C || (R = !0,
            K || (K = !0,
            W()))),
            _
        }
        ,
        n.unstable_shouldYield = ee,
        n.unstable_wrapCallback = function(_) {
            var G = w;
            return function() {
                var B = w;
                w = G;
                try {
                    return _.apply(this, arguments)
                } finally {
                    w = B
                }
            }
        }
    }(bf)),
    bf
}
var Gg;
function WS() {
    return Gg || (Gg = 1,
    yf.exports = FS()),
    yf.exports
}
/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Yg;
function JS() {
    if (Yg)
        return Tl;
    Yg = 1;
    var n = WS()
      , r = Iv()
      , l = Xv();
    function i(e) {
        var t = "https://react.dev/errors/" + e;
        if (1 < arguments.length) {
            t += "?args[]=" + encodeURIComponent(arguments[1]);
            for (var a = 2; a < arguments.length; a++)
                t += "&args[]=" + encodeURIComponent(arguments[a])
        }
        return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
    }
    function c(e) {
        return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11)
    }
    function u(e) {
        var t = e
          , a = e;
        if (e.alternate)
            for (; t.return; )
                t = t.return;
        else {
            e = t;
            do
                t = e,
                (t.flags & 4098) !== 0 && (a = t.return),
                e = t.return;
            while (e)
        }
        return t.tag === 3 ? a : null
    }
    function d(e) {
        if (e.tag === 13) {
            var t = e.memoizedState;
            if (t === null && (e = e.alternate,
            e !== null && (t = e.memoizedState)),
            t !== null)
                return t.dehydrated
        }
        return null
    }
    function h(e) {
        if (u(e) !== e)
            throw Error(i(188))
    }
    function g(e) {
        var t = e.alternate;
        if (!t) {
            if (t = u(e),
            t === null)
                throw Error(i(188));
            return t !== e ? null : e
        }
        for (var a = e, o = t; ; ) {
            var s = a.return;
            if (s === null)
                break;
            var f = s.alternate;
            if (f === null) {
                if (o = s.return,
                o !== null) {
                    a = o;
                    continue
                }
                break
            }
            if (s.child === f.child) {
                for (f = s.child; f; ) {
                    if (f === a)
                        return h(s),
                        e;
                    if (f === o)
                        return h(s),
                        t;
                    f = f.sibling
                }
                throw Error(i(188))
            }
            if (a.return !== o.return)
                a = s,
                o = f;
            else {
                for (var x = !1, S = s.child; S; ) {
                    if (S === a) {
                        x = !0,
                        a = s,
                        o = f;
                        break
                    }
                    if (S === o) {
                        x = !0,
                        o = s,
                        a = f;
                        break
                    }
                    S = S.sibling
                }
                if (!x) {
                    for (S = f.child; S; ) {
                        if (S === a) {
                            x = !0,
                            a = f,
                            o = s;
                            break
                        }
                        if (S === o) {
                            x = !0,
                            o = f,
                            a = s;
                            break
                        }
                        S = S.sibling
                    }
                    if (!x)
                        throw Error(i(189))
                }
            }
            if (a.alternate !== o)
                throw Error(i(190))
        }
        if (a.tag !== 3)
            throw Error(i(188));
        return a.stateNode.current === a ? e : t
    }
    function p(e) {
        var t = e.tag;
        if (t === 5 || t === 26 || t === 27 || t === 6)
            return e;
        for (e = e.child; e !== null; ) {
            if (t = p(e),
            t !== null)
                return t;
            e = e.sibling
        }
        return null
    }
    var b = Object.assign
      , v = Symbol.for("react.element")
      , w = Symbol.for("react.transitional.element")
      , C = Symbol.for("react.portal")
      , R = Symbol.for("react.fragment")
      , E = Symbol.for("react.strict_mode")
      , A = Symbol.for("react.profiler")
      , T = Symbol.for("react.provider")
      , D = Symbol.for("react.consumer")
      , N = Symbol.for("react.context")
      , j = Symbol.for("react.forward_ref")
      , U = Symbol.for("react.suspense")
      , K = Symbol.for("react.suspense_list")
      , Y = Symbol.for("react.memo")
      , V = Symbol.for("react.lazy")
      , $ = Symbol.for("react.activity")
      , ee = Symbol.for("react.memo_cache_sentinel")
      , se = Symbol.iterator;
    function W(e) {
        return e === null || typeof e != "object" ? null : (e = se && e[se] || e["@@iterator"],
        typeof e == "function" ? e : null)
    }
    var te = Symbol.for("react.client.reference");
    function le(e) {
        if (e == null)
            return null;
        if (typeof e == "function")
            return e.$$typeof === te ? null : e.displayName || e.name || null;
        if (typeof e == "string")
            return e;
        switch (e) {
        case R:
            return "Fragment";
        case A:
            return "Profiler";
        case E:
            return "StrictMode";
        case U:
            return "Suspense";
        case K:
            return "SuspenseList";
        case $:
            return "Activity"
        }
        if (typeof e == "object")
            switch (e.$$typeof) {
            case C:
                return "Portal";
            case N:
                return (e.displayName || "Context") + ".Provider";
            case D:
                return (e._context.displayName || "Context") + ".Consumer";
            case j:
                var t = e.render;
                return e = e.displayName,
                e || (e = t.displayName || t.name || "",
                e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"),
                e;
            case Y:
                return t = e.displayName || null,
                t !== null ? t : le(e.type) || "Memo";
            case V:
                t = e._payload,
                e = e._init;
                try {
                    return le(e(t))
                } catch {}
            }
        return null
    }
    var de = Array.isArray
      , _ = r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
      , G = l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
      , B = {
        pending: !1,
        data: null,
        method: null,
        action: null
    }
      , Q = []
      , ie = -1;
    function be(e) {
        return {
            current: e
        }
    }
    function ve(e) {
        0 > ie || (e.current = Q[ie],
        Q[ie] = null,
        ie--)
    }
    function J(e, t) {
        ie++,
        Q[ie] = e.current,
        e.current = t
    }
    var ne = be(null)
      , pe = be(null)
      , Ee = be(null)
      , Z = be(null);
    function ce(e, t) {
        switch (J(Ee, t),
        J(pe, e),
        J(ne, null),
        t.nodeType) {
        case 9:
        case 11:
            e = (e = t.documentElement) && (e = e.namespaceURI) ? dg(e) : 0;
            break;
        default:
            if (e = t.tagName,
            t = t.namespaceURI)
                t = dg(t),
                e = mg(t, e);
            else
                switch (e) {
                case "svg":
                    e = 1;
                    break;
                case "math":
                    e = 2;
                    break;
                default:
                    e = 0
                }
        }
        ve(ne),
        J(ne, e)
    }
    function De() {
        ve(ne),
        ve(pe),
        ve(Ee)
    }
    function xe(e) {
        e.memoizedState !== null && J(Z, e);
        var t = ne.current
          , a = mg(t, e.type);
        t !== a && (J(pe, e),
        J(ne, a))
    }
    function Ce(e) {
        pe.current === e && (ve(ne),
        ve(pe)),
        Z.current === e && (ve(Z),
        bl._currentValue = B)
    }
    var Ne = Object.prototype.hasOwnProperty
      , ut = n.unstable_scheduleCallback
      , Tt = n.unstable_cancelCallback
      , Ha = n.unstable_shouldYield
      , ra = n.unstable_requestPaint
      , et = n.unstable_now
      , Ql = n.unstable_getCurrentPriorityLevel
      , $t = n.unstable_ImmediatePriority
      , Zl = n.unstable_UserBlockingPriority
      , gr = n.unstable_NormalPriority
      , Rt = n.unstable_LowPriority
      , jn = n.unstable_IdlePriority
      , lc = n.log
      , ic = n.unstable_setDisableYieldValue
      , gn = null
      , At = null;
    function ln(e) {
        if (typeof lc == "function" && ic(e),
        At && typeof At.setStrictMode == "function")
            try {
                At.setStrictMode(gn, e)
            } catch {}
    }
    var yt = Math.clz32 ? Math.clz32 : la
      , oa = Math.log
      , Fl = Math.LN2;
    function la(e) {
        return e >>>= 0,
        e === 0 ? 32 : 31 - (oa(e) / Fl | 0) | 0
    }
    var vr = 256
      , yr = 4194304;
    function vn(e) {
        var t = e & 42;
        if (t !== 0)
            return t;
        switch (e & -e) {
        case 1:
            return 1;
        case 2:
            return 2;
        case 4:
            return 4;
        case 8:
            return 8;
        case 16:
            return 16;
        case 32:
            return 32;
        case 64:
            return 64;
        case 128:
            return 128;
        case 256:
        case 512:
        case 1024:
        case 2048:
        case 4096:
        case 8192:
        case 16384:
        case 32768:
        case 65536:
        case 131072:
        case 262144:
        case 524288:
        case 1048576:
        case 2097152:
            return e & 4194048;
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
            return e & 62914560;
        case 67108864:
            return 67108864;
        case 134217728:
            return 134217728;
        case 268435456:
            return 268435456;
        case 536870912:
            return 536870912;
        case 1073741824:
            return 0;
        default:
            return e
        }
    }
    function Pa(e, t, a) {
        var o = e.pendingLanes;
        if (o === 0)
            return 0;
        var s = 0
          , f = e.suspendedLanes
          , x = e.pingedLanes;
        e = e.warmLanes;
        var S = o & 134217727;
        return S !== 0 ? (o = S & ~f,
        o !== 0 ? s = vn(o) : (x &= S,
        x !== 0 ? s = vn(x) : a || (a = S & ~e,
        a !== 0 && (s = vn(a))))) : (S = o & ~f,
        S !== 0 ? s = vn(S) : x !== 0 ? s = vn(x) : a || (a = o & ~e,
        a !== 0 && (s = vn(a)))),
        s === 0 ? 0 : t !== 0 && t !== s && (t & f) === 0 && (f = s & -s,
        a = t & -t,
        f >= a || f === 32 && (a & 4194048) !== 0) ? t : s
    }
    function Va(e, t) {
        return (e.pendingLanes & ~(e.suspendedLanes & ~e.pingedLanes) & t) === 0
    }
    function Mo(e, t) {
        switch (e) {
        case 1:
        case 2:
        case 4:
        case 8:
        case 64:
            return t + 250;
        case 16:
        case 32:
        case 128:
        case 256:
        case 512:
        case 1024:
        case 2048:
        case 4096:
        case 8192:
        case 16384:
        case 32768:
        case 65536:
        case 131072:
        case 262144:
        case 524288:
        case 1048576:
        case 2097152:
            return t + 5e3;
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
            return -1;
        case 67108864:
        case 134217728:
        case 268435456:
        case 536870912:
        case 1073741824:
            return -1;
        default:
            return -1
        }
    }
    function sn() {
        var e = vr;
        return vr <<= 1,
        (vr & 4194048) === 0 && (vr = 256),
        e
    }
    function Wl() {
        var e = yr;
        return yr <<= 1,
        (yr & 62914560) === 0 && (yr = 4194304),
        e
    }
    function No(e) {
        for (var t = [], a = 0; 31 > a; a++)
            t.push(e);
        return t
    }
    function ia(e, t) {
        e.pendingLanes |= t,
        t !== 268435456 && (e.suspendedLanes = 0,
        e.pingedLanes = 0,
        e.warmLanes = 0)
    }
    function Jl(e, t, a, o, s, f) {
        var x = e.pendingLanes;
        e.pendingLanes = a,
        e.suspendedLanes = 0,
        e.pingedLanes = 0,
        e.warmLanes = 0,
        e.expiredLanes &= a,
        e.entangledLanes &= a,
        e.errorRecoveryDisabledLanes &= a,
        e.shellSuspendCounter = 0;
        var S = e.entanglements
          , M = e.expirationTimes
          , L = e.hiddenUpdates;
        for (a = x & ~a; 0 < a; ) {
            var q = 31 - yt(a)
              , X = 1 << q;
            S[q] = 0,
            M[q] = -1;
            var H = L[q];
            if (H !== null)
                for (L[q] = null,
                q = 0; q < H.length; q++) {
                    var P = H[q];
                    P !== null && (P.lane &= -536870913)
                }
            a &= ~X
        }
        o !== 0 && ye(e, o, 0),
        f !== 0 && s === 0 && e.tag !== 0 && (e.suspendedLanes |= f & ~(x & ~t))
    }
    function ye(e, t, a) {
        e.pendingLanes |= t,
        e.suspendedLanes &= ~t;
        var o = 31 - yt(t);
        e.entangledLanes |= t,
        e.entanglements[o] = e.entanglements[o] | 1073741824 | a & 4194090
    }
    function Qe(e, t) {
        var a = e.entangledLanes |= t;
        for (e = e.entanglements; a; ) {
            var o = 31 - yt(a)
              , s = 1 << o;
            s & t | e[o] & t && (e[o] |= t),
            a &= ~s
        }
    }
    function tt(e) {
        switch (e) {
        case 2:
            e = 1;
            break;
        case 8:
            e = 4;
            break;
        case 32:
            e = 16;
            break;
        case 256:
        case 512:
        case 1024:
        case 2048:
        case 4096:
        case 8192:
        case 16384:
        case 32768:
        case 65536:
        case 131072:
        case 262144:
        case 524288:
        case 1048576:
        case 2097152:
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
            e = 128;
            break;
        case 268435456:
            e = 134217728;
            break;
        default:
            e = 0
        }
        return e
    }
    function bt(e) {
        return e &= -e,
        2 < e ? 8 < e ? (e & 134217727) !== 0 ? 32 : 268435456 : 8 : 2
    }
    function Ga() {
        var e = G.p;
        return e !== 0 ? e : (e = window.event,
        e === void 0 ? 32 : Dg(e.type))
    }
    function rt(e, t) {
        var a = G.p;
        try {
            return G.p = e,
            t()
        } finally {
            G.p = a
        }
    }
    var Ze = Math.random().toString(36).slice(2)
      , Fe = "__reactFiber$" + Ze
      , Ge = "__reactProps$" + Ze
      , ft = "__reactContainer$" + Ze
      , br = "__reactEvents$" + Ze
      , kn = "__reactListeners$" + Ze
      , Jd = "__reactHandles$" + Ze
      , em = "__reactResources$" + Ze
      , _o = "__reactMarker$" + Ze;
    function sc(e) {
        delete e[Fe],
        delete e[Ge],
        delete e[br],
        delete e[kn],
        delete e[Jd]
    }
    function xr(e) {
        var t = e[Fe];
        if (t)
            return t;
        for (var a = e.parentNode; a; ) {
            if (t = a[ft] || a[Fe]) {
                if (a = t.alternate,
                t.child !== null || a !== null && a.child !== null)
                    for (e = vg(e); e !== null; ) {
                        if (a = e[Fe])
                            return a;
                        e = vg(e)
                    }
                return t
            }
            e = a,
            a = e.parentNode
        }
        return null
    }
    function wr(e) {
        if (e = e[Fe] || e[ft]) {
            var t = e.tag;
            if (t === 5 || t === 6 || t === 13 || t === 26 || t === 27 || t === 3)
                return e
        }
        return null
    }
    function Oo(e) {
        var t = e.tag;
        if (t === 5 || t === 26 || t === 27 || t === 6)
            return e.stateNode;
        throw Error(i(33))
    }
    function Sr(e) {
        var t = e[em];
        return t || (t = e[em] = {
            hoistableStyles: new Map,
            hoistableScripts: new Map
        }),
        t
    }
    function dt(e) {
        e[_o] = !0
    }
    var tm = new Set
      , nm = {};
    function Ya(e, t) {
        Er(e, t),
        Er(e + "Capture", t)
    }
    function Er(e, t) {
        for (nm[e] = t,
        e = 0; e < t.length; e++)
            tm.add(t[e])
    }
    var Ux = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")
      , am = {}
      , rm = {};
    function Hx(e) {
        return Ne.call(rm, e) ? !0 : Ne.call(am, e) ? !1 : Ux.test(e) ? rm[e] = !0 : (am[e] = !0,
        !1)
    }
    function ei(e, t, a) {
        if (Hx(t))
            if (a === null)
                e.removeAttribute(t);
            else {
                switch (typeof a) {
                case "undefined":
                case "function":
                case "symbol":
                    e.removeAttribute(t);
                    return;
                case "boolean":
                    var o = t.toLowerCase().slice(0, 5);
                    if (o !== "data-" && o !== "aria-") {
                        e.removeAttribute(t);
                        return
                    }
                }
                e.setAttribute(t, "" + a)
            }
    }
    function ti(e, t, a) {
        if (a === null)
            e.removeAttribute(t);
        else {
            switch (typeof a) {
            case "undefined":
            case "function":
            case "symbol":
            case "boolean":
                e.removeAttribute(t);
                return
            }
            e.setAttribute(t, "" + a)
        }
    }
    function zn(e, t, a, o) {
        if (o === null)
            e.removeAttribute(a);
        else {
            switch (typeof o) {
            case "undefined":
            case "function":
            case "symbol":
            case "boolean":
                e.removeAttribute(a);
                return
            }
            e.setAttributeNS(t, a, "" + o)
        }
    }
    var cc, om;
    function Cr(e) {
        if (cc === void 0)
            try {
                throw Error()
            } catch (a) {
                var t = a.stack.trim().match(/\n( *(at )?)/);
                cc = t && t[1] || "",
                om = -1 < a.stack.indexOf(`
    at`) ? " (<anonymous>)" : -1 < a.stack.indexOf("@") ? "@unknown:0:0" : ""
            }
        return `
` + cc + e + om
    }
    var uc = !1;
    function fc(e, t) {
        if (!e || uc)
            return "";
        uc = !0;
        var a = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        try {
            var o = {
                DetermineComponentFrameRoot: function() {
                    try {
                        if (t) {
                            var X = function() {
                                throw Error()
                            };
                            if (Object.defineProperty(X.prototype, "props", {
                                set: function() {
                                    throw Error()
                                }
                            }),
                            typeof Reflect == "object" && Reflect.construct) {
                                try {
                                    Reflect.construct(X, [])
                                } catch (P) {
                                    var H = P
                                }
                                Reflect.construct(e, [], X)
                            } else {
                                try {
                                    X.call()
                                } catch (P) {
                                    H = P
                                }
                                e.call(X.prototype)
                            }
                        } else {
                            try {
                                throw Error()
                            } catch (P) {
                                H = P
                            }
                            (X = e()) && typeof X.catch == "function" && X.catch(function() {})
                        }
                    } catch (P) {
                        if (P && H && typeof P.stack == "string")
                            return [P.stack, H.stack]
                    }
                    return [null, null]
                }
            };
            o.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
            var s = Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot, "name");
            s && s.configurable && Object.defineProperty(o.DetermineComponentFrameRoot, "name", {
                value: "DetermineComponentFrameRoot"
            });
            var f = o.DetermineComponentFrameRoot()
              , x = f[0]
              , S = f[1];
            if (x && S) {
                var M = x.split(`
`)
                  , L = S.split(`
`);
                for (s = o = 0; o < M.length && !M[o].includes("DetermineComponentFrameRoot"); )
                    o++;
                for (; s < L.length && !L[s].includes("DetermineComponentFrameRoot"); )
                    s++;
                if (o === M.length || s === L.length)
                    for (o = M.length - 1,
                    s = L.length - 1; 1 <= o && 0 <= s && M[o] !== L[s]; )
                        s--;
                for (; 1 <= o && 0 <= s; o--,
                s--)
                    if (M[o] !== L[s]) {
                        if (o !== 1 || s !== 1)
                            do
                                if (o--,
                                s--,
                                0 > s || M[o] !== L[s]) {
                                    var q = `
` + M[o].replace(" at new ", " at ");
                                    return e.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", e.displayName)),
                                    q
                                }
                            while (1 <= o && 0 <= s);
                        break
                    }
            }
        } finally {
            uc = !1,
            Error.prepareStackTrace = a
        }
        return (a = e ? e.displayName || e.name : "") ? Cr(a) : ""
    }
    function Px(e) {
        switch (e.tag) {
        case 26:
        case 27:
        case 5:
            return Cr(e.type);
        case 16:
            return Cr("Lazy");
        case 13:
            return Cr("Suspense");
        case 19:
            return Cr("SuspenseList");
        case 0:
        case 15:
            return fc(e.type, !1);
        case 11:
            return fc(e.type.render, !1);
        case 1:
            return fc(e.type, !0);
        case 31:
            return Cr("Activity");
        default:
            return ""
        }
    }
    function lm(e) {
        try {
            var t = "";
            do
                t += Px(e),
                e = e.return;
            while (e);
            return t
        } catch (a) {
            return `
Error generating stack: ` + a.message + `
` + a.stack
        }
    }
    function Kt(e) {
        switch (typeof e) {
        case "bigint":
        case "boolean":
        case "number":
        case "string":
        case "undefined":
            return e;
        case "object":
            return e;
        default:
            return ""
        }
    }
    function im(e) {
        var t = e.type;
        return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio")
    }
    function Vx(e) {
        var t = im(e) ? "checked" : "value"
          , a = Object.getOwnPropertyDescriptor(e.constructor.prototype, t)
          , o = "" + e[t];
        if (!e.hasOwnProperty(t) && typeof a < "u" && typeof a.get == "function" && typeof a.set == "function") {
            var s = a.get
              , f = a.set;
            return Object.defineProperty(e, t, {
                configurable: !0,
                get: function() {
                    return s.call(this)
                },
                set: function(x) {
                    o = "" + x,
                    f.call(this, x)
                }
            }),
            Object.defineProperty(e, t, {
                enumerable: a.enumerable
            }),
            {
                getValue: function() {
                    return o
                },
                setValue: function(x) {
                    o = "" + x
                },
                stopTracking: function() {
                    e._valueTracker = null,
                    delete e[t]
                }
            }
        }
    }
    function ni(e) {
        e._valueTracker || (e._valueTracker = Vx(e))
    }
    function sm(e) {
        if (!e)
            return !1;
        var t = e._valueTracker;
        if (!t)
            return !0;
        var a = t.getValue()
          , o = "";
        return e && (o = im(e) ? e.checked ? "true" : "false" : e.value),
        e = o,
        e !== a ? (t.setValue(e),
        !0) : !1
    }
    function ai(e) {
        if (e = e || (typeof document < "u" ? document : void 0),
        typeof e > "u")
            return null;
        try {
            return e.activeElement || e.body
        } catch {
            return e.body
        }
    }
    var Gx = /[\n"\\]/g;
    function Qt(e) {
        return e.replace(Gx, function(t) {
            return "\\" + t.charCodeAt(0).toString(16) + " "
        })
    }
    function dc(e, t, a, o, s, f, x, S) {
        e.name = "",
        x != null && typeof x != "function" && typeof x != "symbol" && typeof x != "boolean" ? e.type = x : e.removeAttribute("type"),
        t != null ? x === "number" ? (t === 0 && e.value === "" || e.value != t) && (e.value = "" + Kt(t)) : e.value !== "" + Kt(t) && (e.value = "" + Kt(t)) : x !== "submit" && x !== "reset" || e.removeAttribute("value"),
        t != null ? mc(e, x, Kt(t)) : a != null ? mc(e, x, Kt(a)) : o != null && e.removeAttribute("value"),
        s == null && f != null && (e.defaultChecked = !!f),
        s != null && (e.checked = s && typeof s != "function" && typeof s != "symbol"),
        S != null && typeof S != "function" && typeof S != "symbol" && typeof S != "boolean" ? e.name = "" + Kt(S) : e.removeAttribute("name")
    }
    function cm(e, t, a, o, s, f, x, S) {
        if (f != null && typeof f != "function" && typeof f != "symbol" && typeof f != "boolean" && (e.type = f),
        t != null || a != null) {
            if (!(f !== "submit" && f !== "reset" || t != null))
                return;
            a = a != null ? "" + Kt(a) : "",
            t = t != null ? "" + Kt(t) : a,
            S || t === e.value || (e.value = t),
            e.defaultValue = t
        }
        o = o ?? s,
        o = typeof o != "function" && typeof o != "symbol" && !!o,
        e.checked = S ? e.checked : !!o,
        e.defaultChecked = !!o,
        x != null && typeof x != "function" && typeof x != "symbol" && typeof x != "boolean" && (e.name = x)
    }
    function mc(e, t, a) {
        t === "number" && ai(e.ownerDocument) === e || e.defaultValue === "" + a || (e.defaultValue = "" + a)
    }
    function Tr(e, t, a, o) {
        if (e = e.options,
        t) {
            t = {};
            for (var s = 0; s < a.length; s++)
                t["$" + a[s]] = !0;
            for (a = 0; a < e.length; a++)
                s = t.hasOwnProperty("$" + e[a].value),
                e[a].selected !== s && (e[a].selected = s),
                s && o && (e[a].defaultSelected = !0)
        } else {
            for (a = "" + Kt(a),
            t = null,
            s = 0; s < e.length; s++) {
                if (e[s].value === a) {
                    e[s].selected = !0,
                    o && (e[s].defaultSelected = !0);
                    return
                }
                t !== null || e[s].disabled || (t = e[s])
            }
            t !== null && (t.selected = !0)
        }
    }
    function um(e, t, a) {
        if (t != null && (t = "" + Kt(t),
        t !== e.value && (e.value = t),
        a == null)) {
            e.defaultValue !== t && (e.defaultValue = t);
            return
        }
        e.defaultValue = a != null ? "" + Kt(a) : ""
    }
    function fm(e, t, a, o) {
        if (t == null) {
            if (o != null) {
                if (a != null)
                    throw Error(i(92));
                if (de(o)) {
                    if (1 < o.length)
                        throw Error(i(93));
                    o = o[0]
                }
                a = o
            }
            a == null && (a = ""),
            t = a
        }
        a = Kt(t),
        e.defaultValue = a,
        o = e.textContent,
        o === a && o !== "" && o !== null && (e.value = o)
    }
    function Rr(e, t) {
        if (t) {
            var a = e.firstChild;
            if (a && a === e.lastChild && a.nodeType === 3) {
                a.nodeValue = t;
                return
            }
        }
        e.textContent = t
    }
    var Yx = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));
    function dm(e, t, a) {
        var o = t.indexOf("--") === 0;
        a == null || typeof a == "boolean" || a === "" ? o ? e.setProperty(t, "") : t === "float" ? e.cssFloat = "" : e[t] = "" : o ? e.setProperty(t, a) : typeof a != "number" || a === 0 || Yx.has(t) ? t === "float" ? e.cssFloat = a : e[t] = ("" + a).trim() : e[t] = a + "px"
    }
    function mm(e, t, a) {
        if (t != null && typeof t != "object")
            throw Error(i(62));
        if (e = e.style,
        a != null) {
            for (var o in a)
                !a.hasOwnProperty(o) || t != null && t.hasOwnProperty(o) || (o.indexOf("--") === 0 ? e.setProperty(o, "") : o === "float" ? e.cssFloat = "" : e[o] = "");
            for (var s in t)
                o = t[s],
                t.hasOwnProperty(s) && a[s] !== o && dm(e, s, o)
        } else
            for (var f in t)
                t.hasOwnProperty(f) && dm(e, f, t[f])
    }
    function hc(e) {
        if (e.indexOf("-") === -1)
            return !1;
        switch (e) {
        case "annotation-xml":
        case "color-profile":
        case "font-face":
        case "font-face-src":
        case "font-face-uri":
        case "font-face-format":
        case "font-face-name":
        case "missing-glyph":
            return !1;
        default:
            return !0
        }
    }
    var qx = new Map([["acceptCharset", "accept-charset"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"], ["crossOrigin", "crossorigin"], ["accentHeight", "accent-height"], ["alignmentBaseline", "alignment-baseline"], ["arabicForm", "arabic-form"], ["baselineShift", "baseline-shift"], ["capHeight", "cap-height"], ["clipPath", "clip-path"], ["clipRule", "clip-rule"], ["colorInterpolation", "color-interpolation"], ["colorInterpolationFilters", "color-interpolation-filters"], ["colorProfile", "color-profile"], ["colorRendering", "color-rendering"], ["dominantBaseline", "dominant-baseline"], ["enableBackground", "enable-background"], ["fillOpacity", "fill-opacity"], ["fillRule", "fill-rule"], ["floodColor", "flood-color"], ["floodOpacity", "flood-opacity"], ["fontFamily", "font-family"], ["fontSize", "font-size"], ["fontSizeAdjust", "font-size-adjust"], ["fontStretch", "font-stretch"], ["fontStyle", "font-style"], ["fontVariant", "font-variant"], ["fontWeight", "font-weight"], ["glyphName", "glyph-name"], ["glyphOrientationHorizontal", "glyph-orientation-horizontal"], ["glyphOrientationVertical", "glyph-orientation-vertical"], ["horizAdvX", "horiz-adv-x"], ["horizOriginX", "horiz-origin-x"], ["imageRendering", "image-rendering"], ["letterSpacing", "letter-spacing"], ["lightingColor", "lighting-color"], ["markerEnd", "marker-end"], ["markerMid", "marker-mid"], ["markerStart", "marker-start"], ["overlinePosition", "overline-position"], ["overlineThickness", "overline-thickness"], ["paintOrder", "paint-order"], ["panose-1", "panose-1"], ["pointerEvents", "pointer-events"], ["renderingIntent", "rendering-intent"], ["shapeRendering", "shape-rendering"], ["stopColor", "stop-color"], ["stopOpacity", "stop-opacity"], ["strikethroughPosition", "strikethrough-position"], ["strikethroughThickness", "strikethrough-thickness"], ["strokeDasharray", "stroke-dasharray"], ["strokeDashoffset", "stroke-dashoffset"], ["strokeLinecap", "stroke-linecap"], ["strokeLinejoin", "stroke-linejoin"], ["strokeMiterlimit", "stroke-miterlimit"], ["strokeOpacity", "stroke-opacity"], ["strokeWidth", "stroke-width"], ["textAnchor", "text-anchor"], ["textDecoration", "text-decoration"], ["textRendering", "text-rendering"], ["transformOrigin", "transform-origin"], ["underlinePosition", "underline-position"], ["underlineThickness", "underline-thickness"], ["unicodeBidi", "unicode-bidi"], ["unicodeRange", "unicode-range"], ["unitsPerEm", "units-per-em"], ["vAlphabetic", "v-alphabetic"], ["vHanging", "v-hanging"], ["vIdeographic", "v-ideographic"], ["vMathematical", "v-mathematical"], ["vectorEffect", "vector-effect"], ["vertAdvY", "vert-adv-y"], ["vertOriginX", "vert-origin-x"], ["vertOriginY", "vert-origin-y"], ["wordSpacing", "word-spacing"], ["writingMode", "writing-mode"], ["xmlnsXlink", "xmlns:xlink"], ["xHeight", "x-height"]])
      , Ix = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
    function ri(e) {
        return Ix.test("" + e) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : e
    }
    var pc = null;
    function gc(e) {
        return e = e.target || e.srcElement || window,
        e.correspondingUseElement && (e = e.correspondingUseElement),
        e.nodeType === 3 ? e.parentNode : e
    }
    var Ar = null
      , Mr = null;
    function hm(e) {
        var t = wr(e);
        if (t && (e = t.stateNode)) {
            var a = e[Ge] || null;
            e: switch (e = t.stateNode,
            t.type) {
            case "input":
                if (dc(e, a.value, a.defaultValue, a.defaultValue, a.checked, a.defaultChecked, a.type, a.name),
                t = a.name,
                a.type === "radio" && t != null) {
                    for (a = e; a.parentNode; )
                        a = a.parentNode;
                    for (a = a.querySelectorAll('input[name="' + Qt("" + t) + '"][type="radio"]'),
                    t = 0; t < a.length; t++) {
                        var o = a[t];
                        if (o !== e && o.form === e.form) {
                            var s = o[Ge] || null;
                            if (!s)
                                throw Error(i(90));
                            dc(o, s.value, s.defaultValue, s.defaultValue, s.checked, s.defaultChecked, s.type, s.name)
                        }
                    }
                    for (t = 0; t < a.length; t++)
                        o = a[t],
                        o.form === e.form && sm(o)
                }
                break e;
            case "textarea":
                um(e, a.value, a.defaultValue);
                break e;
            case "select":
                t = a.value,
                t != null && Tr(e, !!a.multiple, t, !1)
            }
        }
    }
    var vc = !1;
    function pm(e, t, a) {
        if (vc)
            return e(t, a);
        vc = !0;
        try {
            var o = e(t);
            return o
        } finally {
            if (vc = !1,
            (Ar !== null || Mr !== null) && (Yi(),
            Ar && (t = Ar,
            e = Mr,
            Mr = Ar = null,
            hm(t),
            e)))
                for (t = 0; t < e.length; t++)
                    hm(e[t])
        }
    }
    function Do(e, t) {
        var a = e.stateNode;
        if (a === null)
            return null;
        var o = a[Ge] || null;
        if (o === null)
            return null;
        a = o[t];
        e: switch (t) {
        case "onClick":
        case "onClickCapture":
        case "onDoubleClick":
        case "onDoubleClickCapture":
        case "onMouseDown":
        case "onMouseDownCapture":
        case "onMouseMove":
        case "onMouseMoveCapture":
        case "onMouseUp":
        case "onMouseUpCapture":
        case "onMouseEnter":
            (o = !o.disabled) || (e = e.type,
            o = !(e === "button" || e === "input" || e === "select" || e === "textarea")),
            e = !o;
            break e;
        default:
            e = !1
        }
        if (e)
            return null;
        if (a && typeof a != "function")
            throw Error(i(231, t, typeof a));
        return a
    }
    var Ln = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u")
      , yc = !1;
    if (Ln)
        try {
            var jo = {};
            Object.defineProperty(jo, "passive", {
                get: function() {
                    yc = !0
                }
            }),
            window.addEventListener("test", jo, jo),
            window.removeEventListener("test", jo, jo)
        } catch {
            yc = !1
        }
    var sa = null
      , bc = null
      , oi = null;
    function gm() {
        if (oi)
            return oi;
        var e, t = bc, a = t.length, o, s = "value"in sa ? sa.value : sa.textContent, f = s.length;
        for (e = 0; e < a && t[e] === s[e]; e++)
            ;
        var x = a - e;
        for (o = 1; o <= x && t[a - o] === s[f - o]; o++)
            ;
        return oi = s.slice(e, 1 < o ? 1 - o : void 0)
    }
    function li(e) {
        var t = e.keyCode;
        return "charCode"in e ? (e = e.charCode,
        e === 0 && t === 13 && (e = 13)) : e = t,
        e === 10 && (e = 13),
        32 <= e || e === 13 ? e : 0
    }
    function ii() {
        return !0
    }
    function vm() {
        return !1
    }
    function Ot(e) {
        function t(a, o, s, f, x) {
            this._reactName = a,
            this._targetInst = s,
            this.type = o,
            this.nativeEvent = f,
            this.target = x,
            this.currentTarget = null;
            for (var S in e)
                e.hasOwnProperty(S) && (a = e[S],
                this[S] = a ? a(f) : f[S]);
            return this.isDefaultPrevented = (f.defaultPrevented != null ? f.defaultPrevented : f.returnValue === !1) ? ii : vm,
            this.isPropagationStopped = vm,
            this
        }
        return b(t.prototype, {
            preventDefault: function() {
                this.defaultPrevented = !0;
                var a = this.nativeEvent;
                a && (a.preventDefault ? a.preventDefault() : typeof a.returnValue != "unknown" && (a.returnValue = !1),
                this.isDefaultPrevented = ii)
            },
            stopPropagation: function() {
                var a = this.nativeEvent;
                a && (a.stopPropagation ? a.stopPropagation() : typeof a.cancelBubble != "unknown" && (a.cancelBubble = !0),
                this.isPropagationStopped = ii)
            },
            persist: function() {},
            isPersistent: ii
        }),
        t
    }
    var qa = {
        eventPhase: 0,
        bubbles: 0,
        cancelable: 0,
        timeStamp: function(e) {
            return e.timeStamp || Date.now()
        },
        defaultPrevented: 0,
        isTrusted: 0
    }, si = Ot(qa), ko = b({}, qa, {
        view: 0,
        detail: 0
    }), Xx = Ot(ko), xc, wc, zo, ci = b({}, ko, {
        screenX: 0,
        screenY: 0,
        clientX: 0,
        clientY: 0,
        pageX: 0,
        pageY: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        getModifierState: Ec,
        button: 0,
        buttons: 0,
        relatedTarget: function(e) {
            return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget
        },
        movementX: function(e) {
            return "movementX"in e ? e.movementX : (e !== zo && (zo && e.type === "mousemove" ? (xc = e.screenX - zo.screenX,
            wc = e.screenY - zo.screenY) : wc = xc = 0,
            zo = e),
            xc)
        },
        movementY: function(e) {
            return "movementY"in e ? e.movementY : wc
        }
    }), ym = Ot(ci), $x = b({}, ci, {
        dataTransfer: 0
    }), Kx = Ot($x), Qx = b({}, ko, {
        relatedTarget: 0
    }), Sc = Ot(Qx), Zx = b({}, qa, {
        animationName: 0,
        elapsedTime: 0,
        pseudoElement: 0
    }), Fx = Ot(Zx), Wx = b({}, qa, {
        clipboardData: function(e) {
            return "clipboardData"in e ? e.clipboardData : window.clipboardData
        }
    }), Jx = Ot(Wx), ew = b({}, qa, {
        data: 0
    }), bm = Ot(ew), tw = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified"
    }, nw = {
        8: "Backspace",
        9: "Tab",
        12: "Clear",
        13: "Enter",
        16: "Shift",
        17: "Control",
        18: "Alt",
        19: "Pause",
        20: "CapsLock",
        27: "Escape",
        32: " ",
        33: "PageUp",
        34: "PageDown",
        35: "End",
        36: "Home",
        37: "ArrowLeft",
        38: "ArrowUp",
        39: "ArrowRight",
        40: "ArrowDown",
        45: "Insert",
        46: "Delete",
        112: "F1",
        113: "F2",
        114: "F3",
        115: "F4",
        116: "F5",
        117: "F6",
        118: "F7",
        119: "F8",
        120: "F9",
        121: "F10",
        122: "F11",
        123: "F12",
        144: "NumLock",
        145: "ScrollLock",
        224: "Meta"
    }, aw = {
        Alt: "altKey",
        Control: "ctrlKey",
        Meta: "metaKey",
        Shift: "shiftKey"
    };
    function rw(e) {
        var t = this.nativeEvent;
        return t.getModifierState ? t.getModifierState(e) : (e = aw[e]) ? !!t[e] : !1
    }
    function Ec() {
        return rw
    }
    var ow = b({}, ko, {
        key: function(e) {
            if (e.key) {
                var t = tw[e.key] || e.key;
                if (t !== "Unidentified")
                    return t
            }
            return e.type === "keypress" ? (e = li(e),
            e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? nw[e.keyCode] || "Unidentified" : ""
        },
        code: 0,
        location: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        repeat: 0,
        locale: 0,
        getModifierState: Ec,
        charCode: function(e) {
            return e.type === "keypress" ? li(e) : 0
        },
        keyCode: function(e) {
            return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0
        },
        which: function(e) {
            return e.type === "keypress" ? li(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0
        }
    })
      , lw = Ot(ow)
      , iw = b({}, ci, {
        pointerId: 0,
        width: 0,
        height: 0,
        pressure: 0,
        tangentialPressure: 0,
        tiltX: 0,
        tiltY: 0,
        twist: 0,
        pointerType: 0,
        isPrimary: 0
    })
      , xm = Ot(iw)
      , sw = b({}, ko, {
        touches: 0,
        targetTouches: 0,
        changedTouches: 0,
        altKey: 0,
        metaKey: 0,
        ctrlKey: 0,
        shiftKey: 0,
        getModifierState: Ec
    })
      , cw = Ot(sw)
      , uw = b({}, qa, {
        propertyName: 0,
        elapsedTime: 0,
        pseudoElement: 0
    })
      , fw = Ot(uw)
      , dw = b({}, ci, {
        deltaX: function(e) {
            return "deltaX"in e ? e.deltaX : "wheelDeltaX"in e ? -e.wheelDeltaX : 0
        },
        deltaY: function(e) {
            return "deltaY"in e ? e.deltaY : "wheelDeltaY"in e ? -e.wheelDeltaY : "wheelDelta"in e ? -e.wheelDelta : 0
        },
        deltaZ: 0,
        deltaMode: 0
    })
      , mw = Ot(dw)
      , hw = b({}, qa, {
        newState: 0,
        oldState: 0
    })
      , pw = Ot(hw)
      , gw = [9, 13, 27, 32]
      , Cc = Ln && "CompositionEvent"in window
      , Lo = null;
    Ln && "documentMode"in document && (Lo = document.documentMode);
    var vw = Ln && "TextEvent"in window && !Lo
      , wm = Ln && (!Cc || Lo && 8 < Lo && 11 >= Lo)
      , Sm = " "
      , Em = !1;
    function Cm(e, t) {
        switch (e) {
        case "keyup":
            return gw.indexOf(t.keyCode) !== -1;
        case "keydown":
            return t.keyCode !== 229;
        case "keypress":
        case "mousedown":
        case "focusout":
            return !0;
        default:
            return !1
        }
    }
    function Tm(e) {
        return e = e.detail,
        typeof e == "object" && "data"in e ? e.data : null
    }
    var Nr = !1;
    function yw(e, t) {
        switch (e) {
        case "compositionend":
            return Tm(t);
        case "keypress":
            return t.which !== 32 ? null : (Em = !0,
            Sm);
        case "textInput":
            return e = t.data,
            e === Sm && Em ? null : e;
        default:
            return null
        }
    }
    function bw(e, t) {
        if (Nr)
            return e === "compositionend" || !Cc && Cm(e, t) ? (e = gm(),
            oi = bc = sa = null,
            Nr = !1,
            e) : null;
        switch (e) {
        case "paste":
            return null;
        case "keypress":
            if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
                if (t.char && 1 < t.char.length)
                    return t.char;
                if (t.which)
                    return String.fromCharCode(t.which)
            }
            return null;
        case "compositionend":
            return wm && t.locale !== "ko" ? null : t.data;
        default:
            return null
        }
    }
    var xw = {
        color: !0,
        date: !0,
        datetime: !0,
        "datetime-local": !0,
        email: !0,
        month: !0,
        number: !0,
        password: !0,
        range: !0,
        search: !0,
        tel: !0,
        text: !0,
        time: !0,
        url: !0,
        week: !0
    };
    function Rm(e) {
        var t = e && e.nodeName && e.nodeName.toLowerCase();
        return t === "input" ? !!xw[e.type] : t === "textarea"
    }
    function Am(e, t, a, o) {
        Ar ? Mr ? Mr.push(o) : Mr = [o] : Ar = o,
        t = Qi(t, "onChange"),
        0 < t.length && (a = new si("onChange","change",null,a,o),
        e.push({
            event: a,
            listeners: t
        }))
    }
    var Bo = null
      , Uo = null;
    function ww(e) {
        ig(e, 0)
    }
    function ui(e) {
        var t = Oo(e);
        if (sm(t))
            return e
    }
    function Mm(e, t) {
        if (e === "change")
            return t
    }
    var Nm = !1;
    if (Ln) {
        var Tc;
        if (Ln) {
            var Rc = "oninput"in document;
            if (!Rc) {
                var _m = document.createElement("div");
                _m.setAttribute("oninput", "return;"),
                Rc = typeof _m.oninput == "function"
            }
            Tc = Rc
        } else
            Tc = !1;
        Nm = Tc && (!document.documentMode || 9 < document.documentMode)
    }
    function Om() {
        Bo && (Bo.detachEvent("onpropertychange", Dm),
        Uo = Bo = null)
    }
    function Dm(e) {
        if (e.propertyName === "value" && ui(Uo)) {
            var t = [];
            Am(t, Uo, e, gc(e)),
            pm(ww, t)
        }
    }
    function Sw(e, t, a) {
        e === "focusin" ? (Om(),
        Bo = t,
        Uo = a,
        Bo.attachEvent("onpropertychange", Dm)) : e === "focusout" && Om()
    }
    function Ew(e) {
        if (e === "selectionchange" || e === "keyup" || e === "keydown")
            return ui(Uo)
    }
    function Cw(e, t) {
        if (e === "click")
            return ui(t)
    }
    function Tw(e, t) {
        if (e === "input" || e === "change")
            return ui(t)
    }
    function Rw(e, t) {
        return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t
    }
    var Bt = typeof Object.is == "function" ? Object.is : Rw;
    function Ho(e, t) {
        if (Bt(e, t))
            return !0;
        if (typeof e != "object" || e === null || typeof t != "object" || t === null)
            return !1;
        var a = Object.keys(e)
          , o = Object.keys(t);
        if (a.length !== o.length)
            return !1;
        for (o = 0; o < a.length; o++) {
            var s = a[o];
            if (!Ne.call(t, s) || !Bt(e[s], t[s]))
                return !1
        }
        return !0
    }
    function jm(e) {
        for (; e && e.firstChild; )
            e = e.firstChild;
        return e
    }
    function km(e, t) {
        var a = jm(e);
        e = 0;
        for (var o; a; ) {
            if (a.nodeType === 3) {
                if (o = e + a.textContent.length,
                e <= t && o >= t)
                    return {
                        node: a,
                        offset: t - e
                    };
                e = o
            }
            e: {
                for (; a; ) {
                    if (a.nextSibling) {
                        a = a.nextSibling;
                        break e
                    }
                    a = a.parentNode
                }
                a = void 0
            }
            a = jm(a)
        }
    }
    function zm(e, t) {
        return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? zm(e, t.parentNode) : "contains"in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1
    }
    function Lm(e) {
        e = e != null && e.ownerDocument != null && e.ownerDocument.defaultView != null ? e.ownerDocument.defaultView : window;
        for (var t = ai(e.document); t instanceof e.HTMLIFrameElement; ) {
            try {
                var a = typeof t.contentWindow.location.href == "string"
            } catch {
                a = !1
            }
            if (a)
                e = t.contentWindow;
            else
                break;
            t = ai(e.document)
        }
        return t
    }
    function Ac(e) {
        var t = e && e.nodeName && e.nodeName.toLowerCase();
        return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true")
    }
    var Aw = Ln && "documentMode"in document && 11 >= document.documentMode
      , _r = null
      , Mc = null
      , Po = null
      , Nc = !1;
    function Bm(e, t, a) {
        var o = a.window === a ? a.document : a.nodeType === 9 ? a : a.ownerDocument;
        Nc || _r == null || _r !== ai(o) || (o = _r,
        "selectionStart"in o && Ac(o) ? o = {
            start: o.selectionStart,
            end: o.selectionEnd
        } : (o = (o.ownerDocument && o.ownerDocument.defaultView || window).getSelection(),
        o = {
            anchorNode: o.anchorNode,
            anchorOffset: o.anchorOffset,
            focusNode: o.focusNode,
            focusOffset: o.focusOffset
        }),
        Po && Ho(Po, o) || (Po = o,
        o = Qi(Mc, "onSelect"),
        0 < o.length && (t = new si("onSelect","select",null,t,a),
        e.push({
            event: t,
            listeners: o
        }),
        t.target = _r)))
    }
    function Ia(e, t) {
        var a = {};
        return a[e.toLowerCase()] = t.toLowerCase(),
        a["Webkit" + e] = "webkit" + t,
        a["Moz" + e] = "moz" + t,
        a
    }
    var Or = {
        animationend: Ia("Animation", "AnimationEnd"),
        animationiteration: Ia("Animation", "AnimationIteration"),
        animationstart: Ia("Animation", "AnimationStart"),
        transitionrun: Ia("Transition", "TransitionRun"),
        transitionstart: Ia("Transition", "TransitionStart"),
        transitioncancel: Ia("Transition", "TransitionCancel"),
        transitionend: Ia("Transition", "TransitionEnd")
    }
      , _c = {}
      , Um = {};
    Ln && (Um = document.createElement("div").style,
    "AnimationEvent"in window || (delete Or.animationend.animation,
    delete Or.animationiteration.animation,
    delete Or.animationstart.animation),
    "TransitionEvent"in window || delete Or.transitionend.transition);
    function Xa(e) {
        if (_c[e])
            return _c[e];
        if (!Or[e])
            return e;
        var t = Or[e], a;
        for (a in t)
            if (t.hasOwnProperty(a) && a in Um)
                return _c[e] = t[a];
        return e
    }
    var Hm = Xa("animationend")
      , Pm = Xa("animationiteration")
      , Vm = Xa("animationstart")
      , Mw = Xa("transitionrun")
      , Nw = Xa("transitionstart")
      , _w = Xa("transitioncancel")
      , Gm = Xa("transitionend")
      , Ym = new Map
      , Oc = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
    Oc.push("scrollEnd");
    function cn(e, t) {
        Ym.set(e, t),
        Ya(t, [e])
    }
    var qm = new WeakMap;
    function Zt(e, t) {
        if (typeof e == "object" && e !== null) {
            var a = qm.get(e);
            return a !== void 0 ? a : (t = {
                value: e,
                source: t,
                stack: lm(t)
            },
            qm.set(e, t),
            t)
        }
        return {
            value: e,
            source: t,
            stack: lm(t)
        }
    }
    var Ft = []
      , Dr = 0
      , Dc = 0;
    function fi() {
        for (var e = Dr, t = Dc = Dr = 0; t < e; ) {
            var a = Ft[t];
            Ft[t++] = null;
            var o = Ft[t];
            Ft[t++] = null;
            var s = Ft[t];
            Ft[t++] = null;
            var f = Ft[t];
            if (Ft[t++] = null,
            o !== null && s !== null) {
                var x = o.pending;
                x === null ? s.next = s : (s.next = x.next,
                x.next = s),
                o.pending = s
            }
            f !== 0 && Im(a, s, f)
        }
    }
    function di(e, t, a, o) {
        Ft[Dr++] = e,
        Ft[Dr++] = t,
        Ft[Dr++] = a,
        Ft[Dr++] = o,
        Dc |= o,
        e.lanes |= o,
        e = e.alternate,
        e !== null && (e.lanes |= o)
    }
    function jc(e, t, a, o) {
        return di(e, t, a, o),
        mi(e)
    }
    function jr(e, t) {
        return di(e, null, null, t),
        mi(e)
    }
    function Im(e, t, a) {
        e.lanes |= a;
        var o = e.alternate;
        o !== null && (o.lanes |= a);
        for (var s = !1, f = e.return; f !== null; )
            f.childLanes |= a,
            o = f.alternate,
            o !== null && (o.childLanes |= a),
            f.tag === 22 && (e = f.stateNode,
            e === null || e._visibility & 1 || (s = !0)),
            e = f,
            f = f.return;
        return e.tag === 3 ? (f = e.stateNode,
        s && t !== null && (s = 31 - yt(a),
        e = f.hiddenUpdates,
        o = e[s],
        o === null ? e[s] = [t] : o.push(t),
        t.lane = a | 536870912),
        f) : null
    }
    function mi(e) {
        if (50 < fl)
            throw fl = 0,
            Hu = null,
            Error(i(185));
        for (var t = e.return; t !== null; )
            e = t,
            t = e.return;
        return e.tag === 3 ? e.stateNode : null
    }
    var kr = {};
    function Ow(e, t, a, o) {
        this.tag = e,
        this.key = a,
        this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null,
        this.index = 0,
        this.refCleanup = this.ref = null,
        this.pendingProps = t,
        this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null,
        this.mode = o,
        this.subtreeFlags = this.flags = 0,
        this.deletions = null,
        this.childLanes = this.lanes = 0,
        this.alternate = null
    }
    function Ut(e, t, a, o) {
        return new Ow(e,t,a,o)
    }
    function kc(e) {
        return e = e.prototype,
        !(!e || !e.isReactComponent)
    }
    function Bn(e, t) {
        var a = e.alternate;
        return a === null ? (a = Ut(e.tag, t, e.key, e.mode),
        a.elementType = e.elementType,
        a.type = e.type,
        a.stateNode = e.stateNode,
        a.alternate = e,
        e.alternate = a) : (a.pendingProps = t,
        a.type = e.type,
        a.flags = 0,
        a.subtreeFlags = 0,
        a.deletions = null),
        a.flags = e.flags & 65011712,
        a.childLanes = e.childLanes,
        a.lanes = e.lanes,
        a.child = e.child,
        a.memoizedProps = e.memoizedProps,
        a.memoizedState = e.memoizedState,
        a.updateQueue = e.updateQueue,
        t = e.dependencies,
        a.dependencies = t === null ? null : {
            lanes: t.lanes,
            firstContext: t.firstContext
        },
        a.sibling = e.sibling,
        a.index = e.index,
        a.ref = e.ref,
        a.refCleanup = e.refCleanup,
        a
    }
    function Xm(e, t) {
        e.flags &= 65011714;
        var a = e.alternate;
        return a === null ? (e.childLanes = 0,
        e.lanes = t,
        e.child = null,
        e.subtreeFlags = 0,
        e.memoizedProps = null,
        e.memoizedState = null,
        e.updateQueue = null,
        e.dependencies = null,
        e.stateNode = null) : (e.childLanes = a.childLanes,
        e.lanes = a.lanes,
        e.child = a.child,
        e.subtreeFlags = 0,
        e.deletions = null,
        e.memoizedProps = a.memoizedProps,
        e.memoizedState = a.memoizedState,
        e.updateQueue = a.updateQueue,
        e.type = a.type,
        t = a.dependencies,
        e.dependencies = t === null ? null : {
            lanes: t.lanes,
            firstContext: t.firstContext
        }),
        e
    }
    function hi(e, t, a, o, s, f) {
        var x = 0;
        if (o = e,
        typeof e == "function")
            kc(e) && (x = 1);
        else if (typeof e == "string")
            x = jS(e, a, ne.current) ? 26 : e === "html" || e === "head" || e === "body" ? 27 : 5;
        else
            e: switch (e) {
            case $:
                return e = Ut(31, a, t, s),
                e.elementType = $,
                e.lanes = f,
                e;
            case R:
                return $a(a.children, s, f, t);
            case E:
                x = 8,
                s |= 24;
                break;
            case A:
                return e = Ut(12, a, t, s | 2),
                e.elementType = A,
                e.lanes = f,
                e;
            case U:
                return e = Ut(13, a, t, s),
                e.elementType = U,
                e.lanes = f,
                e;
            case K:
                return e = Ut(19, a, t, s),
                e.elementType = K,
                e.lanes = f,
                e;
            default:
                if (typeof e == "object" && e !== null)
                    switch (e.$$typeof) {
                    case T:
                    case N:
                        x = 10;
                        break e;
                    case D:
                        x = 9;
                        break e;
                    case j:
                        x = 11;
                        break e;
                    case Y:
                        x = 14;
                        break e;
                    case V:
                        x = 16,
                        o = null;
                        break e
                    }
                x = 29,
                a = Error(i(130, e === null ? "null" : typeof e, "")),
                o = null
            }
        return t = Ut(x, a, t, s),
        t.elementType = e,
        t.type = o,
        t.lanes = f,
        t
    }
    function $a(e, t, a, o) {
        return e = Ut(7, e, o, t),
        e.lanes = a,
        e
    }
    function zc(e, t, a) {
        return e = Ut(6, e, null, t),
        e.lanes = a,
        e
    }
    function Lc(e, t, a) {
        return t = Ut(4, e.children !== null ? e.children : [], e.key, t),
        t.lanes = a,
        t.stateNode = {
            containerInfo: e.containerInfo,
            pendingChildren: null,
            implementation: e.implementation
        },
        t
    }
    var zr = []
      , Lr = 0
      , pi = null
      , gi = 0
      , Wt = []
      , Jt = 0
      , Ka = null
      , Un = 1
      , Hn = "";
    function Qa(e, t) {
        zr[Lr++] = gi,
        zr[Lr++] = pi,
        pi = e,
        gi = t
    }
    function $m(e, t, a) {
        Wt[Jt++] = Un,
        Wt[Jt++] = Hn,
        Wt[Jt++] = Ka,
        Ka = e;
        var o = Un;
        e = Hn;
        var s = 32 - yt(o) - 1;
        o &= ~(1 << s),
        a += 1;
        var f = 32 - yt(t) + s;
        if (30 < f) {
            var x = s - s % 5;
            f = (o & (1 << x) - 1).toString(32),
            o >>= x,
            s -= x,
            Un = 1 << 32 - yt(t) + s | a << s | o,
            Hn = f + e
        } else
            Un = 1 << f | a << s | o,
            Hn = e
    }
    function Bc(e) {
        e.return !== null && (Qa(e, 1),
        $m(e, 1, 0))
    }
    function Uc(e) {
        for (; e === pi; )
            pi = zr[--Lr],
            zr[Lr] = null,
            gi = zr[--Lr],
            zr[Lr] = null;
        for (; e === Ka; )
            Ka = Wt[--Jt],
            Wt[Jt] = null,
            Hn = Wt[--Jt],
            Wt[Jt] = null,
            Un = Wt[--Jt],
            Wt[Jt] = null
    }
    var Mt = null
      , $e = null
      , ze = !1
      , Za = null
      , yn = !1
      , Hc = Error(i(519));
    function Fa(e) {
        var t = Error(i(418, ""));
        throw Yo(Zt(t, e)),
        Hc
    }
    function Km(e) {
        var t = e.stateNode
          , a = e.type
          , o = e.memoizedProps;
        switch (t[Fe] = e,
        t[Ge] = o,
        a) {
        case "dialog":
            Ae("cancel", t),
            Ae("close", t);
            break;
        case "iframe":
        case "object":
        case "embed":
            Ae("load", t);
            break;
        case "video":
        case "audio":
            for (a = 0; a < ml.length; a++)
                Ae(ml[a], t);
            break;
        case "source":
            Ae("error", t);
            break;
        case "img":
        case "image":
        case "link":
            Ae("error", t),
            Ae("load", t);
            break;
        case "details":
            Ae("toggle", t);
            break;
        case "input":
            Ae("invalid", t),
            cm(t, o.value, o.defaultValue, o.checked, o.defaultChecked, o.type, o.name, !0),
            ni(t);
            break;
        case "select":
            Ae("invalid", t);
            break;
        case "textarea":
            Ae("invalid", t),
            fm(t, o.value, o.defaultValue, o.children),
            ni(t)
        }
        a = o.children,
        typeof a != "string" && typeof a != "number" && typeof a != "bigint" || t.textContent === "" + a || o.suppressHydrationWarning === !0 || fg(t.textContent, a) ? (o.popover != null && (Ae("beforetoggle", t),
        Ae("toggle", t)),
        o.onScroll != null && Ae("scroll", t),
        o.onScrollEnd != null && Ae("scrollend", t),
        o.onClick != null && (t.onclick = Zi),
        t = !0) : t = !1,
        t || Fa(e)
    }
    function Qm(e) {
        for (Mt = e.return; Mt; )
            switch (Mt.tag) {
            case 5:
            case 13:
                yn = !1;
                return;
            case 27:
            case 3:
                yn = !0;
                return;
            default:
                Mt = Mt.return
            }
    }
    function Vo(e) {
        if (e !== Mt)
            return !1;
        if (!ze)
            return Qm(e),
            ze = !0,
            !1;
        var t = e.tag, a;
        if ((a = t !== 3 && t !== 27) && ((a = t === 5) && (a = e.type,
        a = !(a !== "form" && a !== "button") || tf(e.type, e.memoizedProps)),
        a = !a),
        a && $e && Fa(e),
        Qm(e),
        t === 13) {
            if (e = e.memoizedState,
            e = e !== null ? e.dehydrated : null,
            !e)
                throw Error(i(317));
            e: {
                for (e = e.nextSibling,
                t = 0; e; ) {
                    if (e.nodeType === 8)
                        if (a = e.data,
                        a === "/$") {
                            if (t === 0) {
                                $e = fn(e.nextSibling);
                                break e
                            }
                            t--
                        } else
                            a !== "$" && a !== "$!" && a !== "$?" || t++;
                    e = e.nextSibling
                }
                $e = null
            }
        } else
            t === 27 ? (t = $e,
            Ca(e.type) ? (e = of,
            of = null,
            $e = e) : $e = t) : $e = Mt ? fn(e.stateNode.nextSibling) : null;
        return !0
    }
    function Go() {
        $e = Mt = null,
        ze = !1
    }
    function Zm() {
        var e = Za;
        return e !== null && (kt === null ? kt = e : kt.push.apply(kt, e),
        Za = null),
        e
    }
    function Yo(e) {
        Za === null ? Za = [e] : Za.push(e)
    }
    var Pc = be(null)
      , Wa = null
      , Pn = null;
    function ca(e, t, a) {
        J(Pc, t._currentValue),
        t._currentValue = a
    }
    function Vn(e) {
        e._currentValue = Pc.current,
        ve(Pc)
    }
    function Vc(e, t, a) {
        for (; e !== null; ) {
            var o = e.alternate;
            if ((e.childLanes & t) !== t ? (e.childLanes |= t,
            o !== null && (o.childLanes |= t)) : o !== null && (o.childLanes & t) !== t && (o.childLanes |= t),
            e === a)
                break;
            e = e.return
        }
    }
    function Gc(e, t, a, o) {
        var s = e.child;
        for (s !== null && (s.return = e); s !== null; ) {
            var f = s.dependencies;
            if (f !== null) {
                var x = s.child;
                f = f.firstContext;
                e: for (; f !== null; ) {
                    var S = f;
                    f = s;
                    for (var M = 0; M < t.length; M++)
                        if (S.context === t[M]) {
                            f.lanes |= a,
                            S = f.alternate,
                            S !== null && (S.lanes |= a),
                            Vc(f.return, a, e),
                            o || (x = null);
                            break e
                        }
                    f = S.next
                }
            } else if (s.tag === 18) {
                if (x = s.return,
                x === null)
                    throw Error(i(341));
                x.lanes |= a,
                f = x.alternate,
                f !== null && (f.lanes |= a),
                Vc(x, a, e),
                x = null
            } else
                x = s.child;
            if (x !== null)
                x.return = s;
            else
                for (x = s; x !== null; ) {
                    if (x === e) {
                        x = null;
                        break
                    }
                    if (s = x.sibling,
                    s !== null) {
                        s.return = x.return,
                        x = s;
                        break
                    }
                    x = x.return
                }
            s = x
        }
    }
    function qo(e, t, a, o) {
        e = null;
        for (var s = t, f = !1; s !== null; ) {
            if (!f) {
                if ((s.flags & 524288) !== 0)
                    f = !0;
                else if ((s.flags & 262144) !== 0)
                    break
            }
            if (s.tag === 10) {
                var x = s.alternate;
                if (x === null)
                    throw Error(i(387));
                if (x = x.memoizedProps,
                x !== null) {
                    var S = s.type;
                    Bt(s.pendingProps.value, x.value) || (e !== null ? e.push(S) : e = [S])
                }
            } else if (s === Z.current) {
                if (x = s.alternate,
                x === null)
                    throw Error(i(387));
                x.memoizedState.memoizedState !== s.memoizedState.memoizedState && (e !== null ? e.push(bl) : e = [bl])
            }
            s = s.return
        }
        e !== null && Gc(t, e, a, o),
        t.flags |= 262144
    }
    function vi(e) {
        for (e = e.firstContext; e !== null; ) {
            if (!Bt(e.context._currentValue, e.memoizedValue))
                return !0;
            e = e.next
        }
        return !1
    }
    function Ja(e) {
        Wa = e,
        Pn = null,
        e = e.dependencies,
        e !== null && (e.firstContext = null)
    }
    function Et(e) {
        return Fm(Wa, e)
    }
    function yi(e, t) {
        return Wa === null && Ja(e),
        Fm(e, t)
    }
    function Fm(e, t) {
        var a = t._currentValue;
        if (t = {
            context: t,
            memoizedValue: a,
            next: null
        },
        Pn === null) {
            if (e === null)
                throw Error(i(308));
            Pn = t,
            e.dependencies = {
                lanes: 0,
                firstContext: t
            },
            e.flags |= 524288
        } else
            Pn = Pn.next = t;
        return a
    }
    var Dw = typeof AbortController < "u" ? AbortController : function() {
        var e = []
          , t = this.signal = {
            aborted: !1,
            addEventListener: function(a, o) {
                e.push(o)
            }
        };
        this.abort = function() {
            t.aborted = !0,
            e.forEach(function(a) {
                return a()
            })
        }
    }
      , jw = n.unstable_scheduleCallback
      , kw = n.unstable_NormalPriority
      , ot = {
        $$typeof: N,
        Consumer: null,
        Provider: null,
        _currentValue: null,
        _currentValue2: null,
        _threadCount: 0
    };
    function Yc() {
        return {
            controller: new Dw,
            data: new Map,
            refCount: 0
        }
    }
    function Io(e) {
        e.refCount--,
        e.refCount === 0 && jw(kw, function() {
            e.controller.abort()
        })
    }
    var Xo = null
      , qc = 0
      , Br = 0
      , Ur = null;
    function zw(e, t) {
        if (Xo === null) {
            var a = Xo = [];
            qc = 0,
            Br = Xu(),
            Ur = {
                status: "pending",
                value: void 0,
                then: function(o) {
                    a.push(o)
                }
            }
        }
        return qc++,
        t.then(Wm, Wm),
        t
    }
    function Wm() {
        if (--qc === 0 && Xo !== null) {
            Ur !== null && (Ur.status = "fulfilled");
            var e = Xo;
            Xo = null,
            Br = 0,
            Ur = null;
            for (var t = 0; t < e.length; t++)
                (0,
                e[t])()
        }
    }
    function Lw(e, t) {
        var a = []
          , o = {
            status: "pending",
            value: null,
            reason: null,
            then: function(s) {
                a.push(s)
            }
        };
        return e.then(function() {
            o.status = "fulfilled",
            o.value = t;
            for (var s = 0; s < a.length; s++)
                (0,
                a[s])(t)
        }, function(s) {
            for (o.status = "rejected",
            o.reason = s,
            s = 0; s < a.length; s++)
                (0,
                a[s])(void 0)
        }),
        o
    }
    var Jm = _.S;
    _.S = function(e, t) {
        typeof t == "object" && t !== null && typeof t.then == "function" && zw(e, t),
        Jm !== null && Jm(e, t)
    }
    ;
    var er = be(null);
    function Ic() {
        var e = er.current;
        return e !== null ? e : Ye.pooledCache
    }
    function bi(e, t) {
        t === null ? J(er, er.current) : J(er, t.pool)
    }
    function eh() {
        var e = Ic();
        return e === null ? null : {
            parent: ot._currentValue,
            pool: e
        }
    }
    var $o = Error(i(460))
      , th = Error(i(474))
      , xi = Error(i(542))
      , Xc = {
        then: function() {}
    };
    function nh(e) {
        return e = e.status,
        e === "fulfilled" || e === "rejected"
    }
    function wi() {}
    function ah(e, t, a) {
        switch (a = e[a],
        a === void 0 ? e.push(t) : a !== t && (t.then(wi, wi),
        t = a),
        t.status) {
        case "fulfilled":
            return t.value;
        case "rejected":
            throw e = t.reason,
            oh(e),
            e;
        default:
            if (typeof t.status == "string")
                t.then(wi, wi);
            else {
                if (e = Ye,
                e !== null && 100 < e.shellSuspendCounter)
                    throw Error(i(482));
                e = t,
                e.status = "pending",
                e.then(function(o) {
                    if (t.status === "pending") {
                        var s = t;
                        s.status = "fulfilled",
                        s.value = o
                    }
                }, function(o) {
                    if (t.status === "pending") {
                        var s = t;
                        s.status = "rejected",
                        s.reason = o
                    }
                })
            }
            switch (t.status) {
            case "fulfilled":
                return t.value;
            case "rejected":
                throw e = t.reason,
                oh(e),
                e
            }
            throw Ko = t,
            $o
        }
    }
    var Ko = null;
    function rh() {
        if (Ko === null)
            throw Error(i(459));
        var e = Ko;
        return Ko = null,
        e
    }
    function oh(e) {
        if (e === $o || e === xi)
            throw Error(i(483))
    }
    var ua = !1;
    function $c(e) {
        e.updateQueue = {
            baseState: e.memoizedState,
            firstBaseUpdate: null,
            lastBaseUpdate: null,
            shared: {
                pending: null,
                lanes: 0,
                hiddenCallbacks: null
            },
            callbacks: null
        }
    }
    function Kc(e, t) {
        e = e.updateQueue,
        t.updateQueue === e && (t.updateQueue = {
            baseState: e.baseState,
            firstBaseUpdate: e.firstBaseUpdate,
            lastBaseUpdate: e.lastBaseUpdate,
            shared: e.shared,
            callbacks: null
        })
    }
    function fa(e) {
        return {
            lane: e,
            tag: 0,
            payload: null,
            callback: null,
            next: null
        }
    }
    function da(e, t, a) {
        var o = e.updateQueue;
        if (o === null)
            return null;
        if (o = o.shared,
        (Le & 2) !== 0) {
            var s = o.pending;
            return s === null ? t.next = t : (t.next = s.next,
            s.next = t),
            o.pending = t,
            t = mi(e),
            Im(e, null, a),
            t
        }
        return di(e, o, t, a),
        mi(e)
    }
    function Qo(e, t, a) {
        if (t = t.updateQueue,
        t !== null && (t = t.shared,
        (a & 4194048) !== 0)) {
            var o = t.lanes;
            o &= e.pendingLanes,
            a |= o,
            t.lanes = a,
            Qe(e, a)
        }
    }
    function Qc(e, t) {
        var a = e.updateQueue
          , o = e.alternate;
        if (o !== null && (o = o.updateQueue,
        a === o)) {
            var s = null
              , f = null;
            if (a = a.firstBaseUpdate,
            a !== null) {
                do {
                    var x = {
                        lane: a.lane,
                        tag: a.tag,
                        payload: a.payload,
                        callback: null,
                        next: null
                    };
                    f === null ? s = f = x : f = f.next = x,
                    a = a.next
                } while (a !== null);
                f === null ? s = f = t : f = f.next = t
            } else
                s = f = t;
            a = {
                baseState: o.baseState,
                firstBaseUpdate: s,
                lastBaseUpdate: f,
                shared: o.shared,
                callbacks: o.callbacks
            },
            e.updateQueue = a;
            return
        }
        e = a.lastBaseUpdate,
        e === null ? a.firstBaseUpdate = t : e.next = t,
        a.lastBaseUpdate = t
    }
    var Zc = !1;
    function Zo() {
        if (Zc) {
            var e = Ur;
            if (e !== null)
                throw e
        }
    }
    function Fo(e, t, a, o) {
        Zc = !1;
        var s = e.updateQueue;
        ua = !1;
        var f = s.firstBaseUpdate
          , x = s.lastBaseUpdate
          , S = s.shared.pending;
        if (S !== null) {
            s.shared.pending = null;
            var M = S
              , L = M.next;
            M.next = null,
            x === null ? f = L : x.next = L,
            x = M;
            var q = e.alternate;
            q !== null && (q = q.updateQueue,
            S = q.lastBaseUpdate,
            S !== x && (S === null ? q.firstBaseUpdate = L : S.next = L,
            q.lastBaseUpdate = M))
        }
        if (f !== null) {
            var X = s.baseState;
            x = 0,
            q = L = M = null,
            S = f;
            do {
                var H = S.lane & -536870913
                  , P = H !== S.lane;
                if (P ? (je & H) === H : (o & H) === H) {
                    H !== 0 && H === Br && (Zc = !0),
                    q !== null && (q = q.next = {
                        lane: 0,
                        tag: S.tag,
                        payload: S.payload,
                        callback: null,
                        next: null
                    });
                    e: {
                        var ge = e
                          , me = S;
                        H = t;
                        var Pe = a;
                        switch (me.tag) {
                        case 1:
                            if (ge = me.payload,
                            typeof ge == "function") {
                                X = ge.call(Pe, X, H);
                                break e
                            }
                            X = ge;
                            break e;
                        case 3:
                            ge.flags = ge.flags & -65537 | 128;
                        case 0:
                            if (ge = me.payload,
                            H = typeof ge == "function" ? ge.call(Pe, X, H) : ge,
                            H == null)
                                break e;
                            X = b({}, X, H);
                            break e;
                        case 2:
                            ua = !0
                        }
                    }
                    H = S.callback,
                    H !== null && (e.flags |= 64,
                    P && (e.flags |= 8192),
                    P = s.callbacks,
                    P === null ? s.callbacks = [H] : P.push(H))
                } else
                    P = {
                        lane: H,
                        tag: S.tag,
                        payload: S.payload,
                        callback: S.callback,
                        next: null
                    },
                    q === null ? (L = q = P,
                    M = X) : q = q.next = P,
                    x |= H;
                if (S = S.next,
                S === null) {
                    if (S = s.shared.pending,
                    S === null)
                        break;
                    P = S,
                    S = P.next,
                    P.next = null,
                    s.lastBaseUpdate = P,
                    s.shared.pending = null
                }
            } while (!0);
            q === null && (M = X),
            s.baseState = M,
            s.firstBaseUpdate = L,
            s.lastBaseUpdate = q,
            f === null && (s.shared.lanes = 0),
            xa |= x,
            e.lanes = x,
            e.memoizedState = X
        }
    }
    function lh(e, t) {
        if (typeof e != "function")
            throw Error(i(191, e));
        e.call(t)
    }
    function ih(e, t) {
        var a = e.callbacks;
        if (a !== null)
            for (e.callbacks = null,
            e = 0; e < a.length; e++)
                lh(a[e], t)
    }
    var Hr = be(null)
      , Si = be(0);
    function sh(e, t) {
        e = Kn,
        J(Si, e),
        J(Hr, t),
        Kn = e | t.baseLanes
    }
    function Fc() {
        J(Si, Kn),
        J(Hr, Hr.current)
    }
    function Wc() {
        Kn = Si.current,
        ve(Hr),
        ve(Si)
    }
    var ma = 0
      , we = null
      , Ue = null
      , nt = null
      , Ei = !1
      , Pr = !1
      , tr = !1
      , Ci = 0
      , Wo = 0
      , Vr = null
      , Bw = 0;
    function We() {
        throw Error(i(321))
    }
    function Jc(e, t) {
        if (t === null)
            return !1;
        for (var a = 0; a < t.length && a < e.length; a++)
            if (!Bt(e[a], t[a]))
                return !1;
        return !0
    }
    function eu(e, t, a, o, s, f) {
        return ma = f,
        we = t,
        t.memoizedState = null,
        t.updateQueue = null,
        t.lanes = 0,
        _.H = e === null || e.memoizedState === null ? Ih : Xh,
        tr = !1,
        f = a(o, s),
        tr = !1,
        Pr && (f = uh(t, a, o, s)),
        ch(e),
        f
    }
    function ch(e) {
        _.H = _i;
        var t = Ue !== null && Ue.next !== null;
        if (ma = 0,
        nt = Ue = we = null,
        Ei = !1,
        Wo = 0,
        Vr = null,
        t)
            throw Error(i(300));
        e === null || mt || (e = e.dependencies,
        e !== null && vi(e) && (mt = !0))
    }
    function uh(e, t, a, o) {
        we = e;
        var s = 0;
        do {
            if (Pr && (Vr = null),
            Wo = 0,
            Pr = !1,
            25 <= s)
                throw Error(i(301));
            if (s += 1,
            nt = Ue = null,
            e.updateQueue != null) {
                var f = e.updateQueue;
                f.lastEffect = null,
                f.events = null,
                f.stores = null,
                f.memoCache != null && (f.memoCache.index = 0)
            }
            _.H = qw,
            f = t(a, o)
        } while (Pr);
        return f
    }
    function Uw() {
        var e = _.H
          , t = e.useState()[0];
        return t = typeof t.then == "function" ? Jo(t) : t,
        e = e.useState()[0],
        (Ue !== null ? Ue.memoizedState : null) !== e && (we.flags |= 1024),
        t
    }
    function tu() {
        var e = Ci !== 0;
        return Ci = 0,
        e
    }
    function nu(e, t, a) {
        t.updateQueue = e.updateQueue,
        t.flags &= -2053,
        e.lanes &= ~a
    }
    function au(e) {
        if (Ei) {
            for (e = e.memoizedState; e !== null; ) {
                var t = e.queue;
                t !== null && (t.pending = null),
                e = e.next
            }
            Ei = !1
        }
        ma = 0,
        nt = Ue = we = null,
        Pr = !1,
        Wo = Ci = 0,
        Vr = null
    }
    function Dt() {
        var e = {
            memoizedState: null,
            baseState: null,
            baseQueue: null,
            queue: null,
            next: null
        };
        return nt === null ? we.memoizedState = nt = e : nt = nt.next = e,
        nt
    }
    function at() {
        if (Ue === null) {
            var e = we.alternate;
            e = e !== null ? e.memoizedState : null
        } else
            e = Ue.next;
        var t = nt === null ? we.memoizedState : nt.next;
        if (t !== null)
            nt = t,
            Ue = e;
        else {
            if (e === null)
                throw we.alternate === null ? Error(i(467)) : Error(i(310));
            Ue = e,
            e = {
                memoizedState: Ue.memoizedState,
                baseState: Ue.baseState,
                baseQueue: Ue.baseQueue,
                queue: Ue.queue,
                next: null
            },
            nt === null ? we.memoizedState = nt = e : nt = nt.next = e
        }
        return nt
    }
    function ru() {
        return {
            lastEffect: null,
            events: null,
            stores: null,
            memoCache: null
        }
    }
    function Jo(e) {
        var t = Wo;
        return Wo += 1,
        Vr === null && (Vr = []),
        e = ah(Vr, e, t),
        t = we,
        (nt === null ? t.memoizedState : nt.next) === null && (t = t.alternate,
        _.H = t === null || t.memoizedState === null ? Ih : Xh),
        e
    }
    function Ti(e) {
        if (e !== null && typeof e == "object") {
            if (typeof e.then == "function")
                return Jo(e);
            if (e.$$typeof === N)
                return Et(e)
        }
        throw Error(i(438, String(e)))
    }
    function ou(e) {
        var t = null
          , a = we.updateQueue;
        if (a !== null && (t = a.memoCache),
        t == null) {
            var o = we.alternate;
            o !== null && (o = o.updateQueue,
            o !== null && (o = o.memoCache,
            o != null && (t = {
                data: o.data.map(function(s) {
                    return s.slice()
                }),
                index: 0
            })))
        }
        if (t == null && (t = {
            data: [],
            index: 0
        }),
        a === null && (a = ru(),
        we.updateQueue = a),
        a.memoCache = t,
        a = t.data[t.index],
        a === void 0)
            for (a = t.data[t.index] = Array(e),
            o = 0; o < e; o++)
                a[o] = ee;
        return t.index++,
        a
    }
    function Gn(e, t) {
        return typeof t == "function" ? t(e) : t
    }
    function Ri(e) {
        var t = at();
        return lu(t, Ue, e)
    }
    function lu(e, t, a) {
        var o = e.queue;
        if (o === null)
            throw Error(i(311));
        o.lastRenderedReducer = a;
        var s = e.baseQueue
          , f = o.pending;
        if (f !== null) {
            if (s !== null) {
                var x = s.next;
                s.next = f.next,
                f.next = x
            }
            t.baseQueue = s = f,
            o.pending = null
        }
        if (f = e.baseState,
        s === null)
            e.memoizedState = f;
        else {
            t = s.next;
            var S = x = null
              , M = null
              , L = t
              , q = !1;
            do {
                var X = L.lane & -536870913;
                if (X !== L.lane ? (je & X) === X : (ma & X) === X) {
                    var H = L.revertLane;
                    if (H === 0)
                        M !== null && (M = M.next = {
                            lane: 0,
                            revertLane: 0,
                            action: L.action,
                            hasEagerState: L.hasEagerState,
                            eagerState: L.eagerState,
                            next: null
                        }),
                        X === Br && (q = !0);
                    else if ((ma & H) === H) {
                        L = L.next,
                        H === Br && (q = !0);
                        continue
                    } else
                        X = {
                            lane: 0,
                            revertLane: L.revertLane,
                            action: L.action,
                            hasEagerState: L.hasEagerState,
                            eagerState: L.eagerState,
                            next: null
                        },
                        M === null ? (S = M = X,
                        x = f) : M = M.next = X,
                        we.lanes |= H,
                        xa |= H;
                    X = L.action,
                    tr && a(f, X),
                    f = L.hasEagerState ? L.eagerState : a(f, X)
                } else
                    H = {
                        lane: X,
                        revertLane: L.revertLane,
                        action: L.action,
                        hasEagerState: L.hasEagerState,
                        eagerState: L.eagerState,
                        next: null
                    },
                    M === null ? (S = M = H,
                    x = f) : M = M.next = H,
                    we.lanes |= X,
                    xa |= X;
                L = L.next
            } while (L !== null && L !== t);
            if (M === null ? x = f : M.next = S,
            !Bt(f, e.memoizedState) && (mt = !0,
            q && (a = Ur,
            a !== null)))
                throw a;
            e.memoizedState = f,
            e.baseState = x,
            e.baseQueue = M,
            o.lastRenderedState = f
        }
        return s === null && (o.lanes = 0),
        [e.memoizedState, o.dispatch]
    }
    function iu(e) {
        var t = at()
          , a = t.queue;
        if (a === null)
            throw Error(i(311));
        a.lastRenderedReducer = e;
        var o = a.dispatch
          , s = a.pending
          , f = t.memoizedState;
        if (s !== null) {
            a.pending = null;
            var x = s = s.next;
            do
                f = e(f, x.action),
                x = x.next;
            while (x !== s);
            Bt(f, t.memoizedState) || (mt = !0),
            t.memoizedState = f,
            t.baseQueue === null && (t.baseState = f),
            a.lastRenderedState = f
        }
        return [f, o]
    }
    function fh(e, t, a) {
        var o = we
          , s = at()
          , f = ze;
        if (f) {
            if (a === void 0)
                throw Error(i(407));
            a = a()
        } else
            a = t();
        var x = !Bt((Ue || s).memoizedState, a);
        x && (s.memoizedState = a,
        mt = !0),
        s = s.queue;
        var S = hh.bind(null, o, s, e);
        if (el(2048, 8, S, [e]),
        s.getSnapshot !== t || x || nt !== null && nt.memoizedState.tag & 1) {
            if (o.flags |= 2048,
            Gr(9, Ai(), mh.bind(null, o, s, a, t), null),
            Ye === null)
                throw Error(i(349));
            f || (ma & 124) !== 0 || dh(o, t, a)
        }
        return a
    }
    function dh(e, t, a) {
        e.flags |= 16384,
        e = {
            getSnapshot: t,
            value: a
        },
        t = we.updateQueue,
        t === null ? (t = ru(),
        we.updateQueue = t,
        t.stores = [e]) : (a = t.stores,
        a === null ? t.stores = [e] : a.push(e))
    }
    function mh(e, t, a, o) {
        t.value = a,
        t.getSnapshot = o,
        ph(t) && gh(e)
    }
    function hh(e, t, a) {
        return a(function() {
            ph(t) && gh(e)
        })
    }
    function ph(e) {
        var t = e.getSnapshot;
        e = e.value;
        try {
            var a = t();
            return !Bt(e, a)
        } catch {
            return !0
        }
    }
    function gh(e) {
        var t = jr(e, 2);
        t !== null && Yt(t, e, 2)
    }
    function su(e) {
        var t = Dt();
        if (typeof e == "function") {
            var a = e;
            if (e = a(),
            tr) {
                ln(!0);
                try {
                    a()
                } finally {
                    ln(!1)
                }
            }
        }
        return t.memoizedState = t.baseState = e,
        t.queue = {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: Gn,
            lastRenderedState: e
        },
        t
    }
    function vh(e, t, a, o) {
        return e.baseState = a,
        lu(e, Ue, typeof o == "function" ? o : Gn)
    }
    function Hw(e, t, a, o, s) {
        if (Ni(e))
            throw Error(i(485));
        if (e = t.action,
        e !== null) {
            var f = {
                payload: s,
                action: e,
                next: null,
                isTransition: !0,
                status: "pending",
                value: null,
                reason: null,
                listeners: [],
                then: function(x) {
                    f.listeners.push(x)
                }
            };
            _.T !== null ? a(!0) : f.isTransition = !1,
            o(f),
            a = t.pending,
            a === null ? (f.next = t.pending = f,
            yh(t, f)) : (f.next = a.next,
            t.pending = a.next = f)
        }
    }
    function yh(e, t) {
        var a = t.action
          , o = t.payload
          , s = e.state;
        if (t.isTransition) {
            var f = _.T
              , x = {};
            _.T = x;
            try {
                var S = a(s, o)
                  , M = _.S;
                M !== null && M(x, S),
                bh(e, t, S)
            } catch (L) {
                cu(e, t, L)
            } finally {
                _.T = f
            }
        } else
            try {
                f = a(s, o),
                bh(e, t, f)
            } catch (L) {
                cu(e, t, L)
            }
    }
    function bh(e, t, a) {
        a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(function(o) {
            xh(e, t, o)
        }, function(o) {
            return cu(e, t, o)
        }) : xh(e, t, a)
    }
    function xh(e, t, a) {
        t.status = "fulfilled",
        t.value = a,
        wh(t),
        e.state = a,
        t = e.pending,
        t !== null && (a = t.next,
        a === t ? e.pending = null : (a = a.next,
        t.next = a,
        yh(e, a)))
    }
    function cu(e, t, a) {
        var o = e.pending;
        if (e.pending = null,
        o !== null) {
            o = o.next;
            do
                t.status = "rejected",
                t.reason = a,
                wh(t),
                t = t.next;
            while (t !== o)
        }
        e.action = null
    }
    function wh(e) {
        e = e.listeners;
        for (var t = 0; t < e.length; t++)
            (0,
            e[t])()
    }
    function Sh(e, t) {
        return t
    }
    function Eh(e, t) {
        if (ze) {
            var a = Ye.formState;
            if (a !== null) {
                e: {
                    var o = we;
                    if (ze) {
                        if ($e) {
                            t: {
                                for (var s = $e, f = yn; s.nodeType !== 8; ) {
                                    if (!f) {
                                        s = null;
                                        break t
                                    }
                                    if (s = fn(s.nextSibling),
                                    s === null) {
                                        s = null;
                                        break t
                                    }
                                }
                                f = s.data,
                                s = f === "F!" || f === "F" ? s : null
                            }
                            if (s) {
                                $e = fn(s.nextSibling),
                                o = s.data === "F!";
                                break e
                            }
                        }
                        Fa(o)
                    }
                    o = !1
                }
                o && (t = a[0])
            }
        }
        return a = Dt(),
        a.memoizedState = a.baseState = t,
        o = {
            pending: null,
            lanes: 0,
            dispatch: null,
            lastRenderedReducer: Sh,
            lastRenderedState: t
        },
        a.queue = o,
        a = Gh.bind(null, we, o),
        o.dispatch = a,
        o = su(!1),
        f = hu.bind(null, we, !1, o.queue),
        o = Dt(),
        s = {
            state: t,
            dispatch: null,
            action: e,
            pending: null
        },
        o.queue = s,
        a = Hw.bind(null, we, s, f, a),
        s.dispatch = a,
        o.memoizedState = e,
        [t, a, !1]
    }
    function Ch(e) {
        var t = at();
        return Th(t, Ue, e)
    }
    function Th(e, t, a) {
        if (t = lu(e, t, Sh)[0],
        e = Ri(Gn)[0],
        typeof t == "object" && t !== null && typeof t.then == "function")
            try {
                var o = Jo(t)
            } catch (x) {
                throw x === $o ? xi : x
            }
        else
            o = t;
        t = at();
        var s = t.queue
          , f = s.dispatch;
        return a !== t.memoizedState && (we.flags |= 2048,
        Gr(9, Ai(), Pw.bind(null, s, a), null)),
        [o, f, e]
    }
    function Pw(e, t) {
        e.action = t
    }
    function Rh(e) {
        var t = at()
          , a = Ue;
        if (a !== null)
            return Th(t, a, e);
        at(),
        t = t.memoizedState,
        a = at();
        var o = a.queue.dispatch;
        return a.memoizedState = e,
        [t, o, !1]
    }
    function Gr(e, t, a, o) {
        return e = {
            tag: e,
            create: a,
            deps: o,
            inst: t,
            next: null
        },
        t = we.updateQueue,
        t === null && (t = ru(),
        we.updateQueue = t),
        a = t.lastEffect,
        a === null ? t.lastEffect = e.next = e : (o = a.next,
        a.next = e,
        e.next = o,
        t.lastEffect = e),
        e
    }
    function Ai() {
        return {
            destroy: void 0,
            resource: void 0
        }
    }
    function Ah() {
        return at().memoizedState
    }
    function Mi(e, t, a, o) {
        var s = Dt();
        o = o === void 0 ? null : o,
        we.flags |= e,
        s.memoizedState = Gr(1 | t, Ai(), a, o)
    }
    function el(e, t, a, o) {
        var s = at();
        o = o === void 0 ? null : o;
        var f = s.memoizedState.inst;
        Ue !== null && o !== null && Jc(o, Ue.memoizedState.deps) ? s.memoizedState = Gr(t, f, a, o) : (we.flags |= e,
        s.memoizedState = Gr(1 | t, f, a, o))
    }
    function Mh(e, t) {
        Mi(8390656, 8, e, t)
    }
    function Nh(e, t) {
        el(2048, 8, e, t)
    }
    function _h(e, t) {
        return el(4, 2, e, t)
    }
    function Oh(e, t) {
        return el(4, 4, e, t)
    }
    function Dh(e, t) {
        if (typeof t == "function") {
            e = e();
            var a = t(e);
            return function() {
                typeof a == "function" ? a() : t(null)
            }
        }
        if (t != null)
            return e = e(),
            t.current = e,
            function() {
                t.current = null
            }
    }
    function jh(e, t, a) {
        a = a != null ? a.concat([e]) : null,
        el(4, 4, Dh.bind(null, t, e), a)
    }
    function uu() {}
    function kh(e, t) {
        var a = at();
        t = t === void 0 ? null : t;
        var o = a.memoizedState;
        return t !== null && Jc(t, o[1]) ? o[0] : (a.memoizedState = [e, t],
        e)
    }
    function zh(e, t) {
        var a = at();
        t = t === void 0 ? null : t;
        var o = a.memoizedState;
        if (t !== null && Jc(t, o[1]))
            return o[0];
        if (o = e(),
        tr) {
            ln(!0);
            try {
                e()
            } finally {
                ln(!1)
            }
        }
        return a.memoizedState = [o, t],
        o
    }
    function fu(e, t, a) {
        return a === void 0 || (ma & 1073741824) !== 0 ? e.memoizedState = t : (e.memoizedState = a,
        e = Up(),
        we.lanes |= e,
        xa |= e,
        a)
    }
    function Lh(e, t, a, o) {
        return Bt(a, t) ? a : Hr.current !== null ? (e = fu(e, a, o),
        Bt(e, t) || (mt = !0),
        e) : (ma & 42) === 0 ? (mt = !0,
        e.memoizedState = a) : (e = Up(),
        we.lanes |= e,
        xa |= e,
        t)
    }
    function Bh(e, t, a, o, s) {
        var f = G.p;
        G.p = f !== 0 && 8 > f ? f : 8;
        var x = _.T
          , S = {};
        _.T = S,
        hu(e, !1, t, a);
        try {
            var M = s()
              , L = _.S;
            if (L !== null && L(S, M),
            M !== null && typeof M == "object" && typeof M.then == "function") {
                var q = Lw(M, o);
                tl(e, t, q, Gt(e))
            } else
                tl(e, t, o, Gt(e))
        } catch (X) {
            tl(e, t, {
                then: function() {},
                status: "rejected",
                reason: X
            }, Gt())
        } finally {
            G.p = f,
            _.T = x
        }
    }
    function Vw() {}
    function du(e, t, a, o) {
        if (e.tag !== 5)
            throw Error(i(476));
        var s = Uh(e).queue;
        Bh(e, s, t, B, a === null ? Vw : function() {
            return Hh(e),
            a(o)
        }
        )
    }
    function Uh(e) {
        var t = e.memoizedState;
        if (t !== null)
            return t;
        t = {
            memoizedState: B,
            baseState: B,
            baseQueue: null,
            queue: {
                pending: null,
                lanes: 0,
                dispatch: null,
                lastRenderedReducer: Gn,
                lastRenderedState: B
            },
            next: null
        };
        var a = {};
        return t.next = {
            memoizedState: a,
            baseState: a,
            baseQueue: null,
            queue: {
                pending: null,
                lanes: 0,
                dispatch: null,
                lastRenderedReducer: Gn,
                lastRenderedState: a
            },
            next: null
        },
        e.memoizedState = t,
        e = e.alternate,
        e !== null && (e.memoizedState = t),
        t
    }
    function Hh(e) {
        var t = Uh(e).next.queue;
        tl(e, t, {}, Gt())
    }
    function mu() {
        return Et(bl)
    }
    function Ph() {
        return at().memoizedState
    }
    function Vh() {
        return at().memoizedState
    }
    function Gw(e) {
        for (var t = e.return; t !== null; ) {
            switch (t.tag) {
            case 24:
            case 3:
                var a = Gt();
                e = fa(a);
                var o = da(t, e, a);
                o !== null && (Yt(o, t, a),
                Qo(o, t, a)),
                t = {
                    cache: Yc()
                },
                e.payload = t;
                return
            }
            t = t.return
        }
    }
    function Yw(e, t, a) {
        var o = Gt();
        a = {
            lane: o,
            revertLane: 0,
            action: a,
            hasEagerState: !1,
            eagerState: null,
            next: null
        },
        Ni(e) ? Yh(t, a) : (a = jc(e, t, a, o),
        a !== null && (Yt(a, e, o),
        qh(a, t, o)))
    }
    function Gh(e, t, a) {
        var o = Gt();
        tl(e, t, a, o)
    }
    function tl(e, t, a, o) {
        var s = {
            lane: o,
            revertLane: 0,
            action: a,
            hasEagerState: !1,
            eagerState: null,
            next: null
        };
        if (Ni(e))
            Yh(t, s);
        else {
            var f = e.alternate;
            if (e.lanes === 0 && (f === null || f.lanes === 0) && (f = t.lastRenderedReducer,
            f !== null))
                try {
                    var x = t.lastRenderedState
                      , S = f(x, a);
                    if (s.hasEagerState = !0,
                    s.eagerState = S,
                    Bt(S, x))
                        return di(e, t, s, 0),
                        Ye === null && fi(),
                        !1
                } catch {} finally {}
            if (a = jc(e, t, s, o),
            a !== null)
                return Yt(a, e, o),
                qh(a, t, o),
                !0
        }
        return !1
    }
    function hu(e, t, a, o) {
        if (o = {
            lane: 2,
            revertLane: Xu(),
            action: o,
            hasEagerState: !1,
            eagerState: null,
            next: null
        },
        Ni(e)) {
            if (t)
                throw Error(i(479))
        } else
            t = jc(e, a, o, 2),
            t !== null && Yt(t, e, 2)
    }
    function Ni(e) {
        var t = e.alternate;
        return e === we || t !== null && t === we
    }
    function Yh(e, t) {
        Pr = Ei = !0;
        var a = e.pending;
        a === null ? t.next = t : (t.next = a.next,
        a.next = t),
        e.pending = t
    }
    function qh(e, t, a) {
        if ((a & 4194048) !== 0) {
            var o = t.lanes;
            o &= e.pendingLanes,
            a |= o,
            t.lanes = a,
            Qe(e, a)
        }
    }
    var _i = {
        readContext: Et,
        use: Ti,
        useCallback: We,
        useContext: We,
        useEffect: We,
        useImperativeHandle: We,
        useLayoutEffect: We,
        useInsertionEffect: We,
        useMemo: We,
        useReducer: We,
        useRef: We,
        useState: We,
        useDebugValue: We,
        useDeferredValue: We,
        useTransition: We,
        useSyncExternalStore: We,
        useId: We,
        useHostTransitionStatus: We,
        useFormState: We,
        useActionState: We,
        useOptimistic: We,
        useMemoCache: We,
        useCacheRefresh: We
    }
      , Ih = {
        readContext: Et,
        use: Ti,
        useCallback: function(e, t) {
            return Dt().memoizedState = [e, t === void 0 ? null : t],
            e
        },
        useContext: Et,
        useEffect: Mh,
        useImperativeHandle: function(e, t, a) {
            a = a != null ? a.concat([e]) : null,
            Mi(4194308, 4, Dh.bind(null, t, e), a)
        },
        useLayoutEffect: function(e, t) {
            return Mi(4194308, 4, e, t)
        },
        useInsertionEffect: function(e, t) {
            Mi(4, 2, e, t)
        },
        useMemo: function(e, t) {
            var a = Dt();
            t = t === void 0 ? null : t;
            var o = e();
            if (tr) {
                ln(!0);
                try {
                    e()
                } finally {
                    ln(!1)
                }
            }
            return a.memoizedState = [o, t],
            o
        },
        useReducer: function(e, t, a) {
            var o = Dt();
            if (a !== void 0) {
                var s = a(t);
                if (tr) {
                    ln(!0);
                    try {
                        a(t)
                    } finally {
                        ln(!1)
                    }
                }
            } else
                s = t;
            return o.memoizedState = o.baseState = s,
            e = {
                pending: null,
                lanes: 0,
                dispatch: null,
                lastRenderedReducer: e,
                lastRenderedState: s
            },
            o.queue = e,
            e = e.dispatch = Yw.bind(null, we, e),
            [o.memoizedState, e]
        },
        useRef: function(e) {
            var t = Dt();
            return e = {
                current: e
            },
            t.memoizedState = e
        },
        useState: function(e) {
            e = su(e);
            var t = e.queue
              , a = Gh.bind(null, we, t);
            return t.dispatch = a,
            [e.memoizedState, a]
        },
        useDebugValue: uu,
        useDeferredValue: function(e, t) {
            var a = Dt();
            return fu(a, e, t)
        },
        useTransition: function() {
            var e = su(!1);
            return e = Bh.bind(null, we, e.queue, !0, !1),
            Dt().memoizedState = e,
            [!1, e]
        },
        useSyncExternalStore: function(e, t, a) {
            var o = we
              , s = Dt();
            if (ze) {
                if (a === void 0)
                    throw Error(i(407));
                a = a()
            } else {
                if (a = t(),
                Ye === null)
                    throw Error(i(349));
                (je & 124) !== 0 || dh(o, t, a)
            }
            s.memoizedState = a;
            var f = {
                value: a,
                getSnapshot: t
            };
            return s.queue = f,
            Mh(hh.bind(null, o, f, e), [e]),
            o.flags |= 2048,
            Gr(9, Ai(), mh.bind(null, o, f, a, t), null),
            a
        },
        useId: function() {
            var e = Dt()
              , t = Ye.identifierPrefix;
            if (ze) {
                var a = Hn
                  , o = Un;
                a = (o & ~(1 << 32 - yt(o) - 1)).toString(32) + a,
                t = "«" + t + "R" + a,
                a = Ci++,
                0 < a && (t += "H" + a.toString(32)),
                t += "»"
            } else
                a = Bw++,
                t = "«" + t + "r" + a.toString(32) + "»";
            return e.memoizedState = t
        },
        useHostTransitionStatus: mu,
        useFormState: Eh,
        useActionState: Eh,
        useOptimistic: function(e) {
            var t = Dt();
            t.memoizedState = t.baseState = e;
            var a = {
                pending: null,
                lanes: 0,
                dispatch: null,
                lastRenderedReducer: null,
                lastRenderedState: null
            };
            return t.queue = a,
            t = hu.bind(null, we, !0, a),
            a.dispatch = t,
            [e, t]
        },
        useMemoCache: ou,
        useCacheRefresh: function() {
            return Dt().memoizedState = Gw.bind(null, we)
        }
    }
      , Xh = {
        readContext: Et,
        use: Ti,
        useCallback: kh,
        useContext: Et,
        useEffect: Nh,
        useImperativeHandle: jh,
        useInsertionEffect: _h,
        useLayoutEffect: Oh,
        useMemo: zh,
        useReducer: Ri,
        useRef: Ah,
        useState: function() {
            return Ri(Gn)
        },
        useDebugValue: uu,
        useDeferredValue: function(e, t) {
            var a = at();
            return Lh(a, Ue.memoizedState, e, t)
        },
        useTransition: function() {
            var e = Ri(Gn)[0]
              , t = at().memoizedState;
            return [typeof e == "boolean" ? e : Jo(e), t]
        },
        useSyncExternalStore: fh,
        useId: Ph,
        useHostTransitionStatus: mu,
        useFormState: Ch,
        useActionState: Ch,
        useOptimistic: function(e, t) {
            var a = at();
            return vh(a, Ue, e, t)
        },
        useMemoCache: ou,
        useCacheRefresh: Vh
    }
      , qw = {
        readContext: Et,
        use: Ti,
        useCallback: kh,
        useContext: Et,
        useEffect: Nh,
        useImperativeHandle: jh,
        useInsertionEffect: _h,
        useLayoutEffect: Oh,
        useMemo: zh,
        useReducer: iu,
        useRef: Ah,
        useState: function() {
            return iu(Gn)
        },
        useDebugValue: uu,
        useDeferredValue: function(e, t) {
            var a = at();
            return Ue === null ? fu(a, e, t) : Lh(a, Ue.memoizedState, e, t)
        },
        useTransition: function() {
            var e = iu(Gn)[0]
              , t = at().memoizedState;
            return [typeof e == "boolean" ? e : Jo(e), t]
        },
        useSyncExternalStore: fh,
        useId: Ph,
        useHostTransitionStatus: mu,
        useFormState: Rh,
        useActionState: Rh,
        useOptimistic: function(e, t) {
            var a = at();
            return Ue !== null ? vh(a, Ue, e, t) : (a.baseState = e,
            [e, a.queue.dispatch])
        },
        useMemoCache: ou,
        useCacheRefresh: Vh
    }
      , Yr = null
      , nl = 0;
    function Oi(e) {
        var t = nl;
        return nl += 1,
        Yr === null && (Yr = []),
        ah(Yr, e, t)
    }
    function al(e, t) {
        t = t.props.ref,
        e.ref = t !== void 0 ? t : null
    }
    function Di(e, t) {
        throw t.$$typeof === v ? Error(i(525)) : (e = Object.prototype.toString.call(t),
        Error(i(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e)))
    }
    function $h(e) {
        var t = e._init;
        return t(e._payload)
    }
    function Kh(e) {
        function t(k, O) {
            if (e) {
                var z = k.deletions;
                z === null ? (k.deletions = [O],
                k.flags |= 16) : z.push(O)
            }
        }
        function a(k, O) {
            if (!e)
                return null;
            for (; O !== null; )
                t(k, O),
                O = O.sibling;
            return null
        }
        function o(k) {
            for (var O = new Map; k !== null; )
                k.key !== null ? O.set(k.key, k) : O.set(k.index, k),
                k = k.sibling;
            return O
        }
        function s(k, O) {
            return k = Bn(k, O),
            k.index = 0,
            k.sibling = null,
            k
        }
        function f(k, O, z) {
            return k.index = z,
            e ? (z = k.alternate,
            z !== null ? (z = z.index,
            z < O ? (k.flags |= 67108866,
            O) : z) : (k.flags |= 67108866,
            O)) : (k.flags |= 1048576,
            O)
        }
        function x(k) {
            return e && k.alternate === null && (k.flags |= 67108866),
            k
        }
        function S(k, O, z, I) {
            return O === null || O.tag !== 6 ? (O = zc(z, k.mode, I),
            O.return = k,
            O) : (O = s(O, z),
            O.return = k,
            O)
        }
        function M(k, O, z, I) {
            var ae = z.type;
            return ae === R ? q(k, O, z.props.children, I, z.key) : O !== null && (O.elementType === ae || typeof ae == "object" && ae !== null && ae.$$typeof === V && $h(ae) === O.type) ? (O = s(O, z.props),
            al(O, z),
            O.return = k,
            O) : (O = hi(z.type, z.key, z.props, null, k.mode, I),
            al(O, z),
            O.return = k,
            O)
        }
        function L(k, O, z, I) {
            return O === null || O.tag !== 4 || O.stateNode.containerInfo !== z.containerInfo || O.stateNode.implementation !== z.implementation ? (O = Lc(z, k.mode, I),
            O.return = k,
            O) : (O = s(O, z.children || []),
            O.return = k,
            O)
        }
        function q(k, O, z, I, ae) {
            return O === null || O.tag !== 7 ? (O = $a(z, k.mode, I, ae),
            O.return = k,
            O) : (O = s(O, z),
            O.return = k,
            O)
        }
        function X(k, O, z) {
            if (typeof O == "string" && O !== "" || typeof O == "number" || typeof O == "bigint")
                return O = zc("" + O, k.mode, z),
                O.return = k,
                O;
            if (typeof O == "object" && O !== null) {
                switch (O.$$typeof) {
                case w:
                    return z = hi(O.type, O.key, O.props, null, k.mode, z),
                    al(z, O),
                    z.return = k,
                    z;
                case C:
                    return O = Lc(O, k.mode, z),
                    O.return = k,
                    O;
                case V:
                    var I = O._init;
                    return O = I(O._payload),
                    X(k, O, z)
                }
                if (de(O) || W(O))
                    return O = $a(O, k.mode, z, null),
                    O.return = k,
                    O;
                if (typeof O.then == "function")
                    return X(k, Oi(O), z);
                if (O.$$typeof === N)
                    return X(k, yi(k, O), z);
                Di(k, O)
            }
            return null
        }
        function H(k, O, z, I) {
            var ae = O !== null ? O.key : null;
            if (typeof z == "string" && z !== "" || typeof z == "number" || typeof z == "bigint")
                return ae !== null ? null : S(k, O, "" + z, I);
            if (typeof z == "object" && z !== null) {
                switch (z.$$typeof) {
                case w:
                    return z.key === ae ? M(k, O, z, I) : null;
                case C:
                    return z.key === ae ? L(k, O, z, I) : null;
                case V:
                    return ae = z._init,
                    z = ae(z._payload),
                    H(k, O, z, I)
                }
                if (de(z) || W(z))
                    return ae !== null ? null : q(k, O, z, I, null);
                if (typeof z.then == "function")
                    return H(k, O, Oi(z), I);
                if (z.$$typeof === N)
                    return H(k, O, yi(k, z), I);
                Di(k, z)
            }
            return null
        }
        function P(k, O, z, I, ae) {
            if (typeof I == "string" && I !== "" || typeof I == "number" || typeof I == "bigint")
                return k = k.get(z) || null,
                S(O, k, "" + I, ae);
            if (typeof I == "object" && I !== null) {
                switch (I.$$typeof) {
                case w:
                    return k = k.get(I.key === null ? z : I.key) || null,
                    M(O, k, I, ae);
                case C:
                    return k = k.get(I.key === null ? z : I.key) || null,
                    L(O, k, I, ae);
                case V:
                    var Te = I._init;
                    return I = Te(I._payload),
                    P(k, O, z, I, ae)
                }
                if (de(I) || W(I))
                    return k = k.get(z) || null,
                    q(O, k, I, ae, null);
                if (typeof I.then == "function")
                    return P(k, O, z, Oi(I), ae);
                if (I.$$typeof === N)
                    return P(k, O, z, yi(O, I), ae);
                Di(O, I)
            }
            return null
        }
        function ge(k, O, z, I) {
            for (var ae = null, Te = null, fe = O, he = O = 0, pt = null; fe !== null && he < z.length; he++) {
                fe.index > he ? (pt = fe,
                fe = null) : pt = fe.sibling;
                var ke = H(k, fe, z[he], I);
                if (ke === null) {
                    fe === null && (fe = pt);
                    break
                }
                e && fe && ke.alternate === null && t(k, fe),
                O = f(ke, O, he),
                Te === null ? ae = ke : Te.sibling = ke,
                Te = ke,
                fe = pt
            }
            if (he === z.length)
                return a(k, fe),
                ze && Qa(k, he),
                ae;
            if (fe === null) {
                for (; he < z.length; he++)
                    fe = X(k, z[he], I),
                    fe !== null && (O = f(fe, O, he),
                    Te === null ? ae = fe : Te.sibling = fe,
                    Te = fe);
                return ze && Qa(k, he),
                ae
            }
            for (fe = o(fe); he < z.length; he++)
                pt = P(fe, k, he, z[he], I),
                pt !== null && (e && pt.alternate !== null && fe.delete(pt.key === null ? he : pt.key),
                O = f(pt, O, he),
                Te === null ? ae = pt : Te.sibling = pt,
                Te = pt);
            return e && fe.forEach(function(Na) {
                return t(k, Na)
            }),
            ze && Qa(k, he),
            ae
        }
        function me(k, O, z, I) {
            if (z == null)
                throw Error(i(151));
            for (var ae = null, Te = null, fe = O, he = O = 0, pt = null, ke = z.next(); fe !== null && !ke.done; he++,
            ke = z.next()) {
                fe.index > he ? (pt = fe,
                fe = null) : pt = fe.sibling;
                var Na = H(k, fe, ke.value, I);
                if (Na === null) {
                    fe === null && (fe = pt);
                    break
                }
                e && fe && Na.alternate === null && t(k, fe),
                O = f(Na, O, he),
                Te === null ? ae = Na : Te.sibling = Na,
                Te = Na,
                fe = pt
            }
            if (ke.done)
                return a(k, fe),
                ze && Qa(k, he),
                ae;
            if (fe === null) {
                for (; !ke.done; he++,
                ke = z.next())
                    ke = X(k, ke.value, I),
                    ke !== null && (O = f(ke, O, he),
                    Te === null ? ae = ke : Te.sibling = ke,
                    Te = ke);
                return ze && Qa(k, he),
                ae
            }
            for (fe = o(fe); !ke.done; he++,
            ke = z.next())
                ke = P(fe, k, he, ke.value, I),
                ke !== null && (e && ke.alternate !== null && fe.delete(ke.key === null ? he : ke.key),
                O = f(ke, O, he),
                Te === null ? ae = ke : Te.sibling = ke,
                Te = ke);
            return e && fe.forEach(function(IS) {
                return t(k, IS)
            }),
            ze && Qa(k, he),
            ae
        }
        function Pe(k, O, z, I) {
            if (typeof z == "object" && z !== null && z.type === R && z.key === null && (z = z.props.children),
            typeof z == "object" && z !== null) {
                switch (z.$$typeof) {
                case w:
                    e: {
                        for (var ae = z.key; O !== null; ) {
                            if (O.key === ae) {
                                if (ae = z.type,
                                ae === R) {
                                    if (O.tag === 7) {
                                        a(k, O.sibling),
                                        I = s(O, z.props.children),
                                        I.return = k,
                                        k = I;
                                        break e
                                    }
                                } else if (O.elementType === ae || typeof ae == "object" && ae !== null && ae.$$typeof === V && $h(ae) === O.type) {
                                    a(k, O.sibling),
                                    I = s(O, z.props),
                                    al(I, z),
                                    I.return = k,
                                    k = I;
                                    break e
                                }
                                a(k, O);
                                break
                            } else
                                t(k, O);
                            O = O.sibling
                        }
                        z.type === R ? (I = $a(z.props.children, k.mode, I, z.key),
                        I.return = k,
                        k = I) : (I = hi(z.type, z.key, z.props, null, k.mode, I),
                        al(I, z),
                        I.return = k,
                        k = I)
                    }
                    return x(k);
                case C:
                    e: {
                        for (ae = z.key; O !== null; ) {
                            if (O.key === ae)
                                if (O.tag === 4 && O.stateNode.containerInfo === z.containerInfo && O.stateNode.implementation === z.implementation) {
                                    a(k, O.sibling),
                                    I = s(O, z.children || []),
                                    I.return = k,
                                    k = I;
                                    break e
                                } else {
                                    a(k, O);
                                    break
                                }
                            else
                                t(k, O);
                            O = O.sibling
                        }
                        I = Lc(z, k.mode, I),
                        I.return = k,
                        k = I
                    }
                    return x(k);
                case V:
                    return ae = z._init,
                    z = ae(z._payload),
                    Pe(k, O, z, I)
                }
                if (de(z))
                    return ge(k, O, z, I);
                if (W(z)) {
                    if (ae = W(z),
                    typeof ae != "function")
                        throw Error(i(150));
                    return z = ae.call(z),
                    me(k, O, z, I)
                }
                if (typeof z.then == "function")
                    return Pe(k, O, Oi(z), I);
                if (z.$$typeof === N)
                    return Pe(k, O, yi(k, z), I);
                Di(k, z)
            }
            return typeof z == "string" && z !== "" || typeof z == "number" || typeof z == "bigint" ? (z = "" + z,
            O !== null && O.tag === 6 ? (a(k, O.sibling),
            I = s(O, z),
            I.return = k,
            k = I) : (a(k, O),
            I = zc(z, k.mode, I),
            I.return = k,
            k = I),
            x(k)) : a(k, O)
        }
        return function(k, O, z, I) {
            try {
                nl = 0;
                var ae = Pe(k, O, z, I);
                return Yr = null,
                ae
            } catch (fe) {
                if (fe === $o || fe === xi)
                    throw fe;
                var Te = Ut(29, fe, null, k.mode);
                return Te.lanes = I,
                Te.return = k,
                Te
            } finally {}
        }
    }
    var qr = Kh(!0)
      , Qh = Kh(!1)
      , en = be(null)
      , bn = null;
    function ha(e) {
        var t = e.alternate;
        J(lt, lt.current & 1),
        J(en, e),
        bn === null && (t === null || Hr.current !== null || t.memoizedState !== null) && (bn = e)
    }
    function Zh(e) {
        if (e.tag === 22) {
            if (J(lt, lt.current),
            J(en, e),
            bn === null) {
                var t = e.alternate;
                t !== null && t.memoizedState !== null && (bn = e)
            }
        } else
            pa()
    }
    function pa() {
        J(lt, lt.current),
        J(en, en.current)
    }
    function Yn(e) {
        ve(en),
        bn === e && (bn = null),
        ve(lt)
    }
    var lt = be(0);
    function ji(e) {
        for (var t = e; t !== null; ) {
            if (t.tag === 13) {
                var a = t.memoizedState;
                if (a !== null && (a = a.dehydrated,
                a === null || a.data === "$?" || rf(a)))
                    return t
            } else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) {
                if ((t.flags & 128) !== 0)
                    return t
            } else if (t.child !== null) {
                t.child.return = t,
                t = t.child;
                continue
            }
            if (t === e)
                break;
            for (; t.sibling === null; ) {
                if (t.return === null || t.return === e)
                    return null;
                t = t.return
            }
            t.sibling.return = t.return,
            t = t.sibling
        }
        return null
    }
    function pu(e, t, a, o) {
        t = e.memoizedState,
        a = a(o, t),
        a = a == null ? t : b({}, t, a),
        e.memoizedState = a,
        e.lanes === 0 && (e.updateQueue.baseState = a)
    }
    var gu = {
        enqueueSetState: function(e, t, a) {
            e = e._reactInternals;
            var o = Gt()
              , s = fa(o);
            s.payload = t,
            a != null && (s.callback = a),
            t = da(e, s, o),
            t !== null && (Yt(t, e, o),
            Qo(t, e, o))
        },
        enqueueReplaceState: function(e, t, a) {
            e = e._reactInternals;
            var o = Gt()
              , s = fa(o);
            s.tag = 1,
            s.payload = t,
            a != null && (s.callback = a),
            t = da(e, s, o),
            t !== null && (Yt(t, e, o),
            Qo(t, e, o))
        },
        enqueueForceUpdate: function(e, t) {
            e = e._reactInternals;
            var a = Gt()
              , o = fa(a);
            o.tag = 2,
            t != null && (o.callback = t),
            t = da(e, o, a),
            t !== null && (Yt(t, e, a),
            Qo(t, e, a))
        }
    };
    function Fh(e, t, a, o, s, f, x) {
        return e = e.stateNode,
        typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(o, f, x) : t.prototype && t.prototype.isPureReactComponent ? !Ho(a, o) || !Ho(s, f) : !0
    }
    function Wh(e, t, a, o) {
        e = t.state,
        typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(a, o),
        typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(a, o),
        t.state !== e && gu.enqueueReplaceState(t, t.state, null)
    }
    function nr(e, t) {
        var a = t;
        if ("ref"in t) {
            a = {};
            for (var o in t)
                o !== "ref" && (a[o] = t[o])
        }
        if (e = e.defaultProps) {
            a === t && (a = b({}, a));
            for (var s in e)
                a[s] === void 0 && (a[s] = e[s])
        }
        return a
    }
    var ki = typeof reportError == "function" ? reportError : function(e) {
        if (typeof window == "object" && typeof window.ErrorEvent == "function") {
            var t = new window.ErrorEvent("error",{
                bubbles: !0,
                cancelable: !0,
                message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
                error: e
            });
            if (!window.dispatchEvent(t))
                return
        } else if (typeof process == "object" && typeof process.emit == "function") {
            process.emit("uncaughtException", e);
            return
        }
        console.error(e)
    }
    ;
    function Jh(e) {
        ki(e)
    }
    function ep(e) {
        console.error(e)
    }
    function tp(e) {
        ki(e)
    }
    function zi(e, t) {
        try {
            var a = e.onUncaughtError;
            a(t.value, {
                componentStack: t.stack
            })
        } catch (o) {
            setTimeout(function() {
                throw o
            })
        }
    }
    function np(e, t, a) {
        try {
            var o = e.onCaughtError;
            o(a.value, {
                componentStack: a.stack,
                errorBoundary: t.tag === 1 ? t.stateNode : null
            })
        } catch (s) {
            setTimeout(function() {
                throw s
            })
        }
    }
    function vu(e, t, a) {
        return a = fa(a),
        a.tag = 3,
        a.payload = {
            element: null
        },
        a.callback = function() {
            zi(e, t)
        }
        ,
        a
    }
    function ap(e) {
        return e = fa(e),
        e.tag = 3,
        e
    }
    function rp(e, t, a, o) {
        var s = a.type.getDerivedStateFromError;
        if (typeof s == "function") {
            var f = o.value;
            e.payload = function() {
                return s(f)
            }
            ,
            e.callback = function() {
                np(t, a, o)
            }
        }
        var x = a.stateNode;
        x !== null && typeof x.componentDidCatch == "function" && (e.callback = function() {
            np(t, a, o),
            typeof s != "function" && (wa === null ? wa = new Set([this]) : wa.add(this));
            var S = o.stack;
            this.componentDidCatch(o.value, {
                componentStack: S !== null ? S : ""
            })
        }
        )
    }
    function Iw(e, t, a, o, s) {
        if (a.flags |= 32768,
        o !== null && typeof o == "object" && typeof o.then == "function") {
            if (t = a.alternate,
            t !== null && qo(t, a, s, !0),
            a = en.current,
            a !== null) {
                switch (a.tag) {
                case 13:
                    return bn === null ? Vu() : a.alternate === null && Ke === 0 && (Ke = 3),
                    a.flags &= -257,
                    a.flags |= 65536,
                    a.lanes = s,
                    o === Xc ? a.flags |= 16384 : (t = a.updateQueue,
                    t === null ? a.updateQueue = new Set([o]) : t.add(o),
                    Yu(e, o, s)),
                    !1;
                case 22:
                    return a.flags |= 65536,
                    o === Xc ? a.flags |= 16384 : (t = a.updateQueue,
                    t === null ? (t = {
                        transitions: null,
                        markerInstances: null,
                        retryQueue: new Set([o])
                    },
                    a.updateQueue = t) : (a = t.retryQueue,
                    a === null ? t.retryQueue = new Set([o]) : a.add(o)),
                    Yu(e, o, s)),
                    !1
                }
                throw Error(i(435, a.tag))
            }
            return Yu(e, o, s),
            Vu(),
            !1
        }
        if (ze)
            return t = en.current,
            t !== null ? ((t.flags & 65536) === 0 && (t.flags |= 256),
            t.flags |= 65536,
            t.lanes = s,
            o !== Hc && (e = Error(i(422), {
                cause: o
            }),
            Yo(Zt(e, a)))) : (o !== Hc && (t = Error(i(423), {
                cause: o
            }),
            Yo(Zt(t, a))),
            e = e.current.alternate,
            e.flags |= 65536,
            s &= -s,
            e.lanes |= s,
            o = Zt(o, a),
            s = vu(e.stateNode, o, s),
            Qc(e, s),
            Ke !== 4 && (Ke = 2)),
            !1;
        var f = Error(i(520), {
            cause: o
        });
        if (f = Zt(f, a),
        ul === null ? ul = [f] : ul.push(f),
        Ke !== 4 && (Ke = 2),
        t === null)
            return !0;
        o = Zt(o, a),
        a = t;
        do {
            switch (a.tag) {
            case 3:
                return a.flags |= 65536,
                e = s & -s,
                a.lanes |= e,
                e = vu(a.stateNode, o, e),
                Qc(a, e),
                !1;
            case 1:
                if (t = a.type,
                f = a.stateNode,
                (a.flags & 128) === 0 && (typeof t.getDerivedStateFromError == "function" || f !== null && typeof f.componentDidCatch == "function" && (wa === null || !wa.has(f))))
                    return a.flags |= 65536,
                    s &= -s,
                    a.lanes |= s,
                    s = ap(s),
                    rp(s, e, a, o),
                    Qc(a, s),
                    !1
            }
            a = a.return
        } while (a !== null);
        return !1
    }
    var op = Error(i(461))
      , mt = !1;
    function xt(e, t, a, o) {
        t.child = e === null ? Qh(t, null, a, o) : qr(t, e.child, a, o)
    }
    function lp(e, t, a, o, s) {
        a = a.render;
        var f = t.ref;
        if ("ref"in o) {
            var x = {};
            for (var S in o)
                S !== "ref" && (x[S] = o[S])
        } else
            x = o;
        return Ja(t),
        o = eu(e, t, a, x, f, s),
        S = tu(),
        e !== null && !mt ? (nu(e, t, s),
        qn(e, t, s)) : (ze && S && Bc(t),
        t.flags |= 1,
        xt(e, t, o, s),
        t.child)
    }
    function ip(e, t, a, o, s) {
        if (e === null) {
            var f = a.type;
            return typeof f == "function" && !kc(f) && f.defaultProps === void 0 && a.compare === null ? (t.tag = 15,
            t.type = f,
            sp(e, t, f, o, s)) : (e = hi(a.type, null, o, t, t.mode, s),
            e.ref = t.ref,
            e.return = t,
            t.child = e)
        }
        if (f = e.child,
        !Tu(e, s)) {
            var x = f.memoizedProps;
            if (a = a.compare,
            a = a !== null ? a : Ho,
            a(x, o) && e.ref === t.ref)
                return qn(e, t, s)
        }
        return t.flags |= 1,
        e = Bn(f, o),
        e.ref = t.ref,
        e.return = t,
        t.child = e
    }
    function sp(e, t, a, o, s) {
        if (e !== null) {
            var f = e.memoizedProps;
            if (Ho(f, o) && e.ref === t.ref)
                if (mt = !1,
                t.pendingProps = o = f,
                Tu(e, s))
                    (e.flags & 131072) !== 0 && (mt = !0);
                else
                    return t.lanes = e.lanes,
                    qn(e, t, s)
        }
        return yu(e, t, a, o, s)
    }
    function cp(e, t, a) {
        var o = t.pendingProps
          , s = o.children
          , f = e !== null ? e.memoizedState : null;
        if (o.mode === "hidden") {
            if ((t.flags & 128) !== 0) {
                if (o = f !== null ? f.baseLanes | a : a,
                e !== null) {
                    for (s = t.child = e.child,
                    f = 0; s !== null; )
                        f = f | s.lanes | s.childLanes,
                        s = s.sibling;
                    t.childLanes = f & ~o
                } else
                    t.childLanes = 0,
                    t.child = null;
                return up(e, t, o, a)
            }
            if ((a & 536870912) !== 0)
                t.memoizedState = {
                    baseLanes: 0,
                    cachePool: null
                },
                e !== null && bi(t, f !== null ? f.cachePool : null),
                f !== null ? sh(t, f) : Fc(),
                Zh(t);
            else
                return t.lanes = t.childLanes = 536870912,
                up(e, t, f !== null ? f.baseLanes | a : a, a)
        } else
            f !== null ? (bi(t, f.cachePool),
            sh(t, f),
            pa(),
            t.memoizedState = null) : (e !== null && bi(t, null),
            Fc(),
            pa());
        return xt(e, t, s, a),
        t.child
    }
    function up(e, t, a, o) {
        var s = Ic();
        return s = s === null ? null : {
            parent: ot._currentValue,
            pool: s
        },
        t.memoizedState = {
            baseLanes: a,
            cachePool: s
        },
        e !== null && bi(t, null),
        Fc(),
        Zh(t),
        e !== null && qo(e, t, o, !0),
        null
    }
    function Li(e, t) {
        var a = t.ref;
        if (a === null)
            e !== null && e.ref !== null && (t.flags |= 4194816);
        else {
            if (typeof a != "function" && typeof a != "object")
                throw Error(i(284));
            (e === null || e.ref !== a) && (t.flags |= 4194816)
        }
    }
    function yu(e, t, a, o, s) {
        return Ja(t),
        a = eu(e, t, a, o, void 0, s),
        o = tu(),
        e !== null && !mt ? (nu(e, t, s),
        qn(e, t, s)) : (ze && o && Bc(t),
        t.flags |= 1,
        xt(e, t, a, s),
        t.child)
    }
    function fp(e, t, a, o, s, f) {
        return Ja(t),
        t.updateQueue = null,
        a = uh(t, o, a, s),
        ch(e),
        o = tu(),
        e !== null && !mt ? (nu(e, t, f),
        qn(e, t, f)) : (ze && o && Bc(t),
        t.flags |= 1,
        xt(e, t, a, f),
        t.child)
    }
    function dp(e, t, a, o, s) {
        if (Ja(t),
        t.stateNode === null) {
            var f = kr
              , x = a.contextType;
            typeof x == "object" && x !== null && (f = Et(x)),
            f = new a(o,f),
            t.memoizedState = f.state !== null && f.state !== void 0 ? f.state : null,
            f.updater = gu,
            t.stateNode = f,
            f._reactInternals = t,
            f = t.stateNode,
            f.props = o,
            f.state = t.memoizedState,
            f.refs = {},
            $c(t),
            x = a.contextType,
            f.context = typeof x == "object" && x !== null ? Et(x) : kr,
            f.state = t.memoizedState,
            x = a.getDerivedStateFromProps,
            typeof x == "function" && (pu(t, a, x, o),
            f.state = t.memoizedState),
            typeof a.getDerivedStateFromProps == "function" || typeof f.getSnapshotBeforeUpdate == "function" || typeof f.UNSAFE_componentWillMount != "function" && typeof f.componentWillMount != "function" || (x = f.state,
            typeof f.componentWillMount == "function" && f.componentWillMount(),
            typeof f.UNSAFE_componentWillMount == "function" && f.UNSAFE_componentWillMount(),
            x !== f.state && gu.enqueueReplaceState(f, f.state, null),
            Fo(t, o, f, s),
            Zo(),
            f.state = t.memoizedState),
            typeof f.componentDidMount == "function" && (t.flags |= 4194308),
            o = !0
        } else if (e === null) {
            f = t.stateNode;
            var S = t.memoizedProps
              , M = nr(a, S);
            f.props = M;
            var L = f.context
              , q = a.contextType;
            x = kr,
            typeof q == "object" && q !== null && (x = Et(q));
            var X = a.getDerivedStateFromProps;
            q = typeof X == "function" || typeof f.getSnapshotBeforeUpdate == "function",
            S = t.pendingProps !== S,
            q || typeof f.UNSAFE_componentWillReceiveProps != "function" && typeof f.componentWillReceiveProps != "function" || (S || L !== x) && Wh(t, f, o, x),
            ua = !1;
            var H = t.memoizedState;
            f.state = H,
            Fo(t, o, f, s),
            Zo(),
            L = t.memoizedState,
            S || H !== L || ua ? (typeof X == "function" && (pu(t, a, X, o),
            L = t.memoizedState),
            (M = ua || Fh(t, a, M, o, H, L, x)) ? (q || typeof f.UNSAFE_componentWillMount != "function" && typeof f.componentWillMount != "function" || (typeof f.componentWillMount == "function" && f.componentWillMount(),
            typeof f.UNSAFE_componentWillMount == "function" && f.UNSAFE_componentWillMount()),
            typeof f.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof f.componentDidMount == "function" && (t.flags |= 4194308),
            t.memoizedProps = o,
            t.memoizedState = L),
            f.props = o,
            f.state = L,
            f.context = x,
            o = M) : (typeof f.componentDidMount == "function" && (t.flags |= 4194308),
            o = !1)
        } else {
            f = t.stateNode,
            Kc(e, t),
            x = t.memoizedProps,
            q = nr(a, x),
            f.props = q,
            X = t.pendingProps,
            H = f.context,
            L = a.contextType,
            M = kr,
            typeof L == "object" && L !== null && (M = Et(L)),
            S = a.getDerivedStateFromProps,
            (L = typeof S == "function" || typeof f.getSnapshotBeforeUpdate == "function") || typeof f.UNSAFE_componentWillReceiveProps != "function" && typeof f.componentWillReceiveProps != "function" || (x !== X || H !== M) && Wh(t, f, o, M),
            ua = !1,
            H = t.memoizedState,
            f.state = H,
            Fo(t, o, f, s),
            Zo();
            var P = t.memoizedState;
            x !== X || H !== P || ua || e !== null && e.dependencies !== null && vi(e.dependencies) ? (typeof S == "function" && (pu(t, a, S, o),
            P = t.memoizedState),
            (q = ua || Fh(t, a, q, o, H, P, M) || e !== null && e.dependencies !== null && vi(e.dependencies)) ? (L || typeof f.UNSAFE_componentWillUpdate != "function" && typeof f.componentWillUpdate != "function" || (typeof f.componentWillUpdate == "function" && f.componentWillUpdate(o, P, M),
            typeof f.UNSAFE_componentWillUpdate == "function" && f.UNSAFE_componentWillUpdate(o, P, M)),
            typeof f.componentDidUpdate == "function" && (t.flags |= 4),
            typeof f.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof f.componentDidUpdate != "function" || x === e.memoizedProps && H === e.memoizedState || (t.flags |= 4),
            typeof f.getSnapshotBeforeUpdate != "function" || x === e.memoizedProps && H === e.memoizedState || (t.flags |= 1024),
            t.memoizedProps = o,
            t.memoizedState = P),
            f.props = o,
            f.state = P,
            f.context = M,
            o = q) : (typeof f.componentDidUpdate != "function" || x === e.memoizedProps && H === e.memoizedState || (t.flags |= 4),
            typeof f.getSnapshotBeforeUpdate != "function" || x === e.memoizedProps && H === e.memoizedState || (t.flags |= 1024),
            o = !1)
        }
        return f = o,
        Li(e, t),
        o = (t.flags & 128) !== 0,
        f || o ? (f = t.stateNode,
        a = o && typeof a.getDerivedStateFromError != "function" ? null : f.render(),
        t.flags |= 1,
        e !== null && o ? (t.child = qr(t, e.child, null, s),
        t.child = qr(t, null, a, s)) : xt(e, t, a, s),
        t.memoizedState = f.state,
        e = t.child) : e = qn(e, t, s),
        e
    }
    function mp(e, t, a, o) {
        return Go(),
        t.flags |= 256,
        xt(e, t, a, o),
        t.child
    }
    var bu = {
        dehydrated: null,
        treeContext: null,
        retryLane: 0,
        hydrationErrors: null
    };
    function xu(e) {
        return {
            baseLanes: e,
            cachePool: eh()
        }
    }
    function wu(e, t, a) {
        return e = e !== null ? e.childLanes & ~a : 0,
        t && (e |= tn),
        e
    }
    function hp(e, t, a) {
        var o = t.pendingProps, s = !1, f = (t.flags & 128) !== 0, x;
        if ((x = f) || (x = e !== null && e.memoizedState === null ? !1 : (lt.current & 2) !== 0),
        x && (s = !0,
        t.flags &= -129),
        x = (t.flags & 32) !== 0,
        t.flags &= -33,
        e === null) {
            if (ze) {
                if (s ? ha(t) : pa(),
                ze) {
                    var S = $e, M;
                    if (M = S) {
                        e: {
                            for (M = S,
                            S = yn; M.nodeType !== 8; ) {
                                if (!S) {
                                    S = null;
                                    break e
                                }
                                if (M = fn(M.nextSibling),
                                M === null) {
                                    S = null;
                                    break e
                                }
                            }
                            S = M
                        }
                        S !== null ? (t.memoizedState = {
                            dehydrated: S,
                            treeContext: Ka !== null ? {
                                id: Un,
                                overflow: Hn
                            } : null,
                            retryLane: 536870912,
                            hydrationErrors: null
                        },
                        M = Ut(18, null, null, 0),
                        M.stateNode = S,
                        M.return = t,
                        t.child = M,
                        Mt = t,
                        $e = null,
                        M = !0) : M = !1
                    }
                    M || Fa(t)
                }
                if (S = t.memoizedState,
                S !== null && (S = S.dehydrated,
                S !== null))
                    return rf(S) ? t.lanes = 32 : t.lanes = 536870912,
                    null;
                Yn(t)
            }
            return S = o.children,
            o = o.fallback,
            s ? (pa(),
            s = t.mode,
            S = Bi({
                mode: "hidden",
                children: S
            }, s),
            o = $a(o, s, a, null),
            S.return = t,
            o.return = t,
            S.sibling = o,
            t.child = S,
            s = t.child,
            s.memoizedState = xu(a),
            s.childLanes = wu(e, x, a),
            t.memoizedState = bu,
            o) : (ha(t),
            Su(t, S))
        }
        if (M = e.memoizedState,
        M !== null && (S = M.dehydrated,
        S !== null)) {
            if (f)
                t.flags & 256 ? (ha(t),
                t.flags &= -257,
                t = Eu(e, t, a)) : t.memoizedState !== null ? (pa(),
                t.child = e.child,
                t.flags |= 128,
                t = null) : (pa(),
                s = o.fallback,
                S = t.mode,
                o = Bi({
                    mode: "visible",
                    children: o.children
                }, S),
                s = $a(s, S, a, null),
                s.flags |= 2,
                o.return = t,
                s.return = t,
                o.sibling = s,
                t.child = o,
                qr(t, e.child, null, a),
                o = t.child,
                o.memoizedState = xu(a),
                o.childLanes = wu(e, x, a),
                t.memoizedState = bu,
                t = s);
            else if (ha(t),
            rf(S)) {
                if (x = S.nextSibling && S.nextSibling.dataset,
                x)
                    var L = x.dgst;
                x = L,
                o = Error(i(419)),
                o.stack = "",
                o.digest = x,
                Yo({
                    value: o,
                    source: null,
                    stack: null
                }),
                t = Eu(e, t, a)
            } else if (mt || qo(e, t, a, !1),
            x = (a & e.childLanes) !== 0,
            mt || x) {
                if (x = Ye,
                x !== null && (o = a & -a,
                o = (o & 42) !== 0 ? 1 : tt(o),
                o = (o & (x.suspendedLanes | a)) !== 0 ? 0 : o,
                o !== 0 && o !== M.retryLane))
                    throw M.retryLane = o,
                    jr(e, o),
                    Yt(x, e, o),
                    op;
                S.data === "$?" || Vu(),
                t = Eu(e, t, a)
            } else
                S.data === "$?" ? (t.flags |= 192,
                t.child = e.child,
                t = null) : (e = M.treeContext,
                $e = fn(S.nextSibling),
                Mt = t,
                ze = !0,
                Za = null,
                yn = !1,
                e !== null && (Wt[Jt++] = Un,
                Wt[Jt++] = Hn,
                Wt[Jt++] = Ka,
                Un = e.id,
                Hn = e.overflow,
                Ka = t),
                t = Su(t, o.children),
                t.flags |= 4096);
            return t
        }
        return s ? (pa(),
        s = o.fallback,
        S = t.mode,
        M = e.child,
        L = M.sibling,
        o = Bn(M, {
            mode: "hidden",
            children: o.children
        }),
        o.subtreeFlags = M.subtreeFlags & 65011712,
        L !== null ? s = Bn(L, s) : (s = $a(s, S, a, null),
        s.flags |= 2),
        s.return = t,
        o.return = t,
        o.sibling = s,
        t.child = o,
        o = s,
        s = t.child,
        S = e.child.memoizedState,
        S === null ? S = xu(a) : (M = S.cachePool,
        M !== null ? (L = ot._currentValue,
        M = M.parent !== L ? {
            parent: L,
            pool: L
        } : M) : M = eh(),
        S = {
            baseLanes: S.baseLanes | a,
            cachePool: M
        }),
        s.memoizedState = S,
        s.childLanes = wu(e, x, a),
        t.memoizedState = bu,
        o) : (ha(t),
        a = e.child,
        e = a.sibling,
        a = Bn(a, {
            mode: "visible",
            children: o.children
        }),
        a.return = t,
        a.sibling = null,
        e !== null && (x = t.deletions,
        x === null ? (t.deletions = [e],
        t.flags |= 16) : x.push(e)),
        t.child = a,
        t.memoizedState = null,
        a)
    }
    function Su(e, t) {
        return t = Bi({
            mode: "visible",
            children: t
        }, e.mode),
        t.return = e,
        e.child = t
    }
    function Bi(e, t) {
        return e = Ut(22, e, null, t),
        e.lanes = 0,
        e.stateNode = {
            _visibility: 1,
            _pendingMarkers: null,
            _retryCache: null,
            _transitions: null
        },
        e
    }
    function Eu(e, t, a) {
        return qr(t, e.child, null, a),
        e = Su(t, t.pendingProps.children),
        e.flags |= 2,
        t.memoizedState = null,
        e
    }
    function pp(e, t, a) {
        e.lanes |= t;
        var o = e.alternate;
        o !== null && (o.lanes |= t),
        Vc(e.return, t, a)
    }
    function Cu(e, t, a, o, s) {
        var f = e.memoizedState;
        f === null ? e.memoizedState = {
            isBackwards: t,
            rendering: null,
            renderingStartTime: 0,
            last: o,
            tail: a,
            tailMode: s
        } : (f.isBackwards = t,
        f.rendering = null,
        f.renderingStartTime = 0,
        f.last = o,
        f.tail = a,
        f.tailMode = s)
    }
    function gp(e, t, a) {
        var o = t.pendingProps
          , s = o.revealOrder
          , f = o.tail;
        if (xt(e, t, o.children, a),
        o = lt.current,
        (o & 2) !== 0)
            o = o & 1 | 2,
            t.flags |= 128;
        else {
            if (e !== null && (e.flags & 128) !== 0)
                e: for (e = t.child; e !== null; ) {
                    if (e.tag === 13)
                        e.memoizedState !== null && pp(e, a, t);
                    else if (e.tag === 19)
                        pp(e, a, t);
                    else if (e.child !== null) {
                        e.child.return = e,
                        e = e.child;
                        continue
                    }
                    if (e === t)
                        break e;
                    for (; e.sibling === null; ) {
                        if (e.return === null || e.return === t)
                            break e;
                        e = e.return
                    }
                    e.sibling.return = e.return,
                    e = e.sibling
                }
            o &= 1
        }
        switch (J(lt, o),
        s) {
        case "forwards":
            for (a = t.child,
            s = null; a !== null; )
                e = a.alternate,
                e !== null && ji(e) === null && (s = a),
                a = a.sibling;
            a = s,
            a === null ? (s = t.child,
            t.child = null) : (s = a.sibling,
            a.sibling = null),
            Cu(t, !1, s, a, f);
            break;
        case "backwards":
            for (a = null,
            s = t.child,
            t.child = null; s !== null; ) {
                if (e = s.alternate,
                e !== null && ji(e) === null) {
                    t.child = s;
                    break
                }
                e = s.sibling,
                s.sibling = a,
                a = s,
                s = e
            }
            Cu(t, !0, a, null, f);
            break;
        case "together":
            Cu(t, !1, null, null, void 0);
            break;
        default:
            t.memoizedState = null
        }
        return t.child
    }
    function qn(e, t, a) {
        if (e !== null && (t.dependencies = e.dependencies),
        xa |= t.lanes,
        (a & t.childLanes) === 0)
            if (e !== null) {
                if (qo(e, t, a, !1),
                (a & t.childLanes) === 0)
                    return null
            } else
                return null;
        if (e !== null && t.child !== e.child)
            throw Error(i(153));
        if (t.child !== null) {
            for (e = t.child,
            a = Bn(e, e.pendingProps),
            t.child = a,
            a.return = t; e.sibling !== null; )
                e = e.sibling,
                a = a.sibling = Bn(e, e.pendingProps),
                a.return = t;
            a.sibling = null
        }
        return t.child
    }
    function Tu(e, t) {
        return (e.lanes & t) !== 0 ? !0 : (e = e.dependencies,
        !!(e !== null && vi(e)))
    }
    function Xw(e, t, a) {
        switch (t.tag) {
        case 3:
            ce(t, t.stateNode.containerInfo),
            ca(t, ot, e.memoizedState.cache),
            Go();
            break;
        case 27:
        case 5:
            xe(t);
            break;
        case 4:
            ce(t, t.stateNode.containerInfo);
            break;
        case 10:
            ca(t, t.type, t.memoizedProps.value);
            break;
        case 13:
            var o = t.memoizedState;
            if (o !== null)
                return o.dehydrated !== null ? (ha(t),
                t.flags |= 128,
                null) : (a & t.child.childLanes) !== 0 ? hp(e, t, a) : (ha(t),
                e = qn(e, t, a),
                e !== null ? e.sibling : null);
            ha(t);
            break;
        case 19:
            var s = (e.flags & 128) !== 0;
            if (o = (a & t.childLanes) !== 0,
            o || (qo(e, t, a, !1),
            o = (a & t.childLanes) !== 0),
            s) {
                if (o)
                    return gp(e, t, a);
                t.flags |= 128
            }
            if (s = t.memoizedState,
            s !== null && (s.rendering = null,
            s.tail = null,
            s.lastEffect = null),
            J(lt, lt.current),
            o)
                break;
            return null;
        case 22:
        case 23:
            return t.lanes = 0,
            cp(e, t, a);
        case 24:
            ca(t, ot, e.memoizedState.cache)
        }
        return qn(e, t, a)
    }
    function vp(e, t, a) {
        if (e !== null)
            if (e.memoizedProps !== t.pendingProps)
                mt = !0;
            else {
                if (!Tu(e, a) && (t.flags & 128) === 0)
                    return mt = !1,
                    Xw(e, t, a);
                mt = (e.flags & 131072) !== 0
            }
        else
            mt = !1,
            ze && (t.flags & 1048576) !== 0 && $m(t, gi, t.index);
        switch (t.lanes = 0,
        t.tag) {
        case 16:
            e: {
                e = t.pendingProps;
                var o = t.elementType
                  , s = o._init;
                if (o = s(o._payload),
                t.type = o,
                typeof o == "function")
                    kc(o) ? (e = nr(o, e),
                    t.tag = 1,
                    t = dp(null, t, o, e, a)) : (t.tag = 0,
                    t = yu(null, t, o, e, a));
                else {
                    if (o != null) {
                        if (s = o.$$typeof,
                        s === j) {
                            t.tag = 11,
                            t = lp(null, t, o, e, a);
                            break e
                        } else if (s === Y) {
                            t.tag = 14,
                            t = ip(null, t, o, e, a);
                            break e
                        }
                    }
                    throw t = le(o) || o,
                    Error(i(306, t, ""))
                }
            }
            return t;
        case 0:
            return yu(e, t, t.type, t.pendingProps, a);
        case 1:
            return o = t.type,
            s = nr(o, t.pendingProps),
            dp(e, t, o, s, a);
        case 3:
            e: {
                if (ce(t, t.stateNode.containerInfo),
                e === null)
                    throw Error(i(387));
                o = t.pendingProps;
                var f = t.memoizedState;
                s = f.element,
                Kc(e, t),
                Fo(t, o, null, a);
                var x = t.memoizedState;
                if (o = x.cache,
                ca(t, ot, o),
                o !== f.cache && Gc(t, [ot], a, !0),
                Zo(),
                o = x.element,
                f.isDehydrated)
                    if (f = {
                        element: o,
                        isDehydrated: !1,
                        cache: x.cache
                    },
                    t.updateQueue.baseState = f,
                    t.memoizedState = f,
                    t.flags & 256) {
                        t = mp(e, t, o, a);
                        break e
                    } else if (o !== s) {
                        s = Zt(Error(i(424)), t),
                        Yo(s),
                        t = mp(e, t, o, a);
                        break e
                    } else {
                        switch (e = t.stateNode.containerInfo,
                        e.nodeType) {
                        case 9:
                            e = e.body;
                            break;
                        default:
                            e = e.nodeName === "HTML" ? e.ownerDocument.body : e
                        }
                        for ($e = fn(e.firstChild),
                        Mt = t,
                        ze = !0,
                        Za = null,
                        yn = !0,
                        a = Qh(t, null, o, a),
                        t.child = a; a; )
                            a.flags = a.flags & -3 | 4096,
                            a = a.sibling
                    }
                else {
                    if (Go(),
                    o === s) {
                        t = qn(e, t, a);
                        break e
                    }
                    xt(e, t, o, a)
                }
                t = t.child
            }
            return t;
        case 26:
            return Li(e, t),
            e === null ? (a = wg(t.type, null, t.pendingProps, null)) ? t.memoizedState = a : ze || (a = t.type,
            e = t.pendingProps,
            o = Fi(Ee.current).createElement(a),
            o[Fe] = t,
            o[Ge] = e,
            St(o, a, e),
            dt(o),
            t.stateNode = o) : t.memoizedState = wg(t.type, e.memoizedProps, t.pendingProps, e.memoizedState),
            null;
        case 27:
            return xe(t),
            e === null && ze && (o = t.stateNode = yg(t.type, t.pendingProps, Ee.current),
            Mt = t,
            yn = !0,
            s = $e,
            Ca(t.type) ? (of = s,
            $e = fn(o.firstChild)) : $e = s),
            xt(e, t, t.pendingProps.children, a),
            Li(e, t),
            e === null && (t.flags |= 4194304),
            t.child;
        case 5:
            return e === null && ze && ((s = o = $e) && (o = xS(o, t.type, t.pendingProps, yn),
            o !== null ? (t.stateNode = o,
            Mt = t,
            $e = fn(o.firstChild),
            yn = !1,
            s = !0) : s = !1),
            s || Fa(t)),
            xe(t),
            s = t.type,
            f = t.pendingProps,
            x = e !== null ? e.memoizedProps : null,
            o = f.children,
            tf(s, f) ? o = null : x !== null && tf(s, x) && (t.flags |= 32),
            t.memoizedState !== null && (s = eu(e, t, Uw, null, null, a),
            bl._currentValue = s),
            Li(e, t),
            xt(e, t, o, a),
            t.child;
        case 6:
            return e === null && ze && ((e = a = $e) && (a = wS(a, t.pendingProps, yn),
            a !== null ? (t.stateNode = a,
            Mt = t,
            $e = null,
            e = !0) : e = !1),
            e || Fa(t)),
            null;
        case 13:
            return hp(e, t, a);
        case 4:
            return ce(t, t.stateNode.containerInfo),
            o = t.pendingProps,
            e === null ? t.child = qr(t, null, o, a) : xt(e, t, o, a),
            t.child;
        case 11:
            return lp(e, t, t.type, t.pendingProps, a);
        case 7:
            return xt(e, t, t.pendingProps, a),
            t.child;
        case 8:
            return xt(e, t, t.pendingProps.children, a),
            t.child;
        case 12:
            return xt(e, t, t.pendingProps.children, a),
            t.child;
        case 10:
            return o = t.pendingProps,
            ca(t, t.type, o.value),
            xt(e, t, o.children, a),
            t.child;
        case 9:
            return s = t.type._context,
            o = t.pendingProps.children,
            Ja(t),
            s = Et(s),
            o = o(s),
            t.flags |= 1,
            xt(e, t, o, a),
            t.child;
        case 14:
            return ip(e, t, t.type, t.pendingProps, a);
        case 15:
            return sp(e, t, t.type, t.pendingProps, a);
        case 19:
            return gp(e, t, a);
        case 31:
            return o = t.pendingProps,
            a = t.mode,
            o = {
                mode: o.mode,
                children: o.children
            },
            e === null ? (a = Bi(o, a),
            a.ref = t.ref,
            t.child = a,
            a.return = t,
            t = a) : (a = Bn(e.child, o),
            a.ref = t.ref,
            t.child = a,
            a.return = t,
            t = a),
            t;
        case 22:
            return cp(e, t, a);
        case 24:
            return Ja(t),
            o = Et(ot),
            e === null ? (s = Ic(),
            s === null && (s = Ye,
            f = Yc(),
            s.pooledCache = f,
            f.refCount++,
            f !== null && (s.pooledCacheLanes |= a),
            s = f),
            t.memoizedState = {
                parent: o,
                cache: s
            },
            $c(t),
            ca(t, ot, s)) : ((e.lanes & a) !== 0 && (Kc(e, t),
            Fo(t, null, null, a),
            Zo()),
            s = e.memoizedState,
            f = t.memoizedState,
            s.parent !== o ? (s = {
                parent: o,
                cache: o
            },
            t.memoizedState = s,
            t.lanes === 0 && (t.memoizedState = t.updateQueue.baseState = s),
            ca(t, ot, o)) : (o = f.cache,
            ca(t, ot, o),
            o !== s.cache && Gc(t, [ot], a, !0))),
            xt(e, t, t.pendingProps.children, a),
            t.child;
        case 29:
            throw t.pendingProps
        }
        throw Error(i(156, t.tag))
    }
    function In(e) {
        e.flags |= 4
    }
    function yp(e, t) {
        if (t.type !== "stylesheet" || (t.state.loading & 4) !== 0)
            e.flags &= -16777217;
        else if (e.flags |= 16777216,
        !Rg(t)) {
            if (t = en.current,
            t !== null && ((je & 4194048) === je ? bn !== null : (je & 62914560) !== je && (je & 536870912) === 0 || t !== bn))
                throw Ko = Xc,
                th;
            e.flags |= 8192
        }
    }
    function Ui(e, t) {
        t !== null && (e.flags |= 4),
        e.flags & 16384 && (t = e.tag !== 22 ? Wl() : 536870912,
        e.lanes |= t,
        Kr |= t)
    }
    function rl(e, t) {
        if (!ze)
            switch (e.tailMode) {
            case "hidden":
                t = e.tail;
                for (var a = null; t !== null; )
                    t.alternate !== null && (a = t),
                    t = t.sibling;
                a === null ? e.tail = null : a.sibling = null;
                break;
            case "collapsed":
                a = e.tail;
                for (var o = null; a !== null; )
                    a.alternate !== null && (o = a),
                    a = a.sibling;
                o === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : o.sibling = null
            }
    }
    function Ie(e) {
        var t = e.alternate !== null && e.alternate.child === e.child
          , a = 0
          , o = 0;
        if (t)
            for (var s = e.child; s !== null; )
                a |= s.lanes | s.childLanes,
                o |= s.subtreeFlags & 65011712,
                o |= s.flags & 65011712,
                s.return = e,
                s = s.sibling;
        else
            for (s = e.child; s !== null; )
                a |= s.lanes | s.childLanes,
                o |= s.subtreeFlags,
                o |= s.flags,
                s.return = e,
                s = s.sibling;
        return e.subtreeFlags |= o,
        e.childLanes = a,
        t
    }
    function $w(e, t, a) {
        var o = t.pendingProps;
        switch (Uc(t),
        t.tag) {
        case 31:
        case 16:
        case 15:
        case 0:
        case 11:
        case 7:
        case 8:
        case 12:
        case 9:
        case 14:
            return Ie(t),
            null;
        case 1:
            return Ie(t),
            null;
        case 3:
            return a = t.stateNode,
            o = null,
            e !== null && (o = e.memoizedState.cache),
            t.memoizedState.cache !== o && (t.flags |= 2048),
            Vn(ot),
            De(),
            a.pendingContext && (a.context = a.pendingContext,
            a.pendingContext = null),
            (e === null || e.child === null) && (Vo(t) ? In(t) : e === null || e.memoizedState.isDehydrated && (t.flags & 256) === 0 || (t.flags |= 1024,
            Zm())),
            Ie(t),
            null;
        case 26:
            return a = t.memoizedState,
            e === null ? (In(t),
            a !== null ? (Ie(t),
            yp(t, a)) : (Ie(t),
            t.flags &= -16777217)) : a ? a !== e.memoizedState ? (In(t),
            Ie(t),
            yp(t, a)) : (Ie(t),
            t.flags &= -16777217) : (e.memoizedProps !== o && In(t),
            Ie(t),
            t.flags &= -16777217),
            null;
        case 27:
            Ce(t),
            a = Ee.current;
            var s = t.type;
            if (e !== null && t.stateNode != null)
                e.memoizedProps !== o && In(t);
            else {
                if (!o) {
                    if (t.stateNode === null)
                        throw Error(i(166));
                    return Ie(t),
                    null
                }
                e = ne.current,
                Vo(t) ? Km(t) : (e = yg(s, o, a),
                t.stateNode = e,
                In(t))
            }
            return Ie(t),
            null;
        case 5:
            if (Ce(t),
            a = t.type,
            e !== null && t.stateNode != null)
                e.memoizedProps !== o && In(t);
            else {
                if (!o) {
                    if (t.stateNode === null)
                        throw Error(i(166));
                    return Ie(t),
                    null
                }
                if (e = ne.current,
                Vo(t))
                    Km(t);
                else {
                    switch (s = Fi(Ee.current),
                    e) {
                    case 1:
                        e = s.createElementNS("http://www.w3.org/2000/svg", a);
                        break;
                    case 2:
                        e = s.createElementNS("http://www.w3.org/1998/Math/MathML", a);
                        break;
                    default:
                        switch (a) {
                        case "svg":
                            e = s.createElementNS("http://www.w3.org/2000/svg", a);
                            break;
                        case "math":
                            e = s.createElementNS("http://www.w3.org/1998/Math/MathML", a);
                            break;
                        case "script":
                            e = s.createElement("div"),
                            e.innerHTML = "<script><\/script>",
                            e = e.removeChild(e.firstChild);
                            break;
                        case "select":
                            e = typeof o.is == "string" ? s.createElement("select", {
                                is: o.is
                            }) : s.createElement("select"),
                            o.multiple ? e.multiple = !0 : o.size && (e.size = o.size);
                            break;
                        default:
                            e = typeof o.is == "string" ? s.createElement(a, {
                                is: o.is
                            }) : s.createElement(a)
                        }
                    }
                    e[Fe] = t,
                    e[Ge] = o;
                    e: for (s = t.child; s !== null; ) {
                        if (s.tag === 5 || s.tag === 6)
                            e.appendChild(s.stateNode);
                        else if (s.tag !== 4 && s.tag !== 27 && s.child !== null) {
                            s.child.return = s,
                            s = s.child;
                            continue
                        }
                        if (s === t)
                            break e;
                        for (; s.sibling === null; ) {
                            if (s.return === null || s.return === t)
                                break e;
                            s = s.return
                        }
                        s.sibling.return = s.return,
                        s = s.sibling
                    }
                    t.stateNode = e;
                    e: switch (St(e, a, o),
                    a) {
                    case "button":
                    case "input":
                    case "select":
                    case "textarea":
                        e = !!o.autoFocus;
                        break e;
                    case "img":
                        e = !0;
                        break e;
                    default:
                        e = !1
                    }
                    e && In(t)
                }
            }
            return Ie(t),
            t.flags &= -16777217,
            null;
        case 6:
            if (e && t.stateNode != null)
                e.memoizedProps !== o && In(t);
            else {
                if (typeof o != "string" && t.stateNode === null)
                    throw Error(i(166));
                if (e = Ee.current,
                Vo(t)) {
                    if (e = t.stateNode,
                    a = t.memoizedProps,
                    o = null,
                    s = Mt,
                    s !== null)
                        switch (s.tag) {
                        case 27:
                        case 5:
                            o = s.memoizedProps
                        }
                    e[Fe] = t,
                    e = !!(e.nodeValue === a || o !== null && o.suppressHydrationWarning === !0 || fg(e.nodeValue, a)),
                    e || Fa(t)
                } else
                    e = Fi(e).createTextNode(o),
                    e[Fe] = t,
                    t.stateNode = e
            }
            return Ie(t),
            null;
        case 13:
            if (o = t.memoizedState,
            e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
                if (s = Vo(t),
                o !== null && o.dehydrated !== null) {
                    if (e === null) {
                        if (!s)
                            throw Error(i(318));
                        if (s = t.memoizedState,
                        s = s !== null ? s.dehydrated : null,
                        !s)
                            throw Error(i(317));
                        s[Fe] = t
                    } else
                        Go(),
                        (t.flags & 128) === 0 && (t.memoizedState = null),
                        t.flags |= 4;
                    Ie(t),
                    s = !1
                } else
                    s = Zm(),
                    e !== null && e.memoizedState !== null && (e.memoizedState.hydrationErrors = s),
                    s = !0;
                if (!s)
                    return t.flags & 256 ? (Yn(t),
                    t) : (Yn(t),
                    null)
            }
            if (Yn(t),
            (t.flags & 128) !== 0)
                return t.lanes = a,
                t;
            if (a = o !== null,
            e = e !== null && e.memoizedState !== null,
            a) {
                o = t.child,
                s = null,
                o.alternate !== null && o.alternate.memoizedState !== null && o.alternate.memoizedState.cachePool !== null && (s = o.alternate.memoizedState.cachePool.pool);
                var f = null;
                o.memoizedState !== null && o.memoizedState.cachePool !== null && (f = o.memoizedState.cachePool.pool),
                f !== s && (o.flags |= 2048)
            }
            return a !== e && a && (t.child.flags |= 8192),
            Ui(t, t.updateQueue),
            Ie(t),
            null;
        case 4:
            return De(),
            e === null && Zu(t.stateNode.containerInfo),
            Ie(t),
            null;
        case 10:
            return Vn(t.type),
            Ie(t),
            null;
        case 19:
            if (ve(lt),
            s = t.memoizedState,
            s === null)
                return Ie(t),
                null;
            if (o = (t.flags & 128) !== 0,
            f = s.rendering,
            f === null)
                if (o)
                    rl(s, !1);
                else {
                    if (Ke !== 0 || e !== null && (e.flags & 128) !== 0)
                        for (e = t.child; e !== null; ) {
                            if (f = ji(e),
                            f !== null) {
                                for (t.flags |= 128,
                                rl(s, !1),
                                e = f.updateQueue,
                                t.updateQueue = e,
                                Ui(t, e),
                                t.subtreeFlags = 0,
                                e = a,
                                a = t.child; a !== null; )
                                    Xm(a, e),
                                    a = a.sibling;
                                return J(lt, lt.current & 1 | 2),
                                t.child
                            }
                            e = e.sibling
                        }
                    s.tail !== null && et() > Vi && (t.flags |= 128,
                    o = !0,
                    rl(s, !1),
                    t.lanes = 4194304)
                }
            else {
                if (!o)
                    if (e = ji(f),
                    e !== null) {
                        if (t.flags |= 128,
                        o = !0,
                        e = e.updateQueue,
                        t.updateQueue = e,
                        Ui(t, e),
                        rl(s, !0),
                        s.tail === null && s.tailMode === "hidden" && !f.alternate && !ze)
                            return Ie(t),
                            null
                    } else
                        2 * et() - s.renderingStartTime > Vi && a !== 536870912 && (t.flags |= 128,
                        o = !0,
                        rl(s, !1),
                        t.lanes = 4194304);
                s.isBackwards ? (f.sibling = t.child,
                t.child = f) : (e = s.last,
                e !== null ? e.sibling = f : t.child = f,
                s.last = f)
            }
            return s.tail !== null ? (t = s.tail,
            s.rendering = t,
            s.tail = t.sibling,
            s.renderingStartTime = et(),
            t.sibling = null,
            e = lt.current,
            J(lt, o ? e & 1 | 2 : e & 1),
            t) : (Ie(t),
            null);
        case 22:
        case 23:
            return Yn(t),
            Wc(),
            o = t.memoizedState !== null,
            e !== null ? e.memoizedState !== null !== o && (t.flags |= 8192) : o && (t.flags |= 8192),
            o ? (a & 536870912) !== 0 && (t.flags & 128) === 0 && (Ie(t),
            t.subtreeFlags & 6 && (t.flags |= 8192)) : Ie(t),
            a = t.updateQueue,
            a !== null && Ui(t, a.retryQueue),
            a = null,
            e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (a = e.memoizedState.cachePool.pool),
            o = null,
            t.memoizedState !== null && t.memoizedState.cachePool !== null && (o = t.memoizedState.cachePool.pool),
            o !== a && (t.flags |= 2048),
            e !== null && ve(er),
            null;
        case 24:
            return a = null,
            e !== null && (a = e.memoizedState.cache),
            t.memoizedState.cache !== a && (t.flags |= 2048),
            Vn(ot),
            Ie(t),
            null;
        case 25:
            return null;
        case 30:
            return null
        }
        throw Error(i(156, t.tag))
    }
    function Kw(e, t) {
        switch (Uc(t),
        t.tag) {
        case 1:
            return e = t.flags,
            e & 65536 ? (t.flags = e & -65537 | 128,
            t) : null;
        case 3:
            return Vn(ot),
            De(),
            e = t.flags,
            (e & 65536) !== 0 && (e & 128) === 0 ? (t.flags = e & -65537 | 128,
            t) : null;
        case 26:
        case 27:
        case 5:
            return Ce(t),
            null;
        case 13:
            if (Yn(t),
            e = t.memoizedState,
            e !== null && e.dehydrated !== null) {
                if (t.alternate === null)
                    throw Error(i(340));
                Go()
            }
            return e = t.flags,
            e & 65536 ? (t.flags = e & -65537 | 128,
            t) : null;
        case 19:
            return ve(lt),
            null;
        case 4:
            return De(),
            null;
        case 10:
            return Vn(t.type),
            null;
        case 22:
        case 23:
            return Yn(t),
            Wc(),
            e !== null && ve(er),
            e = t.flags,
            e & 65536 ? (t.flags = e & -65537 | 128,
            t) : null;
        case 24:
            return Vn(ot),
            null;
        case 25:
            return null;
        default:
            return null
        }
    }
    function bp(e, t) {
        switch (Uc(t),
        t.tag) {
        case 3:
            Vn(ot),
            De();
            break;
        case 26:
        case 27:
        case 5:
            Ce(t);
            break;
        case 4:
            De();
            break;
        case 13:
            Yn(t);
            break;
        case 19:
            ve(lt);
            break;
        case 10:
            Vn(t.type);
            break;
        case 22:
        case 23:
            Yn(t),
            Wc(),
            e !== null && ve(er);
            break;
        case 24:
            Vn(ot)
        }
    }
    function ol(e, t) {
        try {
            var a = t.updateQueue
              , o = a !== null ? a.lastEffect : null;
            if (o !== null) {
                var s = o.next;
                a = s;
                do {
                    if ((a.tag & e) === e) {
                        o = void 0;
                        var f = a.create
                          , x = a.inst;
                        o = f(),
                        x.destroy = o
                    }
                    a = a.next
                } while (a !== s)
            }
        } catch (S) {
            Ve(t, t.return, S)
        }
    }
    function ga(e, t, a) {
        try {
            var o = t.updateQueue
              , s = o !== null ? o.lastEffect : null;
            if (s !== null) {
                var f = s.next;
                o = f;
                do {
                    if ((o.tag & e) === e) {
                        var x = o.inst
                          , S = x.destroy;
                        if (S !== void 0) {
                            x.destroy = void 0,
                            s = t;
                            var M = a
                              , L = S;
                            try {
                                L()
                            } catch (q) {
                                Ve(s, M, q)
                            }
                        }
                    }
                    o = o.next
                } while (o !== f)
            }
        } catch (q) {
            Ve(t, t.return, q)
        }
    }
    function xp(e) {
        var t = e.updateQueue;
        if (t !== null) {
            var a = e.stateNode;
            try {
                ih(t, a)
            } catch (o) {
                Ve(e, e.return, o)
            }
        }
    }
    function wp(e, t, a) {
        a.props = nr(e.type, e.memoizedProps),
        a.state = e.memoizedState;
        try {
            a.componentWillUnmount()
        } catch (o) {
            Ve(e, t, o)
        }
    }
    function ll(e, t) {
        try {
            var a = e.ref;
            if (a !== null) {
                switch (e.tag) {
                case 26:
                case 27:
                case 5:
                    var o = e.stateNode;
                    break;
                case 30:
                    o = e.stateNode;
                    break;
                default:
                    o = e.stateNode
                }
                typeof a == "function" ? e.refCleanup = a(o) : a.current = o
            }
        } catch (s) {
            Ve(e, t, s)
        }
    }
    function xn(e, t) {
        var a = e.ref
          , o = e.refCleanup;
        if (a !== null)
            if (typeof o == "function")
                try {
                    o()
                } catch (s) {
                    Ve(e, t, s)
                } finally {
                    e.refCleanup = null,
                    e = e.alternate,
                    e != null && (e.refCleanup = null)
                }
            else if (typeof a == "function")
                try {
                    a(null)
                } catch (s) {
                    Ve(e, t, s)
                }
            else
                a.current = null
    }
    function Sp(e) {
        var t = e.type
          , a = e.memoizedProps
          , o = e.stateNode;
        try {
            e: switch (t) {
            case "button":
            case "input":
            case "select":
            case "textarea":
                a.autoFocus && o.focus();
                break e;
            case "img":
                a.src ? o.src = a.src : a.srcSet && (o.srcset = a.srcSet)
            }
        } catch (s) {
            Ve(e, e.return, s)
        }
    }
    function Ru(e, t, a) {
        try {
            var o = e.stateNode;
            pS(o, e.type, a, t),
            o[Ge] = t
        } catch (s) {
            Ve(e, e.return, s)
        }
    }
    function Ep(e) {
        return e.tag === 5 || e.tag === 3 || e.tag === 26 || e.tag === 27 && Ca(e.type) || e.tag === 4
    }
    function Au(e) {
        e: for (; ; ) {
            for (; e.sibling === null; ) {
                if (e.return === null || Ep(e.return))
                    return null;
                e = e.return
            }
            for (e.sibling.return = e.return,
            e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; ) {
                if (e.tag === 27 && Ca(e.type) || e.flags & 2 || e.child === null || e.tag === 4)
                    continue e;
                e.child.return = e,
                e = e.child
            }
            if (!(e.flags & 2))
                return e.stateNode
        }
    }
    function Mu(e, t, a) {
        var o = e.tag;
        if (o === 5 || o === 6)
            e = e.stateNode,
            t ? (a.nodeType === 9 ? a.body : a.nodeName === "HTML" ? a.ownerDocument.body : a).insertBefore(e, t) : (t = a.nodeType === 9 ? a.body : a.nodeName === "HTML" ? a.ownerDocument.body : a,
            t.appendChild(e),
            a = a._reactRootContainer,
            a != null || t.onclick !== null || (t.onclick = Zi));
        else if (o !== 4 && (o === 27 && Ca(e.type) && (a = e.stateNode,
        t = null),
        e = e.child,
        e !== null))
            for (Mu(e, t, a),
            e = e.sibling; e !== null; )
                Mu(e, t, a),
                e = e.sibling
    }
    function Hi(e, t, a) {
        var o = e.tag;
        if (o === 5 || o === 6)
            e = e.stateNode,
            t ? a.insertBefore(e, t) : a.appendChild(e);
        else if (o !== 4 && (o === 27 && Ca(e.type) && (a = e.stateNode),
        e = e.child,
        e !== null))
            for (Hi(e, t, a),
            e = e.sibling; e !== null; )
                Hi(e, t, a),
                e = e.sibling
    }
    function Cp(e) {
        var t = e.stateNode
          , a = e.memoizedProps;
        try {
            for (var o = e.type, s = t.attributes; s.length; )
                t.removeAttributeNode(s[0]);
            St(t, o, a),
            t[Fe] = e,
            t[Ge] = a
        } catch (f) {
            Ve(e, e.return, f)
        }
    }
    var Xn = !1
      , Je = !1
      , Nu = !1
      , Tp = typeof WeakSet == "function" ? WeakSet : Set
      , ht = null;
    function Qw(e, t) {
        if (e = e.containerInfo,
        Ju = as,
        e = Lm(e),
        Ac(e)) {
            if ("selectionStart"in e)
                var a = {
                    start: e.selectionStart,
                    end: e.selectionEnd
                };
            else
                e: {
                    a = (a = e.ownerDocument) && a.defaultView || window;
                    var o = a.getSelection && a.getSelection();
                    if (o && o.rangeCount !== 0) {
                        a = o.anchorNode;
                        var s = o.anchorOffset
                          , f = o.focusNode;
                        o = o.focusOffset;
                        try {
                            a.nodeType,
                            f.nodeType
                        } catch {
                            a = null;
                            break e
                        }
                        var x = 0
                          , S = -1
                          , M = -1
                          , L = 0
                          , q = 0
                          , X = e
                          , H = null;
                        t: for (; ; ) {
                            for (var P; X !== a || s !== 0 && X.nodeType !== 3 || (S = x + s),
                            X !== f || o !== 0 && X.nodeType !== 3 || (M = x + o),
                            X.nodeType === 3 && (x += X.nodeValue.length),
                            (P = X.firstChild) !== null; )
                                H = X,
                                X = P;
                            for (; ; ) {
                                if (X === e)
                                    break t;
                                if (H === a && ++L === s && (S = x),
                                H === f && ++q === o && (M = x),
                                (P = X.nextSibling) !== null)
                                    break;
                                X = H,
                                H = X.parentNode
                            }
                            X = P
                        }
                        a = S === -1 || M === -1 ? null : {
                            start: S,
                            end: M
                        }
                    } else
                        a = null
                }
            a = a || {
                start: 0,
                end: 0
            }
        } else
            a = null;
        for (ef = {
            focusedElem: e,
            selectionRange: a
        },
        as = !1,
        ht = t; ht !== null; )
            if (t = ht,
            e = t.child,
            (t.subtreeFlags & 1024) !== 0 && e !== null)
                e.return = t,
                ht = e;
            else
                for (; ht !== null; ) {
                    switch (t = ht,
                    f = t.alternate,
                    e = t.flags,
                    t.tag) {
                    case 0:
                        break;
                    case 11:
                    case 15:
                        break;
                    case 1:
                        if ((e & 1024) !== 0 && f !== null) {
                            e = void 0,
                            a = t,
                            s = f.memoizedProps,
                            f = f.memoizedState,
                            o = a.stateNode;
                            try {
                                var ge = nr(a.type, s, a.elementType === a.type);
                                e = o.getSnapshotBeforeUpdate(ge, f),
                                o.__reactInternalSnapshotBeforeUpdate = e
                            } catch (me) {
                                Ve(a, a.return, me)
                            }
                        }
                        break;
                    case 3:
                        if ((e & 1024) !== 0) {
                            if (e = t.stateNode.containerInfo,
                            a = e.nodeType,
                            a === 9)
                                af(e);
                            else if (a === 1)
                                switch (e.nodeName) {
                                case "HEAD":
                                case "HTML":
                                case "BODY":
                                    af(e);
                                    break;
                                default:
                                    e.textContent = ""
                                }
                        }
                        break;
                    case 5:
                    case 26:
                    case 27:
                    case 6:
                    case 4:
                    case 17:
                        break;
                    default:
                        if ((e & 1024) !== 0)
                            throw Error(i(163))
                    }
                    if (e = t.sibling,
                    e !== null) {
                        e.return = t.return,
                        ht = e;
                        break
                    }
                    ht = t.return
                }
    }
    function Rp(e, t, a) {
        var o = a.flags;
        switch (a.tag) {
        case 0:
        case 11:
        case 15:
            va(e, a),
            o & 4 && ol(5, a);
            break;
        case 1:
            if (va(e, a),
            o & 4)
                if (e = a.stateNode,
                t === null)
                    try {
                        e.componentDidMount()
                    } catch (x) {
                        Ve(a, a.return, x)
                    }
                else {
                    var s = nr(a.type, t.memoizedProps);
                    t = t.memoizedState;
                    try {
                        e.componentDidUpdate(s, t, e.__reactInternalSnapshotBeforeUpdate)
                    } catch (x) {
                        Ve(a, a.return, x)
                    }
                }
            o & 64 && xp(a),
            o & 512 && ll(a, a.return);
            break;
        case 3:
            if (va(e, a),
            o & 64 && (e = a.updateQueue,
            e !== null)) {
                if (t = null,
                a.child !== null)
                    switch (a.child.tag) {
                    case 27:
                    case 5:
                        t = a.child.stateNode;
                        break;
                    case 1:
                        t = a.child.stateNode
                    }
                try {
                    ih(e, t)
                } catch (x) {
                    Ve(a, a.return, x)
                }
            }
            break;
        case 27:
            t === null && o & 4 && Cp(a);
        case 26:
        case 5:
            va(e, a),
            t === null && o & 4 && Sp(a),
            o & 512 && ll(a, a.return);
            break;
        case 12:
            va(e, a);
            break;
        case 13:
            va(e, a),
            o & 4 && Np(e, a),
            o & 64 && (e = a.memoizedState,
            e !== null && (e = e.dehydrated,
            e !== null && (a = rS.bind(null, a),
            SS(e, a))));
            break;
        case 22:
            if (o = a.memoizedState !== null || Xn,
            !o) {
                t = t !== null && t.memoizedState !== null || Je,
                s = Xn;
                var f = Je;
                Xn = o,
                (Je = t) && !f ? ya(e, a, (a.subtreeFlags & 8772) !== 0) : va(e, a),
                Xn = s,
                Je = f
            }
            break;
        case 30:
            break;
        default:
            va(e, a)
        }
    }
    function Ap(e) {
        var t = e.alternate;
        t !== null && (e.alternate = null,
        Ap(t)),
        e.child = null,
        e.deletions = null,
        e.sibling = null,
        e.tag === 5 && (t = e.stateNode,
        t !== null && sc(t)),
        e.stateNode = null,
        e.return = null,
        e.dependencies = null,
        e.memoizedProps = null,
        e.memoizedState = null,
        e.pendingProps = null,
        e.stateNode = null,
        e.updateQueue = null
    }
    var qe = null
      , jt = !1;
    function $n(e, t, a) {
        for (a = a.child; a !== null; )
            Mp(e, t, a),
            a = a.sibling
    }
    function Mp(e, t, a) {
        if (At && typeof At.onCommitFiberUnmount == "function")
            try {
                At.onCommitFiberUnmount(gn, a)
            } catch {}
        switch (a.tag) {
        case 26:
            Je || xn(a, t),
            $n(e, t, a),
            a.memoizedState ? a.memoizedState.count-- : a.stateNode && (a = a.stateNode,
            a.parentNode.removeChild(a));
            break;
        case 27:
            Je || xn(a, t);
            var o = qe
              , s = jt;
            Ca(a.type) && (qe = a.stateNode,
            jt = !1),
            $n(e, t, a),
            pl(a.stateNode),
            qe = o,
            jt = s;
            break;
        case 5:
            Je || xn(a, t);
        case 6:
            if (o = qe,
            s = jt,
            qe = null,
            $n(e, t, a),
            qe = o,
            jt = s,
            qe !== null)
                if (jt)
                    try {
                        (qe.nodeType === 9 ? qe.body : qe.nodeName === "HTML" ? qe.ownerDocument.body : qe).removeChild(a.stateNode)
                    } catch (f) {
                        Ve(a, t, f)
                    }
                else
                    try {
                        qe.removeChild(a.stateNode)
                    } catch (f) {
                        Ve(a, t, f)
                    }
            break;
        case 18:
            qe !== null && (jt ? (e = qe,
            gg(e.nodeType === 9 ? e.body : e.nodeName === "HTML" ? e.ownerDocument.body : e, a.stateNode),
            El(e)) : gg(qe, a.stateNode));
            break;
        case 4:
            o = qe,
            s = jt,
            qe = a.stateNode.containerInfo,
            jt = !0,
            $n(e, t, a),
            qe = o,
            jt = s;
            break;
        case 0:
        case 11:
        case 14:
        case 15:
            Je || ga(2, a, t),
            Je || ga(4, a, t),
            $n(e, t, a);
            break;
        case 1:
            Je || (xn(a, t),
            o = a.stateNode,
            typeof o.componentWillUnmount == "function" && wp(a, t, o)),
            $n(e, t, a);
            break;
        case 21:
            $n(e, t, a);
            break;
        case 22:
            Je = (o = Je) || a.memoizedState !== null,
            $n(e, t, a),
            Je = o;
            break;
        default:
            $n(e, t, a)
        }
    }
    function Np(e, t) {
        if (t.memoizedState === null && (e = t.alternate,
        e !== null && (e = e.memoizedState,
        e !== null && (e = e.dehydrated,
        e !== null))))
            try {
                El(e)
            } catch (a) {
                Ve(t, t.return, a)
            }
    }
    function Zw(e) {
        switch (e.tag) {
        case 13:
        case 19:
            var t = e.stateNode;
            return t === null && (t = e.stateNode = new Tp),
            t;
        case 22:
            return e = e.stateNode,
            t = e._retryCache,
            t === null && (t = e._retryCache = new Tp),
            t;
        default:
            throw Error(i(435, e.tag))
        }
    }
    function _u(e, t) {
        var a = Zw(e);
        t.forEach(function(o) {
            var s = oS.bind(null, e, o);
            a.has(o) || (a.add(o),
            o.then(s, s))
        })
    }
    function Ht(e, t) {
        var a = t.deletions;
        if (a !== null)
            for (var o = 0; o < a.length; o++) {
                var s = a[o]
                  , f = e
                  , x = t
                  , S = x;
                e: for (; S !== null; ) {
                    switch (S.tag) {
                    case 27:
                        if (Ca(S.type)) {
                            qe = S.stateNode,
                            jt = !1;
                            break e
                        }
                        break;
                    case 5:
                        qe = S.stateNode,
                        jt = !1;
                        break e;
                    case 3:
                    case 4:
                        qe = S.stateNode.containerInfo,
                        jt = !0;
                        break e
                    }
                    S = S.return
                }
                if (qe === null)
                    throw Error(i(160));
                Mp(f, x, s),
                qe = null,
                jt = !1,
                f = s.alternate,
                f !== null && (f.return = null),
                s.return = null
            }
        if (t.subtreeFlags & 13878)
            for (t = t.child; t !== null; )
                _p(t, e),
                t = t.sibling
    }
    var un = null;
    function _p(e, t) {
        var a = e.alternate
          , o = e.flags;
        switch (e.tag) {
        case 0:
        case 11:
        case 14:
        case 15:
            Ht(t, e),
            Pt(e),
            o & 4 && (ga(3, e, e.return),
            ol(3, e),
            ga(5, e, e.return));
            break;
        case 1:
            Ht(t, e),
            Pt(e),
            o & 512 && (Je || a === null || xn(a, a.return)),
            o & 64 && Xn && (e = e.updateQueue,
            e !== null && (o = e.callbacks,
            o !== null && (a = e.shared.hiddenCallbacks,
            e.shared.hiddenCallbacks = a === null ? o : a.concat(o))));
            break;
        case 26:
            var s = un;
            if (Ht(t, e),
            Pt(e),
            o & 512 && (Je || a === null || xn(a, a.return)),
            o & 4) {
                var f = a !== null ? a.memoizedState : null;
                if (o = e.memoizedState,
                a === null)
                    if (o === null)
                        if (e.stateNode === null) {
                            e: {
                                o = e.type,
                                a = e.memoizedProps,
                                s = s.ownerDocument || s;
                                t: switch (o) {
                                case "title":
                                    f = s.getElementsByTagName("title")[0],
                                    (!f || f[_o] || f[Fe] || f.namespaceURI === "http://www.w3.org/2000/svg" || f.hasAttribute("itemprop")) && (f = s.createElement(o),
                                    s.head.insertBefore(f, s.querySelector("head > title"))),
                                    St(f, o, a),
                                    f[Fe] = e,
                                    dt(f),
                                    o = f;
                                    break e;
                                case "link":
                                    var x = Cg("link", "href", s).get(o + (a.href || ""));
                                    if (x) {
                                        for (var S = 0; S < x.length; S++)
                                            if (f = x[S],
                                            f.getAttribute("href") === (a.href == null || a.href === "" ? null : a.href) && f.getAttribute("rel") === (a.rel == null ? null : a.rel) && f.getAttribute("title") === (a.title == null ? null : a.title) && f.getAttribute("crossorigin") === (a.crossOrigin == null ? null : a.crossOrigin)) {
                                                x.splice(S, 1);
                                                break t
                                            }
                                    }
                                    f = s.createElement(o),
                                    St(f, o, a),
                                    s.head.appendChild(f);
                                    break;
                                case "meta":
                                    if (x = Cg("meta", "content", s).get(o + (a.content || ""))) {
                                        for (S = 0; S < x.length; S++)
                                            if (f = x[S],
                                            f.getAttribute("content") === (a.content == null ? null : "" + a.content) && f.getAttribute("name") === (a.name == null ? null : a.name) && f.getAttribute("property") === (a.property == null ? null : a.property) && f.getAttribute("http-equiv") === (a.httpEquiv == null ? null : a.httpEquiv) && f.getAttribute("charset") === (a.charSet == null ? null : a.charSet)) {
                                                x.splice(S, 1);
                                                break t
                                            }
                                    }
                                    f = s.createElement(o),
                                    St(f, o, a),
                                    s.head.appendChild(f);
                                    break;
                                default:
                                    throw Error(i(468, o))
                                }
                                f[Fe] = e,
                                dt(f),
                                o = f
                            }
                            e.stateNode = o
                        } else
                            Tg(s, e.type, e.stateNode);
                    else
                        e.stateNode = Eg(s, o, e.memoizedProps);
                else
                    f !== o ? (f === null ? a.stateNode !== null && (a = a.stateNode,
                    a.parentNode.removeChild(a)) : f.count--,
                    o === null ? Tg(s, e.type, e.stateNode) : Eg(s, o, e.memoizedProps)) : o === null && e.stateNode !== null && Ru(e, e.memoizedProps, a.memoizedProps)
            }
            break;
        case 27:
            Ht(t, e),
            Pt(e),
            o & 512 && (Je || a === null || xn(a, a.return)),
            a !== null && o & 4 && Ru(e, e.memoizedProps, a.memoizedProps);
            break;
        case 5:
            if (Ht(t, e),
            Pt(e),
            o & 512 && (Je || a === null || xn(a, a.return)),
            e.flags & 32) {
                s = e.stateNode;
                try {
                    Rr(s, "")
                } catch (P) {
                    Ve(e, e.return, P)
                }
            }
            o & 4 && e.stateNode != null && (s = e.memoizedProps,
            Ru(e, s, a !== null ? a.memoizedProps : s)),
            o & 1024 && (Nu = !0);
            break;
        case 6:
            if (Ht(t, e),
            Pt(e),
            o & 4) {
                if (e.stateNode === null)
                    throw Error(i(162));
                o = e.memoizedProps,
                a = e.stateNode;
                try {
                    a.nodeValue = o
                } catch (P) {
                    Ve(e, e.return, P)
                }
            }
            break;
        case 3:
            if (es = null,
            s = un,
            un = Wi(t.containerInfo),
            Ht(t, e),
            un = s,
            Pt(e),
            o & 4 && a !== null && a.memoizedState.isDehydrated)
                try {
                    El(t.containerInfo)
                } catch (P) {
                    Ve(e, e.return, P)
                }
            Nu && (Nu = !1,
            Op(e));
            break;
        case 4:
            o = un,
            un = Wi(e.stateNode.containerInfo),
            Ht(t, e),
            Pt(e),
            un = o;
            break;
        case 12:
            Ht(t, e),
            Pt(e);
            break;
        case 13:
            Ht(t, e),
            Pt(e),
            e.child.flags & 8192 && e.memoizedState !== null != (a !== null && a.memoizedState !== null) && (Lu = et()),
            o & 4 && (o = e.updateQueue,
            o !== null && (e.updateQueue = null,
            _u(e, o)));
            break;
        case 22:
            s = e.memoizedState !== null;
            var M = a !== null && a.memoizedState !== null
              , L = Xn
              , q = Je;
            if (Xn = L || s,
            Je = q || M,
            Ht(t, e),
            Je = q,
            Xn = L,
            Pt(e),
            o & 8192)
                e: for (t = e.stateNode,
                t._visibility = s ? t._visibility & -2 : t._visibility | 1,
                s && (a === null || M || Xn || Je || ar(e)),
                a = null,
                t = e; ; ) {
                    if (t.tag === 5 || t.tag === 26) {
                        if (a === null) {
                            M = a = t;
                            try {
                                if (f = M.stateNode,
                                s)
                                    x = f.style,
                                    typeof x.setProperty == "function" ? x.setProperty("display", "none", "important") : x.display = "none";
                                else {
                                    S = M.stateNode;
                                    var X = M.memoizedProps.style
                                      , H = X != null && X.hasOwnProperty("display") ? X.display : null;
                                    S.style.display = H == null || typeof H == "boolean" ? "" : ("" + H).trim()
                                }
                            } catch (P) {
                                Ve(M, M.return, P)
                            }
                        }
                    } else if (t.tag === 6) {
                        if (a === null) {
                            M = t;
                            try {
                                M.stateNode.nodeValue = s ? "" : M.memoizedProps
                            } catch (P) {
                                Ve(M, M.return, P)
                            }
                        }
                    } else if ((t.tag !== 22 && t.tag !== 23 || t.memoizedState === null || t === e) && t.child !== null) {
                        t.child.return = t,
                        t = t.child;
                        continue
                    }
                    if (t === e)
                        break e;
                    for (; t.sibling === null; ) {
                        if (t.return === null || t.return === e)
                            break e;
                        a === t && (a = null),
                        t = t.return
                    }
                    a === t && (a = null),
                    t.sibling.return = t.return,
                    t = t.sibling
                }
            o & 4 && (o = e.updateQueue,
            o !== null && (a = o.retryQueue,
            a !== null && (o.retryQueue = null,
            _u(e, a))));
            break;
        case 19:
            Ht(t, e),
            Pt(e),
            o & 4 && (o = e.updateQueue,
            o !== null && (e.updateQueue = null,
            _u(e, o)));
            break;
        case 30:
            break;
        case 21:
            break;
        default:
            Ht(t, e),
            Pt(e)
        }
    }
    function Pt(e) {
        var t = e.flags;
        if (t & 2) {
            try {
                for (var a, o = e.return; o !== null; ) {
                    if (Ep(o)) {
                        a = o;
                        break
                    }
                    o = o.return
                }
                if (a == null)
                    throw Error(i(160));
                switch (a.tag) {
                case 27:
                    var s = a.stateNode
                      , f = Au(e);
                    Hi(e, f, s);
                    break;
                case 5:
                    var x = a.stateNode;
                    a.flags & 32 && (Rr(x, ""),
                    a.flags &= -33);
                    var S = Au(e);
                    Hi(e, S, x);
                    break;
                case 3:
                case 4:
                    var M = a.stateNode.containerInfo
                      , L = Au(e);
                    Mu(e, L, M);
                    break;
                default:
                    throw Error(i(161))
                }
            } catch (q) {
                Ve(e, e.return, q)
            }
            e.flags &= -3
        }
        t & 4096 && (e.flags &= -4097)
    }
    function Op(e) {
        if (e.subtreeFlags & 1024)
            for (e = e.child; e !== null; ) {
                var t = e;
                Op(t),
                t.tag === 5 && t.flags & 1024 && t.stateNode.reset(),
                e = e.sibling
            }
    }
    function va(e, t) {
        if (t.subtreeFlags & 8772)
            for (t = t.child; t !== null; )
                Rp(e, t.alternate, t),
                t = t.sibling
    }
    function ar(e) {
        for (e = e.child; e !== null; ) {
            var t = e;
            switch (t.tag) {
            case 0:
            case 11:
            case 14:
            case 15:
                ga(4, t, t.return),
                ar(t);
                break;
            case 1:
                xn(t, t.return);
                var a = t.stateNode;
                typeof a.componentWillUnmount == "function" && wp(t, t.return, a),
                ar(t);
                break;
            case 27:
                pl(t.stateNode);
            case 26:
            case 5:
                xn(t, t.return),
                ar(t);
                break;
            case 22:
                t.memoizedState === null && ar(t);
                break;
            case 30:
                ar(t);
                break;
            default:
                ar(t)
            }
            e = e.sibling
        }
    }
    function ya(e, t, a) {
        for (a = a && (t.subtreeFlags & 8772) !== 0,
        t = t.child; t !== null; ) {
            var o = t.alternate
              , s = e
              , f = t
              , x = f.flags;
            switch (f.tag) {
            case 0:
            case 11:
            case 15:
                ya(s, f, a),
                ol(4, f);
                break;
            case 1:
                if (ya(s, f, a),
                o = f,
                s = o.stateNode,
                typeof s.componentDidMount == "function")
                    try {
                        s.componentDidMount()
                    } catch (L) {
                        Ve(o, o.return, L)
                    }
                if (o = f,
                s = o.updateQueue,
                s !== null) {
                    var S = o.stateNode;
                    try {
                        var M = s.shared.hiddenCallbacks;
                        if (M !== null)
                            for (s.shared.hiddenCallbacks = null,
                            s = 0; s < M.length; s++)
                                lh(M[s], S)
                    } catch (L) {
                        Ve(o, o.return, L)
                    }
                }
                a && x & 64 && xp(f),
                ll(f, f.return);
                break;
            case 27:
                Cp(f);
            case 26:
            case 5:
                ya(s, f, a),
                a && o === null && x & 4 && Sp(f),
                ll(f, f.return);
                break;
            case 12:
                ya(s, f, a);
                break;
            case 13:
                ya(s, f, a),
                a && x & 4 && Np(s, f);
                break;
            case 22:
                f.memoizedState === null && ya(s, f, a),
                ll(f, f.return);
                break;
            case 30:
                break;
            default:
                ya(s, f, a)
            }
            t = t.sibling
        }
    }
    function Ou(e, t) {
        var a = null;
        e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (a = e.memoizedState.cachePool.pool),
        e = null,
        t.memoizedState !== null && t.memoizedState.cachePool !== null && (e = t.memoizedState.cachePool.pool),
        e !== a && (e != null && e.refCount++,
        a != null && Io(a))
    }
    function Du(e, t) {
        e = null,
        t.alternate !== null && (e = t.alternate.memoizedState.cache),
        t = t.memoizedState.cache,
        t !== e && (t.refCount++,
        e != null && Io(e))
    }
    function wn(e, t, a, o) {
        if (t.subtreeFlags & 10256)
            for (t = t.child; t !== null; )
                Dp(e, t, a, o),
                t = t.sibling
    }
    function Dp(e, t, a, o) {
        var s = t.flags;
        switch (t.tag) {
        case 0:
        case 11:
        case 15:
            wn(e, t, a, o),
            s & 2048 && ol(9, t);
            break;
        case 1:
            wn(e, t, a, o);
            break;
        case 3:
            wn(e, t, a, o),
            s & 2048 && (e = null,
            t.alternate !== null && (e = t.alternate.memoizedState.cache),
            t = t.memoizedState.cache,
            t !== e && (t.refCount++,
            e != null && Io(e)));
            break;
        case 12:
            if (s & 2048) {
                wn(e, t, a, o),
                e = t.stateNode;
                try {
                    var f = t.memoizedProps
                      , x = f.id
                      , S = f.onPostCommit;
                    typeof S == "function" && S(x, t.alternate === null ? "mount" : "update", e.passiveEffectDuration, -0)
                } catch (M) {
                    Ve(t, t.return, M)
                }
            } else
                wn(e, t, a, o);
            break;
        case 13:
            wn(e, t, a, o);
            break;
        case 23:
            break;
        case 22:
            f = t.stateNode,
            x = t.alternate,
            t.memoizedState !== null ? f._visibility & 2 ? wn(e, t, a, o) : il(e, t) : f._visibility & 2 ? wn(e, t, a, o) : (f._visibility |= 2,
            Ir(e, t, a, o, (t.subtreeFlags & 10256) !== 0)),
            s & 2048 && Ou(x, t);
            break;
        case 24:
            wn(e, t, a, o),
            s & 2048 && Du(t.alternate, t);
            break;
        default:
            wn(e, t, a, o)
        }
    }
    function Ir(e, t, a, o, s) {
        for (s = s && (t.subtreeFlags & 10256) !== 0,
        t = t.child; t !== null; ) {
            var f = e
              , x = t
              , S = a
              , M = o
              , L = x.flags;
            switch (x.tag) {
            case 0:
            case 11:
            case 15:
                Ir(f, x, S, M, s),
                ol(8, x);
                break;
            case 23:
                break;
            case 22:
                var q = x.stateNode;
                x.memoizedState !== null ? q._visibility & 2 ? Ir(f, x, S, M, s) : il(f, x) : (q._visibility |= 2,
                Ir(f, x, S, M, s)),
                s && L & 2048 && Ou(x.alternate, x);
                break;
            case 24:
                Ir(f, x, S, M, s),
                s && L & 2048 && Du(x.alternate, x);
                break;
            default:
                Ir(f, x, S, M, s)
            }
            t = t.sibling
        }
    }
    function il(e, t) {
        if (t.subtreeFlags & 10256)
            for (t = t.child; t !== null; ) {
                var a = e
                  , o = t
                  , s = o.flags;
                switch (o.tag) {
                case 22:
                    il(a, o),
                    s & 2048 && Ou(o.alternate, o);
                    break;
                case 24:
                    il(a, o),
                    s & 2048 && Du(o.alternate, o);
                    break;
                default:
                    il(a, o)
                }
                t = t.sibling
            }
    }
    var sl = 8192;
    function Xr(e) {
        if (e.subtreeFlags & sl)
            for (e = e.child; e !== null; )
                jp(e),
                e = e.sibling
    }
    function jp(e) {
        switch (e.tag) {
        case 26:
            Xr(e),
            e.flags & sl && e.memoizedState !== null && zS(un, e.memoizedState, e.memoizedProps);
            break;
        case 5:
            Xr(e);
            break;
        case 3:
        case 4:
            var t = un;
            un = Wi(e.stateNode.containerInfo),
            Xr(e),
            un = t;
            break;
        case 22:
            e.memoizedState === null && (t = e.alternate,
            t !== null && t.memoizedState !== null ? (t = sl,
            sl = 16777216,
            Xr(e),
            sl = t) : Xr(e));
            break;
        default:
            Xr(e)
        }
    }
    function kp(e) {
        var t = e.alternate;
        if (t !== null && (e = t.child,
        e !== null)) {
            t.child = null;
            do
                t = e.sibling,
                e.sibling = null,
                e = t;
            while (e !== null)
        }
    }
    function cl(e) {
        var t = e.deletions;
        if ((e.flags & 16) !== 0) {
            if (t !== null)
                for (var a = 0; a < t.length; a++) {
                    var o = t[a];
                    ht = o,
                    Lp(o, e)
                }
            kp(e)
        }
        if (e.subtreeFlags & 10256)
            for (e = e.child; e !== null; )
                zp(e),
                e = e.sibling
    }
    function zp(e) {
        switch (e.tag) {
        case 0:
        case 11:
        case 15:
            cl(e),
            e.flags & 2048 && ga(9, e, e.return);
            break;
        case 3:
            cl(e);
            break;
        case 12:
            cl(e);
            break;
        case 22:
            var t = e.stateNode;
            e.memoizedState !== null && t._visibility & 2 && (e.return === null || e.return.tag !== 13) ? (t._visibility &= -3,
            Pi(e)) : cl(e);
            break;
        default:
            cl(e)
        }
    }
    function Pi(e) {
        var t = e.deletions;
        if ((e.flags & 16) !== 0) {
            if (t !== null)
                for (var a = 0; a < t.length; a++) {
                    var o = t[a];
                    ht = o,
                    Lp(o, e)
                }
            kp(e)
        }
        for (e = e.child; e !== null; ) {
            switch (t = e,
            t.tag) {
            case 0:
            case 11:
            case 15:
                ga(8, t, t.return),
                Pi(t);
                break;
            case 22:
                a = t.stateNode,
                a._visibility & 2 && (a._visibility &= -3,
                Pi(t));
                break;
            default:
                Pi(t)
            }
            e = e.sibling
        }
    }
    function Lp(e, t) {
        for (; ht !== null; ) {
            var a = ht;
            switch (a.tag) {
            case 0:
            case 11:
            case 15:
                ga(8, a, t);
                break;
            case 23:
            case 22:
                if (a.memoizedState !== null && a.memoizedState.cachePool !== null) {
                    var o = a.memoizedState.cachePool.pool;
                    o != null && o.refCount++
                }
                break;
            case 24:
                Io(a.memoizedState.cache)
            }
            if (o = a.child,
            o !== null)
                o.return = a,
                ht = o;
            else
                e: for (a = e; ht !== null; ) {
                    o = ht;
                    var s = o.sibling
                      , f = o.return;
                    if (Ap(o),
                    o === a) {
                        ht = null;
                        break e
                    }
                    if (s !== null) {
                        s.return = f,
                        ht = s;
                        break e
                    }
                    ht = f
                }
        }
    }
    var Fw = {
        getCacheForType: function(e) {
            var t = Et(ot)
              , a = t.data.get(e);
            return a === void 0 && (a = e(),
            t.data.set(e, a)),
            a
        }
    }
      , Ww = typeof WeakMap == "function" ? WeakMap : Map
      , Le = 0
      , Ye = null
      , Re = null
      , je = 0
      , Be = 0
      , Vt = null
      , ba = !1
      , $r = !1
      , ju = !1
      , Kn = 0
      , Ke = 0
      , xa = 0
      , rr = 0
      , ku = 0
      , tn = 0
      , Kr = 0
      , ul = null
      , kt = null
      , zu = !1
      , Lu = 0
      , Vi = 1 / 0
      , Gi = null
      , wa = null
      , wt = 0
      , Sa = null
      , Qr = null
      , Zr = 0
      , Bu = 0
      , Uu = null
      , Bp = null
      , fl = 0
      , Hu = null;
    function Gt() {
        if ((Le & 2) !== 0 && je !== 0)
            return je & -je;
        if (_.T !== null) {
            var e = Br;
            return e !== 0 ? e : Xu()
        }
        return Ga()
    }
    function Up() {
        tn === 0 && (tn = (je & 536870912) === 0 || ze ? sn() : 536870912);
        var e = en.current;
        return e !== null && (e.flags |= 32),
        tn
    }
    function Yt(e, t, a) {
        (e === Ye && (Be === 2 || Be === 9) || e.cancelPendingCommit !== null) && (Fr(e, 0),
        Ea(e, je, tn, !1)),
        ia(e, a),
        ((Le & 2) === 0 || e !== Ye) && (e === Ye && ((Le & 2) === 0 && (rr |= a),
        Ke === 4 && Ea(e, je, tn, !1)),
        Sn(e))
    }
    function Hp(e, t, a) {
        if ((Le & 6) !== 0)
            throw Error(i(327));
        var o = !a && (t & 124) === 0 && (t & e.expiredLanes) === 0 || Va(e, t)
          , s = o ? tS(e, t) : Gu(e, t, !0)
          , f = o;
        do {
            if (s === 0) {
                $r && !o && Ea(e, t, 0, !1);
                break
            } else {
                if (a = e.current.alternate,
                f && !Jw(a)) {
                    s = Gu(e, t, !1),
                    f = !1;
                    continue
                }
                if (s === 2) {
                    if (f = t,
                    e.errorRecoveryDisabledLanes & f)
                        var x = 0;
                    else
                        x = e.pendingLanes & -536870913,
                        x = x !== 0 ? x : x & 536870912 ? 536870912 : 0;
                    if (x !== 0) {
                        t = x;
                        e: {
                            var S = e;
                            s = ul;
                            var M = S.current.memoizedState.isDehydrated;
                            if (M && (Fr(S, x).flags |= 256),
                            x = Gu(S, x, !1),
                            x !== 2) {
                                if (ju && !M) {
                                    S.errorRecoveryDisabledLanes |= f,
                                    rr |= f,
                                    s = 4;
                                    break e
                                }
                                f = kt,
                                kt = s,
                                f !== null && (kt === null ? kt = f : kt.push.apply(kt, f))
                            }
                            s = x
                        }
                        if (f = !1,
                        s !== 2)
                            continue
                    }
                }
                if (s === 1) {
                    Fr(e, 0),
                    Ea(e, t, 0, !0);
                    break
                }
                e: {
                    switch (o = e,
                    f = s,
                    f) {
                    case 0:
                    case 1:
                        throw Error(i(345));
                    case 4:
                        if ((t & 4194048) !== t)
                            break;
                    case 6:
                        Ea(o, t, tn, !ba);
                        break e;
                    case 2:
                        kt = null;
                        break;
                    case 3:
                    case 5:
                        break;
                    default:
                        throw Error(i(329))
                    }
                    if ((t & 62914560) === t && (s = Lu + 300 - et(),
                    10 < s)) {
                        if (Ea(o, t, tn, !ba),
                        Pa(o, 0, !0) !== 0)
                            break e;
                        o.timeoutHandle = hg(Pp.bind(null, o, a, kt, Gi, zu, t, tn, rr, Kr, ba, f, 2, -0, 0), s);
                        break e
                    }
                    Pp(o, a, kt, Gi, zu, t, tn, rr, Kr, ba, f, 0, -0, 0)
                }
            }
            break
        } while (!0);
        Sn(e)
    }
    function Pp(e, t, a, o, s, f, x, S, M, L, q, X, H, P) {
        if (e.timeoutHandle = -1,
        X = t.subtreeFlags,
        (X & 8192 || (X & 16785408) === 16785408) && (yl = {
            stylesheets: null,
            count: 0,
            unsuspend: kS
        },
        jp(t),
        X = LS(),
        X !== null)) {
            e.cancelPendingCommit = X($p.bind(null, e, t, f, a, o, s, x, S, M, q, 1, H, P)),
            Ea(e, f, x, !L);
            return
        }
        $p(e, t, f, a, o, s, x, S, M)
    }
    function Jw(e) {
        for (var t = e; ; ) {
            var a = t.tag;
            if ((a === 0 || a === 11 || a === 15) && t.flags & 16384 && (a = t.updateQueue,
            a !== null && (a = a.stores,
            a !== null)))
                for (var o = 0; o < a.length; o++) {
                    var s = a[o]
                      , f = s.getSnapshot;
                    s = s.value;
                    try {
                        if (!Bt(f(), s))
                            return !1
                    } catch {
                        return !1
                    }
                }
            if (a = t.child,
            t.subtreeFlags & 16384 && a !== null)
                a.return = t,
                t = a;
            else {
                if (t === e)
                    break;
                for (; t.sibling === null; ) {
                    if (t.return === null || t.return === e)
                        return !0;
                    t = t.return
                }
                t.sibling.return = t.return,
                t = t.sibling
            }
        }
        return !0
    }
    function Ea(e, t, a, o) {
        t &= ~ku,
        t &= ~rr,
        e.suspendedLanes |= t,
        e.pingedLanes &= ~t,
        o && (e.warmLanes |= t),
        o = e.expirationTimes;
        for (var s = t; 0 < s; ) {
            var f = 31 - yt(s)
              , x = 1 << f;
            o[f] = -1,
            s &= ~x
        }
        a !== 0 && ye(e, a, t)
    }
    function Yi() {
        return (Le & 6) === 0 ? (dl(0),
        !1) : !0
    }
    function Pu() {
        if (Re !== null) {
            if (Be === 0)
                var e = Re.return;
            else
                e = Re,
                Pn = Wa = null,
                au(e),
                Yr = null,
                nl = 0,
                e = Re;
            for (; e !== null; )
                bp(e.alternate, e),
                e = e.return;
            Re = null
        }
    }
    function Fr(e, t) {
        var a = e.timeoutHandle;
        a !== -1 && (e.timeoutHandle = -1,
        vS(a)),
        a = e.cancelPendingCommit,
        a !== null && (e.cancelPendingCommit = null,
        a()),
        Pu(),
        Ye = e,
        Re = a = Bn(e.current, null),
        je = t,
        Be = 0,
        Vt = null,
        ba = !1,
        $r = Va(e, t),
        ju = !1,
        Kr = tn = ku = rr = xa = Ke = 0,
        kt = ul = null,
        zu = !1,
        (t & 8) !== 0 && (t |= t & 32);
        var o = e.entangledLanes;
        if (o !== 0)
            for (e = e.entanglements,
            o &= t; 0 < o; ) {
                var s = 31 - yt(o)
                  , f = 1 << s;
                t |= e[s],
                o &= ~f
            }
        return Kn = t,
        fi(),
        a
    }
    function Vp(e, t) {
        we = null,
        _.H = _i,
        t === $o || t === xi ? (t = rh(),
        Be = 3) : t === th ? (t = rh(),
        Be = 4) : Be = t === op ? 8 : t !== null && typeof t == "object" && typeof t.then == "function" ? 6 : 1,
        Vt = t,
        Re === null && (Ke = 1,
        zi(e, Zt(t, e.current)))
    }
    function Gp() {
        var e = _.H;
        return _.H = _i,
        e === null ? _i : e
    }
    function Yp() {
        var e = _.A;
        return _.A = Fw,
        e
    }
    function Vu() {
        Ke = 4,
        ba || (je & 4194048) !== je && en.current !== null || ($r = !0),
        (xa & 134217727) === 0 && (rr & 134217727) === 0 || Ye === null || Ea(Ye, je, tn, !1)
    }
    function Gu(e, t, a) {
        var o = Le;
        Le |= 2;
        var s = Gp()
          , f = Yp();
        (Ye !== e || je !== t) && (Gi = null,
        Fr(e, t)),
        t = !1;
        var x = Ke;
        e: do
            try {
                if (Be !== 0 && Re !== null) {
                    var S = Re
                      , M = Vt;
                    switch (Be) {
                    case 8:
                        Pu(),
                        x = 6;
                        break e;
                    case 3:
                    case 2:
                    case 9:
                    case 6:
                        en.current === null && (t = !0);
                        var L = Be;
                        if (Be = 0,
                        Vt = null,
                        Wr(e, S, M, L),
                        a && $r) {
                            x = 0;
                            break e
                        }
                        break;
                    default:
                        L = Be,
                        Be = 0,
                        Vt = null,
                        Wr(e, S, M, L)
                    }
                }
                eS(),
                x = Ke;
                break
            } catch (q) {
                Vp(e, q)
            }
        while (!0);
        return t && e.shellSuspendCounter++,
        Pn = Wa = null,
        Le = o,
        _.H = s,
        _.A = f,
        Re === null && (Ye = null,
        je = 0,
        fi()),
        x
    }
    function eS() {
        for (; Re !== null; )
            qp(Re)
    }
    function tS(e, t) {
        var a = Le;
        Le |= 2;
        var o = Gp()
          , s = Yp();
        Ye !== e || je !== t ? (Gi = null,
        Vi = et() + 500,
        Fr(e, t)) : $r = Va(e, t);
        e: do
            try {
                if (Be !== 0 && Re !== null) {
                    t = Re;
                    var f = Vt;
                    t: switch (Be) {
                    case 1:
                        Be = 0,
                        Vt = null,
                        Wr(e, t, f, 1);
                        break;
                    case 2:
                    case 9:
                        if (nh(f)) {
                            Be = 0,
                            Vt = null,
                            Ip(t);
                            break
                        }
                        t = function() {
                            Be !== 2 && Be !== 9 || Ye !== e || (Be = 7),
                            Sn(e)
                        }
                        ,
                        f.then(t, t);
                        break e;
                    case 3:
                        Be = 7;
                        break e;
                    case 4:
                        Be = 5;
                        break e;
                    case 7:
                        nh(f) ? (Be = 0,
                        Vt = null,
                        Ip(t)) : (Be = 0,
                        Vt = null,
                        Wr(e, t, f, 7));
                        break;
                    case 5:
                        var x = null;
                        switch (Re.tag) {
                        case 26:
                            x = Re.memoizedState;
                        case 5:
                        case 27:
                            var S = Re;
                            if (!x || Rg(x)) {
                                Be = 0,
                                Vt = null;
                                var M = S.sibling;
                                if (M !== null)
                                    Re = M;
                                else {
                                    var L = S.return;
                                    L !== null ? (Re = L,
                                    qi(L)) : Re = null
                                }
                                break t
                            }
                        }
                        Be = 0,
                        Vt = null,
                        Wr(e, t, f, 5);
                        break;
                    case 6:
                        Be = 0,
                        Vt = null,
                        Wr(e, t, f, 6);
                        break;
                    case 8:
                        Pu(),
                        Ke = 6;
                        break e;
                    default:
                        throw Error(i(462))
                    }
                }
                nS();
                break
            } catch (q) {
                Vp(e, q)
            }
        while (!0);
        return Pn = Wa = null,
        _.H = o,
        _.A = s,
        Le = a,
        Re !== null ? 0 : (Ye = null,
        je = 0,
        fi(),
        Ke)
    }
    function nS() {
        for (; Re !== null && !Ha(); )
            qp(Re)
    }
    function qp(e) {
        var t = vp(e.alternate, e, Kn);
        e.memoizedProps = e.pendingProps,
        t === null ? qi(e) : Re = t
    }
    function Ip(e) {
        var t = e
          , a = t.alternate;
        switch (t.tag) {
        case 15:
        case 0:
            t = fp(a, t, t.pendingProps, t.type, void 0, je);
            break;
        case 11:
            t = fp(a, t, t.pendingProps, t.type.render, t.ref, je);
            break;
        case 5:
            au(t);
        default:
            bp(a, t),
            t = Re = Xm(t, Kn),
            t = vp(a, t, Kn)
        }
        e.memoizedProps = e.pendingProps,
        t === null ? qi(e) : Re = t
    }
    function Wr(e, t, a, o) {
        Pn = Wa = null,
        au(t),
        Yr = null,
        nl = 0;
        var s = t.return;
        try {
            if (Iw(e, s, t, a, je)) {
                Ke = 1,
                zi(e, Zt(a, e.current)),
                Re = null;
                return
            }
        } catch (f) {
            if (s !== null)
                throw Re = s,
                f;
            Ke = 1,
            zi(e, Zt(a, e.current)),
            Re = null;
            return
        }
        t.flags & 32768 ? (ze || o === 1 ? e = !0 : $r || (je & 536870912) !== 0 ? e = !1 : (ba = e = !0,
        (o === 2 || o === 9 || o === 3 || o === 6) && (o = en.current,
        o !== null && o.tag === 13 && (o.flags |= 16384))),
        Xp(t, e)) : qi(t)
    }
    function qi(e) {
        var t = e;
        do {
            if ((t.flags & 32768) !== 0) {
                Xp(t, ba);
                return
            }
            e = t.return;
            var a = $w(t.alternate, t, Kn);
            if (a !== null) {
                Re = a;
                return
            }
            if (t = t.sibling,
            t !== null) {
                Re = t;
                return
            }
            Re = t = e
        } while (t !== null);
        Ke === 0 && (Ke = 5)
    }
    function Xp(e, t) {
        do {
            var a = Kw(e.alternate, e);
            if (a !== null) {
                a.flags &= 32767,
                Re = a;
                return
            }
            if (a = e.return,
            a !== null && (a.flags |= 32768,
            a.subtreeFlags = 0,
            a.deletions = null),
            !t && (e = e.sibling,
            e !== null)) {
                Re = e;
                return
            }
            Re = e = a
        } while (e !== null);
        Ke = 6,
        Re = null
    }
    function $p(e, t, a, o, s, f, x, S, M) {
        e.cancelPendingCommit = null;
        do
            Ii();
        while (wt !== 0);
        if ((Le & 6) !== 0)
            throw Error(i(327));
        if (t !== null) {
            if (t === e.current)
                throw Error(i(177));
            if (f = t.lanes | t.childLanes,
            f |= Dc,
            Jl(e, a, f, x, S, M),
            e === Ye && (Re = Ye = null,
            je = 0),
            Qr = t,
            Sa = e,
            Zr = a,
            Bu = f,
            Uu = s,
            Bp = o,
            (t.subtreeFlags & 10256) !== 0 || (t.flags & 10256) !== 0 ? (e.callbackNode = null,
            e.callbackPriority = 0,
            lS(gr, function() {
                return Wp(),
                null
            })) : (e.callbackNode = null,
            e.callbackPriority = 0),
            o = (t.flags & 13878) !== 0,
            (t.subtreeFlags & 13878) !== 0 || o) {
                o = _.T,
                _.T = null,
                s = G.p,
                G.p = 2,
                x = Le,
                Le |= 4;
                try {
                    Qw(e, t, a)
                } finally {
                    Le = x,
                    G.p = s,
                    _.T = o
                }
            }
            wt = 1,
            Kp(),
            Qp(),
            Zp()
        }
    }
    function Kp() {
        if (wt === 1) {
            wt = 0;
            var e = Sa
              , t = Qr
              , a = (t.flags & 13878) !== 0;
            if ((t.subtreeFlags & 13878) !== 0 || a) {
                a = _.T,
                _.T = null;
                var o = G.p;
                G.p = 2;
                var s = Le;
                Le |= 4;
                try {
                    _p(t, e);
                    var f = ef
                      , x = Lm(e.containerInfo)
                      , S = f.focusedElem
                      , M = f.selectionRange;
                    if (x !== S && S && S.ownerDocument && zm(S.ownerDocument.documentElement, S)) {
                        if (M !== null && Ac(S)) {
                            var L = M.start
                              , q = M.end;
                            if (q === void 0 && (q = L),
                            "selectionStart"in S)
                                S.selectionStart = L,
                                S.selectionEnd = Math.min(q, S.value.length);
                            else {
                                var X = S.ownerDocument || document
                                  , H = X && X.defaultView || window;
                                if (H.getSelection) {
                                    var P = H.getSelection()
                                      , ge = S.textContent.length
                                      , me = Math.min(M.start, ge)
                                      , Pe = M.end === void 0 ? me : Math.min(M.end, ge);
                                    !P.extend && me > Pe && (x = Pe,
                                    Pe = me,
                                    me = x);
                                    var k = km(S, me)
                                      , O = km(S, Pe);
                                    if (k && O && (P.rangeCount !== 1 || P.anchorNode !== k.node || P.anchorOffset !== k.offset || P.focusNode !== O.node || P.focusOffset !== O.offset)) {
                                        var z = X.createRange();
                                        z.setStart(k.node, k.offset),
                                        P.removeAllRanges(),
                                        me > Pe ? (P.addRange(z),
                                        P.extend(O.node, O.offset)) : (z.setEnd(O.node, O.offset),
                                        P.addRange(z))
                                    }
                                }
                            }
                        }
                        for (X = [],
                        P = S; P = P.parentNode; )
                            P.nodeType === 1 && X.push({
                                element: P,
                                left: P.scrollLeft,
                                top: P.scrollTop
                            });
                        for (typeof S.focus == "function" && S.focus(),
                        S = 0; S < X.length; S++) {
                            var I = X[S];
                            I.element.scrollLeft = I.left,
                            I.element.scrollTop = I.top
                        }
                    }
                    as = !!Ju,
                    ef = Ju = null
                } finally {
                    Le = s,
                    G.p = o,
                    _.T = a
                }
            }
            e.current = t,
            wt = 2
        }
    }
    function Qp() {
        if (wt === 2) {
            wt = 0;
            var e = Sa
              , t = Qr
              , a = (t.flags & 8772) !== 0;
            if ((t.subtreeFlags & 8772) !== 0 || a) {
                a = _.T,
                _.T = null;
                var o = G.p;
                G.p = 2;
                var s = Le;
                Le |= 4;
                try {
                    Rp(e, t.alternate, t)
                } finally {
                    Le = s,
                    G.p = o,
                    _.T = a
                }
            }
            wt = 3
        }
    }
    function Zp() {
        if (wt === 4 || wt === 3) {
            wt = 0,
            ra();
            var e = Sa
              , t = Qr
              , a = Zr
              , o = Bp;
            (t.subtreeFlags & 10256) !== 0 || (t.flags & 10256) !== 0 ? wt = 5 : (wt = 0,
            Qr = Sa = null,
            Fp(e, e.pendingLanes));
            var s = e.pendingLanes;
            if (s === 0 && (wa = null),
            bt(a),
            t = t.stateNode,
            At && typeof At.onCommitFiberRoot == "function")
                try {
                    At.onCommitFiberRoot(gn, t, void 0, (t.current.flags & 128) === 128)
                } catch {}
            if (o !== null) {
                t = _.T,
                s = G.p,
                G.p = 2,
                _.T = null;
                try {
                    for (var f = e.onRecoverableError, x = 0; x < o.length; x++) {
                        var S = o[x];
                        f(S.value, {
                            componentStack: S.stack
                        })
                    }
                } finally {
                    _.T = t,
                    G.p = s
                }
            }
            (Zr & 3) !== 0 && Ii(),
            Sn(e),
            s = e.pendingLanes,
            (a & 4194090) !== 0 && (s & 42) !== 0 ? e === Hu ? fl++ : (fl = 0,
            Hu = e) : fl = 0,
            dl(0)
        }
    }
    function Fp(e, t) {
        (e.pooledCacheLanes &= t) === 0 && (t = e.pooledCache,
        t != null && (e.pooledCache = null,
        Io(t)))
    }
    function Ii(e) {
        return Kp(),
        Qp(),
        Zp(),
        Wp()
    }
    function Wp() {
        if (wt !== 5)
            return !1;
        var e = Sa
          , t = Bu;
        Bu = 0;
        var a = bt(Zr)
          , o = _.T
          , s = G.p;
        try {
            G.p = 32 > a ? 32 : a,
            _.T = null,
            a = Uu,
            Uu = null;
            var f = Sa
              , x = Zr;
            if (wt = 0,
            Qr = Sa = null,
            Zr = 0,
            (Le & 6) !== 0)
                throw Error(i(331));
            var S = Le;
            if (Le |= 4,
            zp(f.current),
            Dp(f, f.current, x, a),
            Le = S,
            dl(0, !1),
            At && typeof At.onPostCommitFiberRoot == "function")
                try {
                    At.onPostCommitFiberRoot(gn, f)
                } catch {}
            return !0
        } finally {
            G.p = s,
            _.T = o,
            Fp(e, t)
        }
    }
    function Jp(e, t, a) {
        t = Zt(a, t),
        t = vu(e.stateNode, t, 2),
        e = da(e, t, 2),
        e !== null && (ia(e, 2),
        Sn(e))
    }
    function Ve(e, t, a) {
        if (e.tag === 3)
            Jp(e, e, a);
        else
            for (; t !== null; ) {
                if (t.tag === 3) {
                    Jp(t, e, a);
                    break
                } else if (t.tag === 1) {
                    var o = t.stateNode;
                    if (typeof t.type.getDerivedStateFromError == "function" || typeof o.componentDidCatch == "function" && (wa === null || !wa.has(o))) {
                        e = Zt(a, e),
                        a = ap(2),
                        o = da(t, a, 2),
                        o !== null && (rp(a, o, t, e),
                        ia(o, 2),
                        Sn(o));
                        break
                    }
                }
                t = t.return
            }
    }
    function Yu(e, t, a) {
        var o = e.pingCache;
        if (o === null) {
            o = e.pingCache = new Ww;
            var s = new Set;
            o.set(t, s)
        } else
            s = o.get(t),
            s === void 0 && (s = new Set,
            o.set(t, s));
        s.has(a) || (ju = !0,
        s.add(a),
        e = aS.bind(null, e, t, a),
        t.then(e, e))
    }
    function aS(e, t, a) {
        var o = e.pingCache;
        o !== null && o.delete(t),
        e.pingedLanes |= e.suspendedLanes & a,
        e.warmLanes &= ~a,
        Ye === e && (je & a) === a && (Ke === 4 || Ke === 3 && (je & 62914560) === je && 300 > et() - Lu ? (Le & 2) === 0 && Fr(e, 0) : ku |= a,
        Kr === je && (Kr = 0)),
        Sn(e)
    }
    function eg(e, t) {
        t === 0 && (t = Wl()),
        e = jr(e, t),
        e !== null && (ia(e, t),
        Sn(e))
    }
    function rS(e) {
        var t = e.memoizedState
          , a = 0;
        t !== null && (a = t.retryLane),
        eg(e, a)
    }
    function oS(e, t) {
        var a = 0;
        switch (e.tag) {
        case 13:
            var o = e.stateNode
              , s = e.memoizedState;
            s !== null && (a = s.retryLane);
            break;
        case 19:
            o = e.stateNode;
            break;
        case 22:
            o = e.stateNode._retryCache;
            break;
        default:
            throw Error(i(314))
        }
        o !== null && o.delete(t),
        eg(e, a)
    }
    function lS(e, t) {
        return ut(e, t)
    }
    var Xi = null
      , Jr = null
      , qu = !1
      , $i = !1
      , Iu = !1
      , or = 0;
    function Sn(e) {
        e !== Jr && e.next === null && (Jr === null ? Xi = Jr = e : Jr = Jr.next = e),
        $i = !0,
        qu || (qu = !0,
        sS())
    }
    function dl(e, t) {
        if (!Iu && $i) {
            Iu = !0;
            do
                for (var a = !1, o = Xi; o !== null; ) {
                    if (e !== 0) {
                        var s = o.pendingLanes;
                        if (s === 0)
                            var f = 0;
                        else {
                            var x = o.suspendedLanes
                              , S = o.pingedLanes;
                            f = (1 << 31 - yt(42 | e) + 1) - 1,
                            f &= s & ~(x & ~S),
                            f = f & 201326741 ? f & 201326741 | 1 : f ? f | 2 : 0
                        }
                        f !== 0 && (a = !0,
                        rg(o, f))
                    } else
                        f = je,
                        f = Pa(o, o === Ye ? f : 0, o.cancelPendingCommit !== null || o.timeoutHandle !== -1),
                        (f & 3) === 0 || Va(o, f) || (a = !0,
                        rg(o, f));
                    o = o.next
                }
            while (a);
            Iu = !1
        }
    }
    function iS() {
        tg()
    }
    function tg() {
        $i = qu = !1;
        var e = 0;
        or !== 0 && (gS() && (e = or),
        or = 0);
        for (var t = et(), a = null, o = Xi; o !== null; ) {
            var s = o.next
              , f = ng(o, t);
            f === 0 ? (o.next = null,
            a === null ? Xi = s : a.next = s,
            s === null && (Jr = a)) : (a = o,
            (e !== 0 || (f & 3) !== 0) && ($i = !0)),
            o = s
        }
        dl(e)
    }
    function ng(e, t) {
        for (var a = e.suspendedLanes, o = e.pingedLanes, s = e.expirationTimes, f = e.pendingLanes & -62914561; 0 < f; ) {
            var x = 31 - yt(f)
              , S = 1 << x
              , M = s[x];
            M === -1 ? ((S & a) === 0 || (S & o) !== 0) && (s[x] = Mo(S, t)) : M <= t && (e.expiredLanes |= S),
            f &= ~S
        }
        if (t = Ye,
        a = je,
        a = Pa(e, e === t ? a : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1),
        o = e.callbackNode,
        a === 0 || e === t && (Be === 2 || Be === 9) || e.cancelPendingCommit !== null)
            return o !== null && o !== null && Tt(o),
            e.callbackNode = null,
            e.callbackPriority = 0;
        if ((a & 3) === 0 || Va(e, a)) {
            if (t = a & -a,
            t === e.callbackPriority)
                return t;
            switch (o !== null && Tt(o),
            bt(a)) {
            case 2:
            case 8:
                a = Zl;
                break;
            case 32:
                a = gr;
                break;
            case 268435456:
                a = jn;
                break;
            default:
                a = gr
            }
            return o = ag.bind(null, e),
            a = ut(a, o),
            e.callbackPriority = t,
            e.callbackNode = a,
            t
        }
        return o !== null && o !== null && Tt(o),
        e.callbackPriority = 2,
        e.callbackNode = null,
        2
    }
    function ag(e, t) {
        if (wt !== 0 && wt !== 5)
            return e.callbackNode = null,
            e.callbackPriority = 0,
            null;
        var a = e.callbackNode;
        if (Ii() && e.callbackNode !== a)
            return null;
        var o = je;
        return o = Pa(e, e === Ye ? o : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1),
        o === 0 ? null : (Hp(e, o, t),
        ng(e, et()),
        e.callbackNode != null && e.callbackNode === a ? ag.bind(null, e) : null)
    }
    function rg(e, t) {
        if (Ii())
            return null;
        Hp(e, t, !0)
    }
    function sS() {
        yS(function() {
            (Le & 6) !== 0 ? ut($t, iS) : tg()
        })
    }
    function Xu() {
        return or === 0 && (or = sn()),
        or
    }
    function og(e) {
        return e == null || typeof e == "symbol" || typeof e == "boolean" ? null : typeof e == "function" ? e : ri("" + e)
    }
    function lg(e, t) {
        var a = t.ownerDocument.createElement("input");
        return a.name = t.name,
        a.value = t.value,
        e.id && a.setAttribute("form", e.id),
        t.parentNode.insertBefore(a, t),
        e = new FormData(e),
        a.parentNode.removeChild(a),
        e
    }
    function cS(e, t, a, o, s) {
        if (t === "submit" && a && a.stateNode === s) {
            var f = og((s[Ge] || null).action)
              , x = o.submitter;
            x && (t = (t = x[Ge] || null) ? og(t.formAction) : x.getAttribute("formAction"),
            t !== null && (f = t,
            x = null));
            var S = new si("action","action",null,o,s);
            e.push({
                event: S,
                listeners: [{
                    instance: null,
                    listener: function() {
                        if (o.defaultPrevented) {
                            if (or !== 0) {
                                var M = x ? lg(s, x) : new FormData(s);
                                du(a, {
                                    pending: !0,
                                    data: M,
                                    method: s.method,
                                    action: f
                                }, null, M)
                            }
                        } else
                            typeof f == "function" && (S.preventDefault(),
                            M = x ? lg(s, x) : new FormData(s),
                            du(a, {
                                pending: !0,
                                data: M,
                                method: s.method,
                                action: f
                            }, f, M))
                    },
                    currentTarget: s
                }]
            })
        }
    }
    for (var $u = 0; $u < Oc.length; $u++) {
        var Ku = Oc[$u]
          , uS = Ku.toLowerCase()
          , fS = Ku[0].toUpperCase() + Ku.slice(1);
        cn(uS, "on" + fS)
    }
    cn(Hm, "onAnimationEnd"),
    cn(Pm, "onAnimationIteration"),
    cn(Vm, "onAnimationStart"),
    cn("dblclick", "onDoubleClick"),
    cn("focusin", "onFocus"),
    cn("focusout", "onBlur"),
    cn(Mw, "onTransitionRun"),
    cn(Nw, "onTransitionStart"),
    cn(_w, "onTransitionCancel"),
    cn(Gm, "onTransitionEnd"),
    Er("onMouseEnter", ["mouseout", "mouseover"]),
    Er("onMouseLeave", ["mouseout", "mouseover"]),
    Er("onPointerEnter", ["pointerout", "pointerover"]),
    Er("onPointerLeave", ["pointerout", "pointerover"]),
    Ya("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")),
    Ya("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),
    Ya("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]),
    Ya("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")),
    Ya("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")),
    Ya("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
    var ml = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" ")
      , dS = new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));
    function ig(e, t) {
        t = (t & 4) !== 0;
        for (var a = 0; a < e.length; a++) {
            var o = e[a]
              , s = o.event;
            o = o.listeners;
            e: {
                var f = void 0;
                if (t)
                    for (var x = o.length - 1; 0 <= x; x--) {
                        var S = o[x]
                          , M = S.instance
                          , L = S.currentTarget;
                        if (S = S.listener,
                        M !== f && s.isPropagationStopped())
                            break e;
                        f = S,
                        s.currentTarget = L;
                        try {
                            f(s)
                        } catch (q) {
                            ki(q)
                        }
                        s.currentTarget = null,
                        f = M
                    }
                else
                    for (x = 0; x < o.length; x++) {
                        if (S = o[x],
                        M = S.instance,
                        L = S.currentTarget,
                        S = S.listener,
                        M !== f && s.isPropagationStopped())
                            break e;
                        f = S,
                        s.currentTarget = L;
                        try {
                            f(s)
                        } catch (q) {
                            ki(q)
                        }
                        s.currentTarget = null,
                        f = M
                    }
            }
        }
    }
    function Ae(e, t) {
        var a = t[br];
        a === void 0 && (a = t[br] = new Set);
        var o = e + "__bubble";
        a.has(o) || (sg(t, e, 2, !1),
        a.add(o))
    }
    function Qu(e, t, a) {
        var o = 0;
        t && (o |= 4),
        sg(a, e, o, t)
    }
    var Ki = "_reactListening" + Math.random().toString(36).slice(2);
    function Zu(e) {
        if (!e[Ki]) {
            e[Ki] = !0,
            tm.forEach(function(a) {
                a !== "selectionchange" && (dS.has(a) || Qu(a, !1, e),
                Qu(a, !0, e))
            });
            var t = e.nodeType === 9 ? e : e.ownerDocument;
            t === null || t[Ki] || (t[Ki] = !0,
            Qu("selectionchange", !1, t))
        }
    }
    function sg(e, t, a, o) {
        switch (Dg(t)) {
        case 2:
            var s = HS;
            break;
        case 8:
            s = PS;
            break;
        default:
            s = ff
        }
        a = s.bind(null, t, a, e),
        s = void 0,
        !yc || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (s = !0),
        o ? s !== void 0 ? e.addEventListener(t, a, {
            capture: !0,
            passive: s
        }) : e.addEventListener(t, a, !0) : s !== void 0 ? e.addEventListener(t, a, {
            passive: s
        }) : e.addEventListener(t, a, !1)
    }
    function Fu(e, t, a, o, s) {
        var f = o;
        if ((t & 1) === 0 && (t & 2) === 0 && o !== null)
            e: for (; ; ) {
                if (o === null)
                    return;
                var x = o.tag;
                if (x === 3 || x === 4) {
                    var S = o.stateNode.containerInfo;
                    if (S === s)
                        break;
                    if (x === 4)
                        for (x = o.return; x !== null; ) {
                            var M = x.tag;
                            if ((M === 3 || M === 4) && x.stateNode.containerInfo === s)
                                return;
                            x = x.return
                        }
                    for (; S !== null; ) {
                        if (x = xr(S),
                        x === null)
                            return;
                        if (M = x.tag,
                        M === 5 || M === 6 || M === 26 || M === 27) {
                            o = f = x;
                            continue e
                        }
                        S = S.parentNode
                    }
                }
                o = o.return
            }
        pm(function() {
            var L = f
              , q = gc(a)
              , X = [];
            e: {
                var H = Ym.get(e);
                if (H !== void 0) {
                    var P = si
                      , ge = e;
                    switch (e) {
                    case "keypress":
                        if (li(a) === 0)
                            break e;
                    case "keydown":
                    case "keyup":
                        P = lw;
                        break;
                    case "focusin":
                        ge = "focus",
                        P = Sc;
                        break;
                    case "focusout":
                        ge = "blur",
                        P = Sc;
                        break;
                    case "beforeblur":
                    case "afterblur":
                        P = Sc;
                        break;
                    case "click":
                        if (a.button === 2)
                            break e;
                    case "auxclick":
                    case "dblclick":
                    case "mousedown":
                    case "mousemove":
                    case "mouseup":
                    case "mouseout":
                    case "mouseover":
                    case "contextmenu":
                        P = ym;
                        break;
                    case "drag":
                    case "dragend":
                    case "dragenter":
                    case "dragexit":
                    case "dragleave":
                    case "dragover":
                    case "dragstart":
                    case "drop":
                        P = Kx;
                        break;
                    case "touchcancel":
                    case "touchend":
                    case "touchmove":
                    case "touchstart":
                        P = cw;
                        break;
                    case Hm:
                    case Pm:
                    case Vm:
                        P = Fx;
                        break;
                    case Gm:
                        P = fw;
                        break;
                    case "scroll":
                    case "scrollend":
                        P = Xx;
                        break;
                    case "wheel":
                        P = mw;
                        break;
                    case "copy":
                    case "cut":
                    case "paste":
                        P = Jx;
                        break;
                    case "gotpointercapture":
                    case "lostpointercapture":
                    case "pointercancel":
                    case "pointerdown":
                    case "pointermove":
                    case "pointerout":
                    case "pointerover":
                    case "pointerup":
                        P = xm;
                        break;
                    case "toggle":
                    case "beforetoggle":
                        P = pw
                    }
                    var me = (t & 4) !== 0
                      , Pe = !me && (e === "scroll" || e === "scrollend")
                      , k = me ? H !== null ? H + "Capture" : null : H;
                    me = [];
                    for (var O = L, z; O !== null; ) {
                        var I = O;
                        if (z = I.stateNode,
                        I = I.tag,
                        I !== 5 && I !== 26 && I !== 27 || z === null || k === null || (I = Do(O, k),
                        I != null && me.push(hl(O, I, z))),
                        Pe)
                            break;
                        O = O.return
                    }
                    0 < me.length && (H = new P(H,ge,null,a,q),
                    X.push({
                        event: H,
                        listeners: me
                    }))
                }
            }
            if ((t & 7) === 0) {
                e: {
                    if (H = e === "mouseover" || e === "pointerover",
                    P = e === "mouseout" || e === "pointerout",
                    H && a !== pc && (ge = a.relatedTarget || a.fromElement) && (xr(ge) || ge[ft]))
                        break e;
                    if ((P || H) && (H = q.window === q ? q : (H = q.ownerDocument) ? H.defaultView || H.parentWindow : window,
                    P ? (ge = a.relatedTarget || a.toElement,
                    P = L,
                    ge = ge ? xr(ge) : null,
                    ge !== null && (Pe = u(ge),
                    me = ge.tag,
                    ge !== Pe || me !== 5 && me !== 27 && me !== 6) && (ge = null)) : (P = null,
                    ge = L),
                    P !== ge)) {
                        if (me = ym,
                        I = "onMouseLeave",
                        k = "onMouseEnter",
                        O = "mouse",
                        (e === "pointerout" || e === "pointerover") && (me = xm,
                        I = "onPointerLeave",
                        k = "onPointerEnter",
                        O = "pointer"),
                        Pe = P == null ? H : Oo(P),
                        z = ge == null ? H : Oo(ge),
                        H = new me(I,O + "leave",P,a,q),
                        H.target = Pe,
                        H.relatedTarget = z,
                        I = null,
                        xr(q) === L && (me = new me(k,O + "enter",ge,a,q),
                        me.target = z,
                        me.relatedTarget = Pe,
                        I = me),
                        Pe = I,
                        P && ge)
                            t: {
                                for (me = P,
                                k = ge,
                                O = 0,
                                z = me; z; z = eo(z))
                                    O++;
                                for (z = 0,
                                I = k; I; I = eo(I))
                                    z++;
                                for (; 0 < O - z; )
                                    me = eo(me),
                                    O--;
                                for (; 0 < z - O; )
                                    k = eo(k),
                                    z--;
                                for (; O--; ) {
                                    if (me === k || k !== null && me === k.alternate)
                                        break t;
                                    me = eo(me),
                                    k = eo(k)
                                }
                                me = null
                            }
                        else
                            me = null;
                        P !== null && cg(X, H, P, me, !1),
                        ge !== null && Pe !== null && cg(X, Pe, ge, me, !0)
                    }
                }
                e: {
                    if (H = L ? Oo(L) : window,
                    P = H.nodeName && H.nodeName.toLowerCase(),
                    P === "select" || P === "input" && H.type === "file")
                        var ae = Mm;
                    else if (Rm(H))
                        if (Nm)
                            ae = Tw;
                        else {
                            ae = Ew;
                            var Te = Sw
                        }
                    else
                        P = H.nodeName,
                        !P || P.toLowerCase() !== "input" || H.type !== "checkbox" && H.type !== "radio" ? L && hc(L.elementType) && (ae = Mm) : ae = Cw;
                    if (ae && (ae = ae(e, L))) {
                        Am(X, ae, a, q);
                        break e
                    }
                    Te && Te(e, H, L),
                    e === "focusout" && L && H.type === "number" && L.memoizedProps.value != null && mc(H, "number", H.value)
                }
                switch (Te = L ? Oo(L) : window,
                e) {
                case "focusin":
                    (Rm(Te) || Te.contentEditable === "true") && (_r = Te,
                    Mc = L,
                    Po = null);
                    break;
                case "focusout":
                    Po = Mc = _r = null;
                    break;
                case "mousedown":
                    Nc = !0;
                    break;
                case "contextmenu":
                case "mouseup":
                case "dragend":
                    Nc = !1,
                    Bm(X, a, q);
                    break;
                case "selectionchange":
                    if (Aw)
                        break;
                case "keydown":
                case "keyup":
                    Bm(X, a, q)
                }
                var fe;
                if (Cc)
                    e: {
                        switch (e) {
                        case "compositionstart":
                            var he = "onCompositionStart";
                            break e;
                        case "compositionend":
                            he = "onCompositionEnd";
                            break e;
                        case "compositionupdate":
                            he = "onCompositionUpdate";
                            break e
                        }
                        he = void 0
                    }
                else
                    Nr ? Cm(e, a) && (he = "onCompositionEnd") : e === "keydown" && a.keyCode === 229 && (he = "onCompositionStart");
                he && (wm && a.locale !== "ko" && (Nr || he !== "onCompositionStart" ? he === "onCompositionEnd" && Nr && (fe = gm()) : (sa = q,
                bc = "value"in sa ? sa.value : sa.textContent,
                Nr = !0)),
                Te = Qi(L, he),
                0 < Te.length && (he = new bm(he,e,null,a,q),
                X.push({
                    event: he,
                    listeners: Te
                }),
                fe ? he.data = fe : (fe = Tm(a),
                fe !== null && (he.data = fe)))),
                (fe = vw ? yw(e, a) : bw(e, a)) && (he = Qi(L, "onBeforeInput"),
                0 < he.length && (Te = new bm("onBeforeInput","beforeinput",null,a,q),
                X.push({
                    event: Te,
                    listeners: he
                }),
                Te.data = fe)),
                cS(X, e, L, a, q)
            }
            ig(X, t)
        })
    }
    function hl(e, t, a) {
        return {
            instance: e,
            listener: t,
            currentTarget: a
        }
    }
    function Qi(e, t) {
        for (var a = t + "Capture", o = []; e !== null; ) {
            var s = e
              , f = s.stateNode;
            if (s = s.tag,
            s !== 5 && s !== 26 && s !== 27 || f === null || (s = Do(e, a),
            s != null && o.unshift(hl(e, s, f)),
            s = Do(e, t),
            s != null && o.push(hl(e, s, f))),
            e.tag === 3)
                return o;
            e = e.return
        }
        return []
    }
    function eo(e) {
        if (e === null)
            return null;
        do
            e = e.return;
        while (e && e.tag !== 5 && e.tag !== 27);
        return e || null
    }
    function cg(e, t, a, o, s) {
        for (var f = t._reactName, x = []; a !== null && a !== o; ) {
            var S = a
              , M = S.alternate
              , L = S.stateNode;
            if (S = S.tag,
            M !== null && M === o)
                break;
            S !== 5 && S !== 26 && S !== 27 || L === null || (M = L,
            s ? (L = Do(a, f),
            L != null && x.unshift(hl(a, L, M))) : s || (L = Do(a, f),
            L != null && x.push(hl(a, L, M)))),
            a = a.return
        }
        x.length !== 0 && e.push({
            event: t,
            listeners: x
        })
    }
    var mS = /\r\n?/g
      , hS = /\u0000|\uFFFD/g;
    function ug(e) {
        return (typeof e == "string" ? e : "" + e).replace(mS, `
`).replace(hS, "")
    }
    function fg(e, t) {
        return t = ug(t),
        ug(e) === t
    }
    function Zi() {}
    function He(e, t, a, o, s, f) {
        switch (a) {
        case "children":
            typeof o == "string" ? t === "body" || t === "textarea" && o === "" || Rr(e, o) : (typeof o == "number" || typeof o == "bigint") && t !== "body" && Rr(e, "" + o);
            break;
        case "className":
            ti(e, "class", o);
            break;
        case "tabIndex":
            ti(e, "tabindex", o);
            break;
        case "dir":
        case "role":
        case "viewBox":
        case "width":
        case "height":
            ti(e, a, o);
            break;
        case "style":
            mm(e, o, f);
            break;
        case "data":
            if (t !== "object") {
                ti(e, "data", o);
                break
            }
        case "src":
        case "href":
            if (o === "" && (t !== "a" || a !== "href")) {
                e.removeAttribute(a);
                break
            }
            if (o == null || typeof o == "function" || typeof o == "symbol" || typeof o == "boolean") {
                e.removeAttribute(a);
                break
            }
            o = ri("" + o),
            e.setAttribute(a, o);
            break;
        case "action":
        case "formAction":
            if (typeof o == "function") {
                e.setAttribute(a, "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");
                break
            } else
                typeof f == "function" && (a === "formAction" ? (t !== "input" && He(e, t, "name", s.name, s, null),
                He(e, t, "formEncType", s.formEncType, s, null),
                He(e, t, "formMethod", s.formMethod, s, null),
                He(e, t, "formTarget", s.formTarget, s, null)) : (He(e, t, "encType", s.encType, s, null),
                He(e, t, "method", s.method, s, null),
                He(e, t, "target", s.target, s, null)));
            if (o == null || typeof o == "symbol" || typeof o == "boolean") {
                e.removeAttribute(a);
                break
            }
            o = ri("" + o),
            e.setAttribute(a, o);
            break;
        case "onClick":
            o != null && (e.onclick = Zi);
            break;
        case "onScroll":
            o != null && Ae("scroll", e);
            break;
        case "onScrollEnd":
            o != null && Ae("scrollend", e);
            break;
        case "dangerouslySetInnerHTML":
            if (o != null) {
                if (typeof o != "object" || !("__html"in o))
                    throw Error(i(61));
                if (a = o.__html,
                a != null) {
                    if (s.children != null)
                        throw Error(i(60));
                    e.innerHTML = a
                }
            }
            break;
        case "multiple":
            e.multiple = o && typeof o != "function" && typeof o != "symbol";
            break;
        case "muted":
            e.muted = o && typeof o != "function" && typeof o != "symbol";
            break;
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "defaultValue":
        case "defaultChecked":
        case "innerHTML":
        case "ref":
            break;
        case "autoFocus":
            break;
        case "xlinkHref":
            if (o == null || typeof o == "function" || typeof o == "boolean" || typeof o == "symbol") {
                e.removeAttribute("xlink:href");
                break
            }
            a = ri("" + o),
            e.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", a);
            break;
        case "contentEditable":
        case "spellCheck":
        case "draggable":
        case "value":
        case "autoReverse":
        case "externalResourcesRequired":
        case "focusable":
        case "preserveAlpha":
            o != null && typeof o != "function" && typeof o != "symbol" ? e.setAttribute(a, "" + o) : e.removeAttribute(a);
            break;
        case "inert":
        case "allowFullScreen":
        case "async":
        case "autoPlay":
        case "controls":
        case "default":
        case "defer":
        case "disabled":
        case "disablePictureInPicture":
        case "disableRemotePlayback":
        case "formNoValidate":
        case "hidden":
        case "loop":
        case "noModule":
        case "noValidate":
        case "open":
        case "playsInline":
        case "readOnly":
        case "required":
        case "reversed":
        case "scoped":
        case "seamless":
        case "itemScope":
            o && typeof o != "function" && typeof o != "symbol" ? e.setAttribute(a, "") : e.removeAttribute(a);
            break;
        case "capture":
        case "download":
            o === !0 ? e.setAttribute(a, "") : o !== !1 && o != null && typeof o != "function" && typeof o != "symbol" ? e.setAttribute(a, o) : e.removeAttribute(a);
            break;
        case "cols":
        case "rows":
        case "size":
        case "span":
            o != null && typeof o != "function" && typeof o != "symbol" && !isNaN(o) && 1 <= o ? e.setAttribute(a, o) : e.removeAttribute(a);
            break;
        case "rowSpan":
        case "start":
            o == null || typeof o == "function" || typeof o == "symbol" || isNaN(o) ? e.removeAttribute(a) : e.setAttribute(a, o);
            break;
        case "popover":
            Ae("beforetoggle", e),
            Ae("toggle", e),
            ei(e, "popover", o);
            break;
        case "xlinkActuate":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:actuate", o);
            break;
        case "xlinkArcrole":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:arcrole", o);
            break;
        case "xlinkRole":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:role", o);
            break;
        case "xlinkShow":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:show", o);
            break;
        case "xlinkTitle":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:title", o);
            break;
        case "xlinkType":
            zn(e, "http://www.w3.org/1999/xlink", "xlink:type", o);
            break;
        case "xmlBase":
            zn(e, "http://www.w3.org/XML/1998/namespace", "xml:base", o);
            break;
        case "xmlLang":
            zn(e, "http://www.w3.org/XML/1998/namespace", "xml:lang", o);
            break;
        case "xmlSpace":
            zn(e, "http://www.w3.org/XML/1998/namespace", "xml:space", o);
            break;
        case "is":
            ei(e, "is", o);
            break;
        case "innerText":
        case "textContent":
            break;
        default:
            (!(2 < a.length) || a[0] !== "o" && a[0] !== "O" || a[1] !== "n" && a[1] !== "N") && (a = qx.get(a) || a,
            ei(e, a, o))
        }
    }
    function Wu(e, t, a, o, s, f) {
        switch (a) {
        case "style":
            mm(e, o, f);
            break;
        case "dangerouslySetInnerHTML":
            if (o != null) {
                if (typeof o != "object" || !("__html"in o))
                    throw Error(i(61));
                if (a = o.__html,
                a != null) {
                    if (s.children != null)
                        throw Error(i(60));
                    e.innerHTML = a
                }
            }
            break;
        case "children":
            typeof o == "string" ? Rr(e, o) : (typeof o == "number" || typeof o == "bigint") && Rr(e, "" + o);
            break;
        case "onScroll":
            o != null && Ae("scroll", e);
            break;
        case "onScrollEnd":
            o != null && Ae("scrollend", e);
            break;
        case "onClick":
            o != null && (e.onclick = Zi);
            break;
        case "suppressContentEditableWarning":
        case "suppressHydrationWarning":
        case "innerHTML":
        case "ref":
            break;
        case "innerText":
        case "textContent":
            break;
        default:
            if (!nm.hasOwnProperty(a))
                e: {
                    if (a[0] === "o" && a[1] === "n" && (s = a.endsWith("Capture"),
                    t = a.slice(2, s ? a.length - 7 : void 0),
                    f = e[Ge] || null,
                    f = f != null ? f[a] : null,
                    typeof f == "function" && e.removeEventListener(t, f, s),
                    typeof o == "function")) {
                        typeof f != "function" && f !== null && (a in e ? e[a] = null : e.hasAttribute(a) && e.removeAttribute(a)),
                        e.addEventListener(t, o, s);
                        break e
                    }
                    a in e ? e[a] = o : o === !0 ? e.setAttribute(a, "") : ei(e, a, o)
                }
        }
    }
    function St(e, t, a) {
        switch (t) {
        case "div":
        case "span":
        case "svg":
        case "path":
        case "a":
        case "g":
        case "p":
        case "li":
            break;
        case "img":
            Ae("error", e),
            Ae("load", e);
            var o = !1, s = !1, f;
            for (f in a)
                if (a.hasOwnProperty(f)) {
                    var x = a[f];
                    if (x != null)
                        switch (f) {
                        case "src":
                            o = !0;
                            break;
                        case "srcSet":
                            s = !0;
                            break;
                        case "children":
                        case "dangerouslySetInnerHTML":
                            throw Error(i(137, t));
                        default:
                            He(e, t, f, x, a, null)
                        }
                }
            s && He(e, t, "srcSet", a.srcSet, a, null),
            o && He(e, t, "src", a.src, a, null);
            return;
        case "input":
            Ae("invalid", e);
            var S = f = x = s = null
              , M = null
              , L = null;
            for (o in a)
                if (a.hasOwnProperty(o)) {
                    var q = a[o];
                    if (q != null)
                        switch (o) {
                        case "name":
                            s = q;
                            break;
                        case "type":
                            x = q;
                            break;
                        case "checked":
                            M = q;
                            break;
                        case "defaultChecked":
                            L = q;
                            break;
                        case "value":
                            f = q;
                            break;
                        case "defaultValue":
                            S = q;
                            break;
                        case "children":
                        case "dangerouslySetInnerHTML":
                            if (q != null)
                                throw Error(i(137, t));
                            break;
                        default:
                            He(e, t, o, q, a, null)
                        }
                }
            cm(e, f, S, M, L, x, s, !1),
            ni(e);
            return;
        case "select":
            Ae("invalid", e),
            o = x = f = null;
            for (s in a)
                if (a.hasOwnProperty(s) && (S = a[s],
                S != null))
                    switch (s) {
                    case "value":
                        f = S;
                        break;
                    case "defaultValue":
                        x = S;
                        break;
                    case "multiple":
                        o = S;
                    default:
                        He(e, t, s, S, a, null)
                    }
            t = f,
            a = x,
            e.multiple = !!o,
            t != null ? Tr(e, !!o, t, !1) : a != null && Tr(e, !!o, a, !0);
            return;
        case "textarea":
            Ae("invalid", e),
            f = s = o = null;
            for (x in a)
                if (a.hasOwnProperty(x) && (S = a[x],
                S != null))
                    switch (x) {
                    case "value":
                        o = S;
                        break;
                    case "defaultValue":
                        s = S;
                        break;
                    case "children":
                        f = S;
                        break;
                    case "dangerouslySetInnerHTML":
                        if (S != null)
                            throw Error(i(91));
                        break;
                    default:
                        He(e, t, x, S, a, null)
                    }
            fm(e, o, s, f),
            ni(e);
            return;
        case "option":
            for (M in a)
                if (a.hasOwnProperty(M) && (o = a[M],
                o != null))
                    switch (M) {
                    case "selected":
                        e.selected = o && typeof o != "function" && typeof o != "symbol";
                        break;
                    default:
                        He(e, t, M, o, a, null)
                    }
            return;
        case "dialog":
            Ae("beforetoggle", e),
            Ae("toggle", e),
            Ae("cancel", e),
            Ae("close", e);
            break;
        case "iframe":
        case "object":
            Ae("load", e);
            break;
        case "video":
        case "audio":
            for (o = 0; o < ml.length; o++)
                Ae(ml[o], e);
            break;
        case "image":
            Ae("error", e),
            Ae("load", e);
            break;
        case "details":
            Ae("toggle", e);
            break;
        case "embed":
        case "source":
        case "link":
            Ae("error", e),
            Ae("load", e);
        case "area":
        case "base":
        case "br":
        case "col":
        case "hr":
        case "keygen":
        case "meta":
        case "param":
        case "track":
        case "wbr":
        case "menuitem":
            for (L in a)
                if (a.hasOwnProperty(L) && (o = a[L],
                o != null))
                    switch (L) {
                    case "children":
                    case "dangerouslySetInnerHTML":
                        throw Error(i(137, t));
                    default:
                        He(e, t, L, o, a, null)
                    }
            return;
        default:
            if (hc(t)) {
                for (q in a)
                    a.hasOwnProperty(q) && (o = a[q],
                    o !== void 0 && Wu(e, t, q, o, a, void 0));
                return
            }
        }
        for (S in a)
            a.hasOwnProperty(S) && (o = a[S],
            o != null && He(e, t, S, o, a, null))
    }
    function pS(e, t, a, o) {
        switch (t) {
        case "div":
        case "span":
        case "svg":
        case "path":
        case "a":
        case "g":
        case "p":
        case "li":
            break;
        case "input":
            var s = null
              , f = null
              , x = null
              , S = null
              , M = null
              , L = null
              , q = null;
            for (P in a) {
                var X = a[P];
                if (a.hasOwnProperty(P) && X != null)
                    switch (P) {
                    case "checked":
                        break;
                    case "value":
                        break;
                    case "defaultValue":
                        M = X;
                    default:
                        o.hasOwnProperty(P) || He(e, t, P, null, o, X)
                    }
            }
            for (var H in o) {
                var P = o[H];
                if (X = a[H],
                o.hasOwnProperty(H) && (P != null || X != null))
                    switch (H) {
                    case "type":
                        f = P;
                        break;
                    case "name":
                        s = P;
                        break;
                    case "checked":
                        L = P;
                        break;
                    case "defaultChecked":
                        q = P;
                        break;
                    case "value":
                        x = P;
                        break;
                    case "defaultValue":
                        S = P;
                        break;
                    case "children":
                    case "dangerouslySetInnerHTML":
                        if (P != null)
                            throw Error(i(137, t));
                        break;
                    default:
                        P !== X && He(e, t, H, P, o, X)
                    }
            }
            dc(e, x, S, M, L, q, f, s);
            return;
        case "select":
            P = x = S = H = null;
            for (f in a)
                if (M = a[f],
                a.hasOwnProperty(f) && M != null)
                    switch (f) {
                    case "value":
                        break;
                    case "multiple":
                        P = M;
                    default:
                        o.hasOwnProperty(f) || He(e, t, f, null, o, M)
                    }
            for (s in o)
                if (f = o[s],
                M = a[s],
                o.hasOwnProperty(s) && (f != null || M != null))
                    switch (s) {
                    case "value":
                        H = f;
                        break;
                    case "defaultValue":
                        S = f;
                        break;
                    case "multiple":
                        x = f;
                    default:
                        f !== M && He(e, t, s, f, o, M)
                    }
            t = S,
            a = x,
            o = P,
            H != null ? Tr(e, !!a, H, !1) : !!o != !!a && (t != null ? Tr(e, !!a, t, !0) : Tr(e, !!a, a ? [] : "", !1));
            return;
        case "textarea":
            P = H = null;
            for (S in a)
                if (s = a[S],
                a.hasOwnProperty(S) && s != null && !o.hasOwnProperty(S))
                    switch (S) {
                    case "value":
                        break;
                    case "children":
                        break;
                    default:
                        He(e, t, S, null, o, s)
                    }
            for (x in o)
                if (s = o[x],
                f = a[x],
                o.hasOwnProperty(x) && (s != null || f != null))
                    switch (x) {
                    case "value":
                        H = s;
                        break;
                    case "defaultValue":
                        P = s;
                        break;
                    case "children":
                        break;
                    case "dangerouslySetInnerHTML":
                        if (s != null)
                            throw Error(i(91));
                        break;
                    default:
                        s !== f && He(e, t, x, s, o, f)
                    }
            um(e, H, P);
            return;
        case "option":
            for (var ge in a)
                if (H = a[ge],
                a.hasOwnProperty(ge) && H != null && !o.hasOwnProperty(ge))
                    switch (ge) {
                    case "selected":
                        e.selected = !1;
                        break;
                    default:
                        He(e, t, ge, null, o, H)
                    }
            for (M in o)
                if (H = o[M],
                P = a[M],
                o.hasOwnProperty(M) && H !== P && (H != null || P != null))
                    switch (M) {
                    case "selected":
                        e.selected = H && typeof H != "function" && typeof H != "symbol";
                        break;
                    default:
                        He(e, t, M, H, o, P)
                    }
            return;
        case "img":
        case "link":
        case "area":
        case "base":
        case "br":
        case "col":
        case "embed":
        case "hr":
        case "keygen":
        case "meta":
        case "param":
        case "source":
        case "track":
        case "wbr":
        case "menuitem":
            for (var me in a)
                H = a[me],
                a.hasOwnProperty(me) && H != null && !o.hasOwnProperty(me) && He(e, t, me, null, o, H);
            for (L in o)
                if (H = o[L],
                P = a[L],
                o.hasOwnProperty(L) && H !== P && (H != null || P != null))
                    switch (L) {
                    case "children":
                    case "dangerouslySetInnerHTML":
                        if (H != null)
                            throw Error(i(137, t));
                        break;
                    default:
                        He(e, t, L, H, o, P)
                    }
            return;
        default:
            if (hc(t)) {
                for (var Pe in a)
                    H = a[Pe],
                    a.hasOwnProperty(Pe) && H !== void 0 && !o.hasOwnProperty(Pe) && Wu(e, t, Pe, void 0, o, H);
                for (q in o)
                    H = o[q],
                    P = a[q],
                    !o.hasOwnProperty(q) || H === P || H === void 0 && P === void 0 || Wu(e, t, q, H, o, P);
                return
            }
        }
        for (var k in a)
            H = a[k],
            a.hasOwnProperty(k) && H != null && !o.hasOwnProperty(k) && He(e, t, k, null, o, H);
        for (X in o)
            H = o[X],
            P = a[X],
            !o.hasOwnProperty(X) || H === P || H == null && P == null || He(e, t, X, H, o, P)
    }
    var Ju = null
      , ef = null;
    function Fi(e) {
        return e.nodeType === 9 ? e : e.ownerDocument
    }
    function dg(e) {
        switch (e) {
        case "http://www.w3.org/2000/svg":
            return 1;
        case "http://www.w3.org/1998/Math/MathML":
            return 2;
        default:
            return 0
        }
    }
    function mg(e, t) {
        if (e === 0)
            switch (t) {
            case "svg":
                return 1;
            case "math":
                return 2;
            default:
                return 0
            }
        return e === 1 && t === "foreignObject" ? 0 : e
    }
    function tf(e, t) {
        return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.children == "bigint" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null
    }
    var nf = null;
    function gS() {
        var e = window.event;
        return e && e.type === "popstate" ? e === nf ? !1 : (nf = e,
        !0) : (nf = null,
        !1)
    }
    var hg = typeof setTimeout == "function" ? setTimeout : void 0
      , vS = typeof clearTimeout == "function" ? clearTimeout : void 0
      , pg = typeof Promise == "function" ? Promise : void 0
      , yS = typeof queueMicrotask == "function" ? queueMicrotask : typeof pg < "u" ? function(e) {
        return pg.resolve(null).then(e).catch(bS)
    }
    : hg;
    function bS(e) {
        setTimeout(function() {
            throw e
        })
    }
    function Ca(e) {
        return e === "head"
    }
    function gg(e, t) {
        var a = t
          , o = 0
          , s = 0;
        do {
            var f = a.nextSibling;
            if (e.removeChild(a),
            f && f.nodeType === 8)
                if (a = f.data,
                a === "/$") {
                    if (0 < o && 8 > o) {
                        a = o;
                        var x = e.ownerDocument;
                        if (a & 1 && pl(x.documentElement),
                        a & 2 && pl(x.body),
                        a & 4)
                            for (a = x.head,
                            pl(a),
                            x = a.firstChild; x; ) {
                                var S = x.nextSibling
                                  , M = x.nodeName;
                                x[_o] || M === "SCRIPT" || M === "STYLE" || M === "LINK" && x.rel.toLowerCase() === "stylesheet" || a.removeChild(x),
                                x = S
                            }
                    }
                    if (s === 0) {
                        e.removeChild(f),
                        El(t);
                        return
                    }
                    s--
                } else
                    a === "$" || a === "$?" || a === "$!" ? s++ : o = a.charCodeAt(0) - 48;
            else
                o = 0;
            a = f
        } while (a);
        El(t)
    }
    function af(e) {
        var t = e.firstChild;
        for (t && t.nodeType === 10 && (t = t.nextSibling); t; ) {
            var a = t;
            switch (t = t.nextSibling,
            a.nodeName) {
            case "HTML":
            case "HEAD":
            case "BODY":
                af(a),
                sc(a);
                continue;
            case "SCRIPT":
            case "STYLE":
                continue;
            case "LINK":
                if (a.rel.toLowerCase() === "stylesheet")
                    continue
            }
            e.removeChild(a)
        }
    }
    function xS(e, t, a, o) {
        for (; e.nodeType === 1; ) {
            var s = a;
            if (e.nodeName.toLowerCase() !== t.toLowerCase()) {
                if (!o && (e.nodeName !== "INPUT" || e.type !== "hidden"))
                    break
            } else if (o) {
                if (!e[_o])
                    switch (t) {
                    case "meta":
                        if (!e.hasAttribute("itemprop"))
                            break;
                        return e;
                    case "link":
                        if (f = e.getAttribute("rel"),
                        f === "stylesheet" && e.hasAttribute("data-precedence"))
                            break;
                        if (f !== s.rel || e.getAttribute("href") !== (s.href == null || s.href === "" ? null : s.href) || e.getAttribute("crossorigin") !== (s.crossOrigin == null ? null : s.crossOrigin) || e.getAttribute("title") !== (s.title == null ? null : s.title))
                            break;
                        return e;
                    case "style":
                        if (e.hasAttribute("data-precedence"))
                            break;
                        return e;
                    case "script":
                        if (f = e.getAttribute("src"),
                        (f !== (s.src == null ? null : s.src) || e.getAttribute("type") !== (s.type == null ? null : s.type) || e.getAttribute("crossorigin") !== (s.crossOrigin == null ? null : s.crossOrigin)) && f && e.hasAttribute("async") && !e.hasAttribute("itemprop"))
                            break;
                        return e;
                    default:
                        return e
                    }
            } else if (t === "input" && e.type === "hidden") {
                var f = s.name == null ? null : "" + s.name;
                if (s.type === "hidden" && e.getAttribute("name") === f)
                    return e
            } else
                return e;
            if (e = fn(e.nextSibling),
            e === null)
                break
        }
        return null
    }
    function wS(e, t, a) {
        if (t === "")
            return null;
        for (; e.nodeType !== 3; )
            if ((e.nodeType !== 1 || e.nodeName !== "INPUT" || e.type !== "hidden") && !a || (e = fn(e.nextSibling),
            e === null))
                return null;
        return e
    }
    function rf(e) {
        return e.data === "$!" || e.data === "$?" && e.ownerDocument.readyState === "complete"
    }
    function SS(e, t) {
        var a = e.ownerDocument;
        if (e.data !== "$?" || a.readyState === "complete")
            t();
        else {
            var o = function() {
                t(),
                a.removeEventListener("DOMContentLoaded", o)
            };
            a.addEventListener("DOMContentLoaded", o),
            e._reactRetry = o
        }
    }
    function fn(e) {
        for (; e != null; e = e.nextSibling) {
            var t = e.nodeType;
            if (t === 1 || t === 3)
                break;
            if (t === 8) {
                if (t = e.data,
                t === "$" || t === "$!" || t === "$?" || t === "F!" || t === "F")
                    break;
                if (t === "/$")
                    return null
            }
        }
        return e
    }
    var of = null;
    function vg(e) {
        e = e.previousSibling;
        for (var t = 0; e; ) {
            if (e.nodeType === 8) {
                var a = e.data;
                if (a === "$" || a === "$!" || a === "$?") {
                    if (t === 0)
                        return e;
                    t--
                } else
                    a === "/$" && t++
            }
            e = e.previousSibling
        }
        return null
    }
    function yg(e, t, a) {
        switch (t = Fi(a),
        e) {
        case "html":
            if (e = t.documentElement,
            !e)
                throw Error(i(452));
            return e;
        case "head":
            if (e = t.head,
            !e)
                throw Error(i(453));
            return e;
        case "body":
            if (e = t.body,
            !e)
                throw Error(i(454));
            return e;
        default:
            throw Error(i(451))
        }
    }
    function pl(e) {
        for (var t = e.attributes; t.length; )
            e.removeAttributeNode(t[0]);
        sc(e)
    }
    var nn = new Map
      , bg = new Set;
    function Wi(e) {
        return typeof e.getRootNode == "function" ? e.getRootNode() : e.nodeType === 9 ? e : e.ownerDocument
    }
    var Qn = G.d;
    G.d = {
        f: ES,
        r: CS,
        D: TS,
        C: RS,
        L: AS,
        m: MS,
        X: _S,
        S: NS,
        M: OS
    };
    function ES() {
        var e = Qn.f()
          , t = Yi();
        return e || t
    }
    function CS(e) {
        var t = wr(e);
        t !== null && t.tag === 5 && t.type === "form" ? Hh(t) : Qn.r(e)
    }
    var to = typeof document > "u" ? null : document;
    function xg(e, t, a) {
        var o = to;
        if (o && typeof t == "string" && t) {
            var s = Qt(t);
            s = 'link[rel="' + e + '"][href="' + s + '"]',
            typeof a == "string" && (s += '[crossorigin="' + a + '"]'),
            bg.has(s) || (bg.add(s),
            e = {
                rel: e,
                crossOrigin: a,
                href: t
            },
            o.querySelector(s) === null && (t = o.createElement("link"),
            St(t, "link", e),
            dt(t),
            o.head.appendChild(t)))
        }
    }
    function TS(e) {
        Qn.D(e),
        xg("dns-prefetch", e, null)
    }
    function RS(e, t) {
        Qn.C(e, t),
        xg("preconnect", e, t)
    }
    function AS(e, t, a) {
        Qn.L(e, t, a);
        var o = to;
        if (o && e && t) {
            var s = 'link[rel="preload"][as="' + Qt(t) + '"]';
            t === "image" && a && a.imageSrcSet ? (s += '[imagesrcset="' + Qt(a.imageSrcSet) + '"]',
            typeof a.imageSizes == "string" && (s += '[imagesizes="' + Qt(a.imageSizes) + '"]')) : s += '[href="' + Qt(e) + '"]';
            var f = s;
            switch (t) {
            case "style":
                f = no(e);
                break;
            case "script":
                f = ao(e)
            }
            nn.has(f) || (e = b({
                rel: "preload",
                href: t === "image" && a && a.imageSrcSet ? void 0 : e,
                as: t
            }, a),
            nn.set(f, e),
            o.querySelector(s) !== null || t === "style" && o.querySelector(gl(f)) || t === "script" && o.querySelector(vl(f)) || (t = o.createElement("link"),
            St(t, "link", e),
            dt(t),
            o.head.appendChild(t)))
        }
    }
    function MS(e, t) {
        Qn.m(e, t);
        var a = to;
        if (a && e) {
            var o = t && typeof t.as == "string" ? t.as : "script"
              , s = 'link[rel="modulepreload"][as="' + Qt(o) + '"][href="' + Qt(e) + '"]'
              , f = s;
            switch (o) {
            case "audioworklet":
            case "paintworklet":
            case "serviceworker":
            case "sharedworker":
            case "worker":
            case "script":
                f = ao(e)
            }
            if (!nn.has(f) && (e = b({
                rel: "modulepreload",
                href: e
            }, t),
            nn.set(f, e),
            a.querySelector(s) === null)) {
                switch (o) {
                case "audioworklet":
                case "paintworklet":
                case "serviceworker":
                case "sharedworker":
                case "worker":
                case "script":
                    if (a.querySelector(vl(f)))
                        return
                }
                o = a.createElement("link"),
                St(o, "link", e),
                dt(o),
                a.head.appendChild(o)
            }
        }
    }
    function NS(e, t, a) {
        Qn.S(e, t, a);
        var o = to;
        if (o && e) {
            var s = Sr(o).hoistableStyles
              , f = no(e);
            t = t || "default";
            var x = s.get(f);
            if (!x) {
                var S = {
                    loading: 0,
                    preload: null
                };
                if (x = o.querySelector(gl(f)))
                    S.loading = 5;
                else {
                    e = b({
                        rel: "stylesheet",
                        href: e,
                        "data-precedence": t
                    }, a),
                    (a = nn.get(f)) && lf(e, a);
                    var M = x = o.createElement("link");
                    dt(M),
                    St(M, "link", e),
                    M._p = new Promise(function(L, q) {
                        M.onload = L,
                        M.onerror = q
                    }
                    ),
                    M.addEventListener("load", function() {
                        S.loading |= 1
                    }),
                    M.addEventListener("error", function() {
                        S.loading |= 2
                    }),
                    S.loading |= 4,
                    Ji(x, t, o)
                }
                x = {
                    type: "stylesheet",
                    instance: x,
                    count: 1,
                    state: S
                },
                s.set(f, x)
            }
        }
    }
    function _S(e, t) {
        Qn.X(e, t);
        var a = to;
        if (a && e) {
            var o = Sr(a).hoistableScripts
              , s = ao(e)
              , f = o.get(s);
            f || (f = a.querySelector(vl(s)),
            f || (e = b({
                src: e,
                async: !0
            }, t),
            (t = nn.get(s)) && sf(e, t),
            f = a.createElement("script"),
            dt(f),
            St(f, "link", e),
            a.head.appendChild(f)),
            f = {
                type: "script",
                instance: f,
                count: 1,
                state: null
            },
            o.set(s, f))
        }
    }
    function OS(e, t) {
        Qn.M(e, t);
        var a = to;
        if (a && e) {
            var o = Sr(a).hoistableScripts
              , s = ao(e)
              , f = o.get(s);
            f || (f = a.querySelector(vl(s)),
            f || (e = b({
                src: e,
                async: !0,
                type: "module"
            }, t),
            (t = nn.get(s)) && sf(e, t),
            f = a.createElement("script"),
            dt(f),
            St(f, "link", e),
            a.head.appendChild(f)),
            f = {
                type: "script",
                instance: f,
                count: 1,
                state: null
            },
            o.set(s, f))
        }
    }
    function wg(e, t, a, o) {
        var s = (s = Ee.current) ? Wi(s) : null;
        if (!s)
            throw Error(i(446));
        switch (e) {
        case "meta":
        case "title":
            return null;
        case "style":
            return typeof a.precedence == "string" && typeof a.href == "string" ? (t = no(a.href),
            a = Sr(s).hoistableStyles,
            o = a.get(t),
            o || (o = {
                type: "style",
                instance: null,
                count: 0,
                state: null
            },
            a.set(t, o)),
            o) : {
                type: "void",
                instance: null,
                count: 0,
                state: null
            };
        case "link":
            if (a.rel === "stylesheet" && typeof a.href == "string" && typeof a.precedence == "string") {
                e = no(a.href);
                var f = Sr(s).hoistableStyles
                  , x = f.get(e);
                if (x || (s = s.ownerDocument || s,
                x = {
                    type: "stylesheet",
                    instance: null,
                    count: 0,
                    state: {
                        loading: 0,
                        preload: null
                    }
                },
                f.set(e, x),
                (f = s.querySelector(gl(e))) && !f._p && (x.instance = f,
                x.state.loading = 5),
                nn.has(e) || (a = {
                    rel: "preload",
                    as: "style",
                    href: a.href,
                    crossOrigin: a.crossOrigin,
                    integrity: a.integrity,
                    media: a.media,
                    hrefLang: a.hrefLang,
                    referrerPolicy: a.referrerPolicy
                },
                nn.set(e, a),
                f || DS(s, e, a, x.state))),
                t && o === null)
                    throw Error(i(528, ""));
                return x
            }
            if (t && o !== null)
                throw Error(i(529, ""));
            return null;
        case "script":
            return t = a.async,
            a = a.src,
            typeof a == "string" && t && typeof t != "function" && typeof t != "symbol" ? (t = ao(a),
            a = Sr(s).hoistableScripts,
            o = a.get(t),
            o || (o = {
                type: "script",
                instance: null,
                count: 0,
                state: null
            },
            a.set(t, o)),
            o) : {
                type: "void",
                instance: null,
                count: 0,
                state: null
            };
        default:
            throw Error(i(444, e))
        }
    }
    function no(e) {
        return 'href="' + Qt(e) + '"'
    }
    function gl(e) {
        return 'link[rel="stylesheet"][' + e + "]"
    }
    function Sg(e) {
        return b({}, e, {
            "data-precedence": e.precedence,
            precedence: null
        })
    }
    function DS(e, t, a, o) {
        e.querySelector('link[rel="preload"][as="style"][' + t + "]") ? o.loading = 1 : (t = e.createElement("link"),
        o.preload = t,
        t.addEventListener("load", function() {
            return o.loading |= 1
        }),
        t.addEventListener("error", function() {
            return o.loading |= 2
        }),
        St(t, "link", a),
        dt(t),
        e.head.appendChild(t))
    }
    function ao(e) {
        return '[src="' + Qt(e) + '"]'
    }
    function vl(e) {
        return "script[async]" + e
    }
    function Eg(e, t, a) {
        if (t.count++,
        t.instance === null)
            switch (t.type) {
            case "style":
                var o = e.querySelector('style[data-href~="' + Qt(a.href) + '"]');
                if (o)
                    return t.instance = o,
                    dt(o),
                    o;
                var s = b({}, a, {
                    "data-href": a.href,
                    "data-precedence": a.precedence,
                    href: null,
                    precedence: null
                });
                return o = (e.ownerDocument || e).createElement("style"),
                dt(o),
                St(o, "style", s),
                Ji(o, a.precedence, e),
                t.instance = o;
            case "stylesheet":
                s = no(a.href);
                var f = e.querySelector(gl(s));
                if (f)
                    return t.state.loading |= 4,
                    t.instance = f,
                    dt(f),
                    f;
                o = Sg(a),
                (s = nn.get(s)) && lf(o, s),
                f = (e.ownerDocument || e).createElement("link"),
                dt(f);
                var x = f;
                return x._p = new Promise(function(S, M) {
                    x.onload = S,
                    x.onerror = M
                }
                ),
                St(f, "link", o),
                t.state.loading |= 4,
                Ji(f, a.precedence, e),
                t.instance = f;
            case "script":
                return f = ao(a.src),
                (s = e.querySelector(vl(f))) ? (t.instance = s,
                dt(s),
                s) : (o = a,
                (s = nn.get(f)) && (o = b({}, a),
                sf(o, s)),
                e = e.ownerDocument || e,
                s = e.createElement("script"),
                dt(s),
                St(s, "link", o),
                e.head.appendChild(s),
                t.instance = s);
            case "void":
                return null;
            default:
                throw Error(i(443, t.type))
            }
        else
            t.type === "stylesheet" && (t.state.loading & 4) === 0 && (o = t.instance,
            t.state.loading |= 4,
            Ji(o, a.precedence, e));
        return t.instance
    }
    function Ji(e, t, a) {
        for (var o = a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'), s = o.length ? o[o.length - 1] : null, f = s, x = 0; x < o.length; x++) {
            var S = o[x];
            if (S.dataset.precedence === t)
                f = S;
            else if (f !== s)
                break
        }
        f ? f.parentNode.insertBefore(e, f.nextSibling) : (t = a.nodeType === 9 ? a.head : a,
        t.insertBefore(e, t.firstChild))
    }
    function lf(e, t) {
        e.crossOrigin == null && (e.crossOrigin = t.crossOrigin),
        e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy),
        e.title == null && (e.title = t.title)
    }
    function sf(e, t) {
        e.crossOrigin == null && (e.crossOrigin = t.crossOrigin),
        e.referrerPolicy == null && (e.referrerPolicy = t.referrerPolicy),
        e.integrity == null && (e.integrity = t.integrity)
    }
    var es = null;
    function Cg(e, t, a) {
        if (es === null) {
            var o = new Map
              , s = es = new Map;
            s.set(a, o)
        } else
            s = es,
            o = s.get(a),
            o || (o = new Map,
            s.set(a, o));
        if (o.has(e))
            return o;
        for (o.set(e, null),
        a = a.getElementsByTagName(e),
        s = 0; s < a.length; s++) {
            var f = a[s];
            if (!(f[_o] || f[Fe] || e === "link" && f.getAttribute("rel") === "stylesheet") && f.namespaceURI !== "http://www.w3.org/2000/svg") {
                var x = f.getAttribute(t) || "";
                x = e + x;
                var S = o.get(x);
                S ? S.push(f) : o.set(x, [f])
            }
        }
        return o
    }
    function Tg(e, t, a) {
        e = e.ownerDocument || e,
        e.head.insertBefore(a, t === "title" ? e.querySelector("head > title") : null)
    }
    function jS(e, t, a) {
        if (a === 1 || t.itemProp != null)
            return !1;
        switch (e) {
        case "meta":
        case "title":
            return !0;
        case "style":
            if (typeof t.precedence != "string" || typeof t.href != "string" || t.href === "")
                break;
            return !0;
        case "link":
            if (typeof t.rel != "string" || typeof t.href != "string" || t.href === "" || t.onLoad || t.onError)
                break;
            switch (t.rel) {
            case "stylesheet":
                return e = t.disabled,
                typeof t.precedence == "string" && e == null;
            default:
                return !0
            }
        case "script":
            if (t.async && typeof t.async != "function" && typeof t.async != "symbol" && !t.onLoad && !t.onError && t.src && typeof t.src == "string")
                return !0
        }
        return !1
    }
    function Rg(e) {
        return !(e.type === "stylesheet" && (e.state.loading & 3) === 0)
    }
    var yl = null;
    function kS() {}
    function zS(e, t, a) {
        if (yl === null)
            throw Error(i(475));
        var o = yl;
        if (t.type === "stylesheet" && (typeof a.media != "string" || matchMedia(a.media).matches !== !1) && (t.state.loading & 4) === 0) {
            if (t.instance === null) {
                var s = no(a.href)
                  , f = e.querySelector(gl(s));
                if (f) {
                    e = f._p,
                    e !== null && typeof e == "object" && typeof e.then == "function" && (o.count++,
                    o = ts.bind(o),
                    e.then(o, o)),
                    t.state.loading |= 4,
                    t.instance = f,
                    dt(f);
                    return
                }
                f = e.ownerDocument || e,
                a = Sg(a),
                (s = nn.get(s)) && lf(a, s),
                f = f.createElement("link"),
                dt(f);
                var x = f;
                x._p = new Promise(function(S, M) {
                    x.onload = S,
                    x.onerror = M
                }
                ),
                St(f, "link", a),
                t.instance = f
            }
            o.stylesheets === null && (o.stylesheets = new Map),
            o.stylesheets.set(t, e),
            (e = t.state.preload) && (t.state.loading & 3) === 0 && (o.count++,
            t = ts.bind(o),
            e.addEventListener("load", t),
            e.addEventListener("error", t))
        }
    }
    function LS() {
        if (yl === null)
            throw Error(i(475));
        var e = yl;
        return e.stylesheets && e.count === 0 && cf(e, e.stylesheets),
        0 < e.count ? function(t) {
            var a = setTimeout(function() {
                if (e.stylesheets && cf(e, e.stylesheets),
                e.unsuspend) {
                    var o = e.unsuspend;
                    e.unsuspend = null,
                    o()
                }
            }, 6e4);
            return e.unsuspend = t,
            function() {
                e.unsuspend = null,
                clearTimeout(a)
            }
        }
        : null
    }
    function ts() {
        if (this.count--,
        this.count === 0) {
            if (this.stylesheets)
                cf(this, this.stylesheets);
            else if (this.unsuspend) {
                var e = this.unsuspend;
                this.unsuspend = null,
                e()
            }
        }
    }
    var ns = null;
    function cf(e, t) {
        e.stylesheets = null,
        e.unsuspend !== null && (e.count++,
        ns = new Map,
        t.forEach(BS, e),
        ns = null,
        ts.call(e))
    }
    function BS(e, t) {
        if (!(t.state.loading & 4)) {
            var a = ns.get(e);
            if (a)
                var o = a.get(null);
            else {
                a = new Map,
                ns.set(e, a);
                for (var s = e.querySelectorAll("link[data-precedence],style[data-precedence]"), f = 0; f < s.length; f++) {
                    var x = s[f];
                    (x.nodeName === "LINK" || x.getAttribute("media") !== "not all") && (a.set(x.dataset.precedence, x),
                    o = x)
                }
                o && a.set(null, o)
            }
            s = t.instance,
            x = s.getAttribute("data-precedence"),
            f = a.get(x) || o,
            f === o && a.set(null, s),
            a.set(x, s),
            this.count++,
            o = ts.bind(this),
            s.addEventListener("load", o),
            s.addEventListener("error", o),
            f ? f.parentNode.insertBefore(s, f.nextSibling) : (e = e.nodeType === 9 ? e.head : e,
            e.insertBefore(s, e.firstChild)),
            t.state.loading |= 4
        }
    }
    var bl = {
        $$typeof: N,
        Provider: null,
        Consumer: null,
        _currentValue: B,
        _currentValue2: B,
        _threadCount: 0
    };
    function US(e, t, a, o, s, f, x, S) {
        this.tag = 1,
        this.containerInfo = e,
        this.pingCache = this.current = this.pendingChildren = null,
        this.timeoutHandle = -1,
        this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null,
        this.callbackPriority = 0,
        this.expirationTimes = No(-1),
        this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0,
        this.entanglements = No(0),
        this.hiddenUpdates = No(null),
        this.identifierPrefix = o,
        this.onUncaughtError = s,
        this.onCaughtError = f,
        this.onRecoverableError = x,
        this.pooledCache = null,
        this.pooledCacheLanes = 0,
        this.formState = S,
        this.incompleteTransitions = new Map
    }
    function Ag(e, t, a, o, s, f, x, S, M, L, q, X) {
        return e = new US(e,t,a,x,S,M,L,X),
        t = 1,
        f === !0 && (t |= 24),
        f = Ut(3, null, null, t),
        e.current = f,
        f.stateNode = e,
        t = Yc(),
        t.refCount++,
        e.pooledCache = t,
        t.refCount++,
        f.memoizedState = {
            element: o,
            isDehydrated: a,
            cache: t
        },
        $c(f),
        e
    }
    function Mg(e) {
        return e ? (e = kr,
        e) : kr
    }
    function Ng(e, t, a, o, s, f) {
        s = Mg(s),
        o.context === null ? o.context = s : o.pendingContext = s,
        o = fa(t),
        o.payload = {
            element: a
        },
        f = f === void 0 ? null : f,
        f !== null && (o.callback = f),
        a = da(e, o, t),
        a !== null && (Yt(a, e, t),
        Qo(a, e, t))
    }
    function _g(e, t) {
        if (e = e.memoizedState,
        e !== null && e.dehydrated !== null) {
            var a = e.retryLane;
            e.retryLane = a !== 0 && a < t ? a : t
        }
    }
    function uf(e, t) {
        _g(e, t),
        (e = e.alternate) && _g(e, t)
    }
    function Og(e) {
        if (e.tag === 13) {
            var t = jr(e, 67108864);
            t !== null && Yt(t, e, 67108864),
            uf(e, 67108864)
        }
    }
    var as = !0;
    function HS(e, t, a, o) {
        var s = _.T;
        _.T = null;
        var f = G.p;
        try {
            G.p = 2,
            ff(e, t, a, o)
        } finally {
            G.p = f,
            _.T = s
        }
    }
    function PS(e, t, a, o) {
        var s = _.T;
        _.T = null;
        var f = G.p;
        try {
            G.p = 8,
            ff(e, t, a, o)
        } finally {
            G.p = f,
            _.T = s
        }
    }
    function ff(e, t, a, o) {
        if (as) {
            var s = df(o);
            if (s === null)
                Fu(e, t, o, rs, a),
                jg(e, o);
            else if (GS(s, e, t, a, o))
                o.stopPropagation();
            else if (jg(e, o),
            t & 4 && -1 < VS.indexOf(e)) {
                for (; s !== null; ) {
                    var f = wr(s);
                    if (f !== null)
                        switch (f.tag) {
                        case 3:
                            if (f = f.stateNode,
                            f.current.memoizedState.isDehydrated) {
                                var x = vn(f.pendingLanes);
                                if (x !== 0) {
                                    var S = f;
                                    for (S.pendingLanes |= 2,
                                    S.entangledLanes |= 2; x; ) {
                                        var M = 1 << 31 - yt(x);
                                        S.entanglements[1] |= M,
                                        x &= ~M
                                    }
                                    Sn(f),
                                    (Le & 6) === 0 && (Vi = et() + 500,
                                    dl(0))
                                }
                            }
                            break;
                        case 13:
                            S = jr(f, 2),
                            S !== null && Yt(S, f, 2),
                            Yi(),
                            uf(f, 2)
                        }
                    if (f = df(o),
                    f === null && Fu(e, t, o, rs, a),
                    f === s)
                        break;
                    s = f
                }
                s !== null && o.stopPropagation()
            } else
                Fu(e, t, o, null, a)
        }
    }
    function df(e) {
        return e = gc(e),
        mf(e)
    }
    var rs = null;
    function mf(e) {
        if (rs = null,
        e = xr(e),
        e !== null) {
            var t = u(e);
            if (t === null)
                e = null;
            else {
                var a = t.tag;
                if (a === 13) {
                    if (e = d(t),
                    e !== null)
                        return e;
                    e = null
                } else if (a === 3) {
                    if (t.stateNode.current.memoizedState.isDehydrated)
                        return t.tag === 3 ? t.stateNode.containerInfo : null;
                    e = null
                } else
                    t !== e && (e = null)
            }
        }
        return rs = e,
        null
    }
    function Dg(e) {
        switch (e) {
        case "beforetoggle":
        case "cancel":
        case "click":
        case "close":
        case "contextmenu":
        case "copy":
        case "cut":
        case "auxclick":
        case "dblclick":
        case "dragend":
        case "dragstart":
        case "drop":
        case "focusin":
        case "focusout":
        case "input":
        case "invalid":
        case "keydown":
        case "keypress":
        case "keyup":
        case "mousedown":
        case "mouseup":
        case "paste":
        case "pause":
        case "play":
        case "pointercancel":
        case "pointerdown":
        case "pointerup":
        case "ratechange":
        case "reset":
        case "resize":
        case "seeked":
        case "submit":
        case "toggle":
        case "touchcancel":
        case "touchend":
        case "touchstart":
        case "volumechange":
        case "change":
        case "selectionchange":
        case "textInput":
        case "compositionstart":
        case "compositionend":
        case "compositionupdate":
        case "beforeblur":
        case "afterblur":
        case "beforeinput":
        case "blur":
        case "fullscreenchange":
        case "focus":
        case "hashchange":
        case "popstate":
        case "select":
        case "selectstart":
            return 2;
        case "drag":
        case "dragenter":
        case "dragexit":
        case "dragleave":
        case "dragover":
        case "mousemove":
        case "mouseout":
        case "mouseover":
        case "pointermove":
        case "pointerout":
        case "pointerover":
        case "scroll":
        case "touchmove":
        case "wheel":
        case "mouseenter":
        case "mouseleave":
        case "pointerenter":
        case "pointerleave":
            return 8;
        case "message":
            switch (Ql()) {
            case $t:
                return 2;
            case Zl:
                return 8;
            case gr:
            case Rt:
                return 32;
            case jn:
                return 268435456;
            default:
                return 32
            }
        default:
            return 32
        }
    }
    var hf = !1
      , Ta = null
      , Ra = null
      , Aa = null
      , xl = new Map
      , wl = new Map
      , Ma = []
      , VS = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");
    function jg(e, t) {
        switch (e) {
        case "focusin":
        case "focusout":
            Ta = null;
            break;
        case "dragenter":
        case "dragleave":
            Ra = null;
            break;
        case "mouseover":
        case "mouseout":
            Aa = null;
            break;
        case "pointerover":
        case "pointerout":
            xl.delete(t.pointerId);
            break;
        case "gotpointercapture":
        case "lostpointercapture":
            wl.delete(t.pointerId)
        }
    }
    function Sl(e, t, a, o, s, f) {
        return e === null || e.nativeEvent !== f ? (e = {
            blockedOn: t,
            domEventName: a,
            eventSystemFlags: o,
            nativeEvent: f,
            targetContainers: [s]
        },
        t !== null && (t = wr(t),
        t !== null && Og(t)),
        e) : (e.eventSystemFlags |= o,
        t = e.targetContainers,
        s !== null && t.indexOf(s) === -1 && t.push(s),
        e)
    }
    function GS(e, t, a, o, s) {
        switch (t) {
        case "focusin":
            return Ta = Sl(Ta, e, t, a, o, s),
            !0;
        case "dragenter":
            return Ra = Sl(Ra, e, t, a, o, s),
            !0;
        case "mouseover":
            return Aa = Sl(Aa, e, t, a, o, s),
            !0;
        case "pointerover":
            var f = s.pointerId;
            return xl.set(f, Sl(xl.get(f) || null, e, t, a, o, s)),
            !0;
        case "gotpointercapture":
            return f = s.pointerId,
            wl.set(f, Sl(wl.get(f) || null, e, t, a, o, s)),
            !0
        }
        return !1
    }
    function kg(e) {
        var t = xr(e.target);
        if (t !== null) {
            var a = u(t);
            if (a !== null) {
                if (t = a.tag,
                t === 13) {
                    if (t = d(a),
                    t !== null) {
                        e.blockedOn = t,
                        rt(e.priority, function() {
                            if (a.tag === 13) {
                                var o = Gt();
                                o = tt(o);
                                var s = jr(a, o);
                                s !== null && Yt(s, a, o),
                                uf(a, o)
                            }
                        });
                        return
                    }
                } else if (t === 3 && a.stateNode.current.memoizedState.isDehydrated) {
                    e.blockedOn = a.tag === 3 ? a.stateNode.containerInfo : null;
                    return
                }
            }
        }
        e.blockedOn = null
    }
    function os(e) {
        if (e.blockedOn !== null)
            return !1;
        for (var t = e.targetContainers; 0 < t.length; ) {
            var a = df(e.nativeEvent);
            if (a === null) {
                a = e.nativeEvent;
                var o = new a.constructor(a.type,a);
                pc = o,
                a.target.dispatchEvent(o),
                pc = null
            } else
                return t = wr(a),
                t !== null && Og(t),
                e.blockedOn = a,
                !1;
            t.shift()
        }
        return !0
    }
    function zg(e, t, a) {
        os(e) && a.delete(t)
    }
    function YS() {
        hf = !1,
        Ta !== null && os(Ta) && (Ta = null),
        Ra !== null && os(Ra) && (Ra = null),
        Aa !== null && os(Aa) && (Aa = null),
        xl.forEach(zg),
        wl.forEach(zg)
    }
    function ls(e, t) {
        e.blockedOn === t && (e.blockedOn = null,
        hf || (hf = !0,
        n.unstable_scheduleCallback(n.unstable_NormalPriority, YS)))
    }
    var is = null;
    function Lg(e) {
        is !== e && (is = e,
        n.unstable_scheduleCallback(n.unstable_NormalPriority, function() {
            is === e && (is = null);
            for (var t = 0; t < e.length; t += 3) {
                var a = e[t]
                  , o = e[t + 1]
                  , s = e[t + 2];
                if (typeof o != "function") {
                    if (mf(o || a) === null)
                        continue;
                    break
                }
                var f = wr(a);
                f !== null && (e.splice(t, 3),
                t -= 3,
                du(f, {
                    pending: !0,
                    data: s,
                    method: a.method,
                    action: o
                }, o, s))
            }
        }))
    }
    function El(e) {
        function t(M) {
            return ls(M, e)
        }
        Ta !== null && ls(Ta, e),
        Ra !== null && ls(Ra, e),
        Aa !== null && ls(Aa, e),
        xl.forEach(t),
        wl.forEach(t);
        for (var a = 0; a < Ma.length; a++) {
            var o = Ma[a];
            o.blockedOn === e && (o.blockedOn = null)
        }
        for (; 0 < Ma.length && (a = Ma[0],
        a.blockedOn === null); )
            kg(a),
            a.blockedOn === null && Ma.shift();
        if (a = (e.ownerDocument || e).$$reactFormReplay,
        a != null)
            for (o = 0; o < a.length; o += 3) {
                var s = a[o]
                  , f = a[o + 1]
                  , x = s[Ge] || null;
                if (typeof f == "function")
                    x || Lg(a);
                else if (x) {
                    var S = null;
                    if (f && f.hasAttribute("formAction")) {
                        if (s = f,
                        x = f[Ge] || null)
                            S = x.formAction;
                        else if (mf(s) !== null)
                            continue
                    } else
                        S = x.action;
                    typeof S == "function" ? a[o + 1] = S : (a.splice(o, 3),
                    o -= 3),
                    Lg(a)
                }
            }
    }
    function pf(e) {
        this._internalRoot = e
    }
    ss.prototype.render = pf.prototype.render = function(e) {
        var t = this._internalRoot;
        if (t === null)
            throw Error(i(409));
        var a = t.current
          , o = Gt();
        Ng(a, o, e, t, null, null)
    }
    ,
    ss.prototype.unmount = pf.prototype.unmount = function() {
        var e = this._internalRoot;
        if (e !== null) {
            this._internalRoot = null;
            var t = e.containerInfo;
            Ng(e.current, 2, null, e, null, null),
            Yi(),
            t[ft] = null
        }
    }
    ;
    function ss(e) {
        this._internalRoot = e
    }
    ss.prototype.unstable_scheduleHydration = function(e) {
        if (e) {
            var t = Ga();
            e = {
                blockedOn: null,
                target: e,
                priority: t
            };
            for (var a = 0; a < Ma.length && t !== 0 && t < Ma[a].priority; a++)
                ;
            Ma.splice(a, 0, e),
            a === 0 && kg(e)
        }
    }
    ;
    var Bg = r.version;
    if (Bg !== "19.1.1")
        throw Error(i(527, Bg, "19.1.1"));
    G.findDOMNode = function(e) {
        var t = e._reactInternals;
        if (t === void 0)
            throw typeof e.render == "function" ? Error(i(188)) : (e = Object.keys(e).join(","),
            Error(i(268, e)));
        return e = g(t),
        e = e !== null ? p(e) : null,
        e = e === null ? null : e.stateNode,
        e
    }
    ;
    var qS = {
        bundleType: 0,
        version: "19.1.1",
        rendererPackageName: "react-dom",
        currentDispatcherRef: _,
        reconcilerVersion: "19.1.1"
    };
    if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
        var cs = __REACT_DEVTOOLS_GLOBAL_HOOK__;
        if (!cs.isDisabled && cs.supportsFiber)
            try {
                gn = cs.inject(qS),
                At = cs
            } catch {}
    }
    return Tl.createRoot = function(e, t) {
        if (!c(e))
            throw Error(i(299));
        var a = !1
          , o = ""
          , s = Jh
          , f = ep
          , x = tp
          , S = null;
        return t != null && (t.unstable_strictMode === !0 && (a = !0),
        t.identifierPrefix !== void 0 && (o = t.identifierPrefix),
        t.onUncaughtError !== void 0 && (s = t.onUncaughtError),
        t.onCaughtError !== void 0 && (f = t.onCaughtError),
        t.onRecoverableError !== void 0 && (x = t.onRecoverableError),
        t.unstable_transitionCallbacks !== void 0 && (S = t.unstable_transitionCallbacks)),
        t = Ag(e, 1, !1, null, null, a, o, s, f, x, S, null),
        e[ft] = t.current,
        Zu(e),
        new pf(t)
    }
    ,
    Tl.hydrateRoot = function(e, t, a) {
        if (!c(e))
            throw Error(i(299));
        var o = !1
          , s = ""
          , f = Jh
          , x = ep
          , S = tp
          , M = null
          , L = null;
        return a != null && (a.unstable_strictMode === !0 && (o = !0),
        a.identifierPrefix !== void 0 && (s = a.identifierPrefix),
        a.onUncaughtError !== void 0 && (f = a.onUncaughtError),
        a.onCaughtError !== void 0 && (x = a.onCaughtError),
        a.onRecoverableError !== void 0 && (S = a.onRecoverableError),
        a.unstable_transitionCallbacks !== void 0 && (M = a.unstable_transitionCallbacks),
        a.formState !== void 0 && (L = a.formState)),
        t = Ag(e, 1, !0, t, a ?? null, o, s, f, x, S, M, L),
        t.context = Mg(null),
        a = t.current,
        o = Gt(),
        o = tt(o),
        s = fa(o),
        s.callback = null,
        da(a, s, o),
        a = o,
        t.current.lanes = a,
        ia(t, a),
        Sn(t),
        e[ft] = t.current,
        Zu(e),
        new ss(t)
    }
    ,
    Tl.version = "19.1.1",
    Tl
}
var qg;
function e1() {
    if (qg)
        return vf.exports;
    qg = 1;
    function n() {
        if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
            try {
                __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)
            } catch (r) {
                console.error(r)
            }
    }
    return n(),
    vf.exports = JS(),
    vf.exports
}
var t1 = e1();
/**
 * react-router v7.8.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */
var Ig = "popstate";
function n1(n={}) {
    function r(i, c) {
        let {pathname: u, search: d, hash: h} = i.location;
        return Uf("", {
            pathname: u,
            search: d,
            hash: h
        }, c.state && c.state.usr || null, c.state && c.state.key || "default")
    }
    function l(i, c) {
        return typeof c == "string" ? c : Dl(c)
    }
    return r1(r, l, null, n)
}
function Xe(n, r) {
    if (n === !1 || n === null || typeof n > "u")
        throw new Error(r)
}
function An(n, r) {
    if (!n) {
        typeof console < "u" && console.warn(r);
        try {
            throw new Error(r)
        } catch {}
    }
}
function a1() {
    return Math.random().toString(36).substring(2, 10)
}
function Xg(n, r) {
    return {
        usr: n.state,
        key: n.key,
        idx: r
    }
}
function Uf(n, r, l=null, i) {
    return {
        pathname: typeof n == "string" ? n : n.pathname,
        search: "",
        hash: "",
        ...typeof r == "string" ? yo(r) : r,
        state: l,
        key: r && r.key || i || a1()
    }
}
function Dl({pathname: n="/", search: r="", hash: l=""}) {
    return r && r !== "?" && (n += r.charAt(0) === "?" ? r : "?" + r),
    l && l !== "#" && (n += l.charAt(0) === "#" ? l : "#" + l),
    n
}
function yo(n) {
    let r = {};
    if (n) {
        let l = n.indexOf("#");
        l >= 0 && (r.hash = n.substring(l),
        n = n.substring(0, l));
        let i = n.indexOf("?");
        i >= 0 && (r.search = n.substring(i),
        n = n.substring(0, i)),
        n && (r.pathname = n)
    }
    return r
}
function r1(n, r, l, i={}) {
    let {window: c=document.defaultView, v5Compat: u=!1} = i
      , d = c.history
      , h = "POP"
      , g = null
      , p = b();
    p == null && (p = 0,
    d.replaceState({
        ...d.state,
        idx: p
    }, ""));
    function b() {
        return (d.state || {
            idx: null
        }).idx
    }
    function v() {
        h = "POP";
        let A = b()
          , T = A == null ? null : A - p;
        p = A,
        g && g({
            action: h,
            location: E.location,
            delta: T
        })
    }
    function w(A, T) {
        h = "PUSH";
        let D = Uf(E.location, A, T);
        p = b() + 1;
        let N = Xg(D, p)
          , j = E.createHref(D);
        try {
            d.pushState(N, "", j)
        } catch (U) {
            if (U instanceof DOMException && U.name === "DataCloneError")
                throw U;
            c.location.assign(j)
        }
        u && g && g({
            action: h,
            location: E.location,
            delta: 1
        })
    }
    function C(A, T) {
        h = "REPLACE";
        let D = Uf(E.location, A, T);
        p = b();
        let N = Xg(D, p)
          , j = E.createHref(D);
        d.replaceState(N, "", j),
        u && g && g({
            action: h,
            location: E.location,
            delta: 0
        })
    }
    function R(A) {
        return o1(A)
    }
    let E = {
        get action() {
            return h
        },
        get location() {
            return n(c, d)
        },
        listen(A) {
            if (g)
                throw new Error("A history only accepts one active listener");
            return c.addEventListener(Ig, v),
            g = A,
            () => {
                c.removeEventListener(Ig, v),
                g = null
            }
        },
        createHref(A) {
            return r(c, A)
        },
        createURL: R,
        encodeLocation(A) {
            let T = R(A);
            return {
                pathname: T.pathname,
                search: T.search,
                hash: T.hash
            }
        },
        push: w,
        replace: C,
        go(A) {
            return d.go(A)
        }
    };
    return E
}
function o1(n, r=!1) {
    let l = "http://localhost";
    typeof window < "u" && (l = window.location.origin !== "null" ? window.location.origin : window.location.href),
    Xe(l, "No window.location.(origin|href) available to create URL");
    let i = typeof n == "string" ? n : Dl(n);
    return i = i.replace(/ $/, "%20"),
    !r && i.startsWith("//") && (i = l + i),
    new URL(i,l)
}
function Kv(n, r, l="/") {
    return l1(n, r, l, !1)
}
function l1(n, r, l, i) {
    let c = typeof r == "string" ? yo(r) : r
      , u = Jn(c.pathname || "/", l);
    if (u == null)
        return null;
    let d = Qv(n);
    i1(d);
    let h = null;
    for (let g = 0; h == null && g < d.length; ++g) {
        let p = y1(u);
        h = g1(d[g], p, i)
    }
    return h
}
function Qv(n, r=[], l=[], i="") {
    let c = (u, d, h) => {
        let g = {
            relativePath: h === void 0 ? u.path || "" : h,
            caseSensitive: u.caseSensitive === !0,
            childrenIndex: d,
            route: u
        };
        g.relativePath.startsWith("/") && (Xe(g.relativePath.startsWith(i), `Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),
        g.relativePath = g.relativePath.slice(i.length));
        let p = Wn([i, g.relativePath])
          , b = l.concat(g);
        u.children && u.children.length > 0 && (Xe(u.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${p}".`),
        Qv(u.children, r, b, p)),
        !(u.path == null && !u.index) && r.push({
            path: p,
            score: h1(p, u.index),
            routesMeta: b
        })
    }
    ;
    return n.forEach( (u, d) => {
        if (u.path === "" || !u.path?.includes("?"))
            c(u, d);
        else
            for (let h of Zv(u.path))
                c(u, d, h)
    }
    ),
    r
}
function Zv(n) {
    let r = n.split("/");
    if (r.length === 0)
        return [];
    let[l,...i] = r
      , c = l.endsWith("?")
      , u = l.replace(/\?$/, "");
    if (i.length === 0)
        return c ? [u, ""] : [u];
    let d = Zv(i.join("/"))
      , h = [];
    return h.push(...d.map(g => g === "" ? u : [u, g].join("/"))),
    c && h.push(...d),
    h.map(g => n.startsWith("/") && g === "" ? "/" : g)
}
function i1(n) {
    n.sort( (r, l) => r.score !== l.score ? l.score - r.score : p1(r.routesMeta.map(i => i.childrenIndex), l.routesMeta.map(i => i.childrenIndex)))
}
var s1 = /^:[\w-]+$/
  , c1 = 3
  , u1 = 2
  , f1 = 1
  , d1 = 10
  , m1 = -2
  , $g = n => n === "*";
function h1(n, r) {
    let l = n.split("/")
      , i = l.length;
    return l.some($g) && (i += m1),
    r && (i += u1),
    l.filter(c => !$g(c)).reduce( (c, u) => c + (s1.test(u) ? c1 : u === "" ? f1 : d1), i)
}
function p1(n, r) {
    return n.length === r.length && n.slice(0, -1).every( (i, c) => i === r[c]) ? n[n.length - 1] - r[r.length - 1] : 0
}
function g1(n, r, l=!1) {
    let {routesMeta: i} = n
      , c = {}
      , u = "/"
      , d = [];
    for (let h = 0; h < i.length; ++h) {
        let g = i[h]
          , p = h === i.length - 1
          , b = u === "/" ? r : r.slice(u.length) || "/"
          , v = Ms({
            path: g.relativePath,
            caseSensitive: g.caseSensitive,
            end: p
        }, b)
          , w = g.route;
        if (!v && p && l && !i[i.length - 1].route.index && (v = Ms({
            path: g.relativePath,
            caseSensitive: g.caseSensitive,
            end: !1
        }, b)),
        !v)
            return null;
        Object.assign(c, v.params),
        d.push({
            params: c,
            pathname: Wn([u, v.pathname]),
            pathnameBase: S1(Wn([u, v.pathnameBase])),
            route: w
        }),
        v.pathnameBase !== "/" && (u = Wn([u, v.pathnameBase]))
    }
    return d
}
function Ms(n, r) {
    typeof n == "string" && (n = {
        path: n,
        caseSensitive: !1,
        end: !0
    });
    let[l,i] = v1(n.path, n.caseSensitive, n.end)
      , c = r.match(l);
    if (!c)
        return null;
    let u = c[0]
      , d = u.replace(/(.)\/+$/, "$1")
      , h = c.slice(1);
    return {
        params: i.reduce( (p, {paramName: b, isOptional: v}, w) => {
            if (b === "*") {
                let R = h[w] || "";
                d = u.slice(0, u.length - R.length).replace(/(.)\/+$/, "$1")
            }
            const C = h[w];
            return v && !C ? p[b] = void 0 : p[b] = (C || "").replace(/%2F/g, "/"),
            p
        }
        , {}),
        pathname: u,
        pathnameBase: d,
        pattern: n
    }
}
function v1(n, r=!1, l=!0) {
    An(n === "*" || !n.endsWith("*") || n.endsWith("/*"), `Route path "${n}" will be treated as if it were "${n.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/, "/*")}".`);
    let i = []
      , c = "^" + n.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (d, h, g) => (i.push({
        paramName: h,
        isOptional: g != null
    }),
    g ? "/?([^\\/]+)?" : "/([^\\/]+)"));
    return n.endsWith("*") ? (i.push({
        paramName: "*"
    }),
    c += n === "*" || n === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : l ? c += "\\/*$" : n !== "" && n !== "/" && (c += "(?:(?=\\/|$))"),
    [new RegExp(c,r ? void 0 : "i"), i]
}
function y1(n) {
    try {
        return n.split("/").map(r => decodeURIComponent(r).replace(/\//g, "%2F")).join("/")
    } catch (r) {
        return An(!1, `The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),
        n
    }
}
function Jn(n, r) {
    if (r === "/")
        return n;
    if (!n.toLowerCase().startsWith(r.toLowerCase()))
        return null;
    let l = r.endsWith("/") ? r.length - 1 : r.length
      , i = n.charAt(l);
    return i && i !== "/" ? null : n.slice(l) || "/"
}
function b1(n, r="/") {
    let {pathname: l, search: i="", hash: c=""} = typeof n == "string" ? yo(n) : n;
    return {
        pathname: l ? l.startsWith("/") ? l : x1(l, r) : r,
        search: E1(i),
        hash: C1(c)
    }
}
function x1(n, r) {
    let l = r.replace(/\/+$/, "").split("/");
    return n.split("/").forEach(c => {
        c === ".." ? l.length > 1 && l.pop() : c !== "." && l.push(c)
    }
    ),
    l.length > 1 ? l.join("/") : "/"
}
function xf(n, r, l, i) {
    return `Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}].  Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`
}
function w1(n) {
    return n.filter( (r, l) => l === 0 || r.route.path && r.route.path.length > 0)
}
function Fv(n) {
    let r = w1(n);
    return r.map( (l, i) => i === r.length - 1 ? l.pathname : l.pathnameBase)
}
function Wv(n, r, l, i=!1) {
    let c;
    typeof n == "string" ? c = yo(n) : (c = {
        ...n
    },
    Xe(!c.pathname || !c.pathname.includes("?"), xf("?", "pathname", "search", c)),
    Xe(!c.pathname || !c.pathname.includes("#"), xf("#", "pathname", "hash", c)),
    Xe(!c.search || !c.search.includes("#"), xf("#", "search", "hash", c)));
    let u = n === "" || c.pathname === "", d = u ? "/" : c.pathname, h;
    if (d == null)
        h = l;
    else {
        let v = r.length - 1;
        if (!i && d.startsWith("..")) {
            let w = d.split("/");
            for (; w[0] === ".."; )
                w.shift(),
                v -= 1;
            c.pathname = w.join("/")
        }
        h = v >= 0 ? r[v] : "/"
    }
    let g = b1(c, h)
      , p = d && d !== "/" && d.endsWith("/")
      , b = (u || d === ".") && l.endsWith("/");
    return !g.pathname.endsWith("/") && (p || b) && (g.pathname += "/"),
    g
}
var Wn = n => n.join("/").replace(/\/\/+/g, "/")
  , S1 = n => n.replace(/\/+$/, "").replace(/^\/*/, "/")
  , E1 = n => !n || n === "?" ? "" : n.startsWith("?") ? n : "?" + n
  , C1 = n => !n || n === "#" ? "" : n.startsWith("#") ? n : "#" + n;
function T1(n) {
    return n != null && typeof n.status == "number" && typeof n.statusText == "string" && typeof n.internal == "boolean" && "data"in n
}
var Jv = ["POST", "PUT", "PATCH", "DELETE"];
new Set(Jv);
var R1 = ["GET", ...Jv];
new Set(R1);
var bo = m.createContext(null);
bo.displayName = "DataRouter";
var Hs = m.createContext(null);
Hs.displayName = "DataRouterState";
m.createContext(!1);
var ey = m.createContext({
    isTransitioning: !1
});
ey.displayName = "ViewTransition";
var A1 = m.createContext(new Map);
A1.displayName = "Fetchers";
var M1 = m.createContext(null);
M1.displayName = "Await";
var Nn = m.createContext(null);
Nn.displayName = "Navigation";
var Ul = m.createContext(null);
Ul.displayName = "Location";
var _n = m.createContext({
    outlet: null,
    matches: [],
    isDataRoute: !1
});
_n.displayName = "Route";
var ud = m.createContext(null);
ud.displayName = "RouteError";
function N1(n, {relative: r}={}) {
    Xe(Hl(), "useHref() may be used only in the context of a <Router> component.");
    let {basename: l, navigator: i} = m.useContext(Nn)
      , {hash: c, pathname: u, search: d} = Pl(n, {
        relative: r
    })
      , h = u;
    return l !== "/" && (h = u === "/" ? l : Wn([l, u])),
    i.createHref({
        pathname: h,
        search: d,
        hash: c
    })
}
function Hl() {
    return m.useContext(Ul) != null
}
function na() {
    return Xe(Hl(), "useLocation() may be used only in the context of a <Router> component."),
    m.useContext(Ul).location
}
var ty = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
function ny(n) {
    m.useContext(Nn).static || m.useLayoutEffect(n)
}
function _1() {
    let {isDataRoute: n} = m.useContext(_n);
    return n ? Y1() : O1()
}
function O1() {
    Xe(Hl(), "useNavigate() may be used only in the context of a <Router> component.");
    let n = m.useContext(bo)
      , {basename: r, navigator: l} = m.useContext(Nn)
      , {matches: i} = m.useContext(_n)
      , {pathname: c} = na()
      , u = JSON.stringify(Fv(i))
      , d = m.useRef(!1);
    return ny( () => {
        d.current = !0
    }
    ),
    m.useCallback( (g, p={}) => {
        if (An(d.current, ty),
        !d.current)
            return;
        if (typeof g == "number") {
            l.go(g);
            return
        }
        let b = Wv(g, JSON.parse(u), c, p.relative === "path");
        n == null && r !== "/" && (b.pathname = b.pathname === "/" ? r : Wn([r, b.pathname])),
        (p.replace ? l.replace : l.push)(b, p.state, p)
    }
    , [r, l, u, c, n])
}
m.createContext(null);
function z_() {
    let {matches: n} = m.useContext(_n)
      , r = n[n.length - 1];
    return r ? r.params : {}
}
function Pl(n, {relative: r}={}) {
    let {matches: l} = m.useContext(_n)
      , {pathname: i} = na()
      , c = JSON.stringify(Fv(l));
    return m.useMemo( () => Wv(n, JSON.parse(c), i, r === "path"), [n, c, i, r])
}
function D1(n, r) {
    return ay(n, r)
}
function ay(n, r, l, i) {
    Xe(Hl(), "useRoutes() may be used only in the context of a <Router> component.");
    let {navigator: c} = m.useContext(Nn)
      , {matches: u} = m.useContext(_n)
      , d = u[u.length - 1]
      , h = d ? d.params : {}
      , g = d ? d.pathname : "/"
      , p = d ? d.pathnameBase : "/"
      , b = d && d.route;
    {
        let T = b && b.path || "";
        ry(g, !b || T.endsWith("*") || T.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${T}"> to <Route path="${T === "/" ? "*" : `${T}/*`}">.`)
    }
    let v = na(), w;
    if (r) {
        let T = typeof r == "string" ? yo(r) : r;
        Xe(p === "/" || T.pathname?.startsWith(p), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${T.pathname}" was given in the \`location\` prop.`),
        w = T
    } else
        w = v;
    let C = w.pathname || "/"
      , R = C;
    if (p !== "/") {
        let T = p.replace(/^\//, "").split("/");
        R = "/" + C.replace(/^\//, "").split("/").slice(T.length).join("/")
    }
    let E = Kv(n, {
        pathname: R
    });
    An(b || E != null, `No routes matched location "${w.pathname}${w.search}${w.hash}" `),
    An(E == null || E[E.length - 1].route.element !== void 0 || E[E.length - 1].route.Component !== void 0 || E[E.length - 1].route.lazy !== void 0, `Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
    let A = B1(E && E.map(T => Object.assign({}, T, {
        params: Object.assign({}, h, T.params),
        pathname: Wn([p, c.encodeLocation ? c.encodeLocation(T.pathname).pathname : T.pathname]),
        pathnameBase: T.pathnameBase === "/" ? p : Wn([p, c.encodeLocation ? c.encodeLocation(T.pathnameBase).pathname : T.pathnameBase])
    })), u, l, i);
    return r && A ? m.createElement(Ul.Provider, {
        value: {
            location: {
                pathname: "/",
                search: "",
                hash: "",
                state: null,
                key: "default",
                ...w
            },
            navigationType: "POP"
        }
    }, A) : A
}
function j1() {
    let n = G1()
      , r = T1(n) ? `${n.status} ${n.statusText}` : n instanceof Error ? n.message : JSON.stringify(n)
      , l = n instanceof Error ? n.stack : null
      , i = "rgba(200,200,200, 0.5)"
      , c = {
        padding: "0.5rem",
        backgroundColor: i
    }
      , u = {
        padding: "2px 4px",
        backgroundColor: i
    }
      , d = null;
    return console.error("Error handled by React Router default ErrorBoundary:", n),
    d = m.createElement(m.Fragment, null, m.createElement("p", null, "💿 Hey developer 👋"), m.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", m.createElement("code", {
        style: u
    }, "ErrorBoundary"), " or", " ", m.createElement("code", {
        style: u
    }, "errorElement"), " prop on your route.")),
    m.createElement(m.Fragment, null, m.createElement("h2", null, "Unexpected Application Error!"), m.createElement("h3", {
        style: {
            fontStyle: "italic"
        }
    }, r), l ? m.createElement("pre", {
        style: c
    }, l) : null, d)
}
var k1 = m.createElement(j1, null)
  , z1 = class extends m.Component {
    constructor(n) {
        super(n),
        this.state = {
            location: n.location,
            revalidation: n.revalidation,
            error: n.error
        }
    }
    static getDerivedStateFromError(n) {
        return {
            error: n
        }
    }
    static getDerivedStateFromProps(n, r) {
        return r.location !== n.location || r.revalidation !== "idle" && n.revalidation === "idle" ? {
            error: n.error,
            location: n.location,
            revalidation: n.revalidation
        } : {
            error: n.error !== void 0 ? n.error : r.error,
            location: r.location,
            revalidation: n.revalidation || r.revalidation
        }
    }
    componentDidCatch(n, r) {
        console.error("React Router caught the following error during render", n, r)
    }
    render() {
        return this.state.error !== void 0 ? m.createElement(_n.Provider, {
            value: this.props.routeContext
        }, m.createElement(ud.Provider, {
            value: this.state.error,
            children: this.props.component
        })) : this.props.children
    }
}
;
function L1({routeContext: n, match: r, children: l}) {
    let i = m.useContext(bo);
    return i && i.static && i.staticContext && (r.route.errorElement || r.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = r.route.id),
    m.createElement(_n.Provider, {
        value: n
    }, l)
}
function B1(n, r=[], l=null, i=null) {
    if (n == null) {
        if (!l)
            return null;
        if (l.errors)
            n = l.matches;
        else if (r.length === 0 && !l.initialized && l.matches.length > 0)
            n = l.matches;
        else
            return null
    }
    let c = n
      , u = l?.errors;
    if (u != null) {
        let g = c.findIndex(p => p.route.id && u?.[p.route.id] !== void 0);
        Xe(g >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),
        c = c.slice(0, Math.min(c.length, g + 1))
    }
    let d = !1
      , h = -1;
    if (l)
        for (let g = 0; g < c.length; g++) {
            let p = c[g];
            if ((p.route.HydrateFallback || p.route.hydrateFallbackElement) && (h = g),
            p.route.id) {
                let {loaderData: b, errors: v} = l
                  , w = p.route.loader && !b.hasOwnProperty(p.route.id) && (!v || v[p.route.id] === void 0);
                if (p.route.lazy || w) {
                    d = !0,
                    h >= 0 ? c = c.slice(0, h + 1) : c = [c[0]];
                    break
                }
            }
        }
    return c.reduceRight( (g, p, b) => {
        let v, w = !1, C = null, R = null;
        l && (v = u && p.route.id ? u[p.route.id] : void 0,
        C = p.route.errorElement || k1,
        d && (h < 0 && b === 0 ? (ry("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"),
        w = !0,
        R = null) : h === b && (w = !0,
        R = p.route.hydrateFallbackElement || null)));
        let E = r.concat(c.slice(0, b + 1))
          , A = () => {
            let T;
            return v ? T = C : w ? T = R : p.route.Component ? T = m.createElement(p.route.Component, null) : p.route.element ? T = p.route.element : T = g,
            m.createElement(L1, {
                match: p,
                routeContext: {
                    outlet: g,
                    matches: E,
                    isDataRoute: l != null
                },
                children: T
            })
        }
        ;
        return l && (p.route.ErrorBoundary || p.route.errorElement || b === 0) ? m.createElement(z1, {
            location: l.location,
            revalidation: l.revalidation,
            component: C,
            error: v,
            children: A(),
            routeContext: {
                outlet: null,
                matches: E,
                isDataRoute: !0
            }
        }) : A()
    }
    , null)
}
function fd(n) {
    return `${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`
}
function U1(n) {
    let r = m.useContext(bo);
    return Xe(r, fd(n)),
    r
}
function H1(n) {
    let r = m.useContext(Hs);
    return Xe(r, fd(n)),
    r
}
function P1(n) {
    let r = m.useContext(_n);
    return Xe(r, fd(n)),
    r
}
function dd(n) {
    let r = P1(n)
      , l = r.matches[r.matches.length - 1];
    return Xe(l.route.id, `${n} can only be used on routes that contain a unique "id"`),
    l.route.id
}
function V1() {
    return dd("useRouteId")
}
function G1() {
    let n = m.useContext(ud)
      , r = H1("useRouteError")
      , l = dd("useRouteError");
    return n !== void 0 ? n : r.errors?.[l]
}
function Y1() {
    let {router: n} = U1("useNavigate")
      , r = dd("useNavigate")
      , l = m.useRef(!1);
    return ny( () => {
        l.current = !0
    }
    ),
    m.useCallback(async (c, u={}) => {
        An(l.current, ty),
        l.current && (typeof c == "number" ? n.navigate(c) : await n.navigate(c, {
            fromRouteId: r,
            ...u
        }))
    }
    , [n, r])
}
var Kg = {};
function ry(n, r, l) {
    !r && !Kg[n] && (Kg[n] = !0,
    An(!1, l))
}
m.memo(q1);
function q1({routes: n, future: r, state: l}) {
    return ay(n, void 0, l, r)
}
function Ss(n) {
    Xe(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")
}
function I1({basename: n="/", children: r=null, location: l, navigationType: i="POP", navigator: c, static: u=!1}) {
    Xe(!Hl(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
    let d = n.replace(/^\/*/, "/")
      , h = m.useMemo( () => ({
        basename: d,
        navigator: c,
        static: u,
        future: {}
    }), [d, c, u]);
    typeof l == "string" && (l = yo(l));
    let {pathname: g="/", search: p="", hash: b="", state: v=null, key: w="default"} = l
      , C = m.useMemo( () => {
        let R = Jn(g, d);
        return R == null ? null : {
            location: {
                pathname: R,
                search: p,
                hash: b,
                state: v,
                key: w
            },
            navigationType: i
        }
    }
    , [d, g, p, b, v, w, i]);
    return An(C != null, `<Router basename="${d}"> is not able to match the URL "${g}${p}${b}" because it does not start with the basename, so the <Router> won't render anything.`),
    C == null ? null : m.createElement(Nn.Provider, {
        value: h
    }, m.createElement(Ul.Provider, {
        children: r,
        value: C
    }))
}
function X1({children: n, location: r}) {
    return D1(Hf(n), r)
}
function Hf(n, r=[]) {
    let l = [];
    return m.Children.forEach(n, (i, c) => {
        if (!m.isValidElement(i))
            return;
        let u = [...r, c];
        if (i.type === m.Fragment) {
            l.push.apply(l, Hf(i.props.children, u));
            return
        }
        Xe(i.type === Ss, `[${typeof i.type == "string" ? i.type : i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),
        Xe(!i.props.index || !i.props.children, "An index route cannot have child routes.");
        let d = {
            id: i.props.id || u.join("-"),
            caseSensitive: i.props.caseSensitive,
            element: i.props.element,
            Component: i.props.Component,
            index: i.props.index,
            path: i.props.path,
            loader: i.props.loader,
            action: i.props.action,
            hydrateFallbackElement: i.props.hydrateFallbackElement,
            HydrateFallback: i.props.HydrateFallback,
            errorElement: i.props.errorElement,
            ErrorBoundary: i.props.ErrorBoundary,
            hasErrorBoundary: i.props.hasErrorBoundary === !0 || i.props.ErrorBoundary != null || i.props.errorElement != null,
            shouldRevalidate: i.props.shouldRevalidate,
            handle: i.props.handle,
            lazy: i.props.lazy
        };
        i.props.children && (d.children = Hf(i.props.children, u)),
        l.push(d)
    }
    ),
    l
}
var Es = "get"
  , Cs = "application/x-www-form-urlencoded";
function Ps(n) {
    return n != null && typeof n.tagName == "string"
}
function $1(n) {
    return Ps(n) && n.tagName.toLowerCase() === "button"
}
function K1(n) {
    return Ps(n) && n.tagName.toLowerCase() === "form"
}
function Q1(n) {
    return Ps(n) && n.tagName.toLowerCase() === "input"
}
function Z1(n) {
    return !!(n.metaKey || n.altKey || n.ctrlKey || n.shiftKey)
}
function F1(n, r) {
    return n.button === 0 && (!r || r === "_self") && !Z1(n)
}
var us = null;
function W1() {
    if (us === null)
        try {
            new FormData(document.createElement("form"),0),
            us = !1
        } catch {
            us = !0
        }
    return us
}
var J1 = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
function wf(n) {
    return n != null && !J1.has(n) ? (An(!1, `"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cs}"`),
    null) : n
}
function eE(n, r) {
    let l, i, c, u, d;
    if (K1(n)) {
        let h = n.getAttribute("action");
        i = h ? Jn(h, r) : null,
        l = n.getAttribute("method") || Es,
        c = wf(n.getAttribute("enctype")) || Cs,
        u = new FormData(n)
    } else if ($1(n) || Q1(n) && (n.type === "submit" || n.type === "image")) {
        let h = n.form;
        if (h == null)
            throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
        let g = n.getAttribute("formaction") || h.getAttribute("action");
        if (i = g ? Jn(g, r) : null,
        l = n.getAttribute("formmethod") || h.getAttribute("method") || Es,
        c = wf(n.getAttribute("formenctype")) || wf(h.getAttribute("enctype")) || Cs,
        u = new FormData(h,n),
        !W1()) {
            let {name: p, type: b, value: v} = n;
            if (b === "image") {
                let w = p ? `${p}.` : "";
                u.append(`${w}x`, "0"),
                u.append(`${w}y`, "0")
            } else
                p && u.append(p, v)
        }
    } else {
        if (Ps(n))
            throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
        l = Es,
        i = null,
        c = Cs,
        d = n
    }
    return u && c === "text/plain" && (d = u,
    u = void 0),
    {
        action: i,
        method: l.toLowerCase(),
        encType: c,
        formData: u,
        body: d
    }
}
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
function md(n, r) {
    if (n === !1 || n === null || typeof n > "u")
        throw new Error(r)
}
function tE(n, r, l) {
    let i = typeof n == "string" ? new URL(n,typeof window > "u" ? "server://singlefetch/" : window.location.origin) : n;
    return i.pathname === "/" ? i.pathname = `_root.${l}` : r && Jn(i.pathname, r) === "/" ? i.pathname = `${r.replace(/\/$/, "")}/_root.${l}` : i.pathname = `${i.pathname.replace(/\/$/, "")}.${l}`,
    i
}
async function nE(n, r) {
    if (n.id in r)
        return r[n.id];
    try {
        let l = await import(n.module);
        return r[n.id] = l,
        l
    } catch (l) {
        return console.error(`Error loading route module \`${n.module}\`, reloading page...`),
        console.error(l),
        window.__reactRouterContext && window.__reactRouterContext.isSpaMode,
        window.location.reload(),
        new Promise( () => {}
        )
    }
}
function aE(n) {
    return n == null ? !1 : n.href == null ? n.rel === "preload" && typeof n.imageSrcSet == "string" && typeof n.imageSizes == "string" : typeof n.rel == "string" && typeof n.href == "string"
}
async function rE(n, r, l) {
    let i = await Promise.all(n.map(async c => {
        let u = r.routes[c.route.id];
        if (u) {
            let d = await nE(u, l);
            return d.links ? d.links() : []
        }
        return []
    }
    ));
    return sE(i.flat(1).filter(aE).filter(c => c.rel === "stylesheet" || c.rel === "preload").map(c => c.rel === "stylesheet" ? {
        ...c,
        rel: "prefetch",
        as: "style"
    } : {
        ...c,
        rel: "prefetch"
    }))
}
function Qg(n, r, l, i, c, u) {
    let d = (g, p) => l[p] ? g.route.id !== l[p].route.id : !0
      , h = (g, p) => l[p].pathname !== g.pathname || l[p].route.path?.endsWith("*") && l[p].params["*"] !== g.params["*"];
    return u === "assets" ? r.filter( (g, p) => d(g, p) || h(g, p)) : u === "data" ? r.filter( (g, p) => {
        let b = i.routes[g.route.id];
        if (!b || !b.hasLoader)
            return !1;
        if (d(g, p) || h(g, p))
            return !0;
        if (g.route.shouldRevalidate) {
            let v = g.route.shouldRevalidate({
                currentUrl: new URL(c.pathname + c.search + c.hash,window.origin),
                currentParams: l[0]?.params || {},
                nextUrl: new URL(n,window.origin),
                nextParams: g.params,
                defaultShouldRevalidate: !0
            });
            if (typeof v == "boolean")
                return v
        }
        return !0
    }
    ) : []
}
function oE(n, r, {includeHydrateFallback: l}={}) {
    return lE(n.map(i => {
        let c = r.routes[i.route.id];
        if (!c)
            return [];
        let u = [c.module];
        return c.clientActionModule && (u = u.concat(c.clientActionModule)),
        c.clientLoaderModule && (u = u.concat(c.clientLoaderModule)),
        l && c.hydrateFallbackModule && (u = u.concat(c.hydrateFallbackModule)),
        c.imports && (u = u.concat(c.imports)),
        u
    }
    ).flat(1))
}
function lE(n) {
    return [...new Set(n)]
}
function iE(n) {
    let r = {}
      , l = Object.keys(n).sort();
    for (let i of l)
        r[i] = n[i];
    return r
}
function sE(n, r) {
    let l = new Set;
    return new Set(r),
    n.reduce( (i, c) => {
        let u = JSON.stringify(iE(c));
        return l.has(u) || (l.add(u),
        i.push({
            key: u,
            link: c
        })),
        i
    }
    , [])
}
function oy() {
    let n = m.useContext(bo);
    return md(n, "You must render this element inside a <DataRouterContext.Provider> element"),
    n
}
function cE() {
    let n = m.useContext(Hs);
    return md(n, "You must render this element inside a <DataRouterStateContext.Provider> element"),
    n
}
var hd = m.createContext(void 0);
hd.displayName = "FrameworkContext";
function ly() {
    let n = m.useContext(hd);
    return md(n, "You must render this element inside a <HydratedRouter> element"),
    n
}
function uE(n, r) {
    let l = m.useContext(hd)
      , [i,c] = m.useState(!1)
      , [u,d] = m.useState(!1)
      , {onFocus: h, onBlur: g, onMouseEnter: p, onMouseLeave: b, onTouchStart: v} = r
      , w = m.useRef(null);
    m.useEffect( () => {
        if (n === "render" && d(!0),
        n === "viewport") {
            let E = T => {
                T.forEach(D => {
                    d(D.isIntersecting)
                }
                )
            }
              , A = new IntersectionObserver(E,{
                threshold: .5
            });
            return w.current && A.observe(w.current),
            () => {
                A.disconnect()
            }
        }
    }
    , [n]),
    m.useEffect( () => {
        if (i) {
            let E = setTimeout( () => {
                d(!0)
            }
            , 100);
            return () => {
                clearTimeout(E)
            }
        }
    }
    , [i]);
    let C = () => {
        c(!0)
    }
      , R = () => {
        c(!1),
        d(!1)
    }
    ;
    return l ? n !== "intent" ? [u, w, {}] : [u, w, {
        onFocus: Rl(h, C),
        onBlur: Rl(g, R),
        onMouseEnter: Rl(p, C),
        onMouseLeave: Rl(b, R),
        onTouchStart: Rl(v, C)
    }] : [!1, w, {}]
}
function Rl(n, r) {
    return l => {
        n && n(l),
        l.defaultPrevented || r(l)
    }
}
function fE({page: n, ...r}) {
    let {router: l} = oy()
      , i = m.useMemo( () => Kv(l.routes, n, l.basename), [l.routes, n, l.basename]);
    return i ? m.createElement(mE, {
        page: n,
        matches: i,
        ...r
    }) : null
}
function dE(n) {
    let {manifest: r, routeModules: l} = ly()
      , [i,c] = m.useState([]);
    return m.useEffect( () => {
        let u = !1;
        return rE(n, r, l).then(d => {
            u || c(d)
        }
        ),
        () => {
            u = !0
        }
    }
    , [n, r, l]),
    i
}
function mE({page: n, matches: r, ...l}) {
    let i = na()
      , {manifest: c, routeModules: u} = ly()
      , {basename: d} = oy()
      , {loaderData: h, matches: g} = cE()
      , p = m.useMemo( () => Qg(n, r, g, c, i, "data"), [n, r, g, c, i])
      , b = m.useMemo( () => Qg(n, r, g, c, i, "assets"), [n, r, g, c, i])
      , v = m.useMemo( () => {
        if (n === i.pathname + i.search + i.hash)
            return [];
        let R = new Set
          , E = !1;
        if (r.forEach(T => {
            let D = c.routes[T.route.id];
            !D || !D.hasLoader || (!p.some(N => N.route.id === T.route.id) && T.route.id in h && u[T.route.id]?.shouldRevalidate || D.hasClientLoader ? E = !0 : R.add(T.route.id))
        }
        ),
        R.size === 0)
            return [];
        let A = tE(n, d, "data");
        return E && R.size > 0 && A.searchParams.set("_routes", r.filter(T => R.has(T.route.id)).map(T => T.route.id).join(",")),
        [A.pathname + A.search]
    }
    , [d, h, i, c, p, r, n, u])
      , w = m.useMemo( () => oE(b, c), [b, c])
      , C = dE(b);
    return m.createElement(m.Fragment, null, v.map(R => m.createElement("link", {
        key: R,
        rel: "prefetch",
        as: "fetch",
        href: R,
        ...l
    })), w.map(R => m.createElement("link", {
        key: R,
        rel: "modulepreload",
        href: R,
        ...l
    })), C.map( ({key: R, link: E}) => m.createElement("link", {
        key: R,
        nonce: l.nonce,
        ...E
    })))
}
function hE(...n) {
    return r => {
        n.forEach(l => {
            typeof l == "function" ? l(r) : l != null && (l.current = r)
        }
        )
    }
}
var iy = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
try {
    iy && (window.__reactRouterVersion = "7.8.0")
} catch {}
function pE({basename: n, children: r, window: l}) {
    let i = m.useRef();
    i.current == null && (i.current = n1({
        window: l,
        v5Compat: !0
    }));
    let c = i.current
      , [u,d] = m.useState({
        action: c.action,
        location: c.location
    })
      , h = m.useCallback(g => {
        m.startTransition( () => d(g))
    }
    , [d]);
    return m.useLayoutEffect( () => c.listen(h), [c, h]),
    m.createElement(I1, {
        basename: n,
        children: r,
        location: u.location,
        navigationType: u.action,
        navigator: c
    })
}
var sy = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i
  , cy = m.forwardRef(function({onClick: r, discover: l="render", prefetch: i="none", relative: c, reloadDocument: u, replace: d, state: h, target: g, to: p, preventScrollReset: b, viewTransition: v, ...w}, C) {
    let {basename: R} = m.useContext(Nn), E = typeof p == "string" && sy.test(p), A, T = !1;
    if (typeof p == "string" && E && (A = p,
    iy))
        try {
            let $ = new URL(window.location.href)
              , ee = p.startsWith("//") ? new URL($.protocol + p) : new URL(p)
              , se = Jn(ee.pathname, R);
            ee.origin === $.origin && se != null ? p = se + ee.search + ee.hash : T = !0
        } catch {
            An(!1, `<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)
        }
    let D = N1(p, {
        relative: c
    })
      , [N,j,U] = uE(i, w)
      , K = bE(p, {
        replace: d,
        state: h,
        target: g,
        preventScrollReset: b,
        relative: c,
        viewTransition: v
    });
    function Y($) {
        r && r($),
        $.defaultPrevented || K($)
    }
    let V = m.createElement("a", {
        ...w,
        ...U,
        href: A || D,
        onClick: T || u ? r : Y,
        ref: hE(C, j),
        target: g,
        "data-discover": !E && l === "render" ? "true" : void 0
    });
    return N && !E ? m.createElement(m.Fragment, null, V, m.createElement(fE, {
        page: D
    })) : V
});
cy.displayName = "Link";
var gE = m.forwardRef(function({"aria-current": r="page", caseSensitive: l=!1, className: i="", end: c=!1, style: u, to: d, viewTransition: h, children: g, ...p}, b) {
    let v = Pl(d, {
        relative: p.relative
    })
      , w = na()
      , C = m.useContext(Hs)
      , {navigator: R, basename: E} = m.useContext(Nn)
      , A = C != null && CE(v) && h === !0
      , T = R.encodeLocation ? R.encodeLocation(v).pathname : v.pathname
      , D = w.pathname
      , N = C && C.navigation && C.navigation.location ? C.navigation.location.pathname : null;
    l || (D = D.toLowerCase(),
    N = N ? N.toLowerCase() : null,
    T = T.toLowerCase()),
    N && E && (N = Jn(N, E) || N);
    const j = T !== "/" && T.endsWith("/") ? T.length - 1 : T.length;
    let U = D === T || !c && D.startsWith(T) && D.charAt(j) === "/", K = N != null && (N === T || !c && N.startsWith(T) && N.charAt(T.length) === "/"), Y = {
        isActive: U,
        isPending: K,
        isTransitioning: A
    }, V = U ? r : void 0, $;
    typeof i == "function" ? $ = i(Y) : $ = [i, U ? "active" : null, K ? "pending" : null, A ? "transitioning" : null].filter(Boolean).join(" ");
    let ee = typeof u == "function" ? u(Y) : u;
    return m.createElement(cy, {
        ...p,
        "aria-current": V,
        className: $,
        ref: b,
        style: ee,
        to: d,
        viewTransition: h
    }, typeof g == "function" ? g(Y) : g)
});
gE.displayName = "NavLink";
var vE = m.forwardRef( ({discover: n="render", fetcherKey: r, navigate: l, reloadDocument: i, replace: c, state: u, method: d=Es, action: h, onSubmit: g, relative: p, preventScrollReset: b, viewTransition: v, ...w}, C) => {
    let R = SE()
      , E = EE(h, {
        relative: p
    })
      , A = d.toLowerCase() === "get" ? "get" : "post"
      , T = typeof h == "string" && sy.test(h)
      , D = N => {
        if (g && g(N),
        N.defaultPrevented)
            return;
        N.preventDefault();
        let j = N.nativeEvent.submitter
          , U = j?.getAttribute("formmethod") || d;
        R(j || N.currentTarget, {
            fetcherKey: r,
            method: U,
            navigate: l,
            replace: c,
            state: u,
            relative: p,
            preventScrollReset: b,
            viewTransition: v
        })
    }
    ;
    return m.createElement("form", {
        ref: C,
        method: A,
        action: E,
        onSubmit: i ? g : D,
        ...w,
        "data-discover": !T && n === "render" ? "true" : void 0
    })
}
);
vE.displayName = "Form";
function yE(n) {
    return `${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`
}
function uy(n) {
    let r = m.useContext(bo);
    return Xe(r, yE(n)),
    r
}
function bE(n, {target: r, replace: l, state: i, preventScrollReset: c, relative: u, viewTransition: d}={}) {
    let h = _1()
      , g = na()
      , p = Pl(n, {
        relative: u
    });
    return m.useCallback(b => {
        if (F1(b, r)) {
            b.preventDefault();
            let v = l !== void 0 ? l : Dl(g) === Dl(p);
            h(n, {
                replace: v,
                state: i,
                preventScrollReset: c,
                relative: u,
                viewTransition: d
            })
        }
    }
    , [g, h, p, l, i, r, n, c, u, d])
}
var xE = 0
  , wE = () => `__${String(++xE)}__`;
function SE() {
    let {router: n} = uy("useSubmit")
      , {basename: r} = m.useContext(Nn)
      , l = V1();
    return m.useCallback(async (i, c={}) => {
        let {action: u, method: d, encType: h, formData: g, body: p} = eE(i, r);
        if (c.navigate === !1) {
            let b = c.fetcherKey || wE();
            await n.fetch(b, l, c.action || u, {
                preventScrollReset: c.preventScrollReset,
                formData: g,
                body: p,
                formMethod: c.method || d,
                formEncType: c.encType || h,
                flushSync: c.flushSync
            })
        } else
            await n.navigate(c.action || u, {
                preventScrollReset: c.preventScrollReset,
                formData: g,
                body: p,
                formMethod: c.method || d,
                formEncType: c.encType || h,
                replace: c.replace,
                state: c.state,
                fromRouteId: l,
                flushSync: c.flushSync,
                viewTransition: c.viewTransition
            })
    }
    , [n, r, l])
}
function EE(n, {relative: r}={}) {
    let {basename: l} = m.useContext(Nn)
      , i = m.useContext(_n);
    Xe(i, "useFormAction must be used inside a RouteContext");
    let[c] = i.matches.slice(-1)
      , u = {
        ...Pl(n || ".", {
            relative: r
        })
    }
      , d = na();
    if (n == null) {
        u.search = d.search;
        let h = new URLSearchParams(u.search)
          , g = h.getAll("index");
        if (g.some(b => b === "")) {
            h.delete("index"),
            g.filter(v => v).forEach(v => h.append("index", v));
            let b = h.toString();
            u.search = b ? `?${b}` : ""
        }
    }
    return (!n || n === ".") && c.route.index && (u.search = u.search ? u.search.replace(/^\?/, "?index&") : "?index"),
    l !== "/" && (u.pathname = u.pathname === "/" ? l : Wn([l, u.pathname])),
    Dl(u)
}
function CE(n, {relative: r}={}) {
    let l = m.useContext(ey);
    Xe(l != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");
    let {basename: i} = uy("useViewTransitionState")
      , c = Pl(n, {
        relative: r
    });
    if (!l.isTransitioning)
        return !1;
    let u = Jn(l.currentLocation.pathname, i) || l.currentLocation.pathname
      , d = Jn(l.nextLocation.pathname, i) || l.nextLocation.pathname;
    return Ms(c.pathname, d) != null || Ms(c.pathname, u) != null
}
var Vl = Xv();
const fy = cd(Vl);
function Zg(n, r) {
    if (typeof n == "function")
        return n(r);
    n != null && (n.current = r)
}
function Vs(...n) {
    return r => {
        let l = !1;
        const i = n.map(c => {
            const u = Zg(c, r);
            return !l && typeof u == "function" && (l = !0),
            u
        }
        );
        if (l)
            return () => {
                for (let c = 0; c < i.length; c++) {
                    const u = i[c];
                    typeof u == "function" ? u() : Zg(n[c], null)
                }
            }
    }
}
function Oe(...n) {
    return m.useCallback(Vs(...n), n)
}
function fo(n) {
    const r = TE(n)
      , l = m.forwardRef( (i, c) => {
        const {children: u, ...d} = i
          , h = m.Children.toArray(u)
          , g = h.find(AE);
        if (g) {
            const p = g.props.children
              , b = h.map(v => v === g ? m.Children.count(p) > 1 ? m.Children.only(null) : m.isValidElement(p) ? p.props.children : null : v);
            return y.jsx(r, {
                ...d,
                ref: c,
                children: m.isValidElement(p) ? m.cloneElement(p, void 0, b) : null
            })
        }
        return y.jsx(r, {
            ...d,
            ref: c,
            children: u
        })
    }
    );
    return l.displayName = `${n}.Slot`,
    l
}
var dy = fo("Slot");
function TE(n) {
    const r = m.forwardRef( (l, i) => {
        const {children: c, ...u} = l;
        if (m.isValidElement(c)) {
            const d = NE(c)
              , h = ME(u, c.props);
            return c.type !== m.Fragment && (h.ref = i ? Vs(i, d) : d),
            m.cloneElement(c, h)
        }
        return m.Children.count(c) > 1 ? m.Children.only(null) : null
    }
    );
    return r.displayName = `${n}.SlotClone`,
    r
}
var my = Symbol("radix.slottable");
function RE(n) {
    const r = ({children: l}) => y.jsx(y.Fragment, {
        children: l
    });
    return r.displayName = `${n}.Slottable`,
    r.__radixId = my,
    r
}
function AE(n) {
    return m.isValidElement(n) && typeof n.type == "function" && "__radixId"in n.type && n.type.__radixId === my
}
function ME(n, r) {
    const l = {
        ...r
    };
    for (const i in r) {
        const c = n[i]
          , u = r[i];
        /^on[A-Z]/.test(i) ? c && u ? l[i] = (...h) => {
            const g = u(...h);
            return c(...h),
            g
        }
        : c && (l[i] = c) : i === "style" ? l[i] = {
            ...c,
            ...u
        } : i === "className" && (l[i] = [c, u].filter(Boolean).join(" "))
    }
    return {
        ...n,
        ...l
    }
}
function NE(n) {
    let r = Object.getOwnPropertyDescriptor(n.props, "ref")?.get
      , l = r && "isReactWarning"in r && r.isReactWarning;
    return l ? n.ref : (r = Object.getOwnPropertyDescriptor(n, "ref")?.get,
    l = r && "isReactWarning"in r && r.isReactWarning,
    l ? n.props.ref : n.props.ref || n.ref)
}
var _E = ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"]
  , Me = _E.reduce( (n, r) => {
    const l = fo(`Primitive.${r}`)
      , i = m.forwardRef( (c, u) => {
        const {asChild: d, ...h} = c
          , g = d ? l : r;
        return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0),
        y.jsx(g, {
            ...h,
            ref: u
        })
    }
    );
    return i.displayName = `Primitive.${r}`,
    {
        ...n,
        [r]: i
    }
}
, {});
function hy(n, r) {
    n && Vl.flushSync( () => n.dispatchEvent(r))
}
var py = Object.freeze({
    position: "absolute",
    border: 0,
    width: 1,
    height: 1,
    padding: 0,
    margin: -1,
    overflow: "hidden",
    clip: "rect(0, 0, 0, 0)",
    whiteSpace: "nowrap",
    wordWrap: "normal"
})
  , OE = "VisuallyHidden"
  , gy = m.forwardRef( (n, r) => y.jsx(Me.span, {
    ...n,
    ref: r,
    style: {
        ...py,
        ...n.style
    }
}));
gy.displayName = OE;
var DE = gy;
function L_(n, r) {
    const l = m.createContext(r)
      , i = u => {
        const {children: d, ...h} = u
          , g = m.useMemo( () => h, Object.values(h));
        return y.jsx(l.Provider, {
            value: g,
            children: d
        })
    }
    ;
    i.displayName = n + "Provider";
    function c(u) {
        const d = m.useContext(l);
        if (d)
            return d;
        if (r !== void 0)
            return r;
        throw new Error(`\`${u}\` must be used within \`${n}\``)
    }
    return [i, c]
}
function aa(n, r=[]) {
    let l = [];
    function i(u, d) {
        const h = m.createContext(d)
          , g = l.length;
        l = [...l, d];
        const p = v => {
            const {scope: w, children: C, ...R} = v
              , E = w?.[n]?.[g] || h
              , A = m.useMemo( () => R, Object.values(R));
            return y.jsx(E.Provider, {
                value: A,
                children: C
            })
        }
        ;
        p.displayName = u + "Provider";
        function b(v, w) {
            const C = w?.[n]?.[g] || h
              , R = m.useContext(C);
            if (R)
                return R;
            if (d !== void 0)
                return d;
            throw new Error(`\`${v}\` must be used within \`${u}\``)
        }
        return [p, b]
    }
    const c = () => {
        const u = l.map(d => m.createContext(d));
        return function(h) {
            const g = h?.[n] || u;
            return m.useMemo( () => ({
                [`__scope${n}`]: {
                    ...h,
                    [n]: g
                }
            }), [h, g])
        }
    }
    ;
    return c.scopeName = n,
    [i, jE(c, ...r)]
}
function jE(...n) {
    const r = n[0];
    if (n.length === 1)
        return r;
    const l = () => {
        const i = n.map(c => ({
            useScope: c(),
            scopeName: c.scopeName
        }));
        return function(u) {
            const d = i.reduce( (h, {useScope: g, scopeName: p}) => {
                const v = g(u)[`__scope${p}`];
                return {
                    ...h,
                    ...v
                }
            }
            , {});
            return m.useMemo( () => ({
                [`__scope${r.scopeName}`]: d
            }), [d])
        }
    }
    ;
    return l.scopeName = r.scopeName,
    l
}
function pd(n) {
    const r = n + "CollectionProvider"
      , [l,i] = aa(r)
      , [c,u] = l(r, {
        collectionRef: {
            current: null
        },
        itemMap: new Map
    })
      , d = E => {
        const {scope: A, children: T} = E
          , D = F.useRef(null)
          , N = F.useRef(new Map).current;
        return y.jsx(c, {
            scope: A,
            itemMap: N,
            collectionRef: D,
            children: T
        })
    }
    ;
    d.displayName = r;
    const h = n + "CollectionSlot"
      , g = fo(h)
      , p = F.forwardRef( (E, A) => {
        const {scope: T, children: D} = E
          , N = u(h, T)
          , j = Oe(A, N.collectionRef);
        return y.jsx(g, {
            ref: j,
            children: D
        })
    }
    );
    p.displayName = h;
    const b = n + "CollectionItemSlot"
      , v = "data-radix-collection-item"
      , w = fo(b)
      , C = F.forwardRef( (E, A) => {
        const {scope: T, children: D, ...N} = E
          , j = F.useRef(null)
          , U = Oe(A, j)
          , K = u(b, T);
        return F.useEffect( () => (K.itemMap.set(j, {
            ref: j,
            ...N
        }),
        () => void K.itemMap.delete(j))),
        y.jsx(w, {
            [v]: "",
            ref: U,
            children: D
        })
    }
    );
    C.displayName = b;
    function R(E) {
        const A = u(n + "CollectionConsumer", E);
        return F.useCallback( () => {
            const D = A.collectionRef.current;
            if (!D)
                return [];
            const N = Array.from(D.querySelectorAll(`[${v}]`));
            return Array.from(A.itemMap.values()).sort( (K, Y) => N.indexOf(K.ref.current) - N.indexOf(Y.ref.current))
        }
        , [A.collectionRef, A.itemMap])
    }
    return [{
        Provider: d,
        Slot: p,
        ItemSlot: C
    }, R, i]
}
function ue(n, r, {checkForDefaultPrevented: l=!0}={}) {
    return function(c) {
        if (n?.(c),
        l === !1 || !c.defaultPrevented)
            return r?.(c)
    }
}
var st = globalThis?.document ? m.useLayoutEffect : () => {}
  , kE = $v[" useInsertionEffect ".trim().toString()] || st;
function mo({prop: n, defaultProp: r, onChange: l= () => {}
, caller: i}) {
    const [c,u,d] = zE({
        defaultProp: r,
        onChange: l
    })
      , h = n !== void 0
      , g = h ? n : c;
    {
        const b = m.useRef(n !== void 0);
        m.useEffect( () => {
            const v = b.current;
            v !== h && console.warn(`${i} is changing from ${v ? "controlled" : "uncontrolled"} to ${h ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),
            b.current = h
        }
        , [h, i])
    }
    const p = m.useCallback(b => {
        if (h) {
            const v = LE(b) ? b(n) : b;
            v !== n && d.current?.(v)
        } else
            u(b)
    }
    , [h, n, u, d]);
    return [g, p]
}
function zE({defaultProp: n, onChange: r}) {
    const [l,i] = m.useState(n)
      , c = m.useRef(l)
      , u = m.useRef(r);
    return kE( () => {
        u.current = r
    }
    , [r]),
    m.useEffect( () => {
        c.current !== l && (u.current?.(l),
        c.current = l)
    }
    , [l, c]),
    [l, i, u]
}
function LE(n) {
    return typeof n == "function"
}
function BE(n, r) {
    return m.useReducer( (l, i) => r[l][i] ?? l, n)
}
var xo = n => {
    const {present: r, children: l} = n
      , i = UE(r)
      , c = typeof l == "function" ? l({
        present: i.isPresent
    }) : m.Children.only(l)
      , u = Oe(i.ref, HE(c));
    return typeof l == "function" || i.isPresent ? m.cloneElement(c, {
        ref: u
    }) : null
}
;
xo.displayName = "Presence";
function UE(n) {
    const [r,l] = m.useState()
      , i = m.useRef(null)
      , c = m.useRef(n)
      , u = m.useRef("none")
      , d = n ? "mounted" : "unmounted"
      , [h,g] = BE(d, {
        mounted: {
            UNMOUNT: "unmounted",
            ANIMATION_OUT: "unmountSuspended"
        },
        unmountSuspended: {
            MOUNT: "mounted",
            ANIMATION_END: "unmounted"
        },
        unmounted: {
            MOUNT: "mounted"
        }
    });
    return m.useEffect( () => {
        const p = fs(i.current);
        u.current = h === "mounted" ? p : "none"
    }
    , [h]),
    st( () => {
        const p = i.current
          , b = c.current;
        if (b !== n) {
            const w = u.current
              , C = fs(p);
            n ? g("MOUNT") : C === "none" || p?.display === "none" ? g("UNMOUNT") : g(b && w !== C ? "ANIMATION_OUT" : "UNMOUNT"),
            c.current = n
        }
    }
    , [n, g]),
    st( () => {
        if (r) {
            let p;
            const b = r.ownerDocument.defaultView ?? window
              , v = C => {
                const E = fs(i.current).includes(C.animationName);
                if (C.target === r && E && (g("ANIMATION_END"),
                !c.current)) {
                    const A = r.style.animationFillMode;
                    r.style.animationFillMode = "forwards",
                    p = b.setTimeout( () => {
                        r.style.animationFillMode === "forwards" && (r.style.animationFillMode = A)
                    }
                    )
                }
            }
              , w = C => {
                C.target === r && (u.current = fs(i.current))
            }
            ;
            return r.addEventListener("animationstart", w),
            r.addEventListener("animationcancel", v),
            r.addEventListener("animationend", v),
            () => {
                b.clearTimeout(p),
                r.removeEventListener("animationstart", w),
                r.removeEventListener("animationcancel", v),
                r.removeEventListener("animationend", v)
            }
        } else
            g("ANIMATION_END")
    }
    , [r, g]),
    {
        isPresent: ["mounted", "unmountSuspended"].includes(h),
        ref: m.useCallback(p => {
            i.current = p ? getComputedStyle(p) : null,
            l(p)
        }
        , [])
    }
}
function fs(n) {
    return n?.animationName || "none"
}
function HE(n) {
    let r = Object.getOwnPropertyDescriptor(n.props, "ref")?.get
      , l = r && "isReactWarning"in r && r.isReactWarning;
    return l ? n.ref : (r = Object.getOwnPropertyDescriptor(n, "ref")?.get,
    l = r && "isReactWarning"in r && r.isReactWarning,
    l ? n.props.ref : n.props.ref || n.ref)
}
var PE = $v[" useId ".trim().toString()] || ( () => {}
)
  , VE = 0;
function Da(n) {
    const [r,l] = m.useState(PE());
    return st( () => {
        l(i => i ?? String(VE++))
    }
    , [n]),
    r ? `radix-${r}` : ""
}
var vy = m.createContext(void 0)
  , GE = n => {
    const {dir: r, children: l} = n;
    return y.jsx(vy.Provider, {
        value: r,
        children: l
    })
}
;
function Gs(n) {
    const r = m.useContext(vy);
    return n || r || "ltr"
}
var YE = GE;
function vt(n) {
    const r = m.useRef(n);
    return m.useEffect( () => {
        r.current = n
    }
    ),
    m.useMemo( () => (...l) => r.current?.(...l), [])
}
function qE(n, r=globalThis?.document) {
    const l = vt(n);
    m.useEffect( () => {
        const i = c => {
            c.key === "Escape" && l(c)
        }
        ;
        return r.addEventListener("keydown", i, {
            capture: !0
        }),
        () => r.removeEventListener("keydown", i, {
            capture: !0
        })
    }
    , [l, r])
}
var IE = "DismissableLayer", Pf = "dismissableLayer.update", XE = "dismissableLayer.pointerDownOutside", $E = "dismissableLayer.focusOutside", Fg, yy = m.createContext({
    layers: new Set,
    layersWithOutsidePointerEventsDisabled: new Set,
    branches: new Set
}), Ys = m.forwardRef( (n, r) => {
    const {disableOutsidePointerEvents: l=!1, onEscapeKeyDown: i, onPointerDownOutside: c, onFocusOutside: u, onInteractOutside: d, onDismiss: h, ...g} = n
      , p = m.useContext(yy)
      , [b,v] = m.useState(null)
      , w = b?.ownerDocument ?? globalThis?.document
      , [,C] = m.useState({})
      , R = Oe(r, Y => v(Y))
      , E = Array.from(p.layers)
      , [A] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1)
      , T = E.indexOf(A)
      , D = b ? E.indexOf(b) : -1
      , N = p.layersWithOutsidePointerEventsDisabled.size > 0
      , j = D >= T
      , U = ZE(Y => {
        const V = Y.target
          , $ = [...p.branches].some(ee => ee.contains(V));
        !j || $ || (c?.(Y),
        d?.(Y),
        Y.defaultPrevented || h?.())
    }
    , w)
      , K = FE(Y => {
        const V = Y.target;
        [...p.branches].some(ee => ee.contains(V)) || (u?.(Y),
        d?.(Y),
        Y.defaultPrevented || h?.())
    }
    , w);
    return qE(Y => {
        D === p.layers.size - 1 && (i?.(Y),
        !Y.defaultPrevented && h && (Y.preventDefault(),
        h()))
    }
    , w),
    m.useEffect( () => {
        if (b)
            return l && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (Fg = w.body.style.pointerEvents,
            w.body.style.pointerEvents = "none"),
            p.layersWithOutsidePointerEventsDisabled.add(b)),
            p.layers.add(b),
            Wg(),
            () => {
                l && p.layersWithOutsidePointerEventsDisabled.size === 1 && (w.body.style.pointerEvents = Fg)
            }
    }
    , [b, w, l, p]),
    m.useEffect( () => () => {
        b && (p.layers.delete(b),
        p.layersWithOutsidePointerEventsDisabled.delete(b),
        Wg())
    }
    , [b, p]),
    m.useEffect( () => {
        const Y = () => C({});
        return document.addEventListener(Pf, Y),
        () => document.removeEventListener(Pf, Y)
    }
    , []),
    y.jsx(Me.div, {
        ...g,
        ref: R,
        style: {
            pointerEvents: N ? j ? "auto" : "none" : void 0,
            ...n.style
        },
        onFocusCapture: ue(n.onFocusCapture, K.onFocusCapture),
        onBlurCapture: ue(n.onBlurCapture, K.onBlurCapture),
        onPointerDownCapture: ue(n.onPointerDownCapture, U.onPointerDownCapture)
    })
}
);
Ys.displayName = IE;
var KE = "DismissableLayerBranch"
  , QE = m.forwardRef( (n, r) => {
    const l = m.useContext(yy)
      , i = m.useRef(null)
      , c = Oe(r, i);
    return m.useEffect( () => {
        const u = i.current;
        if (u)
            return l.branches.add(u),
            () => {
                l.branches.delete(u)
            }
    }
    , [l.branches]),
    y.jsx(Me.div, {
        ...n,
        ref: c
    })
}
);
QE.displayName = KE;
function ZE(n, r=globalThis?.document) {
    const l = vt(n)
      , i = m.useRef(!1)
      , c = m.useRef( () => {}
    );
    return m.useEffect( () => {
        const u = h => {
            if (h.target && !i.current) {
                let g = function() {
                    by(XE, l, p, {
                        discrete: !0
                    })
                };
                const p = {
                    originalEvent: h
                };
                h.pointerType === "touch" ? (r.removeEventListener("click", c.current),
                c.current = g,
                r.addEventListener("click", c.current, {
                    once: !0
                })) : g()
            } else
                r.removeEventListener("click", c.current);
            i.current = !1
        }
          , d = window.setTimeout( () => {
            r.addEventListener("pointerdown", u)
        }
        , 0);
        return () => {
            window.clearTimeout(d),
            r.removeEventListener("pointerdown", u),
            r.removeEventListener("click", c.current)
        }
    }
    , [r, l]),
    {
        onPointerDownCapture: () => i.current = !0
    }
}
function FE(n, r=globalThis?.document) {
    const l = vt(n)
      , i = m.useRef(!1);
    return m.useEffect( () => {
        const c = u => {
            u.target && !i.current && by($E, l, {
                originalEvent: u
            }, {
                discrete: !1
            })
        }
        ;
        return r.addEventListener("focusin", c),
        () => r.removeEventListener("focusin", c)
    }
    , [r, l]),
    {
        onFocusCapture: () => i.current = !0,
        onBlurCapture: () => i.current = !1
    }
}
function Wg() {
    const n = new CustomEvent(Pf);
    document.dispatchEvent(n)
}
function by(n, r, l, {discrete: i}) {
    const c = l.originalEvent.target
      , u = new CustomEvent(n,{
        bubbles: !1,
        cancelable: !0,
        detail: l
    });
    r && c.addEventListener(n, r, {
        once: !0
    }),
    i ? hy(c, u) : c.dispatchEvent(u)
}
var Sf = "focusScope.autoFocusOnMount"
  , Ef = "focusScope.autoFocusOnUnmount"
  , Jg = {
    bubbles: !1,
    cancelable: !0
}
  , WE = "FocusScope"
  , gd = m.forwardRef( (n, r) => {
    const {loop: l=!1, trapped: i=!1, onMountAutoFocus: c, onUnmountAutoFocus: u, ...d} = n
      , [h,g] = m.useState(null)
      , p = vt(c)
      , b = vt(u)
      , v = m.useRef(null)
      , w = Oe(r, E => g(E))
      , C = m.useRef({
        paused: !1,
        pause() {
            this.paused = !0
        },
        resume() {
            this.paused = !1
        }
    }).current;
    m.useEffect( () => {
        if (i) {
            let E = function(N) {
                if (C.paused || !h)
                    return;
                const j = N.target;
                h.contains(j) ? v.current = j : Oa(v.current, {
                    select: !0
                })
            }
              , A = function(N) {
                if (C.paused || !h)
                    return;
                const j = N.relatedTarget;
                j !== null && (h.contains(j) || Oa(v.current, {
                    select: !0
                }))
            }
              , T = function(N) {
                if (document.activeElement === document.body)
                    for (const U of N)
                        U.removedNodes.length > 0 && Oa(h)
            };
            document.addEventListener("focusin", E),
            document.addEventListener("focusout", A);
            const D = new MutationObserver(T);
            return h && D.observe(h, {
                childList: !0,
                subtree: !0
            }),
            () => {
                document.removeEventListener("focusin", E),
                document.removeEventListener("focusout", A),
                D.disconnect()
            }
        }
    }
    , [i, h, C.paused]),
    m.useEffect( () => {
        if (h) {
            tv.add(C);
            const E = document.activeElement;
            if (!h.contains(E)) {
                const T = new CustomEvent(Sf,Jg);
                h.addEventListener(Sf, p),
                h.dispatchEvent(T),
                T.defaultPrevented || (JE(rC(xy(h)), {
                    select: !0
                }),
                document.activeElement === E && Oa(h))
            }
            return () => {
                h.removeEventListener(Sf, p),
                setTimeout( () => {
                    const T = new CustomEvent(Ef,Jg);
                    h.addEventListener(Ef, b),
                    h.dispatchEvent(T),
                    T.defaultPrevented || Oa(E ?? document.body, {
                        select: !0
                    }),
                    h.removeEventListener(Ef, b),
                    tv.remove(C)
                }
                , 0)
            }
        }
    }
    , [h, p, b, C]);
    const R = m.useCallback(E => {
        if (!l && !i || C.paused)
            return;
        const A = E.key === "Tab" && !E.altKey && !E.ctrlKey && !E.metaKey
          , T = document.activeElement;
        if (A && T) {
            const D = E.currentTarget
              , [N,j] = eC(D);
            N && j ? !E.shiftKey && T === j ? (E.preventDefault(),
            l && Oa(N, {
                select: !0
            })) : E.shiftKey && T === N && (E.preventDefault(),
            l && Oa(j, {
                select: !0
            })) : T === D && E.preventDefault()
        }
    }
    , [l, i, C.paused]);
    return y.jsx(Me.div, {
        tabIndex: -1,
        ...d,
        ref: w,
        onKeyDown: R
    })
}
);
gd.displayName = WE;
function JE(n, {select: r=!1}={}) {
    const l = document.activeElement;
    for (const i of n)
        if (Oa(i, {
            select: r
        }),
        document.activeElement !== l)
            return
}
function eC(n) {
    const r = xy(n)
      , l = ev(r, n)
      , i = ev(r.reverse(), n);
    return [l, i]
}
function xy(n) {
    const r = []
      , l = document.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, {
        acceptNode: i => {
            const c = i.tagName === "INPUT" && i.type === "hidden";
            return i.disabled || i.hidden || c ? NodeFilter.FILTER_SKIP : i.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
        }
    });
    for (; l.nextNode(); )
        r.push(l.currentNode);
    return r
}
function ev(n, r) {
    for (const l of n)
        if (!tC(l, {
            upTo: r
        }))
            return l
}
function tC(n, {upTo: r}) {
    if (getComputedStyle(n).visibility === "hidden")
        return !0;
    for (; n; ) {
        if (r !== void 0 && n === r)
            return !1;
        if (getComputedStyle(n).display === "none")
            return !0;
        n = n.parentElement
    }
    return !1
}
function nC(n) {
    return n instanceof HTMLInputElement && "select"in n
}
function Oa(n, {select: r=!1}={}) {
    if (n && n.focus) {
        const l = document.activeElement;
        n.focus({
            preventScroll: !0
        }),
        n !== l && nC(n) && r && n.select()
    }
}
var tv = aC();
function aC() {
    let n = [];
    return {
        add(r) {
            const l = n[0];
            r !== l && l?.pause(),
            n = nv(n, r),
            n.unshift(r)
        },
        remove(r) {
            n = nv(n, r),
            n[0]?.resume()
        }
    }
}
function nv(n, r) {
    const l = [...n]
      , i = l.indexOf(r);
    return i !== -1 && l.splice(i, 1),
    l
}
function rC(n) {
    return n.filter(r => r.tagName !== "A")
}
var oC = "Portal"
  , vd = m.forwardRef( (n, r) => {
    const {container: l, ...i} = n
      , [c,u] = m.useState(!1);
    st( () => u(!0), []);
    const d = l || c && globalThis?.document?.body;
    return d ? fy.createPortal(y.jsx(Me.div, {
        ...i,
        ref: r
    }), d) : null
}
);
vd.displayName = oC;
var Cf = 0;
function wy() {
    m.useEffect( () => {
        const n = document.querySelectorAll("[data-radix-focus-guard]");
        return document.body.insertAdjacentElement("afterbegin", n[0] ?? av()),
        document.body.insertAdjacentElement("beforeend", n[1] ?? av()),
        Cf++,
        () => {
            Cf === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(r => r.remove()),
            Cf--
        }
    }
    , [])
}
function av() {
    const n = document.createElement("span");
    return n.setAttribute("data-radix-focus-guard", ""),
    n.tabIndex = 0,
    n.style.outline = "none",
    n.style.opacity = "0",
    n.style.position = "fixed",
    n.style.pointerEvents = "none",
    n
}
var Cn = function() {
    return Cn = Object.assign || function(r) {
        for (var l, i = 1, c = arguments.length; i < c; i++) {
            l = arguments[i];
            for (var u in l)
                Object.prototype.hasOwnProperty.call(l, u) && (r[u] = l[u])
        }
        return r
    }
    ,
    Cn.apply(this, arguments)
};
function Sy(n, r) {
    var l = {};
    for (var i in n)
        Object.prototype.hasOwnProperty.call(n, i) && r.indexOf(i) < 0 && (l[i] = n[i]);
    if (n != null && typeof Object.getOwnPropertySymbols == "function")
        for (var c = 0, i = Object.getOwnPropertySymbols(n); c < i.length; c++)
            r.indexOf(i[c]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[c]) && (l[i[c]] = n[i[c]]);
    return l
}
function lC(n, r, l) {
    if (l || arguments.length === 2)
        for (var i = 0, c = r.length, u; i < c; i++)
            (u || !(i in r)) && (u || (u = Array.prototype.slice.call(r, 0, i)),
            u[i] = r[i]);
    return n.concat(u || Array.prototype.slice.call(r))
}
var Ts = "right-scroll-bar-position"
  , Rs = "width-before-scroll-bar"
  , iC = "with-scroll-bars-hidden"
  , sC = "--removed-body-scroll-bar-size";
function Tf(n, r) {
    return typeof n == "function" ? n(r) : n && (n.current = r),
    n
}
function cC(n, r) {
    var l = m.useState(function() {
        return {
            value: n,
            callback: r,
            facade: {
                get current() {
                    return l.value
                },
                set current(i) {
                    var c = l.value;
                    c !== i && (l.value = i,
                    l.callback(i, c))
                }
            }
        }
    })[0];
    return l.callback = r,
    l.facade
}
var uC = typeof window < "u" ? m.useLayoutEffect : m.useEffect
  , rv = new WeakMap;
function fC(n, r) {
    var l = cC(null, function(i) {
        return n.forEach(function(c) {
            return Tf(c, i)
        })
    });
    return uC(function() {
        var i = rv.get(l);
        if (i) {
            var c = new Set(i)
              , u = new Set(n)
              , d = l.current;
            c.forEach(function(h) {
                u.has(h) || Tf(h, null)
            }),
            u.forEach(function(h) {
                c.has(h) || Tf(h, d)
            })
        }
        rv.set(l, n)
    }, [n]),
    l
}
function dC(n) {
    return n
}
function mC(n, r) {
    r === void 0 && (r = dC);
    var l = []
      , i = !1
      , c = {
        read: function() {
            if (i)
                throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
            return l.length ? l[l.length - 1] : n
        },
        useMedium: function(u) {
            var d = r(u, i);
            return l.push(d),
            function() {
                l = l.filter(function(h) {
                    return h !== d
                })
            }
        },
        assignSyncMedium: function(u) {
            for (i = !0; l.length; ) {
                var d = l;
                l = [],
                d.forEach(u)
            }
            l = {
                push: function(h) {
                    return u(h)
                },
                filter: function() {
                    return l
                }
            }
        },
        assignMedium: function(u) {
            i = !0;
            var d = [];
            if (l.length) {
                var h = l;
                l = [],
                h.forEach(u),
                d = l
            }
            var g = function() {
                var b = d;
                d = [],
                b.forEach(u)
            }
              , p = function() {
                return Promise.resolve().then(g)
            };
            p(),
            l = {
                push: function(b) {
                    d.push(b),
                    p()
                },
                filter: function(b) {
                    return d = d.filter(b),
                    l
                }
            }
        }
    };
    return c
}
function hC(n) {
    n === void 0 && (n = {});
    var r = mC(null);
    return r.options = Cn({
        async: !0,
        ssr: !1
    }, n),
    r
}
var Ey = function(n) {
    var r = n.sideCar
      , l = Sy(n, ["sideCar"]);
    if (!r)
        throw new Error("Sidecar: please provide `sideCar` property to import the right car");
    var i = r.read();
    if (!i)
        throw new Error("Sidecar medium not found");
    return m.createElement(i, Cn({}, l))
};
Ey.isSideCarExport = !0;
function pC(n, r) {
    return n.useMedium(r),
    Ey
}
var Cy = hC()
  , Rf = function() {}
  , qs = m.forwardRef(function(n, r) {
    var l = m.useRef(null)
      , i = m.useState({
        onScrollCapture: Rf,
        onWheelCapture: Rf,
        onTouchMoveCapture: Rf
    })
      , c = i[0]
      , u = i[1]
      , d = n.forwardProps
      , h = n.children
      , g = n.className
      , p = n.removeScrollBar
      , b = n.enabled
      , v = n.shards
      , w = n.sideCar
      , C = n.noRelative
      , R = n.noIsolation
      , E = n.inert
      , A = n.allowPinchZoom
      , T = n.as
      , D = T === void 0 ? "div" : T
      , N = n.gapMode
      , j = Sy(n, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"])
      , U = w
      , K = fC([l, r])
      , Y = Cn(Cn({}, j), c);
    return m.createElement(m.Fragment, null, b && m.createElement(U, {
        sideCar: Cy,
        removeScrollBar: p,
        shards: v,
        noRelative: C,
        noIsolation: R,
        inert: E,
        setCallbacks: u,
        allowPinchZoom: !!A,
        lockRef: l,
        gapMode: N
    }), d ? m.cloneElement(m.Children.only(h), Cn(Cn({}, Y), {
        ref: K
    })) : m.createElement(D, Cn({}, Y, {
        className: g,
        ref: K
    }), h))
});
qs.defaultProps = {
    enabled: !0,
    removeScrollBar: !0,
    inert: !1
};
qs.classNames = {
    fullWidth: Rs,
    zeroRight: Ts
};
var gC = function() {
    if (typeof __webpack_nonce__ < "u")
        return __webpack_nonce__
};
function vC() {
    if (!document)
        return null;
    var n = document.createElement("style");
    n.type = "text/css";
    var r = gC();
    return r && n.setAttribute("nonce", r),
    n
}
function yC(n, r) {
    n.styleSheet ? n.styleSheet.cssText = r : n.appendChild(document.createTextNode(r))
}
function bC(n) {
    var r = document.head || document.getElementsByTagName("head")[0];
    r.appendChild(n)
}
var xC = function() {
    var n = 0
      , r = null;
    return {
        add: function(l) {
            n == 0 && (r = vC()) && (yC(r, l),
            bC(r)),
            n++
        },
        remove: function() {
            n--,
            !n && r && (r.parentNode && r.parentNode.removeChild(r),
            r = null)
        }
    }
}
  , wC = function() {
    var n = xC();
    return function(r, l) {
        m.useEffect(function() {
            return n.add(r),
            function() {
                n.remove()
            }
        }, [r && l])
    }
}
  , Ty = function() {
    var n = wC()
      , r = function(l) {
        var i = l.styles
          , c = l.dynamic;
        return n(i, c),
        null
    };
    return r
}
  , SC = {
    left: 0,
    top: 0,
    right: 0,
    gap: 0
}
  , Af = function(n) {
    return parseInt(n || "", 10) || 0
}
  , EC = function(n) {
    var r = window.getComputedStyle(document.body)
      , l = r[n === "padding" ? "paddingLeft" : "marginLeft"]
      , i = r[n === "padding" ? "paddingTop" : "marginTop"]
      , c = r[n === "padding" ? "paddingRight" : "marginRight"];
    return [Af(l), Af(i), Af(c)]
}
  , CC = function(n) {
    if (n === void 0 && (n = "margin"),
    typeof window > "u")
        return SC;
    var r = EC(n)
      , l = document.documentElement.clientWidth
      , i = window.innerWidth;
    return {
        left: r[0],
        top: r[1],
        right: r[2],
        gap: Math.max(0, i - l + r[2] - r[0])
    }
}
  , TC = Ty()
  , co = "data-scroll-locked"
  , RC = function(n, r, l, i) {
    var c = n.left
      , u = n.top
      , d = n.right
      , h = n.gap;
    return l === void 0 && (l = "margin"),
    `
  .`.concat(iC, ` {
   overflow: hidden `).concat(i, `;
   padding-right: `).concat(h, "px ").concat(i, `;
  }
  body[`).concat(co, `] {
    overflow: hidden `).concat(i, `;
    overscroll-behavior: contain;
    `).concat([r && "position: relative ".concat(i, ";"), l === "margin" && `
    padding-left: `.concat(c, `px;
    padding-top: `).concat(u, `px;
    padding-right: `).concat(d, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(h, "px ").concat(i, `;
    `), l === "padding" && "padding-right: ".concat(h, "px ").concat(i, ";")].filter(Boolean).join(""), `
  }
  
  .`).concat(Ts, ` {
    right: `).concat(h, "px ").concat(i, `;
  }
  
  .`).concat(Rs, ` {
    margin-right: `).concat(h, "px ").concat(i, `;
  }
  
  .`).concat(Ts, " .").concat(Ts, ` {
    right: 0 `).concat(i, `;
  }
  
  .`).concat(Rs, " .").concat(Rs, ` {
    margin-right: 0 `).concat(i, `;
  }
  
  body[`).concat(co, `] {
    `).concat(sC, ": ").concat(h, `px;
  }
`)
}
  , ov = function() {
    var n = parseInt(document.body.getAttribute(co) || "0", 10);
    return isFinite(n) ? n : 0
}
  , AC = function() {
    m.useEffect(function() {
        return document.body.setAttribute(co, (ov() + 1).toString()),
        function() {
            var n = ov() - 1;
            n <= 0 ? document.body.removeAttribute(co) : document.body.setAttribute(co, n.toString())
        }
    }, [])
}
  , MC = function(n) {
    var r = n.noRelative
      , l = n.noImportant
      , i = n.gapMode
      , c = i === void 0 ? "margin" : i;
    AC();
    var u = m.useMemo(function() {
        return CC(c)
    }, [c]);
    return m.createElement(TC, {
        styles: RC(u, !r, c, l ? "" : "!important")
    })
}
  , Vf = !1;
if (typeof window < "u")
    try {
        var ds = Object.defineProperty({}, "passive", {
            get: function() {
                return Vf = !0,
                !0
            }
        });
        window.addEventListener("test", ds, ds),
        window.removeEventListener("test", ds, ds)
    } catch {
        Vf = !1
    }
var ro = Vf ? {
    passive: !1
} : !1
  , NC = function(n) {
    return n.tagName === "TEXTAREA"
}
  , Ry = function(n, r) {
    if (!(n instanceof Element))
        return !1;
    var l = window.getComputedStyle(n);
    return l[r] !== "hidden" && !(l.overflowY === l.overflowX && !NC(n) && l[r] === "visible")
}
  , _C = function(n) {
    return Ry(n, "overflowY")
}
  , OC = function(n) {
    return Ry(n, "overflowX")
}
  , lv = function(n, r) {
    var l = r.ownerDocument
      , i = r;
    do {
        typeof ShadowRoot < "u" && i instanceof ShadowRoot && (i = i.host);
        var c = Ay(n, i);
        if (c) {
            var u = My(n, i)
              , d = u[1]
              , h = u[2];
            if (d > h)
                return !0
        }
        i = i.parentNode
    } while (i && i !== l.body);
    return !1
}
  , DC = function(n) {
    var r = n.scrollTop
      , l = n.scrollHeight
      , i = n.clientHeight;
    return [r, l, i]
}
  , jC = function(n) {
    var r = n.scrollLeft
      , l = n.scrollWidth
      , i = n.clientWidth;
    return [r, l, i]
}
  , Ay = function(n, r) {
    return n === "v" ? _C(r) : OC(r)
}
  , My = function(n, r) {
    return n === "v" ? DC(r) : jC(r)
}
  , kC = function(n, r) {
    return n === "h" && r === "rtl" ? -1 : 1
}
  , zC = function(n, r, l, i, c) {
    var u = kC(n, window.getComputedStyle(r).direction)
      , d = u * i
      , h = l.target
      , g = r.contains(h)
      , p = !1
      , b = d > 0
      , v = 0
      , w = 0;
    do {
        if (!h)
            break;
        var C = My(n, h)
          , R = C[0]
          , E = C[1]
          , A = C[2]
          , T = E - A - u * R;
        (R || T) && Ay(n, h) && (v += T,
        w += R);
        var D = h.parentNode;
        h = D && D.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? D.host : D
    } while (!g && h !== document.body || g && (r.contains(h) || r === h));
    return (b && Math.abs(v) < 1 || !b && Math.abs(w) < 1) && (p = !0),
    p
}
  , ms = function(n) {
    return "changedTouches"in n ? [n.changedTouches[0].clientX, n.changedTouches[0].clientY] : [0, 0]
}
  , iv = function(n) {
    return [n.deltaX, n.deltaY]
}
  , sv = function(n) {
    return n && "current"in n ? n.current : n
}
  , LC = function(n, r) {
    return n[0] === r[0] && n[1] === r[1]
}
  , BC = function(n) {
    return `
  .block-interactivity-`.concat(n, ` {pointer-events: none;}
  .allow-interactivity-`).concat(n, ` {pointer-events: all;}
`)
}
  , UC = 0
  , oo = [];
function HC(n) {
    var r = m.useRef([])
      , l = m.useRef([0, 0])
      , i = m.useRef()
      , c = m.useState(UC++)[0]
      , u = m.useState(Ty)[0]
      , d = m.useRef(n);
    m.useEffect(function() {
        d.current = n
    }, [n]),
    m.useEffect(function() {
        if (n.inert) {
            document.body.classList.add("block-interactivity-".concat(c));
            var E = lC([n.lockRef.current], (n.shards || []).map(sv), !0).filter(Boolean);
            return E.forEach(function(A) {
                return A.classList.add("allow-interactivity-".concat(c))
            }),
            function() {
                document.body.classList.remove("block-interactivity-".concat(c)),
                E.forEach(function(A) {
                    return A.classList.remove("allow-interactivity-".concat(c))
                })
            }
        }
    }, [n.inert, n.lockRef.current, n.shards]);
    var h = m.useCallback(function(E, A) {
        if ("touches"in E && E.touches.length === 2 || E.type === "wheel" && E.ctrlKey)
            return !d.current.allowPinchZoom;
        var T = ms(E), D = l.current, N = "deltaX"in E ? E.deltaX : D[0] - T[0], j = "deltaY"in E ? E.deltaY : D[1] - T[1], U, K = E.target, Y = Math.abs(N) > Math.abs(j) ? "h" : "v";
        if ("touches"in E && Y === "h" && K.type === "range")
            return !1;
        var V = lv(Y, K);
        if (!V)
            return !0;
        if (V ? U = Y : (U = Y === "v" ? "h" : "v",
        V = lv(Y, K)),
        !V)
            return !1;
        if (!i.current && "changedTouches"in E && (N || j) && (i.current = U),
        !U)
            return !0;
        var $ = i.current || U;
        return zC($, A, E, $ === "h" ? N : j)
    }, [])
      , g = m.useCallback(function(E) {
        var A = E;
        if (!(!oo.length || oo[oo.length - 1] !== u)) {
            var T = "deltaY"in A ? iv(A) : ms(A)
              , D = r.current.filter(function(U) {
                return U.name === A.type && (U.target === A.target || A.target === U.shadowParent) && LC(U.delta, T)
            })[0];
            if (D && D.should) {
                A.cancelable && A.preventDefault();
                return
            }
            if (!D) {
                var N = (d.current.shards || []).map(sv).filter(Boolean).filter(function(U) {
                    return U.contains(A.target)
                })
                  , j = N.length > 0 ? h(A, N[0]) : !d.current.noIsolation;
                j && A.cancelable && A.preventDefault()
            }
        }
    }, [])
      , p = m.useCallback(function(E, A, T, D) {
        var N = {
            name: E,
            delta: A,
            target: T,
            should: D,
            shadowParent: PC(T)
        };
        r.current.push(N),
        setTimeout(function() {
            r.current = r.current.filter(function(j) {
                return j !== N
            })
        }, 1)
    }, [])
      , b = m.useCallback(function(E) {
        l.current = ms(E),
        i.current = void 0
    }, [])
      , v = m.useCallback(function(E) {
        p(E.type, iv(E), E.target, h(E, n.lockRef.current))
    }, [])
      , w = m.useCallback(function(E) {
        p(E.type, ms(E), E.target, h(E, n.lockRef.current))
    }, []);
    m.useEffect(function() {
        return oo.push(u),
        n.setCallbacks({
            onScrollCapture: v,
            onWheelCapture: v,
            onTouchMoveCapture: w
        }),
        document.addEventListener("wheel", g, ro),
        document.addEventListener("touchmove", g, ro),
        document.addEventListener("touchstart", b, ro),
        function() {
            oo = oo.filter(function(E) {
                return E !== u
            }),
            document.removeEventListener("wheel", g, ro),
            document.removeEventListener("touchmove", g, ro),
            document.removeEventListener("touchstart", b, ro)
        }
    }, []);
    var C = n.removeScrollBar
      , R = n.inert;
    return m.createElement(m.Fragment, null, R ? m.createElement(u, {
        styles: BC(c)
    }) : null, C ? m.createElement(MC, {
        noRelative: n.noRelative,
        gapMode: n.gapMode
    }) : null)
}
function PC(n) {
    for (var r = null; n !== null; )
        n instanceof ShadowRoot && (r = n.host,
        n = n.host),
        n = n.parentNode;
    return r
}
const VC = pC(Cy, HC);
var yd = m.forwardRef(function(n, r) {
    return m.createElement(qs, Cn({}, n, {
        ref: r,
        sideCar: VC
    }))
});
yd.classNames = qs.classNames;
var GC = function(n) {
    if (typeof document > "u")
        return null;
    var r = Array.isArray(n) ? n[0] : n;
    return r.ownerDocument.body
}
  , lo = new WeakMap
  , hs = new WeakMap
  , ps = {}
  , Mf = 0
  , Ny = function(n) {
    return n && (n.host || Ny(n.parentNode))
}
  , YC = function(n, r) {
    return r.map(function(l) {
        if (n.contains(l))
            return l;
        var i = Ny(l);
        return i && n.contains(i) ? i : (console.error("aria-hidden", l, "in not contained inside", n, ". Doing nothing"),
        null)
    }).filter(function(l) {
        return !!l
    })
}
  , qC = function(n, r, l, i) {
    var c = YC(r, Array.isArray(n) ? n : [n]);
    ps[l] || (ps[l] = new WeakMap);
    var u = ps[l]
      , d = []
      , h = new Set
      , g = new Set(c)
      , p = function(v) {
        !v || h.has(v) || (h.add(v),
        p(v.parentNode))
    };
    c.forEach(p);
    var b = function(v) {
        !v || g.has(v) || Array.prototype.forEach.call(v.children, function(w) {
            if (h.has(w))
                b(w);
            else
                try {
                    var C = w.getAttribute(i)
                      , R = C !== null && C !== "false"
                      , E = (lo.get(w) || 0) + 1
                      , A = (u.get(w) || 0) + 1;
                    lo.set(w, E),
                    u.set(w, A),
                    d.push(w),
                    E === 1 && R && hs.set(w, !0),
                    A === 1 && w.setAttribute(l, "true"),
                    R || w.setAttribute(i, "true")
                } catch (T) {
                    console.error("aria-hidden: cannot operate on ", w, T)
                }
        })
    };
    return b(r),
    h.clear(),
    Mf++,
    function() {
        d.forEach(function(v) {
            var w = lo.get(v) - 1
              , C = u.get(v) - 1;
            lo.set(v, w),
            u.set(v, C),
            w || (hs.has(v) || v.removeAttribute(i),
            hs.delete(v)),
            C || v.removeAttribute(l)
        }),
        Mf--,
        Mf || (lo = new WeakMap,
        lo = new WeakMap,
        hs = new WeakMap,
        ps = {})
    }
}
  , _y = function(n, r, l) {
    l === void 0 && (l = "data-aria-hidden");
    var i = Array.from(Array.isArray(n) ? n : [n])
      , c = GC(n);
    return c ? (i.push.apply(i, Array.from(c.querySelectorAll("[aria-live], script"))),
    qC(i, c, l, "aria-hidden")) : function() {
        return null
    }
};
function Oy(n) {
    const r = m.useRef({
        value: n,
        previous: n
    });
    return m.useMemo( () => (r.current.value !== n && (r.current.previous = r.current.value,
    r.current.value = n),
    r.current.previous), [n])
}
function Dy(n) {
    const [r,l] = m.useState(void 0);
    return st( () => {
        if (n) {
            l({
                width: n.offsetWidth,
                height: n.offsetHeight
            });
            const i = new ResizeObserver(c => {
                if (!Array.isArray(c) || !c.length)
                    return;
                const u = c[0];
                let d, h;
                if ("borderBoxSize"in u) {
                    const g = u.borderBoxSize
                      , p = Array.isArray(g) ? g[0] : g;
                    d = p.inlineSize,
                    h = p.blockSize
                } else
                    d = n.offsetWidth,
                    h = n.offsetHeight;
                l({
                    width: d,
                    height: h
                })
            }
            );
            return i.observe(n, {
                box: "border-box"
            }),
            () => i.unobserve(n)
        } else
            l(void 0)
    }
    , [n]),
    r
}
const IC = ["top", "right", "bottom", "left"]
  , ja = Math.min
  , It = Math.max
  , Ns = Math.round
  , gs = Math.floor
  , Rn = n => ({
    x: n,
    y: n
})
  , XC = {
    left: "right",
    right: "left",
    bottom: "top",
    top: "bottom"
}
  , $C = {
    start: "end",
    end: "start"
};
function Gf(n, r, l) {
    return It(n, ja(r, l))
}
function ea(n, r) {
    return typeof n == "function" ? n(r) : n
}
function ta(n) {
    return n.split("-")[0]
}
function wo(n) {
    return n.split("-")[1]
}
function bd(n) {
    return n === "x" ? "y" : "x"
}
function xd(n) {
    return n === "y" ? "height" : "width"
}
const KC = new Set(["top", "bottom"]);
function Tn(n) {
    return KC.has(ta(n)) ? "y" : "x"
}
function wd(n) {
    return bd(Tn(n))
}
function QC(n, r, l) {
    l === void 0 && (l = !1);
    const i = wo(n)
      , c = wd(n)
      , u = xd(c);
    let d = c === "x" ? i === (l ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
    return r.reference[u] > r.floating[u] && (d = _s(d)),
    [d, _s(d)]
}
function ZC(n) {
    const r = _s(n);
    return [Yf(n), r, Yf(r)]
}
function Yf(n) {
    return n.replace(/start|end/g, r => $C[r])
}
const cv = ["left", "right"]
  , uv = ["right", "left"]
  , FC = ["top", "bottom"]
  , WC = ["bottom", "top"];
function JC(n, r, l) {
    switch (n) {
    case "top":
    case "bottom":
        return l ? r ? uv : cv : r ? cv : uv;
    case "left":
    case "right":
        return r ? FC : WC;
    default:
        return []
    }
}
function eT(n, r, l, i) {
    const c = wo(n);
    let u = JC(ta(n), l === "start", i);
    return c && (u = u.map(d => d + "-" + c),
    r && (u = u.concat(u.map(Yf)))),
    u
}
function _s(n) {
    return n.replace(/left|right|bottom|top/g, r => XC[r])
}
function tT(n) {
    return {
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
        ...n
    }
}
function jy(n) {
    return typeof n != "number" ? tT(n) : {
        top: n,
        right: n,
        bottom: n,
        left: n
    }
}
function Os(n) {
    const {x: r, y: l, width: i, height: c} = n;
    return {
        width: i,
        height: c,
        top: l,
        left: r,
        right: r + i,
        bottom: l + c,
        x: r,
        y: l
    }
}
function fv(n, r, l) {
    let {reference: i, floating: c} = n;
    const u = Tn(r)
      , d = wd(r)
      , h = xd(d)
      , g = ta(r)
      , p = u === "y"
      , b = i.x + i.width / 2 - c.width / 2
      , v = i.y + i.height / 2 - c.height / 2
      , w = i[h] / 2 - c[h] / 2;
    let C;
    switch (g) {
    case "top":
        C = {
            x: b,
            y: i.y - c.height
        };
        break;
    case "bottom":
        C = {
            x: b,
            y: i.y + i.height
        };
        break;
    case "right":
        C = {
            x: i.x + i.width,
            y: v
        };
        break;
    case "left":
        C = {
            x: i.x - c.width,
            y: v
        };
        break;
    default:
        C = {
            x: i.x,
            y: i.y
        }
    }
    switch (wo(r)) {
    case "start":
        C[d] -= w * (l && p ? -1 : 1);
        break;
    case "end":
        C[d] += w * (l && p ? -1 : 1);
        break
    }
    return C
}
const nT = async (n, r, l) => {
    const {placement: i="bottom", strategy: c="absolute", middleware: u=[], platform: d} = l
      , h = u.filter(Boolean)
      , g = await (d.isRTL == null ? void 0 : d.isRTL(r));
    let p = await d.getElementRects({
        reference: n,
        floating: r,
        strategy: c
    })
      , {x: b, y: v} = fv(p, i, g)
      , w = i
      , C = {}
      , R = 0;
    for (let E = 0; E < h.length; E++) {
        const {name: A, fn: T} = h[E]
          , {x: D, y: N, data: j, reset: U} = await T({
            x: b,
            y: v,
            initialPlacement: i,
            placement: w,
            strategy: c,
            middlewareData: C,
            rects: p,
            platform: d,
            elements: {
                reference: n,
                floating: r
            }
        });
        b = D ?? b,
        v = N ?? v,
        C = {
            ...C,
            [A]: {
                ...C[A],
                ...j
            }
        },
        U && R <= 50 && (R++,
        typeof U == "object" && (U.placement && (w = U.placement),
        U.rects && (p = U.rects === !0 ? await d.getElementRects({
            reference: n,
            floating: r,
            strategy: c
        }) : U.rects),
        {x: b, y: v} = fv(p, w, g)),
        E = -1)
    }
    return {
        x: b,
        y: v,
        placement: w,
        strategy: c,
        middlewareData: C
    }
}
;
async function jl(n, r) {
    var l;
    r === void 0 && (r = {});
    const {x: i, y: c, platform: u, rects: d, elements: h, strategy: g} = n
      , {boundary: p="clippingAncestors", rootBoundary: b="viewport", elementContext: v="floating", altBoundary: w=!1, padding: C=0} = ea(r, n)
      , R = jy(C)
      , A = h[w ? v === "floating" ? "reference" : "floating" : v]
      , T = Os(await u.getClippingRect({
        element: (l = await (u.isElement == null ? void 0 : u.isElement(A))) == null || l ? A : A.contextElement || await (u.getDocumentElement == null ? void 0 : u.getDocumentElement(h.floating)),
        boundary: p,
        rootBoundary: b,
        strategy: g
    }))
      , D = v === "floating" ? {
        x: i,
        y: c,
        width: d.floating.width,
        height: d.floating.height
    } : d.reference
      , N = await (u.getOffsetParent == null ? void 0 : u.getOffsetParent(h.floating))
      , j = await (u.isElement == null ? void 0 : u.isElement(N)) ? await (u.getScale == null ? void 0 : u.getScale(N)) || {
        x: 1,
        y: 1
    } : {
        x: 1,
        y: 1
    }
      , U = Os(u.convertOffsetParentRelativeRectToViewportRelativeRect ? await u.convertOffsetParentRelativeRectToViewportRelativeRect({
        elements: h,
        rect: D,
        offsetParent: N,
        strategy: g
    }) : D);
    return {
        top: (T.top - U.top + R.top) / j.y,
        bottom: (U.bottom - T.bottom + R.bottom) / j.y,
        left: (T.left - U.left + R.left) / j.x,
        right: (U.right - T.right + R.right) / j.x
    }
}
const aT = n => ({
    name: "arrow",
    options: n,
    async fn(r) {
        const {x: l, y: i, placement: c, rects: u, platform: d, elements: h, middlewareData: g} = r
          , {element: p, padding: b=0} = ea(n, r) || {};
        if (p == null)
            return {};
        const v = jy(b)
          , w = {
            x: l,
            y: i
        }
          , C = wd(c)
          , R = xd(C)
          , E = await d.getDimensions(p)
          , A = C === "y"
          , T = A ? "top" : "left"
          , D = A ? "bottom" : "right"
          , N = A ? "clientHeight" : "clientWidth"
          , j = u.reference[R] + u.reference[C] - w[C] - u.floating[R]
          , U = w[C] - u.reference[C]
          , K = await (d.getOffsetParent == null ? void 0 : d.getOffsetParent(p));
        let Y = K ? K[N] : 0;
        (!Y || !await (d.isElement == null ? void 0 : d.isElement(K))) && (Y = h.floating[N] || u.floating[R]);
        const V = j / 2 - U / 2
          , $ = Y / 2 - E[R] / 2 - 1
          , ee = ja(v[T], $)
          , se = ja(v[D], $)
          , W = ee
          , te = Y - E[R] - se
          , le = Y / 2 - E[R] / 2 + V
          , de = Gf(W, le, te)
          , _ = !g.arrow && wo(c) != null && le !== de && u.reference[R] / 2 - (le < W ? ee : se) - E[R] / 2 < 0
          , G = _ ? le < W ? le - W : le - te : 0;
        return {
            [C]: w[C] + G,
            data: {
                [C]: de,
                centerOffset: le - de - G,
                ..._ && {
                    alignmentOffset: G
                }
            },
            reset: _
        }
    }
})
  , rT = function(n) {
    return n === void 0 && (n = {}),
    {
        name: "flip",
        options: n,
        async fn(r) {
            var l, i;
            const {placement: c, middlewareData: u, rects: d, initialPlacement: h, platform: g, elements: p} = r
              , {mainAxis: b=!0, crossAxis: v=!0, fallbackPlacements: w, fallbackStrategy: C="bestFit", fallbackAxisSideDirection: R="none", flipAlignment: E=!0, ...A} = ea(n, r);
            if ((l = u.arrow) != null && l.alignmentOffset)
                return {};
            const T = ta(c)
              , D = Tn(h)
              , N = ta(h) === h
              , j = await (g.isRTL == null ? void 0 : g.isRTL(p.floating))
              , U = w || (N || !E ? [_s(h)] : ZC(h))
              , K = R !== "none";
            !w && K && U.push(...eT(h, E, R, j));
            const Y = [h, ...U]
              , V = await jl(r, A)
              , $ = [];
            let ee = ((i = u.flip) == null ? void 0 : i.overflows) || [];
            if (b && $.push(V[T]),
            v) {
                const le = QC(c, d, j);
                $.push(V[le[0]], V[le[1]])
            }
            if (ee = [...ee, {
                placement: c,
                overflows: $
            }],
            !$.every(le => le <= 0)) {
                var se, W;
                const le = (((se = u.flip) == null ? void 0 : se.index) || 0) + 1
                  , de = Y[le];
                if (de && (!(v === "alignment" ? D !== Tn(de) : !1) || ee.every(B => Tn(B.placement) === D ? B.overflows[0] > 0 : !0)))
                    return {
                        data: {
                            index: le,
                            overflows: ee
                        },
                        reset: {
                            placement: de
                        }
                    };
                let _ = (W = ee.filter(G => G.overflows[0] <= 0).sort( (G, B) => G.overflows[1] - B.overflows[1])[0]) == null ? void 0 : W.placement;
                if (!_)
                    switch (C) {
                    case "bestFit":
                        {
                            var te;
                            const G = (te = ee.filter(B => {
                                if (K) {
                                    const Q = Tn(B.placement);
                                    return Q === D || Q === "y"
                                }
                                return !0
                            }
                            ).map(B => [B.placement, B.overflows.filter(Q => Q > 0).reduce( (Q, ie) => Q + ie, 0)]).sort( (B, Q) => B[1] - Q[1])[0]) == null ? void 0 : te[0];
                            G && (_ = G);
                            break
                        }
                    case "initialPlacement":
                        _ = h;
                        break
                    }
                if (c !== _)
                    return {
                        reset: {
                            placement: _
                        }
                    }
            }
            return {}
        }
    }
};
function dv(n, r) {
    return {
        top: n.top - r.height,
        right: n.right - r.width,
        bottom: n.bottom - r.height,
        left: n.left - r.width
    }
}
function mv(n) {
    return IC.some(r => n[r] >= 0)
}
const oT = function(n) {
    return n === void 0 && (n = {}),
    {
        name: "hide",
        options: n,
        async fn(r) {
            const {rects: l} = r
              , {strategy: i="referenceHidden", ...c} = ea(n, r);
            switch (i) {
            case "referenceHidden":
                {
                    const u = await jl(r, {
                        ...c,
                        elementContext: "reference"
                    })
                      , d = dv(u, l.reference);
                    return {
                        data: {
                            referenceHiddenOffsets: d,
                            referenceHidden: mv(d)
                        }
                    }
                }
            case "escaped":
                {
                    const u = await jl(r, {
                        ...c,
                        altBoundary: !0
                    })
                      , d = dv(u, l.floating);
                    return {
                        data: {
                            escapedOffsets: d,
                            escaped: mv(d)
                        }
                    }
                }
            default:
                return {}
            }
        }
    }
}
  , ky = new Set(["left", "top"]);
async function lT(n, r) {
    const {placement: l, platform: i, elements: c} = n
      , u = await (i.isRTL == null ? void 0 : i.isRTL(c.floating))
      , d = ta(l)
      , h = wo(l)
      , g = Tn(l) === "y"
      , p = ky.has(d) ? -1 : 1
      , b = u && g ? -1 : 1
      , v = ea(r, n);
    let {mainAxis: w, crossAxis: C, alignmentAxis: R} = typeof v == "number" ? {
        mainAxis: v,
        crossAxis: 0,
        alignmentAxis: null
    } : {
        mainAxis: v.mainAxis || 0,
        crossAxis: v.crossAxis || 0,
        alignmentAxis: v.alignmentAxis
    };
    return h && typeof R == "number" && (C = h === "end" ? R * -1 : R),
    g ? {
        x: C * b,
        y: w * p
    } : {
        x: w * p,
        y: C * b
    }
}
const iT = function(n) {
    return n === void 0 && (n = 0),
    {
        name: "offset",
        options: n,
        async fn(r) {
            var l, i;
            const {x: c, y: u, placement: d, middlewareData: h} = r
              , g = await lT(r, n);
            return d === ((l = h.offset) == null ? void 0 : l.placement) && (i = h.arrow) != null && i.alignmentOffset ? {} : {
                x: c + g.x,
                y: u + g.y,
                data: {
                    ...g,
                    placement: d
                }
            }
        }
    }
}
  , sT = function(n) {
    return n === void 0 && (n = {}),
    {
        name: "shift",
        options: n,
        async fn(r) {
            const {x: l, y: i, placement: c} = r
              , {mainAxis: u=!0, crossAxis: d=!1, limiter: h={
                fn: A => {
                    let {x: T, y: D} = A;
                    return {
                        x: T,
                        y: D
                    }
                }
            }, ...g} = ea(n, r)
              , p = {
                x: l,
                y: i
            }
              , b = await jl(r, g)
              , v = Tn(ta(c))
              , w = bd(v);
            let C = p[w]
              , R = p[v];
            if (u) {
                const A = w === "y" ? "top" : "left"
                  , T = w === "y" ? "bottom" : "right"
                  , D = C + b[A]
                  , N = C - b[T];
                C = Gf(D, C, N)
            }
            if (d) {
                const A = v === "y" ? "top" : "left"
                  , T = v === "y" ? "bottom" : "right"
                  , D = R + b[A]
                  , N = R - b[T];
                R = Gf(D, R, N)
            }
            const E = h.fn({
                ...r,
                [w]: C,
                [v]: R
            });
            return {
                ...E,
                data: {
                    x: E.x - l,
                    y: E.y - i,
                    enabled: {
                        [w]: u,
                        [v]: d
                    }
                }
            }
        }
    }
}
  , cT = function(n) {
    return n === void 0 && (n = {}),
    {
        options: n,
        fn(r) {
            const {x: l, y: i, placement: c, rects: u, middlewareData: d} = r
              , {offset: h=0, mainAxis: g=!0, crossAxis: p=!0} = ea(n, r)
              , b = {
                x: l,
                y: i
            }
              , v = Tn(c)
              , w = bd(v);
            let C = b[w]
              , R = b[v];
            const E = ea(h, r)
              , A = typeof E == "number" ? {
                mainAxis: E,
                crossAxis: 0
            } : {
                mainAxis: 0,
                crossAxis: 0,
                ...E
            };
            if (g) {
                const N = w === "y" ? "height" : "width"
                  , j = u.reference[w] - u.floating[N] + A.mainAxis
                  , U = u.reference[w] + u.reference[N] - A.mainAxis;
                C < j ? C = j : C > U && (C = U)
            }
            if (p) {
                var T, D;
                const N = w === "y" ? "width" : "height"
                  , j = ky.has(ta(c))
                  , U = u.reference[v] - u.floating[N] + (j && ((T = d.offset) == null ? void 0 : T[v]) || 0) + (j ? 0 : A.crossAxis)
                  , K = u.reference[v] + u.reference[N] + (j ? 0 : ((D = d.offset) == null ? void 0 : D[v]) || 0) - (j ? A.crossAxis : 0);
                R < U ? R = U : R > K && (R = K)
            }
            return {
                [w]: C,
                [v]: R
            }
        }
    }
}
  , uT = function(n) {
    return n === void 0 && (n = {}),
    {
        name: "size",
        options: n,
        async fn(r) {
            var l, i;
            const {placement: c, rects: u, platform: d, elements: h} = r
              , {apply: g= () => {}
            , ...p} = ea(n, r)
              , b = await jl(r, p)
              , v = ta(c)
              , w = wo(c)
              , C = Tn(c) === "y"
              , {width: R, height: E} = u.floating;
            let A, T;
            v === "top" || v === "bottom" ? (A = v,
            T = w === (await (d.isRTL == null ? void 0 : d.isRTL(h.floating)) ? "start" : "end") ? "left" : "right") : (T = v,
            A = w === "end" ? "top" : "bottom");
            const D = E - b.top - b.bottom
              , N = R - b.left - b.right
              , j = ja(E - b[A], D)
              , U = ja(R - b[T], N)
              , K = !r.middlewareData.shift;
            let Y = j
              , V = U;
            if ((l = r.middlewareData.shift) != null && l.enabled.x && (V = N),
            (i = r.middlewareData.shift) != null && i.enabled.y && (Y = D),
            K && !w) {
                const ee = It(b.left, 0)
                  , se = It(b.right, 0)
                  , W = It(b.top, 0)
                  , te = It(b.bottom, 0);
                C ? V = R - 2 * (ee !== 0 || se !== 0 ? ee + se : It(b.left, b.right)) : Y = E - 2 * (W !== 0 || te !== 0 ? W + te : It(b.top, b.bottom))
            }
            await g({
                ...r,
                availableWidth: V,
                availableHeight: Y
            });
            const $ = await d.getDimensions(h.floating);
            return R !== $.width || E !== $.height ? {
                reset: {
                    rects: !0
                }
            } : {}
        }
    }
};
function Is() {
    return typeof window < "u"
}
function So(n) {
    return zy(n) ? (n.nodeName || "").toLowerCase() : "#document"
}
function Xt(n) {
    var r;
    return (n == null || (r = n.ownerDocument) == null ? void 0 : r.defaultView) || window
}
function On(n) {
    var r;
    return (r = (zy(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : r.documentElement
}
function zy(n) {
    return Is() ? n instanceof Node || n instanceof Xt(n).Node : !1
}
function hn(n) {
    return Is() ? n instanceof Element || n instanceof Xt(n).Element : !1
}
function Mn(n) {
    return Is() ? n instanceof HTMLElement || n instanceof Xt(n).HTMLElement : !1
}
function hv(n) {
    return !Is() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof Xt(n).ShadowRoot
}
const fT = new Set(["inline", "contents"]);
function Gl(n) {
    const {overflow: r, overflowX: l, overflowY: i, display: c} = pn(n);
    return /auto|scroll|overlay|hidden|clip/.test(r + i + l) && !fT.has(c)
}
const dT = new Set(["table", "td", "th"]);
function mT(n) {
    return dT.has(So(n))
}
const hT = [":popover-open", ":modal"];
function Xs(n) {
    return hT.some(r => {
        try {
            return n.matches(r)
        } catch {
            return !1
        }
    }
    )
}
const pT = ["transform", "translate", "scale", "rotate", "perspective"]
  , gT = ["transform", "translate", "scale", "rotate", "perspective", "filter"]
  , vT = ["paint", "layout", "strict", "content"];
function Sd(n) {
    const r = Ed()
      , l = hn(n) ? pn(n) : n;
    return pT.some(i => l[i] ? l[i] !== "none" : !1) || (l.containerType ? l.containerType !== "normal" : !1) || !r && (l.backdropFilter ? l.backdropFilter !== "none" : !1) || !r && (l.filter ? l.filter !== "none" : !1) || gT.some(i => (l.willChange || "").includes(i)) || vT.some(i => (l.contain || "").includes(i))
}
function yT(n) {
    let r = ka(n);
    for (; Mn(r) && !ho(r); ) {
        if (Sd(r))
            return r;
        if (Xs(r))
            return null;
        r = ka(r)
    }
    return null
}
function Ed() {
    return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none")
}
const bT = new Set(["html", "body", "#document"]);
function ho(n) {
    return bT.has(So(n))
}
function pn(n) {
    return Xt(n).getComputedStyle(n)
}
function $s(n) {
    return hn(n) ? {
        scrollLeft: n.scrollLeft,
        scrollTop: n.scrollTop
    } : {
        scrollLeft: n.scrollX,
        scrollTop: n.scrollY
    }
}
function ka(n) {
    if (So(n) === "html")
        return n;
    const r = n.assignedSlot || n.parentNode || hv(n) && n.host || On(n);
    return hv(r) ? r.host : r
}
function Ly(n) {
    const r = ka(n);
    return ho(r) ? n.ownerDocument ? n.ownerDocument.body : n.body : Mn(r) && Gl(r) ? r : Ly(r)
}
function kl(n, r, l) {
    var i;
    r === void 0 && (r = []),
    l === void 0 && (l = !0);
    const c = Ly(n)
      , u = c === ((i = n.ownerDocument) == null ? void 0 : i.body)
      , d = Xt(c);
    if (u) {
        const h = qf(d);
        return r.concat(d, d.visualViewport || [], Gl(c) ? c : [], h && l ? kl(h) : [])
    }
    return r.concat(c, kl(c, [], l))
}
function qf(n) {
    return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null
}
function By(n) {
    const r = pn(n);
    let l = parseFloat(r.width) || 0
      , i = parseFloat(r.height) || 0;
    const c = Mn(n)
      , u = c ? n.offsetWidth : l
      , d = c ? n.offsetHeight : i
      , h = Ns(l) !== u || Ns(i) !== d;
    return h && (l = u,
    i = d),
    {
        width: l,
        height: i,
        $: h
    }
}
function Cd(n) {
    return hn(n) ? n : n.contextElement
}
function uo(n) {
    const r = Cd(n);
    if (!Mn(r))
        return Rn(1);
    const l = r.getBoundingClientRect()
      , {width: i, height: c, $: u} = By(r);
    let d = (u ? Ns(l.width) : l.width) / i
      , h = (u ? Ns(l.height) : l.height) / c;
    return (!d || !Number.isFinite(d)) && (d = 1),
    (!h || !Number.isFinite(h)) && (h = 1),
    {
        x: d,
        y: h
    }
}
const xT = Rn(0);
function Uy(n) {
    const r = Xt(n);
    return !Ed() || !r.visualViewport ? xT : {
        x: r.visualViewport.offsetLeft,
        y: r.visualViewport.offsetTop
    }
}
function wT(n, r, l) {
    return r === void 0 && (r = !1),
    !l || r && l !== Xt(n) ? !1 : r
}
function cr(n, r, l, i) {
    r === void 0 && (r = !1),
    l === void 0 && (l = !1);
    const c = n.getBoundingClientRect()
      , u = Cd(n);
    let d = Rn(1);
    r && (i ? hn(i) && (d = uo(i)) : d = uo(n));
    const h = wT(u, l, i) ? Uy(u) : Rn(0);
    let g = (c.left + h.x) / d.x
      , p = (c.top + h.y) / d.y
      , b = c.width / d.x
      , v = c.height / d.y;
    if (u) {
        const w = Xt(u)
          , C = i && hn(i) ? Xt(i) : i;
        let R = w
          , E = qf(R);
        for (; E && i && C !== R; ) {
            const A = uo(E)
              , T = E.getBoundingClientRect()
              , D = pn(E)
              , N = T.left + (E.clientLeft + parseFloat(D.paddingLeft)) * A.x
              , j = T.top + (E.clientTop + parseFloat(D.paddingTop)) * A.y;
            g *= A.x,
            p *= A.y,
            b *= A.x,
            v *= A.y,
            g += N,
            p += j,
            R = Xt(E),
            E = qf(R)
        }
    }
    return Os({
        width: b,
        height: v,
        x: g,
        y: p
    })
}
function Td(n, r) {
    const l = $s(n).scrollLeft;
    return r ? r.left + l : cr(On(n)).left + l
}
function Hy(n, r, l) {
    l === void 0 && (l = !1);
    const i = n.getBoundingClientRect()
      , c = i.left + r.scrollLeft - (l ? 0 : Td(n, i))
      , u = i.top + r.scrollTop;
    return {
        x: c,
        y: u
    }
}
function ST(n) {
    let {elements: r, rect: l, offsetParent: i, strategy: c} = n;
    const u = c === "fixed"
      , d = On(i)
      , h = r ? Xs(r.floating) : !1;
    if (i === d || h && u)
        return l;
    let g = {
        scrollLeft: 0,
        scrollTop: 0
    }
      , p = Rn(1);
    const b = Rn(0)
      , v = Mn(i);
    if ((v || !v && !u) && ((So(i) !== "body" || Gl(d)) && (g = $s(i)),
    Mn(i))) {
        const C = cr(i);
        p = uo(i),
        b.x = C.x + i.clientLeft,
        b.y = C.y + i.clientTop
    }
    const w = d && !v && !u ? Hy(d, g, !0) : Rn(0);
    return {
        width: l.width * p.x,
        height: l.height * p.y,
        x: l.x * p.x - g.scrollLeft * p.x + b.x + w.x,
        y: l.y * p.y - g.scrollTop * p.y + b.y + w.y
    }
}
function ET(n) {
    return Array.from(n.getClientRects())
}
function CT(n) {
    const r = On(n)
      , l = $s(n)
      , i = n.ownerDocument.body
      , c = It(r.scrollWidth, r.clientWidth, i.scrollWidth, i.clientWidth)
      , u = It(r.scrollHeight, r.clientHeight, i.scrollHeight, i.clientHeight);
    let d = -l.scrollLeft + Td(n);
    const h = -l.scrollTop;
    return pn(i).direction === "rtl" && (d += It(r.clientWidth, i.clientWidth) - c),
    {
        width: c,
        height: u,
        x: d,
        y: h
    }
}
function TT(n, r) {
    const l = Xt(n)
      , i = On(n)
      , c = l.visualViewport;
    let u = i.clientWidth
      , d = i.clientHeight
      , h = 0
      , g = 0;
    if (c) {
        u = c.width,
        d = c.height;
        const p = Ed();
        (!p || p && r === "fixed") && (h = c.offsetLeft,
        g = c.offsetTop)
    }
    return {
        width: u,
        height: d,
        x: h,
        y: g
    }
}
const RT = new Set(["absolute", "fixed"]);
function AT(n, r) {
    const l = cr(n, !0, r === "fixed")
      , i = l.top + n.clientTop
      , c = l.left + n.clientLeft
      , u = Mn(n) ? uo(n) : Rn(1)
      , d = n.clientWidth * u.x
      , h = n.clientHeight * u.y
      , g = c * u.x
      , p = i * u.y;
    return {
        width: d,
        height: h,
        x: g,
        y: p
    }
}
function pv(n, r, l) {
    let i;
    if (r === "viewport")
        i = TT(n, l);
    else if (r === "document")
        i = CT(On(n));
    else if (hn(r))
        i = AT(r, l);
    else {
        const c = Uy(n);
        i = {
            x: r.x - c.x,
            y: r.y - c.y,
            width: r.width,
            height: r.height
        }
    }
    return Os(i)
}
function Py(n, r) {
    const l = ka(n);
    return l === r || !hn(l) || ho(l) ? !1 : pn(l).position === "fixed" || Py(l, r)
}
function MT(n, r) {
    const l = r.get(n);
    if (l)
        return l;
    let i = kl(n, [], !1).filter(h => hn(h) && So(h) !== "body")
      , c = null;
    const u = pn(n).position === "fixed";
    let d = u ? ka(n) : n;
    for (; hn(d) && !ho(d); ) {
        const h = pn(d)
          , g = Sd(d);
        !g && h.position === "fixed" && (c = null),
        (u ? !g && !c : !g && h.position === "static" && !!c && RT.has(c.position) || Gl(d) && !g && Py(n, d)) ? i = i.filter(b => b !== d) : c = h,
        d = ka(d)
    }
    return r.set(n, i),
    i
}
function NT(n) {
    let {element: r, boundary: l, rootBoundary: i, strategy: c} = n;
    const d = [...l === "clippingAncestors" ? Xs(r) ? [] : MT(r, this._c) : [].concat(l), i]
      , h = d[0]
      , g = d.reduce( (p, b) => {
        const v = pv(r, b, c);
        return p.top = It(v.top, p.top),
        p.right = ja(v.right, p.right),
        p.bottom = ja(v.bottom, p.bottom),
        p.left = It(v.left, p.left),
        p
    }
    , pv(r, h, c));
    return {
        width: g.right - g.left,
        height: g.bottom - g.top,
        x: g.left,
        y: g.top
    }
}
function _T(n) {
    const {width: r, height: l} = By(n);
    return {
        width: r,
        height: l
    }
}
function OT(n, r, l) {
    const i = Mn(r)
      , c = On(r)
      , u = l === "fixed"
      , d = cr(n, !0, u, r);
    let h = {
        scrollLeft: 0,
        scrollTop: 0
    };
    const g = Rn(0);
    function p() {
        g.x = Td(c)
    }
    if (i || !i && !u)
        if ((So(r) !== "body" || Gl(c)) && (h = $s(r)),
        i) {
            const C = cr(r, !0, u, r);
            g.x = C.x + r.clientLeft,
            g.y = C.y + r.clientTop
        } else
            c && p();
    u && !i && c && p();
    const b = c && !i && !u ? Hy(c, h) : Rn(0)
      , v = d.left + h.scrollLeft - g.x - b.x
      , w = d.top + h.scrollTop - g.y - b.y;
    return {
        x: v,
        y: w,
        width: d.width,
        height: d.height
    }
}
function Nf(n) {
    return pn(n).position === "static"
}
function gv(n, r) {
    if (!Mn(n) || pn(n).position === "fixed")
        return null;
    if (r)
        return r(n);
    let l = n.offsetParent;
    return On(n) === l && (l = l.ownerDocument.body),
    l
}
function Vy(n, r) {
    const l = Xt(n);
    if (Xs(n))
        return l;
    if (!Mn(n)) {
        let c = ka(n);
        for (; c && !ho(c); ) {
            if (hn(c) && !Nf(c))
                return c;
            c = ka(c)
        }
        return l
    }
    let i = gv(n, r);
    for (; i && mT(i) && Nf(i); )
        i = gv(i, r);
    return i && ho(i) && Nf(i) && !Sd(i) ? l : i || yT(n) || l
}
const DT = async function(n) {
    const r = this.getOffsetParent || Vy
      , l = this.getDimensions
      , i = await l(n.floating);
    return {
        reference: OT(n.reference, await r(n.floating), n.strategy),
        floating: {
            x: 0,
            y: 0,
            width: i.width,
            height: i.height
        }
    }
};
function jT(n) {
    return pn(n).direction === "rtl"
}
const kT = {
    convertOffsetParentRelativeRectToViewportRelativeRect: ST,
    getDocumentElement: On,
    getClippingRect: NT,
    getOffsetParent: Vy,
    getElementRects: DT,
    getClientRects: ET,
    getDimensions: _T,
    getScale: uo,
    isElement: hn,
    isRTL: jT
};
function Gy(n, r) {
    return n.x === r.x && n.y === r.y && n.width === r.width && n.height === r.height
}
function zT(n, r) {
    let l = null, i;
    const c = On(n);
    function u() {
        var h;
        clearTimeout(i),
        (h = l) == null || h.disconnect(),
        l = null
    }
    function d(h, g) {
        h === void 0 && (h = !1),
        g === void 0 && (g = 1),
        u();
        const p = n.getBoundingClientRect()
          , {left: b, top: v, width: w, height: C} = p;
        if (h || r(),
        !w || !C)
            return;
        const R = gs(v)
          , E = gs(c.clientWidth - (b + w))
          , A = gs(c.clientHeight - (v + C))
          , T = gs(b)
          , N = {
            rootMargin: -R + "px " + -E + "px " + -A + "px " + -T + "px",
            threshold: It(0, ja(1, g)) || 1
        };
        let j = !0;
        function U(K) {
            const Y = K[0].intersectionRatio;
            if (Y !== g) {
                if (!j)
                    return d();
                Y ? d(!1, Y) : i = setTimeout( () => {
                    d(!1, 1e-7)
                }
                , 1e3)
            }
            Y === 1 && !Gy(p, n.getBoundingClientRect()) && d(),
            j = !1
        }
        try {
            l = new IntersectionObserver(U,{
                ...N,
                root: c.ownerDocument
            })
        } catch {
            l = new IntersectionObserver(U,N)
        }
        l.observe(n)
    }
    return d(!0),
    u
}
function LT(n, r, l, i) {
    i === void 0 && (i = {});
    const {ancestorScroll: c=!0, ancestorResize: u=!0, elementResize: d=typeof ResizeObserver == "function", layoutShift: h=typeof IntersectionObserver == "function", animationFrame: g=!1} = i
      , p = Cd(n)
      , b = c || u ? [...p ? kl(p) : [], ...kl(r)] : [];
    b.forEach(T => {
        c && T.addEventListener("scroll", l, {
            passive: !0
        }),
        u && T.addEventListener("resize", l)
    }
    );
    const v = p && h ? zT(p, l) : null;
    let w = -1
      , C = null;
    d && (C = new ResizeObserver(T => {
        let[D] = T;
        D && D.target === p && C && (C.unobserve(r),
        cancelAnimationFrame(w),
        w = requestAnimationFrame( () => {
            var N;
            (N = C) == null || N.observe(r)
        }
        )),
        l()
    }
    ),
    p && !g && C.observe(p),
    C.observe(r));
    let R, E = g ? cr(n) : null;
    g && A();
    function A() {
        const T = cr(n);
        E && !Gy(E, T) && l(),
        E = T,
        R = requestAnimationFrame(A)
    }
    return l(),
    () => {
        var T;
        b.forEach(D => {
            c && D.removeEventListener("scroll", l),
            u && D.removeEventListener("resize", l)
        }
        ),
        v?.(),
        (T = C) == null || T.disconnect(),
        C = null,
        g && cancelAnimationFrame(R)
    }
}
const BT = iT
  , UT = sT
  , HT = rT
  , PT = uT
  , VT = oT
  , vv = aT
  , GT = cT
  , YT = (n, r, l) => {
    const i = new Map
      , c = {
        platform: kT,
        ...l
    }
      , u = {
        ...c.platform,
        _c: i
    };
    return nT(n, r, {
        ...c,
        platform: u
    })
}
;
var qT = typeof document < "u"
  , IT = function() {}
  , As = qT ? m.useLayoutEffect : IT;
function Ds(n, r) {
    if (n === r)
        return !0;
    if (typeof n != typeof r)
        return !1;
    if (typeof n == "function" && n.toString() === r.toString())
        return !0;
    let l, i, c;
    if (n && r && typeof n == "object") {
        if (Array.isArray(n)) {
            if (l = n.length,
            l !== r.length)
                return !1;
            for (i = l; i-- !== 0; )
                if (!Ds(n[i], r[i]))
                    return !1;
            return !0
        }
        if (c = Object.keys(n),
        l = c.length,
        l !== Object.keys(r).length)
            return !1;
        for (i = l; i-- !== 0; )
            if (!{}.hasOwnProperty.call(r, c[i]))
                return !1;
        for (i = l; i-- !== 0; ) {
            const u = c[i];
            if (!(u === "_owner" && n.$$typeof) && !Ds(n[u], r[u]))
                return !1
        }
        return !0
    }
    return n !== n && r !== r
}
function Yy(n) {
    return typeof window > "u" ? 1 : (n.ownerDocument.defaultView || window).devicePixelRatio || 1
}
function yv(n, r) {
    const l = Yy(n);
    return Math.round(r * l) / l
}
function _f(n) {
    const r = m.useRef(n);
    return As( () => {
        r.current = n
    }
    ),
    r
}
function XT(n) {
    n === void 0 && (n = {});
    const {placement: r="bottom", strategy: l="absolute", middleware: i=[], platform: c, elements: {reference: u, floating: d}={}, transform: h=!0, whileElementsMounted: g, open: p} = n
      , [b,v] = m.useState({
        x: 0,
        y: 0,
        strategy: l,
        placement: r,
        middlewareData: {},
        isPositioned: !1
    })
      , [w,C] = m.useState(i);
    Ds(w, i) || C(i);
    const [R,E] = m.useState(null)
      , [A,T] = m.useState(null)
      , D = m.useCallback(B => {
        B !== K.current && (K.current = B,
        E(B))
    }
    , [])
      , N = m.useCallback(B => {
        B !== Y.current && (Y.current = B,
        T(B))
    }
    , [])
      , j = u || R
      , U = d || A
      , K = m.useRef(null)
      , Y = m.useRef(null)
      , V = m.useRef(b)
      , $ = g != null
      , ee = _f(g)
      , se = _f(c)
      , W = _f(p)
      , te = m.useCallback( () => {
        if (!K.current || !Y.current)
            return;
        const B = {
            placement: r,
            strategy: l,
            middleware: w
        };
        se.current && (B.platform = se.current),
        YT(K.current, Y.current, B).then(Q => {
            const ie = {
                ...Q,
                isPositioned: W.current !== !1
            };
            le.current && !Ds(V.current, ie) && (V.current = ie,
            Vl.flushSync( () => {
                v(ie)
            }
            ))
        }
        )
    }
    , [w, r, l, se, W]);
    As( () => {
        p === !1 && V.current.isPositioned && (V.current.isPositioned = !1,
        v(B => ({
            ...B,
            isPositioned: !1
        })))
    }
    , [p]);
    const le = m.useRef(!1);
    As( () => (le.current = !0,
    () => {
        le.current = !1
    }
    ), []),
    As( () => {
        if (j && (K.current = j),
        U && (Y.current = U),
        j && U) {
            if (ee.current)
                return ee.current(j, U, te);
            te()
        }
    }
    , [j, U, te, ee, $]);
    const de = m.useMemo( () => ({
        reference: K,
        floating: Y,
        setReference: D,
        setFloating: N
    }), [D, N])
      , _ = m.useMemo( () => ({
        reference: j,
        floating: U
    }), [j, U])
      , G = m.useMemo( () => {
        const B = {
            position: l,
            left: 0,
            top: 0
        };
        if (!_.floating)
            return B;
        const Q = yv(_.floating, b.x)
          , ie = yv(_.floating, b.y);
        return h ? {
            ...B,
            transform: "translate(" + Q + "px, " + ie + "px)",
            ...Yy(_.floating) >= 1.5 && {
                willChange: "transform"
            }
        } : {
            position: l,
            left: Q,
            top: ie
        }
    }
    , [l, h, _.floating, b.x, b.y]);
    return m.useMemo( () => ({
        ...b,
        update: te,
        refs: de,
        elements: _,
        floatingStyles: G
    }), [b, te, de, _, G])
}
const $T = n => {
    function r(l) {
        return {}.hasOwnProperty.call(l, "current")
    }
    return {
        name: "arrow",
        options: n,
        fn(l) {
            const {element: i, padding: c} = typeof n == "function" ? n(l) : n;
            return i && r(i) ? i.current != null ? vv({
                element: i.current,
                padding: c
            }).fn(l) : {} : i ? vv({
                element: i,
                padding: c
            }).fn(l) : {}
        }
    }
}
  , KT = (n, r) => ({
    ...BT(n),
    options: [n, r]
})
  , QT = (n, r) => ({
    ...UT(n),
    options: [n, r]
})
  , ZT = (n, r) => ({
    ...GT(n),
    options: [n, r]
})
  , FT = (n, r) => ({
    ...HT(n),
    options: [n, r]
})
  , WT = (n, r) => ({
    ...PT(n),
    options: [n, r]
})
  , JT = (n, r) => ({
    ...VT(n),
    options: [n, r]
})
  , e2 = (n, r) => ({
    ...$T(n),
    options: [n, r]
});
var t2 = "Arrow"
  , qy = m.forwardRef( (n, r) => {
    const {children: l, width: i=10, height: c=5, ...u} = n;
    return y.jsx(Me.svg, {
        ...u,
        ref: r,
        width: i,
        height: c,
        viewBox: "0 0 30 10",
        preserveAspectRatio: "none",
        children: n.asChild ? l : y.jsx("polygon", {
            points: "0,0 30,0 15,10"
        })
    })
}
);
qy.displayName = t2;
var n2 = qy
  , Rd = "Popper"
  , [Iy,Eo] = aa(Rd)
  , [a2,Xy] = Iy(Rd)
  , $y = n => {
    const {__scopePopper: r, children: l} = n
      , [i,c] = m.useState(null);
    return y.jsx(a2, {
        scope: r,
        anchor: i,
        onAnchorChange: c,
        children: l
    })
}
;
$y.displayName = Rd;
var Ky = "PopperAnchor"
  , Qy = m.forwardRef( (n, r) => {
    const {__scopePopper: l, virtualRef: i, ...c} = n
      , u = Xy(Ky, l)
      , d = m.useRef(null)
      , h = Oe(r, d);
    return m.useEffect( () => {
        u.onAnchorChange(i?.current || d.current)
    }
    ),
    i ? null : y.jsx(Me.div, {
        ...c,
        ref: h
    })
}
);
Qy.displayName = Ky;
var Ad = "PopperContent"
  , [r2,o2] = Iy(Ad)
  , Zy = m.forwardRef( (n, r) => {
    const {__scopePopper: l, side: i="bottom", sideOffset: c=0, align: u="center", alignOffset: d=0, arrowPadding: h=0, avoidCollisions: g=!0, collisionBoundary: p=[], collisionPadding: b=0, sticky: v="partial", hideWhenDetached: w=!1, updatePositionStrategy: C="optimized", onPlaced: R, ...E} = n
      , A = Xy(Ad, l)
      , [T,D] = m.useState(null)
      , N = Oe(r, Z => D(Z))
      , [j,U] = m.useState(null)
      , K = Dy(j)
      , Y = K?.width ?? 0
      , V = K?.height ?? 0
      , $ = i + (u !== "center" ? "-" + u : "")
      , ee = typeof b == "number" ? b : {
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
        ...b
    }
      , se = Array.isArray(p) ? p : [p]
      , W = se.length > 0
      , te = {
        padding: ee,
        boundary: se.filter(i2),
        altBoundary: W
    }
      , {refs: le, floatingStyles: de, placement: _, isPositioned: G, middlewareData: B} = XT({
        strategy: "fixed",
        placement: $,
        whileElementsMounted: (...Z) => LT(...Z, {
            animationFrame: C === "always"
        }),
        elements: {
            reference: A.anchor
        },
        middleware: [KT({
            mainAxis: c + V,
            alignmentAxis: d
        }), g && QT({
            mainAxis: !0,
            crossAxis: !1,
            limiter: v === "partial" ? ZT() : void 0,
            ...te
        }), g && FT({
            ...te
        }), WT({
            ...te,
            apply: ({elements: Z, rects: ce, availableWidth: De, availableHeight: xe}) => {
                const {width: Ce, height: Ne} = ce.reference
                  , ut = Z.floating.style;
                ut.setProperty("--radix-popper-available-width", `${De}px`),
                ut.setProperty("--radix-popper-available-height", `${xe}px`),
                ut.setProperty("--radix-popper-anchor-width", `${Ce}px`),
                ut.setProperty("--radix-popper-anchor-height", `${Ne}px`)
            }
        }), j && e2({
            element: j,
            padding: h
        }), s2({
            arrowWidth: Y,
            arrowHeight: V
        }), w && JT({
            strategy: "referenceHidden",
            ...te
        })]
    })
      , [Q,ie] = Jy(_)
      , be = vt(R);
    st( () => {
        G && be?.()
    }
    , [G, be]);
    const ve = B.arrow?.x
      , J = B.arrow?.y
      , ne = B.arrow?.centerOffset !== 0
      , [pe,Ee] = m.useState();
    return st( () => {
        T && Ee(window.getComputedStyle(T).zIndex)
    }
    , [T]),
    y.jsx("div", {
        ref: le.setFloating,
        "data-radix-popper-content-wrapper": "",
        style: {
            ...de,
            transform: G ? de.transform : "translate(0, -200%)",
            minWidth: "max-content",
            zIndex: pe,
            "--radix-popper-transform-origin": [B.transformOrigin?.x, B.transformOrigin?.y].join(" "),
            ...B.hide?.referenceHidden && {
                visibility: "hidden",
                pointerEvents: "none"
            }
        },
        dir: n.dir,
        children: y.jsx(r2, {
            scope: l,
            placedSide: Q,
            onArrowChange: U,
            arrowX: ve,
            arrowY: J,
            shouldHideArrow: ne,
            children: y.jsx(Me.div, {
                "data-side": Q,
                "data-align": ie,
                ...E,
                ref: N,
                style: {
                    ...E.style,
                    animation: G ? void 0 : "none"
                }
            })
        })
    })
}
);
Zy.displayName = Ad;
var Fy = "PopperArrow"
  , l2 = {
    top: "bottom",
    right: "left",
    bottom: "top",
    left: "right"
}
  , Wy = m.forwardRef(function(r, l) {
    const {__scopePopper: i, ...c} = r
      , u = o2(Fy, i)
      , d = l2[u.placedSide];
    return y.jsx("span", {
        ref: u.onArrowChange,
        style: {
            position: "absolute",
            left: u.arrowX,
            top: u.arrowY,
            [d]: 0,
            transformOrigin: {
                top: "",
                right: "0 0",
                bottom: "center 0",
                left: "100% 0"
            }[u.placedSide],
            transform: {
                top: "translateY(100%)",
                right: "translateY(50%) rotate(90deg) translateX(-50%)",
                bottom: "rotate(180deg)",
                left: "translateY(50%) rotate(-90deg) translateX(50%)"
            }[u.placedSide],
            visibility: u.shouldHideArrow ? "hidden" : void 0
        },
        children: y.jsx(n2, {
            ...c,
            ref: l,
            style: {
                ...c.style,
                display: "block"
            }
        })
    })
});
Wy.displayName = Fy;
function i2(n) {
    return n !== null
}
var s2 = n => ({
    name: "transformOrigin",
    options: n,
    fn(r) {
        const {placement: l, rects: i, middlewareData: c} = r
          , d = c.arrow?.centerOffset !== 0
          , h = d ? 0 : n.arrowWidth
          , g = d ? 0 : n.arrowHeight
          , [p,b] = Jy(l)
          , v = {
            start: "0%",
            center: "50%",
            end: "100%"
        }[b]
          , w = (c.arrow?.x ?? 0) + h / 2
          , C = (c.arrow?.y ?? 0) + g / 2;
        let R = ""
          , E = "";
        return p === "bottom" ? (R = d ? v : `${w}px`,
        E = `${-g}px`) : p === "top" ? (R = d ? v : `${w}px`,
        E = `${i.floating.height + g}px`) : p === "right" ? (R = `${-g}px`,
        E = d ? v : `${C}px`) : p === "left" && (R = `${i.floating.width + g}px`,
        E = d ? v : `${C}px`),
        {
            data: {
                x: R,
                y: E
            }
        }
    }
});
function Jy(n) {
    const [r,l="center"] = n.split("-");
    return [r, l]
}
var Md = $y
  , Nd = Qy
  , _d = Zy
  , Od = Wy
  , Of = "rovingFocusGroup.onEntryFocus"
  , c2 = {
    bubbles: !1,
    cancelable: !0
}
  , Yl = "RovingFocusGroup"
  , [If,eb,u2] = pd(Yl)
  , [f2,tb] = aa(Yl, [u2])
  , [d2,m2] = f2(Yl)
  , nb = m.forwardRef( (n, r) => y.jsx(If.Provider, {
    scope: n.__scopeRovingFocusGroup,
    children: y.jsx(If.Slot, {
        scope: n.__scopeRovingFocusGroup,
        children: y.jsx(h2, {
            ...n,
            ref: r
        })
    })
}));
nb.displayName = Yl;
var h2 = m.forwardRef( (n, r) => {
    const {__scopeRovingFocusGroup: l, orientation: i, loop: c=!1, dir: u, currentTabStopId: d, defaultCurrentTabStopId: h, onCurrentTabStopIdChange: g, onEntryFocus: p, preventScrollOnEntryFocus: b=!1, ...v} = n
      , w = m.useRef(null)
      , C = Oe(r, w)
      , R = Gs(u)
      , [E,A] = mo({
        prop: d,
        defaultProp: h ?? null,
        onChange: g,
        caller: Yl
    })
      , [T,D] = m.useState(!1)
      , N = vt(p)
      , j = eb(l)
      , U = m.useRef(!1)
      , [K,Y] = m.useState(0);
    return m.useEffect( () => {
        const V = w.current;
        if (V)
            return V.addEventListener(Of, N),
            () => V.removeEventListener(Of, N)
    }
    , [N]),
    y.jsx(d2, {
        scope: l,
        orientation: i,
        dir: R,
        loop: c,
        currentTabStopId: E,
        onItemFocus: m.useCallback(V => A(V), [A]),
        onItemShiftTab: m.useCallback( () => D(!0), []),
        onFocusableItemAdd: m.useCallback( () => Y(V => V + 1), []),
        onFocusableItemRemove: m.useCallback( () => Y(V => V - 1), []),
        children: y.jsx(Me.div, {
            tabIndex: T || K === 0 ? -1 : 0,
            "data-orientation": i,
            ...v,
            ref: C,
            style: {
                outline: "none",
                ...n.style
            },
            onMouseDown: ue(n.onMouseDown, () => {
                U.current = !0
            }
            ),
            onFocus: ue(n.onFocus, V => {
                const $ = !U.current;
                if (V.target === V.currentTarget && $ && !T) {
                    const ee = new CustomEvent(Of,c2);
                    if (V.currentTarget.dispatchEvent(ee),
                    !ee.defaultPrevented) {
                        const se = j().filter(_ => _.focusable)
                          , W = se.find(_ => _.active)
                          , te = se.find(_ => _.id === E)
                          , de = [W, te, ...se].filter(Boolean).map(_ => _.ref.current);
                        ob(de, b)
                    }
                }
                U.current = !1
            }
            ),
            onBlur: ue(n.onBlur, () => D(!1))
        })
    })
}
)
  , ab = "RovingFocusGroupItem"
  , rb = m.forwardRef( (n, r) => {
    const {__scopeRovingFocusGroup: l, focusable: i=!0, active: c=!1, tabStopId: u, children: d, ...h} = n
      , g = Da()
      , p = u || g
      , b = m2(ab, l)
      , v = b.currentTabStopId === p
      , w = eb(l)
      , {onFocusableItemAdd: C, onFocusableItemRemove: R, currentTabStopId: E} = b;
    return m.useEffect( () => {
        if (i)
            return C(),
            () => R()
    }
    , [i, C, R]),
    y.jsx(If.ItemSlot, {
        scope: l,
        id: p,
        focusable: i,
        active: c,
        children: y.jsx(Me.span, {
            tabIndex: v ? 0 : -1,
            "data-orientation": b.orientation,
            ...h,
            ref: r,
            onMouseDown: ue(n.onMouseDown, A => {
                i ? b.onItemFocus(p) : A.preventDefault()
            }
            ),
            onFocus: ue(n.onFocus, () => b.onItemFocus(p)),
            onKeyDown: ue(n.onKeyDown, A => {
                if (A.key === "Tab" && A.shiftKey) {
                    b.onItemShiftTab();
                    return
                }
                if (A.target !== A.currentTarget)
                    return;
                const T = v2(A, b.orientation, b.dir);
                if (T !== void 0) {
                    if (A.metaKey || A.ctrlKey || A.altKey || A.shiftKey)
                        return;
                    A.preventDefault();
                    let N = w().filter(j => j.focusable).map(j => j.ref.current);
                    if (T === "last")
                        N.reverse();
                    else if (T === "prev" || T === "next") {
                        T === "prev" && N.reverse();
                        const j = N.indexOf(A.currentTarget);
                        N = b.loop ? y2(N, j + 1) : N.slice(j + 1)
                    }
                    setTimeout( () => ob(N))
                }
            }
            ),
            children: typeof d == "function" ? d({
                isCurrentTabStop: v,
                hasTabStop: E != null
            }) : d
        })
    })
}
);
rb.displayName = ab;
var p2 = {
    ArrowLeft: "prev",
    ArrowUp: "prev",
    ArrowRight: "next",
    ArrowDown: "next",
    PageUp: "first",
    Home: "first",
    PageDown: "last",
    End: "last"
};
function g2(n, r) {
    return r !== "rtl" ? n : n === "ArrowLeft" ? "ArrowRight" : n === "ArrowRight" ? "ArrowLeft" : n
}
function v2(n, r, l) {
    const i = g2(n.key, l);
    if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(i)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(i)))
        return p2[i]
}
function ob(n, r=!1) {
    const l = document.activeElement;
    for (const i of n)
        if (i === l || (i.focus({
            preventScroll: r
        }),
        document.activeElement !== l))
            return
}
function y2(n, r) {
    return n.map( (l, i) => n[(r + i) % n.length])
}
var b2 = nb
  , x2 = rb
  , Xf = ["Enter", " "]
  , w2 = ["ArrowDown", "PageUp", "Home"]
  , lb = ["ArrowUp", "PageDown", "End"]
  , S2 = [...w2, ...lb]
  , E2 = {
    ltr: [...Xf, "ArrowRight"],
    rtl: [...Xf, "ArrowLeft"]
}
  , C2 = {
    ltr: ["ArrowLeft"],
    rtl: ["ArrowRight"]
}
  , ql = "Menu"
  , [zl,T2,R2] = pd(ql)
  , [dr,ib] = aa(ql, [R2, Eo, tb])
  , Il = Eo()
  , sb = tb()
  , [cb,za] = dr(ql)
  , [A2,Xl] = dr(ql)
  , ub = n => {
    const {__scopeMenu: r, open: l=!1, children: i, dir: c, onOpenChange: u, modal: d=!0} = n
      , h = Il(r)
      , [g,p] = m.useState(null)
      , b = m.useRef(!1)
      , v = vt(u)
      , w = Gs(c);
    return m.useEffect( () => {
        const C = () => {
            b.current = !0,
            document.addEventListener("pointerdown", R, {
                capture: !0,
                once: !0
            }),
            document.addEventListener("pointermove", R, {
                capture: !0,
                once: !0
            })
        }
          , R = () => b.current = !1;
        return document.addEventListener("keydown", C, {
            capture: !0
        }),
        () => {
            document.removeEventListener("keydown", C, {
                capture: !0
            }),
            document.removeEventListener("pointerdown", R, {
                capture: !0
            }),
            document.removeEventListener("pointermove", R, {
                capture: !0
            })
        }
    }
    , []),
    y.jsx(Md, {
        ...h,
        children: y.jsx(cb, {
            scope: r,
            open: l,
            onOpenChange: v,
            content: g,
            onContentChange: p,
            children: y.jsx(A2, {
                scope: r,
                onClose: m.useCallback( () => v(!1), [v]),
                isUsingKeyboardRef: b,
                dir: w,
                modal: d,
                children: i
            })
        })
    })
}
;
ub.displayName = ql;
var M2 = "MenuAnchor"
  , Dd = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, ...i} = n
      , c = Il(l);
    return y.jsx(Nd, {
        ...c,
        ...i,
        ref: r
    })
}
);
Dd.displayName = M2;
var jd = "MenuPortal"
  , [N2,fb] = dr(jd, {
    forceMount: void 0
})
  , db = n => {
    const {__scopeMenu: r, forceMount: l, children: i, container: c} = n
      , u = za(jd, r);
    return y.jsx(N2, {
        scope: r,
        forceMount: l,
        children: y.jsx(xo, {
            present: l || u.open,
            children: y.jsx(vd, {
                asChild: !0,
                container: c,
                children: i
            })
        })
    })
}
;
db.displayName = jd;
var an = "MenuContent"
  , [_2,kd] = dr(an)
  , mb = m.forwardRef( (n, r) => {
    const l = fb(an, n.__scopeMenu)
      , {forceMount: i=l.forceMount, ...c} = n
      , u = za(an, n.__scopeMenu)
      , d = Xl(an, n.__scopeMenu);
    return y.jsx(zl.Provider, {
        scope: n.__scopeMenu,
        children: y.jsx(xo, {
            present: i || u.open,
            children: y.jsx(zl.Slot, {
                scope: n.__scopeMenu,
                children: d.modal ? y.jsx(O2, {
                    ...c,
                    ref: r
                }) : y.jsx(D2, {
                    ...c,
                    ref: r
                })
            })
        })
    })
}
)
  , O2 = m.forwardRef( (n, r) => {
    const l = za(an, n.__scopeMenu)
      , i = m.useRef(null)
      , c = Oe(r, i);
    return m.useEffect( () => {
        const u = i.current;
        if (u)
            return _y(u)
    }
    , []),
    y.jsx(zd, {
        ...n,
        ref: c,
        trapFocus: l.open,
        disableOutsidePointerEvents: l.open,
        disableOutsideScroll: !0,
        onFocusOutside: ue(n.onFocusOutside, u => u.preventDefault(), {
            checkForDefaultPrevented: !1
        }),
        onDismiss: () => l.onOpenChange(!1)
    })
}
)
  , D2 = m.forwardRef( (n, r) => {
    const l = za(an, n.__scopeMenu);
    return y.jsx(zd, {
        ...n,
        ref: r,
        trapFocus: !1,
        disableOutsidePointerEvents: !1,
        disableOutsideScroll: !1,
        onDismiss: () => l.onOpenChange(!1)
    })
}
)
  , j2 = fo("MenuContent.ScrollLock")
  , zd = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, loop: i=!1, trapFocus: c, onOpenAutoFocus: u, onCloseAutoFocus: d, disableOutsidePointerEvents: h, onEntryFocus: g, onEscapeKeyDown: p, onPointerDownOutside: b, onFocusOutside: v, onInteractOutside: w, onDismiss: C, disableOutsideScroll: R, ...E} = n
      , A = za(an, l)
      , T = Xl(an, l)
      , D = Il(l)
      , N = sb(l)
      , j = T2(l)
      , [U,K] = m.useState(null)
      , Y = m.useRef(null)
      , V = Oe(r, Y, A.onContentChange)
      , $ = m.useRef(0)
      , ee = m.useRef("")
      , se = m.useRef(0)
      , W = m.useRef(null)
      , te = m.useRef("right")
      , le = m.useRef(0)
      , de = R ? yd : m.Fragment
      , _ = R ? {
        as: j2,
        allowPinchZoom: !0
    } : void 0
      , G = Q => {
        const ie = ee.current + Q
          , be = j().filter(Z => !Z.disabled)
          , ve = document.activeElement
          , J = be.find(Z => Z.ref.current === ve)?.textValue
          , ne = be.map(Z => Z.textValue)
          , pe = I2(ne, ie, J)
          , Ee = be.find(Z => Z.textValue === pe)?.ref.current;
        (function Z(ce) {
            ee.current = ce,
            window.clearTimeout($.current),
            ce !== "" && ($.current = window.setTimeout( () => Z(""), 1e3))
        }
        )(ie),
        Ee && setTimeout( () => Ee.focus())
    }
    ;
    m.useEffect( () => () => window.clearTimeout($.current), []),
    wy();
    const B = m.useCallback(Q => te.current === W.current?.side && $2(Q, W.current?.area), []);
    return y.jsx(_2, {
        scope: l,
        searchRef: ee,
        onItemEnter: m.useCallback(Q => {
            B(Q) && Q.preventDefault()
        }
        , [B]),
        onItemLeave: m.useCallback(Q => {
            B(Q) || (Y.current?.focus(),
            K(null))
        }
        , [B]),
        onTriggerLeave: m.useCallback(Q => {
            B(Q) && Q.preventDefault()
        }
        , [B]),
        pointerGraceTimerRef: se,
        onPointerGraceIntentChange: m.useCallback(Q => {
            W.current = Q
        }
        , []),
        children: y.jsx(de, {
            ..._,
            children: y.jsx(gd, {
                asChild: !0,
                trapped: c,
                onMountAutoFocus: ue(u, Q => {
                    Q.preventDefault(),
                    Y.current?.focus({
                        preventScroll: !0
                    })
                }
                ),
                onUnmountAutoFocus: d,
                children: y.jsx(Ys, {
                    asChild: !0,
                    disableOutsidePointerEvents: h,
                    onEscapeKeyDown: p,
                    onPointerDownOutside: b,
                    onFocusOutside: v,
                    onInteractOutside: w,
                    onDismiss: C,
                    children: y.jsx(b2, {
                        asChild: !0,
                        ...N,
                        dir: T.dir,
                        orientation: "vertical",
                        loop: i,
                        currentTabStopId: U,
                        onCurrentTabStopIdChange: K,
                        onEntryFocus: ue(g, Q => {
                            T.isUsingKeyboardRef.current || Q.preventDefault()
                        }
                        ),
                        preventScrollOnEntryFocus: !0,
                        children: y.jsx(_d, {
                            role: "menu",
                            "aria-orientation": "vertical",
                            "data-state": _b(A.open),
                            "data-radix-menu-content": "",
                            dir: T.dir,
                            ...D,
                            ...E,
                            ref: V,
                            style: {
                                outline: "none",
                                ...E.style
                            },
                            onKeyDown: ue(E.onKeyDown, Q => {
                                const be = Q.target.closest("[data-radix-menu-content]") === Q.currentTarget
                                  , ve = Q.ctrlKey || Q.altKey || Q.metaKey
                                  , J = Q.key.length === 1;
                                be && (Q.key === "Tab" && Q.preventDefault(),
                                !ve && J && G(Q.key));
                                const ne = Y.current;
                                if (Q.target !== ne || !S2.includes(Q.key))
                                    return;
                                Q.preventDefault();
                                const Ee = j().filter(Z => !Z.disabled).map(Z => Z.ref.current);
                                lb.includes(Q.key) && Ee.reverse(),
                                Y2(Ee)
                            }
                            ),
                            onBlur: ue(n.onBlur, Q => {
                                Q.currentTarget.contains(Q.target) || (window.clearTimeout($.current),
                                ee.current = "")
                            }
                            ),
                            onPointerMove: ue(n.onPointerMove, Ll(Q => {
                                const ie = Q.target
                                  , be = le.current !== Q.clientX;
                                if (Q.currentTarget.contains(ie) && be) {
                                    const ve = Q.clientX > le.current ? "right" : "left";
                                    te.current = ve,
                                    le.current = Q.clientX
                                }
                            }
                            ))
                        })
                    })
                })
            })
        })
    })
}
);
mb.displayName = an;
var k2 = "MenuGroup"
  , Ld = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, ...i} = n;
    return y.jsx(Me.div, {
        role: "group",
        ...i,
        ref: r
    })
}
);
Ld.displayName = k2;
var z2 = "MenuLabel"
  , hb = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, ...i} = n;
    return y.jsx(Me.div, {
        ...i,
        ref: r
    })
}
);
hb.displayName = z2;
var js = "MenuItem"
  , bv = "menu.itemSelect"
  , Ks = m.forwardRef( (n, r) => {
    const {disabled: l=!1, onSelect: i, ...c} = n
      , u = m.useRef(null)
      , d = Xl(js, n.__scopeMenu)
      , h = kd(js, n.__scopeMenu)
      , g = Oe(r, u)
      , p = m.useRef(!1)
      , b = () => {
        const v = u.current;
        if (!l && v) {
            const w = new CustomEvent(bv,{
                bubbles: !0,
                cancelable: !0
            });
            v.addEventListener(bv, C => i?.(C), {
                once: !0
            }),
            hy(v, w),
            w.defaultPrevented ? p.current = !1 : d.onClose()
        }
    }
    ;
    return y.jsx(pb, {
        ...c,
        ref: g,
        disabled: l,
        onClick: ue(n.onClick, b),
        onPointerDown: v => {
            n.onPointerDown?.(v),
            p.current = !0
        }
        ,
        onPointerUp: ue(n.onPointerUp, v => {
            p.current || v.currentTarget?.click()
        }
        ),
        onKeyDown: ue(n.onKeyDown, v => {
            const w = h.searchRef.current !== "";
            l || w && v.key === " " || Xf.includes(v.key) && (v.currentTarget.click(),
            v.preventDefault())
        }
        )
    })
}
);
Ks.displayName = js;
var pb = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, disabled: i=!1, textValue: c, ...u} = n
      , d = kd(js, l)
      , h = sb(l)
      , g = m.useRef(null)
      , p = Oe(r, g)
      , [b,v] = m.useState(!1)
      , [w,C] = m.useState("");
    return m.useEffect( () => {
        const R = g.current;
        R && C((R.textContent ?? "").trim())
    }
    , [u.children]),
    y.jsx(zl.ItemSlot, {
        scope: l,
        disabled: i,
        textValue: c ?? w,
        children: y.jsx(x2, {
            asChild: !0,
            ...h,
            focusable: !i,
            children: y.jsx(Me.div, {
                role: "menuitem",
                "data-highlighted": b ? "" : void 0,
                "aria-disabled": i || void 0,
                "data-disabled": i ? "" : void 0,
                ...u,
                ref: p,
                onPointerMove: ue(n.onPointerMove, Ll(R => {
                    i ? d.onItemLeave(R) : (d.onItemEnter(R),
                    R.defaultPrevented || R.currentTarget.focus({
                        preventScroll: !0
                    }))
                }
                )),
                onPointerLeave: ue(n.onPointerLeave, Ll(R => d.onItemLeave(R))),
                onFocus: ue(n.onFocus, () => v(!0)),
                onBlur: ue(n.onBlur, () => v(!1))
            })
        })
    })
}
)
  , L2 = "MenuCheckboxItem"
  , gb = m.forwardRef( (n, r) => {
    const {checked: l=!1, onCheckedChange: i, ...c} = n;
    return y.jsx(wb, {
        scope: n.__scopeMenu,
        checked: l,
        children: y.jsx(Ks, {
            role: "menuitemcheckbox",
            "aria-checked": ks(l) ? "mixed" : l,
            ...c,
            ref: r,
            "data-state": Hd(l),
            onSelect: ue(c.onSelect, () => i?.(ks(l) ? !0 : !l), {
                checkForDefaultPrevented: !1
            })
        })
    })
}
);
gb.displayName = L2;
var vb = "MenuRadioGroup"
  , [B2,U2] = dr(vb, {
    value: void 0,
    onValueChange: () => {}
})
  , yb = m.forwardRef( (n, r) => {
    const {value: l, onValueChange: i, ...c} = n
      , u = vt(i);
    return y.jsx(B2, {
        scope: n.__scopeMenu,
        value: l,
        onValueChange: u,
        children: y.jsx(Ld, {
            ...c,
            ref: r
        })
    })
}
);
yb.displayName = vb;
var bb = "MenuRadioItem"
  , xb = m.forwardRef( (n, r) => {
    const {value: l, ...i} = n
      , c = U2(bb, n.__scopeMenu)
      , u = l === c.value;
    return y.jsx(wb, {
        scope: n.__scopeMenu,
        checked: u,
        children: y.jsx(Ks, {
            role: "menuitemradio",
            "aria-checked": u,
            ...i,
            ref: r,
            "data-state": Hd(u),
            onSelect: ue(i.onSelect, () => c.onValueChange?.(l), {
                checkForDefaultPrevented: !1
            })
        })
    })
}
);
xb.displayName = bb;
var Bd = "MenuItemIndicator"
  , [wb,H2] = dr(Bd, {
    checked: !1
})
  , Sb = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, forceMount: i, ...c} = n
      , u = H2(Bd, l);
    return y.jsx(xo, {
        present: i || ks(u.checked) || u.checked === !0,
        children: y.jsx(Me.span, {
            ...c,
            ref: r,
            "data-state": Hd(u.checked)
        })
    })
}
);
Sb.displayName = Bd;
var P2 = "MenuSeparator"
  , Eb = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, ...i} = n;
    return y.jsx(Me.div, {
        role: "separator",
        "aria-orientation": "horizontal",
        ...i,
        ref: r
    })
}
);
Eb.displayName = P2;
var V2 = "MenuArrow"
  , Cb = m.forwardRef( (n, r) => {
    const {__scopeMenu: l, ...i} = n
      , c = Il(l);
    return y.jsx(Od, {
        ...c,
        ...i,
        ref: r
    })
}
);
Cb.displayName = V2;
var Ud = "MenuSub"
  , [G2,Tb] = dr(Ud)
  , Rb = n => {
    const {__scopeMenu: r, children: l, open: i=!1, onOpenChange: c} = n
      , u = za(Ud, r)
      , d = Il(r)
      , [h,g] = m.useState(null)
      , [p,b] = m.useState(null)
      , v = vt(c);
    return m.useEffect( () => (u.open === !1 && v(!1),
    () => v(!1)), [u.open, v]),
    y.jsx(Md, {
        ...d,
        children: y.jsx(cb, {
            scope: r,
            open: i,
            onOpenChange: v,
            content: p,
            onContentChange: b,
            children: y.jsx(G2, {
                scope: r,
                contentId: Da(),
                triggerId: Da(),
                trigger: h,
                onTriggerChange: g,
                children: l
            })
        })
    })
}
;
Rb.displayName = Ud;
var Ml = "MenuSubTrigger"
  , Ab = m.forwardRef( (n, r) => {
    const l = za(Ml, n.__scopeMenu)
      , i = Xl(Ml, n.__scopeMenu)
      , c = Tb(Ml, n.__scopeMenu)
      , u = kd(Ml, n.__scopeMenu)
      , d = m.useRef(null)
      , {pointerGraceTimerRef: h, onPointerGraceIntentChange: g} = u
      , p = {
        __scopeMenu: n.__scopeMenu
    }
      , b = m.useCallback( () => {
        d.current && window.clearTimeout(d.current),
        d.current = null
    }
    , []);
    return m.useEffect( () => b, [b]),
    m.useEffect( () => {
        const v = h.current;
        return () => {
            window.clearTimeout(v),
            g(null)
        }
    }
    , [h, g]),
    y.jsx(Dd, {
        asChild: !0,
        ...p,
        children: y.jsx(pb, {
            id: c.triggerId,
            "aria-haspopup": "menu",
            "aria-expanded": l.open,
            "aria-controls": c.contentId,
            "data-state": _b(l.open),
            ...n,
            ref: Vs(r, c.onTriggerChange),
            onClick: v => {
                n.onClick?.(v),
                !(n.disabled || v.defaultPrevented) && (v.currentTarget.focus(),
                l.open || l.onOpenChange(!0))
            }
            ,
            onPointerMove: ue(n.onPointerMove, Ll(v => {
                u.onItemEnter(v),
                !v.defaultPrevented && !n.disabled && !l.open && !d.current && (u.onPointerGraceIntentChange(null),
                d.current = window.setTimeout( () => {
                    l.onOpenChange(!0),
                    b()
                }
                , 100))
            }
            )),
            onPointerLeave: ue(n.onPointerLeave, Ll(v => {
                b();
                const w = l.content?.getBoundingClientRect();
                if (w) {
                    const C = l.content?.dataset.side
                      , R = C === "right"
                      , E = R ? -5 : 5
                      , A = w[R ? "left" : "right"]
                      , T = w[R ? "right" : "left"];
                    u.onPointerGraceIntentChange({
                        area: [{
                            x: v.clientX + E,
                            y: v.clientY
                        }, {
                            x: A,
                            y: w.top
                        }, {
                            x: T,
                            y: w.top
                        }, {
                            x: T,
                            y: w.bottom
                        }, {
                            x: A,
                            y: w.bottom
                        }],
                        side: C
                    }),
                    window.clearTimeout(h.current),
                    h.current = window.setTimeout( () => u.onPointerGraceIntentChange(null), 300)
                } else {
                    if (u.onTriggerLeave(v),
                    v.defaultPrevented)
                        return;
                    u.onPointerGraceIntentChange(null)
                }
            }
            )),
            onKeyDown: ue(n.onKeyDown, v => {
                const w = u.searchRef.current !== "";
                n.disabled || w && v.key === " " || E2[i.dir].includes(v.key) && (l.onOpenChange(!0),
                l.content?.focus(),
                v.preventDefault())
            }
            )
        })
    })
}
);
Ab.displayName = Ml;
var Mb = "MenuSubContent"
  , Nb = m.forwardRef( (n, r) => {
    const l = fb(an, n.__scopeMenu)
      , {forceMount: i=l.forceMount, ...c} = n
      , u = za(an, n.__scopeMenu)
      , d = Xl(an, n.__scopeMenu)
      , h = Tb(Mb, n.__scopeMenu)
      , g = m.useRef(null)
      , p = Oe(r, g);
    return y.jsx(zl.Provider, {
        scope: n.__scopeMenu,
        children: y.jsx(xo, {
            present: i || u.open,
            children: y.jsx(zl.Slot, {
                scope: n.__scopeMenu,
                children: y.jsx(zd, {
                    id: h.contentId,
                    "aria-labelledby": h.triggerId,
                    ...c,
                    ref: p,
                    align: "start",
                    side: d.dir === "rtl" ? "left" : "right",
                    disableOutsidePointerEvents: !1,
                    disableOutsideScroll: !1,
                    trapFocus: !1,
                    onOpenAutoFocus: b => {
                        d.isUsingKeyboardRef.current && g.current?.focus(),
                        b.preventDefault()
                    }
                    ,
                    onCloseAutoFocus: b => b.preventDefault(),
                    onFocusOutside: ue(n.onFocusOutside, b => {
                        b.target !== h.trigger && u.onOpenChange(!1)
                    }
                    ),
                    onEscapeKeyDown: ue(n.onEscapeKeyDown, b => {
                        d.onClose(),
                        b.preventDefault()
                    }
                    ),
                    onKeyDown: ue(n.onKeyDown, b => {
                        const v = b.currentTarget.contains(b.target)
                          , w = C2[d.dir].includes(b.key);
                        v && w && (u.onOpenChange(!1),
                        h.trigger?.focus(),
                        b.preventDefault())
                    }
                    )
                })
            })
        })
    })
}
);
Nb.displayName = Mb;
function _b(n) {
    return n ? "open" : "closed"
}
function ks(n) {
    return n === "indeterminate"
}
function Hd(n) {
    return ks(n) ? "indeterminate" : n ? "checked" : "unchecked"
}
function Y2(n) {
    const r = document.activeElement;
    for (const l of n)
        if (l === r || (l.focus(),
        document.activeElement !== r))
            return
}
function q2(n, r) {
    return n.map( (l, i) => n[(r + i) % n.length])
}
function I2(n, r, l) {
    const c = r.length > 1 && Array.from(r).every(p => p === r[0]) ? r[0] : r
      , u = l ? n.indexOf(l) : -1;
    let d = q2(n, Math.max(u, 0));
    c.length === 1 && (d = d.filter(p => p !== l));
    const g = d.find(p => p.toLowerCase().startsWith(c.toLowerCase()));
    return g !== l ? g : void 0
}
function X2(n, r) {
    const {x: l, y: i} = n;
    let c = !1;
    for (let u = 0, d = r.length - 1; u < r.length; d = u++) {
        const h = r[u]
          , g = r[d]
          , p = h.x
          , b = h.y
          , v = g.x
          , w = g.y;
        b > i != w > i && l < (v - p) * (i - b) / (w - b) + p && (c = !c)
    }
    return c
}
function $2(n, r) {
    if (!r)
        return !1;
    const l = {
        x: n.clientX,
        y: n.clientY
    };
    return X2(l, r)
}
function Ll(n) {
    return r => r.pointerType === "mouse" ? n(r) : void 0
}
var K2 = ub
  , Q2 = Dd
  , Z2 = db
  , F2 = mb
  , W2 = Ld
  , J2 = hb
  , eR = Ks
  , tR = gb
  , nR = yb
  , aR = xb
  , rR = Sb
  , oR = Eb
  , lR = Cb
  , iR = Rb
  , sR = Ab
  , cR = Nb
  , Qs = "DropdownMenu"
  , [uR,B_] = aa(Qs, [ib])
  , Ct = ib()
  , [fR,Ob] = uR(Qs)
  , Db = n => {
    const {__scopeDropdownMenu: r, children: l, dir: i, open: c, defaultOpen: u, onOpenChange: d, modal: h=!0} = n
      , g = Ct(r)
      , p = m.useRef(null)
      , [b,v] = mo({
        prop: c,
        defaultProp: u ?? !1,
        onChange: d,
        caller: Qs
    });
    return y.jsx(fR, {
        scope: r,
        triggerId: Da(),
        triggerRef: p,
        contentId: Da(),
        open: b,
        onOpenChange: v,
        onOpenToggle: m.useCallback( () => v(w => !w), [v]),
        modal: h,
        children: y.jsx(K2, {
            ...g,
            open: b,
            onOpenChange: v,
            dir: i,
            modal: h,
            children: l
        })
    })
}
;
Db.displayName = Qs;
var jb = "DropdownMenuTrigger"
  , kb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, disabled: i=!1, ...c} = n
      , u = Ob(jb, l)
      , d = Ct(l);
    return y.jsx(Q2, {
        asChild: !0,
        ...d,
        children: y.jsx(Me.button, {
            type: "button",
            id: u.triggerId,
            "aria-haspopup": "menu",
            "aria-expanded": u.open,
            "aria-controls": u.open ? u.contentId : void 0,
            "data-state": u.open ? "open" : "closed",
            "data-disabled": i ? "" : void 0,
            disabled: i,
            ...c,
            ref: Vs(r, u.triggerRef),
            onPointerDown: ue(n.onPointerDown, h => {
                !i && h.button === 0 && h.ctrlKey === !1 && (u.onOpenToggle(),
                u.open || h.preventDefault())
            }
            ),
            onKeyDown: ue(n.onKeyDown, h => {
                i || (["Enter", " "].includes(h.key) && u.onOpenToggle(),
                h.key === "ArrowDown" && u.onOpenChange(!0),
                ["Enter", " ", "ArrowDown"].includes(h.key) && h.preventDefault())
            }
            )
        })
    })
}
);
kb.displayName = jb;
var dR = "DropdownMenuPortal"
  , zb = n => {
    const {__scopeDropdownMenu: r, ...l} = n
      , i = Ct(r);
    return y.jsx(Z2, {
        ...i,
        ...l
    })
}
;
zb.displayName = dR;
var Lb = "DropdownMenuContent"
  , Bb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ob(Lb, l)
      , u = Ct(l)
      , d = m.useRef(!1);
    return y.jsx(F2, {
        id: c.contentId,
        "aria-labelledby": c.triggerId,
        ...u,
        ...i,
        ref: r,
        onCloseAutoFocus: ue(n.onCloseAutoFocus, h => {
            d.current || c.triggerRef.current?.focus(),
            d.current = !1,
            h.preventDefault()
        }
        ),
        onInteractOutside: ue(n.onInteractOutside, h => {
            const g = h.detail.originalEvent
              , p = g.button === 0 && g.ctrlKey === !0
              , b = g.button === 2 || p;
            (!c.modal || b) && (d.current = !0)
        }
        ),
        style: {
            ...n.style,
            "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
            "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
            "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
            "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
            "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
        }
    })
}
);
Bb.displayName = Lb;
var mR = "DropdownMenuGroup"
  , hR = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(W2, {
        ...c,
        ...i,
        ref: r
    })
}
);
hR.displayName = mR;
var pR = "DropdownMenuLabel"
  , Ub = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(J2, {
        ...c,
        ...i,
        ref: r
    })
}
);
Ub.displayName = pR;
var gR = "DropdownMenuItem"
  , Hb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(eR, {
        ...c,
        ...i,
        ref: r
    })
}
);
Hb.displayName = gR;
var vR = "DropdownMenuCheckboxItem"
  , Pb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(tR, {
        ...c,
        ...i,
        ref: r
    })
}
);
Pb.displayName = vR;
var yR = "DropdownMenuRadioGroup"
  , bR = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(nR, {
        ...c,
        ...i,
        ref: r
    })
}
);
bR.displayName = yR;
var xR = "DropdownMenuRadioItem"
  , Vb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(aR, {
        ...c,
        ...i,
        ref: r
    })
}
);
Vb.displayName = xR;
var wR = "DropdownMenuItemIndicator"
  , Gb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(rR, {
        ...c,
        ...i,
        ref: r
    })
}
);
Gb.displayName = wR;
var SR = "DropdownMenuSeparator"
  , Yb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(oR, {
        ...c,
        ...i,
        ref: r
    })
}
);
Yb.displayName = SR;
var ER = "DropdownMenuArrow"
  , CR = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(lR, {
        ...c,
        ...i,
        ref: r
    })
}
);
CR.displayName = ER;
var TR = n => {
    const {__scopeDropdownMenu: r, children: l, open: i, onOpenChange: c, defaultOpen: u} = n
      , d = Ct(r)
      , [h,g] = mo({
        prop: i,
        defaultProp: u ?? !1,
        onChange: c,
        caller: "DropdownMenuSub"
    });
    return y.jsx(iR, {
        ...d,
        open: h,
        onOpenChange: g,
        children: l
    })
}
  , RR = "DropdownMenuSubTrigger"
  , qb = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(sR, {
        ...c,
        ...i,
        ref: r
    })
}
);
qb.displayName = RR;
var AR = "DropdownMenuSubContent"
  , Ib = m.forwardRef( (n, r) => {
    const {__scopeDropdownMenu: l, ...i} = n
      , c = Ct(l);
    return y.jsx(cR, {
        ...c,
        ...i,
        ref: r,
        style: {
            ...n.style,
            "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
            "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
            "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
            "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
            "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
        }
    })
}
);
Ib.displayName = AR;
var MR = Db
  , NR = kb
  , Xb = zb
  , $b = Bb
  , Kb = Ub
  , Qb = Hb
  , Zb = Pb
  , Fb = Vb
  , Wb = Gb
  , Jb = Yb
  , _R = TR
  , e0 = qb
  , t0 = Ib;
function $f(n, [r,l]) {
    return Math.min(l, Math.max(r, n))
}
var OR = [" ", "Enter", "ArrowUp", "ArrowDown"]
  , DR = [" ", "Enter"]
  , ur = "Select"
  , [Zs,Fs,jR] = pd(ur)
  , [Co,U_] = aa(ur, [jR, Eo])
  , Ws = Eo()
  , [kR,La] = Co(ur)
  , [zR,LR] = Co(ur)
  , n0 = n => {
    const {__scopeSelect: r, children: l, open: i, defaultOpen: c, onOpenChange: u, value: d, defaultValue: h, onValueChange: g, dir: p, name: b, autoComplete: v, disabled: w, required: C, form: R} = n
      , E = Ws(r)
      , [A,T] = m.useState(null)
      , [D,N] = m.useState(null)
      , [j,U] = m.useState(!1)
      , K = Gs(p)
      , [Y,V] = mo({
        prop: i,
        defaultProp: c ?? !1,
        onChange: u,
        caller: ur
    })
      , [$,ee] = mo({
        prop: d,
        defaultProp: h,
        onChange: g,
        caller: ur
    })
      , se = m.useRef(null)
      , W = A ? R || !!A.closest("form") : !0
      , [te,le] = m.useState(new Set)
      , de = Array.from(te).map(_ => _.props.value).join(";");
    return y.jsx(Md, {
        ...E,
        children: y.jsxs(kR, {
            required: C,
            scope: r,
            trigger: A,
            onTriggerChange: T,
            valueNode: D,
            onValueNodeChange: N,
            valueNodeHasChildren: j,
            onValueNodeHasChildrenChange: U,
            contentId: Da(),
            value: $,
            onValueChange: ee,
            open: Y,
            onOpenChange: V,
            dir: K,
            triggerPointerDownPosRef: se,
            disabled: w,
            children: [y.jsx(Zs.Provider, {
                scope: r,
                children: y.jsx(zR, {
                    scope: n.__scopeSelect,
                    onNativeOptionAdd: m.useCallback(_ => {
                        le(G => new Set(G).add(_))
                    }
                    , []),
                    onNativeOptionRemove: m.useCallback(_ => {
                        le(G => {
                            const B = new Set(G);
                            return B.delete(_),
                            B
                        }
                        )
                    }
                    , []),
                    children: l
                })
            }), W ? y.jsxs(C0, {
                "aria-hidden": !0,
                required: C,
                tabIndex: -1,
                name: b,
                autoComplete: v,
                value: $,
                onChange: _ => ee(_.target.value),
                disabled: w,
                form: R,
                children: [$ === void 0 ? y.jsx("option", {
                    value: ""
                }) : null, Array.from(te)]
            }, de) : null]
        })
    })
}
;
n0.displayName = ur;
var a0 = "SelectTrigger"
  , r0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, disabled: i=!1, ...c} = n
      , u = Ws(l)
      , d = La(a0, l)
      , h = d.disabled || i
      , g = Oe(r, d.onTriggerChange)
      , p = Fs(l)
      , b = m.useRef("touch")
      , [v,w,C] = R0(E => {
        const A = p().filter(N => !N.disabled)
          , T = A.find(N => N.value === d.value)
          , D = A0(A, E, T);
        D !== void 0 && d.onValueChange(D.value)
    }
    )
      , R = E => {
        h || (d.onOpenChange(!0),
        C()),
        E && (d.triggerPointerDownPosRef.current = {
            x: Math.round(E.pageX),
            y: Math.round(E.pageY)
        })
    }
    ;
    return y.jsx(Nd, {
        asChild: !0,
        ...u,
        children: y.jsx(Me.button, {
            type: "button",
            role: "combobox",
            "aria-controls": d.contentId,
            "aria-expanded": d.open,
            "aria-required": d.required,
            "aria-autocomplete": "none",
            dir: d.dir,
            "data-state": d.open ? "open" : "closed",
            disabled: h,
            "data-disabled": h ? "" : void 0,
            "data-placeholder": T0(d.value) ? "" : void 0,
            ...c,
            ref: g,
            onClick: ue(c.onClick, E => {
                E.currentTarget.focus(),
                b.current !== "mouse" && R(E)
            }
            ),
            onPointerDown: ue(c.onPointerDown, E => {
                b.current = E.pointerType;
                const A = E.target;
                A.hasPointerCapture(E.pointerId) && A.releasePointerCapture(E.pointerId),
                E.button === 0 && E.ctrlKey === !1 && E.pointerType === "mouse" && (R(E),
                E.preventDefault())
            }
            ),
            onKeyDown: ue(c.onKeyDown, E => {
                const A = v.current !== "";
                !(E.ctrlKey || E.altKey || E.metaKey) && E.key.length === 1 && w(E.key),
                !(A && E.key === " ") && OR.includes(E.key) && (R(),
                E.preventDefault())
            }
            )
        })
    })
}
);
r0.displayName = a0;
var o0 = "SelectValue"
  , l0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, className: i, style: c, children: u, placeholder: d="", ...h} = n
      , g = La(o0, l)
      , {onValueNodeHasChildrenChange: p} = g
      , b = u !== void 0
      , v = Oe(r, g.onValueNodeChange);
    return st( () => {
        p(b)
    }
    , [p, b]),
    y.jsx(Me.span, {
        ...h,
        ref: v,
        style: {
            pointerEvents: "none"
        },
        children: T0(g.value) ? y.jsx(y.Fragment, {
            children: d
        }) : u
    })
}
);
l0.displayName = o0;
var BR = "SelectIcon"
  , i0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, children: i, ...c} = n;
    return y.jsx(Me.span, {
        "aria-hidden": !0,
        ...c,
        ref: r,
        children: i || "▼"
    })
}
);
i0.displayName = BR;
var UR = "SelectPortal"
  , s0 = n => y.jsx(vd, {
    asChild: !0,
    ...n
});
s0.displayName = UR;
var fr = "SelectContent"
  , c0 = m.forwardRef( (n, r) => {
    const l = La(fr, n.__scopeSelect)
      , [i,c] = m.useState();
    if (st( () => {
        c(new DocumentFragment)
    }
    , []),
    !l.open) {
        const u = i;
        return u ? Vl.createPortal(y.jsx(u0, {
            scope: n.__scopeSelect,
            children: y.jsx(Zs.Slot, {
                scope: n.__scopeSelect,
                children: y.jsx("div", {
                    children: n.children
                })
            })
        }), u) : null
    }
    return y.jsx(f0, {
        ...n,
        ref: r
    })
}
);
c0.displayName = fr;
var mn = 10
  , [u0,Ba] = Co(fr)
  , HR = "SelectContentImpl"
  , PR = fo("SelectContent.RemoveScroll")
  , f0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, position: i="item-aligned", onCloseAutoFocus: c, onEscapeKeyDown: u, onPointerDownOutside: d, side: h, sideOffset: g, align: p, alignOffset: b, arrowPadding: v, collisionBoundary: w, collisionPadding: C, sticky: R, hideWhenDetached: E, avoidCollisions: A, ...T} = n
      , D = La(fr, l)
      , [N,j] = m.useState(null)
      , [U,K] = m.useState(null)
      , Y = Oe(r, Z => j(Z))
      , [V,$] = m.useState(null)
      , [ee,se] = m.useState(null)
      , W = Fs(l)
      , [te,le] = m.useState(!1)
      , de = m.useRef(!1);
    m.useEffect( () => {
        if (N)
            return _y(N)
    }
    , [N]),
    wy();
    const _ = m.useCallback(Z => {
        const [ce,...De] = W().map(Ne => Ne.ref.current)
          , [xe] = De.slice(-1)
          , Ce = document.activeElement;
        for (const Ne of Z)
            if (Ne === Ce || (Ne?.scrollIntoView({
                block: "nearest"
            }),
            Ne === ce && U && (U.scrollTop = 0),
            Ne === xe && U && (U.scrollTop = U.scrollHeight),
            Ne?.focus(),
            document.activeElement !== Ce))
                return
    }
    , [W, U])
      , G = m.useCallback( () => _([V, N]), [_, V, N]);
    m.useEffect( () => {
        te && G()
    }
    , [te, G]);
    const {onOpenChange: B, triggerPointerDownPosRef: Q} = D;
    m.useEffect( () => {
        if (N) {
            let Z = {
                x: 0,
                y: 0
            };
            const ce = xe => {
                Z = {
                    x: Math.abs(Math.round(xe.pageX) - (Q.current?.x ?? 0)),
                    y: Math.abs(Math.round(xe.pageY) - (Q.current?.y ?? 0))
                }
            }
              , De = xe => {
                Z.x <= 10 && Z.y <= 10 ? xe.preventDefault() : N.contains(xe.target) || B(!1),
                document.removeEventListener("pointermove", ce),
                Q.current = null
            }
            ;
            return Q.current !== null && (document.addEventListener("pointermove", ce),
            document.addEventListener("pointerup", De, {
                capture: !0,
                once: !0
            })),
            () => {
                document.removeEventListener("pointermove", ce),
                document.removeEventListener("pointerup", De, {
                    capture: !0
                })
            }
        }
    }
    , [N, B, Q]),
    m.useEffect( () => {
        const Z = () => B(!1);
        return window.addEventListener("blur", Z),
        window.addEventListener("resize", Z),
        () => {
            window.removeEventListener("blur", Z),
            window.removeEventListener("resize", Z)
        }
    }
    , [B]);
    const [ie,be] = R0(Z => {
        const ce = W().filter(Ce => !Ce.disabled)
          , De = ce.find(Ce => Ce.ref.current === document.activeElement)
          , xe = A0(ce, Z, De);
        xe && setTimeout( () => xe.ref.current.focus())
    }
    )
      , ve = m.useCallback( (Z, ce, De) => {
        const xe = !de.current && !De;
        (D.value !== void 0 && D.value === ce || xe) && ($(Z),
        xe && (de.current = !0))
    }
    , [D.value])
      , J = m.useCallback( () => N?.focus(), [N])
      , ne = m.useCallback( (Z, ce, De) => {
        const xe = !de.current && !De;
        (D.value !== void 0 && D.value === ce || xe) && se(Z)
    }
    , [D.value])
      , pe = i === "popper" ? Kf : d0
      , Ee = pe === Kf ? {
        side: h,
        sideOffset: g,
        align: p,
        alignOffset: b,
        arrowPadding: v,
        collisionBoundary: w,
        collisionPadding: C,
        sticky: R,
        hideWhenDetached: E,
        avoidCollisions: A
    } : {};
    return y.jsx(u0, {
        scope: l,
        content: N,
        viewport: U,
        onViewportChange: K,
        itemRefCallback: ve,
        selectedItem: V,
        onItemLeave: J,
        itemTextRefCallback: ne,
        focusSelectedItem: G,
        selectedItemText: ee,
        position: i,
        isPositioned: te,
        searchRef: ie,
        children: y.jsx(yd, {
            as: PR,
            allowPinchZoom: !0,
            children: y.jsx(gd, {
                asChild: !0,
                trapped: D.open,
                onMountAutoFocus: Z => {
                    Z.preventDefault()
                }
                ,
                onUnmountAutoFocus: ue(c, Z => {
                    D.trigger?.focus({
                        preventScroll: !0
                    }),
                    Z.preventDefault()
                }
                ),
                children: y.jsx(Ys, {
                    asChild: !0,
                    disableOutsidePointerEvents: !0,
                    onEscapeKeyDown: u,
                    onPointerDownOutside: d,
                    onFocusOutside: Z => Z.preventDefault(),
                    onDismiss: () => D.onOpenChange(!1),
                    children: y.jsx(pe, {
                        role: "listbox",
                        id: D.contentId,
                        "data-state": D.open ? "open" : "closed",
                        dir: D.dir,
                        onContextMenu: Z => Z.preventDefault(),
                        ...T,
                        ...Ee,
                        onPlaced: () => le(!0),
                        ref: Y,
                        style: {
                            display: "flex",
                            flexDirection: "column",
                            outline: "none",
                            ...T.style
                        },
                        onKeyDown: ue(T.onKeyDown, Z => {
                            const ce = Z.ctrlKey || Z.altKey || Z.metaKey;
                            if (Z.key === "Tab" && Z.preventDefault(),
                            !ce && Z.key.length === 1 && be(Z.key),
                            ["ArrowUp", "ArrowDown", "Home", "End"].includes(Z.key)) {
                                let xe = W().filter(Ce => !Ce.disabled).map(Ce => Ce.ref.current);
                                if (["ArrowUp", "End"].includes(Z.key) && (xe = xe.slice().reverse()),
                                ["ArrowUp", "ArrowDown"].includes(Z.key)) {
                                    const Ce = Z.target
                                      , Ne = xe.indexOf(Ce);
                                    xe = xe.slice(Ne + 1)
                                }
                                setTimeout( () => _(xe)),
                                Z.preventDefault()
                            }
                        }
                        )
                    })
                })
            })
        })
    })
}
);
f0.displayName = HR;
var VR = "SelectItemAlignedPosition"
  , d0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, onPlaced: i, ...c} = n
      , u = La(fr, l)
      , d = Ba(fr, l)
      , [h,g] = m.useState(null)
      , [p,b] = m.useState(null)
      , v = Oe(r, Y => b(Y))
      , w = Fs(l)
      , C = m.useRef(!1)
      , R = m.useRef(!0)
      , {viewport: E, selectedItem: A, selectedItemText: T, focusSelectedItem: D} = d
      , N = m.useCallback( () => {
        if (u.trigger && u.valueNode && h && p && E && A && T) {
            const Y = u.trigger.getBoundingClientRect()
              , V = p.getBoundingClientRect()
              , $ = u.valueNode.getBoundingClientRect()
              , ee = T.getBoundingClientRect();
            if (u.dir !== "rtl") {
                const Ce = ee.left - V.left
                  , Ne = $.left - Ce
                  , ut = Y.left - Ne
                  , Tt = Y.width + ut
                  , Ha = Math.max(Tt, V.width)
                  , ra = window.innerWidth - mn
                  , et = $f(Ne, [mn, Math.max(mn, ra - Ha)]);
                h.style.minWidth = Tt + "px",
                h.style.left = et + "px"
            } else {
                const Ce = V.right - ee.right
                  , Ne = window.innerWidth - $.right - Ce
                  , ut = window.innerWidth - Y.right - Ne
                  , Tt = Y.width + ut
                  , Ha = Math.max(Tt, V.width)
                  , ra = window.innerWidth - mn
                  , et = $f(Ne, [mn, Math.max(mn, ra - Ha)]);
                h.style.minWidth = Tt + "px",
                h.style.right = et + "px"
            }
            const se = w()
              , W = window.innerHeight - mn * 2
              , te = E.scrollHeight
              , le = window.getComputedStyle(p)
              , de = parseInt(le.borderTopWidth, 10)
              , _ = parseInt(le.paddingTop, 10)
              , G = parseInt(le.borderBottomWidth, 10)
              , B = parseInt(le.paddingBottom, 10)
              , Q = de + _ + te + B + G
              , ie = Math.min(A.offsetHeight * 5, Q)
              , be = window.getComputedStyle(E)
              , ve = parseInt(be.paddingTop, 10)
              , J = parseInt(be.paddingBottom, 10)
              , ne = Y.top + Y.height / 2 - mn
              , pe = W - ne
              , Ee = A.offsetHeight / 2
              , Z = A.offsetTop + Ee
              , ce = de + _ + Z
              , De = Q - ce;
            if (ce <= ne) {
                const Ce = se.length > 0 && A === se[se.length - 1].ref.current;
                h.style.bottom = "0px";
                const Ne = p.clientHeight - E.offsetTop - E.offsetHeight
                  , ut = Math.max(pe, Ee + (Ce ? J : 0) + Ne + G)
                  , Tt = ce + ut;
                h.style.height = Tt + "px"
            } else {
                const Ce = se.length > 0 && A === se[0].ref.current;
                h.style.top = "0px";
                const ut = Math.max(ne, de + E.offsetTop + (Ce ? ve : 0) + Ee) + De;
                h.style.height = ut + "px",
                E.scrollTop = ce - ne + E.offsetTop
            }
            h.style.margin = `${mn}px 0`,
            h.style.minHeight = ie + "px",
            h.style.maxHeight = W + "px",
            i?.(),
            requestAnimationFrame( () => C.current = !0)
        }
    }
    , [w, u.trigger, u.valueNode, h, p, E, A, T, u.dir, i]);
    st( () => N(), [N]);
    const [j,U] = m.useState();
    st( () => {
        p && U(window.getComputedStyle(p).zIndex)
    }
    , [p]);
    const K = m.useCallback(Y => {
        Y && R.current === !0 && (N(),
        D?.(),
        R.current = !1)
    }
    , [N, D]);
    return y.jsx(YR, {
        scope: l,
        contentWrapper: h,
        shouldExpandOnScrollRef: C,
        onScrollButtonChange: K,
        children: y.jsx("div", {
            ref: g,
            style: {
                display: "flex",
                flexDirection: "column",
                position: "fixed",
                zIndex: j
            },
            children: y.jsx(Me.div, {
                ...c,
                ref: v,
                style: {
                    boxSizing: "border-box",
                    maxHeight: "100%",
                    ...c.style
                }
            })
        })
    })
}
);
d0.displayName = VR;
var GR = "SelectPopperPosition"
  , Kf = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, align: i="start", collisionPadding: c=mn, ...u} = n
      , d = Ws(l);
    return y.jsx(_d, {
        ...d,
        ...u,
        ref: r,
        align: i,
        collisionPadding: c,
        style: {
            boxSizing: "border-box",
            ...u.style,
            "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
            "--radix-select-content-available-width": "var(--radix-popper-available-width)",
            "--radix-select-content-available-height": "var(--radix-popper-available-height)",
            "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
            "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
        }
    })
}
);
Kf.displayName = GR;
var [YR,Pd] = Co(fr, {})
  , Qf = "SelectViewport"
  , m0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, nonce: i, ...c} = n
      , u = Ba(Qf, l)
      , d = Pd(Qf, l)
      , h = Oe(r, u.onViewportChange)
      , g = m.useRef(0);
    return y.jsxs(y.Fragment, {
        children: [y.jsx("style", {
            dangerouslySetInnerHTML: {
                __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
            },
            nonce: i
        }), y.jsx(Zs.Slot, {
            scope: l,
            children: y.jsx(Me.div, {
                "data-radix-select-viewport": "",
                role: "presentation",
                ...c,
                ref: h,
                style: {
                    position: "relative",
                    flex: 1,
                    overflow: "hidden auto",
                    ...c.style
                },
                onScroll: ue(c.onScroll, p => {
                    const b = p.currentTarget
                      , {contentWrapper: v, shouldExpandOnScrollRef: w} = d;
                    if (w?.current && v) {
                        const C = Math.abs(g.current - b.scrollTop);
                        if (C > 0) {
                            const R = window.innerHeight - mn * 2
                              , E = parseFloat(v.style.minHeight)
                              , A = parseFloat(v.style.height)
                              , T = Math.max(E, A);
                            if (T < R) {
                                const D = T + C
                                  , N = Math.min(R, D)
                                  , j = D - N;
                                v.style.height = N + "px",
                                v.style.bottom === "0px" && (b.scrollTop = j > 0 ? j : 0,
                                v.style.justifyContent = "flex-end")
                            }
                        }
                    }
                    g.current = b.scrollTop
                }
                )
            })
        })]
    })
}
);
m0.displayName = Qf;
var h0 = "SelectGroup"
  , [qR,IR] = Co(h0)
  , XR = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, ...i} = n
      , c = Da();
    return y.jsx(qR, {
        scope: l,
        id: c,
        children: y.jsx(Me.div, {
            role: "group",
            "aria-labelledby": c,
            ...i,
            ref: r
        })
    })
}
);
XR.displayName = h0;
var p0 = "SelectLabel"
  , g0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, ...i} = n
      , c = IR(p0, l);
    return y.jsx(Me.div, {
        id: c.id,
        ...i,
        ref: r
    })
}
);
g0.displayName = p0;
var zs = "SelectItem"
  , [$R,v0] = Co(zs)
  , y0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, value: i, disabled: c=!1, textValue: u, ...d} = n
      , h = La(zs, l)
      , g = Ba(zs, l)
      , p = h.value === i
      , [b,v] = m.useState(u ?? "")
      , [w,C] = m.useState(!1)
      , R = Oe(r, D => g.itemRefCallback?.(D, i, c))
      , E = Da()
      , A = m.useRef("touch")
      , T = () => {
        c || (h.onValueChange(i),
        h.onOpenChange(!1))
    }
    ;
    if (i === "")
        throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
    return y.jsx($R, {
        scope: l,
        value: i,
        disabled: c,
        textId: E,
        isSelected: p,
        onItemTextChange: m.useCallback(D => {
            v(N => N || (D?.textContent ?? "").trim())
        }
        , []),
        children: y.jsx(Zs.ItemSlot, {
            scope: l,
            value: i,
            disabled: c,
            textValue: b,
            children: y.jsx(Me.div, {
                role: "option",
                "aria-labelledby": E,
                "data-highlighted": w ? "" : void 0,
                "aria-selected": p && w,
                "data-state": p ? "checked" : "unchecked",
                "aria-disabled": c || void 0,
                "data-disabled": c ? "" : void 0,
                tabIndex: c ? void 0 : -1,
                ...d,
                ref: R,
                onFocus: ue(d.onFocus, () => C(!0)),
                onBlur: ue(d.onBlur, () => C(!1)),
                onClick: ue(d.onClick, () => {
                    A.current !== "mouse" && T()
                }
                ),
                onPointerUp: ue(d.onPointerUp, () => {
                    A.current === "mouse" && T()
                }
                ),
                onPointerDown: ue(d.onPointerDown, D => {
                    A.current = D.pointerType
                }
                ),
                onPointerMove: ue(d.onPointerMove, D => {
                    A.current = D.pointerType,
                    c ? g.onItemLeave?.() : A.current === "mouse" && D.currentTarget.focus({
                        preventScroll: !0
                    })
                }
                ),
                onPointerLeave: ue(d.onPointerLeave, D => {
                    D.currentTarget === document.activeElement && g.onItemLeave?.()
                }
                ),
                onKeyDown: ue(d.onKeyDown, D => {
                    g.searchRef?.current !== "" && D.key === " " || (DR.includes(D.key) && T(),
                    D.key === " " && D.preventDefault())
                }
                )
            })
        })
    })
}
);
y0.displayName = zs;
var Nl = "SelectItemText"
  , b0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, className: i, style: c, ...u} = n
      , d = La(Nl, l)
      , h = Ba(Nl, l)
      , g = v0(Nl, l)
      , p = LR(Nl, l)
      , [b,v] = m.useState(null)
      , w = Oe(r, T => v(T), g.onItemTextChange, T => h.itemTextRefCallback?.(T, g.value, g.disabled))
      , C = b?.textContent
      , R = m.useMemo( () => y.jsx("option", {
        value: g.value,
        disabled: g.disabled,
        children: C
    }, g.value), [g.disabled, g.value, C])
      , {onNativeOptionAdd: E, onNativeOptionRemove: A} = p;
    return st( () => (E(R),
    () => A(R)), [E, A, R]),
    y.jsxs(y.Fragment, {
        children: [y.jsx(Me.span, {
            id: g.textId,
            ...u,
            ref: w
        }), g.isSelected && d.valueNode && !d.valueNodeHasChildren ? Vl.createPortal(u.children, d.valueNode) : null]
    })
}
);
b0.displayName = Nl;
var x0 = "SelectItemIndicator"
  , w0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, ...i} = n;
    return v0(x0, l).isSelected ? y.jsx(Me.span, {
        "aria-hidden": !0,
        ...i,
        ref: r
    }) : null
}
);
w0.displayName = x0;
var Zf = "SelectScrollUpButton"
  , KR = m.forwardRef( (n, r) => {
    const l = Ba(Zf, n.__scopeSelect)
      , i = Pd(Zf, n.__scopeSelect)
      , [c,u] = m.useState(!1)
      , d = Oe(r, i.onScrollButtonChange);
    return st( () => {
        if (l.viewport && l.isPositioned) {
            let h = function() {
                const p = g.scrollTop > 0;
                u(p)
            };
            const g = l.viewport;
            return h(),
            g.addEventListener("scroll", h),
            () => g.removeEventListener("scroll", h)
        }
    }
    , [l.viewport, l.isPositioned]),
    c ? y.jsx(S0, {
        ...n,
        ref: d,
        onAutoScroll: () => {
            const {viewport: h, selectedItem: g} = l;
            h && g && (h.scrollTop = h.scrollTop - g.offsetHeight)
        }
    }) : null
}
);
KR.displayName = Zf;
var Ff = "SelectScrollDownButton"
  , QR = m.forwardRef( (n, r) => {
    const l = Ba(Ff, n.__scopeSelect)
      , i = Pd(Ff, n.__scopeSelect)
      , [c,u] = m.useState(!1)
      , d = Oe(r, i.onScrollButtonChange);
    return st( () => {
        if (l.viewport && l.isPositioned) {
            let h = function() {
                const p = g.scrollHeight - g.clientHeight
                  , b = Math.ceil(g.scrollTop) < p;
                u(b)
            };
            const g = l.viewport;
            return h(),
            g.addEventListener("scroll", h),
            () => g.removeEventListener("scroll", h)
        }
    }
    , [l.viewport, l.isPositioned]),
    c ? y.jsx(S0, {
        ...n,
        ref: d,
        onAutoScroll: () => {
            const {viewport: h, selectedItem: g} = l;
            h && g && (h.scrollTop = h.scrollTop + g.offsetHeight)
        }
    }) : null
}
);
QR.displayName = Ff;
var S0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, onAutoScroll: i, ...c} = n
      , u = Ba("SelectScrollButton", l)
      , d = m.useRef(null)
      , h = Fs(l)
      , g = m.useCallback( () => {
        d.current !== null && (window.clearInterval(d.current),
        d.current = null)
    }
    , []);
    return m.useEffect( () => () => g(), [g]),
    st( () => {
        h().find(b => b.ref.current === document.activeElement)?.ref.current?.scrollIntoView({
            block: "nearest"
        })
    }
    , [h]),
    y.jsx(Me.div, {
        "aria-hidden": !0,
        ...c,
        ref: r,
        style: {
            flexShrink: 0,
            ...c.style
        },
        onPointerDown: ue(c.onPointerDown, () => {
            d.current === null && (d.current = window.setInterval(i, 50))
        }
        ),
        onPointerMove: ue(c.onPointerMove, () => {
            u.onItemLeave?.(),
            d.current === null && (d.current = window.setInterval(i, 50))
        }
        ),
        onPointerLeave: ue(c.onPointerLeave, () => {
            g()
        }
        )
    })
}
)
  , ZR = "SelectSeparator"
  , E0 = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, ...i} = n;
    return y.jsx(Me.div, {
        "aria-hidden": !0,
        ...i,
        ref: r
    })
}
);
E0.displayName = ZR;
var Wf = "SelectArrow"
  , FR = m.forwardRef( (n, r) => {
    const {__scopeSelect: l, ...i} = n
      , c = Ws(l)
      , u = La(Wf, l)
      , d = Ba(Wf, l);
    return u.open && d.position === "popper" ? y.jsx(Od, {
        ...c,
        ...i,
        ref: r
    }) : null
}
);
FR.displayName = Wf;
var WR = "SelectBubbleInput"
  , C0 = m.forwardRef( ({__scopeSelect: n, value: r, ...l}, i) => {
    const c = m.useRef(null)
      , u = Oe(i, c)
      , d = Oy(r);
    return m.useEffect( () => {
        const h = c.current;
        if (!h)
            return;
        const g = window.HTMLSelectElement.prototype
          , b = Object.getOwnPropertyDescriptor(g, "value").set;
        if (d !== r && b) {
            const v = new Event("change",{
                bubbles: !0
            });
            b.call(h, r),
            h.dispatchEvent(v)
        }
    }
    , [d, r]),
    y.jsx(Me.select, {
        ...l,
        style: {
            ...py,
            ...l.style
        },
        ref: u,
        defaultValue: r
    })
}
);
C0.displayName = WR;
function T0(n) {
    return n === "" || n === void 0
}
function R0(n) {
    const r = vt(n)
      , l = m.useRef("")
      , i = m.useRef(0)
      , c = m.useCallback(d => {
        const h = l.current + d;
        r(h),
        function g(p) {
            l.current = p,
            window.clearTimeout(i.current),
            p !== "" && (i.current = window.setTimeout( () => g(""), 1e3))
        }(h)
    }
    , [r])
      , u = m.useCallback( () => {
        l.current = "",
        window.clearTimeout(i.current)
    }
    , []);
    return m.useEffect( () => () => window.clearTimeout(i.current), []),
    [l, c, u]
}
function A0(n, r, l) {
    const c = r.length > 1 && Array.from(r).every(p => p === r[0]) ? r[0] : r
      , u = l ? n.indexOf(l) : -1;
    let d = JR(n, Math.max(u, 0));
    c.length === 1 && (d = d.filter(p => p !== l));
    const g = d.find(p => p.textValue.toLowerCase().startsWith(c.toLowerCase()));
    return g !== l ? g : void 0
}
function JR(n, r) {
    return n.map( (l, i) => n[(r + i) % n.length])
}
var eA = n0
  , M0 = r0
  , tA = l0
  , nA = i0
  , aA = s0
  , N0 = c0
  , rA = m0
  , _0 = g0
  , O0 = y0
  , oA = b0
  , lA = w0
  , D0 = E0
  , Js = "Switch"
  , [iA,H_] = aa(Js)
  , [sA,cA] = iA(Js)
  , j0 = m.forwardRef( (n, r) => {
    const {__scopeSwitch: l, name: i, checked: c, defaultChecked: u, required: d, disabled: h, value: g="on", onCheckedChange: p, form: b, ...v} = n
      , [w,C] = m.useState(null)
      , R = Oe(r, N => C(N))
      , E = m.useRef(!1)
      , A = w ? b || !!w.closest("form") : !0
      , [T,D] = mo({
        prop: c,
        defaultProp: u ?? !1,
        onChange: p,
        caller: Js
    });
    return y.jsxs(sA, {
        scope: l,
        checked: T,
        disabled: h,
        children: [y.jsx(Me.button, {
            type: "button",
            role: "switch",
            "aria-checked": T,
            "aria-required": d,
            "data-state": B0(T),
            "data-disabled": h ? "" : void 0,
            disabled: h,
            value: g,
            ...v,
            ref: R,
            onClick: ue(n.onClick, N => {
                D(j => !j),
                A && (E.current = N.isPropagationStopped(),
                E.current || N.stopPropagation())
            }
            )
        }), A && y.jsx(L0, {
            control: w,
            bubbles: !E.current,
            name: i,
            value: g,
            checked: T,
            required: d,
            disabled: h,
            form: b,
            style: {
                transform: "translateX(-100%)"
            }
        })]
    })
}
);
j0.displayName = Js;
var k0 = "SwitchThumb"
  , z0 = m.forwardRef( (n, r) => {
    const {__scopeSwitch: l, ...i} = n
      , c = cA(k0, l);
    return y.jsx(Me.span, {
        "data-state": B0(c.checked),
        "data-disabled": c.disabled ? "" : void 0,
        ...i,
        ref: r
    })
}
);
z0.displayName = k0;
var uA = "SwitchBubbleInput"
  , L0 = m.forwardRef( ({__scopeSwitch: n, control: r, checked: l, bubbles: i=!0, ...c}, u) => {
    const d = m.useRef(null)
      , h = Oe(d, u)
      , g = Oy(l)
      , p = Dy(r);
    return m.useEffect( () => {
        const b = d.current;
        if (!b)
            return;
        const v = window.HTMLInputElement.prototype
          , C = Object.getOwnPropertyDescriptor(v, "checked").set;
        if (g !== l && C) {
            const R = new Event("click",{
                bubbles: i
            });
            C.call(b, l),
            b.dispatchEvent(R)
        }
    }
    , [g, l, i]),
    y.jsx("input", {
        type: "checkbox",
        "aria-hidden": !0,
        defaultChecked: l,
        ...c,
        tabIndex: -1,
        ref: h,
        style: {
            ...c.style,
            ...p,
            position: "absolute",
            pointerEvents: "none",
            opacity: 0,
            margin: 0
        }
    })
}
);
L0.displayName = uA;
function B0(n) {
    return n ? "checked" : "unchecked"
}
var U0 = j0
  , fA = z0
  , [ec,P_] = aa("Tooltip", [Eo])
  , Vd = Eo()
  , H0 = "TooltipProvider"
  , dA = 700
  , xv = "tooltip.open"
  , [mA,P0] = ec(H0)
  , V0 = n => {
    const {__scopeTooltip: r, delayDuration: l=dA, skipDelayDuration: i=300, disableHoverableContent: c=!1, children: u} = n
      , d = m.useRef(!0)
      , h = m.useRef(!1)
      , g = m.useRef(0);
    return m.useEffect( () => {
        const p = g.current;
        return () => window.clearTimeout(p)
    }
    , []),
    y.jsx(mA, {
        scope: r,
        isOpenDelayedRef: d,
        delayDuration: l,
        onOpen: m.useCallback( () => {
            window.clearTimeout(g.current),
            d.current = !1
        }
        , []),
        onClose: m.useCallback( () => {
            window.clearTimeout(g.current),
            g.current = window.setTimeout( () => d.current = !0, i)
        }
        , [i]),
        isPointerInTransitRef: h,
        onPointerInTransitChange: m.useCallback(p => {
            h.current = p
        }
        , []),
        disableHoverableContent: c,
        children: u
    })
}
;
V0.displayName = H0;
var G0 = "Tooltip"
  , [V_,tc] = ec(G0)
  , Jf = "TooltipTrigger"
  , hA = m.forwardRef( (n, r) => {
    const {__scopeTooltip: l, ...i} = n
      , c = tc(Jf, l)
      , u = P0(Jf, l)
      , d = Vd(l)
      , h = m.useRef(null)
      , g = Oe(r, h, c.onTriggerChange)
      , p = m.useRef(!1)
      , b = m.useRef(!1)
      , v = m.useCallback( () => p.current = !1, []);
    return m.useEffect( () => () => document.removeEventListener("pointerup", v), [v]),
    y.jsx(Nd, {
        asChild: !0,
        ...d,
        children: y.jsx(Me.button, {
            "aria-describedby": c.open ? c.contentId : void 0,
            "data-state": c.stateAttribute,
            ...i,
            ref: g,
            onPointerMove: ue(n.onPointerMove, w => {
                w.pointerType !== "touch" && !b.current && !u.isPointerInTransitRef.current && (c.onTriggerEnter(),
                b.current = !0)
            }
            ),
            onPointerLeave: ue(n.onPointerLeave, () => {
                c.onTriggerLeave(),
                b.current = !1
            }
            ),
            onPointerDown: ue(n.onPointerDown, () => {
                c.open && c.onClose(),
                p.current = !0,
                document.addEventListener("pointerup", v, {
                    once: !0
                })
            }
            ),
            onFocus: ue(n.onFocus, () => {
                p.current || c.onOpen()
            }
            ),
            onBlur: ue(n.onBlur, c.onClose),
            onClick: ue(n.onClick, c.onClose)
        })
    })
}
);
hA.displayName = Jf;
var pA = "TooltipPortal"
  , [G_,gA] = ec(pA, {
    forceMount: void 0
})
  , po = "TooltipContent"
  , vA = m.forwardRef( (n, r) => {
    const l = gA(po, n.__scopeTooltip)
      , {forceMount: i=l.forceMount, side: c="top", ...u} = n
      , d = tc(po, n.__scopeTooltip);
    return y.jsx(xo, {
        present: i || d.open,
        children: d.disableHoverableContent ? y.jsx(Y0, {
            side: c,
            ...u,
            ref: r
        }) : y.jsx(yA, {
            side: c,
            ...u,
            ref: r
        })
    })
}
)
  , yA = m.forwardRef( (n, r) => {
    const l = tc(po, n.__scopeTooltip)
      , i = P0(po, n.__scopeTooltip)
      , c = m.useRef(null)
      , u = Oe(r, c)
      , [d,h] = m.useState(null)
      , {trigger: g, onClose: p} = l
      , b = c.current
      , {onPointerInTransitChange: v} = i
      , w = m.useCallback( () => {
        h(null),
        v(!1)
    }
    , [v])
      , C = m.useCallback( (R, E) => {
        const A = R.currentTarget
          , T = {
            x: R.clientX,
            y: R.clientY
        }
          , D = EA(T, A.getBoundingClientRect())
          , N = CA(T, D)
          , j = TA(E.getBoundingClientRect())
          , U = AA([...N, ...j]);
        h(U),
        v(!0)
    }
    , [v]);
    return m.useEffect( () => () => w(), [w]),
    m.useEffect( () => {
        if (g && b) {
            const R = A => C(A, b)
              , E = A => C(A, g);
            return g.addEventListener("pointerleave", R),
            b.addEventListener("pointerleave", E),
            () => {
                g.removeEventListener("pointerleave", R),
                b.removeEventListener("pointerleave", E)
            }
        }
    }
    , [g, b, C, w]),
    m.useEffect( () => {
        if (d) {
            const R = E => {
                const A = E.target
                  , T = {
                    x: E.clientX,
                    y: E.clientY
                }
                  , D = g?.contains(A) || b?.contains(A)
                  , N = !RA(T, d);
                D ? w() : N && (w(),
                p())
            }
            ;
            return document.addEventListener("pointermove", R),
            () => document.removeEventListener("pointermove", R)
        }
    }
    , [g, b, d, p, w]),
    y.jsx(Y0, {
        ...n,
        ref: u
    })
}
)
  , [bA,xA] = ec(G0, {
    isInside: !1
})
  , wA = RE("TooltipContent")
  , Y0 = m.forwardRef( (n, r) => {
    const {__scopeTooltip: l, children: i, "aria-label": c, onEscapeKeyDown: u, onPointerDownOutside: d, ...h} = n
      , g = tc(po, l)
      , p = Vd(l)
      , {onClose: b} = g;
    return m.useEffect( () => (document.addEventListener(xv, b),
    () => document.removeEventListener(xv, b)), [b]),
    m.useEffect( () => {
        if (g.trigger) {
            const v = w => {
                w.target?.contains(g.trigger) && b()
            }
            ;
            return window.addEventListener("scroll", v, {
                capture: !0
            }),
            () => window.removeEventListener("scroll", v, {
                capture: !0
            })
        }
    }
    , [g.trigger, b]),
    y.jsx(Ys, {
        asChild: !0,
        disableOutsidePointerEvents: !1,
        onEscapeKeyDown: u,
        onPointerDownOutside: d,
        onFocusOutside: v => v.preventDefault(),
        onDismiss: b,
        children: y.jsxs(_d, {
            "data-state": g.stateAttribute,
            ...p,
            ...h,
            ref: r,
            style: {
                ...h.style,
                "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
                "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
                "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
                "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
                "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
            },
            children: [y.jsx(wA, {
                children: i
            }), y.jsx(bA, {
                scope: l,
                isInside: !0,
                children: y.jsx(DE, {
                    id: g.contentId,
                    role: "tooltip",
                    children: c || i
                })
            })]
        })
    })
}
);
vA.displayName = po;
var q0 = "TooltipArrow"
  , SA = m.forwardRef( (n, r) => {
    const {__scopeTooltip: l, ...i} = n
      , c = Vd(l);
    return xA(q0, l).isInside ? null : y.jsx(Od, {
        ...c,
        ...i,
        ref: r
    })
}
);
SA.displayName = q0;
function EA(n, r) {
    const l = Math.abs(r.top - n.y)
      , i = Math.abs(r.bottom - n.y)
      , c = Math.abs(r.right - n.x)
      , u = Math.abs(r.left - n.x);
    switch (Math.min(l, i, c, u)) {
    case u:
        return "left";
    case c:
        return "right";
    case l:
        return "top";
    case i:
        return "bottom";
    default:
        throw new Error("unreachable")
    }
}
function CA(n, r, l=5) {
    const i = [];
    switch (r) {
    case "top":
        i.push({
            x: n.x - l,
            y: n.y + l
        }, {
            x: n.x + l,
            y: n.y + l
        });
        break;
    case "bottom":
        i.push({
            x: n.x - l,
            y: n.y - l
        }, {
            x: n.x + l,
            y: n.y - l
        });
        break;
    case "left":
        i.push({
            x: n.x + l,
            y: n.y - l
        }, {
            x: n.x + l,
            y: n.y + l
        });
        break;
    case "right":
        i.push({
            x: n.x - l,
            y: n.y - l
        }, {
            x: n.x - l,
            y: n.y + l
        });
        break
    }
    return i
}
function TA(n) {
    const {top: r, right: l, bottom: i, left: c} = n;
    return [{
        x: c,
        y: r
    }, {
        x: l,
        y: r
    }, {
        x: l,
        y: i
    }, {
        x: c,
        y: i
    }]
}
function RA(n, r) {
    const {x: l, y: i} = n;
    let c = !1;
    for (let u = 0, d = r.length - 1; u < r.length; d = u++) {
        const h = r[u]
          , g = r[d]
          , p = h.x
          , b = h.y
          , v = g.x
          , w = g.y;
        b > i != w > i && l < (v - p) * (i - b) / (w - b) + p && (c = !c)
    }
    return c
}
function AA(n) {
    const r = n.slice();
    return r.sort( (l, i) => l.x < i.x ? -1 : l.x > i.x ? 1 : l.y < i.y ? -1 : l.y > i.y ? 1 : 0),
    MA(r)
}
function MA(n) {
    if (n.length <= 1)
        return n.slice();
    const r = [];
    for (let i = 0; i < n.length; i++) {
        const c = n[i];
        for (; r.length >= 2; ) {
            const u = r[r.length - 1]
              , d = r[r.length - 2];
            if ((u.x - d.x) * (c.y - d.y) >= (u.y - d.y) * (c.x - d.x))
                r.pop();
            else
                break
        }
        r.push(c)
    }
    r.pop();
    const l = [];
    for (let i = n.length - 1; i >= 0; i--) {
        const c = n[i];
        for (; l.length >= 2; ) {
            const u = l[l.length - 1]
              , d = l[l.length - 2];
            if ((u.x - d.x) * (c.y - d.y) >= (u.y - d.y) * (c.x - d.x))
                l.pop();
            else
                break
        }
        l.push(c)
    }
    return l.pop(),
    r.length === 1 && l.length === 1 && r[0].x === l[0].x && r[0].y === l[0].y ? r : r.concat(l)
}
var NA = V0
  , Df = {
    exports: {}
};
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
var wv;
function _A() {
    return wv || (wv = 1,
    function(n) {
        (function() {
            var r = {}.hasOwnProperty;
            function l() {
                for (var u = "", d = 0; d < arguments.length; d++) {
                    var h = arguments[d];
                    h && (u = c(u, i(h)))
                }
                return u
            }
            function i(u) {
                if (typeof u == "string" || typeof u == "number")
                    return u;
                if (typeof u != "object")
                    return "";
                if (Array.isArray(u))
                    return l.apply(null, u);
                if (u.toString !== Object.prototype.toString && !u.toString.toString().includes("[native code]"))
                    return u.toString();
                var d = "";
                for (var h in u)
                    r.call(u, h) && u[h] && (d = c(d, h));
                return d
            }
            function c(u, d) {
                return d ? u ? u + " " + d : u + d : u
            }
            n.exports ? (l.default = l,
            n.exports = l) : window.classNames = l
        }
        )()
    }(Df)),
    Df.exports
}
var OA = _A();
const DA = cd(OA);
function jA(n) {
    switch (n) {
    case "tomato":
    case "red":
    case "ruby":
    case "crimson":
    case "pink":
    case "plum":
    case "purple":
    case "violet":
        return "mauve";
    case "iris":
    case "indigo":
    case "blue":
    case "sky":
    case "cyan":
        return "slate";
    case "teal":
    case "jade":
    case "mint":
    case "green":
        return "sage";
    case "grass":
    case "lime":
        return "olive";
    case "yellow":
    case "amber":
    case "orange":
    case "brown":
    case "gold":
    case "bronze":
        return "sand";
    case "gray":
        return "gray"
    }
}
const qt = {
    hasBackground: {
        default: !0
    },
    appearance: {
        default: "inherit"
    },
    accentColor: {
        default: "indigo"
    },
    grayColor: {
        default: "auto"
    },
    panelBackground: {
        default: "translucent"
    },
    radius: {
        default: "medium"
    },
    scaling: {
        default: "100%"
    }
}
  , io = () => {}
  , ed = m.createContext(void 0)
  , $l = m.forwardRef( (n, r) => m.useContext(ed) === void 0 ? m.createElement(NA, {
    delayDuration: 200
}, m.createElement(YE, {
    dir: "ltr"
}, m.createElement(I0, {
    ...n,
    ref: r
}))) : m.createElement(Gd, {
    ...n,
    ref: r
}));
$l.displayName = "Theme";
const I0 = m.forwardRef( (n, r) => {
    const {appearance: l=qt.appearance.default, accentColor: i=qt.accentColor.default, grayColor: c=qt.grayColor.default, panelBackground: u=qt.panelBackground.default, radius: d=qt.radius.default, scaling: h=qt.scaling.default, hasBackground: g=qt.hasBackground.default, ...p} = n
      , [b,v] = m.useState(l);
    m.useEffect( () => v(l), [l]);
    const [w,C] = m.useState(i);
    m.useEffect( () => C(i), [i]);
    const [R,E] = m.useState(c);
    m.useEffect( () => E(c), [c]);
    const [A,T] = m.useState(u);
    m.useEffect( () => T(u), [u]);
    const [D,N] = m.useState(d);
    m.useEffect( () => N(d), [d]);
    const [j,U] = m.useState(h);
    return m.useEffect( () => U(h), [h]),
    m.createElement(Gd, {
        ...p,
        ref: r,
        isRoot: !0,
        hasBackground: g,
        appearance: b,
        accentColor: w,
        grayColor: R,
        panelBackground: A,
        radius: D,
        scaling: j,
        onAppearanceChange: v,
        onAccentColorChange: C,
        onGrayColorChange: E,
        onPanelBackgroundChange: T,
        onRadiusChange: N,
        onScalingChange: U
    })
}
);
I0.displayName = "ThemeRoot";
const Gd = m.forwardRef( (n, r) => {
    const l = m.useContext(ed)
      , {asChild: i, isRoot: c, hasBackground: u, appearance: d=l?.appearance ?? qt.appearance.default, accentColor: h=l?.accentColor ?? qt.accentColor.default, grayColor: g=l?.resolvedGrayColor ?? qt.grayColor.default, panelBackground: p=l?.panelBackground ?? qt.panelBackground.default, radius: b=l?.radius ?? qt.radius.default, scaling: v=l?.scaling ?? qt.scaling.default, onAppearanceChange: w=io, onAccentColorChange: C=io, onGrayColorChange: R=io, onPanelBackgroundChange: E=io, onRadiusChange: A=io, onScalingChange: T=io, ...D} = n
      , N = i ? dy : "div"
      , j = g === "auto" ? jA(h) : g
      , U = n.appearance === "light" || n.appearance === "dark"
      , K = u === void 0 ? c || U : u;
    return m.createElement(ed.Provider, {
        value: m.useMemo( () => ({
            appearance: d,
            accentColor: h,
            grayColor: g,
            resolvedGrayColor: j,
            panelBackground: p,
            radius: b,
            scaling: v,
            onAppearanceChange: w,
            onAccentColorChange: C,
            onGrayColorChange: R,
            onPanelBackgroundChange: E,
            onRadiusChange: A,
            onScalingChange: T
        }), [d, h, g, j, p, b, v, w, C, R, E, A, T])
    }, m.createElement(N, {
        "data-is-root-theme": c ? "true" : "false",
        "data-accent-color": h,
        "data-gray-color": j,
        "data-has-background": K ? "true" : "false",
        "data-panel-background": p,
        "data-radius": b,
        "data-scaling": v,
        ref: r,
        ...D,
        className: DA("radix-themes", {
            light: d === "light",
            dark: d === "dark"
        }, D.className)
    }))
}
);
Gd.displayName = "ThemeImpl";
function kA(n, r) {
    return m.useReducer( (l, i) => r[l][i] ?? l, n)
}
var Kl = n => {
    const {present: r, children: l} = n
      , i = zA(r)
      , c = typeof l == "function" ? l({
        present: i.isPresent
    }) : m.Children.only(l)
      , u = Oe(i.ref, LA(c));
    return typeof l == "function" || i.isPresent ? m.cloneElement(c, {
        ref: u
    }) : null
}
;
Kl.displayName = "Presence";
function zA(n) {
    const [r,l] = m.useState()
      , i = m.useRef(null)
      , c = m.useRef(n)
      , u = m.useRef("none")
      , d = n ? "mounted" : "unmounted"
      , [h,g] = kA(d, {
        mounted: {
            UNMOUNT: "unmounted",
            ANIMATION_OUT: "unmountSuspended"
        },
        unmountSuspended: {
            MOUNT: "mounted",
            ANIMATION_END: "unmounted"
        },
        unmounted: {
            MOUNT: "mounted"
        }
    });
    return m.useEffect( () => {
        const p = vs(i.current);
        u.current = h === "mounted" ? p : "none"
    }
    , [h]),
    st( () => {
        const p = i.current
          , b = c.current;
        if (b !== n) {
            const w = u.current
              , C = vs(p);
            n ? g("MOUNT") : C === "none" || p?.display === "none" ? g("UNMOUNT") : g(b && w !== C ? "ANIMATION_OUT" : "UNMOUNT"),
            c.current = n
        }
    }
    , [n, g]),
    st( () => {
        if (r) {
            let p;
            const b = r.ownerDocument.defaultView ?? window
              , v = C => {
                const E = vs(i.current).includes(CSS.escape(C.animationName));
                if (C.target === r && E && (g("ANIMATION_END"),
                !c.current)) {
                    const A = r.style.animationFillMode;
                    r.style.animationFillMode = "forwards",
                    p = b.setTimeout( () => {
                        r.style.animationFillMode === "forwards" && (r.style.animationFillMode = A)
                    }
                    )
                }
            }
              , w = C => {
                C.target === r && (u.current = vs(i.current))
            }
            ;
            return r.addEventListener("animationstart", w),
            r.addEventListener("animationcancel", v),
            r.addEventListener("animationend", v),
            () => {
                b.clearTimeout(p),
                r.removeEventListener("animationstart", w),
                r.removeEventListener("animationcancel", v),
                r.removeEventListener("animationend", v)
            }
        } else
            g("ANIMATION_END")
    }
    , [r, g]),
    {
        isPresent: ["mounted", "unmountSuspended"].includes(h),
        ref: m.useCallback(p => {
            i.current = p ? getComputedStyle(p) : null,
            l(p)
        }
        , [])
    }
}
function vs(n) {
    return n?.animationName || "none"
}
function LA(n) {
    let r = Object.getOwnPropertyDescriptor(n.props, "ref")?.get
      , l = r && "isReactWarning"in r && r.isReactWarning;
    return l ? n.ref : (r = Object.getOwnPropertyDescriptor(n, "ref")?.get,
    l = r && "isReactWarning"in r && r.isReactWarning,
    l ? n.props.ref : n.props.ref || n.ref)
}
function ir(n, r, {checkForDefaultPrevented: l=!0}={}) {
    return function(c) {
        if (n?.(c),
        l === !1 || !c.defaultPrevented)
            return r?.(c)
    }
}
function BA(n, r) {
    return m.useReducer( (l, i) => r[l][i] ?? l, n)
}
var Yd = "ScrollArea"
  , [X0,Y_] = aa(Yd)
  , [UA,on] = X0(Yd)
  , $0 = m.forwardRef( (n, r) => {
    const {__scopeScrollArea: l, type: i="hover", dir: c, scrollHideDelay: u=600, ...d} = n
      , [h,g] = m.useState(null)
      , [p,b] = m.useState(null)
      , [v,w] = m.useState(null)
      , [C,R] = m.useState(null)
      , [E,A] = m.useState(null)
      , [T,D] = m.useState(0)
      , [N,j] = m.useState(0)
      , [U,K] = m.useState(!1)
      , [Y,V] = m.useState(!1)
      , $ = Oe(r, se => g(se))
      , ee = Gs(c);
    return y.jsx(UA, {
        scope: l,
        type: i,
        dir: ee,
        scrollHideDelay: u,
        scrollArea: h,
        viewport: p,
        onViewportChange: b,
        content: v,
        onContentChange: w,
        scrollbarX: C,
        onScrollbarXChange: R,
        scrollbarXEnabled: U,
        onScrollbarXEnabledChange: K,
        scrollbarY: E,
        onScrollbarYChange: A,
        scrollbarYEnabled: Y,
        onScrollbarYEnabledChange: V,
        onCornerWidthChange: D,
        onCornerHeightChange: j,
        children: y.jsx(Me.div, {
            dir: ee,
            ...d,
            ref: $,
            style: {
                position: "relative",
                "--radix-scroll-area-corner-width": T + "px",
                "--radix-scroll-area-corner-height": N + "px",
                ...n.style
            }
        })
    })
}
);
$0.displayName = Yd;
var K0 = "ScrollAreaViewport"
  , Q0 = m.forwardRef( (n, r) => {
    const {__scopeScrollArea: l, children: i, nonce: c, ...u} = n
      , d = on(K0, l)
      , h = m.useRef(null)
      , g = Oe(r, h, d.onViewportChange);
    return y.jsxs(y.Fragment, {
        children: [y.jsx("style", {
            dangerouslySetInnerHTML: {
                __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
            },
            nonce: c
        }), y.jsx(Me.div, {
            "data-radix-scroll-area-viewport": "",
            ...u,
            ref: g,
            style: {
                overflowX: d.scrollbarXEnabled ? "scroll" : "hidden",
                overflowY: d.scrollbarYEnabled ? "scroll" : "hidden",
                ...n.style
            },
            children: y.jsx("div", {
                ref: d.onContentChange,
                style: {
                    minWidth: "100%",
                    display: "table"
                },
                children: i
            })
        })]
    })
}
);
Q0.displayName = K0;
var Dn = "ScrollAreaScrollbar"
  , qd = m.forwardRef( (n, r) => {
    const {forceMount: l, ...i} = n
      , c = on(Dn, n.__scopeScrollArea)
      , {onScrollbarXEnabledChange: u, onScrollbarYEnabledChange: d} = c
      , h = n.orientation === "horizontal";
    return m.useEffect( () => (h ? u(!0) : d(!0),
    () => {
        h ? u(!1) : d(!1)
    }
    ), [h, u, d]),
    c.type === "hover" ? y.jsx(HA, {
        ...i,
        ref: r,
        forceMount: l
    }) : c.type === "scroll" ? y.jsx(PA, {
        ...i,
        ref: r,
        forceMount: l
    }) : c.type === "auto" ? y.jsx(Z0, {
        ...i,
        ref: r,
        forceMount: l
    }) : c.type === "always" ? y.jsx(Id, {
        ...i,
        ref: r
    }) : null
}
);
qd.displayName = Dn;
var HA = m.forwardRef( (n, r) => {
    const {forceMount: l, ...i} = n
      , c = on(Dn, n.__scopeScrollArea)
      , [u,d] = m.useState(!1);
    return m.useEffect( () => {
        const h = c.scrollArea;
        let g = 0;
        if (h) {
            const p = () => {
                window.clearTimeout(g),
                d(!0)
            }
              , b = () => {
                g = window.setTimeout( () => d(!1), c.scrollHideDelay)
            }
            ;
            return h.addEventListener("pointerenter", p),
            h.addEventListener("pointerleave", b),
            () => {
                window.clearTimeout(g),
                h.removeEventListener("pointerenter", p),
                h.removeEventListener("pointerleave", b)
            }
        }
    }
    , [c.scrollArea, c.scrollHideDelay]),
    y.jsx(Kl, {
        present: l || u,
        children: y.jsx(Z0, {
            "data-state": u ? "visible" : "hidden",
            ...i,
            ref: r
        })
    })
}
)
  , PA = m.forwardRef( (n, r) => {
    const {forceMount: l, ...i} = n
      , c = on(Dn, n.__scopeScrollArea)
      , u = n.orientation === "horizontal"
      , d = ac( () => g("SCROLL_END"), 100)
      , [h,g] = BA("hidden", {
        hidden: {
            SCROLL: "scrolling"
        },
        scrolling: {
            SCROLL_END: "idle",
            POINTER_ENTER: "interacting"
        },
        interacting: {
            SCROLL: "interacting",
            POINTER_LEAVE: "idle"
        },
        idle: {
            HIDE: "hidden",
            SCROLL: "scrolling",
            POINTER_ENTER: "interacting"
        }
    });
    return m.useEffect( () => {
        if (h === "idle") {
            const p = window.setTimeout( () => g("HIDE"), c.scrollHideDelay);
            return () => window.clearTimeout(p)
        }
    }
    , [h, c.scrollHideDelay, g]),
    m.useEffect( () => {
        const p = c.viewport
          , b = u ? "scrollLeft" : "scrollTop";
        if (p) {
            let v = p[b];
            const w = () => {
                const C = p[b];
                v !== C && (g("SCROLL"),
                d()),
                v = C
            }
            ;
            return p.addEventListener("scroll", w),
            () => p.removeEventListener("scroll", w)
        }
    }
    , [c.viewport, u, g, d]),
    y.jsx(Kl, {
        present: l || h !== "hidden",
        children: y.jsx(Id, {
            "data-state": h === "hidden" ? "hidden" : "visible",
            ...i,
            ref: r,
            onPointerEnter: ir(n.onPointerEnter, () => g("POINTER_ENTER")),
            onPointerLeave: ir(n.onPointerLeave, () => g("POINTER_LEAVE"))
        })
    })
}
)
  , Z0 = m.forwardRef( (n, r) => {
    const l = on(Dn, n.__scopeScrollArea)
      , {forceMount: i, ...c} = n
      , [u,d] = m.useState(!1)
      , h = n.orientation === "horizontal"
      , g = ac( () => {
        if (l.viewport) {
            const p = l.viewport.offsetWidth < l.viewport.scrollWidth
              , b = l.viewport.offsetHeight < l.viewport.scrollHeight;
            d(h ? p : b)
        }
    }
    , 10);
    return go(l.viewport, g),
    go(l.content, g),
    y.jsx(Kl, {
        present: i || u,
        children: y.jsx(Id, {
            "data-state": u ? "visible" : "hidden",
            ...c,
            ref: r
        })
    })
}
)
  , Id = m.forwardRef( (n, r) => {
    const {orientation: l="vertical", ...i} = n
      , c = on(Dn, n.__scopeScrollArea)
      , u = m.useRef(null)
      , d = m.useRef(0)
      , [h,g] = m.useState({
        content: 0,
        viewport: 0,
        scrollbar: {
            size: 0,
            paddingStart: 0,
            paddingEnd: 0
        }
    })
      , p = tx(h.viewport, h.content)
      , b = {
        ...i,
        sizes: h,
        onSizesChange: g,
        hasThumb: p > 0 && p < 1,
        onThumbChange: w => u.current = w,
        onThumbPointerUp: () => d.current = 0,
        onThumbPointerDown: w => d.current = w
    };
    function v(w, C) {
        return XA(w, d.current, h, C)
    }
    return l === "horizontal" ? y.jsx(VA, {
        ...b,
        ref: r,
        onThumbPositionChange: () => {
            if (c.viewport && u.current) {
                const w = c.viewport.scrollLeft
                  , C = Sv(w, h, c.dir);
                u.current.style.transform = `translate3d(${C}px, 0, 0)`
            }
        }
        ,
        onWheelScroll: w => {
            c.viewport && (c.viewport.scrollLeft = w)
        }
        ,
        onDragScroll: w => {
            c.viewport && (c.viewport.scrollLeft = v(w, c.dir))
        }
    }) : l === "vertical" ? y.jsx(GA, {
        ...b,
        ref: r,
        onThumbPositionChange: () => {
            if (c.viewport && u.current) {
                const w = c.viewport.scrollTop
                  , C = Sv(w, h);
                u.current.style.transform = `translate3d(0, ${C}px, 0)`
            }
        }
        ,
        onWheelScroll: w => {
            c.viewport && (c.viewport.scrollTop = w)
        }
        ,
        onDragScroll: w => {
            c.viewport && (c.viewport.scrollTop = v(w))
        }
    }) : null
}
)
  , VA = m.forwardRef( (n, r) => {
    const {sizes: l, onSizesChange: i, ...c} = n
      , u = on(Dn, n.__scopeScrollArea)
      , [d,h] = m.useState()
      , g = m.useRef(null)
      , p = Oe(r, g, u.onScrollbarXChange);
    return m.useEffect( () => {
        g.current && h(getComputedStyle(g.current))
    }
    , [g]),
    y.jsx(W0, {
        "data-orientation": "horizontal",
        ...c,
        ref: p,
        sizes: l,
        style: {
            bottom: 0,
            left: u.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
            right: u.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
            "--radix-scroll-area-thumb-width": nc(l) + "px",
            ...n.style
        },
        onThumbPointerDown: b => n.onThumbPointerDown(b.x),
        onDragScroll: b => n.onDragScroll(b.x),
        onWheelScroll: (b, v) => {
            if (u.viewport) {
                const w = u.viewport.scrollLeft + b.deltaX;
                n.onWheelScroll(w),
                ax(w, v) && b.preventDefault()
            }
        }
        ,
        onResize: () => {
            g.current && u.viewport && d && i({
                content: u.viewport.scrollWidth,
                viewport: u.viewport.offsetWidth,
                scrollbar: {
                    size: g.current.clientWidth,
                    paddingStart: Bs(d.paddingLeft),
                    paddingEnd: Bs(d.paddingRight)
                }
            })
        }
    })
}
)
  , GA = m.forwardRef( (n, r) => {
    const {sizes: l, onSizesChange: i, ...c} = n
      , u = on(Dn, n.__scopeScrollArea)
      , [d,h] = m.useState()
      , g = m.useRef(null)
      , p = Oe(r, g, u.onScrollbarYChange);
    return m.useEffect( () => {
        g.current && h(getComputedStyle(g.current))
    }
    , [g]),
    y.jsx(W0, {
        "data-orientation": "vertical",
        ...c,
        ref: p,
        sizes: l,
        style: {
            top: 0,
            right: u.dir === "ltr" ? 0 : void 0,
            left: u.dir === "rtl" ? 0 : void 0,
            bottom: "var(--radix-scroll-area-corner-height)",
            "--radix-scroll-area-thumb-height": nc(l) + "px",
            ...n.style
        },
        onThumbPointerDown: b => n.onThumbPointerDown(b.y),
        onDragScroll: b => n.onDragScroll(b.y),
        onWheelScroll: (b, v) => {
            if (u.viewport) {
                const w = u.viewport.scrollTop + b.deltaY;
                n.onWheelScroll(w),
                ax(w, v) && b.preventDefault()
            }
        }
        ,
        onResize: () => {
            g.current && u.viewport && d && i({
                content: u.viewport.scrollHeight,
                viewport: u.viewport.offsetHeight,
                scrollbar: {
                    size: g.current.clientHeight,
                    paddingStart: Bs(d.paddingTop),
                    paddingEnd: Bs(d.paddingBottom)
                }
            })
        }
    })
}
)
  , [YA,F0] = X0(Dn)
  , W0 = m.forwardRef( (n, r) => {
    const {__scopeScrollArea: l, sizes: i, hasThumb: c, onThumbChange: u, onThumbPointerUp: d, onThumbPointerDown: h, onThumbPositionChange: g, onDragScroll: p, onWheelScroll: b, onResize: v, ...w} = n
      , C = on(Dn, l)
      , [R,E] = m.useState(null)
      , A = Oe(r, $ => E($))
      , T = m.useRef(null)
      , D = m.useRef("")
      , N = C.viewport
      , j = i.content - i.viewport
      , U = vt(b)
      , K = vt(g)
      , Y = ac(v, 10);
    function V($) {
        if (T.current) {
            const ee = $.clientX - T.current.left
              , se = $.clientY - T.current.top;
            p({
                x: ee,
                y: se
            })
        }
    }
    return m.useEffect( () => {
        const $ = ee => {
            const se = ee.target;
            R?.contains(se) && U(ee, j)
        }
        ;
        return document.addEventListener("wheel", $, {
            passive: !1
        }),
        () => document.removeEventListener("wheel", $, {
            passive: !1
        })
    }
    , [N, R, j, U]),
    m.useEffect(K, [i, K]),
    go(R, Y),
    go(C.content, Y),
    y.jsx(YA, {
        scope: l,
        scrollbar: R,
        hasThumb: c,
        onThumbChange: vt(u),
        onThumbPointerUp: vt(d),
        onThumbPositionChange: K,
        onThumbPointerDown: vt(h),
        children: y.jsx(Me.div, {
            ...w,
            ref: A,
            style: {
                position: "absolute",
                ...w.style
            },
            onPointerDown: ir(n.onPointerDown, $ => {
                $.button === 0 && ($.target.setPointerCapture($.pointerId),
                T.current = R.getBoundingClientRect(),
                D.current = document.body.style.webkitUserSelect,
                document.body.style.webkitUserSelect = "none",
                C.viewport && (C.viewport.style.scrollBehavior = "auto"),
                V($))
            }
            ),
            onPointerMove: ir(n.onPointerMove, V),
            onPointerUp: ir(n.onPointerUp, $ => {
                const ee = $.target;
                ee.hasPointerCapture($.pointerId) && ee.releasePointerCapture($.pointerId),
                document.body.style.webkitUserSelect = D.current,
                C.viewport && (C.viewport.style.scrollBehavior = ""),
                T.current = null
            }
            )
        })
    })
}
)
  , Ls = "ScrollAreaThumb"
  , J0 = m.forwardRef( (n, r) => {
    const {forceMount: l, ...i} = n
      , c = F0(Ls, n.__scopeScrollArea);
    return y.jsx(Kl, {
        present: l || c.hasThumb,
        children: y.jsx(qA, {
            ref: r,
            ...i
        })
    })
}
)
  , qA = m.forwardRef( (n, r) => {
    const {__scopeScrollArea: l, style: i, ...c} = n
      , u = on(Ls, l)
      , d = F0(Ls, l)
      , {onThumbPositionChange: h} = d
      , g = Oe(r, v => d.onThumbChange(v))
      , p = m.useRef(void 0)
      , b = ac( () => {
        p.current && (p.current(),
        p.current = void 0)
    }
    , 100);
    return m.useEffect( () => {
        const v = u.viewport;
        if (v) {
            const w = () => {
                if (b(),
                !p.current) {
                    const C = $A(v, h);
                    p.current = C,
                    h()
                }
            }
            ;
            return h(),
            v.addEventListener("scroll", w),
            () => v.removeEventListener("scroll", w)
        }
    }
    , [u.viewport, b, h]),
    y.jsx(Me.div, {
        "data-state": d.hasThumb ? "visible" : "hidden",
        ...c,
        ref: g,
        style: {
            width: "var(--radix-scroll-area-thumb-width)",
            height: "var(--radix-scroll-area-thumb-height)",
            ...i
        },
        onPointerDownCapture: ir(n.onPointerDownCapture, v => {
            const C = v.target.getBoundingClientRect()
              , R = v.clientX - C.left
              , E = v.clientY - C.top;
            d.onThumbPointerDown({
                x: R,
                y: E
            })
        }
        ),
        onPointerUp: ir(n.onPointerUp, d.onThumbPointerUp)
    })
}
);
J0.displayName = Ls;
var Xd = "ScrollAreaCorner"
  , ex = m.forwardRef( (n, r) => {
    const l = on(Xd, n.__scopeScrollArea)
      , i = !!(l.scrollbarX && l.scrollbarY);
    return l.type !== "scroll" && i ? y.jsx(IA, {
        ...n,
        ref: r
    }) : null
}
);
ex.displayName = Xd;
var IA = m.forwardRef( (n, r) => {
    const {__scopeScrollArea: l, ...i} = n
      , c = on(Xd, l)
      , [u,d] = m.useState(0)
      , [h,g] = m.useState(0)
      , p = !!(u && h);
    return go(c.scrollbarX, () => {
        const b = c.scrollbarX?.offsetHeight || 0;
        c.onCornerHeightChange(b),
        g(b)
    }
    ),
    go(c.scrollbarY, () => {
        const b = c.scrollbarY?.offsetWidth || 0;
        c.onCornerWidthChange(b),
        d(b)
    }
    ),
    p ? y.jsx(Me.div, {
        ...i,
        ref: r,
        style: {
            width: u,
            height: h,
            position: "absolute",
            right: c.dir === "ltr" ? 0 : void 0,
            left: c.dir === "rtl" ? 0 : void 0,
            bottom: 0,
            ...n.style
        }
    }) : null
}
);
function Bs(n) {
    return n ? parseInt(n, 10) : 0
}
function tx(n, r) {
    const l = n / r;
    return isNaN(l) ? 0 : l
}
function nc(n) {
    const r = tx(n.viewport, n.content)
      , l = n.scrollbar.paddingStart + n.scrollbar.paddingEnd
      , i = (n.scrollbar.size - l) * r;
    return Math.max(i, 18)
}
function XA(n, r, l, i="ltr") {
    const c = nc(l)
      , u = c / 2
      , d = r || u
      , h = c - d
      , g = l.scrollbar.paddingStart + d
      , p = l.scrollbar.size - l.scrollbar.paddingEnd - h
      , b = l.content - l.viewport
      , v = i === "ltr" ? [0, b] : [b * -1, 0];
    return nx([g, p], v)(n)
}
function Sv(n, r, l="ltr") {
    const i = nc(r)
      , c = r.scrollbar.paddingStart + r.scrollbar.paddingEnd
      , u = r.scrollbar.size - c
      , d = r.content - r.viewport
      , h = u - i
      , g = l === "ltr" ? [0, d] : [d * -1, 0]
      , p = $f(n, g);
    return nx([0, d], [0, h])(p)
}
function nx(n, r) {
    return l => {
        if (n[0] === n[1] || r[0] === r[1])
            return r[0];
        const i = (r[1] - r[0]) / (n[1] - n[0]);
        return r[0] + i * (l - n[0])
    }
}
function ax(n, r) {
    return n > 0 && n < r
}
var $A = (n, r= () => {}
) => {
    let l = {
        left: n.scrollLeft,
        top: n.scrollTop
    }
      , i = 0;
    return function c() {
        const u = {
            left: n.scrollLeft,
            top: n.scrollTop
        }
          , d = l.left !== u.left
          , h = l.top !== u.top;
        (d || h) && r(),
        l = u,
        i = window.requestAnimationFrame(c)
    }(),
    () => window.cancelAnimationFrame(i)
}
;
function ac(n, r) {
    const l = vt(n)
      , i = m.useRef(0);
    return m.useEffect( () => () => window.clearTimeout(i.current), []),
    m.useCallback( () => {
        window.clearTimeout(i.current),
        i.current = window.setTimeout(l, r)
    }
    , [l, r])
}
function go(n, r) {
    const l = vt(r);
    st( () => {
        let i = 0;
        if (n) {
            const c = new ResizeObserver( () => {
                cancelAnimationFrame(i),
                i = window.requestAnimationFrame(l)
            }
            );
            return c.observe(n),
            () => {
                window.cancelAnimationFrame(i),
                c.unobserve(n)
            }
        }
    }
    , [n, l])
}
var rx = $0
  , KA = Q0
  , QA = ex;
function ox(n) {
    var r, l, i = "";
    if (typeof n == "string" || typeof n == "number")
        i += n;
    else if (typeof n == "object")
        if (Array.isArray(n)) {
            var c = n.length;
            for (r = 0; r < c; r++)
                n[r] && (l = ox(n[r])) && (i && (i += " "),
                i += l)
        } else
            for (l in n)
                n[l] && (i && (i += " "),
                i += l);
    return i
}
function lx() {
    for (var n, r, l = 0, i = "", c = arguments.length; l < c; l++)
        (n = arguments[l]) && (r = ox(n)) && (i && (i += " "),
        i += r);
    return i
}
const $d = "-"
  , ZA = n => {
    const r = WA(n)
      , {conflictingClassGroups: l, conflictingClassGroupModifiers: i} = n;
    return {
        getClassGroupId: d => {
            const h = d.split($d);
            return h[0] === "" && h.length !== 1 && h.shift(),
            ix(h, r) || FA(d)
        }
        ,
        getConflictingClassGroupIds: (d, h) => {
            const g = l[d] || [];
            return h && i[d] ? [...g, ...i[d]] : g
        }
    }
}
  , ix = (n, r) => {
    if (n.length === 0)
        return r.classGroupId;
    const l = n[0]
      , i = r.nextPart.get(l)
      , c = i ? ix(n.slice(1), i) : void 0;
    if (c)
        return c;
    if (r.validators.length === 0)
        return;
    const u = n.join($d);
    return r.validators.find( ({validator: d}) => d(u))?.classGroupId
}
  , Ev = /^\[(.+)\]$/
  , FA = n => {
    if (Ev.test(n)) {
        const r = Ev.exec(n)[1]
          , l = r?.substring(0, r.indexOf(":"));
        if (l)
            return "arbitrary.." + l
    }
}
  , WA = n => {
    const {theme: r, classGroups: l} = n
      , i = {
        nextPart: new Map,
        validators: []
    };
    for (const c in l)
        td(l[c], i, c, r);
    return i
}
  , td = (n, r, l, i) => {
    n.forEach(c => {
        if (typeof c == "string") {
            const u = c === "" ? r : Cv(r, c);
            u.classGroupId = l;
            return
        }
        if (typeof c == "function") {
            if (JA(c)) {
                td(c(i), r, l, i);
                return
            }
            r.validators.push({
                validator: c,
                classGroupId: l
            });
            return
        }
        Object.entries(c).forEach( ([u,d]) => {
            td(d, Cv(r, u), l, i)
        }
        )
    }
    )
}
  , Cv = (n, r) => {
    let l = n;
    return r.split($d).forEach(i => {
        l.nextPart.has(i) || l.nextPart.set(i, {
            nextPart: new Map,
            validators: []
        }),
        l = l.nextPart.get(i)
    }
    ),
    l
}
  , JA = n => n.isThemeGetter
  , eM = n => {
    if (n < 1)
        return {
            get: () => {}
            ,
            set: () => {}
        };
    let r = 0
      , l = new Map
      , i = new Map;
    const c = (u, d) => {
        l.set(u, d),
        r++,
        r > n && (r = 0,
        i = l,
        l = new Map)
    }
    ;
    return {
        get(u) {
            let d = l.get(u);
            if (d !== void 0)
                return d;
            if ((d = i.get(u)) !== void 0)
                return c(u, d),
                d
        },
        set(u, d) {
            l.has(u) ? l.set(u, d) : c(u, d)
        }
    }
}
  , nd = "!"
  , ad = ":"
  , tM = ad.length
  , nM = n => {
    const {prefix: r, experimentalParseClassName: l} = n;
    let i = c => {
        const u = [];
        let d = 0, h = 0, g = 0, p;
        for (let R = 0; R < c.length; R++) {
            let E = c[R];
            if (d === 0 && h === 0) {
                if (E === ad) {
                    u.push(c.slice(g, R)),
                    g = R + tM;
                    continue
                }
                if (E === "/") {
                    p = R;
                    continue
                }
            }
            E === "[" ? d++ : E === "]" ? d-- : E === "(" ? h++ : E === ")" && h--
        }
        const b = u.length === 0 ? c : c.substring(g)
          , v = aM(b)
          , w = v !== b
          , C = p && p > g ? p - g : void 0;
        return {
            modifiers: u,
            hasImportantModifier: w,
            baseClassName: v,
            maybePostfixModifierPosition: C
        }
    }
    ;
    if (r) {
        const c = r + ad
          , u = i;
        i = d => d.startsWith(c) ? u(d.substring(c.length)) : {
            isExternal: !0,
            modifiers: [],
            hasImportantModifier: !1,
            baseClassName: d,
            maybePostfixModifierPosition: void 0
        }
    }
    if (l) {
        const c = i;
        i = u => l({
            className: u,
            parseClassName: c
        })
    }
    return i
}
  , aM = n => n.endsWith(nd) ? n.substring(0, n.length - 1) : n.startsWith(nd) ? n.substring(1) : n
  , rM = n => {
    const r = Object.fromEntries(n.orderSensitiveModifiers.map(i => [i, !0]));
    return i => {
        if (i.length <= 1)
            return i;
        const c = [];
        let u = [];
        return i.forEach(d => {
            d[0] === "[" || r[d] ? (c.push(...u.sort(), d),
            u = []) : u.push(d)
        }
        ),
        c.push(...u.sort()),
        c
    }
}
  , oM = n => ({
    cache: eM(n.cacheSize),
    parseClassName: nM(n),
    sortModifiers: rM(n),
    ...ZA(n)
})
  , lM = /\s+/
  , iM = (n, r) => {
    const {parseClassName: l, getClassGroupId: i, getConflictingClassGroupIds: c, sortModifiers: u} = r
      , d = []
      , h = n.trim().split(lM);
    let g = "";
    for (let p = h.length - 1; p >= 0; p -= 1) {
        const b = h[p]
          , {isExternal: v, modifiers: w, hasImportantModifier: C, baseClassName: R, maybePostfixModifierPosition: E} = l(b);
        if (v) {
            g = b + (g.length > 0 ? " " + g : g);
            continue
        }
        let A = !!E
          , T = i(A ? R.substring(0, E) : R);
        if (!T) {
            if (!A) {
                g = b + (g.length > 0 ? " " + g : g);
                continue
            }
            if (T = i(R),
            !T) {
                g = b + (g.length > 0 ? " " + g : g);
                continue
            }
            A = !1
        }
        const D = u(w).join(":")
          , N = C ? D + nd : D
          , j = N + T;
        if (d.includes(j))
            continue;
        d.push(j);
        const U = c(T, A);
        for (let K = 0; K < U.length; ++K) {
            const Y = U[K];
            d.push(N + Y)
        }
        g = b + (g.length > 0 ? " " + g : g)
    }
    return g
}
;
function sM() {
    let n = 0, r, l, i = "";
    for (; n < arguments.length; )
        (r = arguments[n++]) && (l = sx(r)) && (i && (i += " "),
        i += l);
    return i
}
const sx = n => {
    if (typeof n == "string")
        return n;
    let r, l = "";
    for (let i = 0; i < n.length; i++)
        n[i] && (r = sx(n[i])) && (l && (l += " "),
        l += r);
    return l
}
;
function cM(n, ...r) {
    let l, i, c, u = d;
    function d(g) {
        const p = r.reduce( (b, v) => v(b), n());
        return l = oM(p),
        i = l.cache.get,
        c = l.cache.set,
        u = h,
        h(g)
    }
    function h(g) {
        const p = i(g);
        if (p)
            return p;
        const b = iM(g, l);
        return c(g, b),
        b
    }
    return function() {
        return u(sM.apply(null, arguments))
    }
}
const it = n => {
    const r = l => l[n] || [];
    return r.isThemeGetter = !0,
    r
}
  , cx = /^\[(?:(\w[\w-]*):)?(.+)\]$/i
  , ux = /^\((?:(\w[\w-]*):)?(.+)\)$/i
  , uM = /^\d+\/\d+$/
  , fM = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
  , dM = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
  , mM = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/
  , hM = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
  , pM = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/
  , so = n => uM.test(n)
  , Se = n => !!n && !Number.isNaN(Number(n))
  , _a = n => !!n && Number.isInteger(Number(n))
  , jf = n => n.endsWith("%") && Se(n.slice(0, -1))
  , Zn = n => fM.test(n)
  , gM = () => !0
  , vM = n => dM.test(n) && !mM.test(n)
  , fx = () => !1
  , yM = n => hM.test(n)
  , bM = n => pM.test(n)
  , xM = n => !re(n) && !oe(n)
  , wM = n => To(n, hx, fx)
  , re = n => cx.test(n)
  , lr = n => To(n, px, vM)
  , kf = n => To(n, RM, Se)
  , Tv = n => To(n, dx, fx)
  , SM = n => To(n, mx, bM)
  , ys = n => To(n, gx, yM)
  , oe = n => ux.test(n)
  , Al = n => Ro(n, px)
  , EM = n => Ro(n, AM)
  , Rv = n => Ro(n, dx)
  , CM = n => Ro(n, hx)
  , TM = n => Ro(n, mx)
  , bs = n => Ro(n, gx, !0)
  , To = (n, r, l) => {
    const i = cx.exec(n);
    return i ? i[1] ? r(i[1]) : l(i[2]) : !1
}
  , Ro = (n, r, l=!1) => {
    const i = ux.exec(n);
    return i ? i[1] ? r(i[1]) : l : !1
}
  , dx = n => n === "position" || n === "percentage"
  , mx = n => n === "image" || n === "url"
  , hx = n => n === "length" || n === "size" || n === "bg-size"
  , px = n => n === "length"
  , RM = n => n === "number"
  , AM = n => n === "family-name"
  , gx = n => n === "shadow"
  , MM = () => {
    const n = it("color")
      , r = it("font")
      , l = it("text")
      , i = it("font-weight")
      , c = it("tracking")
      , u = it("leading")
      , d = it("breakpoint")
      , h = it("container")
      , g = it("spacing")
      , p = it("radius")
      , b = it("shadow")
      , v = it("inset-shadow")
      , w = it("text-shadow")
      , C = it("drop-shadow")
      , R = it("blur")
      , E = it("perspective")
      , A = it("aspect")
      , T = it("ease")
      , D = it("animate")
      , N = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"]
      , j = () => ["center", "top", "bottom", "left", "right", "top-left", "left-top", "top-right", "right-top", "bottom-right", "right-bottom", "bottom-left", "left-bottom"]
      , U = () => [...j(), oe, re]
      , K = () => ["auto", "hidden", "clip", "visible", "scroll"]
      , Y = () => ["auto", "contain", "none"]
      , V = () => [oe, re, g]
      , $ = () => [so, "full", "auto", ...V()]
      , ee = () => [_a, "none", "subgrid", oe, re]
      , se = () => ["auto", {
        span: ["full", _a, oe, re]
    }, _a, oe, re]
      , W = () => [_a, "auto", oe, re]
      , te = () => ["auto", "min", "max", "fr", oe, re]
      , le = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"]
      , de = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"]
      , _ = () => ["auto", ...V()]
      , G = () => [so, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...V()]
      , B = () => [n, oe, re]
      , Q = () => [...j(), Rv, Tv, {
        position: [oe, re]
    }]
      , ie = () => ["no-repeat", {
        repeat: ["", "x", "y", "space", "round"]
    }]
      , be = () => ["auto", "cover", "contain", CM, wM, {
        size: [oe, re]
    }]
      , ve = () => [jf, Al, lr]
      , J = () => ["", "none", "full", p, oe, re]
      , ne = () => ["", Se, Al, lr]
      , pe = () => ["solid", "dashed", "dotted", "double"]
      , Ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"]
      , Z = () => [Se, jf, Rv, Tv]
      , ce = () => ["", "none", R, oe, re]
      , De = () => ["none", Se, oe, re]
      , xe = () => ["none", Se, oe, re]
      , Ce = () => [Se, oe, re]
      , Ne = () => [so, "full", ...V()];
    return {
        cacheSize: 500,
        theme: {
            animate: ["spin", "ping", "pulse", "bounce"],
            aspect: ["video"],
            blur: [Zn],
            breakpoint: [Zn],
            color: [gM],
            container: [Zn],
            "drop-shadow": [Zn],
            ease: ["in", "out", "in-out"],
            font: [xM],
            "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
            "inset-shadow": [Zn],
            leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
            perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
            radius: [Zn],
            shadow: [Zn],
            spacing: ["px", Se],
            text: [Zn],
            "text-shadow": [Zn],
            tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
        },
        classGroups: {
            aspect: [{
                aspect: ["auto", "square", so, re, oe, A]
            }],
            container: ["container"],
            columns: [{
                columns: [Se, re, oe, h]
            }],
            "break-after": [{
                "break-after": N()
            }],
            "break-before": [{
                "break-before": N()
            }],
            "break-inside": [{
                "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
            }],
            "box-decoration": [{
                "box-decoration": ["slice", "clone"]
            }],
            box: [{
                box: ["border", "content"]
            }],
            display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
            sr: ["sr-only", "not-sr-only"],
            float: [{
                float: ["right", "left", "none", "start", "end"]
            }],
            clear: [{
                clear: ["left", "right", "both", "none", "start", "end"]
            }],
            isolation: ["isolate", "isolation-auto"],
            "object-fit": [{
                object: ["contain", "cover", "fill", "none", "scale-down"]
            }],
            "object-position": [{
                object: U()
            }],
            overflow: [{
                overflow: K()
            }],
            "overflow-x": [{
                "overflow-x": K()
            }],
            "overflow-y": [{
                "overflow-y": K()
            }],
            overscroll: [{
                overscroll: Y()
            }],
            "overscroll-x": [{
                "overscroll-x": Y()
            }],
            "overscroll-y": [{
                "overscroll-y": Y()
            }],
            position: ["static", "fixed", "absolute", "relative", "sticky"],
            inset: [{
                inset: $()
            }],
            "inset-x": [{
                "inset-x": $()
            }],
            "inset-y": [{
                "inset-y": $()
            }],
            start: [{
                start: $()
            }],
            end: [{
                end: $()
            }],
            top: [{
                top: $()
            }],
            right: [{
                right: $()
            }],
            bottom: [{
                bottom: $()
            }],
            left: [{
                left: $()
            }],
            visibility: ["visible", "invisible", "collapse"],
            z: [{
                z: [_a, "auto", oe, re]
            }],
            basis: [{
                basis: [so, "full", "auto", h, ...V()]
            }],
            "flex-direction": [{
                flex: ["row", "row-reverse", "col", "col-reverse"]
            }],
            "flex-wrap": [{
                flex: ["nowrap", "wrap", "wrap-reverse"]
            }],
            flex: [{
                flex: [Se, so, "auto", "initial", "none", re]
            }],
            grow: [{
                grow: ["", Se, oe, re]
            }],
            shrink: [{
                shrink: ["", Se, oe, re]
            }],
            order: [{
                order: [_a, "first", "last", "none", oe, re]
            }],
            "grid-cols": [{
                "grid-cols": ee()
            }],
            "col-start-end": [{
                col: se()
            }],
            "col-start": [{
                "col-start": W()
            }],
            "col-end": [{
                "col-end": W()
            }],
            "grid-rows": [{
                "grid-rows": ee()
            }],
            "row-start-end": [{
                row: se()
            }],
            "row-start": [{
                "row-start": W()
            }],
            "row-end": [{
                "row-end": W()
            }],
            "grid-flow": [{
                "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
            }],
            "auto-cols": [{
                "auto-cols": te()
            }],
            "auto-rows": [{
                "auto-rows": te()
            }],
            gap: [{
                gap: V()
            }],
            "gap-x": [{
                "gap-x": V()
            }],
            "gap-y": [{
                "gap-y": V()
            }],
            "justify-content": [{
                justify: [...le(), "normal"]
            }],
            "justify-items": [{
                "justify-items": [...de(), "normal"]
            }],
            "justify-self": [{
                "justify-self": ["auto", ...de()]
            }],
            "align-content": [{
                content: ["normal", ...le()]
            }],
            "align-items": [{
                items: [...de(), {
                    baseline: ["", "last"]
                }]
            }],
            "align-self": [{
                self: ["auto", ...de(), {
                    baseline: ["", "last"]
                }]
            }],
            "place-content": [{
                "place-content": le()
            }],
            "place-items": [{
                "place-items": [...de(), "baseline"]
            }],
            "place-self": [{
                "place-self": ["auto", ...de()]
            }],
            p: [{
                p: V()
            }],
            px: [{
                px: V()
            }],
            py: [{
                py: V()
            }],
            ps: [{
                ps: V()
            }],
            pe: [{
                pe: V()
            }],
            pt: [{
                pt: V()
            }],
            pr: [{
                pr: V()
            }],
            pb: [{
                pb: V()
            }],
            pl: [{
                pl: V()
            }],
            m: [{
                m: _()
            }],
            mx: [{
                mx: _()
            }],
            my: [{
                my: _()
            }],
            ms: [{
                ms: _()
            }],
            me: [{
                me: _()
            }],
            mt: [{
                mt: _()
            }],
            mr: [{
                mr: _()
            }],
            mb: [{
                mb: _()
            }],
            ml: [{
                ml: _()
            }],
            "space-x": [{
                "space-x": V()
            }],
            "space-x-reverse": ["space-x-reverse"],
            "space-y": [{
                "space-y": V()
            }],
            "space-y-reverse": ["space-y-reverse"],
            size: [{
                size: G()
            }],
            w: [{
                w: [h, "screen", ...G()]
            }],
            "min-w": [{
                "min-w": [h, "screen", "none", ...G()]
            }],
            "max-w": [{
                "max-w": [h, "screen", "none", "prose", {
                    screen: [d]
                }, ...G()]
            }],
            h: [{
                h: ["screen", "lh", ...G()]
            }],
            "min-h": [{
                "min-h": ["screen", "lh", "none", ...G()]
            }],
            "max-h": [{
                "max-h": ["screen", "lh", ...G()]
            }],
            "font-size": [{
                text: ["base", l, Al, lr]
            }],
            "font-smoothing": ["antialiased", "subpixel-antialiased"],
            "font-style": ["italic", "not-italic"],
            "font-weight": [{
                font: [i, oe, kf]
            }],
            "font-stretch": [{
                "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", jf, re]
            }],
            "font-family": [{
                font: [EM, re, r]
            }],
            "fvn-normal": ["normal-nums"],
            "fvn-ordinal": ["ordinal"],
            "fvn-slashed-zero": ["slashed-zero"],
            "fvn-figure": ["lining-nums", "oldstyle-nums"],
            "fvn-spacing": ["proportional-nums", "tabular-nums"],
            "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
            tracking: [{
                tracking: [c, oe, re]
            }],
            "line-clamp": [{
                "line-clamp": [Se, "none", oe, kf]
            }],
            leading: [{
                leading: [u, ...V()]
            }],
            "list-image": [{
                "list-image": ["none", oe, re]
            }],
            "list-style-position": [{
                list: ["inside", "outside"]
            }],
            "list-style-type": [{
                list: ["disc", "decimal", "none", oe, re]
            }],
            "text-alignment": [{
                text: ["left", "center", "right", "justify", "start", "end"]
            }],
            "placeholder-color": [{
                placeholder: B()
            }],
            "text-color": [{
                text: B()
            }],
            "text-decoration": ["underline", "overline", "line-through", "no-underline"],
            "text-decoration-style": [{
                decoration: [...pe(), "wavy"]
            }],
            "text-decoration-thickness": [{
                decoration: [Se, "from-font", "auto", oe, lr]
            }],
            "text-decoration-color": [{
                decoration: B()
            }],
            "underline-offset": [{
                "underline-offset": [Se, "auto", oe, re]
            }],
            "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
            "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
            "text-wrap": [{
                text: ["wrap", "nowrap", "balance", "pretty"]
            }],
            indent: [{
                indent: V()
            }],
            "vertical-align": [{
                align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", oe, re]
            }],
            whitespace: [{
                whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
            }],
            break: [{
                break: ["normal", "words", "all", "keep"]
            }],
            wrap: [{
                wrap: ["break-word", "anywhere", "normal"]
            }],
            hyphens: [{
                hyphens: ["none", "manual", "auto"]
            }],
            content: [{
                content: ["none", oe, re]
            }],
            "bg-attachment": [{
                bg: ["fixed", "local", "scroll"]
            }],
            "bg-clip": [{
                "bg-clip": ["border", "padding", "content", "text"]
            }],
            "bg-origin": [{
                "bg-origin": ["border", "padding", "content"]
            }],
            "bg-position": [{
                bg: Q()
            }],
            "bg-repeat": [{
                bg: ie()
            }],
            "bg-size": [{
                bg: be()
            }],
            "bg-image": [{
                bg: ["none", {
                    linear: [{
                        to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
                    }, _a, oe, re],
                    radial: ["", oe, re],
                    conic: [_a, oe, re]
                }, TM, SM]
            }],
            "bg-color": [{
                bg: B()
            }],
            "gradient-from-pos": [{
                from: ve()
            }],
            "gradient-via-pos": [{
                via: ve()
            }],
            "gradient-to-pos": [{
                to: ve()
            }],
            "gradient-from": [{
                from: B()
            }],
            "gradient-via": [{
                via: B()
            }],
            "gradient-to": [{
                to: B()
            }],
            rounded: [{
                rounded: J()
            }],
            "rounded-s": [{
                "rounded-s": J()
            }],
            "rounded-e": [{
                "rounded-e": J()
            }],
            "rounded-t": [{
                "rounded-t": J()
            }],
            "rounded-r": [{
                "rounded-r": J()
            }],
            "rounded-b": [{
                "rounded-b": J()
            }],
            "rounded-l": [{
                "rounded-l": J()
            }],
            "rounded-ss": [{
                "rounded-ss": J()
            }],
            "rounded-se": [{
                "rounded-se": J()
            }],
            "rounded-ee": [{
                "rounded-ee": J()
            }],
            "rounded-es": [{
                "rounded-es": J()
            }],
            "rounded-tl": [{
                "rounded-tl": J()
            }],
            "rounded-tr": [{
                "rounded-tr": J()
            }],
            "rounded-br": [{
                "rounded-br": J()
            }],
            "rounded-bl": [{
                "rounded-bl": J()
            }],
            "border-w": [{
                border: ne()
            }],
            "border-w-x": [{
                "border-x": ne()
            }],
            "border-w-y": [{
                "border-y": ne()
            }],
            "border-w-s": [{
                "border-s": ne()
            }],
            "border-w-e": [{
                "border-e": ne()
            }],
            "border-w-t": [{
                "border-t": ne()
            }],
            "border-w-r": [{
                "border-r": ne()
            }],
            "border-w-b": [{
                "border-b": ne()
            }],
            "border-w-l": [{
                "border-l": ne()
            }],
            "divide-x": [{
                "divide-x": ne()
            }],
            "divide-x-reverse": ["divide-x-reverse"],
            "divide-y": [{
                "divide-y": ne()
            }],
            "divide-y-reverse": ["divide-y-reverse"],
            "border-style": [{
                border: [...pe(), "hidden", "none"]
            }],
            "divide-style": [{
                divide: [...pe(), "hidden", "none"]
            }],
            "border-color": [{
                border: B()
            }],
            "border-color-x": [{
                "border-x": B()
            }],
            "border-color-y": [{
                "border-y": B()
            }],
            "border-color-s": [{
                "border-s": B()
            }],
            "border-color-e": [{
                "border-e": B()
            }],
            "border-color-t": [{
                "border-t": B()
            }],
            "border-color-r": [{
                "border-r": B()
            }],
            "border-color-b": [{
                "border-b": B()
            }],
            "border-color-l": [{
                "border-l": B()
            }],
            "divide-color": [{
                divide: B()
            }],
            "outline-style": [{
                outline: [...pe(), "none", "hidden"]
            }],
            "outline-offset": [{
                "outline-offset": [Se, oe, re]
            }],
            "outline-w": [{
                outline: ["", Se, Al, lr]
            }],
            "outline-color": [{
                outline: B()
            }],
            shadow: [{
                shadow: ["", "none", b, bs, ys]
            }],
            "shadow-color": [{
                shadow: B()
            }],
            "inset-shadow": [{
                "inset-shadow": ["none", v, bs, ys]
            }],
            "inset-shadow-color": [{
                "inset-shadow": B()
            }],
            "ring-w": [{
                ring: ne()
            }],
            "ring-w-inset": ["ring-inset"],
            "ring-color": [{
                ring: B()
            }],
            "ring-offset-w": [{
                "ring-offset": [Se, lr]
            }],
            "ring-offset-color": [{
                "ring-offset": B()
            }],
            "inset-ring-w": [{
                "inset-ring": ne()
            }],
            "inset-ring-color": [{
                "inset-ring": B()
            }],
            "text-shadow": [{
                "text-shadow": ["none", w, bs, ys]
            }],
            "text-shadow-color": [{
                "text-shadow": B()
            }],
            opacity: [{
                opacity: [Se, oe, re]
            }],
            "mix-blend": [{
                "mix-blend": [...Ee(), "plus-darker", "plus-lighter"]
            }],
            "bg-blend": [{
                "bg-blend": Ee()
            }],
            "mask-clip": [{
                "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
            }, "mask-no-clip"],
            "mask-composite": [{
                mask: ["add", "subtract", "intersect", "exclude"]
            }],
            "mask-image-linear-pos": [{
                "mask-linear": [Se]
            }],
            "mask-image-linear-from-pos": [{
                "mask-linear-from": Z()
            }],
            "mask-image-linear-to-pos": [{
                "mask-linear-to": Z()
            }],
            "mask-image-linear-from-color": [{
                "mask-linear-from": B()
            }],
            "mask-image-linear-to-color": [{
                "mask-linear-to": B()
            }],
            "mask-image-t-from-pos": [{
                "mask-t-from": Z()
            }],
            "mask-image-t-to-pos": [{
                "mask-t-to": Z()
            }],
            "mask-image-t-from-color": [{
                "mask-t-from": B()
            }],
            "mask-image-t-to-color": [{
                "mask-t-to": B()
            }],
            "mask-image-r-from-pos": [{
                "mask-r-from": Z()
            }],
            "mask-image-r-to-pos": [{
                "mask-r-to": Z()
            }],
            "mask-image-r-from-color": [{
                "mask-r-from": B()
            }],
            "mask-image-r-to-color": [{
                "mask-r-to": B()
            }],
            "mask-image-b-from-pos": [{
                "mask-b-from": Z()
            }],
            "mask-image-b-to-pos": [{
                "mask-b-to": Z()
            }],
            "mask-image-b-from-color": [{
                "mask-b-from": B()
            }],
            "mask-image-b-to-color": [{
                "mask-b-to": B()
            }],
            "mask-image-l-from-pos": [{
                "mask-l-from": Z()
            }],
            "mask-image-l-to-pos": [{
                "mask-l-to": Z()
            }],
            "mask-image-l-from-color": [{
                "mask-l-from": B()
            }],
            "mask-image-l-to-color": [{
                "mask-l-to": B()
            }],
            "mask-image-x-from-pos": [{
                "mask-x-from": Z()
            }],
            "mask-image-x-to-pos": [{
                "mask-x-to": Z()
            }],
            "mask-image-x-from-color": [{
                "mask-x-from": B()
            }],
            "mask-image-x-to-color": [{
                "mask-x-to": B()
            }],
            "mask-image-y-from-pos": [{
                "mask-y-from": Z()
            }],
            "mask-image-y-to-pos": [{
                "mask-y-to": Z()
            }],
            "mask-image-y-from-color": [{
                "mask-y-from": B()
            }],
            "mask-image-y-to-color": [{
                "mask-y-to": B()
            }],
            "mask-image-radial": [{
                "mask-radial": [oe, re]
            }],
            "mask-image-radial-from-pos": [{
                "mask-radial-from": Z()
            }],
            "mask-image-radial-to-pos": [{
                "mask-radial-to": Z()
            }],
            "mask-image-radial-from-color": [{
                "mask-radial-from": B()
            }],
            "mask-image-radial-to-color": [{
                "mask-radial-to": B()
            }],
            "mask-image-radial-shape": [{
                "mask-radial": ["circle", "ellipse"]
            }],
            "mask-image-radial-size": [{
                "mask-radial": [{
                    closest: ["side", "corner"],
                    farthest: ["side", "corner"]
                }]
            }],
            "mask-image-radial-pos": [{
                "mask-radial-at": j()
            }],
            "mask-image-conic-pos": [{
                "mask-conic": [Se]
            }],
            "mask-image-conic-from-pos": [{
                "mask-conic-from": Z()
            }],
            "mask-image-conic-to-pos": [{
                "mask-conic-to": Z()
            }],
            "mask-image-conic-from-color": [{
                "mask-conic-from": B()
            }],
            "mask-image-conic-to-color": [{
                "mask-conic-to": B()
            }],
            "mask-mode": [{
                mask: ["alpha", "luminance", "match"]
            }],
            "mask-origin": [{
                "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
            }],
            "mask-position": [{
                mask: Q()
            }],
            "mask-repeat": [{
                mask: ie()
            }],
            "mask-size": [{
                mask: be()
            }],
            "mask-type": [{
                "mask-type": ["alpha", "luminance"]
            }],
            "mask-image": [{
                mask: ["none", oe, re]
            }],
            filter: [{
                filter: ["", "none", oe, re]
            }],
            blur: [{
                blur: ce()
            }],
            brightness: [{
                brightness: [Se, oe, re]
            }],
            contrast: [{
                contrast: [Se, oe, re]
            }],
            "drop-shadow": [{
                "drop-shadow": ["", "none", C, bs, ys]
            }],
            "drop-shadow-color": [{
                "drop-shadow": B()
            }],
            grayscale: [{
                grayscale: ["", Se, oe, re]
            }],
            "hue-rotate": [{
                "hue-rotate": [Se, oe, re]
            }],
            invert: [{
                invert: ["", Se, oe, re]
            }],
            saturate: [{
                saturate: [Se, oe, re]
            }],
            sepia: [{
                sepia: ["", Se, oe, re]
            }],
            "backdrop-filter": [{
                "backdrop-filter": ["", "none", oe, re]
            }],
            "backdrop-blur": [{
                "backdrop-blur": ce()
            }],
            "backdrop-brightness": [{
                "backdrop-brightness": [Se, oe, re]
            }],
            "backdrop-contrast": [{
                "backdrop-contrast": [Se, oe, re]
            }],
            "backdrop-grayscale": [{
                "backdrop-grayscale": ["", Se, oe, re]
            }],
            "backdrop-hue-rotate": [{
                "backdrop-hue-rotate": [Se, oe, re]
            }],
            "backdrop-invert": [{
                "backdrop-invert": ["", Se, oe, re]
            }],
            "backdrop-opacity": [{
                "backdrop-opacity": [Se, oe, re]
            }],
            "backdrop-saturate": [{
                "backdrop-saturate": [Se, oe, re]
            }],
            "backdrop-sepia": [{
                "backdrop-sepia": ["", Se, oe, re]
            }],
            "border-collapse": [{
                border: ["collapse", "separate"]
            }],
            "border-spacing": [{
                "border-spacing": V()
            }],
            "border-spacing-x": [{
                "border-spacing-x": V()
            }],
            "border-spacing-y": [{
                "border-spacing-y": V()
            }],
            "table-layout": [{
                table: ["auto", "fixed"]
            }],
            caption: [{
                caption: ["top", "bottom"]
            }],
            transition: [{
                transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", oe, re]
            }],
            "transition-behavior": [{
                transition: ["normal", "discrete"]
            }],
            duration: [{
                duration: [Se, "initial", oe, re]
            }],
            ease: [{
                ease: ["linear", "initial", T, oe, re]
            }],
            delay: [{
                delay: [Se, oe, re]
            }],
            animate: [{
                animate: ["none", D, oe, re]
            }],
            backface: [{
                backface: ["hidden", "visible"]
            }],
            perspective: [{
                perspective: [E, oe, re]
            }],
            "perspective-origin": [{
                "perspective-origin": U()
            }],
            rotate: [{
                rotate: De()
            }],
            "rotate-x": [{
                "rotate-x": De()
            }],
            "rotate-y": [{
                "rotate-y": De()
            }],
            "rotate-z": [{
                "rotate-z": De()
            }],
            scale: [{
                scale: xe()
            }],
            "scale-x": [{
                "scale-x": xe()
            }],
            "scale-y": [{
                "scale-y": xe()
            }],
            "scale-z": [{
                "scale-z": xe()
            }],
            "scale-3d": ["scale-3d"],
            skew: [{
                skew: Ce()
            }],
            "skew-x": [{
                "skew-x": Ce()
            }],
            "skew-y": [{
                "skew-y": Ce()
            }],
            transform: [{
                transform: [oe, re, "", "none", "gpu", "cpu"]
            }],
            "transform-origin": [{
                origin: U()
            }],
            "transform-style": [{
                transform: ["3d", "flat"]
            }],
            translate: [{
                translate: Ne()
            }],
            "translate-x": [{
                "translate-x": Ne()
            }],
            "translate-y": [{
                "translate-y": Ne()
            }],
            "translate-z": [{
                "translate-z": Ne()
            }],
            "translate-none": ["translate-none"],
            accent: [{
                accent: B()
            }],
            appearance: [{
                appearance: ["none", "auto"]
            }],
            "caret-color": [{
                caret: B()
            }],
            "color-scheme": [{
                scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
            }],
            cursor: [{
                cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", oe, re]
            }],
            "field-sizing": [{
                "field-sizing": ["fixed", "content"]
            }],
            "pointer-events": [{
                "pointer-events": ["auto", "none"]
            }],
            resize: [{
                resize: ["none", "", "y", "x"]
            }],
            "scroll-behavior": [{
                scroll: ["auto", "smooth"]
            }],
            "scroll-m": [{
                "scroll-m": V()
            }],
            "scroll-mx": [{
                "scroll-mx": V()
            }],
            "scroll-my": [{
                "scroll-my": V()
            }],
            "scroll-ms": [{
                "scroll-ms": V()
            }],
            "scroll-me": [{
                "scroll-me": V()
            }],
            "scroll-mt": [{
                "scroll-mt": V()
            }],
            "scroll-mr": [{
                "scroll-mr": V()
            }],
            "scroll-mb": [{
                "scroll-mb": V()
            }],
            "scroll-ml": [{
                "scroll-ml": V()
            }],
            "scroll-p": [{
                "scroll-p": V()
            }],
            "scroll-px": [{
                "scroll-px": V()
            }],
            "scroll-py": [{
                "scroll-py": V()
            }],
            "scroll-ps": [{
                "scroll-ps": V()
            }],
            "scroll-pe": [{
                "scroll-pe": V()
            }],
            "scroll-pt": [{
                "scroll-pt": V()
            }],
            "scroll-pr": [{
                "scroll-pr": V()
            }],
            "scroll-pb": [{
                "scroll-pb": V()
            }],
            "scroll-pl": [{
                "scroll-pl": V()
            }],
            "snap-align": [{
                snap: ["start", "end", "center", "align-none"]
            }],
            "snap-stop": [{
                snap: ["normal", "always"]
            }],
            "snap-type": [{
                snap: ["none", "x", "y", "both"]
            }],
            "snap-strictness": [{
                snap: ["mandatory", "proximity"]
            }],
            touch: [{
                touch: ["auto", "none", "manipulation"]
            }],
            "touch-x": [{
                "touch-pan": ["x", "left", "right"]
            }],
            "touch-y": [{
                "touch-pan": ["y", "up", "down"]
            }],
            "touch-pz": ["touch-pinch-zoom"],
            select: [{
                select: ["none", "text", "all", "auto"]
            }],
            "will-change": [{
                "will-change": ["auto", "scroll", "contents", "transform", oe, re]
            }],
            fill: [{
                fill: ["none", ...B()]
            }],
            "stroke-w": [{
                stroke: [Se, Al, lr, kf]
            }],
            stroke: [{
                stroke: ["none", ...B()]
            }],
            "forced-color-adjust": [{
                "forced-color-adjust": ["auto", "none"]
            }]
        },
        conflictingClassGroups: {
            overflow: ["overflow-x", "overflow-y"],
            overscroll: ["overscroll-x", "overscroll-y"],
            inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
            "inset-x": ["right", "left"],
            "inset-y": ["top", "bottom"],
            flex: ["basis", "grow", "shrink"],
            gap: ["gap-x", "gap-y"],
            p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
            px: ["pr", "pl"],
            py: ["pt", "pb"],
            m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
            mx: ["mr", "ml"],
            my: ["mt", "mb"],
            size: ["w", "h"],
            "font-size": ["leading"],
            "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
            "fvn-ordinal": ["fvn-normal"],
            "fvn-slashed-zero": ["fvn-normal"],
            "fvn-figure": ["fvn-normal"],
            "fvn-spacing": ["fvn-normal"],
            "fvn-fraction": ["fvn-normal"],
            "line-clamp": ["display", "overflow"],
            rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
            "rounded-s": ["rounded-ss", "rounded-es"],
            "rounded-e": ["rounded-se", "rounded-ee"],
            "rounded-t": ["rounded-tl", "rounded-tr"],
            "rounded-r": ["rounded-tr", "rounded-br"],
            "rounded-b": ["rounded-br", "rounded-bl"],
            "rounded-l": ["rounded-tl", "rounded-bl"],
            "border-spacing": ["border-spacing-x", "border-spacing-y"],
            "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
            "border-w-x": ["border-w-r", "border-w-l"],
            "border-w-y": ["border-w-t", "border-w-b"],
            "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
            "border-color-x": ["border-color-r", "border-color-l"],
            "border-color-y": ["border-color-t", "border-color-b"],
            translate: ["translate-x", "translate-y", "translate-none"],
            "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
            "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
            "scroll-mx": ["scroll-mr", "scroll-ml"],
            "scroll-my": ["scroll-mt", "scroll-mb"],
            "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
            "scroll-px": ["scroll-pr", "scroll-pl"],
            "scroll-py": ["scroll-pt", "scroll-pb"],
            touch: ["touch-x", "touch-y", "touch-pz"],
            "touch-x": ["touch"],
            "touch-y": ["touch"],
            "touch-pz": ["touch"]
        },
        conflictingClassGroupModifiers: {
            "font-size": ["leading"]
        },
        orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
    }
}
  , NM = cM(MM);
function _e(...n) {
    return NM(lx(n))
}
const _l = (n, r=!1, l=2) => {
    if (n === 0)
        return r ? "0 B/s" : "0 B";
    const i = 1024
      , c = l < 0 ? 0 : l
      , u = r ? ["B/s", "KB/s", "MB/s", "GB/s", "TB/s"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB"];
    let d = Math.floor(Math.log(n) / Math.log(i))
      , h = n / Math.pow(i, d);
    return h >= 1e3 && d < u.length - 1 && (d++,
    h = n / Math.pow(i, d)),
    parseFloat(h.toFixed(c)) + " " + u[d]
}
  , q_ = n => {
    if (isNaN(n) || n < 0)
        return "N/A";
    const r = Math.floor(n / (3600 * 24));
    n -= r * 3600 * 24;
    const l = Math.floor(n / 3600);
    n -= l * 3600;
    const i = Math.floor(n / 60);
    let c = "";
    return r > 0 && (c += `${r}天`),
    l > 0 && (c += `${l}小时`),
    i > 0 && r === 0 && (c += `${i}分钟`),
    c === "" ? "刚刚" : c
}
  , _M = (n, r, l) => {
    if (n === -1)
        return "免费";
    if (n === 0)
        return "";
    if (!r || !l)
        return "N/A";
    let i = `${l}天`;
    return l < 0 ? `${r}${n.toFixed(2)}` : (l === 30 || l === 31 ? i = "月" : l >= 89 && l <= 92 ? i = "季" : l >= 180 && l <= 183 ? i = "半年" : l >= 364 && l <= 366 ? i = "年" : l >= 730 && l <= 732 ? i = "两年" : l >= 1095 && l <= 1097 ? i = "三年" : l >= 1825 && l <= 1827 && (i = "五年"),
    `${r}${n.toFixed(2)}/${i}`)
}
  , I_ = (n, r) => {
    if (!n)
        return "未设置";
    const l = _l(n)
      , i = {
        sum: "总和",
        max: "最大值",
        min: "最小值",
        up: "上传",
        down: "下载"
    }[r || "max"] || "";
    return `总 ${l} (${i})`
}
  , X_ = n => n > 90 ? "bg-red-600" : n > 50 ? "bg-yellow-400" : "bg-green-500"
  , rd = m.forwardRef( ({className: n, children: r, viewportRef: l, viewportProps: i, showHorizontalScrollbar: c, ...u}, d) => {
    const {className: h, ...g} = i ?? {};
    return y.jsxs(rx, {
        ref: d,
        className: _e("relative overflow-hidden", n),
        ...u,
        children: [y.jsx(KA, {
            ref: l,
            className: _e("h-full w-full rounded-[inherit]", h),
            ...g,
            children: r
        }), y.jsx(od, {}), c && y.jsx(od, {
            orientation: "horizontal"
        }), y.jsx(QA, {})]
    })
}
);
rd.displayName = rx.displayName;
const od = m.forwardRef( ({className: n, orientation: r="vertical", ...l}, i) => y.jsx(qd, {
    ref: i,
    orientation: r,
    className: _e("flex touch-none select-none", r === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", n),
    ...l,
    children: y.jsx(J0, {
        className: "relative flex-1 rounded-full bg-(--accent-4)/50"
    })
}));
od.displayName = qd.displayName;
const Av = n => typeof n == "boolean" ? `${n}` : n === 0 ? "0" : n
  , Mv = lx
  , OM = (n, r) => l => {
    var i;
    if (r?.variants == null)
        return Mv(n, l?.class, l?.className);
    const {variants: c, defaultVariants: u} = r
      , d = Object.keys(c).map(p => {
        const b = l?.[p]
          , v = u?.[p];
        if (b === null)
            return null;
        const w = Av(b) || Av(v);
        return c[p][w]
    }
    )
      , h = l && Object.entries(l).reduce( (p, b) => {
        let[v,w] = b;
        return w === void 0 || (p[v] = w),
        p
    }
    , {})
      , g = r == null || (i = r.compoundVariants) === null || i === void 0 ? void 0 : i.reduce( (p, b) => {
        let {class: v, className: w, ...C} = b;
        return Object.entries(C).every(R => {
            let[E,A] = R;
            return Array.isArray(A) ? A.includes({
                ...u,
                ...h
            }[E]) : {
                ...u,
                ...h
            }[E] === A
        }
        ) ? [...p, v, w] : p
    }
    , []);
    return Mv(n, d, g, l?.class, l?.className)
}
  , DM = OM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive", {
    variants: {
        variant: {
            default: "theme-button text-primary inset-shadow-xs inset-shadow-(color:--accent-a4) ",
            destructive: "theme-button text-white inset-shadow-xs inset-shadow-(color:--accent-a4) focus-visible:ring-destructive/20",
            outline: "theme-button theme-card-style",
            secondary: "theme-button text-secondary-foreground inset-shadow-xs inset-shadow-(color:--accent-a4)",
            ghost: "theme-button-ghost",
            link: "text-primary underline-offset-4 hover:underline"
        },
        size: {
            default: "h-9 px-4 py-2 has-[>svg]:px-3",
            sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
            lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
            icon: "size-9"
        }
    },
    defaultVariants: {
        variant: "default",
        size: "default"
    }
});
function gt({className: n, variant: r, size: l, asChild: i=!1, ...c}) {
    const u = i ? dy : "button";
    return y.jsx(u, {
        "data-slot": "button",
        className: _e(DM({
            variant: r,
            size: l,
            className: n
        })),
        ...c
    })
}
const vo = m.forwardRef( ({className: n, type: r, ...l}, i) => y.jsx("input", {
    type: r,
    className: _e("flex w-full text-sm rounded-md bg-card px-3 py-2 placeholder:text-secondary-foreground disabled:cursor-not-allowed disabled:opacity-50 outline-none focus-visible:ring-0", n),
    ref: i,
    ...l
}));
vo.displayName = "Input";
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const jM = n => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()
  , kM = n => n.replace(/^([A-Z])|[\s-_]+(\w)/g, (r, l, i) => i ? i.toUpperCase() : l.toLowerCase())
  , Nv = n => {
    const r = kM(n);
    return r.charAt(0).toUpperCase() + r.slice(1)
}
  , vx = (...n) => n.filter( (r, l, i) => !!r && r.trim() !== "" && i.indexOf(r) === l).join(" ").trim()
  , zM = n => {
    for (const r in n)
        if (r.startsWith("aria-") || r === "role" || r === "title")
            return !0
}
;
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
var LM = {
    xmlns: "http://www.w3.org/2000/svg",
    width: 24,
    height: 24,
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: 2,
    strokeLinecap: "round",
    strokeLinejoin: "round"
};
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const BM = m.forwardRef( ({color: n="currentColor", size: r=24, strokeWidth: l=2, absoluteStrokeWidth: i, className: c="", children: u, iconNode: d, ...h}, g) => m.createElement("svg", {
    ref: g,
    ...LM,
    width: r,
    height: r,
    stroke: n,
    strokeWidth: i ? Number(l) * 24 / Number(r) : l,
    className: vx("lucide", c),
    ...!u && !zM(h) && {
        "aria-hidden": "true"
    },
    ...h
}, [...d.map( ([p,b]) => m.createElement(p, b)), ...Array.isArray(u) ? u : [u]]));
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const ct = (n, r) => {
    const l = m.forwardRef( ({className: i, ...c}, u) => m.createElement(BM, {
        ref: u,
        iconNode: r,
        className: vx(`lucide-${jM(Nv(n))}`, `lucide-${n}`, i),
        ...c
    }));
    return l.displayName = Nv(n),
    l
}
;
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const UM = [["path", {
    d: "m3 16 4 4 4-4",
    key: "1co6wj"
}], ["path", {
    d: "M7 20V4",
    key: "1yoxec"
}], ["path", {
    d: "m21 8-4-4-4 4",
    key: "1c9v7m"
}], ["path", {
    d: "M17 4v16",
    key: "7dpous"
}]]
  , HM = ct("arrow-down-up", UM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const PM = [["path", {
    d: "M12 5v14",
    key: "s699le"
}], ["path", {
    d: "m19 12-7 7-7-7",
    key: "1idqje"
}]]
  , VM = ct("arrow-down", PM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const GM = [["path", {
    d: "m12 19-7-7 7-7",
    key: "1l729n"
}], ["path", {
    d: "M19 12H5",
    key: "x3x0zl"
}]]
  , YM = ct("arrow-left", GM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const qM = [["path", {
    d: "m5 12 7-7 7 7",
    key: "hav0vg"
}], ["path", {
    d: "M12 19V5",
    key: "x0mq9r"
}]]
  , IM = ct("arrow-up", qM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const XM = [["path", {
    d: "M20 6 9 17l-5-5",
    key: "1gmf2c"
}]]
  , yx = ct("check", XM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const $M = [["path", {
    d: "m6 9 6 6 6-6",
    key: "qrunsl"
}]]
  , KM = ct("chevron-down", $M);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const QM = [["path", {
    d: "m9 18 6-6-6-6",
    key: "mthhwq"
}]]
  , ZM = ct("chevron-right", QM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const FM = [["circle", {
    cx: "12",
    cy: "12",
    r: "10",
    key: "1mglay"
}], ["circle", {
    cx: "12",
    cy: "10",
    r: "3",
    key: "ilqhr7"
}], ["path", {
    d: "M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",
    key: "154egf"
}]]
  , _v = ct("circle-user", FM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const WM = [["rect", {
    width: "18",
    height: "18",
    x: "3",
    y: "3",
    rx: "2",
    key: "afitv7"
}], ["path", {
    d: "M3 9h18",
    key: "1pudct"
}], ["path", {
    d: "M3 15h18",
    key: "5xshup"
}], ["path", {
    d: "M9 3v18",
    key: "fh3hqa"
}], ["path", {
    d: "M15 3v18",
    key: "14nvp0"
}]]
  , bx = ct("grid-3x3", WM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const JM = [["path", {
    d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
    key: "zw3jo"
}], ["path", {
    d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
    key: "1wduqc"
}], ["path", {
    d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
    key: "kqbvx6"
}]]
  , eN = ct("layers", JM);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const tN = [["path", {
    d: "M4 12h16",
    key: "1lakjw"
}], ["path", {
    d: "M4 18h16",
    key: "19g7jn"
}], ["path", {
    d: "M4 6h16",
    key: "1o0s65"
}]]
  , nN = ct("menu", tN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const aN = [["path", {
    d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
    key: "kfwtm"
}]]
  , xx = ct("moon", aN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const rN = [["rect", {
    width: "18",
    height: "18",
    x: "3",
    y: "3",
    rx: "2",
    key: "afitv7"
}], ["path", {
    d: "M21 9H3",
    key: "1338ky"
}], ["path", {
    d: "M21 15H3",
    key: "9uk58r"
}]]
  , wx = ct("rows-3", rN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const oN = [["path", {
    d: "m21 21-4.34-4.34",
    key: "14j7rj"
}], ["circle", {
    cx: "11",
    cy: "11",
    r: "8",
    key: "4ej97u"
}]]
  , Ov = ct("search", oN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const lN = [["path", {
    d: "M14 17H5",
    key: "gfn3mx"
}], ["path", {
    d: "M19 7h-9",
    key: "6i9tg"
}], ["circle", {
    cx: "17",
    cy: "17",
    r: "3",
    key: "18b49y"
}], ["circle", {
    cx: "7",
    cy: "7",
    r: "3",
    key: "dfmy0x"
}]]
  , iN = ct("settings-2", lN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const sN = [["line", {
    x1: "21",
    x2: "14",
    y1: "4",
    y2: "4",
    key: "obuewd"
}], ["line", {
    x1: "10",
    x2: "3",
    y1: "4",
    y2: "4",
    key: "1q6298"
}], ["line", {
    x1: "21",
    x2: "12",
    y1: "12",
    y2: "12",
    key: "1iu8h1"
}], ["line", {
    x1: "8",
    x2: "3",
    y1: "12",
    y2: "12",
    key: "ntss68"
}], ["line", {
    x1: "21",
    x2: "16",
    y1: "20",
    y2: "20",
    key: "14d8ph"
}], ["line", {
    x1: "12",
    x2: "3",
    y1: "20",
    y2: "20",
    key: "m0wm8r"
}], ["line", {
    x1: "14",
    x2: "14",
    y1: "2",
    y2: "6",
    key: "14e1ph"
}], ["line", {
    x1: "8",
    x2: "8",
    y1: "10",
    y2: "14",
    key: "1i6ji0"
}], ["line", {
    x1: "16",
    x2: "16",
    y1: "18",
    y2: "22",
    key: "1lctlv"
}]]
  , cN = ct("sliders-horizontal", sN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const uN = [["path", {
    d: "M12 2v2",
    key: "tus03m"
}], ["path", {
    d: "M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",
    key: "xlf6rm"
}], ["path", {
    d: "M16 12a4 4 0 0 0-4-4",
    key: "6vsxu"
}], ["path", {
    d: "m19 5-1.256 1.256",
    key: "1yg6a6"
}], ["path", {
    d: "M20 12h2",
    key: "1q8mjw"
}]]
  , Sx = ct("sun-moon", uN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const fN = [["circle", {
    cx: "12",
    cy: "12",
    r: "4",
    key: "4exip2"
}], ["path", {
    d: "M12 2v2",
    key: "tus03m"
}], ["path", {
    d: "M12 20v2",
    key: "1lh1kg"
}], ["path", {
    d: "m4.93 4.93 1.41 1.41",
    key: "149t6j"
}], ["path", {
    d: "m17.66 17.66 1.41 1.41",
    key: "ptbguv"
}], ["path", {
    d: "M2 12h2",
    key: "1t8f8n"
}], ["path", {
    d: "M20 12h2",
    key: "1q8mjw"
}], ["path", {
    d: "m6.34 17.66-1.41 1.41",
    key: "1m8zz5"
}], ["path", {
    d: "m19.07 4.93-1.41 1.41",
    key: "1shlcs"
}]]
  , Ex = ct("sun", fN);
/**
 * @license lucide-react v0.537.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const dN = [["path", {
    d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
    key: "gugj83"
}]]
  , Cx = ct("table-2", dN)
  , Lt = {
    isShowConfigEditButtonInLogined: !0,
    mainWidth: 85,
    backgroundImage: "/assets/Moonlit-Scenery.webp",
    backgroundImageMobile: "",
    enableVideoBackground: !1,
    videoBackgroundUrl: "/assets/LanternRivers_1080p15fps2Mbps3s.mp4",
    videoBackgroundUrlMobile: "",
    backgroundAlignment: "cover,top",
    blurValue: 10,
    blurBackgroundColor: "rgba(255, 255, 255, 0.5)|rgba(0, 0, 0, 0.5)",
    enableTransparentTags: !0,
    tagDefaultColorList: "ruby,gray,gold,bronze,brown,yellow,amber,orange,tomato,red",
    selectThemeColor: "violet",
    enableLocalStorage: !0,
    selectedDefaultView: "grid",
    selectedDefaultAppearance: "system",
    statusCardsVisibility: "currentTime:true,currentOnline:true,regionOverview:true,trafficOverview:true,networkSpeed:true",
    selectedHeaderStyle: "fixed",
    enableLogo: !1,
    logoUrl: "/assets/logo.png",
    enableTitle: !0,
    titleText: "Komari",
    enableSearchButton: !0,
    enableAdminButton: !0,
    selectedFooterStyle: "fixed",
    enableJsonRPC2Api: !1,
    isShowStatsInHeader: !1,
    mergeGroupsWithStats: !1,
    enableStatsBar: !0,
    enableSortControl: !1,
    isOfflineNodesBehind: !1,
    enableGroupedBar: !0,
    defaultSelectedGroup: "",
    selectMobileDefaultView: "grid",
    enableSwap: !0,
    pingChartTimeInPreview: 1,
    enableInstanceDetail: !0,
    enablePingChart: !0,
    enableConnectBreaks: !1,
    pingChartMaxPoints: 0,
    isShowHWBarInCard: !0,
    isShowValueUnderProgressBar: !1,
    selectTrafficProgressStyle: "linear",
    enableListItemProgressBar: !0,
    customTexts: ""
}
  , $_ = ["ruby", "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"]
  , mN = ["light", "dark", "system"]
  , sr = {
    node: {
        _: "节点信息",
        name: "节点名称",
        details: "{name} 详情",
        cores: "Cores",
        cpu: "CPU",
        mem: "内存",
        swap: "SWAP",
        disk: "硬盘",
        traffic: "流量",
        network: "网络",
        load: "负载",
        uptime: "在线:",
        expiredAt: "到期:",
        offline: "离线",
        online: "在线",
        off: "OFF",
        notAvailable: "N/A",
        notEnabled: "未启用",
        expired: "已过期",
        daysLeft: "余 {daysLeft} 天",
        longTerm: "长期",
        notSet: "未设置",
        uploadPrefix: "↑",
        downloadPrefix: "↓"
    },
    header: {
        _: "标题栏",
        toggleView: "切换视图",
        grid: "网格视图",
        compact: "紧凑视图",
        table: "表格视图",
        toggleTheme: "切换主题",
        lightMode: "浅色模式",
        darkMode: "深色模式",
        systemMode: "跟随系统",
        admin: "管理员"
    },
    footer: {
        _: "底栏",
        poweredBy: "© 2020 – 2026",
        themeBy: "Theme by"
    },
    homePage: {
        _: "主页",
        loadingData: "正在努力获取数据中...",
        noDetailsAvailable: "未启用详细信息与延迟图表",
        errorFetchingNodes: "获取节点数据失败",
        noNodes: "暂无节点数据",
        retryFetchingNodes: "获取节点数据失败，请重试",
        addNodesInAdmin: "请先通过管理端添加节点",
        addNode: "添加节点"
    },
    group: {
        _: "分组",
        name: "分组",
        selectTitle: "选择分组",
        all: "所有"
    },
    sort: {
        _: "排序",
        title: "排序方式",
        trafficUp: "按上传流量",
        trafficDown: "按下载流量",
        speedUp: "按上传速率",
        speedDown: "按下载速率",
        reset: "重置排序"
    },
    search: {
        _: "搜索",
        placeholder: "搜索服务器...",
        notFound: "Not Found",
        tryChangingFilters: "请尝试更改筛选条件",
        clear: "清空搜索",
        retry: "重试"
    },
    statsBar: {
        _: "状态栏",
        currentTime: "当前时间",
        displayOptionsTitle: "状态显示设置",
        currentOnline: "当前在线",
        region: "点亮地区",
        trafficShort: "流量",
        traffic: "流量概览",
        networkSpeedShort: "网速",
        networkSpeed: "网络速率",
        statsHidden: "统计信息已隐藏"
    },
    instancePage: {
        _: "详情页",
        title: "详细信息",
        cpu: "CPU",
        architecture: "架构",
        virtualization: "虚拟化",
        gpu: "GPU",
        os: "操作系统",
        mem: "内存",
        swap: "交换内存",
        disk: "磁盘",
        load: "负载",
        realtimeNetwork: "实时网络",
        totalTraffic: "总流量",
        runtime: "运行时间",
        lastUpdated: "最后上报",
        loadingNodeInfo: "正在获取节点信息...",
        nodeNotFound: "未找到该节点",
        enteringNodeDetails: "正在进入节点详情...",
        latency: "延迟",
        live: "实时",
        hours: "{count}小时",
        days: "{count}天",
        optionLoad: "负载",
        optionPing: "延迟"
    },
    chart: {
        _: "图表信息",
        loading: "正在加载图表...",
        loadingData: "正在加载图表数据...",
        noData: "暂无数据",
        nodeOfflineCannotFetchLiveData: "节点已离线，无法获取实时数据",
        offlineForTooLong: "离线时间超过 {hours} 小时，未找到任何数据",
        cpu: "CPU",
        memory: "内存",
        swap: "交换",
        disk: "磁盘",
        network: "网络",
        tcpPrefix: "TCP:",
        udpPrefix: "UDP:",
        connections: "连接数",
        processes: "进程数",
        cpuUsageTooltip: "CPU 使用率",
        memoryUsageTooltip: "内存",
        swapUsageTooltip: "交换",
        diskUsageTooltip: "磁盘",
        download: "下载",
        upload: "上传",
        tcpConnections: "TCP 连接",
        udpConnections: "UDP 连接",
        processesTooltip: "进程数",
        smooth: "平滑",
        connectBreaks: "连接断点",
        hideAll: "隐藏全部",
        showAll: "显示全部",
        resetRange: "重置范围",
        oneQuarter: "四分之一"
    },
    notFoundPage: {
        _: "404页面",
        title: "404 - Not Found",
        description: "The page you are looking for does not exist.",
        goToHome: "Go to Home"
    },
    privatePage: {
        _: "私有页面",
        title: "站点已设为私有",
        description: "登录后才能获取数据",
        goToLogin: "前往登录"
    }
}
  , hN = {
    chart: {
        packetLossCalculationWarning: "<p>丢包率计算算法并不准确，谨慎参考</p>",
        smoothTooltipContent: '<h2 class="text-lg font-bold">关于数据平滑的提示</h2><p>当您开启平滑后，您在统计图中看到的曲线经过<strong>指数加权移动平均 (EWMA)</strong> 算法处理，这是一种常用的数据平滑技术。</p></br><p>需要注意的是，经过EWMA算法平滑后的曲线所展示的数值，<strong>并非原始的、真实的测量数据</strong>。它们是根据EWMA算法计算得出的一个<strong>平滑趋势线</strong>，旨在减少数据波动，使数据模式和趋势更容易被识别。</p></br><p>因此，您看到的数值更像是<strong>视觉上的呈现</strong>，帮助您更好地理解数据的整体走向和长期趋势，而不是每一个时间点的精确真实值。如果您需要查看具体、原始的数据点，请参考未经平滑处理的数据视图。</p>',
        connectBreaksTooltipContent: '<h2 class="text-lg font-bold">关于连接断点的提示</h2><p><strong>默认关闭，可在后台配置</strong></p><p>当您开启"连接断点"功能后，图表中的曲线将会跨过那些由于网络问题或其他原因导致的丢包点，形成一条连续的线条。同时，系统会在丢包位置显示<strong>半透明的垂直参考线</strong>来标记断点位置。</p>'
    },
    setting: {
        title: "编辑配置",
        home: "🏠",
        customUI: "UI 自定义",
        close: "关闭",
        import: "导入",
        export: "导出",
        togglePreview: {
            on: "关闭预览",
            off: "开启预览"
        },
        reset: "重置",
        save: "保存",
        back: "返回",
        unsavedChanges: "有未保存的更改",
        unsavedChangesDesc: "配置已恢复到上次保存的状态",
        saveSuccess: "配置已保存！",
        saveError: "保存配置失败！",
        resetConfirm: "确定要重置所有配置吗？",
        resetConfirmAction: "确定",
        importSuccess: "导入成功，是否立即保存？",
        importError: "导入配置失败！",
        fetchError: "Failed to fetch theme settings config:",
        saveThemeError: "Failed to save theme settings:",
        importConfigError: "Failed to import config:",
        cancel: "撤销"
    }
}
  , Tx = m.createContext({
    ...Lt,
    publicSettings: null,
    siteStatus: "public",
    texts: sr,
    previewConfig: null,
    updatePreviewConfig: () => {}
    ,
    reloadConfig: async () => {}
});
function Rx(n, r, l) {
    return {
        client: r,
        time: n.updated_at,
        cpu: n.cpu.usage,
        gpu: 0,
        ram: n.ram.used,
        ram_total: n.ram.total,
        swap: n.swap.used,
        swap_total: n.swap.total,
        load: n.load.load1,
        load5: n.load.load5,
        load15: n.load.load15,
        temp: 0,
        disk: n.disk.used,
        disk_total: n.disk.total,
        net_in: n.network.down,
        net_out: n.network.up,
        net_total_up: n.network.totalUp,
        net_total_down: n.network.totalDown,
        process: n.process,
        connections: n.connections.tcp,
        connections_udp: n.connections.udp,
        online: l,
        uptime: n.uptime
    }
}
class pN {
    baseUrl;
    useRpc = !1;
    rpcCallId = 1;
    constructor() {
        this.baseUrl = ""
    }
    async rpcCall(r, l={}) {
        try {
            const i = await fetch(`${this.baseUrl}/api/rpc2`, {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify({
                    jsonrpc: "2.0",
                    method: r,
                    params: l,
                    id: this.rpcCallId++
                })
            });
            if (!i.ok)
                throw new Error(`HTTP error! status: ${i.status}`);
            const c = await i.json();
            if (c.error)
                throw new Error(`RPC Error: ${c.error.message} (Code: ${c.error.code})`);
            return {
                status: "success",
                message: "",
                data: c.result
            }
        } catch (i) {
            return console.error(`RPC call to '${r}' failed:`, i),
            {
                status: "error",
                message: i instanceof Error ? i.message : "Unknown RPC error",
                data: null
            }
        }
    }
    async get(r) {
        try {
            const l = await fetch(`${this.baseUrl}${r}`);
            return l.ok ? await l.json() : {
                status: "error",
                message: `HTTP error! status: ${l.status}`,
                data: null
            }
        } catch (l) {
            return console.error("API request failed (network error):", l),
            {
                status: "error",
                message: l instanceof Error ? l.message : "Unknown network error",
                data: null
            }
        }
    }
    async getNodes() {
        if (this.useRpc) {
            const l = await this.rpcCall("common:getNodes");
            return l.status === "success" && l.data ? Object.values(l.data) : []
        }
        const r = await this.get("/api/nodes");
        return "status"in r && r.status === "success" ? r.data : []
    }
    async getNodeRecentStats(r) {
        if (this.useRpc) {
            const i = await this.rpcCall("common:getNodeRecentStatus", {
                uuid: r
            });
            return i.status === "success" ? i.data.records : []
        }
        const l = await this.get(`/api/recent/${r}`);
        return l.status === "success" && Array.isArray(l.data) ? l.data.map(i => Rx(i, r, !0)) : []
    }
    async getLoadHistory(r, l=24) {
        if (this.useRpc) {
            const c = await this.rpcCall("common:getRecords", {
                uuid: r,
                hours: l,
                type: "load"
            });
            return c.status === "success" && c.data ? c.data.records[r] ? {
                count: c.data.count,
                records: c.data.records[r]
            } : c.data : null
        }
        const i = await this.get(`/api/records/load?uuid=${r}&hours=${l}`);
        return i.status === "success" ? i.data : null
    }
    async getPingHistory(r, l=24) {
        if (this.useRpc) {
            const c = await this.rpcCall("common:getRecords", {
                uuid: r,
                hours: l,
                type: "ping"
            });
            return c.status === "success" && c.data ? c.data[r] ? {
                count: c.data[r].length,
                records: c.data[r],
                tasks: c.data.tasks
            } : c.data : null
        }
        const i = await this.get(`/api/records/ping?uuid=${r}&hours=${l}`);
        return i.status === "success" ? i.data : null
    }
    async getPublicSettings() {
        if (this.useRpc) {
            const l = await this.rpcCall("common:getPublicInfo");
            return l.status === "success" ? l.data : null
        }
        const r = await this.get("/api/public");
        return r.status === "success" ? r.data : null
    }
    async getVersion() {
        if (this.useRpc) {
            const l = await this.rpcCall("common:getVersion");
            if (l.status === "success" && l.data)
                return l.data
        }
        const r = await this.get("/api/version");
        return r.status === "success" ? r.data : {
            version: "unknown",
            hash: "unknown"
        }
    }
    async getUserInfo() {
        try {
            const r = await fetch(`${this.baseUrl}/api/me`);
            return r.ok ? await r.json() : null
        } catch (r) {
            return console.error("API request failed (network error):", r),
            null
        }
    }
    async checkSiteStatus() {
        const r = await this.getPublicSettings()
          , i = (await this.getUserInfo())?.logged_in || !1;
        return r ? r.private_site ? i ? {
            status: "private-authenticated",
            publicInfo: r
        } : {
            status: "private-unauthenticated",
            publicInfo: r
        } : i ? {
            status: "authenticated",
            publicInfo: r
        } : {
            status: "public",
            publicInfo: r
        } : {
            status: "private-unauthenticated",
            publicInfo: null
        }
    }
    async saveThemeSettings(r, l) {
        try {
            const i = await fetch(`${this.baseUrl}/api/admin/theme/settings?theme=${r}`, {
                method: "POST",
                headers: {
                    "Content-Type": "application/json"
                },
                body: JSON.stringify(l)
            });
            if (!i.ok)
                throw new Error(`HTTP error! status: ${i.status}`);
            return await i.json()
        } catch (i) {
            return console.error("Failed to save theme settings:", i),
            {
                status: "error",
                message: i instanceof Error ? i.message : "Unknown error",
                data: null
            }
        }
    }
}
const Fn = new pN;
class gN {
    ws = null;
    reconnectAttempts = 0;
    maxReconnectAttempts = 5;
    reconnectInterval = 5e3;
    listeners = new Set;
    url;
    statusInterval = null;
    rpcCallId = 1;
    useRpc = !1;
    constructor(r="") {
        this.url = r
    }
    connect() {
        if (this.ws && this.ws.readyState < 2)
            return;
        const r = this.useRpc ? "/api/rpc2" : "/api/clients"
          , l = this.url || `${window.location.protocol === "https:" ? "wss:" : "ws:"}//${window.location.host}${r}`;
        try {
            this.ws = new WebSocket(l),
            this.ws.onopen = () => {
                console.log(`WebSocket connected to ${r}`),
                this.reconnectAttempts = 0,
                this.sendUpdateRequest(),
                this.startStatusUpdates()
            }
            ,
            this.ws.onmessage = i => {
                try {
                    const c = JSON.parse(i.data);
                    if (this.useRpc)
                        c.result && this.listeners.forEach(u => u(c.result));
                    else if (c.status === "success" && c.data) {
                        const u = c.data;
                        if (u.online && u.data) {
                            const d = {};
                            for (const h in u.data) {
                                const g = u.online.includes(h);
                                d[h] = Rx(u.data[h], h, g)
                            }
                            this.listeners.forEach(h => h(d))
                        }
                    }
                } catch (c) {
                    console.error("Failed to parse WebSocket message:", c)
                }
            }
            ,
            this.ws.onclose = () => {
                console.log("WebSocket disconnected"),
                this.stopStatusUpdates(),
                this.reconnect()
            }
            ,
            this.ws.onerror = i => {
                console.error("WebSocket error:", i)
            }
        } catch (i) {
            console.error("Failed to connect WebSocket:", i),
            this.reconnect()
        }
    }
    reconnect() {
        this.reconnectAttempts < this.maxReconnectAttempts ? (this.reconnectAttempts++,
        console.log(`Attempting to reconnect... (${this.reconnectAttempts}/${this.maxReconnectAttempts})`),
        setTimeout( () => this.connect(), this.reconnectInterval)) : console.error("Max reconnection attempts reached")
    }
    send(r) {
        this.ws && this.ws.readyState === WebSocket.OPEN && this.ws.send(r)
    }
    sendUpdateRequest() {
        if (this.useRpc) {
            const r = {
                jsonrpc: "2.0",
                method: "common:getNodesLatestStatus",
                id: this.rpcCallId++
            };
            this.send(JSON.stringify(r))
        } else
            this.send("get")
    }
    subscribe(r) {
        return this.listeners.add(r),
        () => this.listeners.delete(r)
    }
    disconnect() {
        this.ws && (this.ws.close(),
        this.ws = null,
        this.stopStatusUpdates())
    }
    startStatusUpdates() {
        this.statusInterval && clearInterval(this.statusInterval),
        this.statusInterval = setInterval( () => {
            this.sendUpdateRequest()
        }
        , 2e3)
    }
    stopStatusUpdates() {
        this.statusInterval && (clearInterval(this.statusInterval),
        this.statusInterval = null)
    }
}
let zf = null;
function ld() {
    return zf || (zf = new gN),
    zf
}
const Kd = ({text: n, children: r, size: l, className: i}) => y.jsxs("div", {
    className: `flex items-center justify-center flex-col w-full h-full ${i || ""}`,
    children: [y.jsx("div", {
        className: `showbox scale-${l ? l * 10 : 50}`,
        children: y.jsx("div", {
            className: "loader",
            children: y.jsx("svg", {
                className: "circular",
                viewBox: "25 25 50 50",
                children: y.jsx("circle", {
                    className: "path",
                    cx: "50",
                    cy: "50",
                    r: "20",
                    fill: "none",
                    strokeWidth: "2",
                    strokeMiterlimit: "10"
                })
            })
        })
    }), y.jsx("p", {
        className: "text-lg font-bold",
        children: "Loading..."
    }), y.jsx("p", {
        className: "text-sm text-muted-foreground mb-4",
        children: n
    }), y.jsx("div", {
        children: r
    })]
})
  , Ax = n => {
    if (!n)
        return {};
    const r = {}
      , l = n.split(",");
    for (const i of l) {
        const c = i.indexOf(":");
        if (c === -1)
            continue;
        const u = i.substring(0, c).trim()
          , d = i.substring(c + 1).trim();
        if (u)
            try {
                r[u] = decodeURIComponent(d)
            } catch (h) {
                console.error(`无法解码自定义文本值: ${d}`, h),
                r[u] = d
            }
    }
    return r
}
  , vN = n => Object.entries(n).map( ([r,l]) => `${r.trim()}:${encodeURIComponent(l.trim())}`).join(",")
  , Qd = (n, r="", l=".") => {
    const i = {};
    for (const c in n)
        if (Object.prototype.hasOwnProperty.call(n, c)) {
            const u = r ? `${r}${l}${c}` : c;
            typeof n[c] == "object" && n[c] !== null && !Array.isArray(n[c]) ? Object.assign(i, Qd(n[c], u, l)) : i[u] = n[c]
        }
    return i
}
  , yN = (n, r) => {
    const l = Ax(r)
      , i = JSON.parse(JSON.stringify(n))
      , c = Qd(n);
    for (const u in l)
        if (Object.prototype.hasOwnProperty.call(l, u) && c[u] !== l[u]) {
            const d = u.split(".");
            let h = i;
            for (let g = 0; g < d.length - 1; g++)
                h = h[d[g]] = h[d[g]] || {};
            h[d[d.length - 1]] = l[u]
        }
    return i
}
  , Lf = n => n && typeof n == "object" && !Array.isArray(n)
  , Mx = (n, r) => {
    const l = {
        ...n
    };
    return Lf(n) && Lf(r) && Object.keys(r).forEach(i => {
        const c = i;
        Lf(r[c]) ? i in n ? l[i] = Mx(n[i], r[c]) : Object.assign(l, {
            [i]: r[c]
        }) : Object.assign(l, {
            [i]: r[c]
        })
    }
    ),
    l
}
;
function bN({children: n}) {
    const [r,l] = m.useState(null)
      , [i,c] = m.useState(null)
      , [u,d] = m.useState("public")
      , [h,g] = m.useState(null)
      , [p,b] = m.useState(!0)
      , [v,w] = m.useState(!1)
      , C = async () => {
        try {
            const {status: D, publicInfo: N} = await Fn.checkSiteStatus();
            d(D),
            l(N);
            let j;
            if (N) {
                const U = N.theme_settings || {};
                j = {
                    ...Lt,
                    ...U,
                    titleText: U.titleText || N.sitename || Lt.titleText
                }
            } else
                j = Lt;
            if (c(j),
            j.enableJsonRPC2Api) {
                const U = await Fn.getVersion();
                if (U && U.version) {
                    const K = U.version.match(/(\d+)\.(\d+)\.(\d+)/);
                    if (K) {
                        const [,Y,V,$] = K.map(Number);
                        (Y > 1 || Y === 1 && V > 0 || Y === 1 && V === 0 && $ >= 7) && (Fn.useRpc = !0,
                        ld().useRpc = !0,
                        console.log("RPC has been enabled for API and WebSocket."))
                    }
                }
            }
        } catch (D) {
            console.error("Failed to initialize site:", D),
            c(Lt),
            d("private-unauthenticated")
        } finally {
            b(!1),
            setTimeout( () => w(!0), 300)
        }
    }
    ;
    m.useEffect( () => {
        C()
    }
    , []);
    const R = m.useMemo( () => {
        const D = h ? {
            ...i,
            ...h
        } : i
          , N = D?.customTexts ? yN(sr, D.customTexts) : sr;
        return Mx(N, hN)
    }
    , [i, h])
      , E = D => {
        g(D)
    }
      , A = async () => {
        b(!0),
        await C()
    }
      , T = m.useMemo( () => h ? {
        ...i || Lt,
        ...h
    } : i || Lt, [i, h]);
    return !v || !i ? y.jsx(Kd, {
        text: "加载配置中...",
        className: p ? "" : "fade-out"
    }) : y.jsx(Tx.Provider, {
        value: {
            ...T,
            titleText: i?.titleText || Lt.titleText,
            publicSettings: r,
            siteStatus: u,
            texts: R,
            previewConfig: h,
            updatePreviewConfig: E,
            reloadConfig: A
        },
        children: n
    })
}
const xN = (n, r, l=void 0) => {
    const i = r.split(".");
    let c = n;
    for (const u of i)
        if (c = c?.[u],
        c === void 0)
            return l;
    return c
}
;
function Nt() {
    const n = m.useContext(Tx);
    return {
        ...Lt,
        ...n
    }
}
function _t() {
    const {texts: n} = Nt();
    return {
        t: m.useCallback( (l, i) => {
            const c = xN(n, l, l);
            return typeof c != "string" ? l : i ? Object.entries(i).reduce( (u, [d,h]) => u.replace(new RegExp(`{${d}}`,"g"), String(h)), c) : c
        }
        , [n])
    }
}
const Bf = 768;
function mr() {
    const [n,r] = m.useState(void 0);
    return m.useEffect( () => {
        const l = window.matchMedia(`(max-width: ${Bf - 1}px)`)
          , i = () => {
            r(window.innerWidth < Bf)
        }
        ;
        return l.addEventListener("change", i),
        r(window.innerWidth < Bf),
        () => l.removeEventListener("change", i)
    }
    , []),
    !!n
}
const wN = "light"
  , Nx = m.createContext({
    appearance: wN,
    rawAppearance: Lt.selectedDefaultAppearance,
    setAppearance: () => {}
    ,
    color: Lt.selectThemeColor,
    setColor: () => {}
    ,
    viewMode: Lt.selectedDefaultView,
    setViewMode: () => {}
    ,
    statusCardsVisibility: {
        currentTime: !0,
        currentOnline: !0,
        regionOverview: !0,
        trafficOverview: !0,
        networkSpeed: !0
    },
    setStatusCardsVisibility: () => {}
})
  , SN = n => {
    const [r,l] = m.useState( () => typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
    return m.useEffect( () => {
        if (typeof window > "u" || !window.matchMedia)
            return;
        const i = window.matchMedia("(prefers-color-scheme: dark)")
          , c = u => {
            l(u.matches ? "dark" : "light")
        }
        ;
        return i.addEventListener("change", c),
        () => i.removeEventListener("change", c)
    }
    , []),
    n === "system" ? r : n
}
  , xs = (n, r, l) => {
    const {enableLocalStorage: i} = Nt()
      , [c,u] = m.useState( () => {
        if (i)
            try {
                const d = localStorage.getItem(n);
                if (d) {
                    const h = JSON.parse(d);
                    if (!l || l(h))
                        return h
                }
            } catch (d) {
                console.error("Error parsing stored state:", d)
            }
        return r
    }
    );
    return m.useEffect( () => {
        if (i)
            try {
                localStorage.setItem(n, JSON.stringify(c))
            } catch (d) {
                console.error("Error setting stored state:", d)
            }
    }
    , [n, c, i]),
    [c, u]
}
  , EN = () => {
    const {selectedDefaultAppearance: n, selectThemeColor: r, selectedDefaultView: l, selectMobileDefaultView: i} = Nt()
      , c = Nt().statusCardsVisibility
      , u = mr()
      , [d,h] = xs("appearance", n, A => mN.includes(A))
      , [g,p] = xs("color", r)
      , [b,v] = xs("nodeViewMode", l);
    m.useEffect( () => {
        i && u && v(i),
        u || v(l)
    }
    , [u, i, l, v]);
    const [w,C] = xs("statusCardsVisibility", ( () => {
        const A = {};
        return c.split(",").forEach(T => {
            const [D,N] = T.split(":");
            A[D] = N === "true"
        }
        ),
        A
    }
    )())
      , R = A => {
        C(T => ({
            ...T,
            ...A
        }))
    }
    ;
    return m.useEffect( () => {
        p(r)
    }
    , [r, p]),
    {
        appearance: SN(d),
        rawAppearance: d,
        setAppearance: h,
        color: g,
        setColor: p,
        viewMode: b,
        setViewMode: v,
        statusCardsVisibility: w,
        setStatusCardsVisibility: R
    }
}
  , Ao = () => {
    const n = m.useContext(Nx);
    if (n === void 0)
        throw new Error("useTheme must be used within a ThemeProvider");
    return n
}
;
function CN(n, r) {
    if (n == null)
        return {};
    var l = {}, i = Object.keys(n), c, u;
    for (u = 0; u < i.length; u++)
        c = i[u],
        !(r.indexOf(c) >= 0) && (l[c] = n[c]);
    return l
}
var TN = ["color"]
  , RN = m.forwardRef(function(n, r) {
    var l = n.color
      , i = l === void 0 ? "currentColor" : l
      , c = CN(n, TN);
    return m.createElement("svg", Object.assign({
        width: "15",
        height: "15",
        viewBox: "0 0 15 15",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg"
    }, c, {
        ref: r
    }), m.createElement("path", {
        d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
        fill: i
    }))
});
const hr = MR
  , pr = NR
  , _x = _R
  , Zd = m.forwardRef( ({className: n, inset: r, children: l, ...i}, c) => y.jsxs(e0, {
    ref: c,
    className: _e("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", r && "pl-8", n),
    ...i,
    children: [l, y.jsx(ZM, {
        className: "ml-auto h-4 w-4"
    })]
}));
Zd.displayName = e0.displayName;
const Fd = m.forwardRef( ({className: n, ...r}, l) => y.jsx(Xb, {
    children: y.jsx($l, {
        children: y.jsx(t0, {
            ref: l,
            className: _e("z-50 min-w-[8rem] purcarte-blur overflow-hidden theme-card-style bg-popover p-1 text-popover-foreground", n),
            ...r
        })
    })
}));
Fd.displayName = t0.displayName;
const Ua = m.forwardRef( ({className: n, sideOffset: r=4, ...l}, i) => y.jsx(Xb, {
    children: y.jsx($l, {
        children: y.jsx($b, {
            ref: i,
            sideOffset: r,
            className: _e("z-50 min-w-[8rem] purcarte-blur overflow-hidden theme-card-style bg-popover p-1 text-popover-foreground", n),
            ...l
        })
    })
}));
Ua.displayName = $b.displayName;
const rn = m.forwardRef( ({className: n, inset: r, ...l}, i) => y.jsx(Qb, {
    ref: i,
    className: _e("relative flex cursor-pointer hover:bg-(--accent-a5)! select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-(--accent-a6) focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "pl-8", n),
    ...l
}));
rn.displayName = Qb.displayName;
const AN = m.forwardRef( ({className: n, children: r, checked: l, ...i}, c) => y.jsxs(Zb, {
    ref: c,
    className: _e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
    checked: l,
    ...i,
    children: [y.jsx("span", {
        className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
        children: y.jsx(Wb, {
            children: y.jsx(yx, {
                className: "h-4 w-4"
            })
        })
    }), r]
}));
AN.displayName = Zb.displayName;
const MN = m.forwardRef( ({className: n, children: r, ...l}, i) => y.jsxs(Fb, {
    ref: i,
    className: _e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
    ...l,
    children: [y.jsx("span", {
        className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
        children: y.jsx(Wb, {
            children: y.jsx(RN, {
                className: "h-4 w-4 fill-current"
            })
        })
    }), r]
}));
MN.displayName = Fb.displayName;
const rc = m.forwardRef( ({className: n, inset: r, ...l}, i) => y.jsx(Kb, {
    ref: i,
    className: _e("px-2 py-1.5 text-sm font-semibold", r && "pl-8", n),
    ...l
}));
rc.displayName = Kb.displayName;
const Bl = m.forwardRef( ({className: n, ...r}, l) => y.jsx(Jb, {
    ref: l,
    className: _e("-mx-1 my-1 h-px bg-muted", n),
    ...r
}));
Bl.displayName = Jb.displayName;
const id = m.memo( ({label: n, lines: r, isLabelVertical: l, isInHeader: i, isMobile: c, textLeft: u}) => c || i ? y.jsxs("div", {
    className: _e("flex shrink-0 bg-transition px-1.5 py-0.5 text-center items-center", l ? "" : "flex-col"),
    children: [y.jsx("div", {
        className: _e("text-xs font-semibold", c ? "" : "tracking-widest"),
        style: !c && l ? {
            writingMode: "vertical-rl"
        } : {},
        children: n
    }), y.jsx("div", {
        className: `text-xs font-semibold leading-tight ${u ? "text-left" : ""}`,
        children: r.map( (d, h) => y.jsx("div", {
            children: d
        }, h))
    })]
}) : y.jsx("div", {
    className: "w-full py-1",
    children: y.jsxs("div", {
        className: "flex flex-col gap-2 items-center",
        children: [y.jsx("label", {
            children: n
        }), y.jsx("div", {
            className: `font-medium -mt-2 ${u ? "text-left" : ""}`,
            children: r.map( (d, h) => y.jsx("div", {
                children: d
            }, h))
        })]
    })
}))
  , Dv = m.memo( ({isInHeader: n, isMobile: r}) => {
    const [l,i] = m.useState( () => new Date)
      , {t: c} = _t();
    return m.useEffect( () => {
        const u = setInterval( () => i(new Date), 1e3);
        return () => clearInterval(u)
    }
    , []),
    y.jsx(id, {
        label: c("statsBar.currentTime"),
        lines: [l.toLocaleTimeString()],
        isInHeader: n,
        isMobile: r
    }, "currentTime")
}
)
  , jv = m.memo( ({groups: n, selectedGroup: r, onSelectGroup: l}) => {
    const {t: i} = _t();
    return !n?.length || !l ? null : y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsxs(gt, {
                variant: "default",
                size: "sm",
                className: "h-7 shrink-0 rounded-full px-2 text-xs font-semibold",
                children: [y.jsx(eN, {
                    className: "mr-1.5 h-3.5 w-3.5"
                }), r]
            })
        }), y.jsxs(Ua, {
            align: "center",
            children: [y.jsx(rc, {
                children: i("group.selectTitle")
            }), y.jsx(Bl, {}), n.map(c => y.jsx(rn, {
                className: _e("cursor-pointer text-sm", r === c && "bg-secondary/30 font-semibold"),
                onSelect: () => l(c),
                children: c
            }, c))]
        })]
    })
}
)
  , kv = m.memo( ({onSort: n, sortKey: r, sortDirection: l}) => {
    const {t: i} = _t()
      , c = [{
        key: "trafficUp",
        label: i("sort.trafficUp")
    }, {
        key: "trafficDown",
        label: i("sort.trafficDown")
    }, {
        key: "speedUp",
        label: i("sort.speedUp")
    }, {
        key: "speedDown",
        label: i("sort.speedDown")
    }];
    return y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsx(gt, {
                variant: "ghost",
                size: "icon",
                className: "h-6 w-6 shrink-0 rounded-full cursor-pointer",
                children: y.jsx(HM, {
                    className: "h-3 w-3"
                })
            })
        }), y.jsxs(Ua, {
            align: "end",
            children: [y.jsx(rc, {
                children: i("sort.title")
            }), y.jsx(Bl, {}), c.map( ({key: u, label: d}) => y.jsxs(rn, {
                className: "flex items-center justify-between cursor-pointer",
                onSelect: () => n?.(u, "desc"),
                children: [y.jsx("span", {
                    className: _e(r === u && "text-primary font-semibold"),
                    children: d
                }), r === u && (l === "desc" ? y.jsx(VM, {
                    className: "h-4 w-4"
                }) : y.jsx(IM, {
                    className: "h-4 w-4"
                }))]
            }, u)), y.jsx(Bl, {}), y.jsx(rn, {
                className: "flex items-center justify-between cursor-pointer",
                onSelect: () => n?.(null, "desc"),
                children: i("sort.reset")
            })]
        })]
    })
}
)
  , Wd = m.forwardRef( ({className: n, ...r}, l) => y.jsx(U0, {
    className: _e("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-(--accent-a5) transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-(--accent-a6) data-[state=unchecked]:bg-(--accent-a2)", n),
    ...r,
    ref: l,
    children: y.jsx(fA, {
        className: _e("pointer-events-none block h-5 w-5 rounded-full bg-(--accent-a8) shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")
    })
}));
Wd.displayName = U0.displayName;
const zv = m.memo( ({displayOptions: n, setDisplayOptions: r}) => {
    const {t: l} = _t();
    return y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsx(gt, {
                variant: "ghost",
                size: "icon",
                className: "h-6 w-6 shrink-0 rounded-full cursor-pointer",
                children: y.jsx(iN, {
                    className: "h-3 w-3"
                })
            })
        }), y.jsxs(Ua, {
            align: "end",
            children: [y.jsx(rc, {
                children: l("statsBar.displayOptionsTitle")
            }), y.jsx(Bl, {}), Object.keys(n).map(i => y.jsxs(rn, {
                className: "flex items-center justify-between cursor-pointer",
                children: [y.jsx("span", {
                    children: {
                        currentTime: l("statsBar.currentTime"),
                        currentOnline: l("statsBar.currentOnline"),
                        regionOverview: l("statsBar.region"),
                        trafficOverview: l("statsBar.traffic"),
                        networkSpeed: l("statsBar.networkSpeed")
                    }[i]
                }), y.jsx(Wd, {
                    checked: n[i],
                    onCheckedChange: c => r({
                        [i]: c
                    })
                })]
            }, i))]
        })]
    })
}
)
  , oc = m.forwardRef( ({className: n, ...r}, l) => y.jsx("div", {
    ref: l,
    className: _e("purcarte-blur theme-card-style text-card-foreground", n),
    ...r
}));
oc.displayName = "Card";
const NN = m.forwardRef( ({className: n, ...r}, l) => y.jsx("div", {
    ref: l,
    className: _e("flex flex-col space-y-1.5 p-4", n),
    ...r
}));
NN.displayName = "CardHeader";
const _N = m.forwardRef( ({className: n, ...r}, l) => y.jsx("h3", {
    ref: l,
    className: _e("font-semibold leading-none tracking-tight", n),
    ...r
}));
_N.displayName = "CardTitle";
const ON = m.forwardRef( ({className: n, ...r}, l) => y.jsx("p", {
    ref: l,
    className: _e("text-sm text-secondary-foreground", n),
    ...r
}));
ON.displayName = "CardDescription";
const DN = m.forwardRef( ({className: n, ...r}, l) => y.jsx("div", {
    ref: l,
    className: _e("p-4 pt-0", n),
    ...r
}));
DN.displayName = "CardContent";
const jN = m.forwardRef( ({className: n, ...r}, l) => y.jsx("div", {
    ref: l,
    className: _e("flex items-center p-4 pt-0", n),
    ...r
}));
jN.displayName = "CardFooter";
const kN = n => {
    const {displayOptions: r, setDisplayOptions: l, stats: i, loading: c, groups: u, selectedGroup: d, onSelectGroup: h, onSort: g, sortKey: p, sortDirection: b} = n
      , [v,w] = m.useState({
        key: p ?? null,
        direction: b ?? "desc"
    });
    m.useEffect( () => {
        w({
            key: p ?? null,
            direction: b ?? "desc"
        })
    }
    , [p, b]);
    const {key: C, direction: R} = v
      , E = $ => {
        let ee = "desc";
        $ !== null && $ === C && (ee = R === "desc" ? "asc" : "desc"),
        w({
            key: $,
            direction: ee
        }),
        g && g($, ee)
    }
      , {isShowStatsInHeader: A, mergeGroupsWithStats: T, enableGroupedBar: D, enableSortControl: N} = Nt()
      , j = mr()
      , {t: U} = _t()
      , K = m.useMemo( () => {
        const $ = (se, W) => A ? j ? W : se : W
          , ee = [];
        return r.currentOnline && ee.push({
            key: "currentOnline",
            label: $(U("statsBar.currentOnline"), U("statsBar.currentOnline")),
            lines: [c ? "..." : `${i.onlineCount} / ${i.totalCount}`]
        }),
        r.regionOverview && ee.push({
            key: "regionOverview",
            label: $(U("statsBar.region"), U("statsBar.region")),
            lines: [c ? "..." : String(i.uniqueRegions)]
        }),
        r.trafficOverview && ee.push({
            key: "trafficOverview",
            label: $(U("statsBar.trafficShort"), U("statsBar.traffic")),
            lines: c ? ["..."] : [`${U("node.uploadPrefix")} ${_l(i.totalTrafficUp)}`, `${U("node.downloadPrefix")} ${_l(i.totalTrafficDown)}`],
            isLabelVertical: !j && A,
            textLeft: !0
        }),
        r.networkSpeed && ee.push({
            key: "networkSpeed",
            label: $(U("statsBar.networkSpeedShort"), U("statsBar.networkSpeed")),
            lines: c ? ["..."] : [`${U("node.uploadPrefix")} ${_l(i.currentSpeedUp)}/s`, `${U("node.downloadPrefix")} ${_l(i.currentSpeedDown)}/s`],
            isLabelVertical: !j && A,
            textLeft: !0
        }),
        ee
    }
    , [r, c, i, j, A, U])
      , Y = Object.values(r).some(Boolean);
    if (A && !j)
        return y.jsxs("div", {
            className: "flex items-center gap-2",
            children: [D && T && y.jsx(jv, {
                groups: u,
                selectedGroup: d,
                onSelectGroup: h
            }), y.jsxs("div", {
                className: "flex items-center gap-1.5",
                children: [r.currentTime && y.jsx(Dv, {
                    isInHeader: !0,
                    isMobile: j
                }), K.map( ({key: $, ...ee}) => y.jsx(id, {
                    ...ee,
                    isInHeader: !0,
                    isMobile: j
                }, $)), y.jsx(zv, {
                    displayOptions: r,
                    setDisplayOptions: l
                }), N && y.jsx(kv, {
                    onSort: E,
                    sortKey: C,
                    sortDirection: R
                })]
            })]
        });
    const V = () => j ? K.length + (r.currentTime ? 1 : 0) + (D && T ? 1 : 0) >= 5 ? "repeat(3, 1fr)" : "repeat(2, 1fr)" : "repeat(auto-fit, minmax(100px, 1fr))";
    return y.jsxs(oc, {
        className: _e("relative flex items-center text-primary my-4", j ? "text-xs p-2" : "text-sm px-4 min-w-[300px] min-h-[5rem]"),
        children: [y.jsxs("div", {
            className: "grid w-full gap-2 text-center items-center py-3",
            style: {
                gridTemplateColumns: V(),
                gridAutoRows: "min-content"
            },
            children: [D && T && y.jsx("div", {
                className: "flex flex-col items-center",
                children: y.jsx(jv, {
                    groups: u,
                    selectedGroup: d,
                    onSelectGroup: h
                })
            }), Y ? y.jsxs(y.Fragment, {
                children: [r.currentTime && y.jsx(Dv, {
                    isMobile: j
                }), K.map( ({key: $, ...ee}) => y.jsx(id, {
                    ...ee,
                    isMobile: j
                }, $))]
            }) : y.jsx("span", {
                className: "text-xs text-secondary-foreground",
                children: U("statsBar.statsHidden")
            })]
        }), y.jsx("div", {
            className: "absolute right-2 top-2",
            children: y.jsx(zv, {
                displayOptions: r,
                setDisplayOptions: l
            })
        }), N && y.jsx("div", {
            className: "absolute right-2",
            children: y.jsx(kv, {
                onSort: E,
                sortKey: C,
                sortDirection: R
            })
        })]
    })
}
  , zN = ({onClick: n}) => y.jsx(gt, {
    onClick: n,
    variant: "ghost",
    size: "icon",
    children: y.jsx(cN, {
        className: "h-5 w-5"
    })
})
  , LN = {
    grid: bx,
    compact: wx,
    table: Cx
}
  , BN = {
    light: Ex,
    dark: xx,
    system: Sx
}
  , Lv = ({setViewMode: n}) => {
    const {t: r} = _t();
    return y.jsxs(y.Fragment, {
        children: [y.jsxs(rn, {
            onClick: () => n("grid"),
            children: [y.jsx(bx, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.grid")
            })]
        }), y.jsxs(rn, {
            onClick: () => n("compact"),
            children: [y.jsx(wx, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.compact")
            })]
        }), y.jsxs(rn, {
            onClick: () => n("table"),
            children: [y.jsx(Cx, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.table")
            })]
        })]
    })
}
  , Bv = ({setAppearance: n}) => {
    const {t: r} = _t();
    return y.jsxs(y.Fragment, {
        children: [y.jsxs(rn, {
            onClick: () => n("light"),
            children: [y.jsx(Ex, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.lightMode")
            })]
        }), y.jsxs(rn, {
            onClick: () => n("dark"),
            children: [y.jsx(xx, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.darkMode")
            })]
        }), y.jsxs(rn, {
            onClick: () => n("system"),
            children: [y.jsx(Sx, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.systemMode")
            })]
        })]
    })
}
  , Uv = ({isMobile: n}) => {
    const {viewMode: r, setViewMode: l} = Ao()
      , {t: i} = _t()
      , c = LN[r];
    return n ? y.jsxs(_x, {
        children: [y.jsxs(Zd, {
            children: [y.jsx(c, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: i("header.toggleView")
            })]
        }), y.jsx(Fd, {
            className: "purcarte-blur border-(--accent-4)/50 rounded-xl",
            children: y.jsx(Lv, {
                setViewMode: l
            })
        })]
    }) : y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsx(gt, {
                variant: "ghost",
                size: "icon",
                children: y.jsx(c, {
                    className: "size-5 text-primary"
                })
            })
        }), y.jsx(Ua, {
            align: "end",
            className: "purcarte-blur mt-[.5rem] border-(--accent-4)/50 rounded-xl",
            children: y.jsx(Lv, {
                setViewMode: l
            })
        })]
    })
}
  , Hv = ({isMobile: n}) => {
    const {rawAppearance: r, setAppearance: l} = Ao()
      , {t: i} = _t()
      , c = BN[r];
    return n ? y.jsxs(_x, {
        children: [y.jsxs(Zd, {
            children: [y.jsx(c, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: i("header.toggleTheme")
            })]
        }), y.jsx(Fd, {
            className: "purcarte-blur border-(--accent-4)/50 rounded-xl",
            children: y.jsx(Bv, {
                setAppearance: l
            })
        })]
    }) : y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsx(gt, {
                variant: "ghost",
                size: "icon",
                children: y.jsx(c, {
                    className: "size-5 text-primary"
                })
            })
        }), y.jsx(Ua, {
            align: "end",
            className: "purcarte-blur mt-[.5rem] border-(--accent-4)/50 rounded-xl",
            children: y.jsx(Bv, {
                setAppearance: l
            })
        })]
    })
}
  , Pv = ({isMobile: n}) => {
    const {t: r} = _t()
      , {enableAdminButton: l} = Nt();
    return l ? n ? y.jsx(rn, {
        asChild: !0,
        children: y.jsxs("a", {
            href: "/admin",
            target: "_blank",
            rel: "noopener noreferrer",
            className: "flex items-center",
            children: [y.jsx(_v, {
                className: "size-4 mr-2 text-primary"
            }), y.jsx("span", {
                children: r("header.admin")
            })]
        })
    }) : y.jsx("a", {
        href: "/admin",
        target: "_blank",
        rel: "noopener noreferrer",
        children: y.jsx(gt, {
            variant: "ghost",
            size: "icon",
            children: y.jsx(_v, {
                className: "size-5 text-primary"
            })
        })
    }) : null
}
  , Vv = ({isMobile: n, searchTerm: r, setSearchTerm: l}) => {
    const {t: i} = _t()
      , [c,u] = m.useState(!1)
      , {enableSearchButton: d} = Nt();
    return !d || r === void 0 || !l ? null : n ? y.jsxs(hr, {
        modal: !1,
        children: [y.jsx(pr, {
            asChild: !0,
            children: y.jsxs(gt, {
                variant: "ghost",
                size: "icon",
                className: "relative group",
                children: [y.jsx(Ov, {
                    className: "size-5 text-primary"
                }), r && y.jsx("span", {
                    className: "absolute top-0 right-0 w-1.5 h-1.5 rounded-full bg-(--accent-indicator) transform -translate-x-1/2"
                })]
            })
        }), y.jsx(Ua, {
            align: "end",
            className: "purcarte-blur border-(--accent-4)/50 rounded-xl w-[90vw] translate-x-[5vw] mt-[.5rem] max-w-screen-2xl",
            children: y.jsx("div", {
                className: "p-2",
                children: y.jsx(vo, {
                    type: "search",
                    placeholder: i("search.placeholder"),
                    className: "w-full",
                    value: r,
                    onChange: h => l(h.target.value)
                })
            })
        })]
    }) : y.jsxs(y.Fragment, {
        children: [y.jsx("div", {
            className: `flex items-center transition-all duration-300 ease-in-out overflow-hidden transform ${c ? "w-48 opacity-100" : "w-0 opacity-0"}`,
            children: y.jsx(vo, {
                type: "search",
                placeholder: i("search.placeholder"),
                className: `transition-all duration-300 ease-in-out ${!c && "invisible"}`,
                value: r,
                onChange: h => l(h.target.value)
            })
        }), y.jsxs(gt, {
            variant: "ghost",
            size: "icon",
            className: "relative group",
            onClick: () => u(!c),
            children: [y.jsx(Ov, {
                className: "size-5 text-primary"
            }), r && y.jsx("span", {
                className: "absolute top-0 right-0 w-1.5 h-1.5 rounded-full bg-(--accent-indicator) transform -translate-x-1/2"
            })]
        })]
    })
}
  , Ox = m.forwardRef( (n, r) => {
    const {isPrivate: l, searchTerm: i, setSearchTerm: c, setIsSettingsOpen: u, isSettingsOpen: d} = n
      , g = na().pathname.startsWith("/instance")
      , {selectedHeaderStyle: p, enableTitle: b, titleText: v, enableLogo: w, logoUrl: C, isShowStatsInHeader: R, siteStatus: E, isShowConfigEditButtonInLogined: A} = Nt()
      , T = mr();
    return m.useEffect( () => {
        v && (document.title = v)
    }
    , [v]),
    y.jsx("header", {
        ref: r,
        className: _e(p === "levitation" ? "fixed" : "sticky", "top-0 left-0 right-0 flex z-10"),
        style: {
            right: d && !T ? "var(--setting-width)" : "0"
        },
        children: y.jsx(oc, {
            className: "rounded-none w-full flex items-center justify-center",
            children: y.jsxs("div", {
                className: "w-(--main-width) max-w-screen-2xl py-2 flex items-center justify-between",
                children: [y.jsx("div", {
                    className: "flex items-center theme-text-shadow text-accent-foreground",
                    children: y.jsxs("a", {
                        href: "/",
                        className: "flex items-center gap-2 text-2xl font-bold",
                        children: [w && C && y.jsx("img", {
                            src: C,
                            alt: "logo",
                            className: "h-8"
                        }), b && y.jsx("span", {
                            children: v
                        })]
                    })
                }), !g && R && !T && !l && y.jsx("div", {
                    className: "flex-1 flex justify-center",
                    children: y.jsx(kN, {
                        ...n
                    })
                }), y.jsxs("div", {
                    className: "flex items-center space-x-2",
                    children: [T ? y.jsxs(y.Fragment, {
                        children: [!g && y.jsx(Vv, {
                            isMobile: !0,
                            searchTerm: i,
                            setSearchTerm: c
                        }), y.jsxs(hr, {
                            modal: !1,
                            children: [y.jsx(pr, {
                                asChild: !0,
                                children: y.jsxs(gt, {
                                    variant: "ghost",
                                    size: "icon",
                                    className: "relative group",
                                    children: [y.jsx(nN, {
                                        className: "size-5 text-primary transition-transform duration-300 group-data-[state=open]:rotate-180"
                                    }), y.jsx("span", {
                                        className: "absolute top-0 right-0 w-1.5 h-1.5 rounded-full bg-(--accent-indicator) transform -translate-x-1/2 scale-0 transition-transform duration-300 group-data-[state=open]:scale-100"
                                    })]
                                })
                            }), y.jsxs(Ua, {
                                align: "end",
                                className: "purcarte-blur mt-[.5rem] border-(--accent-4)/50 rounded-xl",
                                children: [!g && y.jsx(Uv, {
                                    isMobile: !0
                                }), y.jsx(Hv, {
                                    isMobile: !0
                                }), y.jsx(Pv, {
                                    isMobile: !0
                                })]
                            })]
                        })]
                    }) : y.jsxs(y.Fragment, {
                        children: [!g && y.jsxs(y.Fragment, {
                            children: [y.jsx(Vv, {
                                searchTerm: i,
                                setSearchTerm: c
                            }), y.jsx(Uv, {})]
                        }), y.jsx(Hv, {}), y.jsx(Pv, {})]
                    }), A && (E === "authenticated" || E === "private-authenticated") && y.jsx(zN, {
                        onClick: () => u && u(!0)
                    })]
                })]
            })
        })
    })
}
);
function UN({children: n}) {
    const r = Nt()
      , l = mr()
      , {appearance: i} = Ao()
      , c = m.useCallback(g => {
        if (!g)
            return "";
        const p = g.split("|").map(b => b.trim());
        return p.length > 1 && i === "dark" ? p[1] : p[0]
    }
    , [i])
      , u = m.useMemo( () => {
        if (!r)
            return "";
        const {backgroundImage: g, backgroundImageMobile: p} = r;
        return c(l && p ? p : g)
    }
    , [r, l, c])
      , d = m.useMemo( () => {
        if (!r || !r.enableVideoBackground)
            return "";
        const {videoBackgroundUrl: g, videoBackgroundUrlMobile: p} = r;
        return c(l && p ? p : g)
    }
    , [r, l, c])
      , h = m.useMemo( () => {
        if (!r)
            return "";
        const {mainWidth: g, blurValue: p, blurBackgroundColor: b} = r
          , v = [];
        v.push(`--main-width: ${g}vw;`),
        v.push(`--body-background-url: url(${u});`),
        v.push(`--purcarte-blur: ${p}px;`);
        const w = b.split("|").map(C => C.trim());
        return w.length >= 2 ? (v.push(`--card-light: ${w[0]};`),
        v.push(`--card-dark: ${w[1]};`)) : w.length === 1 && (v.push(`--card-light: ${w[0]};`),
        v.push(`--card-dark: ${w[0]};`)),
        `:root { ${v.join(" ")} }`
    }
    , [r, u]);
    return m.useEffect( () => {
        const g = document.getElementById("image-background")
          , p = document.getElementById("video-background")
          , [b,v] = r.backgroundAlignment.split(",").map(w => w.trim());
        g && (g.style.backgroundImage = `url(${u})`,
        g.style.backgroundSize = b,
        g.style.backgroundPosition = v),
        p && (r.enableVideoBackground && d ? (p.src = d,
        p.style.objectFit = b,
        p.style.objectPosition = v,
        p.style.display = "block") : p.style.display = "none")
    }
    , [u, d, r.backgroundAlignment, r.enableVideoBackground]),
    y.jsxs(y.Fragment, {
        children: [y.jsx("style", {
            children: h
        }), y.jsx("div", {
            className: "fade-in",
            children: n
        })]
    })
}
const HN = ({children: n, value: r}) => y.jsx(Nx.Provider, {
    value: r,
    children: n
});
function PN() {
    const [n,r] = m.useState([])
      , [l,i] = m.useState(!0)
      , [c,u] = m.useState(null)
      , d = m.useCallback(async () => {
        i(!0),
        u(null);
        try {
            const E = (await Fn.getNodes()).sort( (A, T) => A.weight - T.weight);
            r(E)
        } catch (R) {
            u(R instanceof Error ? R.message : "获取节点数据失败")
        } finally {
            i(!1)
        }
    }
    , [])
      , h = m.useCallback(async () => {
        await d()
    }
    , [d]);
    m.useEffect( () => {
        d()
    }
    , [d]);
    const g = m.useCallback(async R => {
        try {
            return {
                recentStats: await Fn.getNodeRecentStats(R)
            }
        } catch (E) {
            return console.error("Failed to fetch node recent stats:", E),
            null
        }
    }
    , [])
      , p = m.useCallback(async (R, E=24) => {
        try {
            return await Fn.getLoadHistory(R, E)
        } catch (A) {
            return console.error("Failed to fetch load history:", A),
            null
        }
    }
    , [])
      , b = m.useCallback(async (R, E=24) => {
        try {
            return await Fn.getPingHistory(R, E)
        } catch (A) {
            return console.error("Failed to fetch ping history:", A),
            null
        }
    }
    , [])
      , v = m.useCallback(async R => {
        try {
            const E = await Fn.getNodeRecentStats(R);
            return E ? {
                count: E.length,
                records: E
            } : null
        } catch (E) {
            return console.error("Failed to fetch recent load history:", E),
            null
        }
    }
    , [])
      , w = m.useCallback(R => n.filter(E => E.group === R), [n])
      , C = m.useCallback( () => Array.from(new Set(n.map(R => R.group).filter(Boolean))), [n]);
    return {
        nodes: n,
        loading: l,
        error: c,
        refreshNodes: h,
        getNodeDetails: g,
        getLoadHistory: p,
        getPingHistory: b,
        getRecentLoadHistory: v,
        getNodesByGroup: w,
        getGroups: C
    }
}
const Dx = m.createContext(null)
  , jx = () => {
    const n = m.useContext(Dx);
    if (!n)
        throw new Error("useNodeData must be used within a NodeDataProvider");
    return n
}
  , VN = ({children: n}) => {
    const r = PN();
    return y.jsx(Dx.Provider, {
        value: r,
        children: n
    })
}
  , kx = m.createContext(null)
  , GN = () => {
    const n = m.useContext(kx);
    if (!n)
        throw new Error("useLiveData must be used within a LiveDataProvider");
    return n
}
  , YN = ({children: n, enableWebSocket: r=!0}) => {
    const [l,i] = m.useState(null)
      , {loading: c} = jx()
      , [u,d] = m.useState(!1);
    return m.useEffect( () => {
        !c && !u && d(!0)
    }
    , [c, u]),
    m.useEffect( () => {
        if (u && r) {
            const h = ld()
              , g = b => {
                i(b)
            }
              , p = h.subscribe(g);
            return h.connect(),
            () => {
                p(),
                h.disconnect()
            }
        } else
            ld().disconnect(),
            i(null)
    }
    , [u, r]),
    y.jsx(kx.Provider, {
        value: {
            liveData: l
        },
        children: n
    })
}
  , Ol = m.forwardRef( ({isSettingsOpen: n}, r) => {
    const {t: l} = _t()
      , {selectedFooterStyle: i} = Nt()
      , c = mr();
    return y.jsx("footer", {
        ref: r,
        className: _e(i === "levitation" ? "fixed" : i === "followContent" ? "mb-4 w-(--main-width) max-w-screen-2xl mx-auto" : "", "bottom-0 left-0 right-0 flex z-10"),
        style: {
            right: n && !c ? "var(--setting-width)" : "0"
        },
        children: y.jsx(oc, {
            className: _e(i !== "followContent" ? "rounded-none" : "", "p-2 w-full flex items-center justify-center inset-shadow-sm inset-shadow-(color:--accent-a4)"),
            children: y.jsxs("p", {
                className: "flex justify-center text-sm text-secondary-foreground theme-text-shadow whitespace-pre",
                children: [l("footer.poweredBy"), " ", y.jsx("a", {
                    href: "https://www.suses.net",
                    target: "_blank",
                    rel: "noopener noreferrer",
                    className: "text-blue-500 hover:text-blue-600 transition-colors text-secondary-foreground",
                    children: "运维小杨"
                })]
            })
        })
    })
}
)
  , qN = n => {
    const {nodes: r, loading: l, getGroups: i} = jx()
      , {liveData: c} = GN()
      , {t: u} = _t()
      , {isOfflineNodesBehind: d, defaultSelectedGroup: h} = Nt()
      , [g,p] = m.useState(h || u("group.all"))
      , [b,v] = m.useState(null)
      , [w,C] = m.useState("desc")
      , R = N => {
        b === N ? C(w === "asc" ? "desc" : "asc") : (v(N),
        C("desc"))
    }
      , E = m.useMemo( () => r ? r.map(N => {
        const j = c ? c[N.uuid] : void 0;
        return {
            ...N,
            stats: j
        }
    }
    ) : [], [r, c])
      , A = m.useMemo( () => [u("group.all"), ...i()], [i, u])
      , T = m.useMemo( () => {
        let N = E.filter(j => g === u("group.all") || j.group === g).filter(j => j.name.toLowerCase().includes(n.toLowerCase()));
        return (d || b) && N.sort( (j, U) => {
            if (d) {
                const K = j.stats?.online || !1
                  , Y = U.stats?.online || !1;
                if (K !== Y)
                    return K ? -1 : 1
            }
            if (b) {
                const Y = {
                    trafficUp: "net_total_up",
                    trafficDown: "net_total_down",
                    speedUp: "net_out",
                    speedDown: "net_in"
                }[b]
                  , V = Number(j.stats?.[Y] || 0)
                  , $ = Number(U.stats?.[Y] || 0);
                return w === "asc" ? V - $ : $ - V
            }
            return 0
        }
        ),
        N
    }
    , [E, g, n, b, w, u, d])
      , D = m.useMemo( () => ({
        onlineCount: T.filter(N => N.stats?.online).length,
        totalCount: T.length,
        uniqueRegions: new Set(T.map(N => N.region)).size,
        totalTrafficUp: T.reduce( (N, j) => N + (j.stats?.net_total_up || 0), 0),
        totalTrafficDown: T.reduce( (N, j) => N + (j.stats?.net_total_down || 0), 0),
        currentSpeedUp: T.reduce( (N, j) => N + (j.stats?.net_out || 0), 0),
        currentSpeedDown: T.reduce( (N, j) => N + (j.stats?.net_in || 0), 0)
    }), [T]);
    return {
        loading: l,
        groups: A,
        filteredNodes: T,
        stats: D,
        selectedGroup: g,
        setSelectedGroup: p,
        handleSort: R,
        sortKey: b,
        sortOrder: w
    }
}
  , K_ = n => {
    const {stats: r} = n
      , {t: l} = _t()
      , i = r ? r.online : !1
      , c = _M(n.price, n.currency, n.billing_cycle)
      , u = r && i ? r.cpu : 0
      , d = r && i && n.mem_total > 0 ? r.ram / n.mem_total * 100 : 0
      , h = r && i && n.swap_total > 0 ? r.swap / n.swap_total * 100 : 0
      , g = r && i && n.disk_total > 0 ? r.disk / n.disk_total * 100 : 0
      , p = r && i ? `${r.load.toFixed(2)} | ${r.load5.toFixed(2)} | ${r.load15.toFixed(2)}` : l("node.notAvailable")
      , b = n.expired_at && new Date(n.expired_at).getTime() > 0 ? Math.ceil((new Date(n.expired_at).getTime() - new Date().getTime()) / (1e3 * 60 * 60 * 24)) : null;
    let v = null;
    if (b !== null) {
        const E = l("node.daysLeft", {
            daysLeft: b
        });
        b < 0 ? v = `${l("node.expired")}<red>` : b <= 7 ? v = `${E}<red>` : b <= 15 ? v = `${E}<orange>` : b < 36500 ? v = `${E}<green>` : v = `${l("node.longTerm")}<green>`
    }
    const w = b !== null && b > 36500 ? l("node.longTerm") : n.expired_at && new Date(n.expired_at).getTime() > 0 ? new Date(n.expired_at).toLocaleDateString(void 0, {
        year: "numeric",
        month: "2-digit",
        day: "2-digit"
    }) : l("node.notSet")
      , C = [...c ? [c] : [], ...v ? [v] : [], ...typeof n.tags == "string" ? n.tags.split(";").map(E => E.trim()).filter(Boolean) : []]
      , R = m.useMemo( () => {
        if (!n.traffic_limit || !r || !i)
            return 0;
        let E = 0;
        switch (n.traffic_limit_type) {
        case "up":
            E = r.net_total_up;
            break;
        case "down":
            E = r.net_total_down;
            break;
        case "sum":
            E = r.net_total_up + r.net_total_down;
            break;
        case "min":
            E = Math.min(r.net_total_up, r.net_total_down);
            break;
        default:
            E = Math.max(r.net_total_up, r.net_total_down);
            break
        }
        return E / n.traffic_limit * 100
    }
    , [n.traffic_limit, n.traffic_limit_type, r, i]);
    return {
        stats: r,
        isOnline: i,
        tagList: C,
        cpuUsage: u,
        memUsage: d,
        swapUsage: h,
        diskUsage: g,
        load: p,
        expired_at: w,
        trafficPercentage: R
    }
}
  , IN = eA
  , XN = tA
  , zx = m.forwardRef( ({className: n, children: r, ...l}, i) => y.jsxs(M0, {
    ref: i,
    className: _e("flex h-10 w-full items-center justify-between rounded-md border border-input bg-(--accent-a6) px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", n),
    ...l,
    children: [r, y.jsx(nA, {
        asChild: !0,
        children: y.jsx(KM, {
            className: "h-4 w-4 opacity-50"
        })
    })]
}));
zx.displayName = M0.displayName;
const Lx = m.forwardRef( ({className: n, children: r, position: l="popper", ...i}, c) => y.jsx(aA, {
    children: y.jsx($l, {
        children: y.jsx(N0, {
            ref: c,
            className: _e("relative z-50 min-w-[8rem] purcarte-blur theme-card-style text-popover-foreground animate-in fade-in-80", l === "popper" && "translate-y-1", n),
            position: l,
            ...i,
            children: y.jsx(rA, {
                className: _e("p-1 max-h-96 overflow-y-auto", l === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"),
                children: r
            })
        })
    })
}));
Lx.displayName = N0.displayName;
const $N = m.forwardRef( ({className: n, ...r}, l) => y.jsx(_0, {
    ref: l,
    className: _e("py-1.5 pl-8 pr-2 text-sm font-semibold", n),
    ...r
}));
$N.displayName = _0.displayName;
const Bx = m.forwardRef( ({className: n, children: r, ...l}, i) => y.jsxs(O0, {
    ref: i,
    className: _e("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
    ...l,
    children: [y.jsx("span", {
        className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
        children: y.jsx(lA, {
            children: y.jsx(yx, {
                className: "h-4 w-4"
            })
        })
    }), y.jsx(oA, {
        children: r
    })]
}));
Bx.displayName = O0.displayName;
const KN = m.forwardRef( ({className: n, ...r}, l) => y.jsx(D0, {
    ref: l,
    className: _e("-mx-1 my-1 h-px bg-muted", n),
    ...r
}));
KN.displayName = D0.displayName;
const QN = ({item: n, editingConfig: r, onConfigChange: l}) => {
    const i = n.default
      , c = r[n.key] ?? i
      , u = c !== i
      , [d,h] = m.useState(c);
    m.useEffect( () => {
        h(c)
    }
    , [c]);
    const g = () => {
        n.type === "number" ? l(n.key, Number(d)) : l(n.key, d)
    }
      , p = () => {
        switch (n.type) {
        case "number":
            return y.jsx(vo, {
                type: "number",
                className: "theme-card-style",
                value: d,
                onChange: b => h(b.target.value),
                onBlur: g
            });
        case "string":
            return y.jsx(vo, {
                type: "text",
                className: "theme-card-style",
                value: d,
                onChange: b => h(b.target.value),
                onBlur: g
            });
        case "switch":
            return y.jsx(Wd, {
                checked: d,
                onCheckedChange: b => {
                    h(b),
                    l(n.key, b)
                }
            });
        case "select":
            return y.jsxs(IN, {
                value: d,
                onValueChange: b => {
                    h(b),
                    l(n.key, b)
                }
                ,
                children: [y.jsx(zx, {
                    children: y.jsx(XN, {})
                }), y.jsx(Lx, {
                    children: n.options.split(",").map(b => y.jsx(Bx, {
                        value: b,
                        children: b
                    }, b))
                })]
            });
        default:
            return null
        }
    }
    ;
    return n.type === "title" ? y.jsx("h3", {
        className: "text-lg font-semibold mt-4 mb-2",
        children: n.name
    }) : n.type === "switch" || n.type === "select" ? y.jsxs("div", {
        className: "mb-4 flex items-center justify-between",
        children: [y.jsxs("div", {
            children: [y.jsxs("span", {
                className: "text-base font-bold",
                children: [n.name, u && y.jsx("span", {
                    className: "text-yellow-500 ml-2",
                    children: "*"
                })]
            }), n.help && y.jsx("p", {
                className: "text-sm text-gray-500 mt-1",
                children: n.help
            })]
        }), y.jsx("div", {
            className: "mt-2",
            children: p()
        })]
    }) : y.jsxs("div", {
        className: "mb-4",
        children: [y.jsx("div", {
            className: "flex items-center justify-between",
            children: y.jsxs("span", {
                className: "text-base font-bold",
                children: [n.name, u && y.jsx("span", {
                    className: "text-yellow-500 ml-2",
                    children: "*"
                })]
            })
        }), n.help && y.jsx("p", {
            className: "text-sm text-gray-500 mt-1",
            children: n.help
        }), y.jsx("div", {
            className: "mt-2",
            children: p()
        })]
    })
}
  , ZN = ({value: n, onChange: r, page: l, onPageChange: i}) => {
    const [c,u] = m.useState({})
      , d = Qd(sr)
      , h = Object.keys(sr);
    m.useEffect( () => {
        u(Ax(n))
    }
    , [n]);
    const g = (p, b) => {
        const v = {
            ...c
        };
        b === d[p] ? delete v[p] : v[p] = b,
        u(v),
        r(vN(v))
    }
    ;
    return y.jsx("div", {
        children: l === "main" ? h.map(p => y.jsx(gt, {
            onClick: () => i(p),
            className: "w-full justify-start mb-2",
            children: sr[p]?._ || p
        }, p)) : y.jsx(y.Fragment, {
            children: Object.keys(d).filter(p => p.startsWith(l) && !p.endsWith("._")).map(p => y.jsxs("div", {
                className: "mb-2",
                children: [y.jsx("label", {
                    className: "block text-sm font-medium text-gray-700 dark:text-gray-300",
                    children: p
                }), y.jsx(vo, {
                    type: "text",
                    value: c[p] ?? d[p],
                    onChange: b => g(p, b.target.value),
                    className: _e("theme-card-style", c[p] ? "border-yellow-500" : "")
                })]
            }, p))
        })
    })
}
;
function FN(n) {
    if (typeof document > "u")
        return;
    let r = document.head || document.getElementsByTagName("head")[0]
      , l = document.createElement("style");
    l.type = "text/css",
    r.appendChild(l),
    l.styleSheet ? l.styleSheet.cssText = n : l.appendChild(document.createTextNode(n))
}
const WN = n => {
    switch (n) {
    case "success":
        return t_;
    case "info":
        return a_;
    case "warning":
        return n_;
    case "error":
        return r_;
    default:
        return null
    }
}
  , JN = Array(12).fill(0)
  , e_ = ({visible: n, className: r}) => F.createElement("div", {
    className: ["sonner-loading-wrapper", r].filter(Boolean).join(" "),
    "data-visible": n
}, F.createElement("div", {
    className: "sonner-spinner"
}, JN.map( (l, i) => F.createElement("div", {
    className: "sonner-loading-bar",
    key: `spinner-bar-${i}`
}))))
  , t_ = F.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    fill: "currentColor",
    height: "20",
    width: "20"
}, F.createElement("path", {
    fillRule: "evenodd",
    d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
    clipRule: "evenodd"
}))
  , n_ = F.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    fill: "currentColor",
    height: "20",
    width: "20"
}, F.createElement("path", {
    fillRule: "evenodd",
    d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
    clipRule: "evenodd"
}))
  , a_ = F.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    fill: "currentColor",
    height: "20",
    width: "20"
}, F.createElement("path", {
    fillRule: "evenodd",
    d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
    clipRule: "evenodd"
}))
  , r_ = F.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 20 20",
    fill: "currentColor",
    height: "20",
    width: "20"
}, F.createElement("path", {
    fillRule: "evenodd",
    d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
    clipRule: "evenodd"
}))
  , o_ = F.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "12",
    height: "12",
    viewBox: "0 0 24 24",
    fill: "none",
    stroke: "currentColor",
    strokeWidth: "1.5",
    strokeLinecap: "round",
    strokeLinejoin: "round"
}, F.createElement("line", {
    x1: "18",
    y1: "6",
    x2: "6",
    y2: "18"
}), F.createElement("line", {
    x1: "6",
    y1: "6",
    x2: "18",
    y2: "18"
}))
  , l_ = () => {
    const [n,r] = F.useState(document.hidden);
    return F.useEffect( () => {
        const l = () => {
            r(document.hidden)
        }
        ;
        return document.addEventListener("visibilitychange", l),
        () => window.removeEventListener("visibilitychange", l)
    }
    , []),
    n
}
;
let sd = 1;
class i_ {
    constructor() {
        this.subscribe = r => (this.subscribers.push(r),
        () => {
            const l = this.subscribers.indexOf(r);
            this.subscribers.splice(l, 1)
        }
        ),
        this.publish = r => {
            this.subscribers.forEach(l => l(r))
        }
        ,
        this.addToast = r => {
            this.publish(r),
            this.toasts = [...this.toasts, r]
        }
        ,
        this.create = r => {
            var l;
            const {message: i, ...c} = r
              , u = typeof r?.id == "number" || ((l = r.id) == null ? void 0 : l.length) > 0 ? r.id : sd++
              , d = this.toasts.find(g => g.id === u)
              , h = r.dismissible === void 0 ? !0 : r.dismissible;
            return this.dismissedToasts.has(u) && this.dismissedToasts.delete(u),
            d ? this.toasts = this.toasts.map(g => g.id === u ? (this.publish({
                ...g,
                ...r,
                id: u,
                title: i
            }),
            {
                ...g,
                ...r,
                id: u,
                dismissible: h,
                title: i
            }) : g) : this.addToast({
                title: i,
                ...c,
                dismissible: h,
                id: u
            }),
            u
        }
        ,
        this.dismiss = r => (r ? (this.dismissedToasts.add(r),
        requestAnimationFrame( () => this.subscribers.forEach(l => l({
            id: r,
            dismiss: !0
        })))) : this.toasts.forEach(l => {
            this.subscribers.forEach(i => i({
                id: l.id,
                dismiss: !0
            }))
        }
        ),
        r),
        this.message = (r, l) => this.create({
            ...l,
            message: r
        }),
        this.error = (r, l) => this.create({
            ...l,
            message: r,
            type: "error"
        }),
        this.success = (r, l) => this.create({
            ...l,
            type: "success",
            message: r
        }),
        this.info = (r, l) => this.create({
            ...l,
            type: "info",
            message: r
        }),
        this.warning = (r, l) => this.create({
            ...l,
            type: "warning",
            message: r
        }),
        this.loading = (r, l) => this.create({
            ...l,
            type: "loading",
            message: r
        }),
        this.promise = (r, l) => {
            if (!l)
                return;
            let i;
            l.loading !== void 0 && (i = this.create({
                ...l,
                promise: r,
                type: "loading",
                message: l.loading,
                description: typeof l.description != "function" ? l.description : void 0
            }));
            const c = Promise.resolve(r instanceof Function ? r() : r);
            let u = i !== void 0, d;
            const h = c.then(async p => {
                if (d = ["resolve", p],
                F.isValidElement(p))
                    u = !1,
                    this.create({
                        id: i,
                        type: "default",
                        message: p
                    });
                else if (c_(p) && !p.ok) {
                    u = !1;
                    const v = typeof l.error == "function" ? await l.error(`HTTP error! status: ${p.status}`) : l.error
                      , w = typeof l.description == "function" ? await l.description(`HTTP error! status: ${p.status}`) : l.description
                      , R = typeof v == "object" && !F.isValidElement(v) ? v : {
                        message: v
                    };
                    this.create({
                        id: i,
                        type: "error",
                        description: w,
                        ...R
                    })
                } else if (p instanceof Error) {
                    u = !1;
                    const v = typeof l.error == "function" ? await l.error(p) : l.error
                      , w = typeof l.description == "function" ? await l.description(p) : l.description
                      , R = typeof v == "object" && !F.isValidElement(v) ? v : {
                        message: v
                    };
                    this.create({
                        id: i,
                        type: "error",
                        description: w,
                        ...R
                    })
                } else if (l.success !== void 0) {
                    u = !1;
                    const v = typeof l.success == "function" ? await l.success(p) : l.success
                      , w = typeof l.description == "function" ? await l.description(p) : l.description
                      , R = typeof v == "object" && !F.isValidElement(v) ? v : {
                        message: v
                    };
                    this.create({
                        id: i,
                        type: "success",
                        description: w,
                        ...R
                    })
                }
            }
            ).catch(async p => {
                if (d = ["reject", p],
                l.error !== void 0) {
                    u = !1;
                    const b = typeof l.error == "function" ? await l.error(p) : l.error
                      , v = typeof l.description == "function" ? await l.description(p) : l.description
                      , C = typeof b == "object" && !F.isValidElement(b) ? b : {
                        message: b
                    };
                    this.create({
                        id: i,
                        type: "error",
                        description: v,
                        ...C
                    })
                }
            }
            ).finally( () => {
                u && (this.dismiss(i),
                i = void 0),
                l.finally == null || l.finally.call(l)
            }
            )
              , g = () => new Promise( (p, b) => h.then( () => d[0] === "reject" ? b(d[1]) : p(d[1])).catch(b));
            return typeof i != "string" && typeof i != "number" ? {
                unwrap: g
            } : Object.assign(i, {
                unwrap: g
            })
        }
        ,
        this.custom = (r, l) => {
            const i = l?.id || sd++;
            return this.create({
                jsx: r(i),
                id: i,
                ...l
            }),
            i
        }
        ,
        this.getActiveToasts = () => this.toasts.filter(r => !this.dismissedToasts.has(r.id)),
        this.subscribers = [],
        this.toasts = [],
        this.dismissedToasts = new Set
    }
}
const zt = new i_
  , s_ = (n, r) => {
    const l = r?.id || sd++;
    return zt.addToast({
        title: n,
        ...r,
        id: l
    }),
    l
}
  , c_ = n => n && typeof n == "object" && "ok"in n && typeof n.ok == "boolean" && "status"in n && typeof n.status == "number"
  , u_ = s_
  , f_ = () => zt.toasts
  , d_ = () => zt.getActiveToasts()
  , dn = Object.assign(u_, {
    success: zt.success,
    info: zt.info,
    warning: zt.warning,
    error: zt.error,
    custom: zt.custom,
    message: zt.message,
    promise: zt.promise,
    dismiss: zt.dismiss,
    loading: zt.loading
}, {
    getHistory: f_,
    getToasts: d_
});
FN("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
function ws(n) {
    return n.label !== void 0
}
const m_ = 3
  , h_ = "24px"
  , p_ = "16px"
  , Gv = 4e3
  , g_ = 356
  , v_ = 14
  , y_ = 45
  , b_ = 200;
function En(...n) {
    return n.filter(Boolean).join(" ")
}
function x_(n) {
    const [r,l] = n.split("-")
      , i = [];
    return r && i.push(r),
    l && i.push(l),
    i
}
const w_ = n => {
    var r, l, i, c, u, d, h, g, p;
    const {invert: b, toast: v, unstyled: w, interacting: C, setHeights: R, visibleToasts: E, heights: A, index: T, toasts: D, expanded: N, removeToast: j, defaultRichColors: U, closeButton: K, style: Y, cancelButtonStyle: V, actionButtonStyle: $, className: ee="", descriptionClassName: se="", duration: W, position: te, gap: le, expandByDefault: de, classNames: _, icons: G, closeButtonAriaLabel: B="Close toast"} = n
      , [Q,ie] = F.useState(null)
      , [be,ve] = F.useState(null)
      , [J,ne] = F.useState(!1)
      , [pe,Ee] = F.useState(!1)
      , [Z,ce] = F.useState(!1)
      , [De,xe] = F.useState(!1)
      , [Ce,Ne] = F.useState(!1)
      , [ut,Tt] = F.useState(0)
      , [Ha,ra] = F.useState(0)
      , et = F.useRef(v.duration || W || Gv)
      , Ql = F.useRef(null)
      , $t = F.useRef(null)
      , Zl = T === 0
      , gr = T + 1 <= E
      , Rt = v.type
      , jn = v.dismissible !== !1
      , lc = v.className || ""
      , ic = v.descriptionClassName || ""
      , gn = F.useMemo( () => A.findIndex(ye => ye.toastId === v.id) || 0, [A, v.id])
      , At = F.useMemo( () => {
        var ye;
        return (ye = v.closeButton) != null ? ye : K
    }
    , [v.closeButton, K])
      , ln = F.useMemo( () => v.duration || W || Gv, [v.duration, W])
      , yt = F.useRef(0)
      , oa = F.useRef(0)
      , Fl = F.useRef(0)
      , la = F.useRef(null)
      , [vr,yr] = te.split("-")
      , vn = F.useMemo( () => A.reduce( (ye, Qe, tt) => tt >= gn ? ye : ye + Qe.height, 0), [A, gn])
      , Pa = l_()
      , Va = v.invert || b
      , Mo = Rt === "loading";
    oa.current = F.useMemo( () => gn * le + vn, [gn, vn]),
    F.useEffect( () => {
        et.current = ln
    }
    , [ln]),
    F.useEffect( () => {
        ne(!0)
    }
    , []),
    F.useEffect( () => {
        const ye = $t.current;
        if (ye) {
            const Qe = ye.getBoundingClientRect().height;
            return ra(Qe),
            R(tt => [{
                toastId: v.id,
                height: Qe,
                position: v.position
            }, ...tt]),
            () => R(tt => tt.filter(bt => bt.toastId !== v.id))
        }
    }
    , [R, v.id]),
    F.useLayoutEffect( () => {
        if (!J)
            return;
        const ye = $t.current
          , Qe = ye.style.height;
        ye.style.height = "auto";
        const tt = ye.getBoundingClientRect().height;
        ye.style.height = Qe,
        ra(tt),
        R(bt => bt.find(rt => rt.toastId === v.id) ? bt.map(rt => rt.toastId === v.id ? {
            ...rt,
            height: tt
        } : rt) : [{
            toastId: v.id,
            height: tt,
            position: v.position
        }, ...bt])
    }
    , [J, v.title, v.description, R, v.id, v.jsx, v.action, v.cancel]);
    const sn = F.useCallback( () => {
        Ee(!0),
        Tt(oa.current),
        R(ye => ye.filter(Qe => Qe.toastId !== v.id)),
        setTimeout( () => {
            j(v)
        }
        , b_)
    }
    , [v, j, R, oa]);
    F.useEffect( () => {
        if (v.promise && Rt === "loading" || v.duration === 1 / 0 || v.type === "loading")
            return;
        let ye;
        return N || C || Pa ? ( () => {
            if (Fl.current < yt.current) {
                const bt = new Date().getTime() - yt.current;
                et.current = et.current - bt
            }
            Fl.current = new Date().getTime()
        }
        )() : ( () => {
            et.current !== 1 / 0 && (yt.current = new Date().getTime(),
            ye = setTimeout( () => {
                v.onAutoClose == null || v.onAutoClose.call(v, v),
                sn()
            }
            , et.current))
        }
        )(),
        () => clearTimeout(ye)
    }
    , [N, C, v, Rt, Pa, sn]),
    F.useEffect( () => {
        v.delete && (sn(),
        v.onDismiss == null || v.onDismiss.call(v, v))
    }
    , [sn, v.delete]);
    function Wl() {
        var ye;
        if (G?.loading) {
            var Qe;
            return F.createElement("div", {
                className: En(_?.loader, v == null || (Qe = v.classNames) == null ? void 0 : Qe.loader, "sonner-loader"),
                "data-visible": Rt === "loading"
            }, G.loading)
        }
        return F.createElement(e_, {
            className: En(_?.loader, v == null || (ye = v.classNames) == null ? void 0 : ye.loader),
            visible: Rt === "loading"
        })
    }
    const No = v.icon || G?.[Rt] || WN(Rt);
    var ia, Jl;
    return F.createElement("li", {
        tabIndex: 0,
        ref: $t,
        className: En(ee, lc, _?.toast, v == null || (r = v.classNames) == null ? void 0 : r.toast, _?.default, _?.[Rt], v == null || (l = v.classNames) == null ? void 0 : l[Rt]),
        "data-sonner-toast": "",
        "data-rich-colors": (ia = v.richColors) != null ? ia : U,
        "data-styled": !(v.jsx || v.unstyled || w),
        "data-mounted": J,
        "data-promise": !!v.promise,
        "data-swiped": Ce,
        "data-removed": pe,
        "data-visible": gr,
        "data-y-position": vr,
        "data-x-position": yr,
        "data-index": T,
        "data-front": Zl,
        "data-swiping": Z,
        "data-dismissible": jn,
        "data-type": Rt,
        "data-invert": Va,
        "data-swipe-out": De,
        "data-swipe-direction": be,
        "data-expanded": !!(N || de && J),
        "data-testid": v.testId,
        style: {
            "--index": T,
            "--toasts-before": T,
            "--z-index": D.length - T,
            "--offset": `${pe ? ut : oa.current}px`,
            "--initial-height": de ? "auto" : `${Ha}px`,
            ...Y,
            ...v.style
        },
        onDragEnd: () => {
            ce(!1),
            ie(null),
            la.current = null
        }
        ,
        onPointerDown: ye => {
            ye.button !== 2 && (Mo || !jn || (Ql.current = new Date,
            Tt(oa.current),
            ye.target.setPointerCapture(ye.pointerId),
            ye.target.tagName !== "BUTTON" && (ce(!0),
            la.current = {
                x: ye.clientX,
                y: ye.clientY
            })))
        }
        ,
        onPointerUp: () => {
            var ye, Qe, tt;
            if (De || !jn)
                return;
            la.current = null;
            const bt = Number(((ye = $t.current) == null ? void 0 : ye.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0)
              , Ga = Number(((Qe = $t.current) == null ? void 0 : Qe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0)
              , rt = new Date().getTime() - ((tt = Ql.current) == null ? void 0 : tt.getTime())
              , Ze = Q === "x" ? bt : Ga
              , Fe = Math.abs(Ze) / rt;
            if (Math.abs(Ze) >= y_ || Fe > .11) {
                Tt(oa.current),
                v.onDismiss == null || v.onDismiss.call(v, v),
                ve(Q === "x" ? bt > 0 ? "right" : "left" : Ga > 0 ? "down" : "up"),
                sn(),
                xe(!0);
                return
            } else {
                var Ge, ft;
                (Ge = $t.current) == null || Ge.style.setProperty("--swipe-amount-x", "0px"),
                (ft = $t.current) == null || ft.style.setProperty("--swipe-amount-y", "0px")
            }
            Ne(!1),
            ce(!1),
            ie(null)
        }
        ,
        onPointerMove: ye => {
            var Qe, tt, bt;
            if (!la.current || !jn || ((Qe = window.getSelection()) == null ? void 0 : Qe.toString().length) > 0)
                return;
            const rt = ye.clientY - la.current.y
              , Ze = ye.clientX - la.current.x;
            var Fe;
            const Ge = (Fe = n.swipeDirections) != null ? Fe : x_(te);
            !Q && (Math.abs(Ze) > 1 || Math.abs(rt) > 1) && ie(Math.abs(Ze) > Math.abs(rt) ? "x" : "y");
            let ft = {
                x: 0,
                y: 0
            };
            const br = kn => 1 / (1.5 + Math.abs(kn) / 20);
            if (Q === "y") {
                if (Ge.includes("top") || Ge.includes("bottom"))
                    if (Ge.includes("top") && rt < 0 || Ge.includes("bottom") && rt > 0)
                        ft.y = rt;
                    else {
                        const kn = rt * br(rt);
                        ft.y = Math.abs(kn) < Math.abs(rt) ? kn : rt
                    }
            } else if (Q === "x" && (Ge.includes("left") || Ge.includes("right")))
                if (Ge.includes("left") && Ze < 0 || Ge.includes("right") && Ze > 0)
                    ft.x = Ze;
                else {
                    const kn = Ze * br(Ze);
                    ft.x = Math.abs(kn) < Math.abs(Ze) ? kn : Ze
                }
            (Math.abs(ft.x) > 0 || Math.abs(ft.y) > 0) && Ne(!0),
            (tt = $t.current) == null || tt.style.setProperty("--swipe-amount-x", `${ft.x}px`),
            (bt = $t.current) == null || bt.style.setProperty("--swipe-amount-y", `${ft.y}px`)
        }
    }, At && !v.jsx && Rt !== "loading" ? F.createElement("button", {
        "aria-label": B,
        "data-disabled": Mo,
        "data-close-button": !0,
        onClick: Mo || !jn ? () => {}
        : () => {
            sn(),
            v.onDismiss == null || v.onDismiss.call(v, v)
        }
        ,
        className: En(_?.closeButton, v == null || (i = v.classNames) == null ? void 0 : i.closeButton)
    }, (Jl = G?.close) != null ? Jl : o_) : null, (Rt || v.icon || v.promise) && v.icon !== null && (G?.[Rt] !== null || v.icon) ? F.createElement("div", {
        "data-icon": "",
        className: En(_?.icon, v == null || (c = v.classNames) == null ? void 0 : c.icon)
    }, v.promise || v.type === "loading" && !v.icon ? v.icon || Wl() : null, v.type !== "loading" ? No : null) : null, F.createElement("div", {
        "data-content": "",
        className: En(_?.content, v == null || (u = v.classNames) == null ? void 0 : u.content)
    }, F.createElement("div", {
        "data-title": "",
        className: En(_?.title, v == null || (d = v.classNames) == null ? void 0 : d.title)
    }, v.jsx ? v.jsx : typeof v.title == "function" ? v.title() : v.title), v.description ? F.createElement("div", {
        "data-description": "",
        className: En(se, ic, _?.description, v == null || (h = v.classNames) == null ? void 0 : h.description)
    }, typeof v.description == "function" ? v.description() : v.description) : null), F.isValidElement(v.cancel) ? v.cancel : v.cancel && ws(v.cancel) ? F.createElement("button", {
        "data-button": !0,
        "data-cancel": !0,
        style: v.cancelButtonStyle || V,
        onClick: ye => {
            ws(v.cancel) && jn && (v.cancel.onClick == null || v.cancel.onClick.call(v.cancel, ye),
            sn())
        }
        ,
        className: En(_?.cancelButton, v == null || (g = v.classNames) == null ? void 0 : g.cancelButton)
    }, v.cancel.label) : null, F.isValidElement(v.action) ? v.action : v.action && ws(v.action) ? F.createElement("button", {
        "data-button": !0,
        "data-action": !0,
        style: v.actionButtonStyle || $,
        onClick: ye => {
            ws(v.action) && (v.action.onClick == null || v.action.onClick.call(v.action, ye),
            !ye.defaultPrevented && sn())
        }
        ,
        className: En(_?.actionButton, v == null || (p = v.classNames) == null ? void 0 : p.actionButton)
    }, v.action.label) : null)
}
;
function Yv() {
    if (typeof window > "u" || typeof document > "u")
        return "ltr";
    const n = document.documentElement.getAttribute("dir");
    return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n
}
function S_(n, r) {
    const l = {};
    return [n, r].forEach( (i, c) => {
        const u = c === 1
          , d = u ? "--mobile-offset" : "--offset"
          , h = u ? p_ : h_;
        function g(p) {
            ["top", "right", "bottom", "left"].forEach(b => {
                l[`${d}-${b}`] = typeof p == "number" ? `${p}px` : p
            }
            )
        }
        typeof i == "number" || typeof i == "string" ? g(i) : typeof i == "object" ? ["top", "right", "bottom", "left"].forEach(p => {
            i[p] === void 0 ? l[`${d}-${p}`] = h : l[`${d}-${p}`] = typeof i[p] == "number" ? `${i[p]}px` : i[p]
        }
        ) : g(h)
    }
    ),
    l
}
const E_ = F.forwardRef(function(r, l) {
    const {id: i, invert: c, position: u="bottom-right", hotkey: d=["altKey", "KeyT"], expand: h, closeButton: g, className: p, offset: b, mobileOffset: v, theme: w="light", richColors: C, duration: R, style: E, visibleToasts: A=m_, toastOptions: T, dir: D=Yv(), gap: N=v_, icons: j, containerAriaLabel: U="Notifications"} = r
      , [K,Y] = F.useState([])
      , V = F.useMemo( () => i ? K.filter(J => J.toasterId === i) : K.filter(J => !J.toasterId), [K, i])
      , $ = F.useMemo( () => Array.from(new Set([u].concat(V.filter(J => J.position).map(J => J.position)))), [V, u])
      , [ee,se] = F.useState([])
      , [W,te] = F.useState(!1)
      , [le,de] = F.useState(!1)
      , [_,G] = F.useState(w !== "system" ? w : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light")
      , B = F.useRef(null)
      , Q = d.join("+").replace(/Key/g, "").replace(/Digit/g, "")
      , ie = F.useRef(null)
      , be = F.useRef(!1)
      , ve = F.useCallback(J => {
        Y(ne => {
            var pe;
            return (pe = ne.find(Ee => Ee.id === J.id)) != null && pe.delete || zt.dismiss(J.id),
            ne.filter( ({id: Ee}) => Ee !== J.id)
        }
        )
    }
    , []);
    return F.useEffect( () => zt.subscribe(J => {
        if (J.dismiss) {
            requestAnimationFrame( () => {
                Y(ne => ne.map(pe => pe.id === J.id ? {
                    ...pe,
                    delete: !0
                } : pe))
            }
            );
            return
        }
        setTimeout( () => {
            fy.flushSync( () => {
                Y(ne => {
                    const pe = ne.findIndex(Ee => Ee.id === J.id);
                    return pe !== -1 ? [...ne.slice(0, pe), {
                        ...ne[pe],
                        ...J
                    }, ...ne.slice(pe + 1)] : [J, ...ne]
                }
                )
            }
            )
        }
        )
    }
    ), [K]),
    F.useEffect( () => {
        if (w !== "system") {
            G(w);
            return
        }
        if (w === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? G("dark") : G("light")),
        typeof window > "u")
            return;
        const J = window.matchMedia("(prefers-color-scheme: dark)");
        try {
            J.addEventListener("change", ({matches: ne}) => {
                G(ne ? "dark" : "light")
            }
            )
        } catch {
            J.addListener( ({matches: pe}) => {
                try {
                    G(pe ? "dark" : "light")
                } catch (Ee) {
                    console.error(Ee)
                }
            }
            )
        }
    }
    , [w]),
    F.useEffect( () => {
        K.length <= 1 && te(!1)
    }
    , [K]),
    F.useEffect( () => {
        const J = ne => {
            var pe;
            if (d.every(ce => ne[ce] || ne.code === ce)) {
                var Z;
                te(!0),
                (Z = B.current) == null || Z.focus()
            }
            ne.code === "Escape" && (document.activeElement === B.current || (pe = B.current) != null && pe.contains(document.activeElement)) && te(!1)
        }
        ;
        return document.addEventListener("keydown", J),
        () => document.removeEventListener("keydown", J)
    }
    , [d]),
    F.useEffect( () => {
        if (B.current)
            return () => {
                ie.current && (ie.current.focus({
                    preventScroll: !0
                }),
                ie.current = null,
                be.current = !1)
            }
    }
    , [B.current]),
    F.createElement("section", {
        ref: l,
        "aria-label": `${U} ${Q}`,
        tabIndex: -1,
        "aria-live": "polite",
        "aria-relevant": "additions text",
        "aria-atomic": "false",
        suppressHydrationWarning: !0
    }, $.map( (J, ne) => {
        var pe;
        const [Ee,Z] = J.split("-");
        return V.length ? F.createElement("ol", {
            key: J,
            dir: D === "auto" ? Yv() : D,
            tabIndex: -1,
            ref: B,
            className: p,
            "data-sonner-toaster": !0,
            "data-sonner-theme": _,
            "data-y-position": Ee,
            "data-x-position": Z,
            style: {
                "--front-toast-height": `${((pe = ee[0]) == null ? void 0 : pe.height) || 0}px`,
                "--width": `${g_}px`,
                "--gap": `${N}px`,
                ...E,
                ...S_(b, v)
            },
            onBlur: ce => {
                be.current && !ce.currentTarget.contains(ce.relatedTarget) && (be.current = !1,
                ie.current && (ie.current.focus({
                    preventScroll: !0
                }),
                ie.current = null))
            }
            ,
            onFocus: ce => {
                ce.target instanceof HTMLElement && ce.target.dataset.dismissible === "false" || be.current || (be.current = !0,
                ie.current = ce.relatedTarget)
            }
            ,
            onMouseEnter: () => te(!0),
            onMouseMove: () => te(!0),
            onMouseLeave: () => {
                le || te(!1)
            }
            ,
            onDragEnd: () => te(!1),
            onPointerDown: ce => {
                ce.target instanceof HTMLElement && ce.target.dataset.dismissible === "false" || de(!0)
            }
            ,
            onPointerUp: () => de(!1)
        }, V.filter(ce => !ce.position && ne === 0 || ce.position === J).map( (ce, De) => {
            var xe, Ce;
            return F.createElement(w_, {
                key: ce.id,
                icons: j,
                index: De,
                toast: ce,
                defaultRichColors: C,
                duration: (xe = T?.duration) != null ? xe : R,
                className: T?.className,
                descriptionClassName: T?.descriptionClassName,
                invert: c,
                visibleToasts: A,
                closeButton: (Ce = T?.closeButton) != null ? Ce : g,
                interacting: le,
                position: J,
                style: T?.style,
                unstyled: T?.unstyled,
                classNames: T?.classNames,
                cancelButtonStyle: T?.cancelButtonStyle,
                actionButtonStyle: T?.actionButtonStyle,
                closeButtonAriaLabel: T?.closeButtonAriaLabel,
                removeToast: ve,
                toasts: V.filter(Ne => Ne.position == ce.position),
                heights: ee.filter(Ne => Ne.position == ce.position),
                setHeights: se,
                expandByDefault: h,
                gap: N,
                expanded: W,
                swipeDirections: r.swipeDirections
            })
        }
        )) : null
    }
    ))
})
  , C_ = ({isOpen: n, onClose: r}) => {
    const {t: l} = _t()
      , i = Nt()
      , {publicSettings: c, updatePreviewConfig: u, reloadConfig: d} = i
      , [h,g] = m.useState([])
      , [p,b] = m.useState({})
      , [v,w] = m.useState("main")
      , [C,R] = m.useState("main")
      , [E,A] = m.useState(!0)
      , T = mr()
      , [D,N] = m.useState(!1)
      , j = m.useRef(null);
    m.useEffect( () => {
        (async () => {
            if (c?.theme)
                try {
                    const le = await (await fetch(`/themes/${c.theme}/komari-theme.json`)).json();
                    g(le.configuration.data)
                } catch (te) {
                    console.error(l("setting.fetchError"), te)
                }
        }
        )()
    }
    , [c?.theme, l]),
    m.useEffect( () => {
        b(c?.theme_settings || {})
    }
    , [c?.theme_settings]),
    m.useEffect( () => {
        u(p);
        const W = JSON.stringify(p) !== JSON.stringify(c?.theme_settings || {});
        N(W)
    }
    , [p, c?.theme_settings, u]),
    m.useEffect( () => () => {
        j.current && dn.dismiss(j.current)
    }
    , []);
    const U = (W, te) => {
        const le = {
            ...p,
            [W]: te
        };
        b(le),
        E && u(le)
    }
      , K = m.useCallback(async () => {
        try {
            await Fn.saveThemeSettings(c?.theme || "", p),
            dn.success(l("setting.saveSuccess")),
            j.current && (dn.dismiss(j.current),
            j.current = null),
            await d(),
            r()
        } catch (W) {
            console.error(l("setting.saveThemeError"), W),
            dn.error(l("setting.saveError"))
        }
    }
    , [p, r, c, d, l])
      , Y = () => {
        dn(l("setting.resetConfirm"), {
            action: {
                label: l("setting.resetConfirmAction"),
                onClick: () => {
                    b(Lt),
                    j.current && (dn.dismiss(j.current),
                    j.current = null)
                }
            }
        })
    }
    ;
    m.useEffect( () => {
        D && !j.current ? j.current = dn(l("setting.unsavedChanges"), {
            duration: 1 / 0,
            cancel: {
                label: l("setting.cancel"),
                onClick: async () => {
                    await d(),
                    dn.success(l("setting.unsavedChangesDesc"))
                }
            }
        }) : !D && j.current && (dn.dismiss(j.current),
        j.current = null)
    }
    , [D, d, l]);
    const V = () => {
        E ? (u({}),
        A(!1)) : (u(p),
        A(!0))
    }
      , $ = () => {
        const W = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(c?.theme_settings || {}))
          , te = document.createElement("a");
        te.setAttribute("href", W),
        te.setAttribute("download", "komari-theme-config.json"),
        document.body.appendChild(te),
        te.click(),
        te.remove()
    }
      , ee = W => {
        const te = W.target.files?.[0];
        if (te) {
            const le = new FileReader;
            le.onload = de => {
                try {
                    const _ = JSON.parse(de.target?.result)
                      , G = {};
                    for (const B in Lt)
                        Object.prototype.hasOwnProperty.call(_, B) && (G[B] = _[B]);
                    b(G),
                    dn.success(l("setting.importSuccess"), {
                        action: {
                            label: l("setting.save"),
                            onClick: () => setTimeout( () => K(), 300)
                        }
                    })
                } catch (_) {
                    console.error(l("setting.importConfigError"), _),
                    dn.error(l("setting.importError"))
                }
            }
            ,
            le.readAsText(te)
        }
    }
      , se = T ? "fixed bottom-0 left-0 w-full h-3/4 bg-gray-100/90 dark:bg-gray-900/90 theme-card-style shadow-lg z-50 p-4 overflow-y-auto transform transition-transform duration-300 ease-in-out" : "h-screen w-(--setting-width) bg-gray-100/90 dark:bg-gray-900/90 theme-card-style shadow-lg p-4 overflow-y-auto flex-shrink-0";
    return n ? y.jsxs("div", {
        className: se,
        children: [y.jsxs("div", {
            className: "flex justify-between items-center mb-4",
            children: [y.jsx("h2", {
                className: "text-xl font-bold",
                children: l("setting.title")
            }), y.jsx(gt, {
                onClick: () => {
                    E && u({}),
                    r()
                }
                ,
                variant: "ghost",
                children: l("setting.close")
            })]
        }), y.jsxs("div", {
            className: "flex flex-wrap gap-2 mb-4",
            children: [y.jsx(gt, {
                asChild: !0,
                children: y.jsxs("label", {
                    htmlFor: "import-config",
                    children: [l("setting.import"), y.jsx("input", {
                        id: "import-config",
                        type: "file",
                        accept: ".json",
                        className: "hidden",
                        onChange: ee
                    })]
                })
            }), y.jsx(gt, {
                onClick: $,
                children: l("setting.export")
            }), y.jsx(gt, {
                onClick: V,
                children: l(E ? "setting.togglePreview.on" : "setting.togglePreview.off")
            }), y.jsx(gt, {
                onClick: Y,
                children: l("setting.reset")
            }), y.jsx(gt, {
                onClick: K,
                className: "bg-green-500",
                children: l("setting.save")
            })]
        }), y.jsxs("div", {
            className: "flex items-center mb-4",
            children: [y.jsx("span", {
                onClick: () => {
                    v === "main" && C === "main" || (C !== "main" ? R("main") : w("main"))
                }
                ,
                className: `mr-2 cursor-pointer hover:underline ${v === "main" && C === "main" ? "invisible" : ""}`,
                children: y.jsx(YM, {
                    className: "h-4 w-4"
                })
            }), y.jsxs("div", {
                className: "text-sm text-gray-500 dark:text-gray-400 flex items-center flex-wrap",
                children: [y.jsx("span", {
                    className: v !== "main" ? "cursor-pointer hover:underline" : "cursor-default",
                    onClick: () => {
                        v !== "main" && (w("main"),
                        R("main"))
                    }
                    ,
                    children: l("setting.home")
                }), v !== "main" && y.jsxs(y.Fragment, {
                    children: [y.jsx("span", {
                        className: "mx-1",
                        children: "/"
                    }), y.jsx("span", {
                        className: v === l("setting.customUI") && C !== "main" ? "cursor-pointer hover:underline" : "cursor-default",
                        onClick: () => {
                            v === l("setting.customUI") && R("main")
                        }
                        ,
                        children: v
                    })]
                }), v === l("setting.customUI") && C !== "main" && y.jsxs(y.Fragment, {
                    children: [y.jsx("span", {
                        className: "mx-1",
                        children: "/"
                    }), y.jsx("span", {
                        className: "cursor-default",
                        children: sr[C]?._ || C
                    })]
                })]
            })]
        }), y.jsx("div", {
            className: "space-y-4",
            children: v === "main" ? h.filter(W => W.type === "title").map(W => y.jsx(gt, {
                onClick: () => w(W.name),
                className: "w-full justify-start",
                children: W.name
            }, W.name)) : y.jsx(y.Fragment, {
                children: h.slice(h.findIndex(W => W.name === v) + 1, h.findIndex( (W, te) => te > h.findIndex(le => le.name === v) && W.type === "title") === -1 ? h.length : h.findIndex( (W, te) => te > h.findIndex(le => le.name === v) && W.type === "title")).map(W => W.key === "customTexts" ? y.jsx(ZN, {
                    value: p.customTexts || "",
                    onChange: te => U("customTexts", te),
                    page: C,
                    onPageChange: R
                }, W.key) : y.jsx(QN, {
                    item: W,
                    editingConfig: p,
                    onConfigChange: U
                }, W.key || W.name))
            })
        })]
    }) : null
}
  , T_ = ({...n}) => {
    const {appearance: r="system"} = Ao();
    return y.jsx(E_, {
        theme: r,
        className: "toaster group",
        position: "top-center",
        toastOptions: {
            classNames: {
                toast: "group toast purcarte-blur theme-card-style !text-foreground !text-sm",
                description: "text-secondary-foreground",
                actionButton: "theme-button !text-primary !text-sm inset-shadow-xs inset-shadow-(color:--accent-a4)",
                cancelButton: "theme-button-ghost !text-secondary-foreground !text-sm inset-shadow-xs inset-shadow-(color:--accent-a4)"
            }
        },
        ...n
    })
}
  , R_ = m.lazy( () => Us( () => import("./chunk-Home-DjiTwsgP.js"), __vite__mapDeps([0, 1, 2, 3, 4])))
  , A_ = m.lazy( () => Us( () => import("./chunk-index-CqfZ9x-B.js"), __vite__mapDeps([5, 1, 4])))
  , M_ = m.lazy( () => Us( () => import("./chunk-NotFound-Dnb-a4KN.js"), __vite__mapDeps([6, 4])))
  , N_ = m.lazy( () => Us( () => import("./chunk-Private-DyxNhVGz.js"), __vite__mapDeps([7, 4])))
  , qv = {
    position: 0
}
  , __ = ({searchTerm: n, setSearchTerm: r, isSettingsOpen: l, setIsSettingsOpen: i, headerRef: c, headerHeight: u, footerHeight: d}) => {
    const h = na()
      , {loading: g, groups: p, filteredNodes: b, stats: v, selectedGroup: w, setSelectedGroup: C, handleSort: R} = qN(n)
      , {statusCardsVisibility: E, setStatusCardsVisibility: A} = Ao()
      , {enableGroupedBar: T, selectedHeaderStyle: D, selectedFooterStyle: N} = Nt()
      , j = {
        displayOptions: E,
        setDisplayOptions: A,
        stats: v,
        loading: g,
        enableGroupedBar: T,
        groups: p,
        selectedGroup: w,
        onSelectGroup: C,
        onSort: R
    }
      , U = m.useRef(null)
      , K = m.useRef(null)
      , Y = () => {
        h.pathname === "/" && U.current && (qv.position = U.current.scrollTop)
    }
    ;
    return m.useEffect( () => {
        if (h.pathname === "/") {
            const V = setTimeout( () => {
                U.current && (U.current.scrollTop = qv.position)
            }
            , 100);
            return () => clearTimeout(V)
        }
    }
    , [h.pathname]),
    m.useEffect( () => {
        if (!h.pathname.startsWith("/instance"))
            return;
        const V = requestAnimationFrame( () => {
            K.current?.scrollTo({
                top: 0
            })
        }
        );
        return () => cancelAnimationFrame(V)
    }
    , [h.pathname]),
    y.jsxs(y.Fragment, {
        children: [y.jsx(Ox, {
            ref: c,
            searchTerm: n,
            setSearchTerm: r,
            setIsSettingsOpen: i,
            isSettingsOpen: l,
            ...j
        }), y.jsx("div", {
            className: "flex-1 min-h-0",
            children: y.jsx(m.Suspense, {
                fallback: y.jsx(Kd, {}),
                children: y.jsxs(X1, {
                    children: [y.jsx(Ss, {
                        path: "/",
                        element: y.jsx(rd, {
                            className: "h-full",
                            viewportRef: U,
                            viewportProps: {
                                onScroll: Y
                            },
                            children: y.jsxs("div", {
                                className: "flex flex-col min-h-screen",
                                children: [y.jsx("main", {
                                    className: "w-(--main-width) max-w-screen-2xl mx-auto h-full flex-grow",
                                    style: {
                                        paddingTop: D === "levitation" ? u : 0,
                                        paddingBottom: N === "levitation" ? d : 0
                                    },
                                    children: y.jsx(R_, {
                                        searchTerm: n,
                                        setSearchTerm: r,
                                        filteredNodes: b,
                                        selectedGroup: w,
                                        setSelectedGroup: C,
                                        stats: v,
                                        groups: p,
                                        handleSort: R
                                    })
                                }), N === "followContent" && y.jsx(Ol, {
                                    isSettingsOpen: l,
                                    ref: null
                                })]
                            })
                        })
                    }), y.jsx(Ss, {
                        path: "/instance/:uuid",
                        element: y.jsx(rd, {
                            className: "h-full",
                            viewportRef: K,
                            children: y.jsxs("div", {
                                className: "flex flex-col min-h-screen",
                                children: [y.jsx("main", {
                                    className: "w-(--main-width) max-w-screen-2xl h-full mx-auto flex-1",
                                    style: {
                                        paddingTop: D === "levitation" ? u : 0,
                                        paddingBottom: N === "levitation" ? d : 0
                                    },
                                    children: y.jsx(A_, {})
                                }), N === "followContent" && y.jsx(Ol, {
                                    isSettingsOpen: l,
                                    ref: null
                                })]
                            })
                        })
                    }), y.jsx(Ss, {
                        path: "*",
                        element: y.jsxs("div", {
                            className: "flex flex-col min-h-screen",
                            children: [y.jsx("main", {
                                className: "w-(--main-width) max-w-screen-2xl h-full mx-auto flex-1",
                                children: y.jsx(M_, {})
                            }), N === "followContent" && y.jsx(Ol, {
                                isSettingsOpen: l,
                                ref: null
                            })]
                        })
                    })]
                })
            })
        })]
    })
}
  , O_ = () => {
    const {siteStatus: n, mainWidth: r, selectedFooterStyle: l} = Nt()
      , {appearance: i, color: c} = Ao()
      , [u,d] = m.useState("")
      , [h,g] = m.useState(!1)
      , p = mr()
      , b = m.useRef(null)
      , [v,w] = m.useState(0)
      , C = m.useRef(null)
      , [R,E] = m.useState(0);
    return m.useEffect( () => {
        const A = C.current;
        if (!A)
            return;
        const T = new ResizeObserver( () => {
            E(A.offsetHeight)
        }
        );
        return T.observe(A),
        () => {
            T.disconnect()
        }
    }
    , []),
    m.useEffect( () => {
        const A = b.current;
        if (!A)
            return;
        const T = new ResizeObserver( () => {
            w(A.offsetHeight)
        }
        );
        return T.observe(A),
        () => {
            T.disconnect()
        }
    }
    , []),
    m.useEffect( () => {
        h && !p ? document.documentElement.style.setProperty("--main-width", `calc(${r}vw - var(--setting-width))`) : document.documentElement.style.setProperty("--main-width", `${r}vw`)
    }
    , [h, p, r]),
    y.jsxs($l, {
        appearance: i,
        accentColor: c,
        scaling: "110%",
        style: {
            backgroundColor: "transparent"
        },
        children: [y.jsx(T_, {}), y.jsx(UN, {
            children: y.jsxs("div", {
                className: `grid h-dvh transition-all duration-300 ${h && !p ? "grid-cols-[1fr_auto]" : "grid-cols-[1fr]"} overflow-hidden`,
                children: [y.jsxs("div", {
                    className: "flex flex-col text-sm flex-1 overflow-hidden",
                    children: [n === "private-unauthenticated" ? y.jsxs(y.Fragment, {
                        children: [y.jsx(Ox, {
                            isPrivate: !0,
                            setIsSettingsOpen: g
                        }), y.jsx(m.Suspense, {
                            fallback: y.jsx(Kd, {}),
                            children: y.jsxs("div", {
                                className: "flex flex-col min-h-screen",
                                children: [y.jsx("main", {
                                    className: "w-(--main-width) max-w-screen-2xl h-full mx-auto flex-1",
                                    children: y.jsx(N_, {})
                                }), l === "followContent" && y.jsx(Ol, {
                                    isSettingsOpen: h,
                                    ref: null
                                })]
                            })
                        })]
                    }) : y.jsx(__, {
                        searchTerm: u,
                        setSearchTerm: d,
                        isSettingsOpen: h,
                        setIsSettingsOpen: g,
                        headerRef: C,
                        headerHeight: R,
                        footerHeight: v
                    }), l !== "followContent" && l !== "hidden" && y.jsx(Ol, {
                        ref: b,
                        isSettingsOpen: h
                    })]
                }), y.jsx(C_, {
                    isOpen: h,
                    onClose: () => g(!1)
                })]
            })
        })]
    })
}
  , D_ = ({siteStatus: n, children: r}) => n === "private-unauthenticated" ? y.jsx(y.Fragment, {
    children: r
}) : y.jsx(VN, {
    children: y.jsx(YN, {
        children: r
    })
})
  , j_ = () => {
    const n = EN()
      , {siteStatus: r} = Nt();
    return y.jsx(HN, {
        value: n,
        children: y.jsx(D_, {
            siteStatus: r,
            children: y.jsx(O_, {})
        })
    })
}
;
t1.createRoot(document.getElementById("root")).render(y.jsx(m.StrictMode, {
    children: y.jsx(bN, {
        children: y.jsx(pE, {
            children: y.jsx(j_, {})
        })
    })
}));
export {Nd as $, _1 as A, gt as B, oc as C, GN as D, YM as E, lx as F, mo as G, aa as H, Da as I, Oe as J, ue as K, cy as L, xo as M, vd as N, yd as O, Me as P, fo as Q, F as R, dy as S, _y as T, wy as U, gd as V, Ys as W, L_ as X, Eo as Y, Md as Z, Us as _, _e as a, _d as a0, Od as a1, $l as a2, Wd as a3, $_ as b, ct as c, _t as d, rd as e, K_ as f, X_ as g, NN as h, _N as i, y as j, DN as k, _l as l, I_ as m, q_ as n, ZM as o, Ao as p, jx as q, m as r, mr as s, Kd as t, Nt as u, kN as v, ON as w, jN as x, DA as y, z_ as z};
