Vencord

A Discord client mod - Web version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            Vencord
// @description     A Discord client mod - Web version
// @version         1.14.5.1773181847034
// @author          Vendicated (https://github.com/Vendicated)
// @namespace       https://github.com/Vendicated/Vencord
// @supportURL      https://github.com/Vendicated/Vencord
// @icon            https://raw.githubusercontent.com/Vendicated/Vencord/refs/heads/main/browser/icon.png
// @license         GPL-3.0
// @match           *://*.discord.com/*
// @grant           GM_xmlhttpRequest
// @grant           unsafeWindow
// @run-at          document-start
// @compatible      chrome Chrome + Tampermonkey or Violentmonkey
// @compatible      firefox Firefox Tampermonkey
// @compatible      opera Opera + Tampermonkey or Violentmonkey
// @compatible      edge Edge + Tampermonkey or Violentmonkey
// @compatible      safari Safari + Tampermonkey or Violentmonkey
// ==/UserScript==


// this UserScript DOES NOT work on Firefox with Violentmonkey or Greasemonkey due to a bug that makes it impossible
// to overwrite stuff on the window on sites that use CSP. Use Tampermonkey or use a chromium based browser
// https://github.com/violentmonkey/violentmonkey/issues/997

// this is a compiled version of Vencord. For the source code, visit the GitHub repo

// ==UserScript==
// @name            Vencord
// @description     A Discord client mod - Web version
// @version         1.14.5.1773181847034
// @author          Vendicated (https://github.com/Vendicated)
// @namespace       https://github.com/Vendicated/Vencord
// @supportURL      https://github.com/Vendicated/Vencord
// @icon            https://raw.githubusercontent.com/Vendicated/Vencord/refs/heads/main/browser/icon.png
// @license         GPL-3.0
// @match           *://*.discord.com/*
// @grant           GM_xmlhttpRequest
// @grant           unsafeWindow
// @run-at          document-start
// @compatible      chrome Chrome + Tampermonkey or Violentmonkey
// @compatible      firefox Firefox Tampermonkey
// @compatible      opera Opera + Tampermonkey or Violentmonkey
// @compatible      edge Edge + Tampermonkey or Violentmonkey
// @compatible      safari Safari + Tampermonkey or Violentmonkey
// ==/UserScript==

// this UserScript DOES NOT work on Firefox with Violentmonkey or Greasemonkey due to a bug that makes it impossible
// to overwrite stuff on the window on sites that use CSP. Use Tampermonkey or use a chromium based browser
// https://github.com/violentmonkey/violentmonkey/issues/997

// this is a compiled and minified version of Vencord. For the source code, visit the GitHub repo

"use strict";
var Vencord = (() => {
    var pT = Object.create;
    var Xc = Object.defineProperty;
    var dT = Object.getOwnPropertyDescriptor;
    var mT = Object.getOwnPropertyNames;
    var fT = Object.getPrototypeOf,
        gT = Object.prototype.hasOwnProperty;
    var he = (e, t) => () => (e && (t = e((e = 0))), t);
    var hT = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports),
        Ke = (e, t) => {
            for (var o in t) Xc(e, o, { get: t[o], enumerable: !0 });
        },
        Cv = (e, t, o, n) => {
            if ((t && typeof t == "object") || typeof t == "function")
                for (let i of mT(t))
                    !gT.call(e, i) &&
                        i !== o &&
                        Xc(e, i, { get: () => t[i], enumerable: !(n = dT(t, i)) || n.enumerable });
            return e;
        };
    var Nv = (e, t, o) => (
            (o = e != null ? pT(fT(e)) : {}),
            Cv(t || !e || !e.__esModule ? Xc(o, "default", { value: e, enumerable: !0 }) : o, e)
        ),
        ka = (e) => Cv(Xc({}, "__esModule", { value: !0 }), e);
    function yT(e) {
        let t = new Headers();
        if (!e) return t;
        let o = e.trim().split(`
`);
        for (var n = 0; n < o.length; n++) {
            var i = o[n],
                s = i.indexOf(":"),
                c = i.slice(0, s).trim().toLowerCase(),
                u = i.slice(s + 1).trim();
            t.append(c, u);
        }
        return t;
    }
    function wg(e, t) {
        return e === "arrayBuffer" && t.arrayBuffer
            ? t.arrayBuffer()
            : new Promise((o, n) => {
                  var i = new FileReader();
                  (i.onload = (s) => o(s.target.result)),
                      e === "arrayBuffer"
                          ? i.readAsArrayBuffer(t)
                          : e === "text"
                            ? i.readAsText(t, "utf-8")
                            : n("unknown to");
              });
    }
    function vT(e, t) {
        return new Promise((o, n) => {
            let i = t || {};
            (i.url = e),
                (i.data = i.body),
                (i.responseType = "blob"),
                (i.onload = (s) => {
                    var c = s.response;
                    (s.blob = () => Promise.resolve(c)),
                        (s.arrayBuffer = () => wg("arrayBuffer", c)),
                        (s.text = () => wg("text", c)),
                        (s.json = async () => JSON.parse(await wg("text", c))),
                        (s.headers = yT(s.responseHeaders)),
                        (s.ok = s.status >= 200 && s.status < 300),
                        o(s);
                }),
                (i.ontimeout = () => n("fetch timeout")),
                (i.onerror = () => n("fetch error")),
                (i.onabort = () => n("fetch abort")),
                GM_xmlhttpRequest(i);
        });
    }
    var g,
        a = he(() => {
            "use strict";
            g = vT;
        });
    var f,
        r,
        l = he(() => {
            "use strict";
            (f = Symbol.for("react.fragment")), (r = (...e) => (r = Vencord.Webpack.Common.React.createElement)(...e));
        });
    var Ov = he(() => {});
    function Eo(e, t) {
        let o = document.createElement("style");
        return (o.id = e), t.append(o), o;
    }
    var Rg,
        Y,
        Pe = he(() => {
            "use strict";
            a();
            l();
            (Rg = (e, t = "") =>
                e
                    .split(" ")
                    .map((o) => `.${t}${o}`)
                    .join("")),
                (Y =
                    (e = "") =>
                    (...t) => {
                        let o = new Set();
                        for (let n of t)
                            n && typeof n == "string"
                                ? o.add(n)
                                : Array.isArray(n)
                                  ? n.forEach((i) => o.add(i))
                                  : n && typeof n == "object" && Object.entries(n).forEach(([i, s]) => s && o.add(i));
                        return Array.from(o, (n) => e + n).join(" ");
                    });
        });
    var MT,
        La,
        Oa,
        _a,
        kg,
        Dg,
        ou,
        ui,
        CT,
        Lg,
        NT,
        Bo,
        Og,
        AT,
        d,
        pi,
        T = he(() => {
            "use strict";
            a();
            l();
            (MT = "Vencord.Webpack.Common.React"),
                (La = "1017176847865352332"),
                (Oa = "1015060230222131221"),
                (_a = "1042507929485586532"),
                (kg = "1026534353167208489"),
                (Dg = "1026504932959977532"),
                (ou = "1026515880080842772"),
                (ui = "1108135649699180705"),
                (CT = "1222936386626129920"),
                (Lg = navigator.platform.toLowerCase()),
                (NT = Lg.startsWith("win")),
                (Bo = Lg.startsWith("mac")),
                (Og = Lg.startsWith("linux")),
                (AT = navigator.userAgent.includes("Mobi")),
                (d = Object.freeze({
                    Ven: { name: "V", id: 343383572805058560n },
                    Apexo: { name: "Apexo", id: 228548952687902720n },
                    Arjix: { name: "ArjixWasTaken", id: 674710789138939916n, badge: !1 },
                    Cyn: { name: "Cynosphere", id: 150745989836308480n },
                    Trwy: { name: "trey", id: 354427199023218689n },
                    Megu: { name: "Megumin", id: 545581357812678656n },
                    botato: { name: "botato", id: 440990343899643943n },
                    fawn: { name: "fawn", id: 336678828233588736n },
                    rushii: { name: "rushii", id: 295190422244950017n },
                    Glitch: { name: "Glitchy", id: 269567451199569920n },
                    Samu: { name: "Samu", id: 702973430449832038n },
                    Nyako: { name: "nyako", id: 118437263754395652n },
                    MaiKokain: { name: "Mai", id: 722647978577363026n },
                    amy: { name: "Amy", id: 603229858612510720n },
                    katlyn: { name: "katlyn", id: 250322741406859265n },
                    nea: { name: "nea", id: 310702108997320705n },
                    Nuckyz: { name: "Nuckyz", id: 235834946571337729n },
                    D3SOX: { name: "D3SOX", id: 201052085641281538n },
                    Nickyux: { name: "Nickyux", id: 427146305651998721n },
                    mantikafasi: { name: "mantikafasi", id: 287555395151593473n },
                    Xinto: { name: "Xinto", id: 423915768191647755n },
                    JacobTm: { name: "Jacob.Tm", id: 302872992097107991n },
                    DustyAngel47: { name: "DustyAngel47", id: 714583473804935238n },
                    BanTheNons: { name: "BanTheNons", id: 460478012794863637n },
                    BigDuck: { name: "BigDuck", id: 1024588272623681609n },
                    AverageReactEnjoyer: { name: "Average React Enjoyer", id: 1004904120056029256n },
                    adryd: { name: "adryd", id: 0n },
                    Tyman: { name: "Tyman", id: 487443883127472129n },
                    afn: { name: "afn", id: 420043923822608384n },
                    KraXen72: { name: "KraXen72", id: 379304073515499530n },
                    kemo: { name: "kemo", id: 715746190813298788n },
                    dzshn: { name: "dzshn", id: 310449948011528192n },
                    Ducko: { name: "Ducko", id: 506482395269169153n },
                    jewdev: { name: "jewdev", id: 222369866529636353n },
                    Luna: { name: "Luny", id: 821472922140803112n },
                    Vap: { name: "Vap0r1ze", id: 454072114492866560n },
                    KingFish: { name: "King Fish", id: 499400512559382538n },
                    Commandtechno: { name: "Commandtechno", id: 296776625432035328n },
                    TheSun: { name: "sunnie", id: 406028027768733696n },
                    rae: { name: "rae", id: 1398136199503282277n },
                    pointy: { name: "pointy", id: 99914384989519872n },
                    SammCheese: { name: "Samm-Cheese", id: 372148345894076416n },
                    zt: { name: "zt", id: 289556910426816513n },
                    captain: { name: "Captain", id: 347366054806159360n },
                    nick: { name: "nick", id: 347884694408265729n, badge: !1 },
                    whqwert: { name: "whqwert", id: 586239091520176128n },
                    lewisakura: { name: "lewisakura", id: 96269247411400704n },
                    RuiNtD: { name: "RuiNtD", id: 157917665162297344n },
                    hunt: { name: "hunt-g", id: 222800179697287168n },
                    cloudburst: { name: "cloudburst", id: 892128204150685769n },
                    Aria: { name: "Syncxv", id: 549244932213309442n },
                    TheKodeToad: { name: "TheKodeToad", id: 706152404072267788n },
                    LordElias: { name: "LordElias", id: 319460781567639554n },
                    juby: { name: "Juby210", id: 324622488644616195n },
                    Alyxia: { name: "Alyxia Sother", id: 952185386350829688n },
                    Remty: { name: "Remty", id: 335055032204656642n },
                    skyevg: { name: "skyevg", id: 1090310844283363348n },
                    Dziurwa: { name: "Dziurwa", id: 1001086404203389018n },
                    arHSM: { name: "arHSM", id: 841509053422632990n },
                    AutumnVN: { name: "AutumnVN", id: 393694671383166998n },
                    pylix: { name: "pylix", id: 492949202121261067n },
                    Tyler: { name: "\\\\GGTyler\\\\", id: 143117463788191746n },
                    RyanCaoDev: { name: "RyanCaoDev", id: 952235800110694471n },
                    FieryFlames: { name: "Fiery", id: 890228870559698955n },
                    KannaDev: { name: "Kanna", id: 317728561106518019n },
                    carince: { name: "carince", id: 818323528755314698n },
                    PandaNinjas: { name: "PandaNinjas", id: 455128749071925248n },
                    CatNoir: { name: "CatNoir", id: 260371016348336128n },
                    outfoxxed: { name: "outfoxxed", id: 837425748435796060n },
                    UwUDev: { name: "UwU", id: 691413039156690994n },
                    amia: { name: "amia", id: 142007603549962240n },
                    phil: { name: "phil", id: 305288513941667851n },
                    ImLvna: { name: "lillith <3", id: 799319081723232267n },
                    rad: { name: "rad", id: 610945092504780823n },
                    AndrewDLO: { name: "Andrew-DLO", id: 434135504792059917n },
                    HypedDomi: { name: "HypedDomi", id: 354191516979429376n },
                    Rini: { name: "Rini", id: 1079479184478441643n },
                    castdrian: { name: "castdrian", id: 224617799434108928n },
                    Arrow: { name: "arrow", id: 958158495302176778n },
                    bb010g: { name: "bb010g", id: 72791153467990016n },
                    Dolfies: { name: "Dolfies", id: 852892297661906993n },
                    RuukuLada: { name: "RuukuLada", id: 119705748346241027n },
                    blahajZip: { name: "blahaj.zip", id: 683954422241427471n },
                    archeruwu: { name: "archer_uwu", id: 160068695383736320n },
                    ProffDea: { name: "ProffDea", id: 609329952180928513n },
                    UlyssesZhan: { name: "UlyssesZhan", id: 586808226058862623n },
                    ant0n: { name: "ant0n", id: 145224646868860928n },
                    Board: { name: "BoardTM", id: 285475344817848320n },
                    philipbry: { name: "philipbry", id: 554994003318276106n },
                    Korbo: { name: "Korbo", id: 455856406420258827n },
                    maisymoe: { name: "maisy", id: 257109471589957632n },
                    Lexi: { name: "Lexi", id: 506101469787717658n },
                    Mopi: { name: "Mopi", id: 1022189106614243350n },
                    Grzesiek11: { name: "Grzesiek11", id: 368475654662127616n },
                    Samwich: { name: "Samwich", id: 976176454511509554n },
                    coolelectronics: { name: "coolelectronics", id: 696392247205298207n },
                    Av32000: { name: "Av32000", id: 593436735380127770n },
                    Noxillio: { name: "Noxillio", id: 138616536502894592n },
                    Kyuuhachi: { name: "Kyuuhachi", id: 236588665420251137n },
                    nin0dev: { name: "nin0dev", id: 1395533040914141235n },
                    Elvyra: { name: "Elvyra", id: 708275751816003615n },
                    HappyEnderman: { name: "Happy enderman", id: 1083437693347827764n },
                    Vishnya: { name: "Vishnya", id: 282541644484575233n },
                    Inbestigator: { name: "Inbestigator", id: 761777382041714690n },
                    newwares: { name: "newwares", id: 421405303951851520n },
                    JohnyTheCarrot: { name: "JohnyTheCarrot", id: 132819036282159104n },
                    puv: { name: "puv", id: 469441552251355137n },
                    IcedMarina: { name: "icedmarina", id: 594406131670188042n },
                    nakoyasha: { name: "nakoyasha", id: 222069018507345921n },
                    Sqaaakoi: { name: "Sqaaakoi", id: 259558259491340288n },
                    iamme: { name: "i am me", id: 984392761929256980n },
                    Byeoon: { name: "byeoon", id: 1167275288036655133n },
                    Kaitlyn: { name: "kaitlyn", id: 306158896630988801n },
                    PolisanTheEasyNick: { name: "Oleh Polisan", id: 242305263313485825n },
                    HAHALOSAH: { name: "HAHALOSAH", id: 903418691268513883n },
                    GabiRP: { name: "GabiRP", id: 507955112027750401n },
                    ImBanana: { name: "Im_Banana", id: 635250116688871425n },
                    xocherry: { name: "xocherry", id: 221288171013406720n },
                    ScattrdBlade: { name: "ScattrdBlade", id: 678007540608532491n },
                    goodbee: { name: "goodbee", id: 658968552606400512n },
                    Moxxie: { name: "Moxxie", id: 712653921692155965n },
                    Ethan: { name: "Ethan", id: 721717126523781240n },
                    nyx: { name: "verticalsync.", id: 1207087393929171095n },
                    nekohaxx: { name: "nekohaxx", id: 1176270221628153886n },
                    Antti: { name: "Antti", id: 312974985876471810n },
                    Joona: { name: "Joona", id: 297410829589020673n },
                    sadan: { name: "sadan", id: 521819891141967883n },
                    Kylie: { name: "Cookie", id: 721853658941227088n },
                    AshtonMemer: { name: "AshtonMemer", id: 373657230530052099n },
                    surgedevs: { name: "Chloe", id: 1084592643784331324n },
                    Lumap: { name: "Lumap", id: 585278686291427338n },
                    Obsidian: { name: "Obsidian", id: 683171006717755446n },
                    SerStars: { name: "SerStars", id: 861631850681729045n },
                    niko: { name: "niko", id: 341377368075796483n },
                    relitrix: { name: "Relitrix", id: 423165393901715456n },
                    RamziAH: { name: "RamziAH", id: 1279957227612147747n },
                    SomeAspy: { name: "SomeAspy", id: 516750892372852754n },
                    jamesbt365: { name: "jamesbt365", id: 158567567487795200n },
                    samsam: { name: "samsam", id: 400482410279469056n },
                    Cootshk: { name: "Cootshk", id: 921605971577548820n },
                    thororen: { name: "thororen", id: 848339671629299742n },
                    alfred: { name: "alfred", id: 1038466644353232967n },
                    vv: { name: "VV", id: 254866377087778816n },
                    u32: { name: "u32", id: 1063237286818488351n },
                    prism: { name: "prism", id: 390884143749136386n },
                })),
                (pi = Object.freeze(
                    Object.fromEntries(
                        Object.entries(d)
                            .filter((e) => e[1].id !== 0n)
                            .map(([e, t]) => [t.id, t])
                    )
                ));
        });
    function L(...e) {
        return e.filter(Boolean).join(" ");
    }
    function ir(e) {
        return new Promise((t) => setTimeout(t, e));
    }
    function RT(e) {
        return typeof e == "object" && e !== null && !Array.isArray(e);
    }
    function di(e) {
        for (let t in e) if (Object.hasOwn(e, t)) return !1;
        return !0;
    }
    function kT(e) {
        try {
            return new URL(e);
        } catch {
            return null;
        }
    }
    function ds(e) {
        return e;
    }
    function Bg(e, t, o = t + "s") {
        return e === 1 ? `${e} ${t}` : `${e} ${o}`;
    }
    function Ea(e, ...t) {
        return t.some((o) => o == null) ? "" : String.raw({ raw: e }, ...t);
    }
    function Ug(e, t) {
        try {
            let o = e();
            return o instanceof Promise ? o.catch(() => t) : o;
        } catch {
            return t;
        }
    }
    var _g,
        Er,
        Eg,
        re = he(() => {
            "use strict";
            a();
            l();
            T();
            _g = (e) => {
                let t = e.getBoundingClientRect(),
                    o = Math.max(document.documentElement.clientHeight, unsafeWindow.innerHeight);
                return !(t.bottom < 0 || t.top - o >= 0);
            };
            (Er = (e) => Object.hasOwn(pi, e)), (Eg = (e) => Er(e) && pi[e].badge !== !1);
        });
    function $g() {
        let e = "";
        for (let [t, o] of Object.entries(DT)) e += `.${Fg(t)}{font-size:${o};}`;
        for (let [t, o] of Object.entries(LT)) e += `.${Fg(t)}{font-weight:${o};}`;
        return e;
    }
    function qo(e) {
        let { size: t = "md", weight: o = "normal", tag: n = "div", children: i, className: s, ...c } = e;
        return r(n, { className: L(Fg("base", t, o), s), ...c }, i);
    }
    var Fg,
        DT,
        LT,
        Gg,
        Vr = he(() => {
            "use strict";
            a();
            l();
            Ov();
            Pe();
            re();
            (Fg = Y("vc-text-")),
                (DT = {
                    xxs: "0.625rem",
                    xs: "0.75rem",
                    sm: "0.875rem",
                    md: "1rem",
                    lg: "1.25rem",
                    xl: "1.5rem",
                    xxl: "2rem",
                }),
                (LT = {
                    thin: "100",
                    extralight: "200",
                    light: "300",
                    normal: "400",
                    medium: "500",
                    semibold: "600",
                    bold: "700",
                    extrabold: "800",
                });
            Gg = function ({ color: t, variant: o, ...n }) {
                let i = n;
                if (o) {
                    let [s, c] = o.split("/");
                    if (s && c) {
                        let u = s.split("-").pop();
                        (i.size = u), (i.weight = c);
                    }
                }
                return t && ((i.style ??= {}), (i.style.color = `var(--${t}, var(--text-default))`)), r(qo, { ...i });
            };
        });
    var _v = he(() => {});
    var Ev = he(() => {});
    function De({ height: e = 24, width: t = 24, className: o, children: n, viewBox: i, ...s }) {
        return r("svg", { className: L(o, "vc-icon"), role: "img", width: t, height: e, viewBox: i, ...s }, n);
    }
    function mi({ height: e = 24, width: t = 24, className: o }) {
        return r(
            De,
            { height: e, width: t, className: L(o, "vc-link-icon"), viewBox: "0 0 24 24" },
            r(
                "g",
                { fill: "none", fillRule: "evenodd" },
                r("path", {
                    fill: "currentColor",
                    d: "M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z",
                }),
                r("rect", { width: t, height: e })
            )
        );
    }
    function en(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-copy-icon"), viewBox: "0 0 24 24" },
            r(
                "g",
                { fill: "currentColor" },
                r("path", {
                    d: "M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z",
                }),
                r("path", { d: "M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z" }),
                r("path", { d: "M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z" })
            )
        );
    }
    function Ko(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-open-external-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M15 2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V4.41l-4.3 4.3a1 1 0 1 1-1.4-1.42L19.58 3H16a1 1 0 0 1-1-1Z",
            }),
            r("path", {
                fill: "currentColor",
                d: "M5 2a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 1 0-2 0v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h6a1 1 0 1 0 0-2H5Z",
            })
        );
    }
    function sr(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-image-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z",
            })
        );
    }
    function Ba(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-info-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                d: "M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5-4.75a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm-.77 3.96a1 1 0 1 0-1.96-.42l-1.04 4.86a2.77 2.77 0 0 0 4.31 2.83l.24-.17a1 1 0 1 0-1.16-1.62l-.24.17a.77.77 0 0 1-1.2-.79l1.05-4.86Z",
                clipRule: "evenodd",
            })
        );
    }
    function Hg(e) {
        return r(
            De,
            {
                "aria-label": Ae("GUILD_OWNER"),
                ...e,
                className: L(e.className, "vc-owner-crown-icon"),
                role: "img",
                viewBox: "0 0 16 16",
            },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z",
            })
        );
    }
    function zg(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-screenshare-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z",
            })
        );
    }
    function Ua(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-image-visible"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z",
            })
        );
    }
    function ms(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-image-invisible"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z",
            })
        );
    }
    function ru(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-microphone"), viewBox: "0 0 24 24" },
            r("path", {
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",
                fill: "currentColor",
            }),
            r("path", {
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",
                fill: "currentColor",
            })
        );
    }
    function Fa(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-cog-wheel"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                d: "M10.56 1.1c-.46.05-.7.53-.64.98.18 1.16-.19 2.2-.98 2.53-.8.33-1.79-.15-2.49-1.1-.27-.36-.78-.52-1.14-.24-.77.59-1.45 1.27-2.04 2.04-.28.36-.12.87.24 1.14.96.7 1.43 1.7 1.1 2.49-.33.8-1.37 1.16-2.53.98-.45-.07-.93.18-.99.64a11.1 11.1 0 0 0 0 2.88c.06.46.54.7.99.64 1.16-.18 2.2.19 2.53.98.33.8-.14 1.79-1.1 2.49-.36.27-.52.78-.24 1.14.59.77 1.27 1.45 2.04 2.04.36.28.87.12 1.14-.24.7-.95 1.7-1.43 2.49-1.1.8.33 1.16 1.37.98 2.53-.07.45.18.93.64.99a11.1 11.1 0 0 0 2.88 0c.46-.06.7-.54.64-.99-.18-1.16.19-2.2.98-2.53.8-.33 1.79.14 2.49 1.1.27.36.78.52 1.14.24.77-.59 1.45-1.27 2.04-2.04.28-.36.12-.87-.24-1.14-.96-.7-1.43-1.7-1.1-2.49.33-.8 1.37-1.16 2.53-.98.45.07.93-.18.99-.64a11.1 11.1 0 0 0 0-2.88c-.06-.46-.54-.7-.99-.64-1.16.18-2.2-.19-2.53-.98-.33-.8.14-1.79 1.1-2.49.36-.27.52-.78.24-1.14a11.07 11.07 0 0 0-2.04-2.04c-.36-.28-.87-.12-1.14.24-.7.96-1.7 1.43-2.49 1.1-.8-.33-1.16-1.37-.98-2.53.07-.45-.18-.93-.64-.99a11.1 11.1 0 0 0-2.88 0ZM16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",
                clipRule: "evenodd",
            })
        );
    }
    function OT(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-reply-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z",
            })
        );
    }
    function ar(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-delete-icon"), viewBox: "0 0 24 24" },
            r("path", { fill: "currentColor", d: "M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z" }),
            r("path", {
                fill: "currentColor",
                d: "M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z",
            })
        );
    }
    function nu(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-plus-icon"), viewBox: "0 0 18 18" },
            r("polygon", {
                fillRule: "nonzero",
                fill: "currentColor",
                points: "15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8",
            })
        );
    }
    function $a(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-no-entry-sign-icon"), viewBox: "0 0 24 24" },
            r("path", { d: "M0 0h24v24H0z", fill: "none" }),
            r("path", {
                fill: "currentColor",
                d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",
            })
        );
    }
    function Wg(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-safety-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M4.27 5.22A2.66 2.66 0 0 0 3 7.5v2.3c0 5.6 3.3 10.68 8.42 12.95.37.17.79.17 1.16 0A14.18 14.18 0 0 0 21 9.78V7.5c0-.93-.48-1.78-1.27-2.27l-6.17-3.76a3 3 0 0 0-3.12 0L4.27 5.22ZM6 7.68l6-3.66V12H6.22C6.08 11.28 6 10.54 6 9.78v-2.1Zm6 12.01V12h5.78A11.19 11.19 0 0 1 12 19.7Z",
            })
        );
    }
    function jg(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-notes-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M8 3C7.44771 3 7 3.44772 7 4V5C7 5.55228 7.44772 6 8 6H16C16.5523 6 17 5.55228 17 5V4C17 3.44772 16.5523 3 16 3H15.1245C14.7288 3 14.3535 2.82424 14.1002 2.52025L13.3668 1.64018C13.0288 1.23454 12.528 1 12 1C11.472 1 10.9712 1.23454 10.6332 1.64018L9.8998 2.52025C9.64647 2.82424 9.27121 3 8.8755 3H8Z",
            }),
            r("path", {
                fillRule: "evenodd",
                clipRule: "evenodd",
                fill: "currentColor",
                d: "M19 4.49996V4.99996C19 6.65681 17.6569 7.99996 16 7.99996H8C6.34315 7.99996 5 6.65681 5 4.99996V4.49996C5 4.22382 4.77446 3.99559 4.50209 4.04109C3.08221 4.27826 2 5.51273 2 6.99996V19C2 20.6568 3.34315 22 5 22H19C20.6569 22 22 20.6568 22 19V6.99996C22 5.51273 20.9178 4.27826 19.4979 4.04109C19.2255 3.99559 19 4.22382 19 4.49996ZM8 12C7.44772 12 7 12.4477 7 13C7 13.5522 7.44772 14 8 14H16C16.5523 14 17 13.5522 17 13C17 12.4477 16.5523 12 16 12H8ZM7 17C7 16.4477 7.44772 16 8 16H13C13.5523 16 14 16.4477 14 17C14 17.5522 13.5523 18 13 18H8C7.44772 18 7 17.5522 7 17Z",
            })
        );
    }
    function _T(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-folder-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M2 5a3 3 0 0 1 3-3h3.93a2 2 0 0 1 1.66.9L12 5h7a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Z",
            })
        );
    }
    function qg(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-log-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M3.11 8H6v10.82c0 .86.37 1.68 1 2.27.46.43 1.02.71 1.63.84A1 1 0 0 0 9 22h10a4 4 0 0 0 4-4v-1a2 2 0 0 0-2-2h-1V5a3 3 0 0 0-3-3H4.67c-.87 0-1.7.32-2.34.9-.63.6-1 1.42-1 2.28 0 .71.3 1.35.52 1.75a5.35 5.35 0 0 0 .48.7l.01.01h.01L3.11 7l-.76.65a1 1 0 0 0 .76.35Zm1.56-4c-.38 0-.72.14-.97.37-.24.23-.37.52-.37.81a1.69 1.69 0 0 0 .3.82H6v-.83c0-.29-.13-.58-.37-.8C5.4 4.14 5.04 4 4.67 4Zm5 13a3.58 3.58 0 0 1 0 3H19a2 2 0 0 0 2-2v-1H9.66ZM3.86 6.35ZM11 8a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2h-5Zm-1 5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1Z",
            })
        );
    }
    function iu(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-restart-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M4 12a8 8 0 0 1 14.93-4H15a1 1 0 1 0 0 2h6a1 1 0 0 0 1-1V3a1 1 0 1 0-2 0v3a9.98 9.98 0 0 0-18 6 10 10 0 0 0 16.29 7.78 1 1 0 0 0-1.26-1.56A8 8 0 0 1 4 12Z",
            })
        );
    }
    function fs(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-paintbrush-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M15.35 7.24C15.9 6.67 16 5.8 16 5a3 3 0 1 1 3 3c-.8 0-1.67.09-2.24.65a1.5 1.5 0 0 0 0 2.11l1.12 1.12a3 3 0 0 1 0 4.24l-5 5a3 3 0 0 1-4.25 0l-5.76-5.75a3 3 0 0 1 0-4.24l4.04-4.04.97-.97a3 3 0 0 1 4.24 0l1.12 1.12c.58.58 1.52.58 2.1 0ZM6.9 9.9 4.3 12.54a1 1 0 0 0 0 1.42l2.17 2.17.83-.84a1 1 0 0 1 1.42 1.42l-.84.83.59.59 1.83-1.84a1 1 0 0 1 1.42 1.42l-1.84 1.83.17.17a1 1 0 0 0 1.42 0l2.63-2.62L6.9 9.9Z",
            })
        );
    }
    function Bv(e) {
        return r(
            De,
            { ...e, className: L(e.className, "vc-pencil-icon"), viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z",
            })
        );
    }
    function Ga(e) {
        return r(
            De,
            { ...e, viewBox: "-3 -3 30 30" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.11.82-.26.82-.577v-2.17c-3.338.726-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.757-1.333-1.757-1.09-.745.083-.73.083-.73 1.205.084 1.84 1.237 1.84 1.237 1.07 1.835 2.807 1.305 3.492.998.108-.775.42-1.305.763-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.467-2.38 1.235-3.22-.123-.303-.535-1.523.117-3.176 0 0 1.008-.322 3.3 1.23.957-.266 1.98-.398 3-.403 1.02.005 2.043.137 3 .403 2.29-1.552 3.297-1.23 3.297-1.23.653 1.653.24 2.873.118 3.176.77.84 1.233 1.91 1.233 3.22 0 4.61-2.803 5.625-5.475 5.92.43.37.823 1.102.823 2.222v3.293c0 .32.218.694.825.577C20.565 21.797 24 17.298 24 12c0-6.63-5.37-12-12-12z",
            })
        );
    }
    function Kg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2 1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z",
            })
        );
    }
    function Ha(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                fillRule: "evenodd",
                d: "M5 2a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H5Zm6.81 7c-.54 0-1 .26-1.23.61A1 1 0 0 1 8.92 8.5 3.49 3.49 0 0 1 11.82 7c1.81 0 3.43 1.38 3.43 3.25 0 1.45-.98 2.61-2.27 3.06a1 1 0 0 1-1.96.37l-.19-1a1 1 0 0 1 .98-1.18c.87 0 1.44-.63 1.44-1.25S12.68 9 11.81 9ZM13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm7-10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM18.5 20a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM7 18.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM5.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",
                clipRule: "evenodd",
            })
        );
    }
    function Yg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M10.56 1.1c-.46.05-.7.53-.64.98.18 1.16-.19 2.2-.98 2.53-.8.33-1.79-.15-2.49-1.1-.27-.36-.78-.52-1.14-.24-.77.59-1.45 1.27-2.04 2.04-.28.36-.12.87.24 1.14.96.7 1.43 1.7 1.1 2.49-.33.8-1.37 1.16-2.53.98-.45-.07-.93.18-.99.64a11.1 11.1 0 0 0 0 2.88c.06.46.54.7.99.64 1.16-.18 2.2.19 2.53.98.33.8-.14 1.79-1.1 2.49-.36.27-.52.78-.24 1.14.59.77 1.27 1.45 2.04 2.04.36.28.87.12 1.14-.24.7-.95 1.7-1.43 2.49-1.1.8.33 1.16 1.37.98 2.53-.07.45.18.93.64.99a11.1 11.1 0 0 0 2.88 0c.46-.06.7-.54.64-.99-.18-1.16.19-2.2.98-2.53.8-.33 1.79.14 2.49 1.1.27.36.78.52 1.14.24.77-.59 1.45-1.27 2.04-2.04.28-.36.12-.87-.24-1.14-.96-.7-1.43-1.7-1.1-2.49.33-.8 1.37-1.16 2.53-.98.45.07.93-.18.99-.64a11.1 11.1 0 0 0 0-2.88c-.06-.46-.54-.7-.99-.64-1.16.18-2.2-.19-2.53-.98-.33-.8.14-1.79 1.1-2.49.36-.27.52-.78.24-1.14a11.07 11.07 0 0 0-2.04-2.04c-.36-.28-.87-.12-1.14.24-.7.96-1.7 1.43-2.49 1.1-.8-.33-1.16-1.37-.98-2.53.07-.45-.18-.93-.64-.99a11.1 11.1 0 0 0-2.88 0ZM16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",
            })
        );
    }
    function Zg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M18.559 12.8227C17.7884 13.4957 16.6663 13.3616 15.9404 12.641C14.7975 11.5063 11.4931 8.21104 11.4931 8.21104C10.897 7.63087 10.897 6.44662 11.4931 5.85464C12.319 5.03435 13.6053 3.75146 13.6053 3.75146C13.9641 3.39195 14.456 3.18972 14.9653 3.18886L18.3363 3.18425L19.5255 2L22.5 4.96048L21.3108 6.14473L21.3021 9.50878C21.2992 10.0164 21.0967 10.5026 20.735 10.8613C20.735 10.8613 19.5718 11.9384 18.559 12.8227ZM15.2315 13.9548L13.4954 15.8273C14.0972 16.4265 14.0972 16.9113 13.64 17.6997L11.3976 20.2485C11.0359 20.6081 10.5469 20.8103 10.0347 20.8111L6.66378 20.8158L5.47455 22L2.5 19.0395L3.68927 17.8553L3.70082 14.4912C3.70082 13.9836 3.90338 13.4974 4.26507 13.1387L6.37153 11.0404C6.96759 10.4485 8.15685 10.4485 8.73844 11.0404L8.74424 11.0465L10.5295 9.26998L11.7188 10.4542L9.93347 12.2305L12.3119 14.599L14.0972 12.8227L15.2315 13.9548Z",
            })
        );
    }
    function Qg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M16.8333 19H5.16667C3.16667 19 1.5 17.3333 1.5 15.3333C1.5 13.4 2.96667 11.8667 4.83333 11.6667V11.3333C4.83333 7.86667 7.7 5 11.1667 5C14.0333 5 16.5667 6.93333 17.3 9.66667C19.7 9.86667 21.5 11.8667 21.5 14.3333C21.5 16.9333 19.4333 19 16.8333 19Z",
            })
        );
    }
    function Xg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M21 2.01232C21.2652 2.01232 21.5196 2.11757 21.7071 2.30492C21.8946 2.49226 22 2.74636 22 3.0113V9.00521C22 9.27015 21.8946 9.52425 21.7071 9.7116C21.5196 9.89894 21.2652 10.0042 21 10.0042H15C14.7348 10.0042 14.4804 9.89894 14.2929 9.7116C14.1054 9.52425 14 9.27015 14 9.00521C14 8.74026 14.1054 8.48617 14.2929 8.29882C14.4804 8.11147 14.7348 8.00622 15 8.00622H18.93C18.352 7.00597 17.5638 6.14275 16.6198 5.47602C15.6758 4.80929 14.5983 4.35488 13.4616 4.1441C12.3249 3.93332 11.1559 3.97117 10.0353 4.25505C8.91459 4.53892 7.86883 5.06208 6.97 5.78848C6.76313 5.9554 6.49836 6.03338 6.23393 6.00528C5.96951 5.97718 5.72709 5.84529 5.56 5.63863C5.39291 5.43197 5.31485 5.16747 5.34298 4.90331C5.37111 4.63916 5.50313 4.39698 5.71 4.23006C6.7542 3.38308 7.959 2.7557 9.25204 2.38561C10.5451 2.01552 11.8996 1.91037 13.2344 2.07646C14.5691 2.24255 15.8565 2.67646 17.0191 3.35212C18.1818 4.02778 19.1957 4.93125 20 6.00826V3.0113C20 2.74636 20.1054 2.49226 20.2929 2.30492C20.4804 2.11757 20.7348 2.01232 21 2.01232ZM3 21.992C2.73478 21.992 2.48043 21.8867 2.29289 21.6994C2.10536 21.5121 2 21.258 2 20.993V14.9991C2 14.7342 2.10536 14.4801 2.29289 14.2927C2.48043 14.1054 2.73478 14.0001 3 14.0001H9C9.26522 14.0001 9.51957 14.1054 9.70711 14.2927C9.89464 14.4801 10 14.7342 10 14.9991C10 15.2641 9.89464 15.5182 9.70711 15.7055C9.51957 15.8928 9.26522 15.9981 9 15.9981H5.07C5.64801 16.9983 6.43617 17.8616 7.3802 18.5283C8.32424 19.195 9.40171 19.6494 10.5384 19.8602C11.6751 20.071 12.8441 20.0331 13.9647 19.7493C15.0854 19.4654 16.1312 18.9422 17.03 18.2158C17.1324 18.1332 17.2502 18.0715 17.3764 18.0343C17.5027 17.9971 17.6351 17.9851 17.7661 17.999C17.897 18.013 18.0239 18.0525 18.1395 18.1154C18.2552 18.1783 18.3573 18.2634 18.44 18.3657C18.5227 18.468 18.5845 18.5856 18.6217 18.7118C18.659 18.8379 18.6709 18.9702 18.657 19.101C18.6431 19.2318 18.6035 19.3586 18.5405 19.4741C18.4776 19.5896 18.3924 19.6916 18.29 19.7743C17.2452 20.6199 16.0403 21.2461 14.7475 21.6154C13.4547 21.9847 12.1005 22.0895 10.7662 21.9235C9.43181 21.7574 8.14476 21.324 6.98212 20.6491C5.81947 19.9743 4.80518 19.0719 4 17.9961V20.993C4 21.258 3.89464 21.5121 3.70711 21.6994C3.51957 21.8867 3.26522 21.992 3 21.992Z",
            })
        );
    }
    function ET(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M12 2C12.2652 2 12.5196 2.10536 12.7071 2.29289C12.8946 2.48043 13 2.73478 13 3V13.59L16.3 10.29C16.3904 10.186 16.5013 10.1018 16.6258 10.0427C16.7503 9.98362 16.8856 9.95088 17.0234 9.94656C17.1611 9.94224 17.2982 9.96644 17.4261 10.0176C17.5541 10.0688 17.6701 10.1459 17.7668 10.244C17.8635 10.3421 17.939 10.4592 17.9883 10.5878C18.0377 10.7165 18.0599 10.8539 18.0537 10.9916C18.0474 11.1292 18.0127 11.2641 17.9519 11.3877C17.891 11.5114 17.8053 11.6211 17.7 11.71L12.7 16.71C12.5131 16.8932 12.2618 16.9959 12 16.9959C11.7382 16.9959 11.4869 16.8932 11.3 16.71L6.3 11.71C6.19474 11.6211 6.10898 11.5114 6.04812 11.3877C5.98726 11.2641 5.95261 11.1292 5.94634 10.9916C5.94007 10.8539 5.96231 10.7165 6.01167 10.5878C6.06104 10.4592 6.13646 10.3421 6.2332 10.244C6.32994 10.1459 6.44592 10.0688 6.57385 10.0176C6.70179 9.96644 6.83892 9.94224 6.97665 9.94656C7.11438 9.95088 7.24972 9.98362 7.3742 10.0427C7.49868 10.1018 7.6096 10.186 7.7 10.29L11 13.59V3C11 2.73478 11.1054 2.48043 11.2929 2.29289C11.4804 2.10536 11.7348 2 12 2ZM3 20C2.73478 20 2.48043 20.1054 2.29289 20.2929C2.10536 20.4804 2 20.7348 2 21C2 21.2652 2.10536 21.5196 2.29289 21.7071C2.48043 21.8946 2.73478 22 3 22H21C21.2652 22 21.5196 21.8946 21.7071 21.7071C21.8946 21.5196 22 21.2652 22 21C22 20.7348 21.8946 20.4804 21.7071 20.2929C21.5196 20.1054 21.2652 20 21 20H3Z",
            })
        );
    }
    function BT(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M7.79997 15.7699C8.49996 16.1999 8.99997 16.9099 8.99997 17.7299V20.9999C8.99997 21.2651 9.10533 21.5195 9.29286 21.707C9.48039 21.8945 9.73476 21.9999 9.99996 21.9999H14C14.2652 21.9999 14.5196 21.8945 14.7071 21.707C14.8946 21.5195 15 21.2651 15 20.9999V17.7299C15 16.9099 15.5 16.1999 16.2 15.7699C17.357 15.0536 18.3137 14.056 18.9812 12.8701C19.6486 11.6842 20.0048 10.3487 20.0168 8.98795C20.0288 7.62724 19.6961 6.28564 19.0497 5.08819C18.4032 3.89074 17.4642 2.87647 16.32 2.13989C15.72 1.74989 15 2.22989 15 2.93989V8.91988C15 9.18511 14.8946 9.43945 14.7071 9.62701C14.5196 9.81454 14.2652 9.9199 14 9.9199H9.99996C9.73476 9.9199 9.48039 9.81454 9.29286 9.62701C9.10533 9.43945 8.99997 9.18511 8.99997 8.91988V2.93989C8.99997 2.22989 8.27997 1.74989 7.67997 2.13989C6.53577 2.87647 5.59671 3.89074 4.9503 5.08819C4.30386 6.28564 3.97113 7.62724 3.9831 8.98795C3.9951 10.3487 4.35138 11.6842 5.01879 12.8701C5.6862 14.056 6.64299 15.0536 7.79997 15.7699Z",
            })
        );
    }
    function Jg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M18.157.056a1.224 1.224 0 0 0-.709.628c-.105.229-.114.305-.115 1.081v.836l-.351.176a5.545 5.545 0 0 0-.586.342l-.233.167-.543-.311c-.899-.515-.944-.535-1.293-.539-.562-.004-1.018.352-1.17.917-.07.262-.021.567.138.858.151.28.21.325 1.02.794l.606.35v1.38l-.606.35c-.81.469-.869.514-1.02.793-.16.291-.208.597-.137.859.151.564.607.92 1.17.916.347-.004.393-.023 1.289-.537l.54-.308.313.21c.172.116.438.262.588.325l.275.114v.85c.001.793.009.87.115 1.098a1.19 1.19 0 0 0 1.969.282c.269-.307.292-.412.292-1.37v-.869l.315-.148c.173-.081.435-.228.582-.325l.266-.177.706.4c.796.45 1.029.523 1.408.438.882-.198 1.235-1.287.635-1.96-.085-.097-.457-.348-.827-.56l-.67-.385V5.359l.67-.386c.37-.212.742-.463.827-.56.6-.672.247-1.762-.635-1.96-.38-.084-.612-.012-1.405.437l-.7.397-.235-.18a3.792 3.792 0 0 0-.586-.344l-.35-.163v-.848c0-.935-.023-1.044-.292-1.35a1.2 1.2 0 0 0-1.26-.346M4.007 1.25a4.15 4.15 0 0 0-1.21.44c-.354.207-1.102.955-1.309 1.309-.199.34-.374.837-.441 1.252-.07.434-.07 10.426 0 10.86.127.792.42 1.343 1.039 1.963.477.478.81.697 1.317.874.59.204.818.216 4.125.217h3.163v2.42l-1.975.014c-2.202.015-2.148.008-2.5.362-.255.253-.346.474-.346.84s.09.587.345.84c.376.376-.09.348 5.688.348 5.75 0 5.309.025 5.67-.327a1.1 1.1 0 0 0 .362-.86c.002-.367-.09-.586-.344-.84-.353-.355-.3-.348-2.5-.363l-1.976-.014v-2.42h3.164c3.306-.001 3.535-.013 4.124-.217.508-.177.84-.396 1.318-.874.882-.882 1.113-1.57 1.082-3.213-.018-.956-.047-1.068-.364-1.384-.253-.255-.474-.346-.84-.346s-.586.091-.84.346c-.317.316-.343.42-.372 1.47-.023.846-.036.966-.13 1.14a1.22 1.22 0 0 1-.597.553c-.217.098-.276.098-7.757.098-7.48 0-7.54 0-7.757-.098a1.153 1.153 0 0 1-.612-.602l-.114-.242V9.68c.001-5.041.003-5.119.1-5.333.122-.27.3-.462.553-.599.19-.103.242-.104 2.958-.128 3.08-.027 2.927-.01 3.288-.372.255-.254.345-.474.345-.84s-.09-.587-.345-.84c-.364-.365-.204-.347-3.288-.355-1.52-.004-2.881.012-3.024.036m15.047 3.693c.207.108.452.361.57.59.143.278.143.755 0 1.028-.285.54-1.08.81-1.636.556a1.357 1.357 0 0 1-.59-.625c-.107-.255-.092-.7.032-.956.121-.251.46-.568.69-.645.213-.073.755-.043.934.052",
            })
        );
    }
    function Vg(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.83 7.13 7.39 5.75 8.95 4.38 11 4.08V12.15L9.4 10.6L8 12L12 16L16 12L14.6 10.6L13 12.15V4.08Q15.58 4.43 17.29 6.39 19 8.35 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20Z",
            })
        );
    }
    function eh(e) {
        return r(
            De,
            { ...e, viewBox: "0 0 24 24" },
            r("path", {
                fill: e.fill || "currentColor",
                d: "M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z",
            })
        );
    }
    var th,
        Ue = he(() => {
            "use strict";
            a();
            l();
            Ev();
            se();
            re();
            th = (e) =>
                r(
                    De,
                    { ...e, viewBox: "0 0 24 24" },
                    r("path", {
                        fillRule: "evenodd",
                        clipRule: "evenodd",
                        fill: e.fill || "currentColor",
                        d: "M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm1-18a1 1 0 1 0-2 0v7c0 .27.1.52.3.7l3 3a1 1 0 0 0 1.4-1.4L13 11.58V5Z",
                    })
                );
        });
    function Ve(e) {
        return (
            e.disabled && ((e.style ??= {}), (e.style.pointerEvents = "none"), (e["aria-disabled"] = !0)),
            (e.rel ??= "noreferrer"),
            r("a", { role: "link", target: "_blank", ...e }, e.children)
        );
    }
    var Wt = he(() => {
        "use strict";
        a();
        l();
    });
    function jt({ variant: e = "primary", size: t = "medium", children: o, className: n, ...i }) {
        return r(
            "button",
            { "data-mana-component": "button", className: L(su("base", e, t), n), ...i },
            o,
            e === "link" && r(Ko, { className: su("link-icon") })
        );
    }
    function za({ variant: e = "link", size: t = "medium", className: o, children: n, ...i }) {
        return r(
            Ve,
            { "data-mana-component": "button", className: L(su("base", e, t), o), ...i },
            n,
            r(Ko, { className: su("link-icon") })
        );
    }
    function au({ variant: e = "primary", className: t, ...o }) {
        return r("button", { className: L(UT("base", e), t), ...o });
    }
    var su,
        UT,
        gs,
        FT,
        $T,
        lr = he(() => {
            "use strict";
            a();
            l();
            _v();
            Pe();
            re();
            Ue();
            Wt();
            (su = Y("vc-btn-")), (UT = Y("vc-text-btn-"));
            gs = function ({ look: t, color: o = "BRAND", size: n = "medium", ...i }) {
                return t === "LINK" ? r(au, { variant: $T[o], ...i }) : r(jt, { variant: FT[o], size: n, ...i });
            };
            gs.Looks = { FILLED: "", LINK: "LINK" };
            gs.Colors = {
                BRAND: "BRAND",
                PRIMARY: "PRIMARY",
                RED: "RED",
                TRANSPARENT: "TRANSPARENT",
                CUSTOM: "CUSTOM",
                GREEN: "GREEN",
                LINK: "LINK",
                WHITE: "WHITE",
            };
            (FT = {
                BRAND: "primary",
                PRIMARY: "secondary",
                RED: "dangerPrimary",
                TRANSPARENT: "secondary",
                CUSTOM: "none",
                GREEN: "positive",
                LINK: "link",
                WHITE: "overlayPrimary",
            }),
                ($T = {
                    BRAND: "primary",
                    PRIMARY: "primary",
                    RED: "danger",
                    TRANSPARENT: "secondary",
                    CUSTOM: "secondary",
                    GREEN: "primary",
                    LINK: "link",
                    WHITE: "secondary",
                });
            gs.Sizes = { SMALL: "small", MEDIUM: "medium", LARGE: "medium", XLARGE: "medium", NONE: "min", MIN: "min" };
        });
    var Uv = he(() => {});
    function Fe({ className: e, ...t }) {
        return r("hr", { className: L("vc-divider", e), ...t });
    }
    var Qt = he(() => {
        "use strict";
        a();
        l();
        Uv();
        re();
    });
    var Fv = he(() => {});
    function fi({ children: e, ...t }) {
        return r(qo, { tag: "span", size: "sm", weight: "normal", ...t }, e);
    }
    var lu = he(() => {
        "use strict";
        a();
        l();
        Vr();
    });
    var $v = he(() => {});
    function tn({ checked: e, onChange: t, disabled: o }) {
        let [n, i] = k(!1),
            s = (c) => {
                let u = c.currentTarget;
                i(u.matches(":focus-visible"));
            };
        return r(
            "div",
            null,
            r(
                "div",
                { className: L(oh("container", { checked: e, disabled: o, focusVisible: n })) },
                r(
                    "svg",
                    {
                        className: oh("slider"),
                        viewBox: "0 0 28 20",
                        preserveAspectRatio: "xMinYMid meet",
                        "aria-hidden": "true",
                        style: { transform: e ? "translateX(12px)" : "translateX(-3px)" },
                    },
                    r("rect", { fill: "white", x: "4", y: "0", height: "20", width: "20", rx: "10" }),
                    r(
                        "svg",
                        { viewBox: "0 0 20 20", fill: "none" },
                        e
                            ? r(
                                  f,
                                  null,
                                  r("path", {
                                      fill: Gv,
                                      d: "M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z",
                                  }),
                                  r("path", {
                                      fill: Gv,
                                      d: "M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z",
                                  })
                              )
                            : r(
                                  f,
                                  null,
                                  r("path", {
                                      fill: Hv,
                                      d: "M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z",
                                  }),
                                  r("path", {
                                      fill: Hv,
                                      d: "M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z",
                                  })
                              )
                    )
                ),
                r("input", {
                    onFocus: s,
                    onBlur: s,
                    disabled: o,
                    type: "checkbox",
                    className: oh("input"),
                    tabIndex: 0,
                    checked: e,
                    onChange: (c) => t(c.currentTarget.checked),
                })
            )
        );
    }
    var oh,
        Gv,
        Hv,
        gi = he(() => {
            "use strict";
            a();
            l();
            $v();
            Pe();
            re();
            S();
            (oh = Y("vc-switch-")), (Gv = "var(--brand-500)"), (Hv = "var(--primary-400)");
        });
    function cr({ onChange: e, title: t, value: o, description: n, disabled: i, className: s, hideBorder: c }) {
        return r(
            "label",
            { className: "vc-form-switch-wrapper" },
            r(
                "div",
                { className: L("vc-form-switch", s, i && "vc-form-switch-disabled") },
                r(
                    "div",
                    { className: "vc-form-switch-text" },
                    r(fi, { size: "md", weight: "medium" }, t),
                    n && r(fi, { size: "sm", weight: "normal" }, n)
                ),
                r(tn, { checked: o, onChange: e, disabled: i })
            ),
            !c && r(Fe, { className: "vc-form-switch-border" })
        );
    }
    function rh({ note: e, children: t, ...o }) {
        return r(cr, { title: t ?? "", description: e, ...o });
    }
    var Nn = he(() => {
        "use strict";
        a();
        l();
        Fv();
        re();
        Qt();
        lu();
        gi();
    });
    var zv = he(() => {});
    function Xt(e) {
        let { tag: t = "h5", children: o, className: n, ...i } = e;
        return r(t, { className: L(`vc-${t}`, !n && `vc-${t}-defaultMargin`, n), ...i }, o);
    }
    function GT({ children: e, ...t }) {
        return r(Xt, { tag: "h2", ...t }, e);
    }
    function HT({ children: e, ...t }) {
        return r(Xt, { tag: "h3", ...t }, e);
    }
    function Br({ children: e, ...t }) {
        return r(Xt, { tag: "h4", ...t }, e);
    }
    var Ur = he(() => {
        "use strict";
        a();
        l();
        zv();
        re();
    });
    function Me({ children: e, ...t }) {
        return r(qo, { tag: "p", size: "sm", weight: "normal", ...t }, e);
    }
    var Yo = he(() => {
        "use strict";
        a();
        l();
        Vr();
    });
    function Uo({ children: e, ...t }) {
        return r(V, { ...t }, (o) => r("div", { ...o }, e));
    }
    var hi = he(() => {
        "use strict";
        a();
        l();
        S();
    });
    var hs,
        nh,
        Wv = he(() => {
            "use strict";
            a();
            l();
            (hs = () => {}),
                (nh = ({ children: e }) => {
                    if (typeof e != "function") return null;
                    let t = e({
                        onBlur: hs,
                        onFocus: hs,
                        onMouseEnter: hs,
                        onMouseLeave: hs,
                        onClick: hs,
                        onContextMenu: hs,
                    });
                    return r(f, null, t);
                });
            nh.Colors = {};
        });
    function rn(e, t = 5) {
        let o = 0,
            n;
        return () => (
            n === void 0 && t > o++ && ((n = e()), n === void 0 && t === o && console.error("Lazy factory failed:", e)),
            n
        );
    }
    function Pt(e, t = 5, o = !1) {
        let n = !0;
        o || setTimeout(() => (n = !1), 0);
        let i = 0,
            s = Object.assign(function () {}, {
                [on]: void 0,
                [ur]() {
                    return (
                        !s[on] &&
                            t > i++ &&
                            ((s[on] = e()), !s[on] && t === i && console.error("Lazy factory failed:", e)),
                        s[on]
                    );
                },
            });
        return new Proxy(s, {
            ...cu,
            get(c, u, p) {
                if (u === on || u === ur) return Reflect.get(c, u, p);
                if (!o && n) return Pt(() => Reflect.get(c[ur](), u, p), t, !0);
                let m = c[ur]();
                if (typeof m == "object" || typeof m == "function") return Reflect.get(m, u, p);
                throw new Error("proxyLazy called on a primitive value");
            },
        });
    }
    var jv,
        cu,
        ur,
        on,
        Fo = he(() => {
            "use strict";
            a();
            l();
            (jv = ["arguments", "caller", "prototype"]),
                (cu = {}),
                (ur = Symbol.for("vencord.lazy.get")),
                (on = Symbol.for("vencord.lazy.cached"));
            for (let e of [
                "apply",
                "construct",
                "defineProperty",
                "deleteProperty",
                "getOwnPropertyDescriptor",
                "getPrototypeOf",
                "has",
                "isExtensible",
                "ownKeys",
                "preventExtensions",
                "set",
                "setPrototypeOf",
            ])
                cu[e] = (t, ...o) => Reflect[e](t[ur](), ...o);
            cu.ownKeys = (e) => {
                let t = e[ur](),
                    o = Reflect.ownKeys(t);
                for (let n of jv) o.includes(n) || o.push(n);
                return o;
            };
            cu.getOwnPropertyDescriptor = (e, t) => {
                if (typeof t == "string" && jv.includes(t)) return Reflect.getOwnPropertyDescriptor(e, t);
                let o = Reflect.getOwnPropertyDescriptor(e[ur](), t);
                return o && Object.defineProperty(e, t, o), o;
            };
        });
    function lt(e, t = 5) {
        let o = rn(e, t),
            n = (i) => {
                let s = o() ?? zT;
                return r(s, { ...i });
            };
        return (n.$$vencordGetWrappedComponent = o), n;
    }
    var zT,
        yi = he(() => {
            "use strict";
            a();
            l();
            Fo();
            zT = () => null;
        });
    var U,
        le = he(() => {
            "use strict";
            a();
            l();
            U = class {
                constructor(t, o = "white") {
                    this.name = t;
                    this.color = o;
                }
                static makeTitle(t, o) {
                    return [
                        "%c %c %s ",
                        "",
                        `background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,
                        o,
                    ];
                }
                _log(t, o, n, i = "") {
                    console[t](
                        `%c Vencord %c %c ${this.name} ${i}`,
                        `background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,
                        "",
                        `background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,
                        ...n
                    );
                }
                log(...t) {
                    this._log("log", "#a6d189", t);
                }
                info(...t) {
                    this._log("info", "#a6d189", t);
                }
                error(...t) {
                    this._log("error", "#e78284", t);
                }
                errorCustomFmt(t, ...o) {
                    this._log("error", "#e78284", o, t);
                }
                warn(...t) {
                    this._log("warn", "#e5c890", t);
                }
                debug(...t) {
                    this._log("debug", "#eebebe", t);
                }
            };
        });
    function Yv(e, t, o, n) {
        return BigInt(e) | (BigInt(t) << 16n) | (BigInt(o) << 32n) | (BigInt(n) << 48n);
    }
    function nn(e, t) {
        return (
            BigInt(e[t]) |
            (BigInt(e[t + 1]) << 8n) |
            (BigInt(e[t + 2]) << 16n) |
            (BigInt(e[t + 3]) << 24n) |
            (BigInt(e[t + 4]) << 32n) |
            (BigInt(e[t + 5]) << 40n) |
            (BigInt(e[t + 6]) << 48n) |
            (BigInt(e[t + 7]) << 56n)
        );
    }
    function Dt(e, t) {
        return ((e << t) & WT) | (e >> (Zv - t));
    }
    function ye(e) {
        return BigInt.asUintN(64, e);
    }
    function uu(e, t = 0) {
        return new ih(t).update(e).digest();
    }
    var Mt,
        Jt,
        qv,
        Wa,
        Kv,
        Zv,
        WT,
        jT,
        ih,
        sh = he(() => {
            a();
            l();
            (Mt = 11400714785074694791n),
                (Jt = 14029467366897019727n),
                (qv = 1609587929392839161n),
                (Wa = 9650029242287828579n),
                (Kv = 2870177450012600261n),
                (Zv = 64n),
                (WT = 2n ** Zv - 1n),
                (jT = new TextEncoder());
            ih = class {
                #t;
                #o;
                #r;
                #n;
                #i;
                #s;
                #a;
                #e;
                constructor(t = 0) {
                    this.reset(t);
                }
                reset(t = this.#t) {
                    return (
                        (this.#t = BigInt.asUintN(32, BigInt(t))),
                        (this.#o = ye(this.#t + Mt + Jt)),
                        (this.#r = ye(this.#t + Jt)),
                        (this.#n = this.#t),
                        (this.#i = ye(this.#t - Mt)),
                        (this.#s = null),
                        (this.#a = 0),
                        (this.#e = 0),
                        this
                    );
                }
                update(t) {
                    typeof t == "string" && (t = jT.encode(t));
                    let o = 0,
                        n = t.length,
                        i = o + n;
                    if (n === 0) return this;
                    if (((this.#a += n), this.#e === 0 && (this.#s = new Uint8Array(32)), this.#e + n < 32))
                        return this.#s.set(t.subarray(0, n), this.#e), (this.#e += n), this;
                    if (this.#e > 0) {
                        this.#s.set(t.subarray(0, 32 - this.#e), this.#e);
                        let s = 0,
                            c;
                        (c = nn(this.#s, s)),
                            (this.#o = ye(Dt(ye(this.#o + c * Jt), 31n) * Mt)),
                            (s += 8),
                            (c = nn(this.memory, s)),
                            (this.#r = ye(Dt(ye(this.#r + c * Jt), 31n) * Mt)),
                            (s += 8),
                            (c = nn(this.memory, s)),
                            (this.#n = ye(Dt(ye(this.#n + c * Jt), 31n) * Mt)),
                            (s += 8),
                            (c = nn(this.memory, s)),
                            (this.#i = ye(Dt(ye(this.#i + c * Jt), 31n) * Mt)),
                            (o += 32 - this.#e),
                            (this.#e = 0);
                    }
                    if (o <= i - 32) {
                        let s = i - 32;
                        do {
                            let c;
                            (c = nn(t, o)),
                                (this.#o = ye(Dt(ye(this.#o + c * Jt), 31n) * Mt)),
                                (o += 8),
                                (c = nn(t, o)),
                                (this.#r = ye(Dt(ye(this.#r + c * Jt), 31n) * Mt)),
                                (o += 8),
                                (c = nn(t, o)),
                                (this.#n = ye(Dt(ye(this.#n + c * Jt), 31n) * Mt)),
                                (o += 8),
                                (c = nn(t, o)),
                                (this.#i = ye(Dt(ye(this.#i + c * Jt), 31n) * Mt)),
                                (o += 8);
                        } while (o <= s);
                    }
                    return o < i && (this.#s.set(t.subarray(o, i), this.#e), (this.#e = i - o)), this;
                }
                digest() {
                    let t = this.#s,
                        o = this.#e,
                        n = 0,
                        i = 0n,
                        s = 0n,
                        c = 0n;
                    for (
                        this.#a >= 32
                            ? ((i = Dt(this.#o, 1n) + Dt(this.#r, 7n) + Dt(this.#n, 12n) + Dt(this.#i, 18n)),
                              (i = ye(i ^ (Dt(ye(this.#o * Jt), 31n) * Mt))),
                              (i = ye(i * Mt + Wa)),
                              (i = ye(i ^ (Dt(ye(this.#r * Jt), 31n) * Mt))),
                              (i = ye(i * Mt + Wa)),
                              (i = ye(i ^ (Dt(ye(this.#n * Jt), 31n) * Mt))),
                              (i = ye(i * Mt + Wa)),
                              (i = ye(i ^ (Dt(ye(this.#i * Jt), 31n) * Mt))),
                              (i = ye(i * Mt + Wa)))
                            : (i = ye(this.#t + Kv)),
                            i += BigInt(this.#a);
                        n <= o - 8;

                    )
                        (c = nn(t, n)),
                            (c = ye(Dt(ye(c * Jt), 31n) * Mt)),
                            (i = ye(Dt(i ^ c, 27n) * Mt + Wa)),
                            (n += 8);
                    for (
                        n + 4 <= o &&
                        ((c = Yv((t[n + 1] << 8) | t[n], (t[n + 3] << 8) | t[n + 2], 0, 0)),
                        (i = ye(Dt(i ^ ye(c * Mt), 23n) * Jt + qv)),
                        (n += 4));
                        n < o;

                    )
                        (c = Yv(t[n++], 0, 0, 0)), (i = ye(Dt(i ^ ye(c * Kv), 11n) * Mt));
                    return (
                        (s = ye(i >> 33n)),
                        (i = ye((i ^ s) * Jt)),
                        (s = ye(i >> 29n)),
                        (i = ye((i ^ s) * qv)),
                        (s = ye(i >> 32n)),
                        (i = ye(i ^ s)),
                        i
                    );
                }
            };
        });
    function KT(e) {
        e = BigInt(e);
        let t = [],
            o = Math.ceil(Math.floor(Math.log2(Number(e)) + 1) / 8);
        for (let i = 0; i < o; i++) t.unshift(Number((e >> BigInt(8 * i)) & BigInt(255)));
        let n = new Uint8Array(t);
        return qT ? n : n.reverse();
    }
    function sn(e) {
        let t = uu(e, 0),
            o = KT(t);
        return [
            ys[o[0] >> 2],
            ys[((o[0] & 3) << 4) | (o[1] >> 4)],
            ys[((o[1] & 15) << 2) | (o[2] >> 6)],
            ys[o[2] & 63],
            ys[o[3] >> 2],
            ys[((o[3] & 3) << 4) | (o[4] >> 4)],
        ].join("");
    }
    var ys,
        qT,
        vs = he(() => {
            "use strict";
            a();
            l();
            sh();
            (ys = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("")),
                (qT = (() => {
                    let e = new Uint8Array(4),
                        t = new Uint32Array(e.buffer);
                    return !((t[0] = 1) & e[0]);
                })());
        });
    function Lt(e) {
        let t = typeof e == "string" ? e : e.source;
        if (
            ((t = t.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g, (i, s, c) => {
                let u = c === "raw" ? s : sn(s),
                    p = typeof e == "string";
                return !Number.isNaN(Number(u[0])) || u.includes("+") || u.includes("/")
                    ? p
                        ? `["${u}"]`
                        : String.raw`(?:\["${u}"\])`.replaceAll("+", "\\+")
                    : p
                      ? `.${u}`
                      : String.raw`(?:\.${u})`;
            })),
            typeof e == "string")
        )
            return t;
        let o = t.replaceAll(/(\\*)\\i/g, (i, s) =>
                s.length % 2 === 0 ? `${s}${String.raw`(?:[A-Za-z_$][\w$]*)`}` : i.slice(1)
            ),
            n = new RegExp(o, e.flags);
        return (n.toString = e.toString.bind(e)), n;
    }
    function ja(e, t) {
        return typeof e != "function" ? e.replaceAll("$self", t) : (...o) => e(...o).replaceAll("$self", t);
    }
    function pu(e, t) {
        if (e.get) {
            let o = e.get;
            e.get = function () {
                return t(o.call(this));
            };
        } else e.value && (e.value = t(e.value));
        return e;
    }
    function qa(e, t) {
        let o = Object.getOwnPropertyDescriptors(e);
        (o.match = pu(o.match, Lt)), (o.replace = pu(o.replace, (n) => ja(n, t))), Object.defineProperties(e, o);
    }
    function ah(e) {
        let t = Object.getOwnPropertyDescriptors(e);
        (t.find = pu(t.find, Lt)), Object.defineProperties(e, t);
    }
    var pr = he(() => {
        "use strict";
        a();
        l();
        vs();
    });
    function Qv(e, t, o) {
        return o === !1 ? (t ? e.slice(0, -1) : e) : e[0];
    }
    function Za(e, t, o = !1) {
        let { moment: n } = (S(), ka(An)),
            i = n.duration(e, t),
            s = ow.map((m) => ({ amount: i[m](), unit: m })),
            c = 0;
        e: for (let m = 0; m < s.length; m++)
            if (!(s[m].amount === 0 || !(m + 1 < s.length))) {
                for (let h = m + 1; h < s.length; h++) if (s[h].amount !== 0) continue e;
                c = s.length - (m + 1);
            }
        s = c === 0 ? s : s.slice(0, -c);
        let u = s.findIndex(({ unit: m }) => m === "days");
        if (u !== -1) {
            let m = s[u],
                h = m.amount % 7;
            h === 0 ? s.splice(u, 1) : (m.amount = h);
        }
        let p = "";
        for (; s.length; ) {
            let { amount: m, unit: h } = s.shift();
            p.length && (p += s.length ? ", " : " and "), (m > 0 || p.length) && (p += `${m} ${Qv(h, m === 1, o)}`);
        }
        return p.length ? p : `0 ${Qv(t, !1, o)}`;
    }
    function rw(e, t = (o) => o) {
        let { length: o } = e;
        if (o === 0) return "";
        if (o === 1) return t(e[0]);
        let n = "";
        for (let i = 0; i < o; i++) (n += t(e[i])), o - i > 2 ? (n += ", ") : o - i > 1 && (n += " and ");
        return n;
    }
    function bi(e, t) {
        return `\`\`\`${t || ""}
${e.replaceAll("```", "\\`\\`\\`")}
\`\`\``;
    }
    function Xv(e, ...t) {
        let o = String.raw({ raw: e }, ...t),
            n = o.match(/^[ \t]*(?=\S)/gm);
        if (!n) return o.trim();
        let i = n.reduce((s, c) => Math.min(s, c.length), 1 / 0);
        return o.replace(new RegExp(`^[ \\t]{${i}}`, "gm"), "").trim();
    }
    function nw(e) {
        return "``" + Ka + e.replaceAll("`", Ka + "`" + Ka) + Ka + "``";
    }
    var Ya,
        YT,
        ZT,
        QT,
        XT,
        JT,
        VT,
        ew,
        tw,
        vi,
        ow,
        Ka,
        lh,
        dr = he(() => {
            "use strict";
            a();
            l();
            (Ya = (e) =>
                e
                    .split(/(?=[A-Z][a-z])|(?<=[a-z])(?=[A-Z])/)
                    .map((t) => (/^[A-Z]{2,}$/.test(t) ? t : t.toLowerCase()))),
                (YT = (e) => e.toLowerCase().split("_")),
                (ZT = (e) => e.toLowerCase().split("-")),
                (QT = (e) => e.split(/(?=[A-Z])/).map((t) => t.toLowerCase())),
                (XT = (e) => e.toLowerCase().split(" ")),
                (JT = (e) => e.map((t, o) => (o ? t[0].toUpperCase() + t.slice(1) : t)).join("")),
                (VT = (e) => e.join("_").toUpperCase()),
                (ew = (e) => e.join("-").toLowerCase()),
                (tw = (e) => e.map((t) => t[0].toUpperCase() + t.slice(1)).join("")),
                (vi = (e) => e.map((t) => t[0].toUpperCase() + t.slice(1)).join(" ")),
                (ow = ["years", "months", "weeks", "days", "hours", "minutes", "seconds"]);
            Ka = "\u200B";
            lh =
                RegExp.escape ??
                function (e) {
                    return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
                };
        });
    function iw(e, t, o) {
        return function (...n) {
            return [t.apply(this, n), 0];
        };
    }
    function sw(e, t, o) {
        return t;
    }
    var Jv,
        an,
        du = he(() => {
            "use strict";
            a();
            l();
            le();
            (Jv = iw), (an = sw);
        });
    var bu = {};
    Ke(bu, {
        ChunkIdsRegex: () => vu,
        DefaultExtractAndLoadChunksRegex: () => yu,
        LazyComponentWebpack: () => r2,
        _blacklistBadModules: () => gu,
        _initWebpack: () => Va,
        _resolveReady: () => Qa,
        cache: () => Zo,
        extract: () => nl,
        extractAndLoadChunks: () => ph,
        extractAndLoadChunksLazy: () => xi,
        factoryListeners: () => Ja,
        filters: () => _,
        find: () => ho,
        findAll: () => Rn,
        findBulk: () => hu,
        findByCode: () => Ss,
        findByCodeLazy: () => de,
        findByProps: () => tl,
        findByPropsLazy: () => X,
        findComponentByCode: () => n2,
        findComponentByCodeLazy: () => ge,
        findComponentLazy: () => xs,
        findCssClasses: () => ch,
        findCssClassesLazy: () => ee,
        findExportedComponentLazy: () => i2,
        findLazy: () => Ot,
        findModuleFactory: () => el,
        findModuleId: () => kn,
        findStore: () => ol,
        findStoreLazy: () => it,
        fluxStores: () => Fr,
        handleModuleNotFound: () => mr,
        lazyWebpackSearchHistory: () => o2,
        makeClassNameRegex: () => mu,
        mapMangledCssClasses: () => rl,
        mapMangledModule: () => uh,
        mapMangledModuleLazy: () => Ye,
        moduleListeners: () => fu,
        onceReady: () => bs,
        proxyLazyWebpack: () => wo,
        search: () => Ts,
        stringMatches: () => Xa,
        waitFor: () => Ze,
        waitForSubscriptions: () => Si,
        wreq: () => ct,
    });
    function mu(e) {
        return new RegExp(`(?:\\b|_)${lh(e)}(?:\\b|_)`);
    }
    function Va(e) {
        (ct = e),
            (Zo = e.c),
            Reflect.defineProperty(e.c, Symbol.toStringTag, {
                value: "ModuleCache",
                configurable: !0,
                writable: !0,
                enumerable: !1,
            });
    }
    function e2(e) {
        return e == null ||
            e === unsafeWindow ||
            e === document ||
            e === document.documentElement ||
            e[Symbol.toStringTag] === "DOMTokenList" ||
            e[Symbol.toStringTag] === "IntlMessagesProxy"
            ? !0
            : e[Vv] !== void 0
              ? (Reflect.deleteProperty(e, Vv), !0)
              : e instanceof aw;
    }
    function t2(e, t) {
        let o = Object.getOwnPropertyDescriptor(e, t);
        o != null && Reflect.defineProperty(e, t, { ...o, enumerable: !1 });
    }
    function gu(e, t, o) {
        try {
            if (e2(t)) return t2(e, o), !0;
        } catch (s) {
            ln.error(
                `Error while blacklisting module:
`,
                s,
                `

Module id:`,
                o,
                `

Module exports:`,
                t
            );
        }
        if (typeof t != "object") return !1;
        let n = !0;
        for (let s in t)
            try {
                try {
                    var i = t[s];
                } catch {
                    continue;
                }
                e2(i) ? t2(t, s) : (n = !1);
            } catch (c) {
                ln.error(
                    `Error while blacklistng module:
`,
                    c,
                    `

Module id:`,
                    o,
                    `

Export value:`,
                    i
                );
            }
        return n;
    }
    function mr(e, ...t) {
        let o = new Error(`webpack.${e} found no module`);
        ln.error(o, "Filter:", t);
    }
    function Rn(e, { topLevelOnly: t = !1 } = {}) {
        if (typeof e != "function") throw new Error("Invalid filter. Expected a function got " + typeof e);
        let o = [];
        for (let n in Zo) {
            let i = Zo[n];
            if (
                !(!i?.loaded || i.exports == null) &&
                (e(i.exports) && o.push(i.exports), !(typeof i.exports != "object" || t))
            )
                for (let s in i.exports) {
                    let c = i.exports[s];
                    c && e(c) && o.push(c);
                }
        }
        return o;
    }
    function el(...e) {
        let t = kn(...e);
        return t ? ct.m[t] : null;
    }
    function wo(e, t) {
        return Pt(e, t);
    }
    function r2(e, t) {
        return lt(e, t);
    }
    function Ot(e) {
        return Pt(() => ho(e));
    }
    function tl(...e) {
        let t = ho(_.byProps(...e), { isIndirect: !0 });
        return t || mr("findByProps", ...e), t;
    }
    function X(...e) {
        return Pt(() => tl(...e));
    }
    function Ss(...e) {
        let t = ho(_.byCode(...e), { isIndirect: !0 });
        return t || mr("findByCode", ...e), t;
    }
    function de(...e) {
        return Pt(() => Ss(...e));
    }
    function lw() {
        let { Flux: e } = (S(), ka(An));
        e.Store.getAll?.().forEach((t) => Fr.set(t.getName(), t));
        try {
            let o = Ss("libdiscoreWasm is not initialized")();
            for (let n in o) {
                if (!n.endsWith("Store")) continue;
                let i = n,
                    s = o[i];
                Fr.set(i, s);
            }
        } catch {}
    }
    function ol(e) {
        if ((Fr.has(e) || lw(), Fr.has(e))) return Fr.get(e);
        let t = ho(_.byStoreName(e), { isIndirect: !0 });
        return t ? (Fr.set(e, t), t) : (mr("findStore", e), null);
    }
    function it(e) {
        return Pt(() => ol(e));
    }
    function n2(...e) {
        let t = ho(_.componentByCode(...e), { isIndirect: !0 });
        return t || mr("findComponentByCode", ...e), t;
    }
    function xs(e) {
        return lt(() => {
            let t = ho(e, { isIndirect: !0 });
            return t || mr("findComponent", e), t;
        });
    }
    function ge(...e) {
        return lt(() => {
            let t = ho(_.componentByCode(...e), { isIndirect: !0 });
            return t || mr("findComponentByCode", ...e), t;
        });
    }
    function i2(...e) {
        return lt(() => {
            let t = ho(_.byProps(...e), { isIndirect: !0 });
            return t || mr("findExportedComponent", ...e), t[e[0]];
        });
    }
    function rl(e, t) {
        let o = Object.values(e),
            n = {};
        for (let i of t) {
            let s = mu(i);
            if (((n[i] = o.find((c) => typeof c == "string" && s.test(c))), !n[i]))
                throw new Error(`mapMangledCssClasses: Invalid input. ${i} not found in module`);
        }
        return n;
    }
    function ch(...e) {
        let t = ho(_.byClassNames(...e), { isIndirect: !0, topLevelOnly: !0 });
        return t ? rl(t, e) : (mr("findCssClasses", ...e), {});
    }
    function ee(...e) {
        return Pt(() => ch(...e));
    }
    function cw(e, t) {
        let o = new Set(),
            n = t ? Object.getOwnPropertyNames : Object.keys;
        do n(e).forEach((i) => i !== "__esModule" && o.add(i)), (e = Object.getPrototypeOf(e));
        while (e != null);
        return o;
    }
    function Ye(e, t, o = !1) {
        return Pt(() => uh(e, t, o));
    }
    async function ph(e, t = yu) {
        let o = el(...e);
        if (!o) {
            let p = new Error("extractAndLoadChunks: Couldn't find module factory");
            return ln.warn(p, "Code:", e, "Matcher:", t), !1;
        }
        let n = String(o).match(Lt(t));
        if (!n) {
            let p = new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");
            return ln.warn(p, "Code:", e, "Matcher:", t), !1;
        }
        let [, i, s] = n;
        if (s == null) {
            let p = new Error(
                "extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array or the entry point id"
            );
            return ln.warn(p, "Code:", e, "Matcher:", t), !1;
        }
        let c = Number(s),
            u = Number.isNaN(c) ? s : c;
        if (i) {
            let p = Array.from(i.matchAll(vu)).map((m) => {
                let h = Number(m[1]);
                return Number.isNaN(h) ? m[1] : h;
            });
            await Promise.all(p.map((m) => ct.e(m)));
        }
        if (ct.m[u] == null) {
            let p = new Error(
                "extractAndLoadChunks: Entry point is not loaded in the module factories, perhaps one of the chunks failed to load"
            );
            return ln.warn(p, "Code:", e, "Matcher:", t), !1;
        }
        return ct(u), !0;
    }
    function xi(e, t = yu) {
        return rn(() => ph(e, t));
    }
    function Ze(e, t, { isIndirect: o = !1 } = {}) {
        if (typeof e == "string") e = _.byProps(e);
        else if (Array.isArray(e)) e = _.byProps(...e);
        else if (typeof e != "function")
            throw new Error("filter must be a string, string[] or function, got " + typeof e);
        if (Zo != null) {
            let [n, i] = ho(e, { isIndirect: !0, isWaitFor: !0 });
            if (n) return void t(n, i);
        }
        Si.set(e, t);
    }
    function Ts(...e) {
        e = e.map(Lt);
        let t = {},
            o = ct.m;
        for (let n in o) {
            let i = o[n];
            Xa(i.toString(), e) && (t[n] = i);
        }
        return t;
    }
    function nl(e) {
        let t = ct.m[e];
        if (!t) return null;
        let o = String(t),
            i = "0," + (o.startsWith("(") ? "" : "function") + o.slice(o.indexOf("(")),
            s = `
// [EXTRACTED] WebpackModule${String(e)}
// WARNING: This module was extracted to be more easily readable.
//          This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!

0,${i}
//# sourceURL=file:///ExtractedWebpackModule${String(e)}
`;
        return (0, eval)(s);
    }
    var ln,
        Qa,
        bs,
        ct,
        Zo,
        Fr,
        Xa,
        _,
        Si,
        fu,
        Ja,
        aw,
        Vv,
        ho,
        hu,
        kn,
        o2,
        uh,
        yu,
        vu,
        G = he(() => {
            "use strict";
            a();
            l();
            Fo();
            yi();
            le();
            pr();
            dr();
            du();
            (ln = new U("Webpack")),
                (bs = new Promise((e) => (Qa = e))),
                (Fr = new Map()),
                (Xa = (e, t) =>
                    t.every((o) =>
                        typeof o == "string" ? e.includes(o) : (o.global && (o.lastIndex = 0), o.test(e))
                    ));
            (_ = {
                byProps: (...e) =>
                    e.length === 1 ? (t) => t[e[0]] !== void 0 : (t) => e.every((o) => t[o] !== void 0),
                byCode: (...e) => {
                    let t = e.map(Lt),
                        o = (n) => (typeof n != "function" ? !1 : Xa(Function.prototype.toString.call(n), t));
                    return (o.$$vencordProps = [...e]), o;
                },
                byStoreName: (e) => (t) => t.constructor?.displayName === e,
                componentByCode: (...e) => {
                    let t = _.byCode(...e),
                        o = (n) => {
                            let i = n;
                            for (; i != null; ) {
                                if (t(i)) return !0;
                                if (i.$$typeof)
                                    if (i.type) i = i.type;
                                    else if (i.render) i = i.render;
                                    else return !1;
                                else return !1;
                            }
                            return !1;
                        };
                    return (o.$$vencordProps = [...e]), o;
                },
                byClassNames: (...e) => {
                    let t = e.map(mu);
                    return (o) => {
                        if (typeof o != "object") return !1;
                        let n = Object.values(o);
                        return t.every((i) => n.some((s) => typeof s == "string" && i.test(s)));
                    };
                },
            }),
                (Si = new Map()),
                (fu = new Set()),
                (Ja = new Set());
            (aw = Object.getPrototypeOf(Int8Array)), (Vv = "is this a proxy that returns values for any key?");
            ho = an("find", function (t, { isIndirect: o = !1, isWaitFor: n = !1, topLevelOnly: i = !1 } = {}) {
                if (typeof t != "function") throw new Error("Invalid filter. Expected a function got " + typeof t);
                for (let s in Zo) {
                    let c = Zo[s];
                    if (!(!c?.loaded || c.exports == null)) {
                        if (t(c.exports)) return n ? [c.exports, s] : c.exports;
                        if (!(typeof c.exports != "object" || i))
                            for (let u in c.exports) {
                                let p = c.exports[u];
                                if (p && t(p)) return n ? [p, s] : p;
                            }
                    }
                }
                return o || mr("find", t), n ? [null, null] : null;
            });
            (hu = an("findBulk", function (...t) {
                if (!Array.isArray(t)) throw new Error("Invalid filters. Expected function[] got " + typeof t);
                let { length: o } = t;
                if (o === 0) throw new Error("Expected at least two filters.");
                if (o === 1) return ho(t[0]);
                let n = t,
                    i = 0,
                    s = Array(o);
                e: for (let c in Zo) {
                    let u = Zo[c];
                    if (!(!u?.loaded || u.exports == null))
                        for (let p = 0; p < o; p++) {
                            let m = n[p];
                            if (m !== void 0) {
                                if (m(u.exports)) {
                                    if (((s[p] = u.exports), (n[p] = void 0), ++i === o)) break e;
                                    break;
                                }
                                if (typeof u.exports == "object")
                                    for (let h in u.exports) {
                                        let y = u.exports[h];
                                        if (y && m(y)) {
                                            if (((s[p] = y), (n[p] = void 0), ++i === o)) break e;
                                            continue e;
                                        }
                                    }
                            }
                        }
                }
                if (i !== o) {
                    let c = new Error(`Got ${o} filters, but only found ${i} modules!`);
                    ln.warn(c);
                }
                return s;
            })),
                (kn = an("findModuleId", function (...t) {
                    t = t.map(Lt);
                    for (let n in ct.m) if (Xa(ct.m[n].toString(), t)) return n;
                    let o = new Error(
                        `Didn't find module with code(s):
` +
                            t.join(`
`)
                    );
                    return ln.warn(o), null;
                }));
            o2 = [];
            uh = an("mapMangledModule", function (t, o, n = !1) {
                let i = {},
                    s = kn(...(Array.isArray(t) ? t : [t]));
                if (s === null) return i;
                let c = ct(s),
                    u = cw(c, n);
                e: for (let p of u) {
                    let m = c[p];
                    for (let h in o)
                        if (o[h](m)) {
                            i[h] = m;
                            continue e;
                        }
                }
                return i;
            });
            (yu =
                /(?:(?:Promise\.all\(\[)?((?:\i\.e\("?[^)]+?"?\),?)+?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/),
                (vu = /\("([^"]+?)"\)/g);
        });
    function mh(e) {
        let t = typeof e;
        return t === "string" || t === "number" || t === "bigint" || t === "boolean" || t === "undefined";
    }
    function _t(e, t) {
        let o = Object.assign({ fallbackValue: null, deps: [], onError: null }, t),
            [n, i] = k({ value: o.fallbackValue, error: null, pending: !0 });
        return (
            te(() => {
                let s = !0;
                return (
                    n.pending || i({ ...n, pending: !0 }),
                    e()
                        .then((c) => {
                            s && (i({ value: c, error: null, pending: !1 }), o.onSuccess?.(c));
                        })
                        .catch((c) => {
                            s && (i({ value: null, error: c, pending: !1 }), o.onError?.(c));
                        }),
                    () => void (s = !1)
                );
            }, o.deps),
            [n.value, n.error, n.pending]
        );
    }
    function Qo(e) {
        let t = ws((o) => o + 1, 0);
        return e ? t : t[1];
    }
    function il({ interval: e = 1e3, deps: t = [] }) {
        let [o, n] = k(0),
            i = ce(() => Date.now(), t);
        return (
            te(() => {
                let s = setInterval(() => n(Date.now() - i), e);
                return () => {
                    n(0), clearInterval(s);
                };
            }, t),
            o
        );
    }
    function fh(e, t) {
        te(() => e, t);
    }
    var dh,
        uw,
        pt = he(() => {
            "use strict";
            a();
            l();
            S();
            re();
            yi();
            dh = () => null;
            uw = (e = !1) => {
                let t = xe.useRef(null),
                    [o, n] = k(!1);
                return [
                    (s) => {
                        t.current?.disconnect(),
                            (t.current = null),
                            s &&
                                ((_g(s) && (n(!0), e)) ||
                                    ((t.current = new IntersectionObserver((c) => {
                                        for (let u of c)
                                            u.target === s &&
                                                (u.isIntersecting && e
                                                    ? (n(!0), t.current?.disconnect(), (t.current = null))
                                                    : n(u.isIntersecting));
                                    })),
                                    t.current.observe(s)));
                    },
                    o,
                ];
            };
        });
    function Et(e, t, o = null) {
        let n = null,
            i = lt(() => {
                if (n) return n;
                let s = new Error(`Vencord could not find the ${e} Component`);
                return pw.error(s), o;
            });
        return (
            Ze(
                t,
                (s) => {
                    (n = s), Object.assign(i, s);
                },
                { isIndirect: !0 }
            ),
            i
        );
    }
    function me(e, t) {
        Ze(_.byStoreName(e), t, { isIndirect: !0 });
    }
    var pw,
        gh = he(() => {
            "use strict";
            a();
            l();
            le();
            pt();
            G();
            pw = new U("Webpack");
        });
    var N,
        H,
        F,
        dw,
        hh,
        V,
        mw,
        ht,
        Ti,
        ro,
        Is,
        Dn,
        Ps,
        yh,
        Xo,
        vh,
        yo,
        al,
        Ln,
        fr,
        ll,
        Su,
        s2,
        $r,
        fw,
        gw,
        sl,
        hw,
        On,
        yw,
        bh,
        vw,
        xu,
        cl,
        ul,
        Vt,
        wi,
        Tu,
        a2 = he(() => {
            "use strict";
            a();
            l();
            Vr();
            lr();
            Qt();
            Nn();
            Ur();
            Yo();
            hi();
            Wv();
            yi();
            G();
            gh();
            (N = { FormTitle: Xt, FormText: Me, FormSection: "section", FormDivider: Fe }),
                (H = Gg),
                (F = gs),
                (dw = rh),
                (hh = Et("Checkbox", _.componentByCode('"data-toggleable-component":"checkbox'))),
                (V = Et("Tooltip", (e) => e.prototype?.shouldShowTooltip && e.prototype.render, nh)),
                (mw = Uo),
                (ht = Et("TextInput", _.componentByCode("#{intl::MAXIMUM_LENGTH_ERROR}", '"input"'))),
                (Ti = Et("TextArea", _.componentByCode("this.getPaddingRight()},id:"))),
                (ro = Et("Select", _.componentByCode('"Select"'))),
                (Is = Et("SearchableSelect", _.componentByCode('"SearchableSelect"'))),
                (Dn = Et("Slider", _.componentByCode("markDash", "this.renderMark("))),
                (Ps = Et("Popout", _.componentByCode("ref:this.ref,", "renderPopout:this.renderPopout,"))),
                (yh = Et("Dialog", _.componentByCode('role:"dialog",tabIndex:-1'))),
                (Xo = Et("TabBar", _.componentByCode("ref:this.tabBarRef,className:"))),
                (vh = Et("Paginator", _.componentByCode('rel:"prev",children:'))),
                (yo = Et("Clickable", _.componentByCode("this.context?this.renderNonInteractive():"))),
                (al = Et("Avatar", _.componentByCode(".size-1.375*"))),
                (Ln = Et(
                    "ColorPicker",
                    _.componentByCode("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", "showEyeDropper")
                )),
                (fr = Et("UserSummaryItem", _.componentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers"))),
                (s2 = ["thin", "auto", "fade"]),
                ($r = ee("thin", "auto", "fade", "customTheme", "none")),
                (fw = _.byClassNames(...s2)),
                (gw = _.byClassNames("customTheme")),
                (sl = wo(() => {
                    let e = ho((t) => fw(t) && !gw(t), { topLevelOnly: !0 });
                    return e ? rl(e, s2) : {};
                }));
            Ze(_.byCode('="ltr",orientation:', "customTheme:", "forwardRef"), (e) => (ll = e));
            Ze(_.byCode("getScrollerNode:", "resizeObserver:", "sectionHeight:"), (e) => (Su = e));
            (hw = lt(() => ll($r.none, $r.fade, $r.customTheme))),
                (On = lt(() => ll($r.thin, $r.fade, $r.customTheme))),
                (yw = lt(() => ll($r.auto, $r.fade, $r.customTheme))),
                (bh = lt(() => Su(sl.thin, sl.fade, "", ResizeObserver))),
                (vw = lt(() => Su(sl.auto, sl.fade, "", ResizeObserver))),
                (xu = Et("FocusLock", _.componentByCode(".containerRef,{keyboardModeEnabled:")));
            Ze(
                (e) => {
                    if (typeof e != "function") return !1;
                    let t = String(e);
                    return (
                        t.includes(".resolve({theme:") &&
                        t.includes('"refresh-fast-follow-avatars"') &&
                        !t.includes("useMemo")
                    );
                },
                (e) => (cl = e)
            );
            (ul = Et("MaskedLink", _.componentByCode("MASKED_LINK)"))),
                (Vt = Et("Timestamp", _.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}"))),
                (wi = Et("OAuth2AuthorizeModal", _.componentByCode("hasContentBackground", "nextStep", "onClose?.()"))),
                (Tu = Ye(".assign({colorNames:", {
                    Transition: _.componentByCode('["items","children"]', ",null,"),
                    animated: _.byProps("div", "text"),
                }));
        });
    var M,
        st,
        l2 = he(() => {
            "use strict";
            a();
            l();
            G();
            M = {};
            Ze(
                (e) => e.name === "MenuCheckboxItem",
                (e, t) => {
                    let o = ct(t);
                    for (let i in o) {
                        try {
                            var n = o[i];
                        } catch {
                            continue;
                        }
                        typeof n == "function" && n.name.startsWith("Menu") && (M[n.name] = n);
                    }
                }
            );
            Ze(_.componentByCode('path:["empty"]'), (e) => (M.Menu = e));
            Ze(_.componentByCode("SLIDER)", "handleSize:16"), (e) => (M.MenuSliderControl = e));
            Ze(_.componentByCode(".SEARCH)", ".focus()", "query:"), (e) => (M.MenuSearchControl = e));
            st = Ye('type:"CONTEXT_MENU_OPEN', {
                closeContextMenu: _.byCode("CONTEXT_MENU_CLOSE"),
                openContextMenu: _.byCode("renderLazy:"),
                openContextMenuLazy: (e) => typeof e == "function" && e.toString().length < 100,
            });
        });
    var xe,
        k,
        te,
        _n,
        ce,
        at,
        ws,
        wu,
        bw,
        Ii,
        c2 = he(() => {
            "use strict";
            a();
            l();
            G();
            (bw = X("createPortal")), (Ii = de("(299));", ".onRecoverableError"));
            Ze("useState", (e) => {
                (xe = e),
                    ({
                        useEffect: te,
                        useState: k,
                        useLayoutEffect: _n,
                        useMemo: ce,
                        useRef: at,
                        useReducer: ws,
                        useCallback: wu,
                    } = xe);
            });
        });
    var u2 = {};
    Ke(u2, {
        AccessibilityStore: () => Sh,
        ActiveJoinedThreadsStore: () => dl,
        ApplicationStore: () => Th,
        AuthenticationStore: () => Kt,
        CallStore: () => Ch,
        ChannelRTCStore: () => Ds,
        ChannelStore: () => Z,
        DraftStore: () => As,
        DraftType: () => Gt,
        EmojiStore: () => Jo,
        Flux: () => Ms,
        FriendsStore: () => Nh,
        GuildChannelStore: () => Gr,
        GuildMemberCountStore: () => Cs,
        GuildMemberStore: () => Se,
        GuildRoleStore: () => yt,
        GuildScheduledEventStore: () => xh,
        GuildStore: () => Ce,
        InstantInviteStore: () => Ah,
        InviteStore: () => Rh,
        LocaleStore: () => kh,
        MediaEngineStore: () => Rs,
        MessageStore: () => qt,
        NotificationSettingsStore: () => Ih,
        OverridePremiumTypeStore: () => Mh,
        PermissionStore: () => Te,
        PopoutWindowStore: () => Un,
        PresenceStore: () => no,
        RTCConnectionStore: () => Dh,
        ReadStateStore: () => En,
        RelationshipStore: () => we,
        RunningGameStore: () => ks,
        SelectedChannelStore: () => Le,
        SelectedGuildStore: () => io,
        SoundboardStore: () => Lh,
        SpellCheckStore: () => Ph,
        SpotifyStore: () => wh,
        StickersStore: () => ao,
        StreamerModeStore: () => pl,
        ThemeStore: () => Ns,
        TypingStore: () => cn,
        UploadAttachmentStore: () => Bn,
        UserGuildSettingsStore: () => ml,
        UserProfileStore: () => Bt,
        UserSettingsProtoStore: () => fl,
        UserStore: () => R,
        VoiceStateStore: () => so,
        WindowStore: () => Hr,
        useStateFromStores: () => ie,
    });
    var Ms,
        Gt,
        qt,
        Te,
        Gr,
        En,
        no,
        Sh,
        Ce,
        yt,
        xh,
        Cs,
        Se,
        R,
        Kt,
        Th,
        Bt,
        Le,
        io,
        Z,
        cn,
        we,
        so,
        Jo,
        ao,
        Ns,
        Hr,
        As,
        pl,
        wh,
        Rs,
        Ih,
        Ph,
        Bn,
        Mh,
        ks,
        dl,
        ml,
        fl,
        Ch,
        Ds,
        Nh,
        Ah,
        Rh,
        kh,
        Dh,
        Lh,
        Un,
        ie,
        Oh = he(() => {
            "use strict";
            a();
            l();
            G();
            gh();
            (Ms = X("connectStores")), (Gt = X("ChannelMessage", "SlashCommand")), (ie = de("useStateFromStores"));
            me("AccessibilityStore", (e) => (Sh = e));
            me("ApplicationStore", (e) => (Th = e));
            me("AuthenticationStore", (e) => (Kt = e));
            me("DraftStore", (e) => (As = e));
            me("UserStore", (e) => (R = e));
            me("UserProfileStore", (e) => (Bt = e));
            me("ChannelStore", (e) => (Z = e));
            me("SelectedChannelStore", (e) => (Le = e));
            me("SelectedGuildStore", (e) => (io = e));
            me("GuildStore", (e) => (Ce = e));
            me("GuildMemberStore", (e) => (Se = e));
            me("RelationshipStore", (e) => (we = e));
            me("MediaEngineStore", (e) => (Rs = e));
            me("NotificationSettingsStore", (e) => (Ih = e));
            me("SpellcheckStore", (e) => (Ph = e));
            me("PermissionStore", (e) => (Te = e));
            me("PresenceStore", (e) => (no = e));
            me("ReadStateStore", (e) => (En = e));
            me("GuildChannelStore", (e) => (Gr = e));
            me("GuildRoleStore", (e) => (yt = e));
            me("GuildScheduledEventStore", (e) => (xh = e));
            me("GuildMemberCountStore", (e) => (Cs = e));
            me("MessageStore", (e) => (qt = e));
            me("WindowStore", (e) => (Hr = e));
            me("EmojiStore", (e) => (Jo = e));
            me("StickersStore", (e) => (ao = e));
            me("TypingStore", (e) => (cn = e));
            me("VoiceStateStore", (e) => (so = e));
            me("StreamerModeStore", (e) => (pl = e));
            me("SpotifyStore", (e) => (wh = e));
            me("OverridePremiumTypeStore", (e) => (Mh = e));
            me("UploadAttachmentStore", (e) => (Bn = e));
            me("RunningGameStore", (e) => (ks = e));
            me("ActiveJoinedThreadsStore", (e) => (dl = e));
            me("UserGuildSettingsStore", (e) => (ml = e));
            me("UserSettingsProtoStore", (e) => (fl = e));
            me("CallStore", (e) => (Ch = e));
            me("ChannelRTCStore", (e) => (Ds = e));
            me("FriendsStore", (e) => (Nh = e));
            me("InstantInviteStore", (e) => (Ah = e));
            me("InviteStore", (e) => (Rh = e));
            me("LocaleStore", (e) => (kh = e));
            me("RTCConnectionStore", (e) => (Dh = e));
            me("SoundboardStore", (e) => (Lh = e));
            me("PopoutWindowStore", (e) => (Un = e));
            me("ThemeStore", (e) => {
                (Ns = e), Vencord.Api.Themes.initQuickCssThemeStore(e);
            });
        });
    var gl,
        p2 = he(() => {
            "use strict";
            a();
            l();
            G();
            gl = {
                FrecencyUserSettingsActionCreators: Ot((e) =>
                    e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")
                ),
                PreloadedUserSettingsActionCreators: Ot((e) =>
                    e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings")
                ),
            };
        });
    function Ge(e, t = d2.MESSAGE, o) {
        J.show(J.create(e, t, o));
    }
    var B,
        Io,
        vt,
        Ct,
        Ls,
        Sw,
        Iu,
        xw,
        Pi,
        zr,
        vo,
        Ne,
        Qe,
        d2,
        Tw,
        J,
        lo,
        Mi,
        hl,
        Ci,
        gr,
        Os,
        Fn,
        pe,
        Ni,
        _h,
        bo,
        Pu,
        Eh,
        Bh,
        yl,
        bt,
        vl,
        ww,
        Iw,
        Pw,
        $n,
        bl,
        m2 = he(() => {
            "use strict";
            a();
            l();
            G();
            Ze(["dispatch", "subscribe"], (e) => {
                (B = e), Vencord.Api.PluginManager.subscribeAllPluginsFluxEvents(e);
                let t = () => {
                    e.unsubscribe("CONNECTION_OPEN", t), Qa();
                };
                e.subscribe("CONNECTION_OPEN", t);
            });
            Ze(["dispatchToLastSubscribed"], (e) => (Io = e));
            (vt = Ye('ME:"/users/@me"', {
                Endpoints: _.byProps("USER", "ME"),
                UserFlags: _.byProps("STAFF", "SPAMMER"),
                FriendsSections: (e) => e.PENDING === "PENDING" && e.ADD_FRIEND,
            })),
                (Ct = Ot((e) => typeof e == "object" && e.del && e.put)),
                (Ls = X("parseTwoDigitYear")),
                (Sw = X("highlight", "registerLanguage")),
                ({ match: Iu, P: xw } = Ye("@ts-pattern/matcher", {
                    match: _.byCode("return new"),
                    P: _.byProps("when"),
                })),
                (Pi = X("debounce", "cloneDeep")),
                (zr = Ye(
                    ['defaultLocale:"en-US"', /initialLocale:\i/],
                    {
                        t: (e) => e?.[Symbol.toStringTag] === "IntlMessagesProxy",
                        intl: (e) => e != null && Object.getPrototypeOf(e)?.withFormatters != null,
                    },
                    !0
                ));
            Ze(["fromTimestamp", "extractTimestamp"], (e) => (vo = e));
            Ze("parseTopic", (e) => (Ne = e));
            Ze(["show", "close"], (e) => (Qe = e));
            (d2 = {
                MESSAGE: "message",
                SUCCESS: "success",
                FAILURE: "failure",
                CUSTOM: "custom",
                CLIP: "clip",
                LINK: "link",
                FORWARD: "forward",
                BOOKMARK: "bookmark",
                CLOCK: "clock",
            }),
                (Tw = { TOP: 0, BOTTOM: 1 }),
                (J = { Type: d2, Position: Tw, genId: () => (Math.random() || Math.random()).toString(36).slice(2) });
            Ze("showToast", (e) => {
                (J.show = e.showToast), (J.pop = e.popToast), (J.create = e.createToast);
            });
            (lo = { getUser: de(".USER(") }),
                (Mi = X("clearAll", "addFile")),
                (hl = { promptToUpload: de("Unexpected mismatch between files and file metadata") }),
                (Ci = Ye("getAssetImage: size must === [", {
                    fetchAssetIds: _.byCode('.startsWith("http:")', ".dispatch({"),
                    getAssetFromImageURL: _.byCode("].serialize(", ":null"),
                    getAssetImage: _.byCode("getAssetImage: size must === ["),
                    getAssets: _.byCode(".assets"),
                })),
                (gr = Ye("transitionTo - Transitioning to", {
                    transitionTo: _.byCode("transitionTo -"),
                    transitionToGuild: _.byCode("transitionToGuild -"),
                    back: _.byCode("goBack()"),
                    forward: _.byCode("goForward()"),
                })),
                (Os = Ye('"Thread must have a parent ID."', {
                    transitionToChannel: _.byCode(".preload"),
                    transitionToThread: _.byCode('"Thread must have a parent ID."'),
                }));
            Ze(["openUserSettings", "USER_SETTINGS_MODAL_KEY"], (e) => (Fn = e));
            (pe = Ot((e) => typeof e.ADMINISTRATOR == "bigint")),
                ({ zustandCreate: Ni } = Ye(["useSyncExternalStoreWithSelector:", "Object.assign"], {
                    zustandCreate: _.byCode(/=>(\i)\?\i\(\1/),
                })),
                ({ zustandPersist: _h } = Ye(".onRehydrateStorage)?", {
                    zustandPersist: _.byCode(/(\(\i,\i\))=>.+?\i\1/),
                })),
                (bo = X("editMessage", "sendMessage")),
                (Pu = X("clearCache", "_channelMessages")),
                (Eh = X("openUserProfileModal", "closeUserProfileModal")),
                (Bh = X("resolveInvite")),
                (yl = X("openPrivateChannel")),
                (bt = X("getGuildBannerURL", "getUserAvatarURL")),
                (vl = Ye("expression-picker-last-active-view", {
                    openExpressionPicker: _.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/),
                    closeExpressionPicker: _.byCode("setState({activeView:null"),
                    toggleMultiExpressionPicker: _.byCode(".EMOJI,"),
                    toggleExpressionPicker: _.byCode(/getState\(\)\.activeView===\i\?\i\(\):\i\(/),
                    setExpressionPickerView: _.byCode(/setState\({activeView:\i,lastActiveView:/),
                    setSearchQuery: _.byCode("searchQuery:"),
                    useExpressionPickerStore: _.byCode(/\(\i,\i=\i\)=>/),
                })),
                (ww = Ye('type:"POPOUT_WINDOW_OPEN"', {
                    open: _.byCode('type:"POPOUT_WINDOW_OPEN"'),
                    close: _.byCode('type:"POPOUT_WINDOW_CLOSE"'),
                    setAlwaysOnTop: _.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"'),
                })),
                (Iw = X("useName", "getGlobalName")),
                (Pw = Ye(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/, {
                    getDisplayProfile: _.byCode(".getGuildMemberProfile("),
                    useDisplayProfile: _.byCode(/\[\i\.\i,\i\.\i],\(\)=>/),
                })),
                ($n = Ye("millisecondsInUnit:", {
                    calendarFormat: _.byCode('<-1?"sameElse":'),
                    dateFormat: _.byCode('<2?"nextDay":"sameElse";'),
                    isSameDay: _.byCode(/Math\.abs\(\i-\i\)/),
                    diffAsUnits: _.byCode("days:0", "millisecondsInUnit"),
                })),
                (bl = X("REPLYABLE", "FORWARDABLE"));
        });
    var An = {};
    Ke(An, {
        AccessibilityStore: () => Sh,
        ActiveJoinedThreadsStore: () => dl,
        Alerts: () => Qe,
        Animations: () => Tu,
        ApplicationAssetUtils: () => Ci,
        ApplicationStore: () => Th,
        AuthenticationStore: () => Kt,
        Avatar: () => al,
        Button: () => F,
        CallStore: () => Ch,
        ChannelActionCreators: () => yl,
        ChannelRTCStore: () => Ds,
        ChannelRouter: () => Os,
        ChannelStore: () => Z,
        Checkbox: () => hh,
        Clickable: () => yo,
        ColorPicker: () => Ln,
        ComponentDispatch: () => Io,
        Constants: () => vt,
        ContextMenuApi: () => st,
        DateUtils: () => $n,
        Dialog: () => yh,
        DisplayProfileUtils: () => Pw,
        DraftStore: () => As,
        DraftType: () => Gt,
        EmojiStore: () => Jo,
        ExpressionPickerStore: () => vl,
        Flux: () => Ms,
        FluxDispatcher: () => B,
        FocusLock: () => xu,
        Forms: () => N,
        FriendsStore: () => Nh,
        GuildChannelStore: () => Gr,
        GuildMemberCountStore: () => Cs,
        GuildMemberStore: () => Se,
        GuildRoleStore: () => yt,
        GuildScheduledEventStore: () => xh,
        GuildStore: () => Ce,
        IconUtils: () => bt,
        InstantInviteStore: () => Ah,
        InviteActions: () => Bh,
        InviteStore: () => Rh,
        ListScrollerAuto: () => vw,
        ListScrollerThin: () => bh,
        LocaleStore: () => kh,
        MaskedLink: () => ul,
        MediaEngineStore: () => Rs,
        Menu: () => M,
        MessageActions: () => bo,
        MessageCache: () => Pu,
        MessageStore: () => qt,
        MessageTypeSets: () => bl,
        NavigationRouter: () => gr,
        NotificationSettingsStore: () => Ih,
        OAuth2AuthorizeModal: () => wi,
        OverridePremiumTypeStore: () => Mh,
        P: () => xw,
        Paginator: () => vh,
        Parser: () => Ne,
        PermissionStore: () => Te,
        PermissionsBits: () => pe,
        Popout: () => Ps,
        PopoutActions: () => ww,
        PopoutWindowStore: () => Un,
        PresenceStore: () => no,
        RTCConnectionStore: () => Dh,
        React: () => xe,
        ReactDOM: () => bw,
        ReadStateStore: () => En,
        RelationshipStore: () => we,
        RestAPI: () => Ct,
        RunningGameStore: () => ks,
        ScrollerAuto: () => yw,
        ScrollerNone: () => hw,
        ScrollerThin: () => On,
        SearchableSelect: () => Is,
        Select: () => ro,
        SelectedChannelStore: () => Le,
        SelectedGuildStore: () => io,
        SettingsRouter: () => Fn,
        Slider: () => Dn,
        SnowflakeUtils: () => vo,
        SoundboardStore: () => Lh,
        SpellCheckStore: () => Ph,
        SpotifyStore: () => wh,
        StickersStore: () => ao,
        StreamerModeStore: () => pl,
        Switch: () => dw,
        TabBar: () => Xo,
        Text: () => H,
        TextArea: () => Ti,
        TextInput: () => ht,
        ThemeStore: () => Ns,
        Timestamp: () => Vt,
        Toasts: () => J,
        Tooltip: () => V,
        TooltipContainer: () => mw,
        TypingStore: () => cn,
        UploadAttachmentStore: () => Bn,
        UploadHandler: () => hl,
        UploadManager: () => Mi,
        UserGuildSettingsStore: () => ml,
        UserProfileActions: () => Eh,
        UserProfileStore: () => Bt,
        UserSettingsActionCreators: () => gl,
        UserSettingsProtoStore: () => fl,
        UserStore: () => R,
        UserSummaryItem: () => fr,
        UserUtils: () => lo,
        UsernameUtils: () => Iw,
        VoiceStateStore: () => so,
        WindowStore: () => Hr,
        createListScroller: () => Su,
        createRoot: () => Ii,
        createScroller: () => ll,
        hljs: () => Sw,
        i18n: () => zr,
        listScrollerClasses: () => sl,
        lodash: () => Pi,
        match: () => Iu,
        moment: () => Ls,
        scrollerClasses: () => $r,
        showToast: () => Ge,
        useCallback: () => wu,
        useEffect: () => te,
        useLayoutEffect: () => _n,
        useMemo: () => ce,
        useReducer: () => ws,
        useRef: () => at,
        useState: () => k,
        useStateFromStores: () => ie,
        useToken: () => cl,
        zustandCreate: () => Ni,
        zustandPersist: () => _h,
    });
    var S = he(() => {
        "use strict";
        a();
        l();
        a2();
        l2();
        c2();
        Oh();
        p2();
        m2();
    });
    function Po(e) {
        return navigator.clipboard.writeText(e);
    }
    var Gn = he(() => {
        "use strict";
        a();
        l();
    });
    var So,
        _s,
        ve,
        Re,
        Ie,
        St,
        et,
        Uh,
        Sl,
        xl,
        fe,
        un,
        Wr,
        Oe = he(() => {
            "use strict";
            a();
            l();
            G();
            pt();
            (So = ((i) => (
                (i.SMALL = "small"), (i.MEDIUM = "medium"), (i.LARGE = "large"), (i.DYNAMIC = "dynamic"), i
            ))(So || {})),
                (_s = Ye(".MODAL_ROOT_LEGACY,", {
                    ModalRoot: _.componentByCode('.MODAL,"aria-labelledby":'),
                    ModalHeader: _.componentByCode(",id:"),
                    ModalContent: _.componentByCode("scrollbarType:"),
                    ModalFooter: _.componentByCode(".HORIZONTAL_REVERSE,"),
                    ModalCloseButton: _.componentByCode(".withCircleBackground"),
                })),
                (ve = lt(() => _s.ModalRoot)),
                (Re = lt(() => _s.ModalHeader)),
                (Ie = lt(() => _s.ModalContent)),
                (St = lt(() => _s.ModalFooter)),
                (et = lt(() => _s.ModalCloseButton)),
                (Uh = de("hasMediaOptions", "shouldHideMediaOptions")),
                (Sl = Ye(".modalKey?", {
                    openModalLazy: _.byCode(".modalKey?"),
                    openModal: _.byCode(",instant:"),
                    closeModal: _.byCode(".onCloseCallback()"),
                    closeAllModals: _.byCode(".getState();for"),
                })),
                ({ openModalLazy: xl, openModal: fe, closeModal: un, closeAllModals: Wr } = Sl);
        });
    var g2 = {};
    Ke(g2, {
        Theme: () => Tl,
        copyWithToast: () => tt,
        fetchUserProfile: () => Es,
        getCurrentChannel: () => Mo,
        getCurrentGuild: () => jr,
        getGuildAcronym: () => ki,
        getIntlMessage: () => Ae,
        getIntlMessageFromHash: () => Fh,
        getTheme: () => Ai,
        getUniqueUsername: () => qr,
        hasGuildFeature: () => Bs,
        insertTextIntoChatInputBox: () => Hn,
        openImageModal: () => Co,
        openInviteModal: () => pn,
        openPrivateChannel: () => f2,
        openUserProfile: () => No,
        sendMessage: () => Ri,
    });
    function Ae(e, t) {
        return Fh(sn(e), t, e);
    }
    function Fh(e, t, o) {
        try {
            return t == null ? zr.intl.string(zr.t[e]) : zr.intl.format(zr.t[e], t);
        } catch (n) {
            return Mw.error(`Failed to get intl message for key: ${o ?? e}`, n), o ?? "";
        }
    }
    async function pn(e) {
        let { invite: t } = await Bh.resolveInvite(e, "Desktop Modal");
        if (!t) throw new Error("Invalid invite: " + e);
        return (
            B.dispatch({ type: "INVITE_MODAL_OPEN", invite: t, code: e, context: "APP" }),
            new Promise((o) => {
                let n,
                    i,
                    s = !1;
                B.subscribe(
                    "INVITE_ACCEPT",
                    (i = () => {
                        s = !0;
                    })
                ),
                    B.subscribe(
                        "INVITE_MODAL_CLOSE",
                        (n = () => {
                            B.unsubscribe("INVITE_MODAL_CLOSE", n), B.unsubscribe("INVITE_ACCEPT", i), o(s);
                        })
                    );
            })
        );
    }
    function Mo() {
        return Z.getChannel(Le.getChannelId());
    }
    function jr() {
        return Ce.getGuild(Mo()?.guild_id);
    }
    function f2(e) {
        yl.openPrivateChannel(e);
    }
    function Ai() {
        try {
            return gl.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme;
        } catch {
            return 1;
        }
    }
    function Hn(e) {
        Io.dispatchToLastSubscribed("INSERT_TEXT", { rawText: e, plainText: e });
    }
    async function tt(e, t = "Copied to clipboard!") {
        await Po(e), J.show({ message: t, id: J.genId(), type: J.Type.SUCCESS });
    }
    function Ri(e, t, o = !0, n = {}) {
        let i = { content: "", invalidEmojis: [], tts: !1, validNonShortcutEmojis: [], ...t };
        return bo.sendMessage(e, i, o, n);
    }
    function Co(e, t) {
        return Uh({ items: [{ type: "IMAGE", original: e.original ?? e.url, ...e }], ...t });
    }
    async function No(e) {
        if (!(await lo.getUser(e))) throw new Error("No such user: " + e);
        let o = io.getGuildId();
        Eh.openUserProfileModal({
            userId: e,
            guildId: o,
            channelId: Le.getChannelId(),
            analyticsLocation: { page: o ? "Guild Channel" : "DM Channel", section: "Profile Popout" },
        });
    }
    async function Es(e, t) {
        let o = Bt.getUserProfile(e);
        if (o) return o;
        B.dispatch({ type: "USER_PROFILE_FETCH_START", userId: e });
        let { body: n } = await Ct.get({
            url: vt.Endpoints.USER_PROFILE(e),
            query: { with_mutual_guilds: !1, with_mutual_friends_count: !1, ...t },
            oldFormErrors: !0,
        });
        return (
            B.dispatch({ type: "USER_UPDATE", user: n.user }),
            await B.dispatch({ type: "USER_PROFILE_FETCH_SUCCESS", userProfile: n }),
            t?.guild_id &&
                n.guild_member &&
                B.dispatch({ type: "GUILD_MEMBER_PROFILE_UPDATE", guildId: t.guild_id, guildMember: n.guild_member }),
            Bt.getUserProfile(e)
        );
    }
    function qr(e) {
        return e.discriminator === "0" ? e.username : e.tag;
    }
    function ki(e) {
        return e.name
            .replaceAll("'s ", " ")
            .replace(/\w+/g, (t) => t[0])
            .replace(/\s/g, "");
    }
    function Bs(e, t) {
        return e.features?.has(t) ?? !1;
    }
    var Mw,
        Tl,
        se = he(() => {
            "use strict";
            a();
            l();
            S();
            Gn();
            vs();
            le();
            Oe();
            Mw = new U("IntlManager");
            Tl = ((o) => ((o[(o.Dark = 1)] = "Dark"), (o[(o.Light = 2)] = "Light"), o))(Tl || {});
        });
    var X0 = hT((Q0) => {
        a();
        l();
        var yx = Object.defineProperty,
            a8 = (e) => yx(e, "__esModule", { value: !0 }),
            l8 = (e, t) => {
                for (var o in t) yx(e, o, { get: t[o], enumerable: !0 });
            };
        a8(Q0);
        l8(Q0, {
            GIFEncoder: () => Ix,
            applyPalette: () => y8,
            default: () => C8,
            nearestColor: () => x8,
            nearestColorIndex: () => Tx,
            nearestColorIndexWithDistance: () => wx,
            prequantize: () => h8,
            quantize: () => f8,
            snapColorsToPalette: () => S8,
        });
        var c8 = {
            signature: "GIF",
            version: "89a",
            trailer: 59,
            extensionIntroducer: 33,
            applicationExtensionLabel: 255,
            graphicControlExtensionLabel: 249,
            imageSeparator: 44,
            signatureSize: 3,
            versionSize: 3,
            globalColorTableFlagMask: 128,
            colorResolutionMask: 112,
            sortFlagMask: 8,
            globalColorTableSizeMask: 7,
            applicationIdentifierSize: 8,
            applicationAuthCodeSize: 3,
            disposalMethodMask: 28,
            userInputFlagMask: 2,
            transparentColorFlagMask: 1,
            localColorTableFlagMask: 128,
            interlaceFlagMask: 64,
            idSortFlagMask: 32,
            localColorTableSizeMask: 7,
        };
        function vx(e = 256) {
            let t = 0,
                o = new Uint8Array(e);
            return {
                get buffer() {
                    return o.buffer;
                },
                reset() {
                    t = 0;
                },
                bytesView() {
                    return o.subarray(0, t);
                },
                bytes() {
                    return o.slice(0, t);
                },
                writeByte(i) {
                    n(t + 1), (o[t] = i), t++;
                },
                writeBytes(i, s = 0, c = i.length) {
                    n(t + c);
                    for (let u = 0; u < c; u++) o[t++] = i[u + s];
                },
                writeBytesView(i, s = 0, c = i.byteLength) {
                    n(t + c), o.set(i.subarray(s, s + c), t), (t += c);
                },
            };
            function n(i) {
                var s = o.length;
                if (s >= i) return;
                var c = 1024 * 1024;
                (i = Math.max(i, (s * (s < c ? 2 : 1.125)) >>> 0)), s != 0 && (i = Math.max(i, 256));
                let u = o;
                (o = new Uint8Array(i)), t > 0 && o.set(u.subarray(0, t), 0);
            }
        }
        var K0 = 12,
            fx = 5003,
            u8 = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
        function p8(e, t, o, n, i = vx(512), s = new Uint8Array(256), c = new Int32Array(fx), u = new Int32Array(fx)) {
            let p = c.length,
                m = Math.max(2, n);
            s.fill(0), u.fill(0), c.fill(-1);
            let h = 0,
                y = 0,
                b = m + 1,
                x = b,
                P = !1,
                I = x,
                D = (1 << I) - 1,
                A = 1 << (b - 1),
                E = A + 1,
                q = A + 2,
                z = 0,
                K = o[0],
                ue = 0;
            for (let Q = p; Q < 65536; Q *= 2) ++ue;
            (ue = 8 - ue), i.writeByte(m), ne(A);
            let j = o.length;
            for (let Q = 1; Q < j; Q++)
                e: {
                    let qe = o[Q],
                        ae = (qe << K0) + K,
                        be = (qe << ue) ^ K;
                    if (c[be] === ae) {
                        K = u[be];
                        break e;
                    }
                    let fo = be === 0 ? 1 : p - be;
                    for (; c[be] >= 0; )
                        if (((be -= fo), be < 0 && (be += p), c[be] === ae)) {
                            K = u[be];
                            break e;
                        }
                    ne(K),
                        (K = qe),
                        q < 1 << K0 ? ((u[be] = q++), (c[be] = ae)) : (c.fill(-1), (q = A + 2), (P = !0), ne(A));
                }
            return ne(K), ne(E), i.writeByte(0), i.bytesView();
            function ne(Q) {
                for (h &= u8[y], y > 0 ? (h |= Q << y) : (h = Q), y += I; y >= 8; )
                    (s[z++] = h & 255),
                        z >= 254 && (i.writeByte(z), i.writeBytesView(s, 0, z), (z = 0)),
                        (h >>= 8),
                        (y -= 8);
                if (
                    ((q > D || P) &&
                        (P ? ((I = x), (D = (1 << I) - 1), (P = !1)) : (++I, (D = I === K0 ? 1 << I : (1 << I) - 1))),
                    Q == E)
                ) {
                    for (; y > 0; )
                        (s[z++] = h & 255),
                            z >= 254 && (i.writeByte(z), i.writeBytesView(s, 0, z), (z = 0)),
                            (h >>= 8),
                            (y -= 8);
                    z > 0 && (i.writeByte(z), i.writeBytesView(s, 0, z), (z = 0));
                }
            }
        }
        var d8 = p8;
        function bx(e, t, o) {
            return ((e << 8) & 63488) | ((t << 2) & 992) | (o >> 3);
        }
        function Sx(e, t, o, n) {
            return (e >> 4) | (t & 240) | ((o & 240) << 4) | ((n & 240) << 8);
        }
        function xx(e, t, o) {
            return ((e >> 4) << 8) | (t & 240) | (o >> 4);
        }
        function fd(e, t, o) {
            return e < t ? t : e > o ? o : e;
        }
        function yc(e) {
            return e * e;
        }
        function gx(e, t, o) {
            var n = 0,
                i = 1e100;
            let s = e[t],
                c = s.cnt,
                u = s.ac,
                p = s.rc,
                m = s.gc,
                h = s.bc;
            for (var y = s.fw; y != 0; y = e[y].fw) {
                let x = e[y],
                    P = x.cnt,
                    I = (c * P) / (c + P);
                if (!(I >= i)) {
                    var b = 0;
                    (o && ((b += I * yc(x.ac - u)), b >= i)) ||
                        ((b += I * yc(x.rc - p)),
                        !(b >= i) &&
                            ((b += I * yc(x.gc - m)),
                            !(b >= i) && ((b += I * yc(x.bc - h)), !(b >= i) && ((i = b), (n = y)))));
                }
            }
            (s.err = i), (s.nn = n);
        }
        function Y0() {
            return { ac: 0, rc: 0, gc: 0, bc: 0, cnt: 0, nn: 0, fw: 0, bk: 0, tm: 0, mtm: 0, err: 0 };
        }
        function m8(e, t) {
            let o = t === "rgb444" ? 4096 : 65536,
                n = new Array(o),
                i = e.length;
            if (t === "rgba4444")
                for (let s = 0; s < i; ++s) {
                    let c = e[s],
                        u = (c >> 24) & 255,
                        p = (c >> 16) & 255,
                        m = (c >> 8) & 255,
                        h = c & 255,
                        y = Sx(h, m, p, u),
                        b = y in n ? n[y] : (n[y] = Y0());
                    (b.rc += h), (b.gc += m), (b.bc += p), (b.ac += u), b.cnt++;
                }
            else if (t === "rgb444")
                for (let s = 0; s < i; ++s) {
                    let c = e[s],
                        u = (c >> 16) & 255,
                        p = (c >> 8) & 255,
                        m = c & 255,
                        h = xx(m, p, u),
                        y = h in n ? n[h] : (n[h] = Y0());
                    (y.rc += m), (y.gc += p), (y.bc += u), y.cnt++;
                }
            else
                for (let s = 0; s < i; ++s) {
                    let c = e[s],
                        u = (c >> 16) & 255,
                        p = (c >> 8) & 255,
                        m = c & 255,
                        h = bx(m, p, u),
                        y = h in n ? n[h] : (n[h] = Y0());
                    (y.rc += m), (y.gc += p), (y.bc += u), y.cnt++;
                }
            return n;
        }
        function f8(e, t, o = {}) {
            let {
                format: n = "rgb565",
                clearAlpha: i = !0,
                clearAlphaColor: s = 0,
                clearAlphaThreshold: c = 0,
                oneBitAlpha: u = !1,
            } = o;
            if (!e || !e.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
            if (!(e instanceof Uint8Array) && !(e instanceof Uint8ClampedArray))
                throw new Error("quantize() expected RGBA Uint8Array data");
            let p = new Uint32Array(e.buffer),
                m = o.useSqrt !== !1,
                h = n === "rgba4444",
                y = m8(p, n),
                b = y.length,
                x = b - 1,
                P = new Uint32Array(b + 1);
            for (var I = 0, A = 0; A < b; ++A) {
                let ot = y[A];
                if (ot != null) {
                    var D = 1 / ot.cnt;
                    h && (ot.ac *= D), (ot.rc *= D), (ot.gc *= D), (ot.bc *= D), (y[I++] = ot);
                }
            }
            yc(t) / I < 0.022 && (m = !1);
            for (var A = 0; A < I - 1; ++A) (y[A].fw = A + 1), (y[A + 1].bk = A), m && (y[A].cnt = Math.sqrt(y[A].cnt));
            m && (y[A].cnt = Math.sqrt(y[A].cnt));
            var E, q, z;
            for (A = 0; A < I; ++A) {
                gx(y, A, !1);
                var K = y[A].err;
                for (q = ++P[0]; q > 1 && ((z = q >> 1), !(y[(E = P[z])].err <= K)); q = z) P[q] = E;
                P[q] = A;
            }
            var ue = I - t;
            for (A = 0; A < ue; ) {
                for (var j; ; ) {
                    var ne = P[1];
                    if (((j = y[ne]), j.tm >= j.mtm && y[j.nn].mtm <= j.tm)) break;
                    j.mtm == x ? (ne = P[1] = P[P[0]--]) : (gx(y, ne, !1), (j.tm = A));
                    var K = y[ne].err;
                    for (
                        q = 1;
                        (z = q + q) <= P[0] &&
                        (z < P[0] && y[P[z]].err > y[P[z + 1]].err && z++, !(K <= y[(E = P[z])].err));
                        q = z
                    )
                        P[q] = E;
                    P[q] = ne;
                }
                var Q = y[j.nn],
                    qe = j.cnt,
                    ae = Q.cnt,
                    D = 1 / (qe + ae);
                h && (j.ac = D * (qe * j.ac + ae * Q.ac)),
                    (j.rc = D * (qe * j.rc + ae * Q.rc)),
                    (j.gc = D * (qe * j.gc + ae * Q.gc)),
                    (j.bc = D * (qe * j.bc + ae * Q.bc)),
                    (j.cnt += Q.cnt),
                    (j.mtm = ++A),
                    (y[Q.bk].fw = Q.fw),
                    (y[Q.fw].bk = Q.bk),
                    (Q.mtm = x);
            }
            let be = [];
            var fo = 0;
            for (A = 0; ; ++fo) {
                let $t = fd(Math.round(y[A].rc), 0, 255),
                    ot = fd(Math.round(y[A].gc), 0, 255),
                    At = fd(Math.round(y[A].bc), 0, 255),
                    Je = 255;
                h &&
                    ((Je = fd(Math.round(y[A].ac), 0, 255)),
                    u && (Je = Je <= (typeof u == "number" ? u : 127) ? 0 : 255),
                    i && Je <= c && (($t = ot = At = s), (Je = 0)));
                let Yt = h ? [$t, ot, At, Je] : [$t, ot, At];
                if ((g8(be, Yt) || be.push(Yt), (A = y[A].fw) == 0)) break;
            }
            return be;
        }
        function g8(e, t) {
            for (let o = 0; o < e.length; o++) {
                let n = e[o],
                    i = n[0] === t[0] && n[1] === t[1] && n[2] === t[2],
                    s = n.length >= 4 && t.length >= 4 ? n[3] === t[3] : !0;
                if (i && s) return !0;
            }
            return !1;
        }
        function hd(e, t) {
            var o = 0,
                n;
            for (n = 0; n < e.length; n++) {
                let i = e[n] - t[n];
                o += i * i;
            }
            return o;
        }
        function gd(e, t) {
            return t > 1 ? Math.round(e / t) * t : e;
        }
        function h8(e, { roundRGB: t = 5, roundAlpha: o = 10, oneBitAlpha: n = null } = {}) {
            let i = new Uint32Array(e.buffer);
            for (let s = 0; s < i.length; s++) {
                let c = i[s],
                    u = (c >> 24) & 255,
                    p = (c >> 16) & 255,
                    m = (c >> 8) & 255,
                    h = c & 255;
                (u = gd(u, o)),
                    n && (u = u <= (typeof n == "number" ? n : 127) ? 0 : 255),
                    (h = gd(h, t)),
                    (m = gd(m, t)),
                    (p = gd(p, t)),
                    (i[s] = (u << 24) | (p << 16) | (m << 8) | (h << 0));
            }
        }
        function y8(e, t, o = "rgb565") {
            if (!e || !e.buffer) throw new Error("quantize() expected RGBA Uint8Array data");
            if (!(e instanceof Uint8Array) && !(e instanceof Uint8ClampedArray))
                throw new Error("quantize() expected RGBA Uint8Array data");
            if (t.length > 256) throw new Error("applyPalette() only works with 256 colors or less");
            let n = new Uint32Array(e.buffer),
                i = n.length,
                s = o === "rgb444" ? 4096 : 65536,
                c = new Uint8Array(i),
                u = new Array(s),
                p = o === "rgba4444";
            if (o === "rgba4444")
                for (let m = 0; m < i; m++) {
                    let h = n[m],
                        y = (h >> 24) & 255,
                        b = (h >> 16) & 255,
                        x = (h >> 8) & 255,
                        P = h & 255,
                        I = Sx(P, x, b, y),
                        D = I in u ? u[I] : (u[I] = v8(P, x, b, y, t));
                    c[m] = D;
                }
            else {
                let m = o === "rgb444" ? xx : bx;
                for (let h = 0; h < i; h++) {
                    let y = n[h],
                        b = (y >> 16) & 255,
                        x = (y >> 8) & 255,
                        P = y & 255,
                        I = m(P, x, b),
                        D = I in u ? u[I] : (u[I] = b8(P, x, b, t));
                    c[h] = D;
                }
            }
            return c;
        }
        function v8(e, t, o, n, i) {
            let s = 0,
                c = 1e100;
            for (let u = 0; u < i.length; u++) {
                let p = i[u],
                    m = p[3],
                    h = es(m - n);
                if (h > c) continue;
                let y = p[0];
                if (((h += es(y - e)), h > c)) continue;
                let b = p[1];
                if (((h += es(b - t)), h > c)) continue;
                let x = p[2];
                (h += es(x - o)), !(h > c) && ((c = h), (s = u));
            }
            return s;
        }
        function b8(e, t, o, n) {
            let i = 0,
                s = 1e100;
            for (let c = 0; c < n.length; c++) {
                let u = n[c],
                    p = u[0],
                    m = es(p - e);
                if (m > s) continue;
                let h = u[1];
                if (((m += es(h - t)), m > s)) continue;
                let y = u[2];
                (m += es(y - o)), !(m > s) && ((s = m), (i = c));
            }
            return i;
        }
        function S8(e, t, o = 5) {
            if (!e.length || !t.length) return;
            let n = e.map((c) => c.slice(0, 3)),
                i = o * o,
                s = e[0].length;
            for (let c = 0; c < t.length; c++) {
                let u = t[c];
                u.length < s ? (u = [u[0], u[1], u[2], 255]) : u.length > s ? (u = u.slice(0, 3)) : (u = u.slice());
                let p = wx(n, u.slice(0, 3), hd),
                    m = p[0],
                    h = p[1];
                h > 0 && h <= i && (e[m] = u);
            }
        }
        function es(e) {
            return e * e;
        }
        function Tx(e, t, o = hd) {
            let n = 1 / 0,
                i = -1;
            for (let s = 0; s < e.length; s++) {
                let c = e[s],
                    u = o(t, c);
                u < n && ((n = u), (i = s));
            }
            return i;
        }
        function wx(e, t, o = hd) {
            let n = 1 / 0,
                i = -1;
            for (let s = 0; s < e.length; s++) {
                let c = e[s],
                    u = o(t, c);
                u < n && ((n = u), (i = s));
            }
            return [i, n];
        }
        function x8(e, t, o = hd) {
            return e[Tx(e, t, o)];
        }
        function Ix(e = {}) {
            let { initialCapacity: t = 4096, auto: o = !0 } = e,
                n = vx(t),
                i = 5003,
                s = new Uint8Array(256),
                c = new Int32Array(i),
                u = new Int32Array(i),
                p = !1;
            return {
                reset() {
                    n.reset(), (p = !1);
                },
                finish() {
                    n.writeByte(c8.trailer);
                },
                bytes() {
                    return n.bytes();
                },
                bytesView() {
                    return n.bytesView();
                },
                get buffer() {
                    return n.buffer;
                },
                get stream() {
                    return n;
                },
                writeHeader: m,
                writeFrame(h, y, b, x = {}) {
                    let {
                            transparent: P = !1,
                            transparentIndex: I = 0,
                            delay: D = 0,
                            palette: A = null,
                            repeat: E = 0,
                            colorDepth: q = 8,
                            dispose: z = -1,
                        } = x,
                        K = !1;
                    if (
                        (o ? p || ((K = !0), m(), (p = !0)) : (K = !!x.first),
                        (y = Math.max(0, Math.floor(y))),
                        (b = Math.max(0, Math.floor(b))),
                        K)
                    ) {
                        if (!A) throw new Error("First frame must include a { palette } option");
                        w8(n, y, b, A, q), hx(n, A), E >= 0 && I8(n, E);
                    }
                    let ue = Math.round(D / 10);
                    T8(n, z, ue, P, I);
                    let j = !!A && !K;
                    P8(n, y, b, j ? A : null), j && hx(n, A), M8(n, h, y, b, q, s, c, u);
                },
            };
            function m() {
                Px(n, "GIF89a");
            }
        }
        function T8(e, t, o, n, i) {
            e.writeByte(33), e.writeByte(249), e.writeByte(4), i < 0 && ((i = 0), (n = !1));
            var s, c;
            n ? ((s = 1), (c = 2)) : ((s = 0), (c = 0)),
                t >= 0 && (c = t & 7),
                (c <<= 2),
                e.writeByte(0 | c | 0 | s),
                ri(e, o),
                e.writeByte(i || 0),
                e.writeByte(0);
        }
        function w8(e, t, o, n, i = 8) {
            let u = Z0(n.length) - 1,
                p = 128 | ((i - 1) << 4) | 0 | u,
                m = 0,
                h = 0;
            ri(e, t), ri(e, o), e.writeBytes([p, m, h]);
        }
        function I8(e, t) {
            e.writeByte(33),
                e.writeByte(255),
                e.writeByte(11),
                Px(e, "NETSCAPE2.0"),
                e.writeByte(3),
                e.writeByte(1),
                ri(e, t),
                e.writeByte(0);
        }
        function hx(e, t) {
            let o = 1 << Z0(t.length);
            for (let n = 0; n < o; n++) {
                let i = [0, 0, 0];
                n < t.length && (i = t[n]), e.writeByte(i[0]), e.writeByte(i[1]), e.writeByte(i[2]);
            }
        }
        function P8(e, t, o, n) {
            if ((e.writeByte(44), ri(e, 0), ri(e, 0), ri(e, t), ri(e, o), n)) {
                let c = Z0(n.length) - 1;
                e.writeByte(128 | c);
            } else e.writeByte(0);
        }
        function M8(e, t, o, n, i = 8, s, c, u) {
            d8(o, n, t, i, e, s, c, u);
        }
        function ri(e, t) {
            e.writeByte(t & 255), e.writeByte((t >> 8) & 255);
        }
        function Px(e, t) {
            for (var o = 0; o < t.length; o++) e.writeByte(t.charCodeAt(o));
        }
        function Z0(e) {
            return Math.max(Math.ceil(Math.log2(e)), 1);
        }
        var C8 = Ix;
    });
    var zR = {};
    Ke(zR, {
        Api: () => wv,
        Components: () => Iv,
        PlainSettings: () => vr,
        Plugins: () => Wl,
        Settings: () => W,
        Updater: () => Kh,
        Util: () => Pv,
        Webpack: () => Mv,
        WebpackPatcher: () => C1,
    });
    a();
    l();
    a();
    l();
    a();
    l();
    var Av =
        '<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Vencord QuickCSS Editor</title><style>#container,body,html{position:absolute;left:0;top:0;width:100%;height:100%;margin:0;padding:0;overflow:hidden}</style></head><body><div id="container"></div><script>const script=document.createElement("script");script.src=new URL("/vendor/monaco/index.js",baseUrl);const style=document.createElement("link");style.type="text/css",style.rel="stylesheet",style.href=new URL("/vendor/monaco/index.css",baseUrl),document.body.append(style,script)</script></body></html>';
    var _o = {};
    Ke(_o, {
        clear: () => ST,
        createStore: () => Jc,
        del: () => Da,
        delMany: () => Mg,
        entries: () => Ng,
        get: () => wt,
        getMany: () => Pg,
        keys: () => xT,
        promisifyRequest: () => go,
        set: () => It,
        setMany: () => bT,
        update: () => jo,
        values: () => TT,
    });
    a();
    l();
    function go(e) {
        return new Promise((t, o) => {
            (e.oncomplete = e.onsuccess = () => t(e.result)), (e.onabort = e.onerror = () => o(e.error));
        });
    }
    function Jc(e, t) {
        let o = indexedDB.open(e);
        o.onupgradeneeded = () => o.result.createObjectStore(t);
        let n = go(o);
        return (i, s) => n.then((c) => s(c.transaction(t, i).objectStore(t)));
    }
    var Ig;
    function nr() {
        return Ig || (Ig = Jc("VencordData", "VencordStore")), Ig;
    }
    function wt(e, t = nr()) {
        return t("readonly", (o) => go(o.get(e)));
    }
    function It(e, t, o = nr()) {
        return o("readwrite", (n) => (n.put(t, e), go(n.transaction)));
    }
    function bT(e, t = nr()) {
        return t("readwrite", (o) => (e.forEach((n) => o.put(n[1], n[0])), go(o.transaction)));
    }
    function Pg(e, t = nr()) {
        return t("readonly", (o) => Promise.all(e.map((n) => go(o.get(n)))));
    }
    function jo(e, t, o = nr()) {
        return o(
            "readwrite",
            (n) =>
                new Promise((i, s) => {
                    n.get(e).onsuccess = function () {
                        try {
                            n.put(t(this.result), e), i(go(n.transaction));
                        } catch (c) {
                            s(c);
                        }
                    };
                })
        );
    }
    function Da(e, t = nr()) {
        return t("readwrite", (o) => (o.delete(e), go(o.transaction)));
    }
    function Mg(e, t = nr()) {
        return t("readwrite", (o) => (e.forEach((n) => o.delete(n)), go(o.transaction)));
    }
    function ST(e = nr()) {
        return e("readwrite", (t) => (t.clear(), go(t.transaction)));
    }
    function Cg(e, t) {
        return (
            (e.openCursor().onsuccess = function () {
                this.result && (t(this.result), this.result.continue());
            }),
            go(e.transaction)
        );
    }
    function xT(e = nr()) {
        return e("readonly", (t) => {
            if (t.getAllKeys) return go(t.getAllKeys());
            let o = [];
            return Cg(t, (n) => o.push(n.key)).then(() => o);
        });
    }
    function TT(e = nr()) {
        return e("readonly", (t) => {
            if (t.getAll) return go(t.getAll());
            let o = [];
            return Cg(t, (n) => o.push(n.value)).then(() => o);
        });
    }
    function Ng(e = nr()) {
        return e("readonly", (t) => {
            if (t.getAll && t.getAllKeys)
                return Promise.all([go(t.getAllKeys()), go(t.getAll())]).then(([n, i]) => n.map((s, c) => [s, i[c]]));
            let o = [];
            return e("readonly", (n) => Cg(n, (i) => o.push([i.key, i.value])).then(() => o));
        });
    }
    a();
    l();
    var wT = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,
        IT = /^\\@/;
    function Ag(e, t = {}) {
        return {
            fileName: e,
            name: t.name ?? e.replace(/\.css$/i, ""),
            author: t.author ?? "Unknown Author",
            description: t.description ?? "A Discord Theme.",
            version: t.version,
            license: t.license,
            source: t.source,
            website: t.website,
            invite: t.invite,
        };
    }
    function Rv(e, t) {
        if (!e) return Ag(t);
        let o = e.split("/**", 2)?.[1]?.split("*/", 1)?.[0];
        if (!o) return Ag(t);
        let n = {},
            i = "",
            s = "";
        for (let c of o.split(wT))
            if (c.length !== 0)
                if (c.charAt(0) === "@" && c.charAt(1) !== " ") {
                    n[i] = s.trim();
                    let u = c.indexOf(" ");
                    (i = c.substring(1, u)), (s = c.substring(u + 1));
                } else
                    s +=
                        " " +
                        c
                            .replace(
                                "\\n",
                                `
`
                            )
                            .replace(IT, "@");
        return (n[i] = s.trim()), delete n[""], Ag(t, n);
    }
    a();
    l();
    function kt(e, t = 300) {
        let o;
        return function (...n) {
            clearTimeout(o),
                (o = setTimeout(() => {
                    e(...n);
                }, t));
        };
    }
    a();
    l();
    var { localStorage: Zt } = unsafeWindow;
    a();
    l();
    function Vc(e) {
        let t = document.createElement("a");
        (t.href = URL.createObjectURL(e)),
            (t.download = e.name),
            document.body.appendChild(t),
            t.click(),
            setImmediate(() => {
                URL.revokeObjectURL(t.href), document.body.removeChild(t);
            });
    }
    function eu(e) {
        return new Promise((t) => {
            let o = document.createElement("input");
            (o.type = "file"),
                (o.style.display = "none"),
                (o.accept = e),
                (o.onchange = async () => {
                    t(o.files?.[0] ?? null);
                }),
                document.body.appendChild(o),
                o.click(),
                setImmediate(() => document.body.removeChild(o));
        });
    }
    function tu() {
        return navigator.userAgentData?.brands?.some((t) => t.brand === "Chromium")
            ? "https://chromewebstore.google.com/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne"
            : "https://addons.mozilla.org/firefox/addon/styl-us/";
    }
    a();
    l();
    var kv,
        Dv,
        PT,
        Lv = new Promise((e) => (PT = e));
    var h2 = new Set(),
        y2 = () => {},
        Cw = async () => {},
        Nw = kt((e) => VencordNative.quickCss.set(e)),
        Mu = Jc("VencordThemes", "VencordThemeData");
    unsafeWindow.VencordNative = {
        themes: {
            uploadTheme: (e, t) => It(e, t, Mu),
            deleteTheme: (e) => Da(e, Mu),
            getThemesList: () => Ng(Mu).then((e) => e.map(([t, o]) => Rv(o, t.toString()))),
            getThemeData: (e) => wt(e, Mu),
            getSystemValues: async () => ({}),
            openFolder: async () => Promise.reject("themes:openFolder is not supported on web"),
        },
        native: {
            getVersions: () => ({}),
            openExternal: async (e) => void open(e, "_blank"),
            getRendererCss: async () => Promise.resolve().then(() => unsafeWindow._vcUserScriptRendererCss),
            onRendererCssUpdate: y2,
        },
        updater: {
            getRepo: async () => ({ ok: !0, value: "https://github.com/Vendicated/Vencord" }),
            getUpdates: async () => ({ ok: !0, value: [] }),
            update: async () => ({ ok: !0, value: !1 }),
            rebuild: async () => ({ ok: !0, value: !0 }),
        },
        quickCss: {
            get: () => wt("VencordQuickCss").then((e) => e ?? ""),
            set: async (e) => {
                await It("VencordQuickCss", e), h2.forEach((t) => t(e));
            },
            addChangeListener(e) {
                h2.add(e);
            },
            addThemeChangeListener: y2,
            openFile: Cw,
            async openEditor() {
                confirm(`QuickCSS is not supported on the Userscript. You can instead use the Stylus extension.

Do you want to open the Stylus web store page?`) && unsafeWindow.open(tu(), "_blank");
            },
            getEditorTheme: () => {
                let { getTheme: e, Theme: t } = (se(), ka(g2));
                return e() === t.Light ? "vs-light" : "vs-dark";
            },
        },
        settings: {
            get: () => {
                try {
                    return JSON.parse(Zt.getItem("VencordSettings") || "{}");
                } catch (e) {
                    return console.error("Failed to parse settings from localStorage: ", e), {};
                }
            },
            set: async (e) => Zt.setItem("VencordSettings", JSON.stringify(e)),
            openFolder: async () => Promise.reject("settings:openFolder is not supported on web"),
        },
        pluginHelpers: {},
        csp: {},
    };
    a();
    l();
    a();
    l();
    a();
    l();
    var Wh = {};
    Ke(Wh, { BadgePosition: () => Cu, _getBadges: () => zh, addProfileBadge: () => wl, removeProfileBadge: () => Il });
    a();
    l();
    a();
    l();
    yi();
    le();
    a();
    l();
    a();
    l();
    Pe();
    var Aw = Y("vc-margin-"),
        Rw = ["top", "bottom", "left", "right"],
        kw = [8, 16, 20],
        O = {};
    function $h() {
        let e = "";
        for (let t of Rw)
            for (let o of kw) {
                let n = Aw(`${t}-${o}`);
                (O[`${t}${o}`] = n), (e += `.${n}{margin-${t}:${o}px;}`);
            }
        return e;
    }
    a();
    l();
    re();
    function eo(e) {
        return r("div", { ...e, className: L(e.className, "vc-error-card") }, e.children);
    }
    var Dw = "#e78284",
        Lw = new U("React ErrorBoundary", Dw),
        v2 = {},
        Gh = lt(
            () =>
                class extends Vencord.Webpack.Common.React.PureComponent {
                    state = { error: v2, stack: "", message: "" };
                    static getDerivedStateFromError(t) {
                        let o = t?.stack ?? "",
                            n = t?.message || String(t);
                        if (t instanceof Error && o) {
                            let i = o.indexOf(`
`);
                            i !== -1 &&
                                ((n = o.slice(0, i)), (o = o.slice(i + 1).replace(/https:\/\/\S+\/assets\//g, "")));
                        }
                        return { error: t, stack: o, message: n };
                    }
                    componentDidCatch(t, o) {
                        this.props.onError?.({ error: t, errorInfo: o, props: this.props.wrappedProps }),
                            Lw.error(
                                `${this.props.message || "A component threw an Error"}
`,
                                t,
                                o.componentStack
                            );
                    }
                    get isNoop() {
                        return this.props.noop;
                    }
                    render() {
                        if (this.state.error === v2) return this.props.children;
                        if (this.isNoop) return null;
                        if (this.props.fallback)
                            return r(
                                this.props.fallback,
                                { wrappedProps: this.props.wrappedProps, ...this.state },
                                this.props.children
                            );
                        let t =
                            this.props.message ||
                            "An error occurred while rendering this Component. More info can be found below and in your console.";
                        return r(
                            eo,
                            { style: { overflow: "hidden" } },
                            r("h1", null, "Oh no!"),
                            r("p", null, t),
                            r(
                                "code",
                                null,
                                this.state.message,
                                !!this.state.stack && r("pre", { className: O.top8 }, this.state.stack)
                            )
                        );
                    }
                }
        );
    Gh.wrap = (e, t) => {
        let o = (n) => r(Gh, { ...t, wrappedProps: n }, r(e, { ...n }));
        return t?.displayName && (o.displayName = t.displayName), o;
    };
    var C = Gh;
    var Cu = ((o) => ((o[(o.START = 0)] = "START"), (o[(o.END = 1)] = "END"), o))(Cu || {}),
        Hh = new Set();
    function wl(e) {
        (e.component &&= C.wrap(e.component, { noop: !0 })), Hh.add(e);
    }
    function Il(e) {
        return Hh.delete(e);
    }
    function zh(e) {
        let t = [];
        for (let n of Hh) {
            if (n.shouldShow && !n.shouldShow(e)) continue;
            let i = n.getBadges
                ? n
                      .getBadges(e)
                      .map((s) => ({ ...e, ...s, component: s.component && C.wrap(s.component, { noop: !0 }) }))
                : [{ ...e, ...n }];
            n.position === 0 ? t.unshift(...i) : t.push(...i);
        }
        let o = zn.getDonorBadges(e.userId);
        return o && t.unshift(...o.map((n) => ({ ...e, ...n }))), t;
    }
    a();
    l();
    function oe({
        flexDirection: e,
        gap: t = "1em",
        justifyContent: o,
        alignItems: n,
        flexWrap: i,
        children: s,
        style: c,
        ...u
    }) {
        return (
            (c = { display: "flex", flexDirection: e, gap: t, justifyContent: o, alignItems: n, flexWrap: i, ...c }),
            r("div", { style: c, ...u }, s)
        );
    }
    a();
    l();
    re();
    function Pl(e) {
        return r(
            "svg",
            {
                "aria-hidden": "true",
                viewBox: "0 0 16 16",
                height: "16",
                width: "16",
                ...e,
                className: L("vc-heart-icon", e.className),
            },
            r("path", {
                fill: "#db61a2",
                fillRule: "evenodd",
                d: "M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z",
            })
        );
    }
    a();
    l();
    S();
    function Ml({ look: e = F.Looks.LINK, color: t = F.Colors.TRANSPARENT, ...o }) {
        return r(
            F,
            {
                ...o,
                look: e,
                color: t,
                onClick: () => VencordNative.native.openExternal("https://github.com/sponsors/Vendicated"),
                className: "vc-donate-button",
            },
            r(Pl, null),
            "Donate"
        );
    }
    a();
    l();
    a();
    l();
    a();
    l();
    var Kh = {};
    Ke(Kh, {
        UpdateLogger: () => Cl,
        changes: () => Au,
        checkForUpdates: () => Us,
        getRepo: () => b2,
        isNewer: () => jh,
        isOutdated: () => Nu,
        maybePromptToUpdate: () => Al,
        update: () => Nl,
        updateError: () => qh,
    });
    a();
    l();
    a();
    l();
    var Wn = "fa96ff3";
    le();
    a();
    l();
    function hr() {
        location.reload();
    }
    var Cl = new U("Updater", "white"),
        Nu = !1,
        jh = !1,
        qh,
        Au;
    async function Ru(e) {
        let t = await e;
        if (t.ok) return t.value;
        throw ((qh = t.error), t.error);
    }
    async function Us() {
        return (Au = await Ru(VencordNative.updater.getUpdates())), (Nu = Au.length > 0);
    }
    async function Nl() {
        if (!Nu) return !0;
        let e = await Ru(VencordNative.updater.update());
        if (e && ((Nu = !1), !(await Ru(VencordNative.updater.rebuild()))))
            throw new Error("The Build failed. Please try manually building the new update");
        return e;
    }
    var b2 = () => Ru(VencordNative.updater.getRepo());
    async function Al(e, t = !1) {}
    function S2() {
        Al(
            "Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?"
        );
    }
    Oe();
    a();
    l();
    function dn(e) {
        let t = !1,
            o;
        return function () {
            return t ? o : ((t = !0), (o = e.apply(this, arguments)));
        };
    }
    function $o({ children: e }) {
        return r("section", { className: "vc-settings-tab" }, e);
    }
    var Yh = dn(S2);
    function Vo(e, t) {
        return C.wrap(e, {
            displayName: `${t}SettingsTab`,
            message: `Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,
            onError: Yh,
        });
    }
    function Fs(e) {
        try {
            fe(
                Vo(
                    (t) =>
                        r(
                            ve,
                            { ...t, size: "medium" },
                            r(
                                Ie,
                                { className: "vc-settings-modal" },
                                r(et, { onClick: t.onClose, className: "vc-settings-modal-close" }),
                                r(e, null)
                            )
                        ),
                    e.displayName || "Settings Tab"
                )
            );
        } catch {
            Yh();
        }
    }
    a();
    l();
    a();
    l();
    G();
    S();
    var x2 = ee("markup", "codeContainer");
    function Rl(e) {
        return r("div", { className: x2.markup }, Ne.defaultRules.codeBlock.react(e, null, {}));
    }
    function Ow({ children: e }) {
        return r("span", { className: x2.markup }, r("code", { className: "inline" }, e));
    }
    Qt();
    Ur();
    se();
    dr();
    G();
    S();
    a();
    l();
    S();
    a();
    l();
    pr();
    dr();
    S();
    a();
    l();
    Nn();
    S();
    var l_ = kt(function ({ find: e, setModule: t, setError: o }) {
        let n = Ts(e),
            i = Object.keys(n),
            s = i.length;
        s === 0
            ? o("No match. Perhaps that module is lazy loaded?")
            : s !== 1
              ? o("Multiple matches. Please refine your filter")
              : t([i[0], n[i[0]]]);
    });
    var T2 = null;
    a();
    l();
    var Wl = {};
    Ke(Wl, {
        PMLogger: () => dI,
        addPatch: () => U2,
        initPluginManager: () => k1,
        isPluginEnabled: () => ke,
        pluginRequiresRestart: () => $u,
        plugins: () => $e,
        startAllPlugins: () => Hl,
        startDependenciesRecursive: () => Gu,
        startPlugin: () => zl,
        stopPlugin: () => R1,
        subscribeAllPluginsFluxEvents: () => mI,
        subscribePluginFluxEvents: () => A1,
        unsubscribePluginFluxEvents: () => F2,
    });
    a();
    l();
    var r1 = {};
    Ke(r1, {
        ChatBarButton: () => Sr,
        ChatBarButtonMap: () => Di,
        _injectButtons: () => Hw,
        addChatBarButton: () => Lu,
        removeChatBarButton: () => o1,
    });
    a();
    l();
    le();
    re();
    G();
    S();
    var Xh = {};
    Ke(Xh, {
        _usePatchContextMenu: () => Bw,
        addContextMenuPatch: () => Dl,
        addGlobalContextMenuPatch: () => _w,
        findGroupChildrenByChildId: () => _e,
        globalPatches: () => ku,
        navPatches: () => kl,
        removeContextMenuPatch: () => Qh,
        removeGlobalContextMenuPatch: () => Ew,
    });
    a();
    l();
    le();
    S();
    var w2 = new U("ContextMenu"),
        kl = new Map(),
        ku = new Set();
    function Dl(e, t) {
        Array.isArray(e) || (e = [e]);
        for (let o of e) {
            let n = kl.get(o);
            n || ((n = new Set()), kl.set(o, n)), n.add(t);
        }
    }
    function _w(e) {
        ku.add(e);
    }
    function Qh(e, t) {
        let n = (Array.isArray(e) ? e : [e]).map((i) => kl.get(i)?.delete(t) ?? !1);
        return Array.isArray(e) ? n : n[0];
    }
    function Ew(e) {
        return ku.delete(e);
    }
    function _e(e, t, o = !1) {
        for (let n of t) {
            if (n == null) continue;
            if (Array.isArray(n)) {
                let s = _e(e, n, o);
                if (s !== null) return s;
            }
            if (
                (Array.isArray(e) && e.some((s) => (o ? n.props?.id?.includes(s) : n.props?.id === s))) ||
                (o ? n.props?.id?.includes(e) : n.props?.id === e)
            )
                return t;
            let i = n.props?.children;
            if (i) {
                Array.isArray(i) || ((i = [i]), (n.props.children = i));
                let s = _e(e, i, o);
                if (s !== null) return s;
            }
        }
        return null;
    }
    function Bw(e) {
        (e = { ...e, children: Zh(e.children) }), (e.contextMenuAPIArguments ??= []);
        let t = kl.get(e.navId);
        if ((Array.isArray(e.children) || (e.children = [e.children]), t))
            for (let o of t)
                try {
                    o(e.children, ...e.contextMenuAPIArguments);
                } catch (n) {
                    w2.error(`Patch for ${e.navId} errored,`, n);
                }
        for (let o of ku)
            try {
                o(e.navId, e.children, ...e.contextMenuAPIArguments);
            } catch (n) {
                w2.error("Global patch errored,", n);
            }
        return e;
    }
    function Zh(e) {
        return Array.isArray(e)
            ? e.map(Zh)
            : (xe.isValidElement(e) &&
                  ((e = xe.cloneElement(e)),
                  e?.props?.children &&
                      (e.type !== M.MenuControlItem || (e.type === M.MenuControlItem && e.props.control != null)) &&
                      (e.props.children = Zh(e.props.children))),
              e);
    }
    var t1 = {};
    Ke(t1, {
        PlainSettings: () => vr,
        Settings: () => W,
        SettingsStore: () => dt,
        definePluginSettings: () => w,
        migratePluginSetting: () => e1,
        migratePluginSettings: () => br,
        useSettings: () => Ee,
    });
    a();
    l();
    a();
    l();
    var Jh = Symbol("SettingsStore.isProxy"),
        I2 = Symbol("SettingsStore.getRawTarget"),
        Du = class {
            pathListeners = new Map();
            prefixListeners = new Map();
            globalListeners = new Set();
            proxyContexts = new WeakMap();
            proxyHandler = (() => {
                let t = this;
                return {
                    get(o, n, i) {
                        if (n === Jh) return !0;
                        if (n === I2) return o;
                        let s = Reflect.get(o, n, i),
                            c = t.proxyContexts.get(o);
                        if (c == null) return s;
                        let { root: u, path: p } = c;
                        if (
                            (!(n in o) &&
                                t.getDefaultValue != null &&
                                (s = t.getDefaultValue({ target: o, key: n, root: u, path: p })),
                            typeof s == "object" && s !== null && !s[Jh])
                        ) {
                            let m = `${p}${p && "."}${n}`;
                            return t.makeProxy(s, u, m);
                        }
                        return s;
                    },
                    set(o, n, i) {
                        if ((i?.[Jh] && (i = i[I2]), o[n] === i)) return !0;
                        if (!Reflect.set(o, n, i)) return !1;
                        let s = t.proxyContexts.get(o);
                        if (s == null) return !0;
                        let { root: c, path: u } = s,
                            p = `${u}${u && "."}${n}`;
                        return t.notifyListeners(p, i, c), !0;
                    },
                    deleteProperty(o, n) {
                        if (!Reflect.deleteProperty(o, n)) return !1;
                        let i = t.proxyContexts.get(o);
                        if (i == null) return !0;
                        let { root: s, path: c } = i,
                            u = `${c}${c && "."}${n}`;
                        return t.notifyListeners(u, void 0, s), !0;
                    },
                };
            })();
            constructor(t, o = {}) {
                (this.plain = t), (this.store = this.makeProxy(t)), Object.assign(this, o);
            }
            makeProxy(t, o = t, n = "") {
                return this.proxyContexts.set(t, { root: o, path: n }), new Proxy(t, this.proxyHandler);
            }
            notifyPrefixListeners(t, o, n) {
                for (let i = 1; i <= o.length; i++) {
                    let s = o.slice(0, i).join(".");
                    this.prefixListeners.get(s)?.forEach((c) => c(n, t));
                }
            }
            notifyListeners(t, o, n) {
                let i = t.split(".");
                if (i.length > 3 && i[0] === "plugins") {
                    let s = i.slice(0, 3),
                        c = s.join("."),
                        u = s.reduce((p, m) => p[m], n);
                    this.globalListeners.forEach((p) => p(n, c)), this.pathListeners.get(c)?.forEach((p) => p(u));
                } else this.globalListeners.forEach((s) => s(n, t));
                this.pathListeners.get(t)?.forEach((s) => s(o)), this.notifyPrefixListeners(t, i, o);
            }
            setData(t, o) {
                if (this.readOnly) throw new Error("SettingsStore is read-only");
                if (((this.plain = t), (this.store = this.makeProxy(t)), o)) {
                    let n = t,
                        i = o.split(".");
                    for (let s of i) {
                        if (!n) {
                            console.warn(
                                `Settings#setData: Path ${o} does not exist in new data. Not dispatching update`
                            );
                            return;
                        }
                        n = n[s];
                    }
                    this.pathListeners.get(o)?.forEach((s) => s(n)), this.notifyPrefixListeners(o, i, n);
                }
                this.markAsChanged();
            }
            addGlobalChangeListener(t) {
                this.globalListeners.add(t);
            }
            addChangeListener(t, o) {
                let n = this.pathListeners.get(t) ?? new Set();
                n.add(o), this.pathListeners.set(t, n);
            }
            addPrefixChangeListener(t, o) {
                let n = this.prefixListeners.get(t) ?? new Set();
                n.add(o), this.prefixListeners.set(t, n);
            }
            removeGlobalChangeListener(t) {
                this.globalListeners.delete(t);
            }
            removeChangeListener(t, o) {
                let n = this.pathListeners.get(t);
                n && (n.delete(o), n.size || this.pathListeners.delete(t));
            }
            removePrefixChangeListener(t, o) {
                let n = this.prefixListeners.get(t);
                n && (n.delete(o), n.size || this.prefixListeners.delete(t));
            }
            markAsChanged() {
                this.globalListeners.forEach((t) => t(this.plain, ""));
            }
        };
    le();
    a();
    l();
    function $s(e, t) {
        for (let o in t) {
            let n = t[o];
            typeof n == "object" && !Array.isArray(n) ? ((e[o] ??= {}), $s(e[o], n)) : (e[o] ??= n);
        }
        return e;
    }
    a();
    l();
    function v(e) {
        return e;
    }
    function yr(e, t, o = 1) {
        let n = [];
        for (let i = e; i <= t; i += o) n.push(Math.round(i * 100) / 100);
        return n;
    }
    S();
    var Uw = new U("Settings"),
        Fw = {
            autoUpdate: !0,
            autoUpdateNotification: !0,
            useQuickCss: !0,
            themeLinks: [],
            eagerPatches: !1,
            enabledThemes: [],
            enableReactDevtools: !1,
            frameless: !1,
            transparent: !1,
            winCtrlQ: !1,
            macosVibrancyStyle: void 0,
            disableMinSize: !1,
            winNativeTitleBar: !1,
            plugins: {},
            uiElements: { chatBarButtons: {}, messagePopoverButtons: {} },
            notifications: { timeout: 5e3, position: "bottom-right", useNative: "not-focused", logLimit: 50 },
            cloud: { authenticated: !1, url: "https://api.vencord.dev/", settingsSync: !1, settingsSyncVersion: 0 },
        },
        Vh = VencordNative.settings.get();
    $s(Vh, Fw);
    var dt = new Du(Vh, {
        readOnly: !0,
        getDefaultValue({ target: e, key: t, path: o }) {
            let n = e[t];
            if (!$e) return n;
            if (o === "plugins" && t in $e) return (e[t] = { enabled: $e[t].required || $e[t].enabledByDefault || !1 });
            if (o.startsWith("plugins.")) {
                let i = o.slice(8);
                if (i in $e) {
                    let s = $e[i].options?.[t];
                    if (!s) return n;
                    if ("default" in s) return (e[t] = s.default);
                    if (s.type === 4) {
                        let c = s.options.find((u) => u.default);
                        return c && (e[t] = c.value), c?.value;
                    }
                }
            }
            return n;
        },
    });
    dt.addGlobalChangeListener((e, t) => {
        (dt.plain.cloud.settingsSyncVersion = Date.now()), VencordNative.settings.set(dt.plain, t);
    });
    var vr = Vh,
        W = dt.store;
    function Ee(e) {
        let [, t] = xe.useReducer(() => ({}), {});
        return (
            te(
                () =>
                    e
                        ? (e.forEach((o) => {
                              o.endsWith(".*")
                                  ? dt.addPrefixChangeListener(o.slice(0, -2), t)
                                  : dt.addChangeListener(o, t);
                          }),
                          () =>
                              e.forEach((o) => {
                                  o.endsWith(".*")
                                      ? dt.removePrefixChangeListener(o.slice(0, -2), t)
                                      : dt.removeChangeListener(o, t);
                              }))
                        : (dt.addGlobalChangeListener(t), () => dt.removeGlobalChangeListener(t)),
                [e]
            ),
            dt.store
        );
    }
    function br(e, ...t) {
        let { plugins: o } = dt.plain;
        if (!(e in o)) {
            for (let n of t)
                if (n in o) {
                    Uw.info(`Migrating settings from old name ${n} to ${e}`),
                        (o[e] = o[n]),
                        delete o[n],
                        dt.markAsChanged();
                    break;
                }
        }
    }
    function e1(e, t, o) {
        let n = dt.plain.plugins[e];
        n && (!Object.hasOwn(n, t) || Object.hasOwn(n, o) || ((n[o] = n[t]), delete n[t], dt.markAsChanged()));
    }
    function w(e, t) {
        let o = {
            get store() {
                if (!o.pluginName) throw new Error("Cannot access settings before plugin is initialized");
                return W.plugins[o.pluginName];
            },
            get plain() {
                if (!o.pluginName) throw new Error("Cannot access settings before plugin is initialized");
                return vr.plugins[o.pluginName];
            },
            use: (n) =>
                Ee(n ? n.map((i) => `plugins.${o.pluginName}.${i}`) : [`plugins.${o.pluginName}.*`]).plugins[
                    o.pluginName
                ],
            def: e,
            checks: t ?? {},
            pluginName: "",
            withPrivateSettings() {
                return this;
            },
        };
        return o;
    }
    var P2 = ee("button", "buttonWrapper", "notificationDot"),
        M2 = ee("buttonContainer", "channelTextArea", "button"),
        Di = new Map(),
        $w = new U("ChatButtons");
    function Gw(e) {
        let { chatBarButtons: t } = Ee(["uiElements.chatBarButtons.*"]).uiElements,
            { analyticsName: o } = e.type;
        return r(
            f,
            null,
            Array.from(Di)
                .filter(([n]) => t[n]?.enabled !== !1)
                .map(([n, { render: i }]) =>
                    r(
                        C,
                        { noop: !0, key: n, onError: (s) => $w.error(`Failed to render ${n}`, s.error) },
                        r(i, { ...e, isMainChat: o === "normal", isAnyChat: ["normal", "sidebar"].includes(o) })
                    )
                )
        );
    }
    function Hw(e, t) {
        t.disabled || e.length === 0 || e.unshift(r(Gw, { key: "vencord-chat-buttons", ...t }));
    }
    var Lu = (e, t, o) => Di.set(e, { render: t, icon: o }),
        o1 = (e) => Di.delete(e),
        Sr = C.wrap(
            (e) =>
                r(V, { text: e.tooltip }, ({ onMouseEnter: t, onMouseLeave: o }) =>
                    r(
                        "div",
                        {
                            className: `expression-picker-chat-input-button ${M2?.buttonContainer ?? ""} vc-chatbar-button`,
                        },
                        r(
                            yo,
                            {
                                "aria-label": e.tooltip,
                                onMouseEnter: t,
                                onMouseLeave: o,
                                className: L(P2.button, M2?.button),
                                onClick: e.onClick,
                                onContextMenu: e.onContextMenu,
                                onAuxClick: e.onAuxClick,
                                ...e.buttonProps,
                            },
                            r("div", { className: P2.buttonWrapper }, e.children)
                        )
                    )
                ),
            { noop: !0 }
        );
    Dl("textarea-context", (e, t) => {
        let { chatBarButtons: o } = Ee(["uiElements.chatBarButtons.*"]).uiElements,
            n = Array.from(Di.entries());
        if (!n.length) return;
        let i = _e("submit-button", e);
        if (!i) return;
        let s = i.findIndex((c) => c?.props?.id === "submit-button");
        s !== -1 &&
            i.splice(
                s,
                0,
                r(
                    M.MenuItem,
                    { id: "vc-chat-buttons", key: "vencord-chat-buttons", label: "Vencord Buttons" },
                    n.map(([c]) =>
                        r(M.MenuCheckboxItem, {
                            label: c,
                            key: c,
                            id: `vc-chat-button-${c}`,
                            checked: o[c]?.enabled !== !1,
                            action: () => {
                                let u = o[c]?.enabled !== !1;
                                (o[c] ??= {}), (o[c].enabled = !u);
                            },
                        })
                    )
                )
            );
    });
    var a1 = {};
    Ke(a1, {
        ApplicationCommandInputType: () => mn,
        ApplicationCommandOptionType: () => Li,
        ApplicationCommandType: () => Ou,
        BUILT_IN: () => Kr,
        OptionalMessageOption: () => Ol,
        RequiredMessageOption: () => i1,
        _handleCommand: () => jw,
        _init: () => Ww,
        commands: () => n1,
        findOption: () => Ao,
        generateId: () => Ll,
        prepareOption: () => s1,
        registerCommand: () => Gs,
        sendBotMessage: () => rt,
        unregisterCommand: () => _l,
    });
    a();
    l();
    le();
    dr();
    a();
    l();
    G();
    S();
    var zw = de('username:"Clyde"');
    function Ll() {
        return `-${vo.fromTimestamp(Date.now())}`;
    }
    function rt(e, t) {
        let o = zw({ channelId: e, content: "", embeds: [] });
        return bo.receiveMessage(e, $s(t, o)), t;
    }
    function Ao(e, t, o) {
        return e.find((n) => n.name === t)?.value ?? o;
    }
    a();
    l();
    a();
    l();
    a();
    l();
    a();
    l();
    a();
    l();
    var Li = ((y) => (
            (y[(y.SUB_COMMAND = 1)] = "SUB_COMMAND"),
            (y[(y.SUB_COMMAND_GROUP = 2)] = "SUB_COMMAND_GROUP"),
            (y[(y.STRING = 3)] = "STRING"),
            (y[(y.INTEGER = 4)] = "INTEGER"),
            (y[(y.BOOLEAN = 5)] = "BOOLEAN"),
            (y[(y.USER = 6)] = "USER"),
            (y[(y.CHANNEL = 7)] = "CHANNEL"),
            (y[(y.ROLE = 8)] = "ROLE"),
            (y[(y.MENTIONABLE = 9)] = "MENTIONABLE"),
            (y[(y.NUMBER = 10)] = "NUMBER"),
            (y[(y.ATTACHMENT = 11)] = "ATTACHMENT"),
            y
        ))(Li || {}),
        mn = ((s) => (
            (s[(s.BUILT_IN = 0)] = "BUILT_IN"),
            (s[(s.BUILT_IN_TEXT = 1)] = "BUILT_IN_TEXT"),
            (s[(s.BUILT_IN_INTEGRATION = 2)] = "BUILT_IN_INTEGRATION"),
            (s[(s.BOT = 3)] = "BOT"),
            (s[(s.PLACEHOLDER = 4)] = "PLACEHOLDER"),
            s
        ))(mn || {}),
        Ou = ((n) => (
            (n[(n.CHAT_INPUT = 1)] = "CHAT_INPUT"), (n[(n.USER = 2)] = "USER"), (n[(n.MESSAGE = 3)] = "MESSAGE"), n
        ))(Ou || {});
    a();
    l();
    a();
    l();
    a();
    l();
    var Kr,
        n1 = {},
        C2 = Symbol("OptionalMessageOption"),
        N2 = Symbol("RequiredMessageOption"),
        Ol = C2,
        i1 = N2,
        A2,
        Ww = function (e) {
            try {
                (Kr = e),
                    (Ol = e.find((t) => (t.untranslatedName || t.displayName) === "shrug").options[0]),
                    (i1 = e.find((t) => (t.untranslatedName || t.displayName) === "me").options[0]),
                    (A2 = Math.abs(Kr.map((t) => Number(t.id)).sort((t, o) => t - o)[0]) - Kr.length);
            } catch (t) {
                new U("CommandsAPI").error("Failed to load CommandsApi", t, " - cmds is", e);
            }
            return e;
        },
        jw = function (e, t, o) {
            if (!e.isVencordCommand) return e.execute(t, o);
            let n = (i) => {
                let s = `An Error occurred while executing command "${e.name}"`,
                    c = i instanceof Error ? i.stack || i.message : String(i);
                console.error(s, i),
                    rt(o.channel.id, {
                        content: `${s}:
${bi(c)}`,
                        author: { username: "Vencord" },
                    });
            };
            try {
                let i = e.execute(t, o);
                return i instanceof Promise ? i.catch(n) : i;
            } catch (i) {
                return n(i);
            }
        };
    function s1(e) {
        return (
            (e.displayName ||= e.name),
            (e.displayDescription ||= e.description),
            e.options?.forEach((t, o, n) => {
                t === C2 ? (n[o] = Ol) : t === N2 && (n[o] = i1),
                    t.choices?.forEach((i) => (i.displayName ||= i.name)),
                    s1(n[o]);
            }),
            e
        );
    }
    function qw(e, t) {
        e.options?.forEach((o) => {
            if (o.type !== 1) throw new Error("When specifying sub-command options, all options must be sub-commands.");
            let n = {
                ...e,
                ...o,
                options: o.options !== void 0 ? o.options : void 0,
                type: 1,
                name: `${e.name} ${o.name}`,
                id: `${o.name}-${e.id}`,
                displayName: `${e.name} ${o.name}`,
                subCommandPath: [{ name: o.name, type: o.type, displayName: o.name }],
                rootCommand: e,
            };
            Gs(n, t);
        });
    }
    function Gs(e, t) {
        if (!Kr) {
            console.warn(
                "[CommandsAPI]",
                `Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,
                "Please restart to use commands"
            );
            return;
        }
        if (Kr.some((o) => o.name === e.name)) throw new Error(`Command '${e.name}' already exists.`);
        if (
            ((e.isVencordCommand = !0),
            (e.untranslatedName ??= e.name),
            (e.untranslatedDescription ??= e.description),
            (e.id ??= `-${Kr.length + A2 + 1}`),
            (e.applicationId ??= "-1"),
            (e.type ??= 1),
            (e.inputType ??= 1),
            (e.plugin ||= t),
            s1(e),
            e.options?.[0]?.type === 1)
        ) {
            qw(e, t);
            return;
        }
        (n1[e.name] = e), Kr.push(e);
    }
    function _l(e) {
        let t = Kr.findIndex((o) => o.name === e);
        return t === -1 ? !1 : (Kr.splice(t, 1), delete n1[e], !0);
    }
    var l1 = {};
    Ke(l1, {
        __getDecorators: () => Kw,
        addMemberListDecorator: () => Oi,
        decoratorsFactories: () => _u,
        removeMemberListDecorator: () => _i,
    });
    a();
    l();
    var _u = new Map();
    function Oi(e, t, o) {
        _u.set(e, { render: t, onlyIn: o });
    }
    function _i(e) {
        _u.delete(e);
    }
    function Kw(e, t) {
        let o = Array.from(_u.entries(), ([n, { render: i, onlyIn: s }]) =>
            (s === "guilds" && t !== "guild") || (s === "dms" && t !== "dm")
                ? null
                : r(
                      C,
                      { noop: !0, key: n, message: `Failed to render ${n} Member List Decorator` },
                      r(i, { ...e, type: t })
                  )
        );
        return r("div", { className: "vc-member-list-decorators-wrapper" }, o);
    }
    var c1 = {};
    Ke(c1, {
        _modifyAccessories: () => Yw,
        accessories: () => Eu,
        addMessageAccessory: () => El,
        removeMessageAccessory: () => Bl,
    });
    a();
    l();
    var Eu = new Map();
    function El(e, t, o) {
        Eu.set(e, { render: t, position: o });
    }
    function Bl(e) {
        Eu.delete(e);
    }
    function Yw(e, t) {
        for (let [o, n] of Eu.entries()) {
            let i = r(
                C,
                { noop: !0, message: `Failed to render ${o} Message Accessory`, key: o },
                r(n.render, { ...t })
            );
            e.splice(n.position != null ? (n.position < 0 ? e.length + n.position : n.position) : e.length, 0, i);
        }
        return e;
    }
    var u1 = {};
    Ke(u1, {
        __addDecorationsToMessage: () => Zw,
        addMessageDecoration: () => Ei,
        decorationsFactories: () => Bu,
        removeMessageDecoration: () => Bi,
    });
    a();
    l();
    var Bu = new Map();
    function Ei(e, t) {
        Bu.set(e, t);
    }
    function Bi(e) {
        Bu.delete(e);
    }
    function Zw(e) {
        let t = Array.from(Bu.entries(), ([o, n]) =>
            r(C, { noop: !0, message: `Failed to render ${o} Message Decoration`, key: o }, r(n, { ...e }))
        );
        return r("div", { className: "vc-message-decorations-wrapper" }, t);
    }
    var y1 = {};
    Ke(y1, {
        _handleClick: () => Jw,
        _handlePreEdit: () => Xw,
        _handlePreSend: () => Qw,
        addMessageClickListener: () => g1,
        addMessagePreEditListener: () => Ul,
        addMessagePreSendListener: () => Ui,
        removeMessageClickListener: () => h1,
        removeMessagePreEditListener: () => Fl,
        removeMessagePreSendListener: () => Fi,
    });
    a();
    l();
    le();
    S();
    var p1 = new U("MessageEvents", "#e5c890"),
        d1 = new Set(),
        m1 = new Set();
    async function Qw(e, t, o, n) {
        o.replyOptions = n;
        for (let i of d1)
            try {
                if ((await i(e, t, o))?.cancel) return !0;
            } catch (s) {
                p1.error(
                    `MessageSendHandler: Listener encountered an unknown error
`,
                    s
                );
            }
        return !1;
    }
    async function Xw(e, t, o) {
        for (let n of m1)
            try {
                if ((await n(e, t, o))?.cancel) return !0;
            } catch (i) {
                p1.error(
                    `MessageEditHandler: Listener encountered an unknown error
`,
                    i
                );
            }
        return !1;
    }
    function Ui(e) {
        return d1.add(e), e;
    }
    function Ul(e) {
        return m1.add(e), e;
    }
    function Fi(e) {
        return d1.delete(e);
    }
    function Fl(e) {
        return m1.delete(e);
    }
    var f1 = new Set();
    function Jw(e, t, o) {
        e = qt.getMessage(t.id, e.id) ?? e;
        for (let n of f1)
            try {
                n(e, t, o);
            } catch (i) {
                p1.error(
                    `MessageClickHandler: Listener encountered an unknown error
`,
                    i
                );
            }
    }
    function g1(e) {
        return f1.add(e), e;
    }
    function h1(e) {
        return f1.delete(e);
    }
    var b1 = {};
    Ke(b1, {
        MessagePopoverButtonMap: () => Hs,
        _buildPopoverElements: () => tI,
        addMessagePopoverButton: () => Uu,
        removeMessagePopoverButton: () => v1,
    });
    a();
    l();
    le();
    var Vw = new U("MessagePopover"),
        Hs = new Map();
    function Uu(e, t, o) {
        Hs.set(e, { render: t, icon: o });
    }
    function v1(e) {
        Hs.delete(e);
    }
    function eI(e) {
        let { Component: t, message: o } = e,
            { messagePopoverButtons: n } = Ee(["uiElements.messagePopoverButtons.*"]).uiElements,
            i = Array.from(Hs.entries())
                .filter(([s]) => n[s]?.enabled !== !1)
                .map(([s, { render: c }]) => {
                    try {
                        let u = c(o);
                        return u ? r(C, { noop: !0 }, r(t, { key: s, ...u })) : null;
                    } catch (u) {
                        return Vw.error(`[${s}]`, u), null;
                    }
                });
        return r(f, null, i);
    }
    function tI(e, t) {
        return r(eI, { Component: e, message: t });
    }
    var w1 = {};
    Ke(w1, {
        classNameFactory: () => oI,
        compileStyle: () => T1,
        coreStyleRootNode: () => zs,
        disableStyle: () => Ho,
        enableStyle: () => Go,
        initStyles: () => S1,
        isStyleEnabled: () => x1,
        managedStyleRootNode: () => $i,
        requireStyle: () => Gl,
        setStyleClassNames: () => nI,
        styleMap: () => R2,
        toggleStyle: () => rI,
        userStyleRootNode: () => $l,
        vencordRootNode: () => Ws,
    });
    a();
    l();
    Vr();
    Pe();
    var oI = Y,
        R2 = (unsafeWindow.VencordStyles ??= new Map()),
        Ws = document.createElement("vencord-root"),
        zs = document.createElement("vencord-styles"),
        $i = document.createElement("vencord-managed-styles"),
        $l = document.createElement("vencord-user-styles");
    Ws.style.display = "none";
    Ws.append(zs, $i, $l);
    function S1() {
        let e = Eo("vencord-os-theme-values", zs);
        Eo("vencord-text", zs).textContent = $g();
        let t = Eo("vencord-css-core", zs),
            o = null;
        (Eo("vencord-margins", zs).textContent = $h()),
            VencordNative.native.getRendererCss().then((n) => (t.textContent = n)),
            VencordNative.themes.getSystemValues().then((n) => {
                let i = Object.entries(n)
                    .filter(([, s]) => !!s)
                    .map(([s, c]) => `--${s}: ${c};`)
                    .join("");
                e.textContent = `:root{${i}}`;
            });
    }
    document.addEventListener(
        "DOMContentLoaded",
        () => {
            document.documentElement.append(Ws);
        },
        { once: !0 }
    );
    function Gl(e) {
        let t = R2.get(e);
        if (!t) throw new Error(`Style "${e}" does not exist`);
        return t;
    }
    function Go(e) {
        let t = Gl(e);
        return t.dom?.isConnected
            ? !1
            : (t.dom || ((t.dom = document.createElement("style")), (t.dom.dataset.vencordName = t.name)),
              T1(t),
              $i.appendChild(t.dom),
              !0);
    }
    function Ho(e) {
        let t = Gl(e);
        return t.dom?.isConnected ? (t.dom.remove(), (t.dom = null), !0) : !1;
    }
    var rI = (e) => (x1(e) ? Ho(e) : Go(e)),
        x1 = (e) => Gl(e).dom?.isConnected ?? !1,
        nI = (e, t, o = !0) => {
            let n = Gl(e);
            (n.classNames = t), o && x1(n.name) && T1(n);
        },
        T1 = (e) => {
            if (!e.dom) throw new Error("Style has no DOM element");
            e.dom.textContent = e.source.replace(/\[--(\w+)\]/g, (t, o) => {
                let n = e.classNames[o];
                return n ? Rg(n) : t;
            });
        };
    le();
    pr();
    S();
    var C1 = {};
    Ke(C1, {
        SYM_IS_PROXIED_FACTORY: () => I1,
        SYM_ORIGINAL_FACTORY: () => jn,
        SYM_PATCHED_BY: () => M1,
        SYM_PATCHED_SOURCE: () => P1,
        allWebpackInstances: () => Fu,
        getBuildNumber: () => L2,
        getFactoryPatchedBy: () => aI,
        getFactoryPatchedSource: () => sI,
        patchTimings: () => iI,
        patches: () => Gi,
    });
    a();
    l();
    Fo();
    le();
    re();
    du();
    G();
    var Gi = [],
        I1 = Symbol("WebpackPatcher.isProxiedFactory"),
        jn = Symbol("WebpackPatcher.originalFactory"),
        P1 = Symbol("WebpackPatcher.patchedSource"),
        M1 = Symbol("WebpackPatcher.patchedBy"),
        Fu = new Set(),
        iI = [],
        L2 = rn(() => {
            try {
                let t = function (i) {
                    let s = i.match(/"Trying to open a changelog for an invalid build number (\d+?)"\)/);
                    return s == null ? -1 : Number(s[1]);
                };
                var e = t;
                let o = String(ct.m[446023]);
                if (o.includes("Trying to open a changelog for an invalid build number")) {
                    let i = t(o);
                    if (i !== -1) return i;
                }
                let n = el("Trying to open a changelog for an invalid build number");
                return t(String(n));
            } catch {
                return -1;
            }
        });
    function sI(e, t = ct) {
        return t.m[e]?.[P1];
    }
    function aI(e, t = ct) {
        return t.m[e]?.[M1];
    }
    var er = new U("WebpackPatcher", "#8caaee"),
        k2 = !1,
        xr = (e, t, o) => (
            Object.hasOwn(o, "value") && (o.writable = !0),
            Reflect.defineProperty(e, t, { configurable: !0, enumerable: !0, ...o })
        );
    xr(Function.prototype, "m", {
        enumerable: !1,
        set(e) {
            xr(this, "m", { value: e });
            let { stack: t } = new Error();
            if (!t?.includes("http") || t.match(/at \d+? \(/) || !String(this).includes("exports:{}")) return;
            let o = t.match(/\/assets\/(.+?\.js)/)?.[1];
            if (["sentry", "libdiscore"].some((c) => o?.toLowerCase()?.includes(c))) return;
            xr(this, "p", {
                enumerable: !1,
                set(c) {
                    xr(this, "p", { value: c }),
                        clearTimeout(n),
                        !(c !== "/assets/" || /(?:=>|{return)"[^"]/.exec(String(this.u))) &&
                            (ct == null &&
                                this.c != null &&
                                (er.info(
                                    "Main WebpackInstance found" +
                                        Ea` in ${o}` +
                                        ", initializing internal references to WebpackRequire"
                                ),
                                Va(this)),
                            s());
                },
            }),
                xr(this, "O", {
                    enumerable: !1,
                    set(c) {
                        xr(this, "O", { value: c }), clearTimeout(i);
                        let u = this;
                        xr(c, "j", {
                            enumerable: !1,
                            set(p) {
                                xr(this, "j", { value: p }), u.p == null && s();
                            },
                        });
                    },
                });
            let n = setTimeout(() => Reflect.deleteProperty(this, "p"), 0),
                i = setTimeout(() => Reflect.deleteProperty(this, "O"), 0),
                s = () => {
                    er.info("Found Webpack module factories" + Ea` in ${o}`), Fu.add(this);
                    for (let u in e) O2(e, u, e[u], e, !0);
                    xr(e, Symbol.toStringTag, { value: "ModuleFactories", enumerable: !1 });
                    let c = new Proxy(e, lI);
                    xr(this, "m", { value: c }),
                        (this.d = function (u, p) {
                            for (let m in p)
                                Object.hasOwn(p, m) &&
                                    !Object.hasOwn(u, m) &&
                                    Object.defineProperty(u, m, { enumerable: !0, configurable: !0, get: p[m] });
                        });
                };
        },
    });
    var lI = { set: O2 },
        cI = {
            apply(e, t, o) {
                if (e[jn] != null) return D2(e, t, o);
                let n = e.name,
                    i = E2(n, e);
                return D2(i, t, o);
            },
            get(e, t, o) {
                if (t === I1) return !0;
                let n = e[jn] ?? e;
                if (t === "toString" || t === P1 || t === M1) {
                    let i = Reflect.get(n, t, n);
                    return t === "toString" ? i.bind(n) : i;
                }
                return Reflect.get(e, t, o);
            },
        };
    function O2(e, t, o, n, i = !1) {
        if (uI(e, t, o, n, i)) return !0;
        pI(t, o);
        let s = new Proxy(W.eagerPatches ? E2(t, o) : o, cI);
        return Reflect.set(e, t, s, n);
    }
    function uI(e, t, o, n, i) {
        let s, c;
        for (let u of Fu)
            if (!(i && u.m === e) && Object.hasOwn(u.m, t)) {
                (s = u.m[t]), (c = u.m);
                break;
            }
        return s != null
            ? (c !== e && s[I1] ? Reflect.set(e, t, s, n) : _2(t, o), s[jn] != null && (s[jn] = o), !0)
            : !1;
    }
    function _2(e, t) {
        for (let o of Fu) xr(o.m, e, { value: t });
    }
    function pI(e, t) {
        for (let o of Ja)
            try {
                o(t, e);
            } catch (n) {
                er.error(
                    `Error in Webpack factory listener:
`,
                    n,
                    o
                );
            }
    }
    function D2(e, t, o) {
        let n = e[jn];
        e === n && delete e[jn];
        let [i, s, c] = o;
        if ((_2(i.id, n), ct == null && !k2 && ((k2 = !0), typeof c == "function" && c.m != null && c.c != null))) {
            let { stack: m } = new Error(),
                h = m?.match(/\/assets\/(.+?\.js)/)?.[1];
            er.warn(
                `WebpackRequire was not initialized, falling back to WebpackRequire passed to the first called wrapped module factory (id: ${String(i.id)}` +
                    Ea`, WebpackInstance origin: ${h}` +
                    ")"
            ),
                Va(c);
        }
        let u;
        try {
            u = e.apply(t, o);
        } catch (m) {
            if (e === n) throw m;
            return (
                er.error(
                    `Error in patched module factory:
`,
                    m
                ),
                n.apply(t, o)
            );
        }
        if (((s = i.exports), (typeof c == "function" && c.c && gu(c.c, s, i.id)) || s == null)) return u;
        for (let m of fu)
            try {
                m(s, i.id);
            } catch (h) {
                er.error(
                    `Error in Webpack module listener:
`,
                    h,
                    m
                );
            }
        for (let [m, h] of Si) {
            try {
                if (m(s)) {
                    Si.delete(m), h(s, i.id);
                    continue;
                }
            } catch (y) {
                er.error(
                    `Error while filtering or firing callback for Webpack waitFor subscription:
`,
                    y,
                    `

Module exports:`,
                    s,
                    `

Filter:`,
                    m,
                    `

Callback:`,
                    h
                );
            }
            if (typeof s == "object")
                for (let y in s)
                    try {
                        try {
                            var p = s[y];
                        } catch {
                            continue;
                        }
                        if (p != null && m(p)) {
                            Si.delete(m), h(p, i.id);
                            break;
                        }
                    } catch (b) {
                        er.error(
                            `Error while filtering or firing callback for Webpack waitFor subscription:
`,
                            b,
                            `

Export value:`,
                            s,
                            `

Filter:`,
                            m,
                            `

Callback:`,
                            h
                        );
                    }
        }
        return u;
    }
    function E2(e, t) {
        let o = String(t),
            i = "0," + (o.startsWith("(") ? "" : "function") + o.slice(o.indexOf("(")),
            s = i,
            c = t,
            u = new Set();
        for (let p = 0; p < Gi.length; p++) {
            let m = Gi[p],
                h = L2(),
                y = h !== -1;
            if ((y && m.fromBuild != null && h < m.fromBuild) || (m.toBuild != null && h > m.toBuild)) {
                Gi.splice(p--, 1);
                continue;
            }
            if (
                !(typeof m.find == "string"
                    ? i.includes(m.find)
                    : (m.find.global && (m.find.lastIndex = 0), m.find.test(i)))
            )
                continue;
            let x = Jv(
                    `patch by ${m.plugin}`,
                    (A, E) => (typeof A != "string" && A.global && (A.lastIndex = 0), i.replace(A, E))
                ),
                P = i,
                I = t,
                D = !1;
            for (let A of m.replacement) {
                if ((y && A.fromBuild != null && h < A.fromBuild) || (A.toBuild != null && h > A.toBuild)) continue;
                let E = i,
                    q = t;
                try {
                    let [z, K] = x(A.match, A.replace);
                    if (z === i) {
                        if (
                            (m.noWarn ||
                                A.noWarn ||
                                er.warn(`Patch by ${m.plugin} had no effect (Module id is ${String(e)}): ${A.match}`),
                            m.group)
                        ) {
                            er.warn(
                                `Undoing patch group ${m.find} by ${m.plugin} because replacement ${A.match} had no effect`
                            ),
                                (i = P),
                                (c = I),
                                D && u.delete(m.plugin);
                            break;
                        }
                        continue;
                    }
                    let ue = [...u];
                    u.has(m.plugin) || ue.push(m.plugin),
                        (i = z),
                        (s = `// Webpack Module ${String(e)} - Patched by ${ue.join(", ")}
${i}
//# sourceURL=file:///WebpackModule${String(e)}`),
                        (c = (0, eval)(s)),
                        u.has(m.plugin) || (u.add(m.plugin), (D = !0));
                } catch (z) {
                    if (
                        ((m.plugin === "ContextMenuAPI" &&
                            z instanceof SyntaxError &&
                            z.message.includes("arguments")) ||
                            er.error(
                                `Patch by ${m.plugin} errored (Module id is ${String(e)}): ${A.match}
`,
                                z
                            ),
                        D && u.delete(m.plugin),
                        m.group)
                    ) {
                        er.warn(`Undoing patch group ${m.find} by ${m.plugin} because replacement ${A.match} errored`),
                            (i = P),
                            (c = I);
                        break;
                    }
                    (i = E), (c = q);
                }
            }
            m.all || Gi.splice(p--, 1);
        }
        return (c[jn] = t), c;
    }
    du();
    var Ut = new U("PluginManager", "#a6d189"),
        dI = Ut,
        B2 = !1,
        N1 = new Set();
    function ke(e) {
        return ($e[e]?.required || $e[e]?.isDependency || W.plugins[e]?.enabled) ?? !1;
    }
    function U2(e, t, o = `Vencord.Plugins.plugins[${JSON.stringify(t)}]`) {
        let n = e;
        if (((n.plugin = t), !(n.predicate && !n.predicate()))) {
            ah(n), Array.isArray(n.replacement) || (n.replacement = [n.replacement]);
            for (let i of n.replacement) qa(i, o);
            (n.replacement = n.replacement.filter(({ predicate: i }) => !i || i())), Gi.push(n);
        }
    }
    function $u(e) {
        return e.requiresRestart !== !1 && (e.requiresRestart || !!e.patches?.length);
    }
    var Hl = an("startAllPlugins", function (t) {
        Ut.info(`Starting plugins (stage ${t})`);
        for (let o in $e)
            if (ke(o)) {
                if (($e[o].startAt ?? "WebpackReady") !== t) continue;
                zl($e[o]);
            }
    });
    function Gu(e) {
        let t = W.plugins,
            o = !1,
            n = [];
        return (
            e.dependencies?.forEach((i) => {
                if (!t[i].enabled) {
                    let s = $e[i];
                    if ((Gu(s), (t[i].enabled = !0), (s.isDependency = !0), $u(s))) {
                        Ut.warn(`Enabling dependency ${i} requires restart.`), (o = !0);
                        return;
                    }
                    zl(s) || n.push(i);
                }
            }),
            { restartNeeded: o, failures: n }
        );
    }
    function A1(e, t) {
        if (e.flux && !N1.has(e.name)) {
            N1.add(e.name), Ut.debug("Subscribing to flux events of plugin", e.name);
            for (let [o, n] of Object.entries(e.flux)) {
                let i = (e.flux[o] = function () {
                    try {
                        let s = n.apply(e, arguments);
                        return s instanceof Promise
                            ? s.catch((c) =>
                                  Ut.error(
                                      `${e.name}: Error while handling ${o}
`,
                                      c
                                  )
                              )
                            : s;
                    } catch (s) {
                        Ut.error(
                            `${e.name}: Error while handling ${o}
`,
                            s
                        );
                    }
                });
                t.subscribe(o, i);
            }
        }
    }
    function F2(e, t) {
        if (e.flux) {
            N1.delete(e.name), Ut.debug("Unsubscribing from flux events of plugin", e.name);
            for (let [o, n] of Object.entries(e.flux)) t.unsubscribe(o, n);
        }
    }
    function mI(e) {
        B2 = !0;
        for (let t in $e) ke(t) && A1($e[t], e);
    }
    var zl = an(
            "startPlugin",
            function (t) {
                let {
                    name: o,
                    commands: n,
                    contextMenus: i,
                    managedStyle: s,
                    userProfileBadge: c,
                    onBeforeMessageEdit: u,
                    onBeforeMessageSend: p,
                    onMessageClick: m,
                    renderChatBarButton: h,
                    chatBarButton: y,
                    renderMemberListDecorator: b,
                    renderMessageAccessory: x,
                    renderMessageDecoration: P,
                    renderMessagePopoverButton: I,
                    messagePopoverButton: D,
                } = t;
                if (t.start) {
                    if ((Ut.info("Starting plugin", o), t.started)) return Ut.warn(`${o} already started`), !1;
                    try {
                        t.start();
                    } catch (A) {
                        return (
                            Ut.error(
                                `Failed to start ${o}
`,
                                A
                            ),
                            !1
                        );
                    }
                }
                if (((t.started = !0), n?.length)) {
                    Ut.debug("Registering commands of plugin", o);
                    for (let A of n)
                        try {
                            Gs(A, o);
                        } catch (E) {
                            return (
                                Ut.error(
                                    `Failed to register command ${A.name}
`,
                                    E
                                ),
                                !1
                            );
                        }
                }
                if ((B2 && A1(t, B), i)) {
                    Ut.debug("Adding context menus patches of plugin", o);
                    for (let A in i) Dl(A, i[A]);
                }
                return (
                    s && Go(s),
                    c && wl(c),
                    u && Ul(u),
                    p && Ui(p),
                    m && g1(m),
                    y ? Lu(o, y.render, y.icon) : h && Lu(o, h),
                    b && Oi(o, b),
                    P && Ei(o, P),
                    x && El(o, x),
                    D ? Uu(o, D.render, D.icon) : I && Uu(o, I),
                    !0
                );
            },
            (e) => `startPlugin ${e.name}`
        ),
        R1 = an(
            "stopPlugin",
            function (t) {
                let {
                    name: o,
                    commands: n,
                    contextMenus: i,
                    managedStyle: s,
                    userProfileBadge: c,
                    onBeforeMessageEdit: u,
                    onBeforeMessageSend: p,
                    onMessageClick: m,
                    renderChatBarButton: h,
                    chatBarButton: y,
                    renderMemberListDecorator: b,
                    renderMessageAccessory: x,
                    renderMessageDecoration: P,
                    renderMessagePopoverButton: I,
                    messagePopoverButton: D,
                } = t;
                if (t.stop) {
                    if ((Ut.info("Stopping plugin", o), !t.started)) return Ut.warn(`${o} already stopped`), !1;
                    try {
                        t.stop();
                    } catch (A) {
                        return (
                            Ut.error(
                                `Failed to stop ${o}
`,
                                A
                            ),
                            !1
                        );
                    }
                }
                if (((t.started = !1), n?.length)) {
                    Ut.debug("Unregistering commands of plugin", o);
                    for (let A of n)
                        try {
                            _l(A.name);
                        } catch (E) {
                            return (
                                Ut.error(
                                    `Failed to unregister command ${A.name}
`,
                                    E
                                ),
                                !1
                            );
                        }
                }
                if ((F2(t, B), i)) {
                    Ut.debug("Removing context menus patches of plugin", o);
                    for (let A in i) Qh(A, i[A]);
                }
                return (
                    s && Ho(s),
                    c && Il(c),
                    u && Fl(u),
                    p && Fi(p),
                    m && h1(m),
                    (y || h) && o1(o),
                    b && _i(o),
                    P && Bi(o),
                    x && Bl(o),
                    (D || I) && v1(o),
                    !0
                );
            },
            (e) => `stopPlugin ${e.name}`
        ),
        k1 = dn(function () {
            let t = Object.values($e),
                o = W.plugins,
                n = [
                    "onBeforeMessageEdit",
                    "onBeforeMessageSend",
                    "onMessageClick",
                    "renderChatBarButton",
                    "renderMemberListDecorator",
                    "renderMessageAccessory",
                    "renderMessageDecoration",
                    "renderMessagePopoverButton",
                ],
                i = new Set();
            for (let s of t)
                if (ke(s.name)) {
                    s.dependencies?.forEach((c) => {
                        let u = $e[c];
                        if (!u) {
                            let p = new Error(`Plugin ${s.name} has unresolved dependency ${c}`);
                            Ut.warn(p);
                            return;
                        }
                        (o[c].enabled = !0), (u.isDependency = !0);
                    }),
                        s.commands?.length && i.add("CommandsAPI"),
                        (s.onBeforeMessageEdit || s.onBeforeMessageSend || s.onMessageClick) &&
                            i.add("MessageEventsAPI"),
                        (s.chatBarButton || s.renderChatBarButton) && i.add("ChatInputButtonAPI"),
                        s.renderMemberListDecorator && i.add("MemberListDecoratorsAPI"),
                        s.renderMessageAccessory && i.add("MessageAccessoriesAPI"),
                        s.renderMessageDecoration && i.add("MessageDecorationsAPI"),
                        (s.messagePopoverButton || s.renderMessagePopoverButton) && i.add("MessagePopoverAPI"),
                        s.userProfileBadge && i.add("BadgeAPI");
                    for (let c of n) s[c] &&= s[c].bind(s);
                }
            for (let s of i) ($e[s].isDependency = !0), (o[s].enabled = !0);
            for (let s of t) {
                if (s.settings) {
                    (s.options ??= {}), (s.settings.pluginName = s.name);
                    for (let c in s.settings.def) {
                        let u = s.settings.def[c],
                            p = s.settings.checks?.[c];
                        s.options[c] = { ...u, ...p };
                    }
                }
                if (s.options)
                    for (let c in s.options) {
                        let u = s.options[c];
                        u.onChange != null && dt.addChangeListener(`plugins.${s.name}.${c}`, u.onChange);
                    }
                if (s.patches && ke(s.name)) for (let c of s.patches) U2(c, s.name);
            }
        });
    a();
    l();
    Pe();
    re();
    var fI = Y("vc-card-");
    function mt({ variant: e = "normal", defaultPadding: t, children: o, className: n, ...i }) {
        return r("div", { className: L(fI("base", e, (t ?? !n) && "defaultPadding"), n), ...i }, o);
    }
    Qt();
    Ur();
    Yo();
    a();
    l();
    var jl = class {
        set = new Set();
        get changeCount() {
            return this.set.size;
        }
        get hasChanges() {
            return this.changeCount > 0;
        }
        handleChange(t) {
            this.set.delete(t) || this.set.add(t);
        }
        add(t) {
            return this.set.add(t);
        }
        remove(t) {
            return this.set.delete(t);
        }
        getChanges() {
            return this.set.values();
        }
        map(t) {
            return [...this.getChanges()].map(t);
        }
    };
    Pe();
    a();
    l();
    function qn(e) {
        return !!e;
    }
    function Tr(e) {
        return e != null;
    }
    le();
    re();
    pt();
    S();
    a();
    l();
    var L1 = {};
    Ke(L1, {
        currentNotice: () => zi,
        nextNotice: () => $2,
        noticesQueue: () => ql,
        popNotice: () => Wi,
        showNotice: () => fn,
    });
    a();
    l();
    pt();
    G();
    var D1;
    Ze(
        (e) => e.show && e.dismiss && !e.suppressAll,
        (e) => (D1 = e)
    );
    var ql = [],
        zi = null;
    function Wi() {
        D1.dismiss();
    }
    function $2() {
        (zi = ql.shift()), zi && D1.show(...zi, "VencordNotice");
    }
    function fn(e, t, o) {
        let n = mh(e) ? e : r(C, { fallback: () => "Error Showing Notice" }, e);
        ql.push(["GENERIC", n, t, o]), zi || $2();
    }
    Ue();
    a();
    l();
    a();
    l();
    function O1({ text: e, color: t }) {
        return r(
            "div",
            { className: "vc-addon-badge", style: { backgroundColor: t, justifySelf: "flex-end", marginLeft: "auto" } },
            e
        );
    }
    gi();
    Pe();
    S();
    var Kn = Y("vc-addon-");
    function Hu({
        disabled: e,
        isNew: t,
        name: o,
        infoButton: n,
        footer: i,
        author: s,
        enabled: c,
        setEnabled: u,
        description: p,
        onMouseEnter: m,
        onMouseLeave: h,
    }) {
        let y = at(null),
            b = at(null);
        return r(
            "div",
            { className: Kn("card", { "card-disabled": e }), onMouseEnter: m, onMouseLeave: h },
            r(
                "div",
                { className: Kn("header") },
                r(
                    "div",
                    { className: Kn("name-author") },
                    r(
                        H,
                        { variant: "text-md/bold", className: Kn("name") },
                        r(
                            "div",
                            { ref: b, className: Kn("title-container") },
                            r(
                                "div",
                                {
                                    ref: y,
                                    className: Kn("title"),
                                    onMouseOver: () => {
                                        let x = y.current,
                                            P = b.current;
                                        x.style.setProperty("--offset", `${P.clientWidth - x.scrollWidth}px`),
                                            x.style.setProperty(
                                                "--duration",
                                                `${Math.max(0.5, (x.scrollWidth - P.clientWidth) / 7)}s`
                                            );
                                    },
                                },
                                o
                            )
                        ),
                        t && r(O1, { text: "NEW", color: "#ED4245" })
                    ),
                    !!s && r(H, { variant: "text-md/normal", className: Kn("author") }, s)
                ),
                n,
                r(tn, { checked: c, onChange: u, disabled: e })
            ),
            r(H, { className: Kn("note"), variant: "text-sm/normal" }, p),
            i
        );
    }
    re();
    S();
    a();
    l();
    a();
    l();
    a();
    l();
    var ji = "Vendicated/Vencord";
    var AU = `Vencord/${Wn}${ji ? ` (https://github.com/${ji})` : ""}`;
    Pe();
    Fo();
    re();
    Oe();
    G();
    S();
    a();
    l();
    a();
    l();
    gi();
    S();
    a();
    l();
    Pe();
    re();
    dr();
    S();
    var qi = Y("vc-plugins-setting-");
    function tr(e) {
        return typeof e == "string" ? e : e ? null : "Invalid input provided";
    }
    function or({ tag: e = "div", name: t, description: o, error: n, inlineSetting: i, children: s }) {
        return r(
            e,
            { className: qi("section") },
            r(
                "div",
                { className: L(qi("content"), i && qi("inline")) },
                r(
                    "div",
                    { className: qi("label") },
                    t && r(H, { className: qi("title"), variant: "text-md/medium" }, vi(Ya(t))),
                    o && r(H, { className: qi("description"), variant: "text-sm/normal" }, o)
                ),
                s
            ),
            n && r(H, { className: qi("error"), variant: "text-sm/normal" }, n)
        );
    }
    function G2({ option: e, pluginSettings: t, definedSettings: o, id: n, onChange: i }) {
        let s = t[n] ?? e.default,
            [c, u] = k(s ?? !1),
            [p, m] = k(null);
        function h(y) {
            let b = e.isValid?.call(o, y) ?? !0;
            u(y), m(tr(b)), b === !0 && i(y);
        }
        return r(
            or,
            { tag: "label", name: n, description: e.description, error: p, inlineSetting: !0 },
            r(tn, { checked: c, onChange: h, disabled: e.disabled?.call(o) ?? !1 })
        );
    }
    a();
    l();
    function H2({ option: e, onChange: t }) {
        return e.component({ setValue: t, option: e });
    }
    a();
    l();
    S();
    var gI = BigInt(Number.MAX_SAFE_INTEGER);
    function _1({ option: e, pluginSettings: t, definedSettings: o, id: n, onChange: i }) {
        function s(y) {
            return e.type === 2 ? BigInt(y) : Number(y);
        }
        let [c, u] = k(`${t[n] ?? e.default ?? 0}`),
            [p, m] = k(null);
        function h(y) {
            let b = e.isValid?.call(o, y) ?? !0;
            m(tr(b)), b === !0 && i(s(y)), e.type === 1 && BigInt(y) >= gI ? u(`${Number.MAX_SAFE_INTEGER}`) : u(y);
        }
        return r(
            or,
            { name: n, description: e.description, error: p },
            r(ht, {
                type: "number",
                pattern: "-?[0-9]+",
                placeholder: e.placeholder ?? "Enter a number",
                value: c,
                onChange: h,
                disabled: e.disabled?.call(o) ?? !1,
                ...e.componentProps,
            })
        );
    }
    a();
    l();
    S();
    function z2({ option: e, pluginSettings: t, definedSettings: o, onChange: n, id: i }) {
        let s = t[i] ?? e.options?.find((y) => y.default)?.value,
            [c, u] = k(s ?? null),
            [p, m] = k(null);
        function h(y) {
            let b = e.isValid?.call(o, y) ?? !0;
            u(y), m(tr(b)), b === !0 && n(y);
        }
        return r(
            or,
            { name: i, description: e.description, error: p },
            r(ro, {
                placeholder: e.placeholder ?? "Select an option",
                options: e.options,
                maxVisibleItems: 5,
                closeOnSelect: !0,
                select: h,
                isSelected: (y) => y === c,
                serialize: (y) => String(y),
                isDisabled: e.disabled?.call(o) ?? !1,
                ...e.componentProps,
            })
        );
    }
    a();
    l();
    S();
    function W2({ option: e, pluginSettings: t, definedSettings: o, id: n, onChange: i }) {
        let s = t[n] ?? e.default,
            [c, u] = k(null);
        function p(m) {
            let h = e.isValid?.call(o, m) ?? !0;
            u(tr(h)), h === !0 && i(m);
        }
        return r(
            or,
            { name: n, description: e.description, error: c },
            r(Dn, {
                markers: e.markers,
                minValue: e.markers[0],
                maxValue: e.markers[e.markers.length - 1],
                initialValue: s,
                onValueChange: p,
                onValueRender: (m) => String(m.toFixed(2)),
                stickToMarkers: e.stickToMarkers ?? !0,
                disabled: e.disabled?.call(o) ?? !1,
                ...e.componentProps,
            })
        );
    }
    a();
    l();
    S();
    function j2({ option: e, pluginSettings: t, definedSettings: o, id: n, onChange: i }) {
        let [s, c] = k(t[n] ?? e.default ?? null),
            [u, p] = k(null);
        function m(h) {
            let y = e.isValid?.call(o, h) ?? !0;
            c(h), p(tr(y)), y === !0 && i(h);
        }
        return r(
            or,
            { name: n, description: e.description, error: u },
            e.multiline
                ? r(Ti, {
                      placeholder: e.placeholder ?? "Enter a value",
                      value: s,
                      onChange: m,
                      disabled: e.disabled?.call(o) ?? !1,
                      ...e.componentProps,
                  })
                : r(ht, {
                      type: "text",
                      placeholder: e.placeholder ?? "Enter a value",
                      value: s,
                      onChange: m,
                      maxLength: null,
                      disabled: e.disabled?.call(o) ?? !1,
                      ...e.componentProps,
                  })
        );
    }
    var q2 = { 0: j2, 1: _1, 2: _1, 3: G2, 4: z2, 5: W2, 6: H2, 7: () => null };
    a();
    l();
    Wt();
    T();
    Pe();
    se();
    re();
    Oe();
    S();
    a();
    l();
    Ue();
    se();
    S();
    function hI() {
        let e = Ai() === 2 ? "#000000" : "#FFFFFF";
        return r(Ga, { "aria-hidden": !0, fill: e, className: "vc-settings-modal-link-icon" });
    }
    function yI() {
        let e = Ai() === 2 ? "#000000" : "#FFFFFF";
        return r(Kg, { "aria-hidden": !0, fill: e, className: "vc-settings-modal-link-icon" });
    }
    function K2({ text: e, href: t, Icon: o }) {
        return r(V, { text: e }, (n) => r(ul, { ...n, href: t }, r(o, null)));
    }
    var zu = (e) => r(K2, { ...e, Icon: yI }),
        Wu = (e) => r(K2, { ...e, Icon: hI });
    var js = Y("vc-author-modal-");
    function Yn(e) {
        fe((t) => r(ve, { ...t }, r(C, null, r(Ie, { className: js("root") }, r(vI, { user: e })))));
    }
    function vI({ user: e }) {
        Ee();
        let t = ie([Bt], () => Bt.getUserProfile(e.id));
        te(() => {
            !t && !e.bot && e.id && Es(e.id);
        }, [e.id, e.bot, t]);
        let o = t?.connectedAccounts?.find((c) => c.type === "github")?.name,
            n = t?.connectedAccounts?.find((c) => c.type === "domain")?.name,
            i = ce(() => {
                let c = Object.values($e);
                return (
                    pi[e.id]
                        ? c.filter((p) => p.authors.includes(pi[e.id]))
                        : c.filter((p) => p.authors.some((m) => m.name === e.username))
                )
                    .filter((p) => !p.name.endsWith("API"))
                    .sort((p, m) => Number(p.required ?? !1) - Number(m.required ?? !1));
            }, [e.id, e.username]),
            s = r(Ve, { href: "https://vencord.dev/source" }, "contributed");
        return r(
            f,
            null,
            r(
                "div",
                { className: js("header") },
                r("img", { className: js("avatar"), src: e.getAvatarURL(void 0, 512, !0), alt: "" }),
                r(N.FormTitle, { tag: "h2", className: js("name") }, e.username),
                r(
                    "div",
                    { className: L("vc-settings-modal-links", js("links")) },
                    n && r(zu, { text: n, href: `https://${n}` }),
                    o && r(Wu, { text: o, href: `https://github.com/${o}` })
                )
            ),
            i.length
                ? r(N.FormText, null, "This person has ", s, " to ", Bg(i.length, "plugin"), "!")
                : r(
                      N.FormText,
                      null,
                      "This person has not made any plugins. They likely ",
                      s,
                      " to Vencord in other ways!"
                  ),
            !!i.length &&
                r(
                    "div",
                    { className: js("plugins") },
                    i.map((c) =>
                        r(Kl, {
                            key: c.name,
                            plugin: c,
                            disabled: c.required ?? !1,
                            onRestartNeeded: () => Ge("Restart to apply changes!"),
                        })
                    )
                )
        );
    }
    var Y2 = Y("vc-plugin-modal-"),
        E1 = ee("moreUsers", "avatar", "clickableAvatar"),
        bI = Pt(() => R.getCurrentUser().constructor);
    function B1(e) {
        let t = new bI({ username: e.username, id: e.id ?? Ll(), avatar: e.avatar, bot: !0 });
        return B.dispatch({ type: "USER_UPDATE", user: t }), t;
    }
    function Z2({ plugin: e, onRestartNeeded: t, onClose: o, transitionState: n }) {
        let i = Ee([`plugins.${e.name}.*`]).plugins[e.name],
            s = !!(i && e.options && !di(e.options)),
            c = ce(() => [B1({ username: "Loading...", id: "-1465912127305809920" })], []),
            [u, p] = k([]);
        te(() => {
            (async () => {
                for (let b of e.authors.slice(0, 6))
                    try {
                        let x = b.id
                            ? await lo.getUser(String(b.id)).catch(() => B1({ username: b.name }))
                            : B1({ username: b.name });
                        p((P) => [...P, x]);
                    } catch {
                        continue;
                    }
            })();
        }, [e.authors]);
        function m() {
            if (!s || !e.options) return r(N.FormText, null, "There are no settings for this plugin.");
            let b = Object.entries(e.options).map(([x, P]) => {
                if (P.type === 7 || P.hidden) return null;
                function I(A) {
                    let E = e.options?.[x];
                    !E || E.type === 7 || ((i[x] = A), E.restartNeeded && t(x));
                }
                let D = q2[P.type];
                return r(
                    C,
                    { noop: !0, key: x },
                    r(D, { id: x, option: P, onChange: kt(I), pluginSettings: i, definedSettings: e.settings })
                );
            });
            return r("div", { className: "vc-plugins-settings" }, b);
        }
        function h(b, x) {
            let P = e.authors.length - x,
                I = e.authors.length - P,
                D = I + e.authors.length - x;
            return r(
                V,
                {
                    text: e.authors
                        .slice(I, D)
                        .map((A) => A.name)
                        .join(", "),
                },
                ({ onMouseEnter: A, onMouseLeave: E }) =>
                    r("div", { className: E1.moreUsers, onMouseEnter: A, onMouseLeave: E }, "+", P)
            );
        }
        let y = Zn[e.name];
        return r(
            ve,
            { transitionState: n, size: "medium" },
            r(
                Re,
                { separator: !1, className: O.bottom8 },
                r(H, { variant: "heading-xl/bold", style: { flexGrow: 1 } }, e.name),
                r(et, { onClick: o })
            ),
            r(
                Ie,
                { className: "vc-settings-modal-content" },
                r(
                    "section",
                    null,
                    r(
                        oe,
                        { className: Y2("info") },
                        r(N.FormText, { className: Y2("description") }, e.description),
                        !y.userPlugin &&
                            r(
                                "div",
                                { className: "vc-settings-modal-links" },
                                r(zu, { text: "View more info", href: `https://vencord.dev/plugins/${e.name}` }),
                                r(Wu, {
                                    text: "View source code",
                                    href: `https://github.com/${ji}/tree/main/src/plugins/${y.folderName}`,
                                })
                            )
                    ),
                    r(H, { variant: "heading-lg/semibold", className: L(O.top8, O.bottom8) }, "Authors"),
                    r(
                        "div",
                        { style: { width: "fit-content" } },
                        r(
                            C,
                            { noop: !0 },
                            r(fr, {
                                users: u.length ? u : c,
                                guildId: void 0,
                                renderIcon: !1,
                                max: 6,
                                showDefaultAvatarsForNullUsers: !0,
                                renderMoreUsers: h,
                                renderUser: (b) =>
                                    r(
                                        yo,
                                        { className: E1.clickableAvatar, onClick: () => Yn(b) },
                                        r("img", {
                                            className: E1.avatar,
                                            src: b.getAvatarURL(void 0, 80, !0),
                                            alt: b.username,
                                            title: b.username,
                                        })
                                    ),
                            })
                        )
                    )
                ),
                !!e.settingsAboutComponent &&
                    r(
                        "div",
                        { className: O.top16 },
                        r(
                            "section",
                            null,
                            r(
                                C,
                                { message: "An error occurred while rendering this plugin's custom Info Component" },
                                r(e.settingsAboutComponent, null)
                            )
                        )
                    ),
                r(
                    "section",
                    null,
                    r(H, { variant: "heading-lg/semibold", className: L(O.top16, O.bottom8) }, "Settings"),
                    m()
                )
            )
        );
    }
    function wr(e, t) {
        fe((o) => r(Z2, { ...o, plugin: e, onRestartNeeded: (n) => t?.(e.name, n) }));
    }
    function Kl({ plugin: e, disabled: t, onRestartNeeded: o, onMouseEnter: n, onMouseLeave: i, isNew: s }) {
        let c = W.plugins[e.name],
            u = () => ke(e.name);
        function p() {
            let m = u();
            if (!m) {
                let { restartNeeded: y, failures: b } = Gu(e);
                if (b.length) {
                    Q2.error(`Failed to start dependencies for ${e.name}: ${b.join(", ")}`),
                        fn("Failed to start dependencies: " + b.join(", "), "Close", () => null);
                    return;
                }
                if (y) {
                    (c.enabled = !0), o(e.name, "enabled");
                    return;
                }
            }
            if ($u(e)) {
                (c.enabled = !m), o(e.name, "enabled");
                return;
            }
            if (m && !e.started) {
                c.enabled = !m;
                return;
            }
            if (!(m ? R1(e) : zl(e))) {
                c.enabled = !1;
                let y = `Error while ${m ? "stopping" : "starting"} plugin ${e.name}`;
                Ge(y, J.Type.FAILURE, { position: J.Position.BOTTOM });
                return;
            }
            c.enabled = !m;
        }
        return r(Hu, {
            name: e.name,
            description: e.description,
            isNew: s,
            enabled: u(),
            setEnabled: p,
            disabled: t,
            onMouseEnter: n,
            onMouseLeave: i,
            infoButton: r(
                "button",
                { role: "switch", onClick: () => wr(e, o), className: Ir("info-button") },
                e.options && !di(e.options)
                    ? r(Fa, { className: Ir("info-icon") })
                    : r(Ba, { className: Ir("info-icon") })
            ),
        });
    }
    a();
    l();
    Vr();
    Ue();
    Yo();
    gi();
    Pe();
    re();
    Oe();
    S();
    var Ki = Y("vc-plugin-ui-elements-");
    function J2() {
        return r(
            yo,
            { onClick: () => fe((e) => r(SI, { ...e })) },
            r(
                mt,
                { className: Ki("button"), defaultPadding: !0 },
                r(
                    "div",
                    { className: Ki("button-description") },
                    r(Me, { size: "md", weight: "semibold" }, "Manage plugin UI elements"),
                    r(Me, { size: "xs" }, "Allows you to hide buttons you don't like")
                ),
                r(
                    "svg",
                    { className: Ki("button-arrow"), "aria-hidden": "true", viewBox: "0 0 24 24" },
                    r("path", {
                        fill: "currentColor",
                        d: "M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z",
                    })
                )
            )
        );
    }
    function X2(e) {
        let { buttonMap: t, description: o, title: n, settings: i } = e,
            s = Array.from(t, ([c, { icon: u }]) => {
                let p = u ?? Ha;
                return r(
                    Me,
                    { size: "md", weight: "semibold", key: c, className: Ki("switches-row") },
                    r(p, { height: 20, width: 20 }),
                    c,
                    r(tn, {
                        checked: i[c]?.enabled ?? !0,
                        onChange: (m) => {
                            (i[c] ??= {}), (i[c].enabled = m);
                        },
                    })
                );
            });
        return r(
            "section",
            null,
            r(qo, { tag: "h3", size: "xl", weight: "bold" }, n),
            r(Me, { size: "sm", className: L(O.top8, O.bottom20) }, o),
            r(
                "div",
                { className: Ki("switches") },
                s.length === 0 &&
                    r(
                        Me,
                        { weight: "medium", className: Ki("switches-row"), style: { color: "var(--text-muted)" } },
                        "Buttons of enabled plugins will appear here."
                    ),
                s
            )
        );
    }
    function SI(e) {
        let { uiElements: t } = Ee(["uiElements.*"]);
        return r(
            ve,
            { ...e, size: "medium" },
            r(
                Ie,
                { className: Ki("modal-content") },
                r(X2, {
                    title: "Chatbar Buttons",
                    description: "These are the buttons on the right side of the chat input bar",
                    buttonMap: Di,
                    settings: t.chatBarButtons,
                }),
                r(X2, {
                    title: "Message Popover Buttons",
                    description: "These are the floating buttons on the right when you hover over a message",
                    buttonMap: Hs,
                    settings: t.messagePopoverButtons,
                })
            )
        );
    }
    var Ir = Y("vc-plugins-"),
        Q2 = new U("PluginSettings", "#a6d189");
    function xI({ required: e }) {
        return r(
            mt,
            { variant: e ? "warning" : "normal", className: Ir("info-card") },
            e
                ? r(
                      f,
                      null,
                      r(Br, null, "Restart required!"),
                      r(Me, { className: Ir("dep-text") }, "Restart now to apply new plugins and their settings"),
                      r(F, { onClick: () => location.reload(), className: Ir("restart-button") }, "Restart")
                  )
                : r(
                      f,
                      null,
                      r(Br, null, "Plugin Management"),
                      r(Me, null, "Press the cog wheel or info icon to get more info on a plugin"),
                      r(Me, null, "Plugins with a cog wheel have settings you can modify!")
                  )
        );
    }
    function TI({ search: e }) {
        let t = e ? Object.entries(V2).filter(([n]) => n.toLowerCase().includes(e)) : [],
            o = {
                desktop: "Discord Desktop app or Vesktop",
                discordDesktop: "Discord Desktop app",
                vesktop: "Vesktop app",
                web: "Vesktop app and the Web version of Discord",
                dev: "Developer version of Vencord",
            };
        return r(
            Me,
            { className: O.top16 },
            t.length
                ? r(
                      f,
                      null,
                      r(Me, null, "Are you looking for:"),
                      r(
                          "ul",
                          null,
                          t.map(([n, i]) => r("li", { key: n }, r("b", null, n), ": Only available on the ", o[i]))
                      )
                  )
                : "No plugins meet the search criteria."
        );
    }
    function wI() {
        let e = Ee(),
            t = ce(() => new jl(), []);
        fh(() => {
            t.hasChanges &&
                Qe.show({
                    title: "Restart required",
                    body: r(
                        f,
                        null,
                        r("p", null, "The following plugins require a restart:"),
                        r(
                            "div",
                            null,
                            t.map((I, D) => r(f, null, D > 0 && ", ", Ne.parse("`" + I.split(".")[0] + "`")))
                        )
                    ),
                    confirmText: "Restart now",
                    cancelText: "Later!",
                    onConfirm: () => location.reload(),
                });
        }, []);
        let o = ce(() => {
                let I = {};
                for (let D in $e) {
                    let A = $e[D].dependencies;
                    if (A) for (let E of A) (I[E] ??= []), I[E].push(D);
                }
                return I;
            }, []),
            n = ce(() => Object.values($e).sort((I, D) => I.name.localeCompare(D.name)), []),
            i = ce(() => !1, []),
            [s, c] = k({ value: "", status: 0 }),
            u = s.value.toLowerCase(),
            p = (I) => c((D) => ({ ...D, value: I })),
            m = (I) => c((D) => ({ ...D, status: I })),
            h = (I) => {
                let { status: D } = s,
                    A = ke(I.name);
                switch (D) {
                    case 2:
                        if (A) return !1;
                        break;
                    case 1:
                        if (!A) return !1;
                        break;
                    case 3:
                        if (!y?.includes(I.name)) return !1;
                        break;
                    case 4:
                        if (!Zn[I.name]?.userPlugin) return !1;
                        break;
                    case 5:
                        if (!I.name.endsWith("API")) return !1;
                        break;
                }
                return u.length
                    ? I.name.toLowerCase().includes(u) ||
                          I.description.toLowerCase().includes(u) ||
                          I.tags?.some((E) => E.toLowerCase().includes(u))
                    : !0;
            },
            [y] = _t(() =>
                wt("Vencord_existingPlugins").then((I) => {
                    let D = Date.now() / 1e3,
                        A = {},
                        E = Object.values(n).map((z) => z.name),
                        q = [];
                    for (let { name: z } of n) (A[z] = I?.[z] ?? D) + 3600 * 24 * 2 > D && q.push(z);
                    return It("Vencord_existingPlugins", A), Pi.isEqual(q, E) ? [] : q;
                })
            ),
            b = [],
            x = [],
            P = s.status === 5;
        for (let I of n) {
            if (I.hidden || (!I.options && I.name.endsWith("API") && !P) || !h(I)) continue;
            if (I.required || I.isDependency || o[I.name]?.some((A) => e.plugins[A].enabled)) {
                let A =
                    I.required || !o[I.name]
                        ? "This plugin is required for Vencord to function."
                        : II(o[I.name]?.filter((E) => e.plugins[E].enabled));
                x.push(
                    r(V, { text: A, key: I.name }, ({ onMouseLeave: E, onMouseEnter: q }) =>
                        r(Kl, {
                            onMouseLeave: E,
                            onMouseEnter: q,
                            onRestartNeeded: (z, K) => t.handleChange(`${z}.${K}`),
                            disabled: !0,
                            plugin: I,
                            key: I.name,
                        })
                    )
                );
            } else
                b.push(
                    r(Kl, {
                        onRestartNeeded: (A, E) => t.handleChange(`${A}.${E}`),
                        disabled: !1,
                        plugin: I,
                        isNew: y?.includes(I.name),
                        key: I.name,
                    })
                );
        }
        return r(
            $o,
            null,
            r(xI, { required: t.hasChanges }),
            r(J2, null),
            r(Br, { className: L(O.top20, O.bottom8) }, "Filters"),
            r(
                "div",
                { className: L(O.bottom20, Ir("filter-controls")) },
                r(
                    C,
                    { noop: !0 },
                    r(ht, { autoFocus: !0, value: s.value, placeholder: "Search for a plugin...", onChange: p })
                ),
                r(
                    "div",
                    null,
                    r(
                        C,
                        { noop: !0 },
                        r(ro, {
                            options: [
                                { label: "Show All", value: 0, default: !0 },
                                { label: "Show Enabled", value: 1 },
                                { label: "Show Disabled", value: 2 },
                                { label: "Show New", value: 3 },
                                i && { label: "Show UserPlugins", value: 4 },
                                { label: "Show API Plugins", value: 5 },
                            ].filter(qn),
                            serialize: String,
                            select: m,
                            isSelected: (I) => I === s.status,
                            closeOnSelect: !0,
                        })
                    )
                )
            ),
            r(Br, { className: O.top20 }, "Plugins"),
            b.length || x.length
                ? r(
                      "div",
                      { className: Ir("grid") },
                      b.length ? b : r(Me, null, "No plugins meet the search criteria.")
                  )
                : r(TI, { search: u }),
            r(Fe, { className: O.top20 }),
            r(Br, { className: L(O.top20, O.bottom8) }, "Required Plugins"),
            r("div", { className: Ir("grid") }, x.length ? x : r(Me, null, "No plugins meet the search criteria."))
        );
    }
    function II(e) {
        return r(
            f,
            null,
            r(Me, null, "This plugin is required by:"),
            e.map((t) => r(Me, { key: t, className: Ir("dep-text") }, t))
        );
    }
    var qs = Vo(wI, "Plugins");
    a();
    l();
    a();
    l();
    le();
    S();
    var eb = (e, t) => J.show({ type: e, message: t, id: J.genId() }),
        PI = () => eb(J.Type.SUCCESS, "Settings successfully imported. Restart to apply changes!"),
        MI = (e) => eb(J.Type.FAILURE, `Failed to import settings: ${String(e)}`),
        CI = new U("SettingsSync:Offline", "#39b7e0");
    function tb(e) {
        if (e == null || typeof e != "object") return !0;
        for (let t in e) if (["__proto__", "constructor", "prototype"].includes(t) || !tb(e[t])) return !1;
        return !0;
    }
    async function U1(e) {
        try {
            var t = JSON.parse(e);
        } catch (o) {
            throw (console.log(e), new Error("Failed to parse JSON: " + String(o)));
        }
        if (!tb(t)) throw new Error("Unsafe Settings");
        if ("settings" in t && "quickCss" in t)
            Object.assign(vr, t.settings),
                await VencordNative.settings.set(t.settings),
                await VencordNative.quickCss.set(t.quickCss);
        else throw new Error("Invalid Settings. Is this even a Vencord Settings file?");
    }
    async function F1({ minify: e } = {}) {
        let t = VencordNative.settings.get(),
            o = await VencordNative.quickCss.get();
        return JSON.stringify({ settings: t, quickCss: o }, null, e ? void 0 : 4);
    }
    async function ob() {
        let e = `vencord-settings-backup-${Ls().format("YYYY-MM-DD")}.json`,
            t = await F1(),
            o = new TextEncoder().encode(t);
        Vc(new File([o], e, { type: "application/json" }));
    }
    async function rb(e = !0) {
        {
            let t = await eu("application/json");
            if (!t) return;
            let o = new FileReader();
            (o.onload = async () => {
                try {
                    await U1(o.result), e && PI();
                } catch (n) {
                    CI.error(n), e && MI(n);
                }
            }),
                o.readAsText(t);
        }
    }
    Ur();
    Yo();
    S();
    function NI() {
        return r(
            $o,
            null,
            r(
                oe,
                { flexDirection: "column", gap: "0.5em" },
                r(
                    mt,
                    { variant: "warning" },
                    r(Xt, { tag: "h4" }, "Warning"),
                    r(Me, null, "Importing a settings file will overwrite your current settings.")
                ),
                r(
                    H,
                    { variant: "text-md/normal", className: O.bottom8 },
                    "You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."
                ),
                r(Xt, { tag: "h4" }, "Settings Export contains:"),
                r(
                    H,
                    { variant: "text-md/normal", className: O.bottom8 },
                    r(
                        "ul",
                        null,
                        r("li", null, "\u2014 Custom QuickCSS"),
                        r("li", null, "\u2014 Theme Links"),
                        r("li", null, "\u2014 Plugin Settings")
                    )
                ),
                r(oe, null, r(F, { onClick: () => rb() }, "Import Settings"), r(F, { onClick: ob }, "Export Settings"))
            )
        );
    }
    var ju = Vo(NI, "Backup & Restore");
    a();
    l();
    a();
    l();
    var H1 = {};
    Ke(H1, { requestPermission: () => cb, showNotification: () => He });
    a();
    l();
    a();
    l();
    a();
    l();
    var xo = class {
        constructor(t = 1 / 0) {
            this.maxSize = t;
        }
        queue = [];
        promise;
        next() {
            let t = this.queue.shift();
            t
                ? (this.promise = Promise.resolve()
                      .then(t)
                      .finally(() => this.next()))
                : (this.promise = void 0);
        }
        run() {
            this.promise || this.next();
        }
        push(t) {
            this.size >= this.maxSize && this.queue.shift(), this.queue.push(t), this.run();
        }
        unshift(t) {
            this.size >= this.maxSize && this.queue.pop(), this.queue.unshift(t), this.run();
        }
        get size() {
            return this.queue.length;
        }
    };
    S();
    a();
    l();
    re();
    S();
    var qu = C.wrap(
        function ({
            title: t,
            body: o,
            richBody: n,
            color: i,
            icon: s,
            onClick: c,
            onClose: u,
            image: p,
            permanent: m,
            className: h,
            dismissOnClick: y,
        }) {
            let { timeout: b, position: x } = Ee(["notifications.timeout", "notifications.position"]).notifications,
                P = ie([Hr], () => Hr.isFocused()),
                [I, D] = k(!1),
                [A, E] = k(0),
                q = ce(() => Date.now(), [b, I, P]);
            te(() => {
                if (I || !P || b === 0 || m) return void E(0);
                let K = setInterval(() => {
                    let ue = Date.now() - q;
                    ue >= b ? u() : E(ue);
                }, 10);
                return () => clearInterval(K);
            }, [b, I, P]);
            let z = A / b;
            return r(
                "button",
                {
                    className: L("vc-notification-root", h),
                    style: x === "bottom-right" ? { bottom: "1rem" } : { top: "3rem" },
                    onClick: () => {
                        c?.(), y !== !1 && u();
                    },
                    onContextMenu: (K) => {
                        K.preventDefault(), K.stopPropagation(), u();
                    },
                    onMouseEnter: () => D(!0),
                    onMouseLeave: () => D(!1),
                },
                r(
                    "div",
                    { className: "vc-notification" },
                    s && r("img", { className: "vc-notification-icon", src: s, alt: "" }),
                    r(
                        "div",
                        { className: "vc-notification-content" },
                        r(
                            "div",
                            { className: "vc-notification-header" },
                            r("h2", { className: "vc-notification-title" }, t),
                            r(
                                "button",
                                {
                                    className: "vc-notification-close-btn",
                                    onClick: (K) => {
                                        K.preventDefault(), K.stopPropagation(), u();
                                    },
                                },
                                r(
                                    "svg",
                                    {
                                        width: "24",
                                        height: "24",
                                        viewBox: "0 0 24 24",
                                        role: "img",
                                        "aria-labelledby": "vc-notification-dismiss-title",
                                    },
                                    r("title", { id: "vc-notification-dismiss-title" }, "Dismiss Notification"),
                                    r("path", {
                                        fill: "currentColor",
                                        d: "M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z",
                                    })
                                )
                            )
                        ),
                        n ?? r("p", { className: "vc-notification-p" }, o)
                    )
                ),
                p && r("img", { className: "vc-notification-img", src: p, alt: "" }),
                b !== 0 &&
                    !m &&
                    r("div", {
                        className: "vc-notification-progressbar",
                        style: { width: `${(1 - z) * 100}%`, backgroundColor: i || "var(--brand-500)" },
                    })
            );
        },
        { onError: ({ props: e }) => e.onClose() }
    );
    a();
    l();
    a();
    l();
    re();
    Oe();
    S();
    function nb() {
        return r(
            "section",
            { className: O.top16 },
            r(N.FormTitle, { tag: "h5" }, "Notifications"),
            r(
                N.FormText,
                { className: O.bottom8 },
                "Settings for Notifications sent by Vencord. This does NOT include Discord notifications (messages, etc)"
            ),
            r(oe, null, r(F, { onClick: $1 }, "Notification Settings"), r(F, { onClick: Ks }, "View Notification Log"))
        );
    }
    function $1() {
        fe((e) =>
            r(
                ve,
                { ...e, size: "medium" },
                r(
                    Re,
                    null,
                    r(H, { variant: "heading-lg/semibold", style: { flexGrow: 1 } }, "Notification Settings"),
                    r(et, { onClick: e.onClose })
                ),
                r(Ie, null, r(AI, null))
            )
        );
    }
    function AI() {
        let e = Ee(["notifications.*"]).notifications;
        return r(
            "div",
            { style: { padding: "1em 0" } },
            r(N.FormTitle, { tag: "h5" }, "Notification Style"),
            e.useNative !== "never" &&
                Notification?.permission === "denied" &&
                r(
                    eo,
                    { style: { padding: "1em" }, className: O.bottom8 },
                    r(N.FormTitle, { tag: "h5" }, "Desktop Notification Permission denied"),
                    r(
                        N.FormText,
                        null,
                        "You have denied Notification Permissions. Thus, Desktop notifications will not work!"
                    )
                ),
            r(
                N.FormText,
                { className: O.bottom8 },
                "Some plugins may show you notifications. These come in two styles:",
                r(
                    "ul",
                    null,
                    r("li", null, r("strong", null, "Vencord Notifications"), ": These are in-app notifications"),
                    r(
                        "li",
                        null,
                        r("strong", null, "Desktop Notifications"),
                        ": Native Desktop notifications (like when you get a ping)"
                    )
                )
            ),
            r(ro, {
                placeholder: "Notification Style",
                options: [
                    {
                        label: "Only use Desktop notifications when Discord is not focused",
                        value: "not-focused",
                        default: !0,
                    },
                    { label: "Always use Desktop notifications", value: "always" },
                    { label: "Always use Vencord notifications", value: "never" },
                ],
                closeOnSelect: !0,
                select: (t) => (e.useNative = t),
                isSelected: (t) => t === e.useNative,
                serialize: ds,
            }),
            r(N.FormTitle, { tag: "h5", className: O.top16 + " " + O.bottom8 }, "Notification Position"),
            r(ro, {
                isDisabled: e.useNative === "always",
                placeholder: "Notification Position",
                options: [
                    { label: "Bottom Right", value: "bottom-right", default: !0 },
                    { label: "Top Right", value: "top-right" },
                ],
                select: (t) => (e.position = t),
                isSelected: (t) => t === e.position,
                serialize: ds,
            }),
            r(N.FormTitle, { tag: "h5", className: O.top16 + " " + O.bottom8 }, "Notification Timeout"),
            r(N.FormText, { className: O.bottom16 }, "Set to 0s to never automatically time out"),
            r(Dn, {
                disabled: e.useNative === "always",
                markers: [0, 1e3, 2500, 5e3, 1e4, 2e4],
                minValue: 0,
                maxValue: 2e4,
                initialValue: e.timeout,
                onValueChange: (t) => (e.timeout = t),
                onValueRender: (t) => (t / 1e3).toFixed(2) + "s",
                onMarkerRender: (t) => t / 1e3 + "s",
                stickToMarkers: !1,
            }),
            r(N.FormTitle, { tag: "h5", className: O.top16 + " " + O.bottom8 }, "Notification Log Limit"),
            r(
                N.FormText,
                { className: O.bottom16 },
                "The amount of notifications to save in the log until old ones are removed. Set to ",
                r("code", null, "0"),
                " to disable Notification log and ",
                r("code", null, "\u221E"),
                " to never automatically remove old Notifications"
            ),
            r(Dn, {
                markers: [0, 25, 50, 75, 100, 200],
                minValue: 0,
                maxValue: 200,
                stickToMarkers: !0,
                initialValue: e.logLimit,
                onValueChange: (t) => (e.logLimit = t),
                onValueRender: (t) => (t === 200 ? "\u221E" : t),
                onMarkerRender: (t) => (t === 200 ? "\u221E" : t),
            })
        );
    }
    Pe();
    Oe();
    pt();
    S();
    a();
    l();
    a();
    l();
    var ib = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
    var sb = (e = 21) => {
        let t = "",
            o = crypto.getRandomValues(new Uint8Array((e |= 0)));
        for (; e--; ) t += ib[o[e] & 63];
        return t;
    };
    var Ku = "notification-log",
        ab = async () => (await wt(Ku)) ?? [],
        Qn = Y("vc-notification-log-"),
        Yl = new Set();
    async function lb(e) {
        if (e.noPersist) return;
        let t = W.notifications.logLimit;
        t !== 0 &&
            (await jo(Ku, (o) => {
                let n = o ?? [],
                    { onClick: i, onClose: s, richBody: c, permanent: u, noPersist: p, dismissOnClick: m, ...h } = e;
                return (
                    n.unshift({ ...h, timestamp: Date.now(), id: sb() }), n.length > t && t !== 200 && (n.length = t), n
                );
            }),
            Yl.forEach((o) => o()));
    }
    async function RI(e) {
        let t = await ab(),
            o = t.findIndex((n) => n.timestamp === e);
        o !== -1 && (t.splice(o, 1), await It(Ku, t), Yl.forEach((n) => n()));
    }
    function kI() {
        let [e, t] = ws((s) => s + 1, 0);
        te(() => (Yl.add(t), () => void Yl.delete(t)), []);
        let [o, n, i] = _t(ab, { fallbackValue: [], deps: [e] });
        return [o, i];
    }
    function DI({ data: e }) {
        let [t, o] = k(!1);
        return r(
            "div",
            { className: Qn("wrapper", { removing: t }) },
            r(qu, {
                ...e,
                permanent: !0,
                dismissOnClick: !1,
                onClose: () => {
                    t || (o(!0), setTimeout(() => RI(e.timestamp), 200));
                },
                richBody: r(
                    "div",
                    { className: Qn("body-wrapper") },
                    r("div", { className: Qn("body") }, e.body),
                    r(Vt, { timestamp: new Date(e.timestamp), className: Qn("timestamp") })
                ),
            })
        );
    }
    function LI({ log: e, pending: t }) {
        return !e.length && !t
            ? r(
                  "div",
                  { className: Qn("container") },
                  r("div", { className: Qn("empty") }),
                  r(N.FormText, { style: { textAlign: "center" } }, "No notifications yet")
              )
            : r(bh, {
                  className: Qn("container"),
                  sections: [e.length],
                  sectionHeight: 0,
                  rowHeight: 120,
                  renderSection: () => null,
                  renderRow: (o) => r(DI, { data: e[o.row], key: e[o.row].id }),
              });
    }
    function OI({ modalProps: e, close: t }) {
        let [o, n] = kI();
        return r(
            ve,
            { ...e, size: "large", className: Qn("modal") },
            r(
                Re,
                null,
                r(H, { variant: "heading-lg/semibold", style: { flexGrow: 1 } }, "Notification Log"),
                r(et, { onClick: t })
            ),
            r("div", { style: { width: "100%" } }, r(LI, { log: o, pending: n })),
            r(
                St,
                null,
                r(
                    oe,
                    null,
                    r(F, { onClick: $1 }, "Notification Settings"),
                    r(
                        F,
                        {
                            disabled: o.length === 0,
                            color: F.Colors.RED,
                            onClick: () => {
                                Qe.show({
                                    title: "Are you sure?",
                                    body: `This will permanently remove ${o.length} notification${o.length === 1 ? "" : "s"}. This action cannot be undone.`,
                                    async onConfirm() {
                                        await It(Ku, []), Yl.forEach((i) => i());
                                    },
                                    confirmText: "Do it!",
                                    confirmColor: "vc-notification-log-danger-btn",
                                    cancelText: "Nevermind",
                                });
                            },
                        },
                        "Clear Notification Log"
                    )
                )
            )
        );
    }
    function Ks() {
        let e = fe((t) => r(OI, { modalProps: t, close: () => un(e) }));
    }
    var _I = new xo(),
        G1,
        EI = 42;
    function BI() {
        if (!G1) {
            let e = document.createElement("div");
            (e.id = "vc-notification-container"), document.body.append(e), (G1 = Ii(e));
        }
        return G1;
    }
    function UI(e, t) {
        let o = BI();
        return new Promise((n) => {
            o.render(
                r(qu, {
                    key: t,
                    ...e,
                    onClose: () => {
                        e.onClose?.(), o.render(null), n();
                    },
                })
            );
        });
    }
    function FI() {
        if (typeof Notification > "u") return !1;
        let { useNative: e } = W.notifications;
        return e === "always" ? !0 : e === "not-focused" ? !document.hasFocus() : !1;
    }
    async function cb() {
        return (
            Notification.permission === "granted" ||
            (Notification.permission !== "denied" && (await Notification.requestPermission()) === "granted")
        );
    }
    async function He(e) {
        if ((lb(e), FI() && (await cb()))) {
            let { title: t, body: o, icon: n, image: i, onClick: s = null, onClose: c = null } = e,
                u = new Notification(t, { body: o, icon: n, image: i });
            (u.onclick = s), (u.onclose = c);
        } else _I.push(() => UI(e, EI++));
    }
    le();
    Oe();
    S();
    var ub = new U("SettingsSync:CloudSetup", "#39b7e0"),
        Xn = () => new URL(W.cloud.url),
        z1 = () => Xn().origin;
    async function Ys() {
        return !0;
    }
    var Zl = () => {
        let e = R.getCurrentUser()?.id;
        if (!e) throw new Error("User not yet logged in");
        return e;
    };
    async function pb() {
        let e = (await wt("Vencord_cloudSecret")) ?? {},
            t = z1();
        return e[t]
            ? (await jo("Vencord_cloudSecret", (o) => ((o ??= {}), (o[`${t}:${Zl()}`] = o[t]), delete o[t], o)), e[t])
            : e[`${t}:${Zl()}`];
    }
    async function $I(e) {
        await jo("Vencord_cloudSecret", (t) => ((t ??= {}), (t[`${z1()}:${Zl()}`] = e), t));
    }
    async function Ql() {
        await jo("Vencord_cloudSecret", (e) => ((e ??= {}), delete e[`${z1()}:${Zl()}`], e));
    }
    async function W1() {
        if ((await pb()) !== void 0) {
            W.cloud.authenticated = !0;
            return;
        }
        if (await Ys()) {
            try {
                let o = await g(new URL("/v1/oauth/settings", Xn()));
                var { clientId: e, redirectUri: t } = await o.json();
            } catch {
                He({ title: "Cloud Integration", body: "Setup failed (couldn't retrieve OAuth configuration)." }),
                    (W.cloud.authenticated = !1);
                return;
            }
            fe((o) =>
                r(wi, {
                    ...o,
                    scopes: ["identify"],
                    responseType: "code",
                    redirectUri: t,
                    permissions: 0n,
                    clientId: e,
                    cancelCompletesFlow: !1,
                    callback: async ({ location: n }) => {
                        if (!n) {
                            W.cloud.authenticated = !1;
                            return;
                        }
                        try {
                            let i = await g(n, { headers: { Accept: "application/json" } }),
                                { secret: s } = await i.json();
                            s
                                ? (ub.info("Authorized with secret"),
                                  await $I(s),
                                  He({ title: "Cloud Integration", body: "Cloud integrations enabled!" }),
                                  (W.cloud.authenticated = !0))
                                : (He({ title: "Cloud Integration", body: "Setup failed (no secret returned?)." }),
                                  (W.cloud.authenticated = !1));
                        } catch (i) {
                            ub.error("Failed to authorize", i),
                                He({ title: "Cloud Integration", body: `Setup failed (${i.toString()}).` }),
                                (W.cloud.authenticated = !1);
                        }
                    },
                })
            );
        }
    }
    async function Xl() {
        let e = await pb();
        return unsafeWindow.btoa(`${e}:${Zl()}`);
    }
    a();
    l();
    le();
    a();
    l();
    var co = Uint8Array,
        zo = Uint16Array,
        J1 = Int32Array,
        Yu = new co([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]),
        Zu = new co([
            0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0,
        ]),
        Y1 = new co([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
        gb = function (e, t) {
            for (var o = new zo(31), n = 0; n < 31; ++n) o[n] = t += 1 << e[n - 1];
            for (var i = new J1(o[30]), n = 1; n < 30; ++n)
                for (var s = o[n]; s < o[n + 1]; ++s) i[s] = ((s - o[n]) << 5) | n;
            return { b: o, r: i };
        },
        hb = gb(Yu, 2),
        yb = hb.b,
        Z1 = hb.r;
    (yb[28] = 258), (Z1[258] = 28);
    var vb = gb(Zu, 0),
        GI = vb.b,
        db = vb.r,
        Q1 = new zo(32768);
    for (ze = 0; ze < 32768; ++ze)
        (gn = ((ze & 43690) >> 1) | ((ze & 21845) << 1)),
            (gn = ((gn & 52428) >> 2) | ((gn & 13107) << 2)),
            (gn = ((gn & 61680) >> 4) | ((gn & 3855) << 4)),
            (Q1[ze] = (((gn & 65280) >> 8) | ((gn & 255) << 8)) >> 1);
    var gn,
        ze,
        Yr = function (e, t, o) {
            for (var n = e.length, i = 0, s = new zo(t); i < n; ++i) e[i] && ++s[e[i] - 1];
            var c = new zo(t);
            for (i = 1; i < t; ++i) c[i] = (c[i - 1] + s[i - 1]) << 1;
            var u;
            if (o) {
                u = new zo(1 << t);
                var p = 15 - t;
                for (i = 0; i < n; ++i)
                    if (e[i])
                        for (
                            var m = (i << 4) | e[i], h = t - e[i], y = c[e[i] - 1]++ << h, b = y | ((1 << h) - 1);
                            y <= b;
                            ++y
                        )
                            u[Q1[y] >> p] = m;
            } else for (u = new zo(n), i = 0; i < n; ++i) e[i] && (u[i] = Q1[c[e[i] - 1]++] >> (15 - e[i]));
            return u;
        },
        Jn = new co(288);
    for (ze = 0; ze < 144; ++ze) Jn[ze] = 8;
    var ze;
    for (ze = 144; ze < 256; ++ze) Jn[ze] = 9;
    var ze;
    for (ze = 256; ze < 280; ++ze) Jn[ze] = 7;
    var ze;
    for (ze = 280; ze < 288; ++ze) Jn[ze] = 8;
    var ze,
        ec = new co(32);
    for (ze = 0; ze < 32; ++ze) ec[ze] = 5;
    var ze,
        HI = Yr(Jn, 9, 0),
        zI = Yr(Jn, 9, 1),
        WI = Yr(ec, 5, 0),
        jI = Yr(ec, 5, 1),
        j1 = function (e) {
            for (var t = e[0], o = 1; o < e.length; ++o) e[o] > t && (t = e[o]);
            return t;
        },
        Pr = function (e, t, o) {
            var n = (t / 8) | 0;
            return ((e[n] | (e[n + 1] << 8)) >> (t & 7)) & o;
        },
        q1 = function (e, t) {
            var o = (t / 8) | 0;
            return (e[o] | (e[o + 1] << 8) | (e[o + 2] << 16)) >> (t & 7);
        },
        V1 = function (e) {
            return ((e + 7) / 8) | 0;
        },
        bb = function (e, t, o) {
            return (
                (t == null || t < 0) && (t = 0), (o == null || o > e.length) && (o = e.length), new co(e.subarray(t, o))
            );
        };
    var qI = [
            "unexpected EOF",
            "invalid block type",
            "invalid length/literal",
            "invalid distance",
            "stream finished",
            "no stream handler",
            ,
            "no callback",
            "invalid UTF-8 data",
            "extra field too long",
            "date not in range 1980-2099",
            "filename too long",
            "stream finishing",
            "invalid zip data",
        ],
        yn = function (e, t, o) {
            var n = new Error(t || qI[e]);
            if (((n.code = e), Error.captureStackTrace && Error.captureStackTrace(n, yn), !o)) throw n;
            return n;
        },
        KI = function (e, t, o, n) {
            var i = e.length,
                s = n ? n.length : 0;
            if (!i || (t.f && !t.l)) return o || new co(0);
            var c = !o,
                u = c || t.i != 2,
                p = t.i;
            c && (o = new co(i * 3));
            var m = function (Aa) {
                    var Ra = o.length;
                    if (Aa > Ra) {
                        var ps = new co(Math.max(Ra * 2, Aa));
                        ps.set(o), (o = ps);
                    }
                },
                h = t.f || 0,
                y = t.p || 0,
                b = t.b || 0,
                x = t.l,
                P = t.d,
                I = t.m,
                D = t.n,
                A = i * 8;
            do {
                if (!x) {
                    h = Pr(e, y, 1);
                    var E = Pr(e, y + 1, 3);
                    if (((y += 3), E))
                        if (E == 1) (x = zI), (P = jI), (I = 9), (D = 5);
                        else if (E == 2) {
                            var ue = Pr(e, y, 31) + 257,
                                j = Pr(e, y + 10, 15) + 4,
                                ne = ue + Pr(e, y + 5, 31) + 1;
                            y += 14;
                            for (var Q = new co(ne), qe = new co(19), ae = 0; ae < j; ++ae)
                                qe[Y1[ae]] = Pr(e, y + ae * 3, 7);
                            y += j * 3;
                            for (var be = j1(qe), fo = (1 << be) - 1, $t = Yr(qe, be, 1), ae = 0; ae < ne; ) {
                                var ot = $t[Pr(e, y, fo)];
                                y += ot & 15;
                                var q = ot >> 4;
                                if (q < 16) Q[ae++] = q;
                                else {
                                    var At = 0,
                                        Je = 0;
                                    for (
                                        q == 16
                                            ? ((Je = 3 + Pr(e, y, 3)), (y += 2), (At = Q[ae - 1]))
                                            : q == 17
                                              ? ((Je = 3 + Pr(e, y, 7)), (y += 3))
                                              : q == 18 && ((Je = 11 + Pr(e, y, 127)), (y += 7));
                                        Je--;

                                    )
                                        Q[ae++] = At;
                                }
                            }
                            var Yt = Q.subarray(0, ue),
                                zt = Q.subarray(ue);
                            (I = j1(Yt)), (D = j1(zt)), (x = Yr(Yt, I, 1)), (P = Yr(zt, D, 1));
                        } else yn(1);
                    else {
                        var q = V1(y) + 4,
                            z = e[q - 4] | (e[q - 3] << 8),
                            K = q + z;
                        if (K > i) {
                            p && yn(0);
                            break;
                        }
                        u && m(b + z), o.set(e.subarray(q, K), b), (t.b = b += z), (t.p = y = K * 8), (t.f = h);
                        continue;
                    }
                    if (y > A) {
                        p && yn(0);
                        break;
                    }
                }
                u && m(b + 131072);
                for (var ls = (1 << I) - 1, Wo = (1 << D) - 1, Jr = y; ; Jr = y) {
                    var At = x[q1(e, y) & ls],
                        Lo = At >> 4;
                    if (((y += At & 15), y > A)) {
                        p && yn(0);
                        break;
                    }
                    if ((At || yn(2), Lo < 256)) o[b++] = Lo;
                    else if (Lo == 256) {
                        (Jr = y), (x = null);
                        break;
                    } else {
                        var Oo = Lo - 254;
                        if (Lo > 264) {
                            var ae = Lo - 257,
                                Tt = Yu[ae];
                            (Oo = Pr(e, y, (1 << Tt) - 1) + yb[ae]), (y += Tt);
                        }
                        var _r = P[q1(e, y) & Wo],
                            cs = _r >> 4;
                        _r || yn(3), (y += _r & 15);
                        var zt = GI[cs];
                        if (cs > 3) {
                            var Tt = Zu[cs];
                            (zt += q1(e, y) & ((1 << Tt) - 1)), (y += Tt);
                        }
                        if (y > A) {
                            p && yn(0);
                            break;
                        }
                        u && m(b + 131072);
                        var us = b + Oo;
                        if (b < zt) {
                            var Zc = s - zt,
                                Qc = Math.min(zt, us);
                            for (Zc + b < 0 && yn(3); b < Qc; ++b) o[b] = n[Zc + b];
                        }
                        for (; b < us; ++b) o[b] = o[b - zt];
                    }
                }
                (t.l = x), (t.p = Jr), (t.b = b), (t.f = h), x && ((h = 1), (t.m = I), (t.d = P), (t.n = D));
            } while (!h);
            return b != o.length && c ? bb(o, 0, b) : o.subarray(0, b);
        },
        hn = function (e, t, o) {
            o <<= t & 7;
            var n = (t / 8) | 0;
            (e[n] |= o), (e[n + 1] |= o >> 8);
        },
        Jl = function (e, t, o) {
            o <<= t & 7;
            var n = (t / 8) | 0;
            (e[n] |= o), (e[n + 1] |= o >> 8), (e[n + 2] |= o >> 16);
        },
        K1 = function (e, t) {
            for (var o = [], n = 0; n < e.length; ++n) e[n] && o.push({ s: n, f: e[n] });
            var i = o.length,
                s = o.slice();
            if (!i) return { t: xb, l: 0 };
            if (i == 1) {
                var c = new co(o[0].s + 1);
                return (c[o[0].s] = 1), { t: c, l: 1 };
            }
            o.sort(function (K, ue) {
                return K.f - ue.f;
            }),
                o.push({ s: -1, f: 25001 });
            var u = o[0],
                p = o[1],
                m = 0,
                h = 1,
                y = 2;
            for (o[0] = { s: -1, f: u.f + p.f, l: u, r: p }; h != i - 1; )
                (u = o[o[m].f < o[y].f ? m++ : y++]),
                    (p = o[m != h && o[m].f < o[y].f ? m++ : y++]),
                    (o[h++] = { s: -1, f: u.f + p.f, l: u, r: p });
            for (var b = s[0].s, n = 1; n < i; ++n) s[n].s > b && (b = s[n].s);
            var x = new zo(b + 1),
                P = X1(o[h - 1], x, 0);
            if (P > t) {
                var n = 0,
                    I = 0,
                    D = P - t,
                    A = 1 << D;
                for (
                    s.sort(function (ue, j) {
                        return x[j.s] - x[ue.s] || ue.f - j.f;
                    });
                    n < i;
                    ++n
                ) {
                    var E = s[n].s;
                    if (x[E] > t) (I += A - (1 << (P - x[E]))), (x[E] = t);
                    else break;
                }
                for (I >>= D; I > 0; ) {
                    var q = s[n].s;
                    x[q] < t ? (I -= 1 << (t - x[q]++ - 1)) : ++n;
                }
                for (; n >= 0 && I; --n) {
                    var z = s[n].s;
                    x[z] == t && (--x[z], ++I);
                }
                P = t;
            }
            return { t: new co(x), l: P };
        },
        X1 = function (e, t, o) {
            return e.s == -1 ? Math.max(X1(e.l, t, o + 1), X1(e.r, t, o + 1)) : (t[e.s] = o);
        },
        mb = function (e) {
            for (var t = e.length; t && !e[--t]; );
            for (
                var o = new zo(++t),
                    n = 0,
                    i = e[0],
                    s = 1,
                    c = function (p) {
                        o[n++] = p;
                    },
                    u = 1;
                u <= t;
                ++u
            )
                if (e[u] == i && u != t) ++s;
                else {
                    if (!i && s > 2) {
                        for (; s > 138; s -= 138) c(32754);
                        s > 2 && (c(s > 10 ? ((s - 11) << 5) | 28690 : ((s - 3) << 5) | 12305), (s = 0));
                    } else if (s > 3) {
                        for (c(i), --s; s > 6; s -= 6) c(8304);
                        s > 2 && (c(((s - 3) << 5) | 8208), (s = 0));
                    }
                    for (; s--; ) c(i);
                    (s = 1), (i = e[u]);
                }
            return { c: o.subarray(0, n), n: t };
        },
        Vl = function (e, t) {
            for (var o = 0, n = 0; n < t.length; ++n) o += e[n] * t[n];
            return o;
        },
        Sb = function (e, t, o) {
            var n = o.length,
                i = V1(t + 2);
            (e[i] = n & 255), (e[i + 1] = n >> 8), (e[i + 2] = e[i] ^ 255), (e[i + 3] = e[i + 1] ^ 255);
            for (var s = 0; s < n; ++s) e[i + s + 4] = o[s];
            return (i + 4 + n) * 8;
        },
        fb = function (e, t, o, n, i, s, c, u, p, m, h) {
            hn(t, h++, o), ++i[256];
            for (
                var y = K1(i, 15),
                    b = y.t,
                    x = y.l,
                    P = K1(s, 15),
                    I = P.t,
                    D = P.l,
                    A = mb(b),
                    E = A.c,
                    q = A.n,
                    z = mb(I),
                    K = z.c,
                    ue = z.n,
                    j = new zo(19),
                    ne = 0;
                ne < E.length;
                ++ne
            )
                ++j[E[ne] & 31];
            for (var ne = 0; ne < K.length; ++ne) ++j[K[ne] & 31];
            for (var Q = K1(j, 7), qe = Q.t, ae = Q.l, be = 19; be > 4 && !qe[Y1[be - 1]]; --be);
            var fo = (m + 5) << 3,
                $t = Vl(i, Jn) + Vl(s, ec) + c,
                ot = Vl(i, b) + Vl(s, I) + c + 14 + 3 * be + Vl(j, qe) + 2 * j[16] + 3 * j[17] + 7 * j[18];
            if (p >= 0 && fo <= $t && fo <= ot) return Sb(t, h, e.subarray(p, p + m));
            var At, Je, Yt, zt;
            if ((hn(t, h, 1 + (ot < $t)), (h += 2), ot < $t)) {
                (At = Yr(b, x, 0)), (Je = b), (Yt = Yr(I, D, 0)), (zt = I);
                var ls = Yr(qe, ae, 0);
                hn(t, h, q - 257), hn(t, h + 5, ue - 1), hn(t, h + 10, be - 4), (h += 14);
                for (var ne = 0; ne < be; ++ne) hn(t, h + 3 * ne, qe[Y1[ne]]);
                h += 3 * be;
                for (var Wo = [E, K], Jr = 0; Jr < 2; ++Jr)
                    for (var Lo = Wo[Jr], ne = 0; ne < Lo.length; ++ne) {
                        var Oo = Lo[ne] & 31;
                        hn(t, h, ls[Oo]),
                            (h += qe[Oo]),
                            Oo > 15 && (hn(t, h, (Lo[ne] >> 5) & 127), (h += Lo[ne] >> 12));
                    }
            } else (At = HI), (Je = Jn), (Yt = WI), (zt = ec);
            for (var ne = 0; ne < u; ++ne) {
                var Tt = n[ne];
                if (Tt > 255) {
                    var Oo = (Tt >> 18) & 31;
                    Jl(t, h, At[Oo + 257]), (h += Je[Oo + 257]), Oo > 7 && (hn(t, h, (Tt >> 23) & 31), (h += Yu[Oo]));
                    var _r = Tt & 31;
                    Jl(t, h, Yt[_r]), (h += zt[_r]), _r > 3 && (Jl(t, h, (Tt >> 5) & 8191), (h += Zu[_r]));
                } else Jl(t, h, At[Tt]), (h += Je[Tt]);
            }
            return Jl(t, h, At[256]), h + Je[256];
        },
        YI = new J1([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]),
        xb = new co(0),
        ZI = function (e, t, o, n, i, s) {
            var c = s.z || e.length,
                u = new co(n + c + 5 * (1 + Math.ceil(c / 7e3)) + i),
                p = u.subarray(n, u.length - i),
                m = s.l,
                h = (s.r || 0) & 7;
            if (t) {
                h && (p[0] = s.r >> 3);
                for (
                    var y = YI[t - 1],
                        b = y >> 13,
                        x = y & 8191,
                        P = (1 << o) - 1,
                        I = s.p || new zo(32768),
                        D = s.h || new zo(P + 1),
                        A = Math.ceil(o / 3),
                        E = 2 * A,
                        q = function (Tg) {
                            return (e[Tg] ^ (e[Tg + 1] << A) ^ (e[Tg + 2] << E)) & P;
                        },
                        z = new J1(25e3),
                        K = new zo(288),
                        ue = new zo(32),
                        j = 0,
                        ne = 0,
                        Q = s.i || 0,
                        qe = 0,
                        ae = s.w || 0,
                        be = 0;
                    Q + 2 < c;
                    ++Q
                ) {
                    var fo = q(Q),
                        $t = Q & 32767,
                        ot = D[fo];
                    if (((I[$t] = ot), (D[fo] = $t), ae <= Q)) {
                        var At = c - Q;
                        if ((j > 7e3 || qe > 24576) && (At > 423 || !m)) {
                            (h = fb(e, p, 0, z, K, ue, ne, qe, be, Q - be, h)), (qe = j = ne = 0), (be = Q);
                            for (var Je = 0; Je < 286; ++Je) K[Je] = 0;
                            for (var Je = 0; Je < 30; ++Je) ue[Je] = 0;
                        }
                        var Yt = 2,
                            zt = 0,
                            ls = x,
                            Wo = ($t - ot) & 32767;
                        if (At > 2 && fo == q(Q - Wo))
                            for (
                                var Jr = Math.min(b, At) - 1, Lo = Math.min(32767, Q), Oo = Math.min(258, At);
                                Wo <= Lo && --ls && $t != ot;

                            ) {
                                if (e[Q + Yt] == e[Q + Yt - Wo]) {
                                    for (var Tt = 0; Tt < Oo && e[Q + Tt] == e[Q + Tt - Wo]; ++Tt);
                                    if (Tt > Yt) {
                                        if (((Yt = Tt), (zt = Wo), Tt > Jr)) break;
                                        for (var _r = Math.min(Wo, Tt - 2), cs = 0, Je = 0; Je < _r; ++Je) {
                                            var us = (Q - Wo + Je) & 32767,
                                                Zc = I[us],
                                                Qc = (us - Zc) & 32767;
                                            Qc > cs && ((cs = Qc), (ot = us));
                                        }
                                    }
                                }
                                ($t = ot), (ot = I[$t]), (Wo += ($t - ot) & 32767);
                            }
                        if (zt) {
                            z[qe++] = 268435456 | (Z1[Yt] << 18) | db[zt];
                            var Aa = Z1[Yt] & 31,
                                Ra = db[zt] & 31;
                            (ne += Yu[Aa] + Zu[Ra]), ++K[257 + Aa], ++ue[Ra], (ae = Q + Yt), ++j;
                        } else (z[qe++] = e[Q]), ++K[e[Q]];
                    }
                }
                for (Q = Math.max(Q, ae); Q < c; ++Q) (z[qe++] = e[Q]), ++K[e[Q]];
                (h = fb(e, p, m, z, K, ue, ne, qe, be, Q - be, h)),
                    m ||
                        ((s.r = (h & 7) | (p[(h / 8) | 0] << 3)),
                        (h -= 7),
                        (s.h = D),
                        (s.p = I),
                        (s.i = Q),
                        (s.w = ae));
            } else {
                for (var Q = s.w || 0; Q < c + m; Q += 65535) {
                    var ps = Q + 65535;
                    ps >= c && ((p[(h / 8) | 0] = m), (ps = c)), (h = Sb(p, h + 1, e.subarray(Q, ps)));
                }
                s.i = c;
            }
            return bb(u, 0, n + V1(h) + i);
        };
    var QI = function (e, t, o, n, i) {
        if (!i && ((i = { l: 1 }), t.dictionary)) {
            var s = t.dictionary.subarray(-32768),
                c = new co(s.length + e.length);
            c.set(s), c.set(e, s.length), (e = c), (i.w = s.length);
        }
        return ZI(
            e,
            t.level == null ? 6 : t.level,
            t.mem == null ? (i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20) : 12 + t.mem,
            o,
            n,
            i
        );
    };
    function Tb(e, t) {
        return QI(e, t || {}, 0, 0);
    }
    function wb(e, t) {
        return KI(e, { i: 2 }, t && t.out, t && t.dictionary);
    }
    var XI = typeof TextDecoder < "u" && new TextDecoder(),
        JI = 0;
    try {
        XI.decode(xb, { stream: !0 }), (JI = 1);
    } catch {}
    var rr = new U("SettingsSync:Cloud", "#39b7e0");
    function Qu(e) {
        let t = Zt.Vencord_cloudSyncDirection;
        return t === e || t === "both";
    }
    async function tc(e) {
        let t = await F1({ minify: !0 });
        if (await Ys())
            try {
                let o = await g(new URL("/v1/settings", Xn()), {
                    method: "PUT",
                    headers: { Authorization: await Xl(), "Content-Type": "application/octet-stream" },
                    body: Tb(new TextEncoder().encode(t)),
                });
                if (!o.ok) {
                    rr.error(`Failed to sync up, API returned ${o.status}`),
                        He({
                            title: "Cloud Settings",
                            body: `Could not synchronize settings to cloud (API returned ${o.status}).`,
                            color: "var(--red-360)",
                        });
                    return;
                }
                let { written: n } = await o.json();
                (vr.cloud.settingsSyncVersion = n),
                    VencordNative.settings.set(vr),
                    rr.info("Settings uploaded to cloud successfully"),
                    e && He({ title: "Cloud Settings", body: "Synchronized settings to the cloud!", noPersist: !0 }),
                    delete Zt.Vencord_settingsDirty;
            } catch (o) {
                rr.error("Failed to sync up", o),
                    He({
                        title: "Cloud Settings",
                        body: `Could not synchronize settings to the cloud (${o.toString()}).`,
                        color: "var(--red-360)",
                    });
            }
    }
    async function Xu(e = !0, t = !1) {
        if (await Ys())
            try {
                let o = await g(new URL("/v1/settings", Xn()), {
                    method: "GET",
                    headers: {
                        Authorization: await Xl(),
                        Accept: "application/octet-stream",
                        "If-None-Match": W.cloud.settingsSyncVersion.toString(),
                    },
                });
                if (o.status === 404)
                    return (
                        rr.info("No settings on the cloud"),
                        e &&
                            He({ title: "Cloud Settings", body: "There are no settings in the cloud.", noPersist: !0 }),
                        !1
                    );
                if (o.status === 304)
                    return (
                        rr.info("Settings up to date"),
                        e && He({ title: "Cloud Settings", body: "Your settings are up to date.", noPersist: !0 }),
                        !1
                    );
                if (!o.ok)
                    return (
                        rr.error(`Failed to sync down, API returned ${o.status}`),
                        He({
                            title: "Cloud Settings",
                            body: `Could not synchronize settings from the cloud (API returned ${o.status}).`,
                            color: "var(--red-360)",
                        }),
                        !1
                    );
                let n = Number(o.headers.get("etag")),
                    i = W.cloud.settingsSyncVersion;
                if (!t && n < i) {
                    e &&
                        He({
                            title: "Cloud Settings",
                            body: "Your local settings are newer than the cloud ones.",
                            noPersist: !0,
                        });
                    return;
                }
                let s = await o.arrayBuffer(),
                    c = new TextDecoder().decode(wb(new Uint8Array(s)));
                return (
                    await U1(c),
                    (vr.cloud.settingsSyncVersion = n),
                    VencordNative.settings.set(vr),
                    rr.info("Settings loaded from cloud successfully"),
                    e &&
                        He({
                            title: "Cloud Settings",
                            body: "Your settings have been updated! Click here to restart to fully apply changes!",
                            color: "var(--green-360)",
                            onClick: () => location.reload(),
                            noPersist: !0,
                        }),
                    delete Zt.Vencord_settingsDirty,
                    !0
                );
            } catch (o) {
                return (
                    rr.error("Failed to sync down", o),
                    He({
                        title: "Cloud Settings",
                        body: `Could not synchronize settings from the cloud (${o.toString()}).`,
                        color: "var(--red-360)",
                    }),
                    !1
                );
            }
    }
    async function Ib() {
        if (await Ys())
            try {
                let e = await g(new URL("/v1/settings", Xn()), {
                    method: "DELETE",
                    headers: { Authorization: await Xl() },
                });
                if (!e.ok) {
                    rr.error(`Failed to delete, API returned ${e.status}`),
                        He({
                            title: "Cloud Settings",
                            body: `Could not delete settings (API returned ${e.status}).`,
                            color: "var(--red-360)",
                        });
                    return;
                }
                rr.info("Settings deleted from cloud successfully"),
                    He({ title: "Cloud Settings", body: "Settings deleted from cloud!", color: "var(--green-360)" });
            } catch (e) {
                rr.error("Failed to delete", e),
                    He({
                        title: "Cloud Settings",
                        body: `Could not delete settings (${e.toString()}).`,
                        color: "var(--red-360)",
                    });
            }
    }
    async function Pb() {
        if (!(await Ys())) return;
        let e = await g(new URL("/v1/", Xn()), { method: "DELETE", headers: { Authorization: await Xl() } });
        if (!e.ok) {
            rr.error(`Failed to erase data, API returned ${e.status}`),
                He({
                    title: "Cloud Integrations",
                    body: `Could not erase all data (API returned ${e.status}), please contact support.`,
                    color: "var(--red-360)",
                });
            return;
        }
        (W.cloud.authenticated = !1),
            await Ql(),
            He({ title: "Cloud Integrations", body: "Successfully erased all data.", color: "var(--green-360)" });
    }
    Vr();
    lr();
    a();
    l();
    S();
    function oc({ value: e, onChange: t, validate: o }) {
        let [n, i] = xe.useState(e),
            [s, c] = xe.useState();
        function u(p) {
            i(p);
            let m = o(p);
            m === !0 ? (c(void 0), t(p)) : c(m);
        }
        return r(f, null, r(ht, { type: "text", value: n, onChange: u, error: s }));
    }
    Qt();
    Nn();
    a();
    l();
    function rc(e) {
        let t = {
            display: e.inline ? "inline-grid" : "grid",
            gridTemplateColumns: `repeat(${e.columns}, 1fr)`,
            gap: e.gap,
            ...e.style,
        };
        return r("div", { ...e, style: t }, e.children);
    }
    Ur();
    Ue();
    Wt();
    Yo();
    re();
    S();
    function VI(e) {
        try {
            return new URL(e), !0;
        } catch {
            return "Invalid URL";
        }
    }
    var e0 = ({ text: e }) => r(qo, { tag: "h5", size: "lg", weight: "semibold", className: O.bottom16 }, e);
    function nc({ children: e, Icon: t, className: o, ...n }) {
        return r(
            jt,
            { ...n, className: L("vc-cloud-icon-with-button", o) },
            r(t, { className: "vc-cloud-button-icon" }),
            e
        );
    }
    function eP() {
        let { cloud: e } = Ee(["cloud.authenticated", "cloud.url"]);
        return r(
            "section",
            null,
            r(e0, { text: "Cloud Integrations" }),
            r(
                Me,
                { size: "md", className: O.bottom20 },
                "Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",
                r(Ve, { href: "https://vencord.dev/cloud/privacy" }, "respects your privacy"),
                ", and the ",
                r(Ve, { href: "https://github.com/Vencord/Backend" }, "source code"),
                " is AGPL 3.0 licensed so you can host it yourself."
            ),
            r(cr, {
                key: "backend",
                title: "Enable Cloud Integrations",
                description: "This will request authorization if you have not yet set up cloud integrations.",
                value: e.authenticated,
                onChange: (t) => {
                    t ? W1() : (e.authenticated = t);
                },
            }),
            r(Xt, { tag: "h5", className: O.top16 }, "Backend URL"),
            r(Me, { className: O.bottom8 }, "Which backend to use when using cloud integrations."),
            r(oc, {
                key: "backendUrl",
                value: e.url,
                onChange: async (t) => {
                    (e.url = t), (e.authenticated = !1), Ql();
                },
                validate: VI,
            }),
            r(
                rc,
                { columns: 1, gap: "1em", className: O.top8 },
                r(
                    nc,
                    {
                        variant: "primary",
                        disabled: !e.authenticated,
                        onClick: async () => {
                            await Ql(), (e.authenticated = !1), await W1();
                        },
                        Icon: iu,
                    },
                    "Reauthorise"
                )
            )
        );
    }
    function tP() {
        let { cloud: e } = Ee(["cloud.authenticated", "cloud.settingsSync"]),
            t = e.authenticated && e.settingsSync;
        return r(
            "section",
            null,
            r(e0, { text: "Settings Sync" }),
            r(
                oe,
                { flexDirection: "column", gap: "1em" },
                r(cr, {
                    key: "cloud-sync",
                    title: "Enable Settings Sync",
                    description:
                        "Save your Vencord settings to the cloud so you can easily keep them the same on all your devices",
                    value: e.settingsSync,
                    onChange: (o) => {
                        e.settingsSync = o;
                    },
                    disabled: !e.authenticated,
                    hideBorder: !0,
                }),
                r(
                    "div",
                    null,
                    r(Xt, { tag: "h5" }, "Sync Rules for This Device"),
                    r(
                        Me,
                        { className: O.bottom8 },
                        "This setting controls how settings move between ",
                        r("strong", null, "this device"),
                        " and the cloud. You can let changes flow both ways, or choose one place to be the main source of truth."
                    ),
                    r(ro, {
                        options: [
                            { label: "Two-way sync (changes go both directions)", value: "both", default: !0 },
                            { label: "This device is the source (upload only)", value: "push" },
                            { label: "The cloud is the source (download only)", value: "pull" },
                            {
                                label: "Do not sync automatically (manual sync via buttons below only)",
                                value: "manual",
                            },
                        ],
                        isSelected: (o) => o === Zt.Vencord_cloudSyncDirection,
                        serialize: (o) => String(o),
                        select: (o) => {
                            Zt.Vencord_cloudSyncDirection = o;
                        },
                        closeOnSelect: !0,
                    })
                ),
                r(
                    rc,
                    { columns: 2, gap: "1em", className: O.top20 },
                    r(nc, { variant: "positive", disabled: !t, onClick: () => tc(!0), Icon: eh }, "Upload Settings"),
                    r(
                        V,
                        {
                            text: "This will replace your current settings with the ones saved in the cloud. Be careful!",
                        },
                        ({ onMouseLeave: o, onMouseEnter: n }) =>
                            r(
                                nc,
                                {
                                    variant: "dangerPrimary",
                                    onMouseLeave: o,
                                    onMouseEnter: n,
                                    disabled: !t,
                                    onClick: () => Xu(!0, !0),
                                    Icon: Vg,
                                },
                                "Download Settings"
                            )
                    )
                )
            )
        );
    }
    function oP() {
        let { authenticated: e, settingsSync: t } = Ee(["cloud.authenticated", "cloud.settingsSync"]).cloud;
        return r(
            "section",
            null,
            r(e0, { text: "Reset Cloud Data" }),
            r(
                rc,
                { columns: 2, gap: "1em" },
                r(
                    nc,
                    { variant: "dangerPrimary", disabled: !e || !t, onClick: () => Ib(), Icon: ar },
                    "Delete Settings from Cloud"
                ),
                r(
                    nc,
                    {
                        variant: "dangerPrimary",
                        disabled: !e,
                        onClick: () =>
                            Qe.show({
                                title: "Are you sure?",
                                body: "Once your data is erased, we cannot recover it. There's no going back!",
                                onConfirm: Pb,
                                confirmText: "Erase it!",
                                confirmColor: "vc-cloud-erase-data-danger-btn",
                                cancelText: "Nevermind",
                            }),
                        Icon: ar,
                    },
                    "Delete your Cloud Account"
                )
            )
        );
    }
    function rP() {
        return r(
            $o,
            null,
            r(
                oe,
                { flexDirection: "column", gap: "1em" },
                r(eP, null),
                r(Fe, null),
                r(tP, null),
                r(Fe, null),
                r(oP, null)
            )
        );
    }
    var Ju = Vo(rP, "Cloud");
    a();
    l();
    Wt();
    S();
    a();
    l();
    Qt();
    Wt();
    a();
    l();
    S();
    pt();
    var nP = ["style-src", "style-src-elem", "img-src", "font-src"],
        Vu = new Set(),
        t0 = new Set();
    document.addEventListener("securitypolicyviolation", ({ effectiveDirective: e, blockedURI: t }) => {
        !t || !nP.includes(e) || (Vu.add(t), t0.forEach((o) => o()));
    });
    function Mb() {
        let e = Qo();
        return _n(() => (t0.add(e), () => void t0.delete(e)), [e]), [...Vu];
    }
    re();
    pt();
    S();
    a();
    l();
    Ue();
    Wt();
    a();
    l();
    Pe();
    var o0 = Y("vc-settings-quickActions-");
    function Zs(e) {
        let { Icon: t, action: o, text: n, disabled: i } = e;
        return r("button", { className: o0("pill"), onClick: o, disabled: i }, r(t, { className: o0("img") }), n);
    }
    function ep(e) {
        return r(mt, { className: o0("card") }, e.children);
    }
    a();
    l();
    T();
    a();
    l();
    a();
    l();
    function Cb(e) {
        let t = parseInt(e.substring(0, 2), 16) / 255,
            o = parseInt(e.substring(2, 4), 16) / 255,
            n = parseInt(e.substring(4, 6), 16) / 255,
            i = Math.max(t, o, n),
            s = Math.min(t, o, n),
            c = i - s,
            u,
            p,
            m;
        return (
            (m = (i + s) / 2),
            c === 0
                ? ((u = 0), (p = 0))
                : ((p = c / (1 - Math.abs(2 * m - 1))),
                  i === t ? (u = ((o - n) / c) % 6) : i === o ? (u = (n - t) / c + 2) : (u = (t - o) / c + 4),
                  (u *= 60),
                  u < 0 && (u += 360)),
            (p *= 100),
            (m *= 100),
            { hue: u, saturation: p, lightness: m }
        );
    }
    function Nb(e) {
        let t = (s) => (s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4),
            o = t(parseInt(e.substring(0, 2), 16) / 255),
            n = t(parseInt(e.substring(2, 4), 16) / 255),
            i = t(parseInt(e.substring(4, 6), 16) / 255);
        return o * 0.2126 + n * 0.7152 + i * 0.0722;
    }
    a();
    l();
    Pe();
    var r0 = "vc-clientTheme-vars",
        n0 = "vc-clientTheme-overrides",
        Yi = {};
    function i0(e) {
        let { hue: t, saturation: o, lightness: n } = Cb(e);
        Db(
            r0,
            `:root {
        --theme-h: ${t};
        --theme-s: ${o}%;
        --theme-l: ${n}%;
    }`
        );
    }
    async function Rb(e) {
        i0(e), lP(await sP());
    }
    function kb() {
        Yi[r0]?.remove(), Yi[n0]?.remove(), (Yi[r0] = null), (Yi[n0] = null);
    }
    function iP(e) {
        return Yi[e] || (Yi[e] = Eo(e, $i)), Yi[e];
    }
    function Db(e, t) {
        let o = iP(e);
        o.textContent = t;
    }
    async function sP() {
        let e = document.querySelectorAll('link[rel="stylesheet"]');
        return (
            await Promise.all(Array.from(e, async (o) => (o.href ? g(o.href).then((n) => n.text()) : null)))
        ).filter(Boolean).join(`
`);
    }
    var aP = /(--neutral-\d{1,3}?-hsl):.+?([\d.]+?)%;/g;
    function lP(e) {
        let t = {};
        for (let [, i, s] of e.matchAll(aP)) t[i] = parseFloat(s);
        let o = t["--neutral-2-hsl"],
            n = t["--neutral-69-hsl"];
        Db(
            n0,
            [
                `.theme-light {
 ${Ab(t, o)} 
}`,
                `.theme-dark {
 ${Ab(t, n)} 
}`,
            ].join(`

`)
        );
    }
    function Ab(e, t) {
        return Object.entries(e).map(([o, n]) => {
            let i = n - t,
                s = i >= 0 ? "+" : "-";
            return `${o}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${s} ${Math.abs(i).toFixed(2)}%);`;
        }).join(`
`);
    }
    Pe();
    G();
    S();
    var cP = de('type:"UNSYNCED_USER_SETTINGS_UPDATE', '"system"==='),
        Lb = it("ClientThemesBackgroundStore"),
        tp = Y("vc-clientTheme-"),
        uP = [
            "#1E1514",
            "#172019",
            "#13171B",
            "#1C1C28",
            "#402D2D",
            "#3A483D",
            "#344242",
            "#313D4B",
            "#2D2F47",
            "#322B42",
            "#3C2E42",
            "#422938",
            "#b6908f",
            "#bfa088",
            "#d3c77d",
            "#86ac86",
            "#88aab3",
            "#8693b5",
            "#8a89ba",
            "#ad94bb",
        ];
    function _b(e) {
        let t = e.toString(16).padStart(6, "0");
        (Qs.store.color = t), i0(t);
    }
    function Ob(e) {
        cP({ theme: e });
    }
    function Eb() {
        let e = ie([Ns], () => Ns.theme),
            t = e === "light",
            o = t ? "Dark" : "Light",
            n = ie([Lb], () => Lb.gradientPreset != null),
            i = Nb(Qs.store.color),
            s = !1,
            c = !0;
        return (
            ((t && i < 0.26) || (!t && i > 0.12)) && (s = !0),
            i < 0.26 && i > 0.12 && (c = !1),
            t && i > 0.65 && ((s = !0), (c = !1)),
            r(
                "div",
                { className: tp("settings") },
                r(
                    "div",
                    { className: tp("container") },
                    r(
                        "div",
                        { className: tp("settings-labels") },
                        r(N.FormTitle, { tag: "h3" }, "Theme Color"),
                        r(N.FormText, null, "Add a color to your Discord client theme")
                    ),
                    r(Ln, {
                        color: parseInt(Qs.store.color, 16),
                        onChange: _b,
                        showEyeDropper: !1,
                        suggestedColors: uP,
                    })
                ),
                (s || n) &&
                    r(
                        f,
                        null,
                        r(
                            eo,
                            { className: O.top8 },
                            r(N.FormTitle, { tag: "h2" }, "Your theme won't look good!"),
                            s && r(N.FormText, null, ">", " Selected color won't contrast well with text"),
                            n && r(N.FormText, null, ">", " Nitro themes aren't supported"),
                            r(
                                "div",
                                { className: tp("buttons-container") },
                                s && c && r(F, { onClick: () => Ob(o), color: F.Colors.RED }, "Switch to ", o, " mode"),
                                n && r(F, { onClick: () => Ob(e), color: F.Colors.RED }, "Disable Nitro Theme")
                            )
                        )
                    )
            )
        );
    }
    function Bb() {
        return r(F, { onClick: () => _b(3224376) }, "Reset Theme Color");
    }
    var Qs = w({ color: { type: 6, default: "313338", component: Eb }, resetColor: { type: 6, component: Bb } }),
        ic = v({
            name: "ClientTheme",
            authors: [d.Nuckyz],
            description: "Recreation of the old client theme experiment. Add a color to your Discord client theme",
            settings: Qs,
            startAt: "DOMContentLoaded",
            start: () => Rb(Qs.store.color),
            stop: kb,
        });
    Pe();
    G();
    S();
    a();
    l();
    Ue();
    Wt();
    se();
    S();
    var Bj = Y("vc-settings-theme-"),
        Uj = Ot((e) => e.prototype?.activateUploadDialogue && e.prototype.setRef);
    a();
    l();
    S();
    function pP() {
        return r(
            $o,
            null,
            r(
                mt,
                { variant: "danger" },
                r(N.FormTitle, { tag: "h5" }, "Themes are not supported on the Userscript!"),
                r(
                    N.FormText,
                    null,
                    "You can instead install themes with the ",
                    r(Ve, { href: tu() }, "Stylus extension"),
                    "!"
                )
            )
        );
    }
    var Zi = Vo(pP, "Themes");
    a();
    l();
    Qt();
    Nn();
    Wt();
    pt();
    S();
    a();
    l();
    Wt();
    re();
    S();
    a();
    l();
    S();
    var s0 = null;
    a();
    l();
    Qt();
    Nn();
    Ue();
    a();
    l();
    Qt();
    Pe();
    S();
    var Mr = Y("vc-special-");
    function sc({
        title: e,
        subtitle: t,
        description: o,
        cardImage: n,
        backgroundImage: i,
        backgroundColor: s,
        buttonTitle: c,
        buttonOnClick: u,
        children: p,
    }) {
        let m = { backgroundColor: s || "#9c85ef", backgroundImage: `url(${i || ""})` };
        return r(
            mt,
            { className: Mr("card", "card-special"), style: m },
            r(
                "div",
                { className: Mr("card-flex") },
                r(
                    "div",
                    { className: Mr("card-flex-main") },
                    r(N.FormTitle, { className: Mr("title"), tag: "h5" }, e),
                    r(N.FormText, { className: Mr("subtitle") }, t),
                    r(N.FormText, { className: Mr("text") }, o),
                    p
                ),
                n &&
                    r(
                        "div",
                        { className: Mr("image-container") },
                        r("img", { role: "presentation", src: n, alt: "", className: Mr("image") })
                    )
            ),
            c &&
                r(
                    f,
                    null,
                    r(Fe, { className: Mr("seperator") }),
                    r(
                        yo,
                        { onClick: u, className: Mr("hyperlink") },
                        r(N.FormText, { className: Mr("hyperlink-text") }, c)
                    )
                )
        );
    }
    T();
    re();
    S();
    a();
    l();
    T();
    S();
    var Ub = (e) => !!(zn.getDonorBadges(e)?.length > 0 || Se?.getMember(Oa, e)?.roles.includes(_a));
    function a0() {
        return r(Ml, { look: F.Looks.FILLED, color: F.Colors.WHITE, style: { marginTop: "1em" } });
    }
    a();
    l();
    re();
    S();
    function Fb() {
        let e = Ee(["macosVibrancyStyle"]);
        return r(
            f,
            null,
            r(N.FormTitle, { tag: "h5" }, "Window vibrancy style (requires restart)"),
            r(
                C,
                { noop: !0 },
                r(ro, {
                    className: O.bottom20,
                    placeholder: "Window vibrancy style",
                    options: [
                        { label: "No vibrancy", value: void 0 },
                        { label: "Under Page (window tinting)", value: "under-page" },
                        { label: "Content", value: "content" },
                        { label: "Window", value: "window" },
                        { label: "Selection", value: "selection" },
                        { label: "Titlebar", value: "titlebar" },
                        { label: "Header", value: "header" },
                        { label: "Sidebar", value: "sidebar" },
                        { label: "Tooltip", value: "tooltip" },
                        { label: "Menu", value: "menu" },
                        { label: "Popover", value: "popover" },
                        { label: "Fullscreen UI (transparent but slightly muted)", value: "fullscreen-ui" },
                        { label: "HUD (Most transparent)", value: "hud" },
                    ],
                    select: (t) => (e.macosVibrancyStyle = t),
                    isSelected: (t) => e.macosVibrancyStyle === t,
                    serialize: ds,
                })
            )
        );
    }
    var dP = "https://cdn.discordapp.com/emojis/1026533090627174460.png",
        mP = "https://media.discordapp.net/stickers/1039992459209490513.png",
        fP = "https://cdn.discordapp.com/emojis/1238120638020063377.png",
        gP = "https://cdn.discordapp.com/emojis/1026533070955872337.png",
        $b = "https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",
        hP = "https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";
    function yP() {
        let e = Ee([
            "useQuickCss",
            "enableReactDevtools",
            "frameless",
            "winNativeTitleBar",
            "transparent",
            "winCtrlQ",
            "disableMinSize",
        ]);
        return [{ key: "useQuickCss", title: "Enable Custom CSS" }, !1, !1, !1, !1, !1].map((o) => {
            if (!o) return null;
            let { key: n, title: i, description: s, restartRequired: c } = o;
            return r(cr, {
                key: n,
                title: i,
                description: s,
                value: e[n],
                onChange: (u) => {
                    (e[n] = u),
                        c &&
                            Qe.show({
                                title: "Restart Required",
                                body: "A restart is required to apply this change",
                                confirmText: "Restart now",
                                cancelText: "Later!",
                                onConfirm: hr,
                            });
                },
            });
        });
    }
    function vP() {
        let e = ce(() => (Math.random() > 0.5 ? dP : mP), []),
            t = !1,
            o = R?.getCurrentUser();
        return r(
            $o,
            null,
            Ub(o?.id)
                ? r(
                      sc,
                      {
                          title: "Donations",
                          subtitle: "Thank you for donating!",
                          description: "You can manage your perks at any time by messaging @vending.machine.",
                          cardImage: fP,
                          backgroundImage: $b,
                          backgroundColor: "#ED87A9",
                      },
                      r(a0, null)
                  )
                : r(
                      sc,
                      {
                          title: "Support the Project",
                          description: "Please consider supporting the development of Vencord by donating!",
                          cardImage: e,
                          backgroundImage: $b,
                          backgroundColor: "#c3a3ce",
                      },
                      r(a0, null)
                  ),
            Er(o?.id) &&
                r(sc, {
                    title: "Contributions",
                    subtitle: "Thank you for contributing!",
                    description: "Since you've contributed to Vencord you now have a cool new badge!",
                    cardImage: gP,
                    backgroundImage: hP,
                    backgroundColor: "#EDCC87",
                    buttonTitle: "See what you've contributed to",
                    buttonOnClick: () => Yn(o),
                }),
            r(
                "section",
                null,
                r(N.FormTitle, { tag: "h5" }, "Quick Actions"),
                r(
                    ep,
                    null,
                    r(Zs, { Icon: qg, text: "Notification Log", action: Ks }),
                    r(Zs, { Icon: fs, text: "Edit QuickCSS", action: () => VencordNative.quickCss.openEditor() }),
                    !1,
                    r(Zs, {
                        Icon: Ga,
                        text: "View Source Code",
                        action: () => VencordNative.native.openExternal("https://github.com/" + ji),
                    })
                )
            ),
            r(Fe, null),
            r(
                "section",
                { className: O.top16 },
                r(N.FormTitle, { tag: "h5" }, "Settings"),
                r(
                    N.FormText,
                    { className: O.bottom20, style: { color: "var(--text-muted)" } },
                    "Hint: You can change the position of this settings section in the",
                    " ",
                    r("a", { onClick: () => wr(Vencord.Plugins.plugins.Settings) }, "settings of the Settings plugin"),
                    "!"
                ),
                r(yP, null)
            ),
            t && r(Fb, null),
            r(nb, null)
        );
    }
    var op = Vo(vP, "Vencord Settings");
    T();
    se();
    le();
    re();
    Oe();
    S();
    var bP = "https://cdn.discordapp.com/emojis/1092089799109775453.png?size=64",
        SP = {
            description: "Vencord Contributor",
            iconSrc: bP,
            position: 0,
            shouldShow: ({ userId: e }) => Eg(e),
            onClick: (e, { userId: t }) => Yn(R.getUser(t)),
        },
        u0 = {};
    async function l0(e = !1) {
        let t = {};
        e && (t.cache = "no-cache"), (u0 = await g("https://badges.vencord.dev/badges.json", t).then((o) => o.json()));
    }
    var c0;
    function xP({ badge: e }) {
        return r(
            M.Menu,
            { navId: "vc-badge-context", onClose: st.closeContextMenu, "aria-label": "Badge Options" },
            e.description &&
                r(M.MenuItem, { id: "vc-badge-copy-name", label: "Copy Badge Name", action: () => tt(e.description) }),
            e.iconSrc &&
                r(M.MenuItem, { id: "vc-badge-copy-link", label: "Copy Badge Image Link", action: () => tt(e.iconSrc) })
        );
    }
    var zn = v({
        name: "BadgeAPI",
        description: "API to add badges to users",
        authors: [d.Megu, d.Ven, d.TheSun],
        required: !0,
        patches: [
            {
                find: "#{intl::PROFILE_USER_BADGES}",
                replacement: [
                    { match: /alt:" ","aria-hidden":!0,src:.{0,50}(\i).iconSrc/, replace: "...$1.props,$&" },
                    {
                        match: /(?<=forceOpen:.{0,40}?\i\((\i)\.id\).{0,100}?)children:/,
                        replace: "children:$1.component?$self.renderBadgeComponent({...$1}) :",
                    },
                    { match: /href:(\i)\.link/, replace: "...$self.getBadgeMouseEventHandlers($1),$&" },
                ],
            },
            {
                find: "getLegacyUsername(){",
                replacement: { match: /getBadges\(\)\{.{0,100}?return\[/, replace: "$&...$self.getBadges(this)," },
            },
        ],
        get DonorBadges() {
            return u0;
        },
        toolboxActions: {
            async "Refetch Badges"() {
                await l0(!0),
                    J.show({ id: J.genId(), message: "Successfully refetched badges!", type: J.Type.SUCCESS });
            },
        },
        userProfileBadge: SP,
        async start() {
            await l0(), clearInterval(c0), (c0 = setInterval(l0, 1e3 * 60 * 30));
        },
        async stop() {
            clearInterval(c0);
        },
        getBadges(e) {
            if (!e) return [];
            try {
                return zh(e);
            } catch (t) {
                return new U("BadgeAPI#getBadges").error(t), [];
            }
        },
        renderBadgeComponent: C.wrap(
            (e) => {
                let t = e.component;
                return r(t, { ...e });
            },
            { noop: !0 }
        ),
        getBadgeMouseEventHandlers(e) {
            let t = {};
            if (!e) return t;
            let { onClick: o, onContextMenu: n } = e;
            return o && (t.onClick = (i) => o(i, e)), n && (t.onContextMenu = (i) => n(i, e)), t;
        },
        getDonorBadges(e) {
            return u0[e]?.map((t) => ({
                iconSrc: t.badge,
                description: t.tooltip,
                position: 0,
                props: { style: { borderRadius: "50%", transform: "scale(0.9)" } },
                onContextMenu(o, n) {
                    st.openContextMenu(o, () => r(xP, { badge: n }));
                },
                onClick() {
                    let o = fe((n) =>
                        r(
                            C,
                            {
                                noop: !0,
                                onError: () => {
                                    un(o), VencordNative.native.openExternal("https://github.com/sponsors/Vendicated");
                                },
                            },
                            r(
                                ve,
                                { ...n },
                                r(
                                    Re,
                                    null,
                                    r(
                                        N.FormTitle,
                                        { tag: "h2", style: { width: "100%", textAlign: "center", margin: 0 } },
                                        r(
                                            oe,
                                            { justifyContent: "center", alignItems: "center", gap: "0.5em" },
                                            r(Pl, null),
                                            "Vencord Donor"
                                        )
                                    )
                                ),
                                r(
                                    Ie,
                                    null,
                                    r(
                                        oe,
                                        null,
                                        r("img", {
                                            role: "presentation",
                                            src: "https://cdn.discordapp.com/emojis/1026533070955872337.png",
                                            alt: "",
                                            style: { margin: "auto" },
                                        }),
                                        r("img", {
                                            role: "presentation",
                                            src: "https://cdn.discordapp.com/emojis/1026533090627174460.png",
                                            alt: "",
                                            style: { margin: "auto" },
                                        })
                                    ),
                                    r(
                                        "div",
                                        { style: { padding: "1em" } },
                                        r(N.FormText, null, "This Badge is a special perk for Vencord Donors"),
                                        r(
                                            N.FormText,
                                            { className: O.top20 },
                                            "Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"
                                        )
                                    )
                                ),
                                r(St, null, r(oe, { justifyContent: "center", style: { width: "100%" } }, r(Ml, null)))
                            )
                        )
                    );
                },
            }));
        },
    });
    a();
    l();
    T();
    var rp = v({
        name: "ChatInputButtonAPI",
        description: "API to add buttons to the chat input",
        authors: [d.Ven],
        patches: [
            {
                find: '"sticker")',
                replacement: {
                    match: /0===(\i)\.length(?=.{0,25}?\(0,\i\.jsxs?\)\(.{0,75}?children:\1)/,
                    replace: "(Vencord.Api.ChatButtons._injectButtons($1,arguments[0]),$&)",
                },
            },
        ],
    });
    a();
    l();
    T();
    var np = v({
        name: "CommandsAPI",
        authors: [d.Arjix],
        description: "Api required by anything that uses commands",
        patches: [
            {
                find: ',"tenor"',
                replacement: [
                    { match: /(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/, replace: "Vencord.Api.Commands._init($1)$2" },
                ],
            },
            {
                find: "Unexpected value for option",
                replacement: {
                    match: /,(\i)\.execute\((\i),(\i)\)/,
                    replace: (e, t, o, n) => `,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${n})`,
                },
            },
            {
                find: "#{intl::COMMANDS_OPTIONAL_COUNT}",
                replacement: [
                    {
                        match: /(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,
                        replace: "$1.plugin||($&)",
                        noWarn: !0,
                    },
                    { match: /children:(?=\i\?\?\i\?\.name)(?<=command:(\i),.+?)/, replace: "children:$1.plugin??" },
                ],
            },
        ],
    });
    a();
    l();
    T();
    var ip = v({
        name: "ContextMenuAPI",
        description: "API for adding/removing items to/from context menus.",
        authors: [d.Nuckyz, d.Ven, d.Kyuuhachi],
        required: !0,
        patches: [
            {
                find: "\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",
                replacement: {
                    match: /(?=let{navId:)(?<=function \i\((\i)\).+?)/,
                    replace: "$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);",
                },
            },
            {
                find: "navId:",
                all: !0,
                noWarn: !0,
                replacement: [
                    {
                        match: /navId:(?=.+?([,}].*?\)))/g,
                        replace: (e, t) =>
                            t.match(/}=.+/) == null
                                ? `contextMenuAPIArguments:typeof arguments!=='undefined'?arguments:[],${e}`
                                : e,
                    },
                ],
            },
        ],
    });
    a();
    l();
    T();
    var sp = v({
        name: "DynamicImageModalAPI",
        authors: [d.sadan, d.Nuckyz],
        description: "Allows you to omit either width or height when opening an image modal",
        patches: [
            {
                find: ".renderLinkComponent",
                replacement: { match: /(?<=\i=)(null!=\i&&0!==\i)&&(null!=\i&&0!==\i)/, replace: "($1)||($2)" },
            },
        ],
    });
    a();
    l();
    T();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/_api/memberListDecorators/style.css", {
        name: "src/plugins/_api/memberListDecorators/style.css",
        source: `.vc-member-list-decorators-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
}

.vc-member-list-decorators-wrapper:not(:empty) {
    /* Margin to match default Discord decorators */
    margin-left: 0.25em;
}
`,
        classNames: {},
        dom: null,
    });
    var Gb = "src/plugins/_api/memberListDecorators/style.css";
    var ap = v({
        name: "MemberListDecoratorsAPI",
        description: "API to add decorators to member list (both in servers and DMs)",
        authors: [d.TheSun, d.Ven],
        managedStyle: Gb,
        patches: [
            {
                find: "#{intl::GUILD_OWNER}),children:",
                replacement: [
                    {
                        match: /children:\[(?=.{0,300},lostPermissionTooltipText:)/,
                        replace: "children:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),",
                    },
                ],
            },
            {
                find: "PrivateChannel.renderAvatar",
                replacement: {
                    match: /decorators:(\i\.isSystemDM\(\)\?.+?:null)/,
                    replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]",
                },
            },
        ],
    });
    a();
    l();
    T();
    pr();
    var Hb = {
            radio: "MenuRadioItem",
            separator: "MenuSeparator",
            checkbox: "MenuCheckboxItem",
            groupstart: "MenuGroup",
            control: "MenuControlItem",
            compositecontrol: "MenuControlItem",
            item: "MenuItem",
            customitem: "MenuItem",
        },
        lp = v({
            name: "MenuItemDemanglerAPI",
            description: "Demangles Discord's Menu Item module",
            authors: [d.Ven],
            required: !0,
            patches: [
                {
                    find: "Menu API only allows Items",
                    replacement: {
                        match: /function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,
                        replace: (e, t) => {
                            let o = [],
                                n = Lt(/\(\i\.type===(\i\.\i)\)/g),
                                i = /type:"(\w+)"/g,
                                s;
                            for (; (s = n.exec(e)) !== null; ) {
                                let c = s[1];
                                i.lastIndex = n.lastIndex;
                                let u = i.exec(e)?.[1];
                                if (u && u in Hb) {
                                    let p = Hb[u];
                                    o.push(`Object.defineProperty(${c},"name",{value:"${p}"})`);
                                }
                            }
                            return (
                                o.length < 6 &&
                                    console.warn(
                                        "[MenuItemDemanglerAPI] Expected to at least remap 6 items, only remapped",
                                        o.length
                                    ),
                                `${o.join(";")};${e}`
                            );
                        },
                    },
                },
            ],
        });
    a();
    l();
    T();
    var cp = v({
        name: "MessageAccessoriesAPI",
        description: "API to add message accessories.",
        authors: [d.Cyn],
        patches: [
            {
                find: "#{intl::REMOVE_ATTACHMENT_BODY}",
                replacement: {
                    match: /children:(\[[^\]]{0,100}?this.renderSuppressConfirmModal[^\]]{0,100}?\])/,
                    replace: "children:Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)",
                },
            },
        ],
    });
    a();
    l();
    T();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/_api/messageDecorations/style.css", {
        name: "src/plugins/_api/messageDecorations/style.css",
        source: `.vc-message-decorations-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
}

.vc-message-decorations-wrapper:not(:empty) {
    /* Margin to match default Discord decorators */
    margin-left: 0.25em;

    /* Align vertically */
    position: relative;
    vertical-align: top;
    top: 0.1rem;
    height: calc(1rem + 4px);
    max-height: calc(1rem + 4px)
}
`,
        classNames: {},
        dom: null,
    });
    var zb = "src/plugins/_api/messageDecorations/style.css";
    var up = v({
        name: "MessageDecorationsAPI",
        description: "API to add decorations to messages",
        authors: [d.TheSun],
        managedStyle: zb,
        patches: [
            {
                find: '"Message Username"',
                replacement: {
                    match: /#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,
                    replace: "$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])",
                },
            },
        ],
    });
    a();
    l();
    T();
    var pp = v({
        name: "MessageEventsAPI",
        description: "Api required by anything using message events.",
        authors: [d.Arjix, d.hunt, d.Ven],
        patches: [
            {
                find: "#{intl::EDIT_TEXTAREA_HELP}",
                replacement: {
                    match: /(?<=,channel:\i\}\)\.then\().+?(?=\i\.content!==this\.props\.message\.content&&\i\((.+?)\)\})/,
                    replace: (e, t) =>
                        `async ${e}if(await Vencord.Api.MessageEvents._handlePreEdit(${t}))return Promise.resolve({shouldClear:false,shouldRefocus:true});`,
                },
            },
            {
                find: ".handleSendMessage,onResize:",
                replacement: {
                    match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\)?;(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,
                    replace: (e, t, o, n, i) =>
                        e +
                        `if(await Vencord.Api.MessageEvents._handlePreSend(${o}.id,${t},${i},${n}))return{shouldClear:false,shouldRefocus:true};`,
                },
            },
            {
                find: '("interactionUsernameProfile',
                replacement: {
                    match: /let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,
                    replace: (e, t, o, n) =>
                        `const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg,vcChan,${n});`,
                },
            },
        ],
    });
    a();
    l();
    T();
    var dp = v({
        name: "MessagePopoverAPI",
        description: "API to add buttons to message popovers.",
        authors: [d.KingFish, d.Ven, d.Nuckyz],
        patches: [
            {
                find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
                replacement: {
                    match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,
                    replace: (e, t, o, n, i) =>
                        `]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${o},${i}),${n}?${t}:null,`,
                },
            },
        ],
    });
    a();
    l();
    T();
    var mp = v({
        name: "MessageUpdaterAPI",
        description: "API for updating and re-rendering messages.",
        authors: [d.Nuckyz],
        patches: [
            {
                find: "}renderStickersAccessories(",
                replacement: { match: /(?<=this.props,\i,\[)"message",/, replace: "" },
            },
        ],
    });
    a();
    l();
    T();
    var fp = v({
        name: "NoticesAPI",
        description: "Fixes notices being automatically dismissed",
        authors: [d.Ven],
        required: !0,
        patches: [
            {
                find: '"NoticeStore"',
                replacement: [
                    {
                        match: /(?<=!1;)\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,
                        replace: "if(Vencord.Api.Notices.currentNotice)return false;$&",
                    },
                    {
                        match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,
                        replace: (e, t) =>
                            `if(${t}?.id=="VencordNotice")return(${t}=null,Vencord.Api.Notices.nextNotice(),true);${e}`,
                    },
                    {
                        match: /(?<=function (\i)\(\i\){)return null!=(\i)(?=.+?NOTICE_DISMISS:\1)/,
                        replace: (e, t, o) =>
                            `if(${o}?.id=="VencordNotice")return(${o}=null,Vencord.Api.Notices.nextNotice(),true);${e}`,
                        noWarn: !0,
                    },
                ],
            },
        ],
    });
    a();
    l();
    T();
    var gp = v({
        name: "ServerListAPI",
        authors: [d.kemo],
        description: "Api required for plugins that modify the server list",
        patches: [
            {
                find: "#{intl::DISCODO_DISABLED}",
                replacement: {
                    match: /(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,150}?tutorialId:"friends-list".+?}\))(?=}function)/,
                    replace:
                        "[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))",
                },
            },
            {
                find: ".setGuildsTree(",
                replacement: {
                    match: /(?<=#{intl::SERVERS}\),gap:"xs",children:)\i\.map\(.{0,50}\.length\)/,
                    replace:
                        "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)",
                },
            },
        ],
    });
    a();
    l();
    T();
    var hp = v({
        name: "UserSettingsAPI",
        description: "Patches Discord's UserSettings to expose their group and name.",
        authors: [d.Nuckyz],
        patches: [
            {
                find: ",updateSetting:",
                replacement: [
                    {
                        match: /\.updateAsync\(.+?(?=,useSetting:)/,
                        replace: "$&,userSettingsAPIGroup:arguments[0],userSettingsAPIName:arguments[1]",
                    },
                    {
                        match: /updateSetting:.{0,100}SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE/,
                        replace:
                            "userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&",
                    },
                    {
                        match: /updateSetting:.{0,60}USER_SETTINGS_OVERRIDE_CLEAR/,
                        replace:
                            "userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&",
                    },
                ],
            },
        ],
    });
    a();
    l();
    T();
    le();
    var Wb = w({
            disableAnalytics: {
                type: 3,
                description: "Disable Discord's tracking (analytics/'science')",
                default: !0,
                restartNeeded: !0,
            },
        }),
        yp = v({
            name: "NoTrack",
            description: "Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",
            authors: [d.Cyn, d.Ven, d.Nuckyz, d.Arrow],
            required: !0,
            settings: Wb,
            patches: [
                {
                    find: "AnalyticsActionHandlers.handle",
                    predicate: () => Wb.store.disableAnalytics,
                    replacement: { match: /^.+$/, replace: "()=>{}" },
                },
                {
                    find: ".METRICS_V2",
                    replacement: [
                        { match: /this\._intervalId=/, replace: "this._intervalId=void 0&&" },
                        { match: /(?:increment|distribution)\(\i(?:,\i)?\){/g, replace: "$&return;" },
                    ],
                },
                {
                    find: ".BetterDiscord||null!=",
                    replacement: { match: /(?=let \i=window;)/, replace: "return false;" },
                },
            ],
            flux: {
                TRACK(e) {
                    e?.resolve?.();
                },
            },
            startAt: "Init",
            start() {
                Object.defineProperty(Function.prototype, "g", {
                    configurable: !0,
                    set(e) {
                        Object.defineProperty(this, "g", { value: e, configurable: !0, enumerable: !0, writable: !0 });
                        let { stack: t } = new Error();
                        if (this.c != null || !t?.includes("http") || !String(this).includes("exports:{}")) return;
                        let o = t.match(/http.+?(?=:\d+?:\d+?$)/m)?.[0];
                        if (!o) return;
                        let n = new XMLHttpRequest();
                        if ((n.open("GET", o, !1), n.send(), !!n.responseText.includes(".DiscordSentry=")))
                            throw (
                                (new U("NoTrack", "#8caaee").info("Disabling Sentry by erroring its WebpackInstance"),
                                Reflect.deleteProperty(Function.prototype, "g"),
                                Reflect.deleteProperty(unsafeWindow, "DiscordSentry"),
                                new Error("Sentry successfully disabled"))
                            );
                    },
                }),
                    Object.defineProperty(unsafeWindow, "DiscordSentry", {
                        configurable: !0,
                        set() {
                            new U("NoTrack", "#8caaee").error(
                                "Failed to disable Sentry. Falling back to deleting window.DiscordSentry"
                            ),
                                Reflect.deleteProperty(Function.prototype, "g"),
                                Reflect.deleteProperty(unsafeWindow, "DiscordSentry");
                        },
                    });
            },
        });
    a();
    l();
    Ue();
    T();
    G();
    var Xs = { SECTION: 1, SIDEBAR_ITEM: 2, PANEL: 3, CATEGORY: 5, CUSTOM: 19 };
    Ze(["SECTION", "SIDEBAR_ITEM", "PANEL", "CUSTOM"], (e) => (Xs = e));
    var jb = { HEADER: "HEADER", DIVIDER: "DIVIDER", CUSTOM: "CUSTOM" },
        qb = w({
            settingsLocation: {
                type: 4,
                description: "Where to put the Vencord settings section",
                options: [
                    { label: "At the very top", value: "top" },
                    { label: "Above the Nitro section", value: "aboveNitro", default: !0 },
                    { label: "Below the Nitro section", value: "belowNitro" },
                    { label: "Above Activity Settings", value: "aboveActivity" },
                    { label: "Below Activity Settings", value: "belowActivity" },
                    { label: "At the very bottom", value: "bottom" },
                ],
            },
        }),
        Kb = [
            ["VencordSettings", "vencord_main_panel"],
            ["VencordPlugins", "vencord_plugins_panel"],
            ["VencordThemes", "vencord_themes_panel"],
            ["VencordUpdater", "vencord_updater_panel"],
            ["VencordCloud", "vencord_cloud_panel"],
            ["VencordBackupAndRestore", "vencord_backup_restore_panel"],
            ["VencordPatchHelper", "vencord_patch_helper_panel"],
        ],
        Cr = v({
            name: "Settings",
            description: "Adds Settings UI and debug info",
            authors: [d.Ven, d.Megu],
            required: !0,
            settings: qb,
            settingsSectionMap: Kb,
            patches: [
                {
                    find: "#{intl::COPY_VERSION}",
                    replacement: [
                        {
                            match: /"text-xxs\/normal".{0,300}?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/,
                            replace: (e, t, o, n, i) => (
                                (i = i.replace(/children:\[.+\]/, "")),
                                `${e},$self.makeInfoElements(${n},${i}).map(e=>${o}e})),`
                            ),
                        },
                        {
                            match: /"text-xs\/normal".{0,300}?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}className:\i.\i,.+?\})\)," "/,
                            replace: (e, t, o) => (
                                (o = o.replace(/children:\[.+\]/, "")), `${e},$self.makeInfoElements(${t},${o})`
                            ),
                        },
                        { match: /copyValue:\i\.join\(" "\)/g, replace: "$& + $self.getInfoString()" },
                    ],
                },
                {
                    find: ".buildLayout().map",
                    replacement: { match: /(\i)\.buildLayout\(\)(?=\.map)/, replace: "$self.buildLayout($1)" },
                },
                {
                    find: "getWebUserSettingFromSection",
                    replacement: {
                        match: /new Map\(\[(?=\[.{0,10}\.ACCOUNT,.{0,10}\.ACCOUNT_PANEL)/,
                        replace: "new Map([...$self.getSettingsSectionMappings(),",
                    },
                },
            ],
            buildEntry(e) {
                let { key: t, title: o, panelTitle: n = o, Component: i, Icon: s } = e,
                    c = {
                        key: t + "_panel",
                        type: Xs.PANEL,
                        useTitle: () => n,
                        buildLayout: () => [
                            {
                                type: Xs.CATEGORY,
                                key: t + "_category",
                                buildLayout: () => [
                                    { type: Xs.CUSTOM, key: t + "_custom", Component: i, useSearchTerms: () => [o] },
                                ],
                            },
                        ],
                    };
                return {
                    key: t,
                    type: Xs.SIDEBAR_ITEM,
                    useTitle: () => o,
                    icon: () => r(s, { width: 20, height: 20 }),
                    buildLayout: () => [c],
                };
            },
            getSettingsSectionMappings() {
                return Kb;
            },
            buildLayout(e) {
                let t = e.buildLayout();
                if (e.key !== "$Root" || !Array.isArray(t) || t.some((m) => m?.key === "vencord_section")) return t;
                let { buildEntry: o } = this,
                    n = [
                        o({
                            key: "vencord_main",
                            title: "Vencord",
                            panelTitle: "Vencord Settings",
                            Component: op,
                            Icon: Yg,
                        }),
                        o({ key: "vencord_plugins", title: "Plugins", Component: qs, Icon: Zg }),
                        o({ key: "vencord_themes", title: "Themes", Component: Zi, Icon: fs }),
                        !1,
                        o({
                            key: "vencord_cloud",
                            title: "Cloud",
                            panelTitle: "Vencord Cloud",
                            Component: Ju,
                            Icon: Qg,
                        }),
                        o({ key: "vencord_backup_restore", title: "Backup & Restore", Component: ju, Icon: Xg }),
                        !1,
                        ...this.customEntries.map(o),
                        ...this.customSections.map((m, h) => {
                            let { section: y, element: b, label: x } = m(jb);
                            return Object.values(jb).includes(y)
                                ? null
                                : o({
                                      key: `vencord_deprecated_custom_${y}`,
                                      title: x,
                                      Component: b,
                                      Icon: y === "Vesktop" ? Jg : Ha,
                                  });
                        }),
                    ].filter(qn),
                    i = {
                        key: "vencord_section",
                        type: Xs.SECTION,
                        useTitle: () => "Vencord Settings",
                        buildLayout: () => n,
                    },
                    { settingsLocation: s } = qb.store,
                    c = {
                        top: "user_section",
                        aboveNitro: "billing_section",
                        belowNitro: "billing_section",
                        aboveActivity: "activity_section",
                        belowActivity: "activity_section",
                        bottom: "logout_section",
                    },
                    u = c[s] ?? c.top,
                    p = t.findIndex((m) => typeof m?.key == "string" && m.key === u);
                return p === -1 ? (p = 2) : s.startsWith("below") && (p += 1), t.splice(p, 0, i), t;
            },
            customSections: [],
            customEntries: [],
            get electronVersion() {
                return VencordNative.native.getVersions().electron || unsafeWindow.legcord?.electron || null;
            },
            get chromiumVersion() {
                try {
                    return (
                        VencordNative.native.getVersions().chrome ||
                        navigator.userAgentData?.brands?.find(
                            (e) => e.brand === "Chromium" || e.brand === "Google Chrome"
                        )?.version ||
                        null
                    );
                } catch {
                    return null;
                }
            },
            get additionalInfo() {
                return " (Web)";
            },
            getInfoRows() {
                let { electronVersion: e, chromiumVersion: t, additionalInfo: o } = this,
                    n = [`Vencord ${Wn}${o}`];
                return e && n.push(`Electron ${e}`), t && n.push(`Chromium ${t}`), n;
            },
            getInfoString() {
                return (
                    `
` +
                    this.getInfoRows().join(`
`)
                );
            },
            makeInfoElements(e, t) {
                return this.getInfoRows().map((o, n) => r(e, { key: n, ...t }, o));
            },
        });
    a();
    l();
    var d0 = {};
    Ke(d0, { UserSettings: () => p0, getUserSetting: () => Yb, getUserSettingLazy: () => To });
    a();
    l();
    Fo();
    le();
    G();
    var p0 = wo(() => {
        let e = kn('"textAndImages","renderSpoilers"');
        return e == null ? new U("UserSettingsAPI").error("Didn't find settings module.") : ct(e);
    });
    function Yb(e, t) {
        if (!ke("UserSettingsAPI")) throw new Error("Cannot use UserSettingsAPI without setting it as a dependency.");
        for (let o in p0) {
            let n = p0[o];
            if (n.userSettingsAPIGroup === e && n.userSettingsAPIName === t) return n;
        }
    }
    function To(e, t) {
        return Pt(() => Yb(e, t));
    }
    Wt();
    a();
    l();
    gi();
    T();
    se();
    le();
    re();
    dr();
    S();
    var TP = /```js\n(.+?)```/s,
        wP = ["1024286218801926184"],
        IP = [kg, Dg, _a],
        PP = async function () {}.constructor,
        MP = To("status", "showCurrentGame"),
        Zb = (e) => e.parent_id === ui || wP.includes(e.id);
    async function Qb() {
        let { RELEASE_CHANNEL: e } = unsafeWindow.GLOBAL_ENV,
            t =
                "legcord" in unsafeWindow
                    ? `Legcord v${unsafeWindow.legcord.version}`
                    : `${typeof unsafeWindow < "u" ? "UserScript" : "Web"} (${navigator.userAgent})`,
            o = {
                Vencord: `v1.14.5 \u2022 [${Wn}](<https://github.com/Vendicated/Vencord/commit/${Wn}>)${Cr.additionalInfo} - ${Intl.DateTimeFormat("en-GB", { dateStyle: "medium" }).format(1773181847029)}`,
                Client: `${e} ~ ${t}`,
                Platform: navigator.platform,
            },
            n = {
                "Activity Sharing disabled": Ug(() => !MP.getSetting(), !1),
                "Vencord DevBuild": !1,
                "Has UserPlugins": Object.values(Zn).some((s) => s.userPlugin),
                "More than two weeks out of date": 1773181847029 < Date.now() - 12096e5,
            },
            i = `>>> ${Object.entries(o).map(([s, c]) => `**${s}**: ${c}`).join(`
`)}`;
        return (
            (i +=
                `
` +
                Object.entries(n)
                    .filter(([, s]) => s)
                    .map(([s]) => `\u26A0\uFE0F ${s}`).join(`
`)),
            i.trim()
        );
    }
    function Xb() {
        let e = (s) => s.endsWith("API") || $e[s].required,
            t = Object.keys($e).filter((s) => ke(s) && !e(s)),
            o = t.filter((s) => !Zn[s].userPlugin),
            n = t.filter((s) => Zn[s].userPlugin),
            i = `**Enabled Plugins (${o.length}):**
${bi(o.join(", "))}`;
        return (
            n.length &&
                (i += `**Enabled UserPlugins (${n.length}):**
${bi(n.join(", "))}`),
            i
        );
    }
    var hX = dn(Us),
        CP = w({}).withPrivateSettings(),
        vp = v({
            name: "SupportHelper",
            required: !0,
            description: "Helps us provide support to you",
            authors: [d.Ven],
            dependencies: ["UserSettingsAPI"],
            settings: CP,
            patches: [
                {
                    find: "#{intl::BEGINNING_DM}",
                    replacement: {
                        match: /#{intl::BEGINNING_DM},{.+?}\),(?=.{0,300}(\i)\.isMultiUserDM)/,
                        replace: "$& $self.renderContributorDmWarningCard({ channel: $1 }),",
                    },
                },
            ],
            commands: [
                {
                    name: "vencord-debug",
                    description: "Send Vencord debug info",
                    predicate: (e) => Er(R.getCurrentUser()?.id) || Zb(e.channel),
                    execute: async () => ({ content: await Qb() }),
                },
                {
                    name: "vencord-plugins",
                    description: "Send Vencord plugin list",
                    predicate: (e) => Er(R.getCurrentUser()?.id) || Zb(e.channel),
                    execute: () => ({ content: Xb() }),
                },
            ],
            flux: {
                async CHANNEL_SELECT({ channelId: e }) {
                    if (!(e === ou || Z.getChannel(e)?.parent_id === ui)) return;
                    let o = R.getCurrentUser()?.id;
                    if (!o || Er(o)) return;
                    let n = Se.getSelfMember(Oa)?.roles;
                    !n || IP.some((i) => n.includes(i));
                },
            },
            renderMessageAccessory(e) {
                let t = [];
                if (
                    e.channel.parent_id === ui &&
                    Te.can(pe.SEND_MESSAGES, e.channel) &&
                    ((e.message.content.includes("/vencord-debug") || e.message.content.includes("/vencord-plugins")) &&
                        t.push(
                            r(
                                F,
                                {
                                    key: "vc-dbg",
                                    color: F.Colors.PRIMARY,
                                    onClick: async () => Ri(e.channel.id, { content: await Qb() }),
                                },
                                "Run /vencord-debug"
                            ),
                            r(
                                F,
                                {
                                    key: "vc-plg-list",
                                    color: F.Colors.PRIMARY,
                                    onClick: async () => Ri(e.channel.id, { content: Xb() }),
                                },
                                "Run /vencord-plugins"
                            )
                        ),
                    e.message.author.id === La)
                ) {
                    let n = TP.exec(e.message.content || e.message.embeds[0]?.rawDescription || "");
                    n &&
                        t.push(
                            r(
                                F,
                                {
                                    key: "vc-run-snippet",
                                    onClick: async () => {
                                        try {
                                            await PP(n[1])(), Ge("Success!", J.Type.SUCCESS);
                                        } catch (i) {
                                            new U(this.name).error("Error while running snippet:", i),
                                                Ge("Failed to run snippet :(", J.Type.FAILURE);
                                        }
                                    },
                                },
                                "Run Snippet"
                            )
                        );
                }
                return t.length ? r(oe, null, t) : null;
            },
            renderContributorDmWarningCard: C.wrap(
                ({ channel: e }) => {
                    let t = e.getRecipientId();
                    return !Er(t) || we.isFriend(t) || Er(R.getCurrentUser()?.id)
                        ? null
                        : r(
                              mt,
                              { variant: "warning", className: O.top8, defaultPadding: !0 },
                              "Please do not private message Vencord plugin developers for support!",
                              r("br", null),
                              "Instead, use the Vencord support channel: ",
                              Ne.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),
                              !Z.getChannel(ou) && " (Click the link to join)"
                          );
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    se();
    G();
    S();
    var Jb = ge(".POPOUT,user"),
        bp = !1,
        m0 = { current: null },
        NP = C.wrap(
            () => {
                let { prioritizeServerProfile: e } = ac.use(["prioritizeServerProfile"]);
                return r(
                    M.Menu,
                    { navId: "vc-ap-server-profile", onClose: st.closeContextMenu },
                    r(M.MenuItem, {
                        id: "vc-ap-view-alternate-popout",
                        label: e ? "View Account Profile" : "View Server Profile",
                        disabled: Mo()?.getGuildId() == null,
                        action: (t) => {
                            (bp = !0), m0.current?.click();
                        },
                    }),
                    r(M.MenuCheckboxItem, {
                        id: "vc-ap-prioritize-server-profile",
                        label: "Prioritize Server Profile",
                        checked: e,
                        action: () => (ac.store.prioritizeServerProfile = !e),
                    })
                );
            },
            { noop: !0 }
        ),
        ac = w({
            prioritizeServerProfile: {
                type: 3,
                description: "Prioritize Server Profile when left clicking your account panel",
                default: !1,
            },
        }),
        Sp = v({
            name: "AccountPanelServerProfile",
            description: "Right click your account panel in the bottom left to view your profile in the current server",
            authors: [d.Nuckyz, d.relitrix],
            settings: ac,
            patches: [
                {
                    find: ".WIDGETS_RTC_UPSELL_COACHMARK)",
                    group: !0,
                    replacement: [
                        {
                            match: /(\.AVATAR,children:.+?renderPopout:\((\i),\i\)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
                            replace: (e, t, o, n, i) =>
                                `${t}$self.UserProfile({popoutProps:${o},currentUser:${i},originalRenderPopout:()=>{${n}}})`,
                        },
                        { match: /\.AVATAR,children:.+?onRequestClose:\(\)=>\{/, replace: "$&$self.onPopoutClose();" },
                        {
                            match: /ref:(\i),style:\i(?=.{0,250}#{intl::USER_PROFILE_ACCOUNT_POPOUT_BUTTON_A11Y_LABEL})/,
                            replace: "$&,onContextMenu:($self.grabRef($1),$self.openAccountPanelContextMenu)",
                        },
                    ],
                },
            ],
            get accountPanelRef() {
                return m0;
            },
            grabRef(e) {
                return (m0 = e), e;
            },
            openAccountPanelContextMenu(e) {
                st.openContextMenu(e, NP);
            },
            onPopoutClose() {
                bp = !1;
            },
            UserProfile: C.wrap(
                ({ popoutProps: e, currentUser: t, originalRenderPopout: o }) => {
                    if ((ac.store.prioritizeServerProfile && bp) || (!ac.store.prioritizeServerProfile && !bp))
                        return o();
                    let n = Mo();
                    return n?.getGuildId() == null || !Jb.$$vencordGetWrappedComponent()
                        ? o()
                        : r(Jb, { ...e, user: t, currentUser: t, guildId: n.getGuildId(), channelId: n.id });
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    var xp = v({
        name: "AlwaysAnimate",
        description: "Animates anything that can be animated",
        authors: [d.FieryFlames],
        patches: [
            {
                find: "canAnimate:",
                all: !0,
                noWarn: !0,
                replacement: {
                    match: /canAnimate:.+?([,}].*?\))/g,
                    replace: (e, t) => (t.match(/}=.+/) == null ? `canAnimate:!0${t}` : e),
                },
            },
            {
                find: "#{intl::GUILD_OWNER}),children:",
                replacement: { match: /(\.CUSTOM_STATUS.+?animateEmoji:)\i/, replace: "$1!0" },
            },
            {
                find: "#{intl::DISCOVERABLE_GUILD_HEADER_PUBLIC_INFO}",
                replacement: { match: /(guildBanner:\i,animate:)\i(?=}\):null)/, replace: "$1!0" },
            },
            {
                find: ".MINI_PREVIEW,[",
                replacement: { match: /animate:\i,loop:/, replace: "animate:true,loop:true,_loop:" },
            },
        ],
    });
    a();
    l();
    T();
    br("AlwaysExpandRoles", "ShowAllRoles");
    var Tp = v({
        name: "AlwaysExpandRoles",
        description: "Always expands the role list in profile popouts",
        authors: [d.surgedevs],
        patches: [
            {
                find: "hasDeveloperContextMenu:",
                replacement: [
                    { match: /(?<=\?\i\.current\[\i\].{0,100}?)useState\(!1\)/, replace: "useState(!0)" },
                    { match: /(?<=useLayoutEffect\(\(\)=>\{if\()\i/, replace: "false" },
                ],
            },
        ],
    });
    a();
    l();
    T();
    var f0 = w({
            domain: {
                type: 3,
                default: !0,
                description: "Remove the untrusted domain popup when opening links",
                restartNeeded: !0,
            },
            file: {
                type: 3,
                default: !0,
                description: "Remove the 'Potentially Dangerous Download' popup when opening links",
                restartNeeded: !0,
            },
        }),
        wp = v({
            name: "AlwaysTrust",
            description: "Removes the annoying untrusted domain and suspicious file popup",
            authors: [d.zt, d.Trwy],
            patches: [
                {
                    find: '="MaskedLinkStore",',
                    replacement: { match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/, replace: "return true" },
                    predicate: () => f0.store.domain,
                },
                {
                    find: "bitbucket.org",
                    replacement: { match: /function \i\(\i\){(?=.{0,30}pathname:\i)/, replace: "$&return null;" },
                    predicate: () => f0.store.file,
                },
            ],
            settings: f0,
        });
    a();
    l();
    T();
    G();
    S();
    var AP = de("Children.map", "isValidElement", "dangerous:");
    var g0 = Symbol("vcAnonymise"),
        RP = /\.tar\.\w+$/,
        Vn = w({
            anonymiseByDefault: { description: "Whether to anonymise file names by default", type: 3, default: !0 },
            method: {
                description: "Anonymising method",
                type: 4,
                options: [
                    { label: "Random Characters", value: 0, default: !0 },
                    { label: "Consistent", value: 1 },
                    { label: "Timestamp", value: 2 },
                ],
            },
            randomisedLength: {
                description: "Random characters length",
                type: 1,
                default: 7,
                disabled: () => Vn.store.method !== 0,
            },
            consistent: {
                description: "Consistent filename",
                type: 0,
                default: "image",
                disabled: () => Vn.store.method !== 1,
            },
        }),
        Ip = v({
            name: "AnonymiseFileNames",
            authors: [d.fawn],
            description: "Anonymise uploaded file names",
            settings: Vn,
            patches: [
                {
                    find: "async uploadFiles(",
                    replacement: [{ match: /async uploadFiles\((\i)\){/, replace: "$&$1.forEach($self.anonymise);" }],
                },
                {
                    find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
                    replacement: {
                        match: /(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/,
                        replace: "arguments[0].canEdit!==false?$self.AnonymiseUploadButton(arguments[0]):null,",
                    },
                },
            ],
            AnonymiseUploadButton: C.wrap(
                ({ upload: e }) => {
                    let [t, o] = k(e[g0] ?? Vn.store.anonymiseByDefault);
                    function n() {
                        (e[g0] = !t), o(!t);
                    }
                    return r(
                        AP,
                        { tooltip: t ? "Using anonymous file name" : "Using normal file name", onClick: n },
                        t
                            ? r(
                                  "svg",
                                  { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
                                  r("path", {
                                      fill: "currentColor",
                                      d: "M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z",
                                  })
                              )
                            : r(
                                  "svg",
                                  {
                                      xmlns: "http://www.w3.org/2000/svg",
                                      viewBox: "0 0 24 24",
                                      style: { transform: "scale(-1,1)" },
                                  },
                                  r("path", {
                                      fill: "currentColor",
                                      d: "M22.11 21.46L2.39 1.73L1.11 3L6.31 8.2L6 9H7.11L8.61 10.5H2V12H10.11L13.5 15.37C13.38 15.61 13.3 15.85 13.24 16.1C12.29 15.69 11.41 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C17.66 21 18.22 20.86 18.72 20.61L20.84 22.73L22.11 21.46M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17C4.13 15.42 5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17C9.75 18.58 8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17C14.25 16.74 14.29 16.5 14.36 16.25L17.84 19.73C17.59 19.81 17.34 19.86 17.06 19.86M22 12H15.2L13.7 10.5H22V12M17.06 13C19.23 13 21 14.79 21 17C21 17.25 20.97 17.5 20.93 17.73L19.84 16.64C19.68 15.34 18.66 14.32 17.38 14.17L16.29 13.09C16.54 13.03 16.8 13 17.06 13M12.2 9L7.72 4.5L8.43 2.68C8.63 2.17 9.19 1.89 9.72 2.04L9.77 2.05L12 2.79L14.22 2.05C14.75 1.88 15.32 2.14 15.54 2.63L15.56 2.68L18 9H12.2Z",
                                  })
                              )
                    );
                },
                { noop: !0 }
            ),
            anonymise(e) {
                if ((e[g0] ?? Vn.store.anonymiseByDefault) === !1) return;
                let t = e.filename,
                    n = RP.exec(t)?.index ?? t.lastIndexOf("."),
                    i = n !== -1 ? t.slice(n) : "",
                    s = (() => {
                        switch (Vn.store.method) {
                            case 0:
                                let c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
                                return (
                                    Array.from(
                                        { length: Vn.store.randomisedLength },
                                        () => c[Math.floor(Math.random() * c.length)]
                                    ).join("") + i
                                );
                            case 1:
                                return Vn.store.consistent + i;
                            case 2:
                                return Date.now() + i;
                        }
                    })();
                e.filename = s;
            },
        });
    a();
    l();
    Wt();
    T();
    G();
    S();
    var kP = de('"Invalid Origin"', ".application");
    async function Vb(e, t) {
        return (await Ci.fetchAssetIds(e, [t]))[0];
    }
    var eS = {};
    async function DP(e) {
        let t = {};
        return await kP(t, e), t.application;
    }
    var Js,
        Pp = v({
            name: "WebRichPresence (arRPC)",
            description: "Client plugin for arRPC to enable RPC on Discord Web (experimental)",
            authors: [d.Ducko],
            reporterTestable: 2,
            hidden: "legcord" in unsafeWindow,
            settingsAboutComponent: () =>
                r(
                    f,
                    null,
                    r(N.FormTitle, { tag: "h3" }, "How to use arRPC"),
                    r(
                        N.FormText,
                        null,
                        r(
                            Ve,
                            { href: "https://github.com/OpenAsar/arrpc/tree/main#server" },
                            "Follow the instructions in the GitHub repo"
                        ),
                        " to get the server running, and then enable the plugin."
                    )
                ),
            async handleEvent(e) {
                let t = JSON.parse(e.data),
                    { activity: o } = t,
                    n = o?.assets;
                if (
                    (n?.large_image && (n.large_image = await Vb(o.application_id, n.large_image)),
                    n?.small_image && (n.small_image = await Vb(o.application_id, n.small_image)),
                    o)
                ) {
                    let i = o.application_id;
                    eS[i] ||= await DP(i);
                    let s = eS[i];
                    o.name ||= s.name;
                }
                B.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", ...t });
            },
            async start() {
                if (
                    (Js && Js.close(),
                    (Js = new WebSocket("ws://127.0.0.1:1337")),
                    (Js.onmessage = this.handleEvent),
                    !(await new Promise((t) => setTimeout(() => t(Js.readyState === WebSocket.OPEN), 5e3))))
                ) {
                    fn("Failed to connect to arRPC, is it running?", "Retry", () => {
                        Wi(), this.start();
                    });
                    return;
                }
                J.show({
                    message: "Connected to arRPC",
                    type: J.Type.SUCCESS,
                    id: J.genId(),
                    options: { duration: 1e3, position: J.Position.BOTTOM },
                });
            },
            stop() {
                B.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: null }), Js?.close();
            },
        });
    a();
    l();
    T();
    se();
    le();
    G();
    S();
    a();
    l();
    G();
    S();
    var LP = ge('("guildsnav")');
    function OP() {
        let e = Vs.getExpandedFolders(),
            t = Mp.getGuildFolders(),
            o = new Set();
        for (let n of t) e.has(n.folderId) && n.guildIds?.length && o.add(n.folderId);
        return o;
    }
    var oS = C.wrap(
        (e) => {
            let t = ie([Vs, Mp], () => OP()),
                o = ie([Ds], () => Ds.isFullscreenInContext()),
                n = r(LP, { ...e, isBetterFolders: !0, betterFoldersExpandedIds: t }),
                i = !!t.size,
                s = document.querySelector(
                    e.className
                        .split(" ")
                        .map((u) => `.${u}`)
                        .join("")
                ),
                c = { display: o ? "none" : "flex" };
            return !s || !Ft.store.sidebarAnim
                ? i
                    ? r("div", { className: "vc-betterFolders-sidebar", style: c }, n)
                    : null
                : r(
                      Tu.Transition,
                      {
                          items: i,
                          from: { width: 0 },
                          enter: { width: s.getBoundingClientRect().width },
                          leave: { width: 0 },
                          config: { duration: 200 },
                      },
                      (u, p) =>
                          p && r(Tu.animated.div, { className: "vc-betterFolders-sidebar", style: { ...u, ...c } }, n)
                  );
        },
        { noop: !0 }
    );
    var Vs = it("ExpandedGuildFolderStore"),
        Mp = it("SortedGuildStore"),
        v0 = X("move", "toggleGuildFolderExpand"),
        rS = null,
        h0 = !1;
    function _P(e) {
        return Mp.getGuildFolders().find((t) => t.guildIds.includes(e));
    }
    function y0() {
        for (let e of Vs.getExpandedFolders()) v0.toggleGuildFolderExpand(e);
    }
    function b0(e, t) {
        if (e == null) return !1;
        if (!Array.isArray(e)) return t(e) ? !0 : b0(e.props?.children, t);
        let o = !1;
        for (let n = 0; n < e.length; n++) {
            if (b0(e[n], t)) {
                o = !0;
                continue;
            }
            e.splice(n--, 1);
        }
        return o;
    }
    var Ft = w({
            sidebar: {
                type: 3,
                description: "Display servers from folder on dedicated sidebar",
                restartNeeded: !0,
                default: !0,
            },
            sidebarAnim: { type: 3, description: "Animate opening the folder sidebar", default: !0 },
            closeAllFolders: {
                type: 3,
                description: "Close all folders when selecting a server not in a folder",
                default: !1,
            },
            closeAllHomeButton: {
                type: 3,
                description: "Close all folders when clicking on the home button",
                restartNeeded: !0,
                default: !1,
            },
            closeOthers: { type: 3, description: "Close other folders when opening a folder", default: !1 },
            forceOpen: {
                type: 3,
                description: "Force a folder to open when switching to a server of that folder",
                default: !1,
            },
            keepIcons: {
                type: 3,
                description:
                    "Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",
                restartNeeded: !0,
                default: !1,
            },
            showFolderIcon: {
                type: 4,
                description: "Show the folder icon above the folder guilds in the BetterFolders sidebar",
                options: [
                    { label: "Never", value: 0 },
                    { label: "Always", value: 1, default: !0 },
                    { label: "When more than one folder is expanded", value: 2 },
                ],
                restartNeeded: !0,
            },
        }),
        nS = "typeof isBetterFolders!=='undefined'?isBetterFolders:arguments[0]?.isBetterFolders",
        EP =
            "typeof betterFoldersExpandedIds!=='undefined'?betterFoldersExpandedIds:arguments[0]?.betterFoldersExpandedIds",
        BP = "vc-betterFolders-sidebar-grid",
        Cp = v({
            name: "BetterFolders",
            description: "Shows server folders on dedicated sidebar and adds folder related improvements",
            authors: [d.juby, d.AutumnVN, d.Nuckyz],
            settings: Ft,
            patches: [
                {
                    find: '("guildsnav")',
                    predicate: () => Ft.store.sidebar,
                    replacement: [
                        {
                            match: /let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i)/,
                            replace: "$&,isBetterFolders,betterFoldersExpandedIds",
                        },
                        {
                            match: /,{guildDiscoveryButton:\i,/g,
                            replace:
                                "$&isBetterFolders:arguments[0]?.isBetterFolders,betterFoldersExpandedIds:arguments[0]?.betterFoldersExpandedIds,",
                        },
                        {
                            match: /switch\((\i)\.type\){.+?default:return null}/,
                            replace: `return $self.wrapGuildNodeComponent($1,()=>{$&},${nS},${EP});`,
                        },
                        {
                            match: /switch\(\i\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,/,
                            replace: `$&isBetterFolders:${nS},`,
                        },
                        {
                            match: /switch\(\i\.type\).+?,\i,\i\.setNodeRef/,
                            replace: "$&,arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds",
                        },
                        {
                            match: /lastTargetNode:\i\[\i\.length-1\].+?}\)(?::null)?\](?=}\))/,
                            replace: "$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0]?.isBetterFolders))",
                        },
                        {
                            match: /reverse:!0,.{0,150}?barClassName:.+?\}\)\]/,
                            replace: "$&.filter($self.makeGuildsBarSidebarFilter(!!arguments[0]?.isBetterFolders))",
                        },
                    ],
                },
                {
                    find: ".toggleGuildFolderExpand(",
                    predicate: () => Ft.store.sidebar && Ft.store.showFolderIcon !== 1,
                    replacement: [
                        {
                            match: /(\],\(\)=>)(\i\.\i)\.isFolderExpanded\(\i\)\)/,
                            replace: (e, t, o) => `${t}${o}.getExpandedFolders())`,
                        },
                        {
                            match: /(?<=folderNode:(\i),expanded:)\i(?=,)/,
                            replace: (e, t) =>
                                `typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`,
                        },
                    ],
                },
                {
                    find: ".FOLDER_ITEM_ANIMATION_DURATION),",
                    predicate: () => Ft.store.sidebar,
                    replacement: [
                        {
                            predicate: () => Ft.store.keepIcons,
                            match: /(?<=let ?(?:\i,)*?{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,
                            replace: (e, t) => `${t}=!!arguments[0]?.isBetterFolders&&${t};`,
                        },
                        {
                            predicate: () => !Ft.store.keepIcons,
                            match: /(?=,\{from:\{height)/,
                            replace: "&&$self.shouldShowTransition(arguments[0])",
                        },
                        {
                            predicate: () => !Ft.store.keepIcons,
                            match: /"--custom-folder-color".+?(?=\i\(\(\i,\i,\i\)=>{let{key:.{0,70}"ul")(?<=selected:\i,expanded:(\i),.+?)/,
                            replace: (e, t) => `${e}$self.shouldRenderContents(arguments[0],${t})?null:`,
                        },
                        {
                            predicate: () => Ft.store.showFolderIcon !== 1,
                            match: /"--custom-folder-color".{0,110}?children:\[/,
                            replace:
                                "$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&",
                        },
                        {
                            predicate: () => Ft.store.showFolderIcon !== 1,
                            match: /"--custom-folder-color".+?className:\i\.\i}\),(?=\i,)/,
                            replace:
                                "$&!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:",
                        },
                    ],
                },
                {
                    find: "APPLICATION_LIBRARY,render:",
                    predicate: () => Ft.store.sidebar,
                    group: !0,
                    replacement: [
                        {
                            match: /(?<=[[,])((?:!?\i&&)+)\(.{0,50}({className:\i\.\i,themeOverride:\i})\)/g,
                            replace: (e, t, o) => `${e},${t}$self.FolderSideBar(${o})`,
                        },
                        { match: /(?<=className:)\i\.\i(?=,"data-fullscreen")/, replace: `"${BP} "+$&` },
                    ],
                },
                {
                    find: "#{intl::DISCODO_DISABLED}",
                    predicate: () => Ft.store.closeAllHomeButton,
                    replacement: {
                        match: /(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,
                        replace: "$self.closeFolders();",
                    },
                },
            ],
            flux: {
                CHANNEL_SELECT(e) {
                    if (!(!Ft.store.closeAllFolders && !Ft.store.forceOpen) && rS !== e.guildId) {
                        rS = e.guildId;
                        let t = _P(e.guildId);
                        t?.folderId
                            ? Ft.store.forceOpen &&
                              !Vs.isFolderExpanded(t.folderId) &&
                              v0.toggleGuildFolderExpand(t.folderId)
                            : Ft.store.closeAllFolders && y0();
                    }
                },
                TOGGLE_GUILD_FOLDER_EXPAND(e) {
                    Ft.store.closeOthers &&
                        !h0 &&
                        ((h0 = !0),
                        B.wait(() => {
                            let t = Vs.getExpandedFolders();
                            if (t.size > 1) for (let o of t) o !== e.folderId && v0.toggleGuildFolderExpand(o);
                            h0 = !1;
                        }));
                },
                LOGOUT() {
                    y0();
                },
            },
            FolderSideBar: oS,
            closeFolders: y0,
            wrapGuildNodeComponent(e, t, o, n) {
                return !o || (e.type === "folder" && n?.has(e.id)) || (e.type === "guild" && n?.has(e.parentId))
                    ? t()
                    : r("div", { style: { display: "none" } }, t());
            },
            makeGuildsBarGuildListFilter(e) {
                return (t) => {
                    if (!e) return !0;
                    try {
                        let o = Ae("SERVERS");
                        return o
                            ? t?.props?.["aria-label"] === o
                            : (new U("BetterFolders").error("Failed to get SERVERS intl message"), !0);
                    } catch (o) {
                        return console.error(o), !0;
                    }
                };
            },
            makeGuildsBarSidebarFilter(e) {
                return (t) => {
                    if (!e) return !0;
                    try {
                        return b0(t, (o) => o?.props?.renderTreeNode != null);
                    } catch (o) {
                        return console.error(o), !0;
                    }
                };
            },
            shouldShowFolderIconAndBackground(e, t) {
                if (!e) return !0;
                switch (Ft.store.showFolderIcon) {
                    case 0:
                        return !1;
                    case 1:
                        return !0;
                    case 2:
                        return (t?.size ?? 0) > 1;
                    default:
                        return !0;
                }
            },
            shouldShowTransition(e) {
                return e?.folderNode?.id === 1 ? !0 : !!e?.isBetterFolders;
            },
            shouldRenderContents(e, t) {
                return e?.folderNode?.id === 1 ? !1 : !e?.isBetterFolders && t;
            },
        });
    a();
    l();
    T();
    var Np = v({
        name: "BetterGifAltText",
        authors: [d.Ven],
        description: "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",
        patches: [
            {
                find: ".modalContext})};",
                replacement: { match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, replace: "$self.altify(e);$1" },
            },
            {
                find: "#{intl::GIF}",
                replacement: {
                    match: /alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::GIF}\))(?=,[^}]*\}=(\i))/,
                    replace: "alt_$$:$1=$self.altify($3)||$2",
                },
            },
        ],
        altify(e) {
            if (((e.alt ??= "GIF"), e.alt !== "GIF")) return e.alt;
            let t = e.original || e.src;
            try {
                t = decodeURI(t);
            } catch {}
            let o = t
                .slice(t.lastIndexOf("/") + 1)
                .replace(/\d/g, "")
                .replace(/.gif$/, "")
                .split(/[,\-_ ]+/g)
                .slice(0, 20)
                .join(" ");
            return o.length > 300 && (o = o.slice(0, 300) + "..."), o && (e.alt += ` - ${o}`), e.alt;
        },
    });
    a();
    l();
    T();
    var Ap = v({
        name: "BetterGifPicker",
        description: "Makes the gif picker open the favourite category by default",
        authors: [d.Samwich],
        patches: [
            {
                find: "renderHeaderContent(){",
                replacement: [{ match: /(?<=state={resultType:)null/, replace: '"Favorites"' }],
            },
        ],
    });
    a();
    l();
    T();
    pr();
    var S0 = w({
            hide: { type: 3, description: "Hide notes", default: !1, restartNeeded: !0 },
            noSpellCheck: {
                type: 3,
                description: "Disable spellcheck in notes",
                disabled: () => W.plugins.BetterNotesBox.hide,
                default: !1,
            },
        }),
        Rp = v({
            name: "BetterNotesBox",
            description: "Hide notes or disable spellcheck (Configure in settings!!)",
            authors: [d.Ven],
            settings: S0,
            patches: [
                {
                    find: "hideNote:",
                    all: !0,
                    noWarn: !0,
                    predicate: () => S0.store.hide,
                    replacement: {
                        match: /hideNote:.+?(?=([,}].*?\)))/g,
                        replace: (e, t) => {
                            if (t.match(/}=.+/)) {
                                let n = e.match(Lt(/hideNote:(\i)=!?\d/));
                                return n ? `hideNote:${n[1]}=!0` : e;
                            }
                            return "hideNote:!0";
                        },
                    },
                },
                {
                    find: "#{intl::NOTE_PLACEHOLDER}",
                    replacement: {
                        match: /#{intl::NOTE_PLACEHOLDER}\),/,
                        replace: "$&spellCheck:!$self.noSpellCheck,",
                    },
                },
            ],
            get noSpellCheck() {
                return S0.store.noSpellCheck;
            },
        });
    a();
    l();
    Ue();
    Gn();
    T();
    se();
    G();
    S();
    var iS = X("open", "selectRole", "updateGuild"),
        UP = To("appearance", "developerMode");
    function FP() {
        return r(
            "svg",
            { role: "img", width: "18", height: "18", fill: "none", viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z",
            })
        );
    }
    function $P() {
        return r(
            "svg",
            { width: "18", height: "18", viewBox: "0 0 24 24" },
            r("path", {
                fill: "currentColor",
                d: "M 12,0 C 5.3733333,0 0,5.3733333 0,12 c 0,6.626667 5.3733333,12 12,12 1.106667,0 2,-0.893333 2,-2 0,-0.52 -0.2,-0.986667 -0.52,-1.346667 -0.306667,-0.346666 -0.506667,-0.813333 -0.506667,-1.32 0,-1.106666 0.893334,-2 2,-2 h 2.36 C 21.013333,17.333333 24,14.346667 24,10.666667 24,4.7733333 18.626667,0 12,0 Z M 4.6666667,12 c -1.1066667,0 -2,-0.893333 -2,-2 0,-1.1066667 0.8933333,-2 2,-2 1.1066666,0 2,0.8933333 2,2 0,1.106667 -0.8933334,2 -2,2 z M 8.666667,6.6666667 c -1.106667,0 -2.0000003,-0.8933334 -2.0000003,-2 0,-1.1066667 0.8933333,-2 2.0000003,-2 1.106666,0 2,0.8933333 2,2 0,1.1066666 -0.893334,2 -2,2 z m 6.666666,0 c -1.106666,0 -2,-0.8933334 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.1066666 -0.893333,2 -2,2 z m 4,5.3333333 c -1.106666,0 -2,-0.893333 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.106667 -0.893333,2 -2,2 z",
            })
        );
    }
    var sS = w({
            roleIconFileFormat: {
                type: 4,
                description: "File format to use when viewing role icons",
                options: [
                    { label: "png", value: "png", default: !0 },
                    { label: "webp", value: "webp" },
                    { label: "jpg", value: "jpg" },
                ],
            },
        }),
        kp = v({
            name: "BetterRoleContext",
            description:
                "Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",
            authors: [d.Ven, d.goodbee],
            dependencies: ["UserSettingsAPI"],
            settings: sS,
            start() {
                UP.updateSetting(!0);
            },
            contextMenus: {
                "dev-context"(e, { id: t }) {
                    let o = jr();
                    if (!o) return;
                    let n = yt.getRole(o.id, t);
                    n &&
                        (n.colorString &&
                            e.unshift(
                                r(M.MenuItem, {
                                    id: "vc-copy-role-color",
                                    label: "Copy Role Color",
                                    action: () => Po(n.colorString),
                                    icon: $P,
                                })
                            ),
                        Te.getGuildPermissionProps(o).canManageRoles &&
                            e.unshift(
                                r(M.MenuItem, {
                                    id: "vc-edit-role",
                                    label: "Edit Role",
                                    action: async () => {
                                        await iS.open(o.id, "ROLES"), iS.selectRole(t);
                                    },
                                    icon: FP,
                                })
                            ),
                        n.icon &&
                            e.push(
                                r(M.MenuItem, {
                                    id: "vc-view-role-icon",
                                    label: "View Role Icon",
                                    action: () => {
                                        Co({
                                            url: `${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/role-icons/${n.id}/${n.icon}.${sS.store.roleIconFileFormat}`,
                                            height: 128,
                                            width: 128,
                                        });
                                    },
                                    icon: sr,
                                })
                            ));
                },
            },
        });
    a();
    l();
    T();
    se();
    var Dp = v({
        name: "BetterRoleDot",
        authors: [d.Ven, d.AutumnVN],
        description:
            "Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",
        patches: [
            {
                find: "M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V16C20 18.2091 18.2091 20 16 20H4C1.79086 20 0 18.2091 0 16V4Z",
                replacement: {
                    match: /,viewBox:"0 0 20 20"/,
                    replace: "$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}",
                },
            },
            {
                find: '"dot"===',
                all: !0,
                noWarn: !0,
                predicate: () => W.plugins.BetterRoleDot.bothStyles,
                replacement: { match: /"(?:username|dot)"===\i(?!\.\i)/g, replace: "true" },
            },
            {
                find: "#{intl::ADD_ROLE_A11Y_LABEL}",
                all: !0,
                predicate: () =>
                    W.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !W.plugins.BetterRoleDot.bothStyles,
                noWarn: !0,
                replacement: { match: /"dot"===\i/, replace: "true" },
            },
            {
                find: ".roleVerifiedIcon",
                all: !0,
                predicate: () =>
                    W.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !W.plugins.BetterRoleDot.bothStyles,
                noWarn: !0,
                replacement: { match: /"dot"===\i/, replace: "true" },
            },
        ],
        options: {
            bothStyles: {
                type: 3,
                description: "Show both role dot and coloured names",
                restartNeeded: !0,
                default: !1,
            },
            copyRoleColorInProfilePopout: {
                type: 3,
                description: "Allow click on role dot in profile popout to copy role color",
                restartNeeded: !0,
                default: !1,
            },
        },
        copyToClipBoard(e) {
            tt(e);
        },
    });
    a();
    l();
    T();
    G();
    S();
    a();
    l();
    lr();
    Oe();
    a();
    l();
    a();
    l();
    S();
    a();
    l();
    pt();
    G();
    var aS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 16 16" },
                r("path", {
                    d: "M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z",
                })
            ),
        lS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 512 512" },
                r("path", { d: "M188.8,255.93A67.2,67.2,0,1,0,256,188.75,67.38,67.38,0,0,0,188.8,255.93Z" }),
                r("path", {
                    d: "M476.75,217.79s0,0,0,.05a206.63,206.63,0,0,0-7-28.84h-.11a202.16,202.16,0,0,1,7.07,29h0a203.5,203.5,0,0,0-7.07-29H314.24c19.05,17,31.36,40.17,31.36,67.05a86.55,86.55,0,0,1-12.31,44.73L231,478.45a2.44,2.44,0,0,1,0,.27V479h0v-.26A224,224,0,0,0,256,480c6.84,0,13.61-.39,20.3-1a222.91,222.91,0,0,0,29.78-4.74C405.68,451.52,480,362.4,480,255.94A225.25,225.25,0,0,0,476.75,217.79Z",
                }),
                r("path", {
                    d: "M256,345.5c-33.6,0-61.6-17.91-77.29-44.79L76,123.05l-.14-.24A224,224,0,0,0,207.4,474.55l0-.05,77.69-134.6A84.13,84.13,0,0,1,256,345.5Z",
                }),
                r("path", {
                    d: "M91.29,104.57l77.35,133.25A89.19,89.19,0,0,1,256,166H461.17a246.51,246.51,0,0,0-25.78-43.94l.12.08A245.26,245.26,0,0,1,461.17,166h.17a245.91,245.91,0,0,0-25.66-44,2.63,2.63,0,0,1-.35-.26A223.93,223.93,0,0,0,91.14,104.34l.14.24Z",
                })
            ),
        cS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 24 24" },
                r("path", {
                    d: "M21.86 17.86q.14 0 .25.12.1.13.1.25t-.11.33l-.32.46-.43.53-.44.5q-.21.25-.38.42l-.22.23q-.58.53-1.34 1.04-.76.51-1.6.91-.86.4-1.74.64t-1.67.24q-.9 0-1.69-.28-.8-.28-1.48-.78-.68-.5-1.22-1.17-.53-.66-.92-1.44-.38-.77-.58-1.6-.2-.83-.2-1.67 0-1 .32-1.96.33-.97.87-1.8.14.95.55 1.77.41.82 1.02 1.5.6.68 1.38 1.21.78.54 1.64.9.86.36 1.77.56.92.2 1.8.2 1.12 0 2.18-.24 1.06-.23 2.06-.72l.2-.1.2-.05zm-15.5-1.27q0 1.1.27 2.15.27 1.06.78 2.03.51.96 1.24 1.77.74.82 1.66 1.4-1.47-.2-2.8-.74-1.33-.55-2.48-1.37-1.15-.83-2.08-1.9-.92-1.07-1.58-2.33T.36 14.94Q0 13.54 0 12.06q0-.81.32-1.49.31-.68.83-1.23.53-.55 1.2-.96.66-.4 1.35-.66.74-.27 1.5-.39.78-.12 1.55-.12.7 0 1.42.1.72.12 1.4.35.68.23 1.32.57.63.35 1.16.83-.35 0-.7.07-.33.07-.65.23v-.02q-.63.28-1.2.74-.57.46-1.05 1.04-.48.58-.87 1.26-.38.67-.65 1.39-.27.71-.42 1.44-.15.72-.15 1.38zM11.96.06q1.7 0 3.33.39 1.63.38 3.07 1.15 1.43.77 2.62 1.93 1.18 1.16 1.98 2.7.49.94.76 1.96.28 1 .28 2.08 0 .89-.23 1.7-.24.8-.69 1.48-.45.68-1.1 1.22-.64.53-1.45.88-.54.24-1.11.36-.58.13-1.16.13-.42 0-.97-.03-.54-.03-1.1-.12-.55-.1-1.05-.28-.5-.19-.84-.5-.12-.09-.23-.24-.1-.16-.1-.33 0-.15.16-.35.16-.2.35-.5.2-.28.36-.68.16-.4.16-.95 0-1.06-.4-1.96-.4-.91-1.06-1.64-.66-.74-1.52-1.28-.86-.55-1.79-.89-.84-.3-1.72-.44-.87-.14-1.76-.14-1.55 0-3.06.45T.94 7.55q.71-1.74 1.81-3.13 1.1-1.38 2.52-2.35Q6.68 1.1 8.37.58q1.7-.52 3.58-.52Z",
                })
            ),
        uS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 512 512" },
                r("path", {
                    d: "M130.22 127.548C130.38 127.558 130.3 127.558 130.22 127.548V127.548ZM481.64 172.898C471.03 147.398 449.56 119.898 432.7 111.168C446.42 138.058 454.37 165.048 457.4 185.168C457.405 185.306 457.422 185.443 457.45 185.578C429.87 116.828 383.098 89.1089 344.9 28.7479C329.908 5.05792 333.976 3.51792 331.82 4.08792L331.7 4.15792C284.99 30.1109 256.365 82.5289 249.12 126.898C232.503 127.771 216.219 131.895 201.19 139.035C199.838 139.649 198.736 140.706 198.066 142.031C197.396 143.356 197.199 144.87 197.506 146.323C197.7 147.162 198.068 147.951 198.586 148.639C199.103 149.327 199.76 149.899 200.512 150.318C201.264 150.737 202.096 150.993 202.954 151.071C203.811 151.148 204.676 151.045 205.491 150.768L206.011 150.558C221.511 143.255 238.408 139.393 255.541 139.238C318.369 138.669 352.698 183.262 363.161 201.528C350.161 192.378 326.811 183.338 304.341 187.248C392.081 231.108 368.541 381.784 246.951 376.448C187.487 373.838 149.881 325.467 146.421 285.648C146.421 285.648 157.671 243.698 227.041 243.698C234.541 243.698 255.971 222.778 256.371 216.698C256.281 214.698 213.836 197.822 197.281 181.518C188.434 172.805 184.229 168.611 180.511 165.458C178.499 163.75 176.392 162.158 174.201 160.688C168.638 141.231 168.399 120.638 173.51 101.058C148.45 112.468 128.96 130.508 114.8 146.428H114.68C105.01 134.178 105.68 93.7779 106.25 85.3479C106.13 84.8179 99.022 89.0159 98.1 89.6579C89.5342 95.7103 81.5528 102.55 74.26 110.088C57.969 126.688 30.128 160.242 18.76 211.318C14.224 231.701 12 255.739 12 263.618C12 398.318 121.21 507.508 255.92 507.508C376.56 507.508 478.939 420.281 496.35 304.888C507.922 228.192 481.64 173.82 481.64 172.898Z",
                })
            ),
        pS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 512 512" },
                r("path", {
                    d: "M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z",
                })
            ),
        dS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 496 512" },
                r("path", {
                    d: "M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z",
                })
            ),
        mS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 512 512" },
                r("path", {
                    d: "M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z",
                })
            ),
        fS = (e) =>
            r(
                "svg",
                { ...e, fill: "currentColor", viewBox: "0 0 16 16" },
                r("path", {
                    fillRule: "evenodd",
                    d: "M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 0 1-.5.5h-.77a.5.5 0 0 1-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777ZM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14Z",
                })
            ),
        gS = lt(() => Ss("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"));
    var hS = () => `BetterSessions_savedSessions_${R.getCurrentUser().id}`,
        Ro = new Map();
    function lc(e) {
        return `${e.os} \xB7 ${e.platform}`;
    }
    function cc() {
        return It(hS(), Ro);
    }
    async function yS() {
        ((await wt(hS())) || new Map()).forEach((t, o) => {
            Ro.set(o, t);
        });
    }
    function vS(e) {
        switch (e) {
            case "Windows Mobile":
            case "Windows":
                return "#55a6ef";
            case "Linux":
                return "#cdcd31";
            case "Android":
                return "#7bc958";
            case "Mac OS X":
            case "iOS":
                return "";
            default:
                return "#f3799a";
        }
    }
    function bS(e) {
        switch (e) {
            case "Discord Android":
            case "Discord iOS":
            case "Discord Client":
                return aS;
            case "Android Chrome":
            case "Chrome iOS":
            case "Chrome":
                return lS;
            case "Edge":
                return cS;
            case "Firefox":
                return uS;
            case "Internet Explorer":
                return pS;
            case "Opera Mini":
            case "Opera":
                return dS;
            case "Mobile Safari":
            case "Safari":
                return mS;
            case "BlackBerry":
            case "Facebook Mobile":
            case "Android Mobile":
                return gS;
            default:
                return fS;
        }
    }
    Oe();
    S();
    function SS({ props: e, session: t, state: o }) {
        let [n, i] = o,
            [s, c] = xe.useState(Ro.get(t.id_hash)?.name ?? "");
        function u() {
            Ro.set(t.id_hash, { name: s, isNew: !1 }), i(s !== "" ? `${s}*` : lc(t.client_info)), cc(), e.onClose();
        }
        return r(
            ve,
            { ...e },
            r(Re, null, r(N.FormTitle, { tag: "h4" }, "Rename")),
            r(
                Ie,
                null,
                r(N.FormTitle, { tag: "h5", style: { marginTop: "10px" } }, "New device name"),
                r(ht, {
                    style: { marginBottom: "10px" },
                    placeholder: lc(t.client_info),
                    value: s,
                    onChange: c,
                    onKeyDown: (p) => {
                        p.key === "Enter" && u();
                    },
                }),
                r(
                    F,
                    {
                        style: { marginBottom: "20px", paddingLeft: "1px", paddingRight: "1px", opacity: 0.6 },
                        look: F.Looks.LINK,
                        color: F.Colors.LINK,
                        size: F.Sizes.NONE,
                        onClick: () => c(""),
                    },
                    "Reset Name"
                )
            ),
            r(
                St,
                null,
                r(
                    "div",
                    { className: "vc-betterSessions-footer-buttons" },
                    r(F, { color: F.Colors.PRIMARY, onClick: () => e.onClose() }, "Cancel"),
                    r(F, { color: F.Colors.BRAND, onClick: u }, "Save")
                )
            )
        );
    }
    function xS({ session: e, state: t }) {
        return r(
            jt,
            {
                variant: "secondary",
                size: "xs",
                className: "vc-betterSessions-rename-btn",
                onClick: () => fe((o) => r(SS, { props: o, session: e, state: t })),
            },
            "Rename"
        );
    }
    var GP = it("AuthSessionsStore"),
        HP = ee("timestamp", "blockquoteContainer"),
        zP = ee("sessionIcon"),
        WP = ge("!1,lowerBadgeSize:"),
        x0 = w({
            backgroundCheck: {
                type: 3,
                description:
                    "Check for new sessions in the background, and display notifications when they are detected",
                default: !1,
                restartNeeded: !0,
            },
            checkInterval: {
                description: "How often to check for new sessions in the background (if enabled), in minutes",
                type: 1,
                default: 20,
                restartNeeded: !0,
            },
        }),
        Lp = v({
            name: "BetterSessions",
            description:
                "Enhances the sessions (devices) menu. Allows you to view exact timestamps, give each session a custom name, and receive notifications about new sessions.",
            authors: [d.amia],
            settings: x0,
            patches: [
                {
                    find: "#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}",
                    replacement: [
                        {
                            match: /({variant:"eyebrow",className:\i\.\i,children:).{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:\i\[\d+\]}\)\]}\)\]/,
                            replace: "$1$self.renderName(arguments[0])",
                        },
                        {
                            match: /({variant:"text-sm\/medium",className:\i\.\i,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,
                            replace: "$1$self.renderTimestamp({...arguments[0],timeLabel:$2})}",
                        },
                        {
                            match: /children:\[(?=.{0,125}?width:"32")(?<=,icon:(\i)\}.+?)/,
                            replace: "children:[$self.renderIcon({...arguments[0],DeviceIcon:$1}),false&&",
                        },
                    ],
                },
            ],
            renderName: C.wrap(
                ({ session: e }) => {
                    let t = Ro.get(e.id_hash),
                        o = xe.useState(t?.name ? `${t.name}*` : lc(e.client_info)),
                        [n, i] = o;
                    return r(
                        f,
                        null,
                        r("span", null, n),
                        (t == null || t.isNew) &&
                            r(
                                "div",
                                {
                                    className: "vc-addon-badge",
                                    style: { backgroundColor: "#ED4245", marginLeft: "2px" },
                                },
                                "NEW"
                            ),
                        r(xS, { session: e, state: o })
                    );
                },
                { noop: !0 }
            ),
            renderTimestamp: C.wrap(
                ({ session: e, timeLabel: t }) =>
                    r(V, { text: e.approx_last_used_time.toLocaleString() }, (o) =>
                        r("span", { ...o, className: HP.timestamp }, t)
                    ),
                { noop: !0 }
            ),
            renderIcon: C.wrap(
                ({ session: e, DeviceIcon: t }) => {
                    let o = bS(e.client_info.platform);
                    return r(
                        WP,
                        {
                            isFolder: !0,
                            style: { cursor: "unset" },
                            selected: !1,
                            lowerBadge: r(
                                "div",
                                {
                                    style: {
                                        width: "20px",
                                        height: "20px",
                                        display: "flex",
                                        justifyContent: "center",
                                        alignItems: "center",
                                        overflow: "hidden",
                                        borderRadius: "50%",
                                        backgroundColor: "var(--interactive-icon-default)",
                                        color: "var(--background-base-lower)",
                                    },
                                },
                                r(o, { width: 14, height: 14 })
                            ),
                            lowerBadgeSize: { width: 20, height: 20 },
                        },
                        r(
                            "div",
                            { className: zP.sessionIcon, style: { backgroundColor: vS(e.client_info.os) } },
                            r(t, { size: "md", color: "currentColor" })
                        )
                    );
                },
                { noop: !0 }
            ),
            async checkNewSessions() {
                let e = await Ct.get({ url: vt.Endpoints.AUTH_SESSIONS });
                for (let t of e.body.user_sessions)
                    Ro.has(t.id_hash) ||
                        (Ro.set(t.id_hash, { name: "", isNew: !0 }),
                        He({
                            title: "BetterSessions",
                            body: `New session:
${t.client_info.os} \xB7 ${t.client_info.platform} \xB7 ${t.client_info.location}`,
                            permanent: !0,
                            onClick: () => Fn.openUserSettings("sessions_panel"),
                        }));
                cc();
            },
            flux: {
                USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM() {
                    let e = GP.getSessions().map((t) => t.id_hash);
                    e.forEach((t) => {
                        Ro.has(t) || Ro.set(t, { name: "", isNew: !1 });
                    }),
                        e.length > 0 &&
                            Ro.forEach((t, o) => {
                                e.includes(o) || Ro.delete(o);
                            }),
                        Ro.forEach((t) => {
                            t.isNew = !1;
                        }),
                        cc();
                },
            },
            async start() {
                await yS(),
                    this.checkNewSessions(),
                    x0.store.backgroundCheck &&
                        (this.checkInterval = setInterval(this.checkNewSessions, x0.store.checkInterval * 60 * 1e3));
            },
            stop() {
                clearInterval(this.checkInterval);
            },
        });
    a();
    l();
    a();
    l();
    pt();
    dr();
    S();
    a();
    l();
    T();
    G();
    S();
    var jP = ge(".HEADER_BAR_BADGE_TOP:", '"aria-haspopup":'),
        T0 = w({ showPluginMenu: { type: 3, default: !0, description: "Show the plugins menu in the toolbox" } });
    function qP({ isShown: e }) {
        return r(
            "svg",
            { viewBox: "0 0 27 27", width: 24, height: 24, className: "vc-toolbox-icon" },
            e
                ? r("path", {
                      fill: "currentColor",
                      d: "M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4",
                  })
                : r("path", {
                      fill: "currentColor",
                      d: "M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1",
                  })
        );
    }
    function KP({ buttonClass: e }) {
        let t = at(null),
            [o, n] = k(!1);
        return r(
            Ps,
            {
                position: "bottom",
                align: "right",
                animation: Ps.Animation.NONE,
                shouldShow: o,
                onRequestClose: () => n(!1),
                targetElementRef: t,
                renderPopout: () => TS(() => n(!1)),
            },
            (i, { isShown: s }) =>
                r(jP, {
                    ref: t,
                    className: `vc-toolbox-btn ${e}`,
                    onClick: () => n((c) => !c),
                    tooltip: s ? null : "Vencord Toolbox",
                    icon: () => r(qP, { isShown: s }),
                    selected: s,
                })
        );
    }
    var Qi = v({
        name: "VencordToolbox",
        description: "Adds a button to the titlebar that houses Vencord quick actions",
        authors: [d.Ven, d.AutumnVN],
        settings: T0,
        patches: [
            {
                find: '?"BACK_FORWARD_NAVIGATION":',
                replacement: {
                    match: /(?<=trailing:.{0,50})\i\.Fragment,\{(?=.+?className:(\i\.\i))/,
                    replace: "$self.TrailingWrapper,{className:$1,",
                },
            },
        ],
        TrailingWrapper({ children: e, className: t }) {
            return r(f, null, e, r(C, { noop: !0 }, r(KP, { buttonClass: t })));
        },
    });
    function YP() {
        let { showPluginMenu: e } = T0.use(["showPluginMenu"]),
            t = w0();
        return e ? r(M.MenuItem, { id: "plugins", label: "Plugins", action: () => Fs(qs) }, t) : null;
    }
    function w0(e = !1) {
        let t = Ee().plugins,
            [o, n] = k(""),
            i = o.toLowerCase(),
            s = ce(() => Object.values($e).sort((u, p) => u.name.localeCompare(p.name)), []),
            c = ce(
                () => s.filter((u) => (!ke(u.name) || u.name.endsWith("API") ? !1 : u.name.toLowerCase().includes(i))),
                [i]
            );
        return r(
            f,
            null,
            r(M.MenuControlItem, {
                id: "plugins-search",
                control: (u, p) => r(M.MenuSearchControl, { ...u, query: o, onChange: n, ref: p }),
            }),
            r(M.MenuSeparator, null),
            c.map((u) => {
                let p = [],
                    m = !1;
                if (u.options)
                    for (let [b, x] of Object.entries(u.options)) {
                        if ("hidden" in x && x.hidden) continue;
                        m = !0;
                        let P = t[u.name],
                            I = {
                                id: `${u.name}-${b}`,
                                key: b,
                                label: vi(Ya(b)),
                                disabled: "disabled" in x ? x.disabled?.call(u.settings) : !1,
                            };
                        switch (x.type) {
                            case 3:
                                p.push(
                                    r(M.MenuCheckboxItem, {
                                        ...I,
                                        checked: P[b],
                                        action: () => {
                                            (P[b] = !P[b]), x.restartNeeded && Ge("Restart to apply the change");
                                        },
                                    })
                                );
                                break;
                            case 4:
                                p.push(
                                    r(
                                        M.MenuItem,
                                        { ...I },
                                        x.options.map((D) =>
                                            r(M.MenuRadioItem, {
                                                group: `${u.name}-${b}`,
                                                id: `${u.name}-${b}-${D.value}`,
                                                key: D.label,
                                                label: D.label,
                                                checked: P[b] === D.value,
                                                action: () => {
                                                    (P[b] = D.value),
                                                        x.restartNeeded && Ge("Restart to apply the change");
                                                },
                                            })
                                        )
                                    )
                                );
                                break;
                            case 5:
                                if (x.stickToMarkers || x.componentProps) continue;
                                p.push(
                                    r(M.MenuControlItem, {
                                        ...I,
                                        control: (D, A) =>
                                            r(M.MenuSliderControl, {
                                                ref: A,
                                                ...D,
                                                minValue: x.markers[0],
                                                maxValue: x.markers.at(-1),
                                                value: P[b],
                                                onChange: (E) => (P[b] = E),
                                            }),
                                    })
                                );
                                break;
                        }
                    }
                let h = p.length > 0;
                return !h && !(e && m)
                    ? null
                    : r(
                          M.MenuItem,
                          { id: `${u.name}-menu`, key: u.name, label: u.name, action: () => wr(u) },
                          h &&
                              r(
                                  f,
                                  null,
                                  r(M.MenuGroup, { label: u.name }, p),
                                  r(M.MenuSeparator, null),
                                  r(M.MenuItem, { id: `${u.name}-open`, label: "Open Settings", action: () => wr(u) })
                              )
                      );
            })
        );
    }
    function ZP() {
        return r(M.MenuItem, { id: "themes", label: "Themes", action: () => Fs(Zi) }, I0());
    }
    function I0() {
        let { useQuickCss: e, enabledThemes: t } = Ee(["useQuickCss", "enabledThemes"]),
            [o] = _t(VencordNative.themes.getThemesList);
        return r(
            f,
            null,
            r(M.MenuCheckboxItem, {
                id: "toggle-quickcss",
                checked: e,
                label: "Enable QuickCSS",
                action: () => {
                    W.useQuickCss = !e;
                },
            }),
            r(M.MenuItem, {
                id: "edit-quickcss",
                label: "Edit QuickCSS",
                action: () => VencordNative.quickCss.openEditor(),
            }),
            r(M.MenuItem, { id: "manage-themes", label: "Manage Themes", action: () => Fs(Zi) }),
            !!o?.length &&
                r(
                    M.MenuGroup,
                    null,
                    o.map((n) =>
                        r(M.MenuCheckboxItem, {
                            id: `theme-${n.fileName}`,
                            key: n.fileName,
                            label: n.name,
                            checked: t.includes(n.fileName),
                            action: () => {
                                t.includes(n.fileName)
                                    ? (W.enabledThemes = t.filter((i) => i !== n.fileName))
                                    : (W.enabledThemes = [...t, n.fileName]);
                            },
                        })
                    )
                )
        );
    }
    function QP() {
        let e = [];
        for (let o of Object.values($e))
            if (o.toolboxActions && ke(o.name)) {
                let n =
                    typeof o.toolboxActions == "function"
                        ? o.toolboxActions()
                        : Object.entries(o.toolboxActions).map(([i, s]) => {
                              let c = `${o.name}-${i}`;
                              return r(M.MenuItem, { id: c, key: c, label: i, action: s });
                          });
                if (!n || (Array.isArray(n) && n.length === 0)) continue;
                e.push({ plugin: o, node: r(M.MenuGroup, { label: o.name, key: `${o.name}-group` }, n) });
            }
        if (e.length <= 5) return e.map((o) => o.node);
        let t = e.map(({ node: o, plugin: n }) =>
            r(M.MenuItem, { id: `${n.name}-menu`, key: `${n.name}-menu`, label: n.name, action: () => wr(n) }, o)
        );
        return r(M.MenuGroup, null, t);
    }
    function TS(e) {
        return r(
            M.Menu,
            { navId: "vc-toolbox", onClose: e },
            r(M.MenuItem, { id: "notifications", label: "Open Notification Log", action: Ks }),
            ZP(),
            YP(),
            QP()
        );
    }
    T();
    Pe();
    le();
    G();
    S();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/betterSettings/fullHeightContext.css", {
        name: "src/plugins/betterSettings/fullHeightContext.css",
        source: `/*
 * Discord has dumb max height logic for their context menus.
 * If a context menu is at the bottom of the screen, its submenus are capped to its max height and can't even grow upwards
 * We unset the variable they use to cap height. This allows submenus to grow as tall as they want
 */

#user-settings-cog,
[aria-activedescendant^="user-settings-cog"] {
    --reference-position-layer-max-height: initial !important;
}`,
        classNames: {},
        dom: null,
    });
    var P0 = "src/plugins/betterSettings/fullHeightContext.css";
    var XP = Y(""),
        M0 = ee("animating", "baseLayer", "bg", "layer", "layers"),
        vn = w({
            disableFade: { description: "Disable the crossfade animation", type: 3, default: !0, restartNeeded: !0 },
            organizeMenu: {
                description: "Organizes the settings cog context menu into categories",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            eagerLoad: {
                description: "Removes the loading delay when opening the menu for the first time",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
        });
    function JP({ mode: e, baseLayer: t = !1, ...o }) {
        let n = e === "HIDDEN",
            i = at(null);
        te(
            () => () => {
                Io.dispatch("LAYER_POP_START"), Io.dispatch("LAYER_POP_COMPLETE");
            },
            []
        );
        let s = r("div", {
            ref: i,
            "aria-hidden": n,
            className: XP({ [M0.layer]: !0, [M0.baseLayer]: t, "stop-animations": n }),
            style: { opacity: n ? 0 : void 0 },
            ...o,
        });
        return t ? s : r(xu, { containerRef: i }, s);
    }
    var Op = v({
        name: "BetterSettings",
        description: "Enhances your settings-menu-opening experience",
        authors: [d.Kyuuhachi],
        settings: vn,
        start() {
            vn.store.organizeMenu && Go(P0);
        },
        stop() {
            Ho(P0);
        },
        patches: [
            {
                find: "this.renderArtisanalHack()",
                replacement: [
                    {
                        match: /class (\i)(?= extends \i\.PureComponent.+?static contextType=.+?jsx\)\(\1,\{mode:)/,
                        replace: "var $1=$self.Layer;class VencordPatchedOldFadeLayer",
                        predicate: () => vn.store.disableFade,
                    },
                    {
                        match: /createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,
                        replace: "$&,_:$1",
                        predicate: () => vn.store.eagerLoad,
                    },
                ],
            },
            {
                find: 'minimal:"contentColumnMinimal"',
                replacement: [
                    {
                        match: /(?=\(0,\i\.\i\)\((\i),\{from:\{position:"absolute")/,
                        replace: "(_cb=>_cb(void 0,$1))||",
                    },
                    { match: /\i\.animated\.div/, replace: '"div"' },
                ],
                predicate: () => vn.store.disableFade,
            },
            {
                find: '"data-mana-component":"layer-modal"',
                replacement: [
                    { match: /(\i)\.animated\.div(?=,\{"data-mana-component":"layer-modal")/, replace: '"div"' },
                    { match: /(?<="data-mana-component":"layer-modal"[^}]*?)style:\i,/, replace: "style:{}," },
                ],
                predicate: () => vn.store.disableFade,
            },
            {
                find: "headerId:void 0,headerIdIsManaged:!1",
                replacement: { match: /let (\i)=300/, replace: "let $1=0" },
                predicate: () => vn.store.disableFade,
            },
            {
                find: "handleOpenSettingsContextMenu=",
                replacement: {
                    match: /(?=handleOpenSettingsContextMenu=.{0,100}?null!=\i&&.{0,100}?(await [^};]*?\)\)))/,
                    replace: "_vencordBetterSettingsEagerLoad=(async ()=>$1)();",
                },
                predicate: () => vn.store.eagerLoad,
            },
            {
                find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",
                predicate: () => vn.store.organizeMenu,
                replacement: [
                    {
                        match: /children:\[(\i),(?<=\1=.{0,30}\.openUserSettings.+?)/,
                        replace: "children:[$self.transformSettingsEntries($1),",
                    },
                ],
            },
        ],
        Layer(e) {
            try {
                [xu.$$vencordGetWrappedComponent(), Io, M0.layer].forEach((t) => t.test);
            } catch {
                return new U("BetterSettings").error("Failed to find some components"), e.children;
            }
            return r(JP, { ...e });
        },
        transformSettingsEntries(e) {
            let t = [];
            for (let o of e) {
                let { key: n, props: i } = o;
                if (i)
                    if (n === "vencord_plugins" || n === "vencord_themes") {
                        let s = n === "vencord_plugins" ? w0() : I0();
                        t.push(r(M.MenuItem, { key: n, label: i.label, id: i.label, ...i }, s));
                    } else
                        n.endsWith("_section") && i.label
                            ? t.push(
                                  r(
                                      M.MenuItem,
                                      { key: n, label: i.label, id: i.label },
                                      this.transformSettingsEntries(i.children)
                                  )
                              )
                            : t.push(o);
            }
            return t;
        },
    });
    a();
    l();
    T();
    var _p = v({
        name: "BetterUploadButton",
        authors: [d.fawn, d.Ven],
        description: "Upload with a single click, open menu with right click",
        patches: [
            {
                find: ".CHAT_INPUT_BUTTON_NOTIFICATION,",
                replacement: [
                    {
                        match: /onClick:(\i\?void 0:\i)(?=,onDoubleClick:(\i\?void 0:\i),)/,
                        replace: "$&,...$self.getOverrides(arguments[0],$1,$2)",
                    },
                ],
            },
        ],
        getOverrides(e, t, o) {
            return e?.className?.includes("attachButton") ? { onClick: o, onContextMenu: t } : {};
        },
    });
    a();
    l();
    Ue();
    T();
    se();
    S();
    a();
    l();
    G();
    var wS = it("ApplicationStreamPreviewStore"),
        IS = it("ApplicationStreamingStore");
    var VP = async ({ guildId: e, channelId: t, ownerId: o }) => {
            let n = await wS.getPreviewURL(e, t, o);
            n && Co({ url: n, height: 720, width: 1280 });
        },
        PS = (e, { userId: t }) => {
            let o = IS.getAnyStreamForUser(t);
            if (!o) return;
            let n = r(M.MenuItem, {
                label: "View Stream Preview",
                id: "view-stream-preview",
                icon: zg,
                action: () => o && VP(o),
                disabled: !o,
            });
            e.push(r(M.MenuSeparator, null), n);
        },
        eM = (e, { stream: t }) => PS(e, { userId: t.ownerId }),
        tM = (e, { user: t }) => {
            if (t) return PS(e, { userId: t.id });
        },
        Ep = v({
            name: "BiggerStreamPreview",
            description: "This plugin allows you to enlarge stream previews",
            authors: [d.phil],
            contextMenus: { "user-context": tM, "stream-context": eM },
        });
    a();
    l();
    T();
    Pe();
    var C0;
    function MS() {
        C0.textContent = `
        .vc-nsfw-img [class*=imageContainer],
        .vc-nsfw-img [class*=wrapperPaused] {
            filter: blur(${W.plugins.BlurNSFW.blurAmount}px);
            transition: filter 0.2s;

            &:hover {
                filter: blur(0);
            }
        }
        `;
    }
    var Bp = v({
        name: "BlurNSFW",
        description: "Blur attachments in NSFW channels until hovered",
        authors: [d.Ven],
        patches: [
            {
                find: "}renderStickersAccessories(",
                replacement: [
                    {
                        match: /(\.renderReactions\(\i\).+?className:)/,
                        replace: '$&(this.props?.channel?.nsfw?"vc-nsfw-img ":"")+',
                    },
                ],
            },
        ],
        options: { blurAmount: { type: 1, description: "Blur Amount (in pixels)", default: 10, onChange: MS } },
        start() {
            (C0 = Eo("VcBlurNsfw", $i)), MS();
        },
        stop() {
            C0?.remove();
        },
    });
    a();
    l();
    T();
    pt();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/callTimer/alignedChatInputFix.css", {
        name: "src/plugins/callTimer/alignedChatInputFix.css",
        source: `[class*="panels"] [class*="inner"],
[class*="rtcConnectionStatus"] {
    height: fit-content !important;
}`,
        classNames: {},
        dom: null,
    });
    var CS = "src/plugins/callTimer/alignedChatInputFix.css";
    function oM(e) {
        let t = W.plugins.CallTimer.format === "human",
            o = (h) => (t ? h : h.toString().padStart(2, "0")),
            n = (h) => (t ? h : ""),
            i = t ? " " : ":",
            s = Math.floor(e / 864e5),
            c = Math.floor((e % 864e5) / 36e5),
            u = Math.floor(((e % 864e5) % 36e5) / 6e4),
            p = Math.floor((((e % 864e5) % 36e5) % 6e4) / 1e3),
            m = "";
        return (
            s && (m += `${s}d `),
            (c || m) && (m += `${o(c)}${n("h")}${i}`),
            (u || m || !t) && (m += `${o(u)}${n("m")}${i}`),
            (m += `${o(p)}${n("s")}`),
            m
        );
    }
    var Up = v({
        name: "CallTimer",
        description: "Adds a timer to vcs",
        authors: [d.Ven],
        managedStyle: CS,
        startTime: 0,
        interval: void 0,
        options: {
            format: {
                type: 4,
                description: "The timer format. This can be any valid moment.js format",
                options: [
                    { label: "30d 23:00:42", value: "stopwatch", default: !0 },
                    { label: "30d 23h 00m 42s", value: "human" },
                ],
            },
        },
        patches: [
            {
                find: "renderConnectionStatus(){",
                replacement: {
                    match: /(lineClamp:1,children:)(\i)(?=,|}\))/,
                    replace: "$1[$2,$self.renderTimer(this.props.channel.id)]",
                },
            },
        ],
        renderTimer(e) {
            return r(C, { noop: !0 }, r(this.Timer, { channelId: e }));
        },
        Timer({ channelId: e }) {
            let t = il({ deps: [e] });
            return r("p", { style: { margin: 0, fontFamily: "var(--font-code)" } }, oM(t));
        },
    });
    a();
    l();
    T();
    var rM = "https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json",
        Fp = v({
            name: "ClearURLs",
            description: "Automatically removes tracking elements from URLs you send",
            authors: [d.adryd, d.thororen],
            rules: [],
            async start() {
                await this.createRules();
            },
            stop() {
                this.rules = [];
            },
            onBeforeMessageSend(e, t) {
                return this.cleanMessage(t);
            },
            onBeforeMessageEdit(e, t, o) {
                return this.cleanMessage(o);
            },
            async createRules() {
                let e = await g(rM).then((t) => t.json());
                this.rules = [];
                for (let [t, o] of Object.entries(e.providers)) {
                    let n = new RegExp(o.urlPattern, "i"),
                        i = o.rules?.map((u) => new RegExp(u, "i")),
                        s = o.rawRules?.map((u) => new RegExp(u, "i")),
                        c = o.exceptions?.map((u) => new RegExp(u, "i"));
                    this.rules.push({ name: t, urlPattern: n, rules: i, rawRules: s, exceptions: c });
                }
            },
            replacer(e) {
                try {
                    var t = new URL(e);
                } catch {
                    return e;
                }
                return t.searchParams.entries().next().done
                    ? e
                    : (this.rules.forEach(({ urlPattern: o, exceptions: n, rawRules: i, rules: s }) => {
                          if (!o.test(t.href) || n?.some((p) => p.test(t.href))) return;
                          let c = [];
                          s &&
                              t.searchParams.forEach((p, m) => {
                                  s.some((h) => h.test(m)) && c.push(m);
                              }),
                              c.forEach((p) => t.searchParams.delete(p));
                          let u = t.href;
                          i?.forEach((p) => {
                              u = u.replace(p, "");
                          }),
                              (t = new URL(u));
                      }),
                      t.toString());
            },
            cleanMessage(e) {
                /http(s)?:\/\//.test(e.content) &&
                    (e.content = e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g, (t) => this.replacer(t)));
            },
        });
    a();
    l();
    T();
    var $p = v({
        name: "ColorSighted",
        description: "Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",
        authors: [d.lewisakura],
        patches: [
            {
                find: "Masks.STATUS_ONLINE",
                replacement: { match: /Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g, replace: "Masks.STATUS_ONLINE" },
            },
            {
                find: ".AVATAR_STATUS_MOBILE_16;",
                replacement: { match: /(fromIsMobile:\i=!0,.+?)status:(\i)/, replace: '$1status_$:$2="online"' },
            },
        ],
    });
    a();
    l();
    T();
    S();
    var Nr = () => {},
        nM = {
            logDangerously: Nr,
            log: Nr,
            verboseDangerously: Nr,
            verbose: Nr,
            info: Nr,
            warn: Nr,
            error: Nr,
            trace: Nr,
            time: Nr,
            fileOnly: Nr,
        },
        Xi = new Set();
    function iM({ settingKey: e }) {
        let { allowLevel: t } = Ji.use(["allowLevel"]),
            o = t[e];
        return r(
            hh,
            { value: o, onChange: (n, i) => (Ji.store.allowLevel[e] = i), size: 20 },
            r(H, { variant: "text-sm/normal" }, e[0].toUpperCase() + e.slice(1))
        );
    }
    var sM = C.wrap(() =>
            r(
                or,
                { name: "Filter List", description: "Always allow loggers of these types" },
                r(
                    "div",
                    { style: { display: "flex", flexDirection: "row" } },
                    Object.keys(Ji.store.allowLevel).map((e) => r(iM, { key: e, settingKey: e }))
                )
            )
        ),
        Ji = w({
            disableLoggers: { type: 3, description: "Disables Discords loggers", default: !1, restartNeeded: !0 },
            disableSpotifyLogger: {
                type: 3,
                description: "Disable the Spotify logger, which leaks account information and access token",
                default: !0,
                restartNeeded: !0,
            },
            whitelistedLoggers: {
                type: 0,
                description: "Semicolon (;) separated list of loggers to allow even if others are hidden",
                default: "GatewaySocket; Routing/Utils",
                multiline: !0,
                onChange(e) {
                    Xi.clear(),
                        e
                            .split(";")
                            .map((t) => t.trim())
                            .forEach(Xi.add.bind(Xi));
                },
            },
            allowLevel: {
                type: 6,
                component: sM,
                default: { error: !0, warn: !1, trace: !1, log: !1, info: !1, debug: !1 },
            },
        }),
        Gp = v({
            name: "ConsoleJanitor",
            description: "Disables annoying console messages/errors",
            authors: [d.Nuckyz, d.sadan],
            settings: Ji,
            startAt: "Init",
            start() {
                Xi.clear(),
                    this.settings.store.whitelistedLoggers
                        ?.split(";")
                        .map((e) => e.trim())
                        .forEach(Xi.add.bind(Xi));
            },
            Noop: Nr,
            NoopLogger: () => nM,
            shouldLog(e, t) {
                return Xi.has(e) || Ji.store.allowLevel[t] === !0;
            },
            patches: [
                {
                    find: "https://github.com/highlightjs/highlight.js/issues/2277",
                    replacement: { match: /\(console.log\(`Deprecated.+?`\),/, replace: "(" },
                },
                {
                    find: 'The "interpolate" function is deprecated in v10 (use "to" instead)',
                    replacement: {
                        match: /,console.warn\(\i\+'The "interpolate" function is deprecated in v10 \(use "to" instead\)'\)/,
                        replace: "",
                    },
                },
                {
                    find: 'console.warn("Window state not initialized"',
                    replacement: { match: /console\.warn\("Window state not initialized",\i\),/, replace: "" },
                },
                {
                    find: "is not a valid locale.",
                    replacement: [{ match: /\i\.error(?=\(`\$\{\i\} is not a valid locale.`)/, replace: "$self.Noop" }],
                },
                {
                    find: '"AppCrashedFatalReport: getLastCrash not supported."',
                    replacement: {
                        match: /console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,
                        replace: "$self.Noop",
                    },
                },
                {
                    find: "RPCServer:WSS",
                    replacement: {
                        match: /\i\.error\(`Error: \$\{(\i)\.message\}/,
                        replace: '!$1.message.includes("EADDRINUSE")&&$&',
                    },
                },
                {
                    find: "Tried getting Dispatch instance before instantiated",
                    replacement: {
                        match: /null==\i&&\i\.warn\("Tried getting Dispatch instance before instantiated"\),/,
                        replace: "",
                    },
                },
                {
                    find: "Unable to determine render window for element",
                    replacement: {
                        match: /console\.warn\("Unable to determine render window for element",\i\),/,
                        replace: "",
                    },
                },
                {
                    find: "failed to send analytics events",
                    replacement: [
                        {
                            match: /console\.error\(`\[analytics\] failed to send analytics events query: \$\{\i\}`\)/,
                            replace: "",
                        },
                    ],
                },
                {
                    find: "Slow dispatch on",
                    replacement: [
                        { match: /\i\.totalTime>\i&&\i\.verbose\([`"]Slow dispatch on.{0,55}\);/, replace: "" },
                    ],
                },
                {
                    find: '"file-only"!==',
                    predicate: () => Ji.store.disableLoggers,
                    replacement: {
                        match: /(?<=&&)(?=console)/,
                        replace: "$self.shouldLog(arguments[0],arguments[1])&&",
                    },
                },
                {
                    find: '("Spotify")',
                    predicate: () => Ji.store.disableSpotifyLogger,
                    replacement: { match: /new \i\.\i\("Spotify"\)/, replace: "$self.NoopLogger()" },
                },
            ],
        });
    a();
    l();
    T();
    se();
    vs();
    Fo();
    re();
    Oe();
    pr();
    G();
    G();
    S();
    a();
    l();
    le();
    pr();
    G();
    G();
    var aM = (e) => () => {
        throw new Error(`'${e}' is Discord Desktop only.`);
    };
    var Hp = (e, t, o) => (
        Object.hasOwn(o, "value") && (o.writable = !0),
        Object.defineProperty(e, t, { configurable: !0, enumerable: !0, ...o })
    );
    function N0() {
        function e(s, c = !1) {
            let u = new Map();
            return function (...p) {
                let m = String(p);
                if (u.has(m)) return u.get(m);
                let h = Rn(s(...p), { topLevelOnly: c }),
                    y = (() => {
                        switch (h.length) {
                            case 0:
                                return null;
                            case 1:
                                return h[0];
                            default:
                                let b = [...new Set(h)];
                                return (
                                    b.length > 1 &&
                                        console.warn(
                                            `Warning: This filter matches ${b.length} exports. Make it more specific!
`,
                                            b
                                        ),
                                    h[0]
                                );
                        }
                    })();
                return y && m && u.set(m, y), y;
            };
        }
        function t(s) {
            let c = new Map();
            return function (u) {
                let p = String(u);
                if (c.has(p)) return c.get(p);
                let m;
                try {
                    m = s(u);
                } catch {}
                return m && c.set(p, m), m;
            };
        }
        let o,
            n = e((s) => s),
            i = e(_.byProps);
        return {
            ...Object.fromEntries(Object.keys(An).map((s) => [s, { getter: () => An[s] }])),
            wp: bu,
            wpc: { getter: () => Zo },
            wreq: { getter: () => ct },
            wpPatcher: { getter: () => Vencord.WebpackPatcher },
            wpInstances: { getter: () => Vencord.WebpackPatcher.allWebpackInstances },
            wpsearch: Ts,
            wpex: nl,
            wpexs: (s) => nl(kn(s)),
            loadLazyChunks: () => {
                throw new Error("loadLazyChunks is dev only.");
            },
            find: n,
            findAll: Rn,
            findByProps: i,
            findAllByProps: (...s) => Rn(_.byProps(...s)),
            findByCode: e(_.byCode),
            findCssClasses: e(_.byClassNames, !0),
            findAllByCode: (s) => Rn(_.byCode(s)),
            findComponentByCode: e(_.componentByCode),
            findAllComponentsByCode: (...s) => Rn(_.componentByCode(...s)),
            findExportedComponent: (...s) => i(...s)[s[0]],
            findStore: t(ol),
            PluginsApi: { getter: () => Vencord.Plugins },
            plugins: { getter: () => Vencord.Plugins.plugins },
            Settings: { getter: () => Vencord.Settings },
            Api: { getter: () => Vencord.Api },
            Util: { getter: () => Vencord.Util },
            reload: () => location.reload(),
            restart: aM("restart"),
            canonicalizeMatch: Lt,
            canonicalizeReplace: ja,
            canonicalizeReplacement: qa,
            runtimeHashMessageKey: sn,
            fakeRender: (s, c) => {
                let u = o?.deref(),
                    p =
                        u?.closed === !1
                            ? u
                            : unsafeWindow.open("about:blank", "Fake Render", "popup,width=500,height=500");
                (o = new WeakRef(p)), p.focus();
                let m = p.document;
                (m.body.style.margin = "1em"),
                    p.prepared ||
                        ((p.prepared = !0),
                        [
                            ...document.querySelectorAll("style"),
                            ...document.querySelectorAll("link[rel=stylesheet]"),
                        ].forEach((y) => {
                            let b = y.cloneNode(!0);
                            y.parentElement?.tagName === "HEAD"
                                ? m.head.append(b)
                                : b.id?.startsWith("vencord-") || b.id?.startsWith("vcd-")
                                  ? m.documentElement.append(b)
                                  : m.body.append(b);
                        }));
                let h = Ii(m.body.appendChild(document.createElement("div")));
                h.render(xe.createElement(s, c)), m.addEventListener("close", () => h.unmount(), { once: !0 });
            },
            preEnable: (s) => ((Vencord.Settings.plugins[s] ??= { enabled: !0 }).enabled = !0),
            channel: { getter: () => Mo(), preload: !1 },
            channelId: { getter: () => Le.getChannelId(), preload: !1 },
            guild: { getter: () => jr(), preload: !1 },
            guildId: { getter: () => io.getGuildId(), preload: !1 },
            me: { getter: () => R.getCurrentUser(), preload: !1 },
            meId: { getter: () => R.getCurrentUser().id, preload: !1 },
            messages: { getter: () => qt.getMessages(Le.getChannelId()), preload: !1 },
            openModal: { getter: () => Sl.openModal },
            openModalLazy: { getter: () => Sl.openModalLazy },
            Stores: { getter: () => Object.fromEntries(Fr) },
            setExperiment: (s, c) => {
                B.dispatch({ type: "EXPERIMENT_OVERRIDE_BUCKET", experimentId: s, experimentBucket: c });
            },
        };
    }
    function NS(e, t, o) {
        let n = t.getter();
        if (!n || t.preload === !1) return n;
        function i(c) {
            if (c[ur]) o ? n[ur]() : n[on];
            else if (c.$$vencordGetWrappedComponent) return o ? c.$$vencordGetWrappedComponent() : c;
            return c;
        }
        let s = i(n);
        if (typeof s == "object" && s !== null) {
            let c = Object.getOwnPropertyDescriptors(s);
            for (let u in c) {
                if (s[u] == null) continue;
                let p = c[u];
                if (p.writable === !0 || p.set != null) {
                    let m = s[u],
                        h = i(m);
                    h != null && m !== h && (s[u] = h);
                }
            }
        }
        return s != null && (Hp(unsafeWindow.shortcutList, e, { value: s }), Hp(unsafeWindow, e, { value: s })), s;
    }
    var lM = bs.then(() => ir(1e3)),
        zp = v({
            name: "ConsoleShortcuts",
            description: "Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",
            authors: [d.Ven],
            startAt: "Init",
            patches: [
                {
                    find: "&&this.initializeIfNeeded()",
                    replacement: [
                        {
                            match: /\i&&this\.initializeIfNeeded\(\)/,
                            replace:
                                "$&,Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1})",
                        },
                    ],
                },
            ],
            start() {
                let e = N0();
                unsafeWindow.shortcutList = {};
                for (let [t, o] of Object.entries(e))
                    "getter" in o
                        ? (Hp(unsafeWindow.shortcutList, t, { get: () => NS(t, o, !0) }),
                          Hp(unsafeWindow, t, { get: () => unsafeWindow.shortcutList[t] }))
                        : ((unsafeWindow.shortcutList[t] = o), (unsafeWindow[t] = o));
                this.eagerLoad(!1);
            },
            async eagerLoad(e) {
                await lM;
                let t = N0();
                for (let [o, n] of Object.entries(t))
                    if (!(!Object.hasOwn(n, "getter") || n.preload === !1))
                        try {
                            NS(o, n, e);
                        } catch {}
            },
            stop() {
                delete unsafeWindow.shortcutList;
                for (let e in N0()) delete unsafeWindow[e];
            },
        });
    a();
    l();
    T();
    se();
    G();
    S();
    var { convertNameToSurrogate: cM } = X("convertNameToSurrogate");
    function uM(e, t) {
        let { id: o, name: n } = e.dataset;
        if (!o) return t ? cM(n) : `:${n}:`;
        let i = new URL(e.firstChild.src),
            s = i.searchParams.get("animated") === "true",
            c = i.pathname.endsWith(".gif");
        return `<${s || c ? "a" : ""}:${n.replace(/~\d+$/, "")}:${o}>`;
    }
    var AS = w({
            copyUnicode: {
                type: 3,
                description: "Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",
                default: !0,
            },
        }),
        Wp = v({
            name: "CopyEmojiMarkdown",
            description: "Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",
            authors: [d.HappyEnderman, d.Vishnya],
            settings: AS,
            contextMenus: {
                "expression-picker"(e, { target: t }) {
                    t.dataset.type === "emoji" &&
                        e.push(
                            r(M.MenuItem, {
                                id: "vc-copy-emoji-markdown",
                                label: "Copy Emoji Markdown",
                                action: () => {
                                    tt(uM(t, AS.store.copyUnicode), "Success! Copied emoji markdown.");
                                },
                            })
                        );
                },
            },
        });
    a();
    l();
    Ue();
    T();
    se();
    S();
    var pM = () =>
            r(
                "svg",
                { width: "24", height: "24", viewBox: "0 0 24 24" },
                r("path", {
                    fill: "currentColor",
                    d: "M21.7 5.3a1 1 0 0 1 0 1.4l-12 12a1 1 0 0 1-1.4 0l-6-6a1 1 0 1 1 1.4-1.4L9 16.58l11.3-11.3a1 1 0 0 1 1.4 0Z",
                })
            ),
        jp = v({
            name: "CopyFileContents",
            description: "Adds a button to text file attachments to copy their contents",
            authors: [d.Obsidian, d.Nuckyz],
            patches: [
                {
                    find: "#{intl::PREVIEW_BYTES_LEFT}",
                    replacement: {
                        match: /fileName:\i,fileSize:\i}\),(?=.{0,75}?setLanguage:)(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,
                        replace: "$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),",
                    },
                },
            ],
            addCopyButton: C.wrap(
                ({ fileContents: e, bytesLeft: t }) => {
                    let [o, n] = k(!1);
                    return r(
                        V,
                        { text: o ? "Copied!" : t > 0 ? "File too large to copy" : "Copy File Contents" },
                        (i) =>
                            r(
                                "div",
                                {
                                    ...i,
                                    className: "vc-cfc-button",
                                    role: "button",
                                    onClick: () => {
                                        !o && t <= 0 && (tt(e), n(!0), setTimeout(() => n(!1), 2e3));
                                    },
                                },
                                o ? r(pM, null) : t > 0 ? r($a, { color: "var(--channel-icon)" }) : r(en, null)
                            )
                    );
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    a();
    l();
    T();
    se();
    le();
    Oe();
    G();
    S();
    var mM = de(".GUILD_EMOJIS(", "EMOJI_UPLOAD_START"),
        fM = de(".additionalEmojiSlots"),
        gM = { 1: "png", 2: "png", 3: "json", 4: "gif" },
        RS = { 0: 5, 1: 15, 2: 30, 3: 60 },
        hM = 256 * 1024,
        yM = 512 * 1024;
    function vM(e) {
        return e.features.has("MORE_STICKERS") && e.premiumTier === 3 ? 120 : (RS[e.premiumTier] ?? RS[0]);
    }
    function kS(e, t) {
        return e.t === "Emoji"
            ? `${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.webp?size=${t}&lossless=true&animated=true`
            : `${unsafeWindow.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${gM[e.format_type]}?size=${t}&lossless=true&animated=true`;
    }
    async function DS(e) {
        let t = ao.getStickerById(e);
        if (t) return t;
        let { body: o } = await Ct.get({ url: vt.Endpoints.STICKER(e) });
        return B.dispatch({ type: "STICKER_FETCH_SUCCESS", sticker: o }), o;
    }
    async function bM(e, t) {
        let o = new FormData();
        o.append("name", t.name),
            o.append("tags", t.tags),
            o.append("description", t.description),
            o.append("file", await LS(t));
        let { body: n } = await Ct.post({ url: vt.Endpoints.GUILD_STICKER_PACKS(e), body: o });
        B.dispatch({ type: "GUILD_STICKERS_CREATE_SUCCESS", guildId: e, sticker: { ...n, user: R.getCurrentUser() } });
    }
    async function SM(e, t) {
        let o = await LS(t),
            n = await new Promise((i) => {
                let s = new FileReader();
                (s.onload = () => i(s.result)), s.readAsDataURL(o);
            });
        return mM({ guildId: e, name: t.name.split("~")[0], image: n });
    }
    function xM(e) {
        let t = R.getCurrentUser().id;
        return Object.values(Ce.getGuilds())
            .filter((o) => {
                if (
                    !(
                        o.ownerId === t ||
                        (Te.getGuildPermissions({ id: o.id }) & pe.CREATE_GUILD_EXPRESSIONS) ===
                            pe.CREATE_GUILD_EXPRESSIONS
                    )
                )
                    return !1;
                if (e.t === "Sticker") {
                    let p = vM(o),
                        m = ao.getStickersByGuildId(o.id);
                    return !m || m.length < p;
                }
                let { isAnimated: i } = e,
                    s = fM(o),
                    c = Jo.getGuildEmoji(o.id),
                    u = 0;
                for (let p of c) p.animated === i && !p.managed && u++;
                return u < s;
            })
            .sort((o, n) => o.name.localeCompare(n.name));
    }
    async function LS(e) {
        let t = e.t === "Sticker" ? yM : hM;
        for (let o = 4096; o >= 16; o /= 2) {
            let n = kS(e, o),
                i = await g(n);
            if (!i.ok) throw new Error(`Failed to fetch ${n} - ${i.status}`);
            let s = await i.blob();
            if (s.size <= t) return s;
        }
        throw new Error(`Failed to fetch ${e.t} within size limit of ${t / 1e3}kB`);
    }
    async function TM(e, t) {
        try {
            t.t === "Sticker" ? await bM(e, t) : await SM(e, t),
                J.show({
                    message: `Successfully cloned ${t.name} to ${Ce.getGuild(e)?.name ?? "your server"}!`,
                    type: J.Type.SUCCESS,
                    id: J.genId(),
                });
        } catch (o) {
            let n = "Something went wrong (check console!)";
            try {
                n = JSON.parse(o.text).message;
            } catch {}
            new U("ExpressionCloner").error("Failed to clone", t.name, "to", e, o),
                J.show({ message: "Failed to clone: " + n, type: J.Type.FAILURE, id: J.genId() });
        }
    }
    var wM = (e) => [20, 20, 18, 18, 16, 14, 12][e.length] ?? 4,
        IM = /^\w+$/i;
    function PM({ data: e }) {
        let [t, o] = xe.useState(!1),
            [n, i] = xe.useState(e.name),
            [s, c] = xe.useReducer((p) => p + 1, 0),
            u = xe.useMemo(() => xM(e), [e.id, s]);
        return r(
            f,
            null,
            r(N.FormTitle, { className: O.top20 }, "Custom Name"),
            r(oc, {
                value: n,
                onChange: (p) => {
                    (e.name = p), i(p);
                },
                validate: (p) =>
                    (e.t === "Emoji" && p.length > 2 && p.length < 32 && IM.test(p)) ||
                    (e.t === "Sticker" && p.length > 2 && p.length < 30) ||
                    "Name must be between 2 and 32 characters and only contain alphanumeric characters",
            }),
            r(
                "div",
                {
                    style: {
                        display: "flex",
                        flexWrap: "wrap",
                        gap: "1em",
                        padding: "1em 0.5em",
                        justifyContent: "center",
                        alignItems: "center",
                    },
                },
                u.map((p) =>
                    r(V, { key: p.id, text: p.name }, ({ onMouseLeave: m, onMouseEnter: h }) =>
                        r(
                            "div",
                            {
                                onMouseLeave: m,
                                onMouseEnter: h,
                                role: "button",
                                "aria-label": "Clone to " + p.name,
                                "aria-disabled": t,
                                style: {
                                    borderRadius: "50%",
                                    backgroundColor: "var(--background-base-lower)",
                                    display: "inline-flex",
                                    justifyContent: "center",
                                    alignItems: "center",
                                    width: "4em",
                                    height: "4em",
                                    cursor: t ? "not-allowed" : "pointer",
                                    filter: t ? "brightness(50%)" : "none",
                                },
                                onClick: t
                                    ? void 0
                                    : async () => {
                                          o(!0),
                                              TM(p.id, e).finally(() => {
                                                  c(), o(!1);
                                              });
                                      },
                            },
                            p.icon
                                ? r("img", {
                                      "aria-hidden": !0,
                                      style: { borderRadius: "50%", width: "100%", height: "100%" },
                                      src: bt.getGuildIconURL({ id: p.id, icon: p.icon, canAnimate: !0, size: 512 }),
                                      alt: p.name,
                                  })
                                : r(
                                      N.FormText,
                                      {
                                          style: {
                                              fontSize: wM(ki(p)),
                                              width: "100%",
                                              overflow: "hidden",
                                              whiteSpace: "nowrap",
                                              textAlign: "center",
                                              cursor: t ? "not-allowed" : "pointer",
                                          },
                                      },
                                      ki(p)
                                  )
                        )
                    )
                )
            )
        );
    }
    function qp(e, t) {
        return r(M.MenuItem, {
            id: "emote-cloner",
            key: "emote-cloner",
            label: `Clone ${e}`,
            action: () =>
                xl(async () => {
                    let o = await t(),
                        n = { t: e, ...o },
                        i = kS(n, 128);
                    return (s) =>
                        r(
                            ve,
                            { ...s },
                            r(
                                Re,
                                null,
                                r("img", {
                                    role: "presentation",
                                    "aria-hidden": !0,
                                    src: i,
                                    alt: "",
                                    height: 24,
                                    width: 24,
                                    style: { marginRight: "0.5em" },
                                }),
                                r(N.FormText, null, "Clone ", n.name)
                            ),
                            r(Ie, null, r(PM, { data: n }))
                        );
                }),
        });
    }
    function OS(e) {
        let t = new URL(e);
        return t.pathname.endsWith(".gif") || t.searchParams.get("animated") === "true";
    }
    var MM = (e, t) => {
            let { favoriteableId: o, itemHref: n, itemSrc: i, favoriteableType: s } = t ?? {};
            if (!o) return;
            let c = (() => {
                switch (s) {
                    case "emoji":
                        let u = t.message.content.match(
                                RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`)
                            ),
                            p = t.message.reactions.find((y) => y.emoji.id === o);
                        if (!u && !p) return;
                        let m = (u && u[1]) ?? p?.emoji.name ?? "FakeNitroEmoji";
                        return qp("Emoji", () => ({ id: o, name: m, isAnimated: OS(n ?? i) }));
                    case "sticker":
                        return t.message.stickerItems.find((y) => y.id === o)?.format_type === 3
                            ? void 0
                            : qp("Sticker", () => DS(o));
                }
            })();
            c && _e("copy-link", e)?.push(c);
        },
        CM = (e, t) => {
            let { id: o, name: n, type: i } = t?.target?.dataset ?? {};
            if (o)
                if (i === "emoji" && n) {
                    let s = t.target.firstChild;
                    e.push(qp("Emoji", () => ({ id: o, name: n, isAnimated: s && OS(s.src) })));
                } else
                    i === "sticker" &&
                        !t.target.className?.includes("lottieCanvas") &&
                        e.push(qp("Sticker", () => DS(o)));
        };
    br("ExpressionCloner", "EmoteCloner");
    var ea = v({
        name: "ExpressionCloner",
        description: "Allows you to clone Emotes & Stickers to your own server (right click them)",
        tags: ["StickerCloner", "EmoteCloner", "EmojiCloner"],
        authors: [d.Ven, d.Nuckyz],
        contextMenus: { message: MM, "expression-picker": CM },
    });
    T();
    se();
    S();
    var NM = [, "png", "png", "json", "gif"];
    function _S(e) {
        return e.format_type === 4
            ? `https:${unsafeWindow.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.gif?size=512&lossless=true`
            : `https://${unsafeWindow.GLOBAL_ENV.CDN_HOST}/stickers/${e.id}.${NM[e.format_type]}?size=512&lossless=true`;
    }
    function ES(e, t) {
        return r(
            f,
            null,
            r(
                M.MenuGroup,
                null,
                r(M.MenuItem, {
                    id: "vc-copy-sticker-link",
                    key: "vc-copy-sticker-link",
                    label: "Copy Link",
                    action: () => tt(_S(e), "Link copied!"),
                }),
                r(M.MenuItem, {
                    id: "vc-open-sticker-link",
                    key: "vc-open-sticker-link",
                    label: "Open Link",
                    action: () => VencordNative.native.openExternal(_S(e)),
                })
            ),
            t && r(M.MenuSeparator, null)
        );
    }
    var AM = (e, { favoriteableId: t, favoriteableType: o, message: n }) => {
            if (!t || o !== "sticker") return;
            let i = n.stickerItems.find((c) => c.id === t);
            if (!i?.format_type) return;
            let s = e.findIndex((c) => Array.isArray(c) && _e("vc-copy-sticker-url", c) != null);
            e.splice(s, 0, ES(i, s !== -1));
        },
        RM = (e, t) => {
            let o = t?.target?.dataset?.id;
            if (!o || t.target.className?.includes("lottieCanvas")) return;
            let n = ao.getStickerById(o);
            n && e.push(ES(n, ke(ea.name)));
        },
        Kp = v({
            name: "CopyStickerLinks",
            description: "Adds the ability to copy & open Sticker links",
            authors: [d.Ven, d.Byeoon],
            contextMenus: { message: AM, "expression-picker": RM },
        });
    a();
    l();
    Ue();
    Gn();
    T();
    S();
    var kM = (e, { user: t }) => {
            t &&
                e.push(
                    r(M.MenuItem, {
                        id: "vc-copy-user-url",
                        label: "Copy User URL",
                        action: () => Po(`<https://discord.com/users/${t.id}>`),
                        icon: mi,
                    })
                );
        },
        Yp = v({
            name: "CopyUserURLs",
            authors: [d.castdrian],
            description: "Adds a 'Copy User URL' option to the user context menu.",
            contextMenus: { "user-context": kM },
        });
    a();
    l();
    T();
    le();
    Oe();
    G();
    S();
    var Ar = new U("CrashHandler"),
        { ModalStack: DM, DraftManager: LM } = wo(() => {
            let [e, t] = hu(_.byProps("pushLazy", "popAll"), _.byProps("clearDraft", "saveDraft"));
            return { ModalStack: e, DraftManager: t };
        }),
        A0 = w({
            attemptToPreventCrashes: {
                type: 3,
                description: "Whether to attempt to prevent Discord crashes.",
                default: !0,
            },
            attemptToNavigateToHome: {
                type: 3,
                description: "Whether to attempt to navigate to the home when preventing Discord crashes.",
                default: !1,
            },
        }),
        BS = !1,
        R0 = !1,
        k0 = !0,
        Zp = v({
            name: "CrashHandler",
            description: "Utility plugin for handling and possibly recovering from crashes without a restart",
            authors: [d.Nuckyz],
            enabledByDefault: !0,
            settings: A0,
            patches: [
                {
                    find: "#{intl::ERRORS_UNEXPECTED_CRASH}",
                    replacement: { match: /this\.setState\((.+?)\)/, replace: "$self.handleCrash(this,$1);" },
                },
            ],
            handleCrash(e, t) {
                e.setState(t),
                    !R0 &&
                        ((R0 = !0),
                        setTimeout(() => {
                            try {
                                if (!k0) {
                                    try {
                                        He({
                                            color: "#eed202",
                                            title: "Discord has crashed!",
                                            body: "Awn :( Discord has crashed two times rapidly, not attempting to recover.",
                                            noPersist: !0,
                                        });
                                    } catch {}
                                    return;
                                }
                                (k0 = !1), setTimeout(() => (k0 = !0), 1e3);
                            } catch {}
                            try {
                                BS ||
                                    ((BS = !0),
                                    Al(
                                        "Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",
                                        !0
                                    ));
                            } catch {}
                            try {
                                A0.store.attemptToPreventCrashes && this.handlePreventCrash(e);
                            } catch (o) {
                                Ar.error("Failed to handle crash", o);
                            }
                        }, 1));
            },
            handlePreventCrash(e) {
                try {
                    He({
                        color: "#eed202",
                        title: "Discord has crashed!",
                        body: "Attempting to recover...",
                        noPersist: !0,
                    });
                } catch {}
                try {
                    let t = Le.getChannelId();
                    for (let o in Gt) Number.isNaN(Number(o)) && LM.clearDraft(t, Gt[o]);
                } catch (t) {
                    Ar.debug("Failed to clear drafts.", t);
                }
                try {
                    vl.closeExpressionPicker();
                } catch (t) {
                    Ar.debug("Failed to close expression picker.", t);
                }
                try {
                    B.dispatch({ type: "CONTEXT_MENU_CLOSE" });
                } catch (t) {
                    Ar.debug("Failed to close open context menu.", t);
                }
                try {
                    DM.popAll();
                } catch (t) {
                    Ar.debug("Failed to close old modals.", t);
                }
                try {
                    Wr();
                } catch (t) {
                    Ar.debug("Failed to close all open modals.", t);
                }
                try {
                    B.dispatch({ type: "USER_PROFILE_MODAL_CLOSE" });
                } catch (t) {
                    Ar.debug("Failed to close user popout.", t);
                }
                try {
                    B.dispatch({ type: "LAYER_POP_ALL" });
                } catch (t) {
                    Ar.debug("Failed to pop all layers.", t);
                }
                try {
                    B.dispatch({
                        type: "DEV_TOOLS_SETTINGS_UPDATE",
                        settings: { displayTools: !1, lastOpenTabId: "analytics" },
                    });
                } catch (t) {
                    Ar.debug("Failed to close DevTools.", t);
                }
                if (A0.store.attemptToNavigateToHome)
                    try {
                        gr.transitionToGuild("@me");
                    } catch (t) {
                        Ar.debug("Failed to navigate to home", t);
                    }
                setImmediate(() => (R0 = !1));
                try {
                    e.setState({ error: null, info: null });
                } catch (t) {
                    Ar.debug("Failed to update crash handler component.", t);
                }
            },
        });
    a();
    l();
    T();
    var Qp = v({
        name: "CtrlEnterSend",
        authors: [d.UlyssesZhan],
        description: "Use Ctrl+Enter to send messages (customizable)",
        settings: w({
            submitRule: {
                description: "The way to send a message",
                type: 4,
                options: [
                    {
                        label: "Ctrl+Enter (Enter or Shift+Enter for new line) (cmd+enter on macOS)",
                        value: "ctrl+enter",
                    },
                    { label: "Shift+Enter (Enter for new line)", value: "shift+enter" },
                    { label: "Enter (Shift+Enter for new line; Discord default)", value: "enter" },
                ],
                default: "ctrl+enter",
            },
            sendMessageInTheMiddleOfACodeBlock: {
                description: "Whether to send a message in the middle of a code block",
                type: 3,
                default: !0,
            },
        }),
        patches: [
            {
                find: ".selectPreviousCommandOption(",
                replacement: {
                    match: /(?<=(\i)\.which!==\i\.\i.ENTER\|\|).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=\|\|\(\i\.preventDefault)/,
                    replace: "!$self.shouldSubmit($1,$2)",
                },
            },
            {
                find: "!this.hasOpenCodeBlock()",
                replacement: {
                    match: /!(\i).shiftKey&&!(this.hasOpenCodeBlock\(\))&&\(.{0,100}?\)/,
                    replace: "$self.shouldSubmit($1, $2)",
                },
            },
        ],
        shouldSubmit(e, t) {
            let o = !1;
            switch (this.settings.store.submitRule) {
                case "shift+enter":
                    o = e.shiftKey;
                    break;
                case "ctrl+enter":
                    o = Bo ? e.metaKey : e.ctrlKey;
                    break;
                case "enter":
                    o = !e.shiftKey && !e.ctrlKey;
                    break;
            }
            return this.settings.store.sendMessageInTheMiddleOfACodeBlock || (o &&= !t), o;
        },
    });
    a();
    l();
    T();
    S();
    var D0 = w({
            idleTimeout: {
                description: "Minutes before Discord goes idle (0 to disable auto-idle)",
                type: 5,
                markers: yr(0, 60, 5),
                default: 10,
                stickToMarkers: !1,
                restartNeeded: !0,
            },
            remainInIdle: {
                description: "When you come back to Discord, remain idle until you confirm you want to go online",
                type: 3,
                default: !0,
            },
        }),
        Xp = v({
            name: "CustomIdle",
            description: "Allows you to set the time before Discord goes idle (or disable auto-idle)",
            authors: [d.newwares],
            settings: D0,
            patches: [
                {
                    find: 'type:"IDLE",idle:',
                    replacement: [
                        { match: /(?<=Date\.now\(\)-\i>)\i\.\i\|\|/, replace: "$self.getIdleTimeout()||" },
                        { match: /Math\.min\((\i\*\i\.\i\.\i\.SECOND),\i\.\i\)/, replace: "$1" },
                        { match: /\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/, replace: "$self.handleOnline()" },
                    ],
                },
            ],
            handleOnline() {
                if (!D0.store.remainInIdle) {
                    B.dispatch({ type: "IDLE", idle: !1 });
                    return;
                }
                let e = "Welcome back! Click the button to go online. Click the X to stay idle until reload.";
                zi?.[1] === e ||
                    ql.some(([, t]) => t === e) ||
                    fn(e, "Exit idle", () => {
                        Wi(), B.dispatch({ type: "IDLE", idle: !1 });
                    });
            },
            getIdleTimeout() {
                let { idleTimeout: e } = D0.store;
                return e === 0 ? 1 / 0 : e * 6e4;
            },
        });
    a();
    l();
    Qt();
    Wt();
    T();
    re();
    pt();
    G();
    S();
    a();
    l();
    Qt();
    Ur();
    Pe();
    S();
    var pc = Y("vc-customRPC-settings-"),
        td =
            (e, t = !1) =>
            (o) =>
                t && !o ? "This field is required." : o.length > e ? `Must be not longer than ${e} characters.` : !0,
        Jp = td(128);
    function OM(e) {
        return /^\d{16,21}$/.test(e) ? !0 : "Must be a valid Discord ID.";
    }
    var _M = kt(() => {
        dc(!0), ke(oa.name) && dc();
    });
    function EM() {
        return Rr.store.type !== 1;
    }
    function BM(e) {
        return !EM() && !/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)
            ? "Streaming link must be a valid URL."
            : e && e.length > 512
              ? "Streaming link must be not longer than 512 characters."
              : !0;
    }
    function Vp(e) {
        return e ? parseInt(e, 10) : 0;
    }
    function ed(e) {
        return isNaN(e) ? "Must be a number." : e < 0 ? "Must be a positive number." : !0;
    }
    function ta(e) {
        return e && !/^https?:\/\/.+/.test(e) ? "Must be a valid URL." : !0;
    }
    function US(e) {
        return /https?:\/\/(cdn|media)\.discordapp\.(com|net)\//.test(e)
            ? "Don't use a Discord link. Use an Imgur image link instead."
            : /https?:\/\/(?!i\.)?imgur\.com\//.test(e)
              ? "Imgur link must be a direct link to the image (e.g. https://i.imgur.com/...). Right click the image and click 'Copy image address'"
              : /https?:\/\/(?!media\.)?tenor\.com\//.test(e)
                ? "Tenor link must be a direct link to the image (e.g. https://media.tenor.com/...). Right click the GIF and click 'Copy image address'"
                : !0;
    }
    function bn(e) {
        let [t, o] = e.data;
        return r("div", { className: pc("pair") }, r(uc, { ...t }), r(uc, { ...o }));
    }
    function uc({ settingsKey: e, label: t, disabled: o, isValid: n, transform: i }) {
        let [s, c] = k(Rr.store[e] ?? ""),
            [u, p] = k(null);
        function m(h) {
            i && (h = i(h));
            let y = n?.(h) ?? !0;
            c(h), p(tr(y)), y === !0 && ((Rr.store[e] = h), _M());
        }
        return r(
            "div",
            { className: pc("single", { disabled: o }) },
            r(Xt, { tag: "h5" }, t),
            r(ht, { type: "text", placeholder: "Enter a value", value: s, onChange: m, disabled: o }),
            u && r(H, { className: pc("error"), variant: "text-sm/normal" }, u)
        );
    }
    function FS({ settingsKey: e, label: t, options: o, disabled: n }) {
        return r(
            "div",
            { className: pc("single", { disabled: n }) },
            r(Xt, { tag: "h5" }, t),
            r(ro, {
                placeholder: "Select an option",
                options: o,
                maxVisibleItems: 5,
                closeOnSelect: !0,
                select: (i) => (Rr.store[e] = i),
                isSelected: (i) => i === Rr.store[e],
                serialize: (i) => String(i),
                isDisabled: n,
            })
        );
    }
    function GS() {
        let e = Rr.use();
        return r(
            "div",
            { className: pc("root") },
            r(FS, {
                settingsKey: "type",
                label: "Activity Type",
                options: [
                    { label: "Playing", value: 0, default: !0 },
                    { label: "Streaming", value: 1 },
                    { label: "Listening", value: 2 },
                    { label: "Watching", value: 3 },
                    { label: "Competing", value: 5 },
                ],
            }),
            r(bn, {
                data: [
                    { settingsKey: "appID", label: "Application ID", isValid: OM },
                    { settingsKey: "appName", label: "Application Name", isValid: td(128, !0) },
                ],
            }),
            r(bn, {
                data: [
                    { settingsKey: "details", label: "Detail (line 1)", isValid: Jp },
                    { settingsKey: "detailsURL", label: "Detail URL", isValid: ta },
                ],
            }),
            r(bn, {
                data: [
                    { settingsKey: "state", label: "State (line 2)", isValid: Jp },
                    { settingsKey: "stateURL", label: "State URL", isValid: ta },
                ],
            }),
            r(uc, {
                settingsKey: "streamLink",
                label: "Stream Link (Twitch or YouTube, only if activity type is Streaming)",
                disabled: e.type !== 1,
                isValid: BM,
            }),
            r(bn, {
                data: [
                    {
                        settingsKey: "partySize",
                        label: "Party Size",
                        transform: Vp,
                        isValid: ed,
                        disabled: e.type !== 0,
                    },
                    {
                        settingsKey: "partyMaxSize",
                        label: "Maximum Party Size",
                        transform: Vp,
                        isValid: ed,
                        disabled: e.type !== 0,
                    },
                ],
            }),
            r(Fe, null),
            r(bn, {
                data: [
                    { settingsKey: "imageBig", label: "Large Image URL/Key", isValid: US },
                    { settingsKey: "imageBigTooltip", label: "Large Image Text", isValid: Jp },
                ],
            }),
            r(uc, { settingsKey: "imageBigURL", label: "Large Image clickable URL", isValid: ta }),
            r(bn, {
                data: [
                    { settingsKey: "imageSmall", label: "Small Image URL/Key", isValid: US },
                    { settingsKey: "imageSmallTooltip", label: "Small Image Text", isValid: Jp },
                ],
            }),
            r(uc, { settingsKey: "imageSmallURL", label: "Small Image clickable URL", isValid: ta }),
            r(Fe, null),
            r(bn, {
                data: [
                    { settingsKey: "buttonOneText", label: "Button1 Text", isValid: td(31) },
                    { settingsKey: "buttonOneURL", label: "Button1 URL", isValid: ta },
                ],
            }),
            r(bn, {
                data: [
                    { settingsKey: "buttonTwoText", label: "Button2 Text", isValid: td(31) },
                    { settingsKey: "buttonTwoURL", label: "Button2 URL", isValid: ta },
                ],
            }),
            r(Fe, null),
            r(FS, {
                settingsKey: "timestampMode",
                label: "Timestamp Mode",
                options: [
                    { label: "None", value: 0, default: !0 },
                    { label: "Since discord open", value: 1 },
                    { label: "Same as your current time (not reset after 24h)", value: 2 },
                    { label: "Custom", value: 3 },
                ],
            }),
            r(bn, {
                data: [
                    {
                        settingsKey: "startTime",
                        label: "Start Timestamp (in milliseconds)",
                        transform: Vp,
                        isValid: ed,
                        disabled: e.timestampMode !== 3,
                    },
                    {
                        settingsKey: "endTime",
                        label: "End Timestamp (in milliseconds)",
                        transform: Vp,
                        isValid: ed,
                        disabled: e.timestampMode !== 3,
                    },
                ],
            })
        );
    }
    var UM = de("profileThemeStyle:", "--profile-gradient-primary-color"),
        FM = ge(".party?(0", "USER_PROFILE_ACTIVITY"),
        HS = To("status", "showCurrentGame");
    async function zS(e) {
        return (await Ci.fetchAssetIds(Rr.store.appID, [e]))[0];
    }
    var Rr = w({ config: { type: 6, component: GS } }).withPrivateSettings();
    async function WS() {
        let {
            appID: e,
            appName: t,
            details: o,
            detailsURL: n,
            state: i,
            stateURL: s,
            type: c,
            streamLink: u,
            startTime: p,
            endTime: m,
            imageBig: h,
            imageBigURL: y,
            imageBigTooltip: b,
            imageSmall: x,
            imageSmallURL: P,
            imageSmallTooltip: I,
            buttonOneText: D,
            buttonOneURL: A,
            buttonTwoText: E,
            buttonTwoURL: q,
            partyMaxSize: z,
            partySize: K,
            timestampMode: ue,
        } = Rr.store;
        if (!t) return;
        let j = { application_id: e || "0", name: t, state: i, details: o, type: c ?? 0, flags: 1 };
        switch ((c === 1 && (j.url = u), ue)) {
            case 1:
                j.timestamps = { start: Date.now() };
                break;
            case 2:
                j.timestamps = {
                    start:
                        Date.now() -
                        (new Date().getHours() * 3600 + new Date().getMinutes() * 60 + new Date().getSeconds()) * 1e3,
                };
                break;
            case 3:
                (p || m) && ((j.timestamps = {}), p && (j.timestamps.start = p), m && (j.timestamps.end = m));
                break;
            case 0:
            default:
                break;
        }
        n && (j.details_url = n),
            s && (j.state_url = s),
            D && ((j.buttons = [D, E].filter(qn)), (j.metadata = { button_urls: [A, q].filter(qn) })),
            h && (j.assets = { large_image: await zS(h), large_text: b || void 0, large_url: y || void 0 }),
            x &&
                (j.assets = { ...j.assets, small_image: await zS(x), small_text: I || void 0, small_url: P || void 0 }),
            z && K && (j.party = { size: [K, z] });
        for (let ne in j) {
            if (ne === "type") continue;
            let Q = j[ne];
            (!Q || Q.length === 0) && delete j[ne];
        }
        return j;
    }
    async function dc(e) {
        let t = await WS();
        B.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: e ? null : t, socketId: "CustomRPC" });
    }
    var oa = v({
        name: "CustomRPC",
        description: "Add a fully customisable Rich Presence (Game status) to your Discord profile",
        authors: [d.captain, d.AutumnVN, d.nin0dev],
        dependencies: ["UserSettingsAPI"],
        requiresRestart: !1,
        settings: Rr,
        start: dc,
        stop: () => dc(!0),
        patches: [
            {
                find: ".USER_PROFILE_ACTIVITY_BUTTONS),",
                replacement: { match: /.getId\(\)===\i.id/, replace: "$& && false" },
            },
        ],
        settingsAboutComponent: () => {
            let [e] = _t(WS, { fallbackValue: void 0, deps: Object.values(Rr.store) }),
                t = HS.useSetting(),
                { profileThemeStyle: o } = UM({});
            return r(
                f,
                null,
                !t &&
                    r(
                        eo,
                        { className: L(O.top16, O.bottom16), style: { padding: "1em" } },
                        r(N.FormTitle, null, "Notice"),
                        r(
                            N.FormText,
                            null,
                            "Activity Sharing isn't enabled, people won't be able to see your custom rich presence!"
                        ),
                        r(
                            F,
                            { color: F.Colors.TRANSPARENT, className: O.top8, onClick: () => HS.updateSetting(!0) },
                            "Enable"
                        )
                    ),
                r(
                    oe,
                    { flexDirection: "column", gap: ".5em", className: O.top16 },
                    r(
                        N.FormText,
                        null,
                        "Go to the ",
                        r(Ve, { href: "https://discord.com/developers/applications" }, "Discord Developer Portal"),
                        " to create an application and get the application ID."
                    ),
                    r(N.FormText, null, "Upload images in the Rich Presence tab to get the image keys."),
                    r(
                        N.FormText,
                        null,
                        "If you want to use an image link, download your image and reupload the image to ",
                        r(Ve, { href: "https://imgur.com" }, "Imgur"),
                        ' and get the image link by right-clicking the image and selecting "Copy image address".'
                    ),
                    r(
                        N.FormText,
                        null,
                        "You can't see your own buttons on your profile, but everyone else can see it fine."
                    ),
                    r(
                        N.FormText,
                        null,
                        'Some weird unicode text ("fonts" \u{1D591}\u{1D58E}\u{1D590}\u{1D58A} \u{1D599}\u{1D58D}\u{1D58E}\u{1D598}) may cause the rich presence to not show up, try using normal letters instead.'
                    )
                ),
                r(Fe, { className: O.top8 }),
                r(
                    "div",
                    {
                        style: {
                            width: "284px",
                            ...o,
                            marginTop: 8,
                            borderRadius: 8,
                            background: "var(--background-mod-muted)",
                        },
                    },
                    e && r(FM, { activity: e, user: R.getCurrentUser(), currentUser: R.getCurrentUser() })
                )
            );
        },
    });
    a();
    l();
    T();
    le();
    S();
    var $M = /https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;
    async function GM() {
        try {
            let { embed: e } = this.props,
                { replaceElements: t, dearrowByDefault: o } = od.store;
            if (!e || e.dearrow || e.provider?.name !== "YouTube" || !e.video?.url) return;
            let n = $M.exec(e.video.url)?.[1];
            if (!n) return;
            let i = await g(`https://sponsor.ajay.app/api/branding?videoID=${n}`);
            if (!i.ok) return;
            let { titles: s, thumbnails: c } = await i.json(),
                u = s[0]?.votes >= 0,
                p = c[0]?.votes >= 0 && !c[0].original;
            if (!u && !p) return;
            if (((e.dearrow = { enabled: o }), u && t !== 2)) {
                let m = s[0].title.replace(/(^|\s)>(\S)/g, "$1$2");
                (e.dearrow.oldTitle = o ? e.rawTitle : m), o && (e.rawTitle = m);
            }
            if (p && t !== 1) {
                let m = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${n}&time=${c[0].timestamp}`;
                (e.dearrow.oldThumb = o ? e.thumbnail.proxyURL : m), o && (e.thumbnail.proxyURL = m);
            }
            this.forceUpdate();
        } catch (e) {
            new U("Dearrow").error("Failed to dearrow embed", e);
        }
    }
    function HM({ component: e }) {
        let { embed: t } = e.props;
        return t?.dearrow
            ? r(
                  V,
                  { text: t.dearrow.enabled ? "This embed has been dearrowed, click to restore" : "Click to dearrow" },
                  ({ onMouseEnter: o, onMouseLeave: n }) =>
                      r(
                          "button",
                          {
                              onMouseEnter: o,
                              onMouseLeave: n,
                              className: "vc-dearrow-toggle-" + (t.dearrow.enabled ? "on" : "off"),
                              onClick: () => {
                                  let { enabled: i, oldThumb: s, oldTitle: c } = t.dearrow;
                                  (od.store.dearrowByDefault = !i),
                                      (t.dearrow.enabled = !i),
                                      c && ((t.dearrow.oldTitle = t.rawTitle), (t.rawTitle = c)),
                                      s && ((t.dearrow.oldThumb = t.thumbnail.proxyURL), (t.thumbnail.proxyURL = s)),
                                      e.forceUpdate();
                              },
                          },
                          r(
                              "svg",
                              {
                                  xmlns: "http://www.w3.org/2000/svg",
                                  width: "24px",
                                  height: "24px",
                                  viewBox: "0 0 36 36",
                                  "aria-label": "Toggle Dearrow",
                                  className: "vc-dearrow-icon",
                              },
                              r("path", {
                                  fill: "#1213BD",
                                  d: "M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z",
                              }),
                              r("path", {
                                  fill: "#88c9f9",
                                  d: "m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z",
                              }),
                              r("path", {
                                  fill: "#0a62a5",
                                  d: "m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z",
                              })
                          )
                      )
              )
            : null;
    }
    var od = w({
            hideButton: {
                description: "Hides the Dearrow button from YouTube embeds",
                type: 3,
                default: !1,
                restartNeeded: !0,
            },
            replaceElements: {
                description: "Choose which elements of the embed will be replaced",
                type: 4,
                restartNeeded: !0,
                options: [
                    { label: "Everything (Titles & Thumbnails)", value: 0, default: !0 },
                    { label: "Titles", value: 1 },
                    { label: "Thumbnails", value: 2 },
                ],
            },
            dearrowByDefault: { description: "Dearrow videos automatically", type: 3, default: !0, restartNeeded: !1 },
        }),
        rd = v({
            name: "Dearrow",
            description: "Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",
            authors: [d.Ven],
            settings: od,
            embedDidMount: GM,
            renderButton(e) {
                return r(C, { noop: !0 }, r(HM, { component: e }));
            },
            patches: [
                {
                    find: "this.renderInlineMediaEmbed",
                    replacement: [
                        {
                            match: /render\(\)\{.{0,30}let\{embed:/,
                            replace: "componentDidMount=$self.embedDidMount;$&",
                        },
                        {
                            match: /children:\[(?=null!=\i\?(\i)\.renderSuppressButton)/,
                            replace: "children:[$self.renderButton($1),",
                            predicate: () => !od.store.hideButton,
                        },
                    ],
                },
            ],
        });
    a();
    l();
    T();
    S();
    a();
    l();
    var zM = "https://decor.fieryflames.dev",
        ei = zM + "/api",
        jS = ei + "/authorize",
        qS = "https://ugc.decor.fieryflames.dev",
        KS = "1096966363416899624",
        Vi = "100101099111114",
        mc = "11497119",
        ra = "1096357702931841148",
        fc = "dXp2SdxDcP",
        L0 = 1e3 * 60 * 60 * 4;
    a();
    l();
    Fo();
    le();
    Oe();
    S();
    var WM = {
            async getItem(e) {
                return wt(e).then((t) => t ?? null);
            },
            async setItem(e, t) {
                await It(e, t);
            },
            async removeItem(e) {
                await Da(e);
            },
        },
        ti = Pt(() =>
            Ni(
                _h(
                    (e, t) => ({
                        token: null,
                        tokens: {},
                        init: () => {
                            e({ token: t().tokens[R.getCurrentUser().id] ?? null });
                        },
                        setToken: (o) => e({ token: o, tokens: { ...t().tokens, [R.getCurrentUser().id]: o } }),
                        remove: (o) => {
                            let { tokens: n, init: i } = t(),
                                s = { ...n };
                            delete s[o], e({ tokens: s }), i();
                        },
                        async authorize() {
                            return new Promise((o, n) =>
                                fe(
                                    (i) =>
                                        r(wi, {
                                            ...i,
                                            scopes: ["identify"],
                                            responseType: "code",
                                            redirectUri: jS,
                                            permissions: 0n,
                                            clientId: KS,
                                            cancelCompletesFlow: !1,
                                            callback: async (s) => {
                                                try {
                                                    let c = new URL(s.location);
                                                    c.searchParams.append("client", "vencord");
                                                    let u = await g(c);
                                                    if (u?.ok) {
                                                        let p = await u.text();
                                                        t().setToken(p);
                                                    } else throw new Error("Request not OK");
                                                    o(void 0);
                                                } catch (c) {
                                                    c instanceof Error &&
                                                        (Ge(`Failed to authorize: ${c.message}`, J.Type.FAILURE),
                                                        new U("Decor").error("Failed to authorize", c),
                                                        n(c));
                                                }
                                            },
                                        }),
                                    {
                                        onCloseCallback() {
                                            n(new Error("Authorization cancelled"));
                                        },
                                    }
                                )
                            );
                        },
                        isAuthorized: () => !!t().token,
                    }),
                    {
                        name: "decor-auth",
                        storage: WM,
                        partialize: (e) => ({ tokens: e.tokens }),
                        onRehydrateStorage: () => (e) => e?.init(),
                    }
                )
            )
        );
    a();
    l();
    a();
    l();
    async function nd(e, t) {
        let o = await g(e, { ...t, headers: { ...t?.headers, Authorization: `Bearer ${ti.getState().token}` } });
        if (o.ok) return o;
        throw new Error(await o.text());
    }
    var YS = async (e) => {
            if (e?.length === 0) return {};
            let t = new URL(ei + "/users");
            return (
                e && e.length !== 0 && t.searchParams.set("ids", JSON.stringify(e)), await g(t).then((o) => o.json())
            );
        },
        ZS = async (e = "@me") => nd(ei + `/users/${e}/decorations`).then((t) => t.json()),
        QS = async (e = "@me") => nd(ei + `/users/${e}/decoration`).then((t) => t.json()),
        O0 = async (e, t = "@me") => {
            let o = new FormData();
            return (
                e
                    ? "hash" in e
                        ? o.append("hash", e.hash)
                        : "file" in e && (o.append("image", e.file), o.append("alt", e.alt ?? "null"))
                    : o.append("hash", "null"),
                nd(ei + `/users/${t}/decoration`, { method: "PUT", body: o }).then((n) =>
                    e && "file" in e ? n.json() : n.text()
                )
            );
        };
    var XS = async (e) => {
            await nd(ei + `/decorations/${e}`, { method: "DELETE" });
        },
        JS = async () => g(ei + "/decorations/presets").then((e) => e.json());
    a();
    l();
    function _0(e) {
        return `${e.animated ? "a_" : ""}${e.hash}`;
    }
    function id(e) {
        return { asset: _0(e), skuId: Vi };
    }
    Fo();
    S();
    a();
    l();
    Fo();
    S();
    var Sn = Pt(() =>
        Ni((e, t) => ({
            usersDecorations: new Map(),
            fetchQueue: new Set(),
            bulkFetch: kt(async () => {
                let { fetchQueue: o, usersDecorations: n } = t();
                if (o.size === 0) return;
                e({ fetchQueue: new Set() });
                let i = [...o],
                    s = await YS(i),
                    c = new Map(n),
                    u = new Date();
                for (let p of i) {
                    let m = s[p] ?? null;
                    c.set(p, { asset: m, fetchedAt: u });
                }
                e({ usersDecorations: c });
            }),
            async fetch(o, n = !1) {
                let { usersDecorations: i, fetchQueue: s, bulkFetch: c } = t(),
                    { fetchedAt: u } = i.get(o) ?? {};
                (u && !n && Date.now() - u.getTime() < L0) || (e({ fetchQueue: new Set(s).add(o) }), c());
            },
            async fetchMany(o) {
                if (!o.length) return;
                let { usersDecorations: n, fetchQueue: i, bulkFetch: s } = t(),
                    c = new Set(i),
                    u = Date.now();
                for (let p of o) {
                    let { fetchedAt: m } = n.get(p) ?? {};
                    (m && u - m.getTime() < L0) || c.add(p);
                }
                e({ fetchQueue: c }), s();
            },
            get(o) {
                return t().usersDecorations.get(o);
            },
            getAsset(o) {
                return t().usersDecorations.get(o)?.asset;
            },
            has(o) {
                return t().usersDecorations.has(o);
            },
            set(o, n) {
                let { usersDecorations: i } = t(),
                    s = new Map(i);
                s.set(o, { asset: n, fetchedAt: new Date() }), e({ usersDecorations: s });
            },
        }))
    );
    function VS(e) {
        try {
            let [t, o] = k(e ? (Sn.getState().getAsset(e.id) ?? null) : null);
            return (
                te(() => {
                    let n = (() => {
                        try {
                            return Sn.subscribe((i) => {
                                if (!e) return;
                                let s = i.getAsset(e.id);
                                s && t !== s && o(s);
                            });
                        } catch {
                            return () => {};
                        }
                    })();
                    try {
                        if (e) {
                            let { fetch: i } = Sn.getState();
                            i(e.id);
                        }
                    } catch {}
                    return n;
                }, []),
                t ? { asset: t, skuId: Vi } : null
            );
        } catch (t) {
            console.error(t);
        }
        return null;
    }
    var Zr = Pt(() =>
        Ni((e, t) => ({
            decorations: [],
            selectedDecoration: null,
            async fetch() {
                let o = await ZS(),
                    n = await QS();
                e({ decorations: o, selectedDecoration: n });
            },
            async create(o) {
                let n = await O0(o);
                e({ decorations: [...t().decorations, n] });
            },
            async delete(o) {
                let n = typeof o == "object" ? o.hash : o;
                await XS(n);
                let { selectedDecoration: i, decorations: s } = t(),
                    c = { decorations: s.filter((u) => u.hash !== n), selectedDecoration: i?.hash === n ? null : i };
                e(c);
            },
            async select(o) {
                t().selectedDecoration !== o &&
                    (e({ selectedDecoration: o }), O0(o), Sn.getState().set(R.getCurrentUser().id, o ? _0(o) : null));
            },
            clear: () => e({ decorations: [], selectedDecoration: null }),
        }))
    );
    a();
    l();
    Wt();
    re();
    Oe();
    S();
    a();
    l();
    lr();
    a();
    l();
    Pe();
    G();
    var Be = Y("vc-decor-"),
        na = ee("modalPreview", "modalCloseButton", "spinner", "modal"),
        ia = xi(["initialSelectedDecoration:", /initialSelectedDecoration:\i,.{0,300}\i\.e\(/]),
        ex = xi([".CREATE_STICKER_MODAL,", "isDisplayingIndividualStickers"]);
    a();
    l();
    lr();
    a();
    l();
    G();
    var gc,
        tx = (e) => (gc = e),
        sd = ge("#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}"),
        E0,
        ox = (e) => (E0 = e);
    a();
    l();
    Ue();
    se();
    S();
    function B0(e) {
        return r(
            gc,
            { ...e, isSelected: !1 },
            r(nu, null),
            r(H, { variant: "text-xs/normal", color: "text-strong" }, Ae("CREATE"))
        );
    }
    a();
    l();
    Ue();
    se();
    S();
    function U0(e) {
        return r(gc, { ...e }, r($a, null), r(H, { variant: "text-xs/normal", color: "text-strong" }, Ae("NONE")));
    }
    a();
    l();
    S();
    a();
    l();
    Ue();
    Gn();
    S();
    function F0({ decoration: e }) {
        let { delete: t } = Zr();
        return r(
            M.Menu,
            { navId: Be("decoration-context-menu"), onClose: st.closeContextMenu, "aria-label": "Decoration Options" },
            r(M.MenuItem, {
                id: Be("decoration-context-menu-copy-hash"),
                label: "Copy Decoration Hash",
                icon: en,
                action: () => Po(e.hash),
            }),
            e.authorId === R.getCurrentUser().id &&
                r(M.MenuItem, {
                    id: Be("decoration-context-menu-delete"),
                    label: "Delete Decoration",
                    color: "danger",
                    icon: ar,
                    action: () =>
                        Qe.show({
                            title: "Delete Decoration",
                            body: `Are you sure you want to delete ${e.alt}?`,
                            confirmText: "Delete",
                            confirmColor: Be("danger-btn"),
                            cancelText: "Cancel",
                            onConfirm() {
                                t(e);
                            },
                        }),
                })
        );
    }
    function $0(e) {
        let { decoration: t } = e;
        return r(E0, {
            ...e,
            onContextMenu: (o) => {
                st.openContextMenu(o, () => r(F0, { decoration: t }));
            },
            avatarDecoration: id(t),
        });
    }
    a();
    l();
    re();
    G();
    a();
    l();
    S();
    function G0({ renderItem: e, getItemKey: t, itemKeyPrefix: o, items: n }) {
        return r(
            "div",
            { className: Be("sectioned-grid-list-grid") },
            n.map((i) => r(xe.Fragment, { key: `${o ? `${o}-` : ""}${t(i)}` }, e(i)))
        );
    }
    var jM = ee("managedReactiveScroller", "thin");
    function H0(e) {
        return r(
            "div",
            { className: L(Be("sectioned-grid-list-container"), jM.thin) },
            e.sections.map((t) =>
                r(
                    "div",
                    { key: e.getSectionKey(t), className: Be("sectioned-grid-list-section") },
                    e.renderSectionHeader(t),
                    r(G0, {
                        renderItem: e.renderItem,
                        getItemKey: e.getItemKey,
                        itemKeyPrefix: e.getSectionKey(t),
                        items: t.items,
                    })
                )
            )
        );
    }
    se();
    Oe();
    S();
    a();
    l();
    Wt();
    se();
    Oe();
    G();
    S();
    var qM = ge(".currentTarget.files", "lineClamp:1"),
        { HelpMessage: rx, HelpMessageTypes: nx } = Ye('POSITIVE="positive', {
            HelpMessageTypes: _.byProps("POSITIVE", "WARNING", "INFO"),
            HelpMessage: _.byCode("messageType:"),
        });
    function KM(e) {
        let [t, o] = k(null);
        return (
            te(() => {
                if (!e) return;
                let n = URL.createObjectURL(e);
                return (
                    o(n),
                    () => {
                        URL.revokeObjectURL(n), o(null);
                    }
                );
            }, [e]),
            t
        );
    }
    function YM(e) {
        let [t, o] = k(""),
            [n, i] = k(null),
            [s, c] = k(!1),
            [u, p] = k(null);
        te(() => {
            u && p(null);
        }, [n]);
        let { create: m } = Zr(),
            h = KM(n),
            y = ce(() => (h ? { asset: h, skuId: mc } : null), [h]);
        return r(
            ve,
            { ...e, size: "medium", className: na.modal },
            r(
                Re,
                { separator: !1, className: Be("modal-header") },
                r(
                    H,
                    { color: "text-strong", variant: "heading-lg/semibold", tag: "h1", style: { flexGrow: 1 } },
                    "Create Decoration"
                ),
                r(et, { onClick: e.onClose })
            ),
            r(
                Ie,
                { className: Be("create-decoration-modal-content"), scrollbarType: "none" },
                r(
                    C,
                    null,
                    r(
                        rx,
                        { messageType: nx.WARNING },
                        "Make sure your decoration does not violate ",
                        r(
                            Ve,
                            { href: "https://github.com/decor-discord/.github/blob/main/GUIDELINES.md" },
                            "the guidelines"
                        ),
                        " before submitting it."
                    ),
                    r(
                        "div",
                        { className: Be("create-decoration-modal-form-preview-container") },
                        r(
                            "div",
                            { className: Be("create-decoration-modal-form") },
                            u !== null && r(H, { color: "text-danger", variant: "text-xs/normal" }, u.message),
                            r(
                                "section",
                                null,
                                r(N.FormTitle, { tag: "h5" }, "File"),
                                r(qM, {
                                    filename: n?.name,
                                    placeholder: "Choose a file",
                                    buttonText: "Browse",
                                    filters: [{ name: "Decoration file", extensions: ["png", "apng"] }],
                                    onFileSelect: i,
                                }),
                                r(N.FormText, { className: O.top8 }, "File should be APNG or PNG.")
                            ),
                            r(
                                "section",
                                null,
                                r(N.FormTitle, { tag: "h5" }, "Name"),
                                r(ht, { placeholder: "Companion Cube", value: t, onChange: o }),
                                r(
                                    N.FormText,
                                    { className: O.top8 },
                                    "This name will be used when referring to this decoration."
                                )
                            )
                        ),
                        r("div", null, r(sd, { avatarDecoration: y, user: R.getCurrentUser() }))
                    ),
                    r(
                        rx,
                        { messageType: nx.INFO, className: O.bottom8 },
                        "To receive updates on your decoration's review, join ",
                        r(
                            Ve,
                            {
                                href: `https://discord.gg/${fc}`,
                                onClick: async (b) => {
                                    b.preventDefault(),
                                        Ce.getGuild(ra)
                                            ? (Wr(), B.dispatch({ type: "LAYER_POP_ALL" }), gr.transitionToGuild(ra))
                                            : (await pn(fc)) && (Wr(), B.dispatch({ type: "LAYER_POP_ALL" }));
                                },
                            },
                            "Decor's Discord server"
                        ),
                        " and allow direct messages."
                    )
                )
            ),
            r(
                St,
                { className: Be("modal-footer") },
                r(
                    "div",
                    { className: Be("modal-footer-btn-container") },
                    r(F, { onClick: e.onClose, color: F.Colors.PRIMARY }, "Cancel"),
                    r(
                        F,
                        {
                            onClick: () => {
                                c(!0),
                                    m({ alt: t, file: n })
                                        .then(e.onClose)
                                        .catch((b) => {
                                            c(!1), p(b);
                                        });
                            },
                            disabled: !n || !t || s,
                        },
                        "Submit for Review"
                    )
                )
            )
        );
    }
    var ad = () => Promise.all([ia(), ex()]).then(() => fe((e) => r(YM, { ...e })));
    a();
    l();
    Wt();
    Oe();
    S();
    function ZM(e) {
        return r(
            ve,
            { ...e, size: "small", className: na.modal },
            r(
                Re,
                { separator: !1, className: Be("modal-header") },
                r(
                    H,
                    { color: "text-strong", variant: "heading-lg/semibold", tag: "h1", style: { flexGrow: 1 } },
                    "Hold on"
                ),
                r(et, { onClick: e.onClose })
            ),
            r(
                Ie,
                { scrollbarType: "none" },
                r(
                    N.FormText,
                    null,
                    "By submitting a decoration, you agree to ",
                    r(
                        Ve,
                        { href: "https://github.com/decor-discord/.github/blob/main/GUIDELINES.md" },
                        "the guidelines"
                    ),
                    ". Not reading these guidelines may get your account suspended from creating more decorations in the future."
                )
            ),
            r(
                St,
                { className: Be("modal-footer") },
                r(
                    oe,
                    { gap: "4px" },
                    r(
                        F,
                        {
                            onClick: () => {
                                (sa.store.agreedToGuidelines = !0), e.onClose(), ad();
                            },
                        },
                        "Continue"
                    ),
                    r(F, { onClick: e.onClose, color: F.Colors.PRIMARY, look: F.Looks.LINK }, "Go Back")
                )
            )
        );
    }
    var ix = () => ia().then(() => fe((e) => r(ZM, { ...e })));
    function QM() {
        let [e, t] = k([]);
        return (
            te(() => {
                JS().then(t);
            }, []),
            e
        );
    }
    var XM = new xo();
    function JM({ section: e }) {
        let t = typeof e.subtitle < "u",
            o = typeof e.authorIds < "u",
            [n, i] = k([]);
        return (
            te(() => {
                XM.push(async () => {
                    if (e.authorIds)
                        for (let s of e.authorIds) {
                            let c = R.getUser(s) ?? (await lo.getUser(s).catch(() => null));
                            c != null && i((u) => [...u, c]);
                        }
                });
            }, [e.authorIds]),
            r(
                "div",
                null,
                r(
                    oe,
                    null,
                    r(N.FormTitle, { style: { flexGrow: 1 } }, e.title),
                    o &&
                        r(fr, {
                            users: n,
                            guildId: void 0,
                            renderIcon: !1,
                            max: 5,
                            showDefaultAvatarsForNullUsers: !0,
                            size: 16,
                            showUserPopout: !0,
                            className: O.bottom8,
                        })
                ),
                t && r(N.FormText, { className: O.bottom8 }, e.subtitle)
            )
        );
    }
    function VM(e) {
        let [t, o] = k(void 0),
            n = typeof t < "u",
            i = t != null ? id(t) : t,
            { decorations: s, selectedDecoration: c, fetch: u, select: p } = Zr();
        te(() => {
            u();
        }, []);
        let m = n ? t : c,
            h = typeof m?.authorId < "u",
            y = s.some((E) => E.reviewed === !1),
            b = QM(),
            x = b.flatMap((E) => E.decorations),
            P = b.find((E) => E.id === m?.presetId),
            I = typeof P < "u",
            A = [
                {
                    title: "Your Decorations",
                    subtitle: "You can delete your own decorations by right clicking on them.",
                    sectionKey: "ownDecorations",
                    items: ["none", ...s.filter((E) => !x.some((q) => q.hash === E.hash)), "create"],
                },
                ...b.map((E) => ({
                    title: E.name,
                    subtitle: E.description || void 0,
                    sectionKey: `preset-${E.id}`,
                    items: E.decorations,
                    authorIds: E.authorIds,
                })),
            ];
        return r(
            ve,
            { ...e, size: "dynamic", className: na.modal },
            r(
                Re,
                { separator: !1, className: Be("modal-header") },
                r(
                    H,
                    { color: "text-strong", variant: "heading-lg/semibold", tag: "h1", style: { flexGrow: 1 } },
                    "Change Decoration"
                ),
                r(et, { onClick: e.onClose })
            ),
            r(
                Ie,
                { className: Be("change-decoration-modal-content"), scrollbarType: "none" },
                r(
                    C,
                    null,
                    r(H0, {
                        renderItem: (E) => {
                            if (typeof E == "string")
                                switch (E) {
                                    case "none":
                                        return r(U0, {
                                            className: Be("change-decoration-modal-decoration"),
                                            isSelected: m === null,
                                            onSelect: () => o(null),
                                        });
                                    case "create":
                                        return r(
                                            V,
                                            { text: "You already have a decoration pending review", shouldShow: y },
                                            (q) =>
                                                r(B0, {
                                                    className: Be("change-decoration-modal-decoration"),
                                                    ...q,
                                                    onSelect: y ? () => {} : sa.store.agreedToGuidelines ? ad : ix,
                                                })
                                        );
                                }
                            else
                                return r(V, { text: "Pending review", shouldShow: E.reviewed === !1 }, (q) =>
                                    r($0, {
                                        ...q,
                                        className: Be("change-decoration-modal-decoration"),
                                        onSelect: E.reviewed !== !1 ? () => o(E) : () => {},
                                        isSelected: m?.hash === E.hash,
                                        decoration: E,
                                    })
                                );
                        },
                        getItemKey: (E) => (typeof E == "string" ? E : E.hash),
                        getSectionKey: (E) => E.sectionKey,
                        renderSectionHeader: (E) => r(JM, { section: E }),
                        sections: A,
                    }),
                    r(
                        "div",
                        { className: Be("change-decoration-modal-preview") },
                        r(sd, { avatarDecoration: i, user: R.getCurrentUser() }),
                        I && r(N.FormTitle, { className: "" }, "Part of the ", P.name, " Preset"),
                        typeof m == "object" && r(H, { variant: "text-sm/semibold", color: "text-strong" }, m?.alt),
                        h && r(H, { key: `createdBy-${m.authorId}` }, "Created by ", Ne.parse(`<@${m.authorId}>`)),
                        I && r(F, { onClick: () => tt(P.id) }, "Copy Preset ID")
                    )
                )
            ),
            r(
                St,
                { className: Be("change-decoration-modal-footer", "modal-footer") },
                r(
                    "div",
                    { className: Be("modal-footer-btn-container") },
                    r(F, { onClick: e.onClose, color: F.Colors.PRIMARY }, "Cancel"),
                    r(
                        F,
                        {
                            onClick: () => {
                                p(t).then(e.onClose);
                            },
                            disabled: !n,
                        },
                        "Apply"
                    )
                ),
                r(
                    "div",
                    { className: Be("modal-footer-btn-container") },
                    r(
                        V,
                        {
                            text: "Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released",
                        },
                        (E) =>
                            r(
                                jt,
                                {
                                    ...E,
                                    onClick: async () => {
                                        Ce.getGuild(ra)
                                            ? (e.onClose(),
                                              B.dispatch({ type: "LAYER_POP_ALL" }),
                                              gr.transitionToGuild(ra))
                                            : (await pn(fc)) && (Wr(), B.dispatch({ type: "LAYER_POP_ALL" }));
                                    },
                                    variant: "link",
                                },
                                "Discord Server"
                            )
                    ),
                    r(
                        jt,
                        {
                            onClick: () =>
                                Qe.show({
                                    title: "Log Out",
                                    body: "Are you sure you want to log out of Decor?",
                                    confirmText: "Log Out",
                                    confirmColor: Be("danger-btn"),
                                    cancelText: "Cancel",
                                    onConfirm() {
                                        ti.getState().remove(R.getCurrentUser().id), e.onClose();
                                    },
                                }),
                            variant: "dangerSecondary",
                        },
                        "Log Out"
                    )
                )
            )
        );
    }
    var z0 = () => ia().then(() => fe((e) => r(VM, { ...e })));
    G();
    S();
    var e8 = ge(".DESCRIPTION", "hasBackground:");
    function hc({ hideTitle: e = !1, hideDivider: t = !1, noMargin: o = !1 }) {
        let n = ti(),
            { selectedDecoration: i, select: s, fetch: c } = Zr();
        return (
            te(() => {
                n.isAuthorized() && c();
            }, [n.token]),
            r(
                e8,
                {
                    title: !e && "Decor",
                    hasBackground: !0,
                    hideDivider: t,
                    className: o && Be("section-remove-margin"),
                },
                r(
                    oe,
                    { gap: "4px" },
                    r(
                        jt,
                        {
                            onClick: () => {
                                n.isAuthorized()
                                    ? z0()
                                    : n
                                          .authorize()
                                          .then(z0)
                                          .catch(() => {});
                            },
                            variant: "primary",
                            size: "small",
                        },
                        "Change Decoration"
                    ),
                    i &&
                        n.isAuthorized() &&
                        r(jt, { onClick: () => s(null), variant: "secondary", size: "small" }, "Remove Decoration")
                )
            )
        );
    }
    var sa = w({
        changeDecoration: {
            type: 6,
            component() {
                return aa.started
                    ? r(
                          "div",
                          null,
                          r(hc, { hideTitle: !0, hideDivider: !0, noMargin: !0 }),
                          r(
                              N.FormText,
                              { className: L(O.top8, O.bottom8) },
                              "You can also access Decor decorations from the ",
                              r(
                                  Ve,
                                  {
                                      href: "/settings/profile-customization",
                                      onClick: (e) => {
                                          e.preventDefault(),
                                              Wr(),
                                              B.dispatch({
                                                  type: "USER_SETTINGS_MODAL_SET_SECTION",
                                                  section: "Profile Customization",
                                              });
                                      },
                                  },
                                  "Profiles"
                              ),
                              " page."
                          )
                      )
                    : r(N.FormText, null, "Enable Decor and restart your client to change your avatar decoration.");
            },
        },
        agreedToGuidelines: { type: 3, description: "Agreed to guidelines", hidden: !0, default: !1 },
    });
    var aa = v({
        name: "Decor",
        description: "Create and use your own custom avatar decorations, or pick your favorite from the presets.",
        authors: [d.FieryFlames],
        patches: [
            {
                find: "getAvatarDecorationURL:",
                replacement: {
                    match: /(?<=function \i\(\i\){)(?=let{avatarDecoration)/,
                    replace:
                        "const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;",
                },
            },
            {
                find: "DefaultCustomizationSections",
                replacement: {
                    match: /(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,
                    replace: "$self.DecorSection(),",
                },
            },
            {
                find: "80,onlyAnimateOnHoverOrFocus:!",
                replacement: [
                    {
                        match: /(?<==)\i=>{let{children.{20,200}isSelected:\i=!1.{0,5}\}=\i/,
                        replace: "$self.DecorationGridItem=$&",
                    },
                    { match: /(?<==)\i=>{let{user:\i,avatarDecoration/, replace: "$self.DecorationGridDecoration=$&" },
                    {
                        match: /(?<=\.\i\.PURCHASE)(?=,)(?<=avatarDecoration:(\i).+?)/,
                        replace: "||$1.skuId===$self.SKU_ID",
                    },
                ],
            },
            {
                find: "isAvatarDecorationAnimating:",
                group: !0,
                replacement: [
                    {
                        match: /(?<=\.avatarDecoration,guildId:\i\}\)\),)(?<=user:(\i).+?)/,
                        replace: "vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),",
                    },
                    {
                        match: /(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,
                        replace: "$1??vcDecorAvatarDecoration??($&)",
                    },
                    { match: /(?<=size:\i}\),\[)/, replace: "vcDecorAvatarDecoration," },
                ],
            },
            {
                find: ".DISPLAY_NAME_STYLES_COACHMARK),",
                replacement: [
                    {
                        match: /(?<=\i\)\({avatarDecoration:)\i(?=,)(?<=currentUser:(\i).+?)/,
                        replace: "$self.useUserDecorAvatarDecoration($1)??$&",
                    },
                ],
            },
            ...[
                '"Message Username"',
                "#{intl::COLLECTIBLES_NAMEPLATE_PREVIEW_A11Y}",
                "#{intl::COLLECTIBLES_PROFILE_PREVIEW_A11Y}",
            ].map((e) => ({
                find: e,
                replacement: {
                    match: /(?<=userValue:)((\i(?:\.author)?)\?\.avatarDecoration)/,
                    replace: "$self.useUserDecorAvatarDecoration($2)??$1",
                },
            })),
            {
                find: "#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}",
                replacement: {
                    match: /(#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}.+?return null!=(\i)&&\()(null==\i)/,
                    replace: (e, t, o, n) => `${t}(${o}.skuId!==$self.SKU_ID&&${o}.skuId!==$self.RAW_SKU_ID&&${n})`,
                },
            },
        ],
        settings: sa,
        flux: {
            CONNECTION_OPEN: () => {
                ti.getState().init(), Zr.getState().clear(), Sn.getState().fetch(R.getCurrentUser().id, !0);
            },
            USER_PROFILE_MODAL_OPEN: (e) => {
                Sn.getState().fetch(e.userId, !0);
            },
        },
        set DecorationGridItem(e) {
            tx(e);
        },
        set DecorationGridDecoration(e) {
            ox(e);
        },
        SKU_ID: Vi,
        RAW_SKU_ID: mc,
        useUserDecorAvatarDecoration: VS,
        async start() {
            Sn.getState().fetch(R.getCurrentUser().id, !0);
        },
        getDecorAvatarDecorationURL({ avatarDecoration: e, canAnimate: t }) {
            if (e?.skuId === Vi) {
                let o = e.asset.split("_");
                return e.asset.startsWith("a_") && !t && o.shift(), `${qS}/${o.join("_")}.png`;
            } else if (e?.skuId === mc) return e.asset;
        },
        DecorSection: C.wrap(hc, { noop: !0 }),
    });
    a();
    l();
    T();
    var ld = v({
        name: "DisableCallIdle",
        description:
            "Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",
        authors: [d.Nuckyz],
        patches: [
            {
                find: "this.idleTimeout.start(",
                replacement: { match: /this\.idleTimeout\.(start|stop)/g, replace: "$self.noop" },
            },
            {
                find: "handleIdleUpdate(){",
                replacement: { match: "handleIdleUpdate(){", replace: "handleIdleUpdate(){return;" },
            },
        ],
        noop() {},
    });
    a();
    l();
    T();
    S();
    var cd = v({
        name: "DontRoundMyTimestamps",
        authors: [d.Lexi],
        description: "Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",
        start() {
            Ls.relativeTimeRounding(Math.floor);
        },
        stop() {
            Ls.relativeTimeRounding(Math.round);
        },
    });
    a();
    l();
    Yo();
    T();
    G();
    S();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/experiments/hideBugReport.css", {
        name: "src/plugins/experiments/hideBugReport.css",
        source: `#staff-help-popout-staff-help-bug-reporter {
    display: none;
}
`,
        classNames: {},
        dom: null,
    });
    var W0 = "src/plugins/experiments/hideBugReport.css";
    var ud = X("key", "combo"),
        t8 = Ot((e) => e?.definition?.name === "2026-01-bug-reporter"),
        o8 = Bo ? "cmd" : "ctrl",
        r8 = Bo ? "opt" : "alt",
        sx = w({
            toolbarDevMenu: {
                type: 3,
                description: "Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",
                default: !1,
                restartNeeded: !0,
            },
        }),
        pd = v({
            name: "Experiments",
            description: "Enable Access to Experiments & other dev-only features in Discord!",
            authors: [d.Megu, d.Ven, d.Nickyux, d.BanTheNons, d.Nuckyz],
            settings: sx,
            patches: [
                {
                    find: "Object.defineProperties(this,{isDeveloper",
                    replacement: { match: /(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/, replace: "true" },
                },
                {
                    find: 'type:"user",revision',
                    replacement: { match: /!(\i)(?=&&"CONNECTION_OPEN")/, replace: "!($1=true)" },
                },
                {
                    find: 'placeholder:"Search experiments"',
                    replacement: {
                        match: /(?<=children:\[)(?=\(0,\i\.jsx?\)\(\i\.\i,{placeholder:"Search experiments")/,
                        replace: "$self.WarningCard(),",
                    },
                },
                {
                    find: '?"BACK_FORWARD_NAVIGATION":',
                    replacement: { match: /hasBugReporterAccess:(\i)/, replace: "_hasBugReporterAccess:$1=true" },
                    predicate: () => sx.store.toolbarDevMenu,
                },
                {
                    find: 'navId:"staff-help-popout"',
                    replacement: { match: /(isShown.+?)onClick:\i/, replace: (e, t) => `${t}onClick:()=>{}` },
                },
                {
                    find: "Clear Treatment ",
                    replacement: [
                        { match: /\i\??\.isStaff\(\)/, replace: "true" },
                        {
                            match: /\.isStaffPersonal\(\).+?if\(null==(\i)\|\|null==\i(?=\)return null;)/,
                            replace: "$&||({})[$1]!=null",
                        },
                    ],
                },
                {
                    find: "}getServerAssignment(",
                    replacement: { match: /}getServerAssignment\((\i),\i,\i\){/, replace: "$&if($1==null)return;" },
                },
            ],
            start: () => !t8.getConfig().hasBugReporterAccess && Go(W0),
            stop: () => Ho(W0),
            settingsAboutComponent: () =>
                r(
                    xe.Fragment,
                    null,
                    r(N.FormTitle, { tag: "h3" }, "More Information"),
                    r(
                        Me,
                        { size: "md" },
                        "You can open Discord's DevTools via ",
                        " ",
                        r(
                            "div",
                            { className: ud.combo, style: { display: "inline-flex" } },
                            r("kbd", { className: ud.key }, o8),
                            " +",
                            " ",
                            r("kbd", { className: ud.key }, r8),
                            " +",
                            " ",
                            r("kbd", { className: ud.key }, "O"),
                            " "
                        )
                    )
                ),
            WarningCard: C.wrap(
                () =>
                    r(
                        eo,
                        { id: "vc-experiments-warning-card", className: O.bottom16 },
                        r(N.FormTitle, { tag: "h2" }, "Hold on!!"),
                        r(
                            N.FormText,
                            null,
                            "Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."
                        ),
                        r(
                            N.FormText,
                            { className: O.top8 },
                            "Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know."
                        ),
                        r(
                            N.FormText,
                            { className: O.top8 },
                            'No, you cannot use server-side features like checking the "Send to Client" box.'
                        )
                    ),
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    var dd = v({
        name: "F8Break",
        description: "Pause the client when you press F8 with DevTools (+ breakpoints) open.",
        authors: [d.lewisakura],
        start() {
            unsafeWindow.addEventListener("keydown", this.event);
        },
        stop() {
            unsafeWindow.removeEventListener("keydown", this.event);
        },
        event(e) {
            if (e.code === "F8") debugger;
        },
    });
    a();
    l();
    a();
    l();
    var q0 = class {
            width = 0;
            height = 0;
            numPlays = 0;
            playTime = 0;
            frames = [];
        },
        dx = new Uint32Array(256);
    for (let e = 0; e < 256; e++) {
        let t = e;
        for (let o = 0; o < 8; o++) t = t & 1 ? 3988292384 ^ (t >>> 1) : t >>> 1;
        dx[e] = t;
    }
    function n8(e, t = 0, o) {
        o = o ?? e.length - t;
        let n = -1;
        for (let i = t, s = t + o; i < s; i++) n = (n >>> 8) ^ dx[(n ^ e[i]) & 255];
        return n ^ -1;
    }
    var j0 = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
    function mx(e) {
        let t = new Uint8Array(e);
        return new Promise(function (o, n) {
            for (let x = 0; x < j0.length; x++)
                if (j0[x] != t[x]) {
                    n("Not a PNG file (invalid file signature)");
                    return;
                }
            let i = !1;
            if (
                (ax(t, function (x) {
                    return x == "acTL" ? ((i = !0), !1) : !0;
                }),
                !i)
            ) {
                n("Not an animated PNG");
                return;
            }
            let s = [],
                c = [],
                u = null,
                p = null,
                m = new q0();
            if (
                (ax(t, function (x, P, I, D) {
                    switch (x) {
                        case "IHDR":
                            (u = P.subarray(I + 8, I + 8 + D)), (m.width = oi(P, I + 8)), (m.height = oi(P, I + 12));
                            break;
                        case "acTL":
                            m.numPlays = oi(P, I + 8 + 4);
                            break;
                        case "fcTL":
                            p && m.frames.push(p),
                                (p = {}),
                                (p.width = oi(P, I + 8 + 4)),
                                (p.height = oi(P, I + 8 + 8)),
                                (p.left = oi(P, I + 8 + 12)),
                                (p.top = oi(P, I + 8 + 16));
                            let A = lx(P, I + 8 + 20),
                                E = lx(P, I + 8 + 22);
                            E == 0 && (E = 100),
                                (p.delay = (1e3 * A) / E),
                                p.delay <= 10 && (p.delay = 100),
                                (m.playTime += p.delay),
                                (p.disposeOp = cx(P, I + 8 + 24)),
                                (p.blendOp = cx(P, I + 8 + 25)),
                                (p.dataParts = []);
                            break;
                        case "fdAT":
                            p && p.dataParts.push(P.subarray(I + 8 + 4, I + 8 + D));
                            break;
                        case "IDAT":
                            p && p.dataParts.push(P.subarray(I + 8, I + 8 + D));
                            break;
                        case "IEND":
                            c.push(ux(P, I, 12 + D));
                            break;
                        default:
                            s.push(ux(P, I, 12 + D));
                    }
                }),
                p && m.frames.push(p),
                m.frames.length == 0)
            ) {
                n("Not an animated PNG");
                return;
            }
            let h = 0,
                y = new Blob(s),
                b = new Blob(c);
            for (let x = 0; x < m.frames.length; x++) {
                p = m.frames[x];
                let P = [];
                P.push(j0), u.set(md(p.width), 0), u.set(md(p.height), 4), P.push(px("IHDR", u)), P.push(y);
                for (let A = 0; A < p.dataParts.length; A++) P.push(px("IDAT", p.dataParts[A]));
                P.push(b);
                let I = URL.createObjectURL(new Blob(P, { type: "image/png" }));
                delete p.dataParts;
                let D = (p.img = new Image());
                (D.onload = function () {
                    URL.revokeObjectURL(D.src), h++, h == m.frames.length && o(m);
                }),
                    (D.onerror = function () {
                        n("Image creation error");
                    }),
                    (D.src = I);
            }
        });
    }
    function ax(e, t) {
        let o = 8,
            n,
            i;
        do {
            let s = oi(e, o);
            (i = i8(e, o + 4, 4)), (n = t(i, e, o, s)), (o += 12 + s);
        } while (n !== !1 && i != "IEND" && o < e.length);
    }
    function oi(e, t) {
        let o = 0;
        o += (e[0 + t] << 24) >>> 0;
        for (let n = 1; n < 4; n++) o += e[n + t] << ((3 - n) * 8);
        return o;
    }
    function lx(e, t) {
        let o = 0;
        for (let n = 0; n < 2; n++) o += e[n + t] << ((1 - n) * 8);
        return o;
    }
    function cx(e, t) {
        return e[t];
    }
    function ux(e, t, o) {
        let n = new Uint8Array(o);
        return n.set(e.subarray(t, t + o)), n;
    }
    function i8(e, t, o) {
        let n = Array.prototype.slice.call(e.subarray(t, t + o));
        return String.fromCharCode.apply(String, n);
    }
    function md(e) {
        return [(e >>> 24) & 255, (e >>> 16) & 255, (e >>> 8) & 255, e & 255];
    }
    function s8(e) {
        let t = [];
        for (let o = 0; o < e.length; o++) t.push(e.charCodeAt(o));
        return t;
    }
    function px(e, t) {
        let o = e.length + t.length,
            n = new Uint8Array(new ArrayBuffer(o + 8));
        n.set(md(t.length), 0), n.set(s8(e), 4), n.set(t, 8);
        let i = n8(n, 4, o);
        return n.set(md(i), o + 4), n;
    }
    T();
    se();
    le();
    G();
    S();
    var la = Nv(X0()),
        Mx = X("readerFactory");
    function Rx(e, t) {
        let o = t?.fields?.find((i) => i.localName === e);
        return o ? Object.values(o).find((i) => typeof i == "function")?.() : void 0;
    }
    var bd = wo(() => gl.PreloadedUserSettingsActionCreators),
        ts = wo(() => Rx("appearance", bd.ProtoClass)),
        Cx = wo(() => Rx("clientThemeSettings", ts)),
        N8 = de(".getUserIsAdmin(");
    var yd = "[3,4].includes(fakeNitroIntention)";
    var J0 = /\/emojis\/(\d+?)\.(png|webp|gif)/,
        V0 = /\/stickers\/(\d+?)\./,
        vd = /\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,
        Nx = /\[.+?\]\((https?:\/\/.+?)\)/,
        We = w({
            enableEmojiBypass: {
                description: "Allows sending fake emojis (also bypasses missing permission to use custom emojis)",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            emojiSize: {
                description: "Size of the emojis when sending",
                type: 5,
                default: 48,
                markers: [32, 48, 56, 64, 96, 128, 160, 256, 512],
            },
            transformEmojis: {
                description: "Whether to transform fake emojis into real ones",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            enableStickerBypass: {
                description: "Allows sending fake stickers (also bypasses missing permission to use stickers)",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            stickerSize: {
                description: "Size of the stickers when sending",
                type: 5,
                default: 160,
                markers: [32, 64, 128, 160, 256, 512],
            },
            transformStickers: {
                description: "Whether to transform fake stickers into real ones",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            transformCompoundSentence: {
                description:
                    "Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",
                type: 3,
                default: !1,
            },
            enableStreamQualityBypass: {
                description: "Allow streaming in nitro quality",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
            useHyperLinks: {
                description: "Whether to use hyperlinks when sending fake emojis and stickers",
                type: 3,
                default: !0,
            },
            hyperLinkText: {
                description:
                    "What text the hyperlink should use. {{NAME}} will be replaced with the emoji/sticker name.",
                type: 0,
                default: "{{NAME}}",
            },
            disableEmbedPermissionCheck: {
                description: "Whether to disable the embed permission check when sending fake emojis and stickers",
                type: 3,
                default: !1,
            },
        });
    function Sd(e, t) {
        let o = Z.getChannel(e);
        return !o || o.isPrivate() ? !0 : Te.can(t, o);
    }
    var A8 = (e) => Sd(e, pe.USE_EXTERNAL_EMOJIS),
        R8 = (e) => Sd(e, pe.USE_EXTERNAL_STICKERS),
        Ax = (e) => Sd(e, pe.EMBED_LINKS),
        k8 = (e) => Sd(e, pe.ATTACH_FILES);
    function D8() {
        return {
            find: "canUseCustomStickersEverywhere:",
            replacement: [
                { func: "canUseCustomStickersEverywhere", predicate: () => We.store.enableStickerBypass },
                { func: "canUseHighVideoUploadQuality", predicate: () => We.store.enableStreamQualityBypass },
                { func: "canStreamQuality", predicate: () => We.store.enableStreamQualityBypass },
                { func: "canUseClientThemes" },
                { func: "canUsePremiumAppIcons" },
            ].map(({ func: t, predicate: o }) => ({
                match: new RegExp(String.raw`(?<=${t}:)\i`),
                replace: "() => true",
                predicate: o,
            })),
        };
    }
    var xd = v({
        name: "FakeNitro",
        authors: [d.Arjix, d.D3SOX, d.Ven, d.fawn, d.captain, d.Nuckyz, d.AutumnVN, d.sadan],
        description: "Allows you to send fake emojis/stickers, use nitro themes, and stream in nitro quality",
        dependencies: ["MessageEventsAPI"],
        settings: We,
        patches: [
            D8(),
            {
                find: '.getByName("fork_and_knife")',
                predicate: () => We.store.enableEmojiBypass,
                replacement: { match: ".CHAT", replace: ".STATUS" },
            },
            {
                find: ".GUILD_SUBSCRIPTION_UNAVAILABLE;",
                group: !0,
                predicate: () => We.store.enableEmojiBypass,
                replacement: [
                    {
                        match: /(?<=\.USE_EXTERNAL_EMOJIS.+?;)(?<=intention:(\i).+?)/,
                        replace: (e, t) => `const fakeNitroIntention=${t};`,
                    },
                    { match: /&&!\i&&!\i(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/, replace: (e) => `${e}&&!${yd}` },
                    {
                        match: /!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,
                        replace: (e) => `${e}&&!${yd}`,
                    },
                    { match: /!(\i\.\i\.canUseEmojisEverywhere\(\i\))/, replace: (e) => `(${e}&&!${yd})` },
                    { match: /(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/, replace: (e) => `(${e}||${yd})` },
                ],
            },
            {
                find: ".getUserIsAdmin(",
                replacement: {
                    match: /(function \i\(\i,\i)\){(.{0,250}.getUserIsAdmin\(.+?return!1})/,
                    replace: (e, t, o) => `${t},fakeNitroOriginal){if(!fakeNitroOriginal)return false;${o}`,
                },
            },
            {
                find: '"SENDABLE"',
                predicate: () => We.store.enableStickerBypass,
                replacement: { match: /\i\.available\?/, replace: "true?" },
            },
            {
                find: "#{intl::STREAM_FPS_OPTION}",
                predicate: () => We.store.enableStreamQualityBypass,
                replacement: { match: /guildPremiumTier:\i\.\i\.TIER_\d,?/g, replace: "" },
            },
            {
                find: '"UserSettingsProtoStore"',
                replacement: [
                    {
                        match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,
                        replace: (e, t, o) => `${e}$self.handleProtoChange(${o}.userSettingsProto,${o}.user);`,
                    },
                    {
                        match: /let{settings:/,
                        replace: "arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&",
                    },
                ],
            },
            {
                find: ",updateTheme(",
                replacement: {
                    match: /(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,
                    replace: (e, t, o, n, i) => `${t}$self.handleGradientThemeSelect(${o},${i},()=>${n});`,
                },
            },
            {
                find: "customUserThemeSettings:{",
                all: !0,
                replacement: { match: /(?<=\i=)\(0,\i\.\i\)\(\i\.\i\.TIER_2\)(?=,|;)/g, replace: "true" },
            },
            {
                find: '["strong","em","u","text","inlineCode","s","spoiler"]',
                replacement: [
                    {
                        predicate: () => We.store.transformEmojis,
                        match: /1!==(\i)\.length\|\|1!==\i\.length/,
                        replace: (e, t) => `${e}||$self.shouldKeepEmojiLink(${t}[0])`,
                    },
                    {
                        predicate: () => We.store.transformEmojis || We.store.transformStickers,
                        match: /(?=return{hasSpoilerEmbeds:\i,hasBailedAst:\i,content:(\i))/,
                        replace: (e, t) =>
                            `${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`,
                    },
                ],
            },
            {
                find: "}renderStickersAccessories(",
                replacement: [
                    {
                        predicate: () => We.store.transformEmojis || We.store.transformStickers,
                        match: /(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\i\)?=>{)/,
                        replace: (e, t, o, n, i) =>
                            `${t}const fakeNitroMessage=${o};${n}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`,
                    },
                    {
                        predicate: () => We.store.transformStickers,
                        match: /renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,
                        replace: (e, t, o) => `${e}${o}=$self.patchFakeNitroStickers(${o},${t});`,
                    },
                    {
                        predicate: () => We.store.transformStickers,
                        match: /renderAttachments\(\i\){.+?{attachments:(\i).+?;/,
                        replace: (e, t) => `${e}${t}=$self.filterAttachments(${t});`,
                    },
                ],
            },
            {
                find: "#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}",
                predicate: () => We.store.transformStickers,
                replacement: [
                    {
                        match: /let{renderableSticker:(\i).{0,270}sticker:\i,channel:\i,/,
                        replace: (e, t) => `${e}fakeNitroRenderableSticker:${t},`,
                    },
                    {
                        match: /(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,
                        replace: (e, t, o, n, i) =>
                            `${t}let{fakeNitroRenderableSticker}=${o};${n}$self.addFakeNotice(0,${i},!!fakeNitroRenderableSticker?.fake)`,
                    },
                ],
            },
            {
                find: ".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",
                predicate: () => We.store.transformEmojis,
                replacement: {
                    match: /isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,
                    replace: (e, t) => `${e}fakeNitroNode:${t},`,
                },
            },
            {
                find: "#{intl::EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION}",
                predicate: () => We.store.transformEmojis,
                replacement: {
                    match: /(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,
                    replace: (e, t, o) => `$self.addFakeNotice(1,${t},!!${o}?.fakeNitroNode?.fake)`,
                },
            },
            {
                find: "getCurrentDesktopIcon(),",
                replacement: { match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, replace: "true" },
            },
            {
                find: 'type:"GUILD_SOUNDBOARD_SOUND_CREATE"',
                replacement: {
                    match: /(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,
                    replace: "true",
                },
            },
        ],
        get guildId() {
            return jr()?.id;
        },
        get canUseEmotes() {
            return (R.getCurrentUser().premiumType ?? 0) > 0;
        },
        get canUseStickers() {
            return (R.getCurrentUser().premiumType ?? 0) > 1;
        },
        handleProtoChange(e, t) {
            try {
                if (e == null || typeof e == "string") return;
                if ((t?.premium_type ?? R?.getCurrentUser()?.premiumType ?? 0) !== 2) {
                    e.appearance ??= ts.create();
                    let n = fl.settings.appearance,
                        i = ts.create({
                            ...e.appearance,
                            theme: n?.theme,
                            clientThemeSettings: n?.clientThemeSettings,
                        });
                    e.appearance = i;
                }
            } catch (o) {
                new U("FakeNitro").error(o);
            }
        },
        handleGradientThemeSelect(e, t, o) {
            if ((R?.getCurrentUser()?.premiumType ?? 0) === 2 || e == null) return o();
            if (!bd || !ts || !Cx || !Mx) return;
            let i = bd.getCurrentValue().appearance,
                s = i != null ? ts.fromBinary(ts.toBinary(i), Mx) : ts.create();
            s.theme = t;
            let c = Cx.create({ backgroundGradientPresetId: { value: e } });
            (s.clientThemeSettings ??= c),
                (s.clientThemeSettings.backgroundGradientPresetId = c.backgroundGradientPresetId);
            let u = bd.ProtoClass.create();
            (u.appearance = s),
                B.dispatch({
                    type: "USER_SETTINGS_PROTO_UPDATE",
                    local: !0,
                    partial: !0,
                    settings: { type: 1, proto: u },
                });
        },
        trimContent(e) {
            let t = e[0];
            typeof t == "string"
                ? ((e[0] = t.trimStart()), e[0] || e.shift())
                : typeof t?.props?.children == "string" &&
                  ((t.props.children = t.props.children.trimStart()), t.props.children || e.shift());
            let o = e.length - 1,
                n = e[o];
            typeof n == "string"
                ? ((e[o] = n.trimEnd()), e[o] || e.pop())
                : typeof n?.props?.children == "string" &&
                  ((n.props.children = n.props.children.trimEnd()), n.props.children || e.pop());
        },
        clearEmptyArrayItems(e) {
            return e.filter((t) => t != null);
        },
        ensureChildrenIsArray(e) {
            Array.isArray(e.props.children) || (e.props.children = [e.props.children]);
        },
        patchFakeNitroEmojisOrRemoveStickersLinks(e, t) {
            if ((e.length > 1 || typeof e[0]?.type == "string") && !We.store.transformCompoundSentence) return e;
            let o = e.length,
                n = (u) => {
                    if (We.store.transformEmojis) {
                        let p = u.props.href.match(J0);
                        if (p) {
                            let m = null;
                            try {
                                m = new URL(u.props.href);
                            } catch {}
                            let h =
                                    Jo.getCustomEmojiById(p[1])?.name ??
                                    m?.searchParams.get("name") ??
                                    "FakeNitroEmoji",
                                y = p[2] === "gif" || m?.searchParams.get("animated") === "true";
                            return Ne.defaultRules.customEmoji.react(
                                {
                                    jumboable: !t && e.length === 1 && typeof e[0].type != "string",
                                    animated: y,
                                    emojiId: p[1],
                                    name: h,
                                    fake: !0,
                                },
                                void 0,
                                { key: String(o++) }
                            );
                        }
                    }
                    if (We.store.transformStickers) {
                        if (V0.test(u.props.href)) return null;
                        let p = u.props.href.match(vd);
                        if (p && ao.getStickerById(p[1])) return null;
                    }
                    return u;
                },
                i = (u) =>
                    u?.props?.trusted != null
                        ? n(u)
                        : u?.props?.children != null
                          ? Array.isArray(u.props.children)
                              ? ((u.props.children = c(u.props.children)), u.props.children.length === 0 ? null : u)
                              : ((u.props.children = s(u.props.children)), u)
                          : u,
                s = (u) => {
                    let p = i(u);
                    if (p?.type === "ul" || p?.type === "ol") {
                        if ((this.ensureChildrenIsArray(p), p.props.children.length === 0)) return null;
                        let m = !1;
                        for (let [h, y] of p.props.children.entries()) {
                            if (y == null) {
                                delete p.props.children[h];
                                continue;
                            }
                            this.ensureChildrenIsArray(y),
                                y.props.children.length > 0 ? (m = !0) : delete p.props.children[h];
                        }
                        if (!m) return null;
                        p.props.children = this.clearEmptyArrayItems(p.props.children);
                    }
                    return p;
                },
                c = (u) => {
                    for (let [p, m] of u.entries()) u[p] = s(m);
                    return (u = this.clearEmptyArrayItems(u)), u;
                };
            try {
                let u = c(Pi.cloneDeep(e));
                return this.trimContent(u), u;
            } catch (u) {
                return new U("FakeNitro").error(u), e;
            }
        },
        patchFakeNitroStickers(e, t) {
            let o = [],
                n = t.content.split(/\s/);
            We.store.transformCompoundSentence ? o.push(...n) : n.length === 1 && o.push(n[0]),
                o.push(...t.attachments.filter((i) => i.content_type === "image/gif").map((i) => i.url));
            for (let i of o) {
                if (!We.store.transformCompoundSentence && !i.startsWith("http") && !Nx.test(i)) continue;
                let s = i.match(V0);
                if (s) {
                    let u = null;
                    try {
                        u = new URL(i);
                    } catch {}
                    let p = ao.getStickerById(s[1])?.name ?? u?.searchParams.get("name") ?? "FakeNitroSticker";
                    e.push({ format_type: 1, id: s[1], name: p, fake: !0 });
                    continue;
                }
                let c = i.match(vd);
                if (c) {
                    if (!ao.getStickerById(c[1])) continue;
                    let u = ao.getStickerById(c[1])?.name ?? "FakeNitroSticker";
                    e.push({ format_type: 2, id: c[1], name: u, fake: !0 });
                }
            }
            return e;
        },
        shouldIgnoreEmbed(e, t) {
            try {
                let o = t.content.split(/\s/);
                if (o.length > 1 && !We.store.transformCompoundSentence) return !1;
                switch (e.type) {
                    case "image": {
                        let n = e.url ?? e.image?.url;
                        if (
                            !n ||
                            (!We.store.transformCompoundSentence && !o.some((i) => i === n || i.match(Nx)?.[1] === n))
                        )
                            return !1;
                        if (We.store.transformEmojis && J0.test(n)) return !0;
                        if (We.store.transformStickers) {
                            if (V0.test(n)) return !0;
                            let i = n.match(vd);
                            if (i && ao.getStickerById(i[1])) return !0;
                        }
                        break;
                    }
                }
            } catch (o) {
                new U("FakeNitro").error("Error in shouldIgnoreEmbed:", o);
            }
            return !1;
        },
        filterAttachments(e) {
            return e.filter((t) => {
                if (t.content_type !== "image/gif") return !0;
                let o = t.url.match(vd);
                return !(o && ao.getStickerById(o[1]));
            });
        },
        shouldKeepEmojiLink(e) {
            return e.target && J0.test(e.target);
        },
        addFakeNotice(e, t, o) {
            if (!o) return t;
            switch (((t = Array.isArray(t) ? t : [t]), e)) {
                case 0:
                    return (
                        t.push(
                            " This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."
                        ),
                        t
                    );
                case 1:
                    return (
                        t.push(
                            " This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."
                        ),
                        t
                    );
            }
        },
        getStickerLink({ format_type: e, id: t }) {
            let o = e === 4 ? "gif" : "png";
            return `https://media.discordapp.net/stickers/${t}.${o}?size=${We.store.stickerSize}`;
        },
        async sendAnimatedSticker(e, t, o) {
            let {
                    frames: n,
                    width: i,
                    height: s,
                } = await g(e)
                    .then((x) => x.arrayBuffer())
                    .then(mx),
                c = (0, la.GIFEncoder)(),
                u = We.store.stickerSize,
                p = document.createElement("canvas");
            (p.width = u), (p.height = u);
            let m = p.getContext("2d", { willReadFrequently: !0 }),
                h = u / Math.max(i, s);
            m.scale(h, h);
            let y;
            for (let x of n) {
                let { left: P, top: I, width: D, height: A, img: E, delay: q, blendOp: z, disposeOp: K } = x;
                (y = m.getImageData(P, I, D, A)), z === 0 && m.clearRect(P, I, D, A), m.drawImage(E, P, I, D, A);
                let { data: ue } = m.getImageData(0, 0, u, u),
                    j = (0, la.quantize)(ue, 256),
                    ne = (0, la.applyPalette)(ue, j);
                c.writeFrame(ne, u, u, { transparent: !0, palette: j, delay: q }),
                    K === 1 ? m.clearRect(P, I, D, A) : K === 2 && m.putImageData(y, P, I);
            }
            c.finish();
            let b = new File([c.bytesView()], `${t}.gif`, { type: "image/gif" });
            hl.promptToUpload([b], Z.getChannel(o), Gt.ChannelMessage);
        },
        canUseEmote(e, t) {
            if (e.type === 0) return !0;
            if (e.available === !1 || N8(e, this.guildId, !0)) return !1;
            let o = !1;
            if (e.managed && e.guildId) {
                let n = Se.getSelfMember(e.guildId)?.roles ?? [];
                o = e.roles.some((i) => n.includes(i));
            }
            return this.canUseEmotes || o
                ? e.guildId === this.guildId || A8(t)
                : !e.animated && e.guildId === this.guildId;
        },
        start() {
            let e = We.store;
            if (!e.enableEmojiBypass && !e.enableStickerBypass) return;
            function t(n, i) {
                return !n[i] || /\s/.test(n[i]) ? "" : " ";
            }
            function o() {
                return new Promise((n) => {
                    Qe.show({
                        title: "Hold on!",
                        body: r(
                            "div",
                            null,
                            r(
                                N.FormText,
                                null,
                                "You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."
                            ),
                            r(N.FormText, null, "You can disable this notice in the plugin settings.")
                        ),
                        confirmText: "Send Anyway",
                        cancelText: "Cancel",
                        secondaryConfirmText: "Do not show again",
                        onConfirm: () => n(!0),
                        onCloseCallback: () => setImmediate(() => n(!1)),
                        onConfirmSecondary() {
                            (We.store.disableEmbedPermissionCheck = !0), n(!0);
                        },
                    });
                });
            }
            (this.preSend = Ui(async (n, i, s) => {
                let { guildId: c } = this,
                    u = !1;
                e: {
                    if (!e.enableStickerBypass) break e;
                    let p = ao.getStickerById(s.stickers?.[0]);
                    if (!p || "pack_id" in p) break e;
                    let m = this.canUseStickers && R8(n);
                    if (p.available !== !1 && (m || p.guild_id === c)) break e;
                    let h = this.getStickerLink(p);
                    if (p.format_type === 2)
                        return (
                            k8(n)
                                ? this.sendAnimatedSticker(h, p.id, n)
                                : Qe.show({
                                      title: "Hold on!",
                                      body: r(
                                          "div",
                                          null,
                                          r(
                                              N.FormText,
                                              null,
                                              "You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."
                                          )
                                      ),
                                  }),
                            { cancel: !0 }
                        );
                    {
                        u = !0;
                        let y = new URL(h);
                        y.searchParams.set("name", p.name), y.searchParams.set("lossless", "true");
                        let b = e.hyperLinkText.replaceAll("{{NAME}}", p.name);
                        (i.content += `${t(i.content, i.content.length - 1)}${e.useHyperLinks ? `[${b}](${y})` : y}`),
                            (s.stickers.length = 0);
                    }
                }
                if (e.enableEmojiBypass)
                    for (let p of i.validNonShortcutEmojis) {
                        if (this.canUseEmote(p, n)) continue;
                        u = !0;
                        let m = `<${p.animated ? "a" : ""}:${p.originalName || p.name}:${p.id}>`,
                            h = new URL(bt.getEmojiURL({ id: p.id, animated: p.animated, size: e.emojiSize }));
                        h.searchParams.set("size", e.emojiSize.toString()),
                            h.searchParams.set("name", p.name),
                            h.searchParams.set("lossless", "true");
                        let y = e.hyperLinkText.replaceAll("{{NAME}}", p.name);
                        i.content = i.content.replace(
                            m,
                            (b, x, P) => `${t(P, x - 1)}${e.useHyperLinks ? `[${y}](${h})` : h}${t(P, x + b.length)}`
                        );
                    }
                return u && !e.disableEmbedPermissionCheck && !Ax(n) && !(await o()) ? { cancel: !0 } : { cancel: !1 };
            })),
                (this.preEdit = Ul(async (n, i, s) => {
                    if (!e.enableEmojiBypass) return;
                    let c = !1;
                    return (
                        (s.content = s.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/gi, (u, p, m, h) => {
                            let y = Jo.getCustomEmojiById(p);
                            if (y == null || this.canUseEmote(y, n)) return u;
                            c = !0;
                            let b = new URL(bt.getEmojiURL({ id: y.id, animated: y.animated, size: e.emojiSize }));
                            b.searchParams.set("size", e.emojiSize.toString()),
                                b.searchParams.set("name", y.name),
                                b.searchParams.set("lossless", "true");
                            let x = e.hyperLinkText.replaceAll("{{NAME}}", y.name);
                            return `${t(h, m - 1)}${e.useHyperLinks ? `[${x}](${b})` : b}${t(h, m + u.length)}`;
                        })),
                        c && !e.disableEmbedPermissionCheck && !Ax(n) && !(await o()) ? { cancel: !0 } : { cancel: !1 }
                    );
                }));
        },
        stop() {
            Fi(this.preSend), Fl(this.preEdit);
        },
    });
    a();
    l();
    Qt();
    T();
    se();
    re();
    pt();
    G();
    S();
    a();
    l();
    function L8(...e) {
        let t = {};
        function o(i) {
            for (let s = e.length - 1; s >= 0; s--) if (i in e[s]) return e[s];
            return t;
        }
        let n = {
            ownKeys() {
                return e.reduce((i, s) => (i.push(...Reflect.ownKeys(s)), i), Reflect.ownKeys(t));
            },
        };
        for (let i of ["defineProperty", "deleteProperty", "get", "getOwnPropertyDescriptor", "has", "set"])
            n[i] = function (s, ...c) {
                return Reflect[i](o(c[0]), ...c);
            };
        return new Proxy(t, n);
    }
    var kx = L8;
    function Lx(e, t) {
        let o = `[#${e.toString(16).padStart(6, "0")},#${t.toString(16).padStart(6, "0")}]`,
            n = "",
            i = Array.from(o)
                .map((s) => s.codePointAt(0))
                .filter((s) => s >= 32 && s <= 127)
                .map((s) => String.fromCodePoint(s + 917504))
                .join("");
        return (n || "") + " " + i;
    }
    function Ox(e) {
        if (e == null) return null;
        let t = e.match(
            /\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]{1,6})\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]{1,6})\u{e005d}/u
        );
        if (t != null) {
            let o = [...t[0]].map((i) => String.fromCodePoint(i.codePointAt(0) - 917504)).join("");
            return o
                .substring(1, o.length - 1)
                .split(",")
                .map((i) => parseInt(i.replace("#", "0x"), 16));
        } else return null;
    }
    var Dx = w({
            nitroFirst: {
                description: "Default color source if both are present",
                type: 4,
                options: [
                    { label: "Nitro colors", value: !0, default: !0 },
                    { label: "Fake colors", value: !1 },
                ],
            },
        }),
        O8 = ge("isTryItOut:", "pendingThemeColors:", "pendingAvatarDecoration:", "EDIT_PROFILE_BANNER");
    function _8() {
        let [, , e] = _t(() => Es(R.getCurrentUser().id));
        return !e && r(E8, null);
    }
    function E8() {
        let e = Ox(Bt.getUserProfile(R.getCurrentUser().id)?.bio ?? "") ?? [0, 0],
            [t, o] = k(e[0]),
            [n, i] = k(e[1]);
        return r(
            "section",
            null,
            r(N.FormTitle, { tag: "h3" }, "Usage"),
            r(
                N.FormText,
                null,
                "After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins.",
                " "
            ),
            r(
                N.FormText,
                { className: O.top8 },
                r("strong", null, "To set your own profile theme colors:"),
                r(
                    "ul",
                    null,
                    r("li", null, "\u2014 use the color pickers below to choose your colors"),
                    r("li", null, '\u2014 click the "Copy 3y3" button'),
                    r("li", null, "\u2014 paste the invisible text anywhere in your bio")
                ),
                r(Fe, { className: L(O.top8, O.bottom8) }),
                r(N.FormTitle, { tag: "h3" }, "Color pickers"),
                r(
                    oe,
                    { gap: "1em" },
                    r(Ln, {
                        color: t,
                        label: r(H, { variant: "text-xs/normal", style: { marginTop: "4px" } }, "Primary"),
                        onChange: (s) => {
                            o(s);
                        },
                    }),
                    r(Ln, {
                        color: n,
                        label: r(H, { variant: "text-xs/normal", style: { marginTop: "4px" } }, "Accent"),
                        onChange: (s) => {
                            i(s);
                        },
                    }),
                    r(
                        F,
                        {
                            onClick: () => {
                                let s = Lx(t, n);
                                tt(s);
                            },
                            color: F.Colors.PRIMARY,
                            size: F.Sizes.XLARGE,
                            style: { marginBottom: "auto" },
                        },
                        "Copy 3y3"
                    )
                ),
                r(Fe, { className: L(O.top8, O.bottom8) }),
                r(N.FormTitle, { tag: "h3" }, "Preview"),
                r(
                    "div",
                    { className: "vc-fpt-preview" },
                    r(O8, {
                        user: R.getCurrentUser(),
                        pendingThemeColors: [t, n],
                        onAvatarChange: () => {},
                        onBannerChange: () => {},
                        canUsePremiumCustomization: !0,
                        hideExampleButton: !0,
                        hideFakeActivity: !0,
                        isTryItOut: !0,
                    })
                )
            )
        );
    }
    var Td = v({
        name: "FakeProfileThemes",
        description: "Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",
        authors: [d.Alyxia, d.Remty],
        patches: [
            {
                find: "UserProfileStore",
                replacement: {
                    match: /(?<=getUserProfile\(\i\){return )(.+?)(?=})/,
                    replace: "$self.colorDecodeHook($1)",
                },
            },
            {
                find: "#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",
                replacement: {
                    match: /#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\).+?}\)(?=\])(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,
                    replace: "$&,$self.addCopy3y3Button({primary:$1,accent:$2})",
                },
            },
        ],
        settingsAboutComponent: _8,
        settings: Dx,
        colorDecodeHook(e) {
            if (e?.bio) {
                if (Dx.store.nitroFirst && e.themeColors) return e;
                let t = Ox(e.bio);
                if (t) return kx(e, { premiumType: 2, themeColors: t });
            }
            return e;
        },
        addCopy3y3Button: C.wrap(
            function ({ primary: e, accent: t }) {
                return r(
                    F,
                    {
                        onClick: () => {
                            let o = Lx(e, t);
                            tt(o);
                        },
                        color: F.Colors.PRIMARY,
                        size: F.Sizes.XLARGE,
                        className: O.left16,
                    },
                    "Copy 3y3"
                );
            },
            { noop: !0 }
        ),
    });
    a();
    l();
    T();
    S();
    var wd = v({
        name: "FavoriteEmojiFirst",
        authors: [d.Aria, d.Ven],
        description: "Puts your favorite emoji first in the emoji autocomplete.",
        patches: [
            {
                find: "renderResults({results:",
                replacement: [
                    {
                        match: /let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,
                        replace: "$self.sortEmojis($1);$&",
                    },
                ],
            },
            {
                find: "numEmojiResults:",
                replacement: [
                    {
                        match: /,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(Math\.max\(\i,\i(?:-\i\.length){2}\))\)/,
                        replace: ",maxCount:Infinity$2=($3.sliceTo = $4, $3)",
                    },
                ],
            },
        ],
        sortEmojis({ query: e }) {
            if (e?.type !== "EMOJIS_AND_STICKERS" || e.typeInfo?.sentinel !== ":" || !e.results?.emojis?.length) return;
            let t = Jo.getDisambiguatedEmojiContext();
            e.results.emojis = e.results.emojis
                .sort((o, n) => {
                    let i = t.isFavoriteEmojiWithoutFetchingLatest(o),
                        s = t.isFavoriteEmojiWithoutFetchingLatest(n);
                    return i && !s ? -1 : !i && s ? 1 : 0;
                })
                .slice(0, e.results.emojis.sliceTo ?? 1 / 0);
        },
    });
    a();
    l();
    T();
    S();
    var _x = w({
            searchOption: {
                type: 4,
                description: "The part of the url you want to search",
                options: [
                    { label: "Entire Url", value: "url" },
                    { label: "Path Only (/somegif.gif)", value: "path" },
                    { label: "Host & Path (tenor.com somgif.gif)", value: "hostandpath", default: !0 },
                ],
            },
        }),
        Id = v({
            name: "FavoriteGifSearch",
            authors: [d.Aria],
            description: "Adds a search bar to favorite gifs.",
            patches: [
                {
                    find: "renderHeaderContent()",
                    replacement: [
                        {
                            match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:.{0,50}?return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,
                            replace:
                                "$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3",
                        },
                        { match: /(,suggestions:\i,favorites:)(\i),/, replace: "$1$self.getFav($2),favCopy:$2," },
                    ],
                },
            ],
            settings: _x,
            getTargetString: Ex,
            instance: null,
            renderSearchBar(e, t) {
                return (this.instance = e), r(C, { noop: !0 }, r(B8, { instance: e, SearchBarComponent: t }));
            },
            getFav(e) {
                if (!this.instance || this.instance.dead) return e;
                let { favorites: t } = this.instance.props;
                return t != null && t?.length !== e.length ? t : e;
            },
        });
    function B8({ instance: e, SearchBarComponent: t }) {
        let [o, n] = k(""),
            i = at(null),
            s = wu(
                (c) => {
                    n(c);
                    let { props: u } = e;
                    if (c === "") {
                        (u.favorites = u.favCopy), e.forceUpdate();
                        return;
                    }
                    i.current
                        ?.closest("#gif-picker-tab-panel")
                        ?.querySelector('[class*="scrollerBase"]')
                        ?.scrollTo(0, 0);
                    let p = u.favCopy
                        .map((m) => ({
                            score: U8(
                                c.toLowerCase(),
                                Ex(m.url ?? m.src)
                                    .replace(/(%20|[_-])/g, " ")
                                    .toLowerCase()
                            ),
                            gif: m,
                        }))
                        .filter((m) => m.score != null);
                    p.sort((m, h) => h.score - m.score), (u.favorites = p.map((m) => m.gif)), e.forceUpdate();
                },
                [e.state]
            );
        return (
            te(
                () => () => {
                    e.dead = !0;
                },
                []
            ),
            r(t, {
                ref: i,
                autoFocus: !0,
                size: "md",
                className: "",
                onChange: s,
                onClear: () => {
                    n(""), e.props.favCopy != null && ((e.props.favorites = e.props.favCopy), e.forceUpdate());
                },
                query: o,
                placeholder: "Search Favorite Gifs",
            })
        );
    }
    function Ex(e) {
        let t;
        try {
            t = new URL(e);
        } catch {
            return e;
        }
        switch (_x.store.searchOption) {
            case "url":
                return t.href;
            case "path":
                return t.host === "media.discordapp.net" || t.host === "tenor.com"
                    ? (t.pathname.split("/").at(-1) ?? t.pathname)
                    : t.pathname;
            case "hostandpath":
                return t.host === "media.discordapp.net" || t.host === "tenor.com"
                    ? `${t.host} ${t.pathname.split("/").at(-1) ?? t.pathname}`
                    : `${t.host} ${t.pathname}`;
            default:
                return "";
        }
    }
    function U8(e, t) {
        let o = 0,
            n = 0;
        for (let i = 0; i < t.length; i++) if ((t[i] === e[o] ? (n++, o++) : n--, o === e.length)) return n;
        return null;
    }
    a();
    l();
    T();
    var Pd = v({
        name: "FixCodeblockGap",
        description: "Removes the gap between codeblocks and text below it",
        authors: [d.Grzesiek11],
        patches: [
            {
                find: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,
                replacement: {
                    match: String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,
                    replace: "$&\\n?",
                },
            },
        ],
    });
    a();
    l();
    Yo();
    T();
    le();
    var Bx = w({
            originalImagesInChat: {
                type: 3,
                description: "Also load the original image in Chat. WARNING: Read the caveats above",
                default: !1,
            },
        }),
        Md = v({
            name: "FixImagesQuality",
            description: "Improves quality of images by loading them at their original resolution",
            authors: [d.Nuckyz, d.Ven],
            settings: Bx,
            patches: [
                {
                    find: ".handleImageLoad)",
                    replacement: {
                        match: /getSrc\(\i\)\{/,
                        replace: "$&var _vcSrc=$self.getSrc(this.props,arguments[1]);if(_vcSrc)return _vcSrc;",
                    },
                },
            ],
            settingsAboutComponent() {
                return r(
                    mt,
                    { variant: "normal" },
                    r(
                        oe,
                        { flexDirection: "column", gap: "4px" },
                        r(Me, { size: "md", weight: "semibold" }, "The default behaviour is the following:"),
                        r(
                            Me,
                            null,
                            r(
                                "ul",
                                null,
                                r("li", null, "\u2014 In chat, optimised but full resolution images will be loaded."),
                                r("li", null, "\u2014 In the image modal, the original image will be loaded.")
                            )
                        ),
                        r(
                            Me,
                            { size: "md", weight: "semibold", className: O.top8 },
                            "You can also enable original image in chat, but beware of the following caveats:"
                        ),
                        r(
                            Me,
                            null,
                            r(
                                "ul",
                                null,
                                r(
                                    "li",
                                    null,
                                    "\u2014 Animated images (GIF, WebP, etc.) in chat will always animate, regardless of if the App is focused."
                                ),
                                r("li", null, "\u2014 May cause lag.")
                            )
                        )
                    )
                );
            },
            getSrc(e, t) {
                if (e?.src)
                    try {
                        let { contentType: o, height: n, src: i, width: s, mosaicStyleAlt: c, trigger: u } = e;
                        if (!(o?.startsWith("image/") ?? typeof c == "boolean") || i.startsWith("data:")) return;
                        let m = new URL(i);
                        if (!m.pathname.startsWith("/attachments/")) return;
                        m.searchParams.set("animated", String(!t)),
                            t && m.pathname.endsWith(".gif") && m.searchParams.set("format", "webp");
                        let h = !!u;
                        if (!Bx.store.originalImagesInChat && !h) {
                            let y = s * n,
                                b = 2e3 * 1200;
                            if (y <= b) return m.toString();
                            let x = Math.sqrt(y / b);
                            return (
                                m.searchParams.set("width", Math.round(s / x).toString()),
                                m.searchParams.set("height", Math.round(n / x).toString()),
                                m.toString()
                            );
                        }
                        return (m.hostname = "cdn.discordapp.com"), m.toString();
                    } catch (o) {
                        new U("FixImagesQuality").error("Failed to make image src", o);
                        return;
                    }
            },
        });
    a();
    l();
    T();
    S();
    var Cd = v({
        name: "ForceOwnerCrown",
        description: "Force the owner crown next to usernames even if the server is large.",
        authors: [d.D3SOX, d.Nickyux],
        patches: [
            {
                find: "#{intl::GUILD_OWNER}),children:",
                replacement: {
                    match: /(?<=decorators:.{0,200}?isOwner:)\i/,
                    replace: "$self.isGuildOwner(arguments[0])",
                },
            },
        ],
        isGuildOwner(e) {
            if (!e?.user?.id || e.channel?.type === 3) return e.isOwner;
            let t = e.guildId ?? e.channel?.guild_id,
                o = e.user.id;
            return Ce.getGuild(t)?.ownerId === o;
        },
    });
    a();
    l();
    T();
    G();
    var ey = X("createFriendInvite"),
        Nd = v({
            name: "FriendInvites",
            description:
                "Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",
            authors: [d.afn, d.Dziurwa],
            commands: [
                {
                    name: "create friend invite",
                    description: "Generates a friend invite link.",
                    inputType: 0,
                    execute: async (e, t) => {
                        let o = await ey.createFriendInvite();
                        rt(t.channel.id, {
                            content: `
                        discord.gg/${o.code} \xB7
                        Expires: <t:${new Date(o.expires_at).getTime() / 1e3}:R> \xB7
                        Max uses: \`${o.max_uses}\`
                    `
                                .trim()
                                .replace(/\s+/g, " "),
                        });
                    },
                },
                {
                    name: "view friend invites",
                    description: "View a list of all generated friend invites.",
                    inputType: 0,
                    execute: async (e, t) => {
                        let n = (await ey.getAllFriendInvites()).map((i) =>
                            `
                    _discord.gg/${i.code}_ \xB7
                    Expires: <t:${new Date(i.expires_at).getTime() / 1e3}:R> \xB7
                    Times used: \`${i.uses}/${i.max_uses}\`
                    `
                                .trim()
                                .replace(/\s+/g, " ")
                        );
                        rt(t.channel.id, {
                            content:
                                n.join(`
`) || "You have no active friend invites!",
                        });
                    },
                },
                {
                    name: "revoke friend invites",
                    description: "Revokes all generated friend invites.",
                    inputType: 0,
                    execute: async (e, t) => {
                        await ey.revokeFriendInvites(),
                            rt(t.channel.id, { content: "All friend invites have been revoked." });
                    },
                },
            ],
        });
    a();
    l();
    T();
    se();
    G();
    S();
    var F8 = ee("memberSinceWrapper"),
        $8 = ee("memberSince"),
        Ux = de('month:"short",day:"numeric"'),
        Fx = X("getLocale"),
        $x = ge("headingVariant:", '"section"', "headingIcon:"),
        Ad = v({
            name: "FriendsSince",
            description: "Shows when you became friends with someone in the user popout",
            authors: [d.Elvyra, d.Antti],
            patches: [
                {
                    find: ".SIDEBAR}),nicknameIcons",
                    replacement: {
                        match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,
                        replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})",
                    },
                },
                {
                    find: ",applicationRoleConnection:",
                    replacement: {
                        match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,
                        replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),",
                    },
                },
                {
                    find: ".MODAL_V2,onClose:",
                    replacement: {
                        match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,
                        replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),",
                    },
                },
            ],
            FriendsSinceComponent: C.wrap(
                ({ userId: e, isSidebar: t }) => {
                    if (!we.isFriend(e)) return null;
                    let o = we.getSince(e);
                    return o
                        ? t
                            ? r(
                                  $x,
                                  {
                                      heading: "Friends Since",
                                      headingVariant: "text-xs/semibold",
                                      headingColor: "text-strong",
                                  },
                                  r(H, { variant: "text-sm/normal" }, Ux(o, Fx.getLocale()))
                              )
                            : r(
                                  $x,
                                  {
                                      heading: "Friends Since",
                                      headingVariant: "text-xs/medium",
                                      headingColor: "text-default",
                                      className: "vc-friendsSince-profile-section",
                                  },
                                  r(
                                      "div",
                                      { className: F8.memberSinceWrapper },
                                      r(
                                          "div",
                                          { className: $8.memberSince },
                                          !!Mo()?.guild_id &&
                                              r(
                                                  "svg",
                                                  {
                                                      "aria-hidden": "true",
                                                      width: "16",
                                                      height: "16",
                                                      viewBox: "0 0 24 24",
                                                      fill: "var(--interactive-icon-default)",
                                                  },
                                                  r("path", { d: "M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" }),
                                                  r("path", {
                                                      d: "M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z",
                                                  })
                                              ),
                                          r(H, { variant: "text-sm/normal" }, Ux(o, Fx.getLocale()))
                                      )
                                  )
                              )
                        : null;
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    se();
    pt();
    G();
    S();
    var G8 = de(".MESSAGE,commandTargetId:"),
        Gx = dh;
    Ze(_.componentByCode('"cannot copy null text"'), (e) => (Gx = e));
    function H8({ message: e, channel: t, onHeightUpdate: o }) {
        let n = e.author && !(e.author.id === R.getCurrentUser().id || e.author.system);
        return G8({
            navId: "message-actions",
            ariaLabel: Ae("MESSAGE_UTILITIES_A11Y_LABEL"),
            message: e,
            channel: t,
            canReport: n,
            onHeightUpdate: o,
            onClose: () => st.closeContextMenu(),
            textSelection: "",
            favoriteableType: null,
            favoriteableId: null,
            favoriteableName: null,
            itemHref: void 0,
            itemSrc: void 0,
            itemSafeSrc: void 0,
            itemTextContent: void 0,
            isFullSearchContextMenu: !0,
        });
    }
    var z8 = (e, t) => {
        if (t?.isFullSearchContextMenu == null) return;
        _e("devmode-copy-id", e, !0)?.push(Gx({ id: t.message.author.id, label: Ae("COPY_ID_AUTHOR") }));
    };
    br("FullSearchContext", "SearchReply");
    var Rd = v({
        name: "FullSearchContext",
        description: "Makes the message context menu in message search results have all options you'd expect",
        authors: [d.Ven, d.Aria],
        patches: [
            {
                find: "onClick:this.handleMessageClick,",
                replacement: { match: /this(?=\.handleContextMenu\(\i,\i\))/, replace: "$self" },
            },
        ],
        handleContextMenu(e, t) {
            let o = Z.getChannel(t.channel_id);
            o &&
                (e.stopPropagation(),
                st.openContextMenu(e, (n) => r(H8, { message: t, channel: o, onHeightUpdate: n.onHeightUpdate })));
        },
        contextMenus: { "message-actions": z8 },
    });
    a();
    l();
    T();
    G();
    S();
    var W8 = ge(".USER_MENTION)"),
        kd = v({
            name: "FullUserInChatbox",
            description: "Makes the user mention in the chatbox have more functionalities, like left/right clicking",
            authors: [d.sadan],
            patches: [
                {
                    find: '"text":"locked"',
                    replacement: {
                        match: /(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,
                        replace: "$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});",
                    },
                },
            ],
            UserMentionComponent: C.wrap(
                (e) =>
                    ie([R], () => R.getUser(e.id)) == null
                        ? e.originalComponent()
                        : r(W8, { className: "mention", userId: e.id, channelId: e.channelId }),
                { fallback: ({ wrappedProps: { originalComponent: e } }) => e() }
            ),
        });
    a();
    l();
    T();
    G();
    S();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/gameActivityToggle/style.css", {
        name: "src/plugins/gameActivityToggle/style.css",
        source: `[class*="panels"] [class*="avatarWrapper"] {
    min-width: 0;
}`,
        classNames: {},
        dom: null,
    });
    var Hx = "src/plugins/gameActivityToggle/style.css";
    var j8 = ge(".GREEN,positionKeyStemOverride:"),
        vc = To("status", "showCurrentGame"),
        Dd = w({
            oldIcon: { type: 3, description: "Use the old icon style before Discord icon redesign", default: !1 },
            location: {
                type: 4,
                description: "Where to show the game activity toggle button",
                options: [
                    { label: "Next to Mute/Deafen", value: "PANEL", default: !0 },
                    { label: "Vencord Toolbox", value: "TOOLBOX" },
                ],
                get hidden() {
                    return !ke(Qi.name);
                },
            },
        });
    function q8() {
        let { oldIcon: e } = Dd.use(["oldIcon"]),
            t = vc.useSetting();
        return r(
            "svg",
            { width: "20", height: "20", viewBox: "0 0 24 24" },
            r("path", {
                fill: !t && !e ? "var(--status-danger)" : "currentColor",
                mask: t ? void 0 : "url(#gameActivityMask)",
                d: "M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z",
            }),
            !t &&
                r(
                    f,
                    null,
                    r("path", {
                        fill: "var(--status-danger)",
                        d: e
                            ? "M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z"
                            : "M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",
                    }),
                    r(
                        "mask",
                        { id: "gameActivityMask" },
                        r("rect", { fill: "white", x: "0", y: "0", width: "24", height: "24" }),
                        r("path", {
                            fill: "black",
                            d: e
                                ? "M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z"
                                : "M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z",
                        })
                    )
                )
        );
    }
    function K8(e) {
        let { location: t } = Dd.use(["location"]),
            o = vc.useSetting();
        return t !== "PANEL" && ke(Qi.name)
            ? null
            : r(j8, {
                  tooltipText: o ? "Disable Game Activity" : "Enable Game Activity",
                  icon: q8,
                  role: "switch",
                  "aria-checked": !o,
                  redGlow: !o,
                  plated: e?.nameplate != null,
                  onClick: () => vc.updateSetting((n) => !n),
              });
    }
    var Ld = v({
        name: "GameActivityToggle",
        description: "Adds a button next to the mic and deafen button to toggle game activity.",
        authors: [d.Nuckyz, d.RuukuLada],
        dependencies: ["UserSettingsAPI"],
        settings: Dd,
        managedStyle: Hx,
        patches: [
            {
                find: ".DISPLAY_NAME_STYLES_COACHMARK),",
                replacement: {
                    match: /children:\[(?=.{0,25}?accountContainerRef)/,
                    replace: "children:[$self.GameActivityToggleButton(arguments[0]),",
                },
            },
        ],
        toolboxActions() {
            let { location: e } = Dd.use(["location"]),
                t = vc.useSetting();
            return e !== "TOOLBOX"
                ? null
                : r(M.MenuCheckboxItem, {
                      id: "game-activity-toggle-toolbox",
                      label: "Enable Game Activity",
                      checked: t,
                      action: () => vc.updateSetting((o) => !o),
                  });
        },
        GameActivityToggleButton: C.wrap(K8, { noop: !0 }),
    });
    a();
    l();
    T();
    se();
    S();
    var Od = v({
        name: "GifPaste",
        description:
            "Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",
        authors: [d.Ven],
        patches: [
            {
                find: "handleSelectGIF=",
                replacement: {
                    match: /handleSelectGIF=(\i)=>\{/,
                    replace: "$&if (!this.props.className) return $self.handleSelect($1);",
                },
            },
        ],
        handleSelect(e) {
            e && (Hn(e.url + " "), vl.closeExpressionPicker());
        },
    });
    a();
    l();
    T();
    G();
    S();
    var jx = ((o) => ((o.Greet = "Greet"), (o.NormalMessage = "Message"), o))(jx || {}),
        _d = w({
            greetMode: {
                type: 4,
                options: [
                    { label: "Greet (you can only greet 3 times)", value: "Greet", default: !0 },
                    { label: "Normal Message (you can greet spam)", value: "Message" },
                ],
                description: "Choose the greet mode",
            },
        }).withPrivateSettings(),
        zx = Ot((e) => Array.isArray(e) && e[0]?.name === "Wave");
    function Wx(e, t, o) {
        let n = bo.getSendMessageOptionsForReply({ channel: e, message: t, shouldMention: !0, showMentionToggle: !0 });
        if (_d.store.greetMode === "Message" || o.length > 1) {
            n.stickerIds = o;
            let i = { content: "", tts: !1, invalidEmojis: [], validNonShortcutEmojis: [] };
            bo._sendMessage(e.id, i, n);
        } else bo.sendGreetMessage(e.id, o[0], n);
    }
    function Y8({ channel: e, message: t }) {
        let o = _d.use(["greetMode", "multiGreetChoices"]),
            { greetMode: n, multiGreetChoices: i = [] } = o;
        return r(
            M.Menu,
            {
                navId: "greet-sticker-picker",
                onClose: () => B.dispatch({ type: "CONTEXT_MENU_CLOSE" }),
                "aria-label": "Greet Sticker Picker",
            },
            r(
                M.MenuGroup,
                { label: "Greet Mode" },
                Object.values(jx).map((s) =>
                    r(M.MenuRadioItem, {
                        key: s,
                        group: "greet-mode",
                        id: "greet-mode-" + s,
                        label: s,
                        checked: s === n,
                        action: () => (o.greetMode = s),
                    })
                )
            ),
            r(M.MenuSeparator, null),
            r(
                M.MenuGroup,
                { label: "Greet Stickers" },
                zx.map((s) =>
                    r(M.MenuItem, {
                        key: s.id,
                        id: "greet-" + s.id,
                        label: s.description.split(" ")[0],
                        action: () => Wx(e, t, [s.id]),
                    })
                )
            ),
            _d.store.unholyMultiGreetEnabled
                ? r(
                      f,
                      null,
                      r(M.MenuSeparator, null),
                      r(
                          M.MenuItem,
                          { label: "Unholy Multi-Greet", id: "unholy-multi-greet" },
                          zx.map((s) => {
                              let c = i.some((u) => u === s.id);
                              return r(M.MenuCheckboxItem, {
                                  key: s.id,
                                  id: "multi-greet-" + s.id,
                                  label: s.description.split(" ")[0],
                                  checked: c,
                                  disabled: !c && i.length >= 3,
                                  action: () => {
                                      o.multiGreetChoices = c ? i.filter((u) => u !== s.id) : [...i, s.id];
                                  },
                              });
                          }),
                          r(M.MenuSeparator, null),
                          r(M.MenuItem, {
                              id: "multi-greet-submit",
                              label: "Send Greets",
                              action: () => Wx(e, t, i),
                              disabled: i.length === 0,
                          })
                      )
                  )
                : null
        );
    }
    var Ed = v({
        name: "GreetStickerPicker",
        description:
            "Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",
        authors: [d.Ven],
        settings: _d,
        patches: [
            {
                find: "#{intl::WELCOME_CTA_LABEL}",
                replacement: {
                    match: /className:\i\.\i,(?=.{0,40}?"sticker")(?<={channel:\i,message:\i}=(\i).+?)/,
                    replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),",
                },
            },
        ],
        pickSticker(e, t) {
            t.message.deleted || st.openContextMenu(e, () => r(Y8, { ...t }));
        },
    });
    a();
    l();
    var ty = {};
    Ke(ty, { updateMessage: () => os });
    a();
    l();
    S();
    function os(e, t, o) {
        let n = Pu.getOrCreate(e);
        if (!n.has(t)) return;
        let i = n.update(t, (s) => (o ? s.merge(o) : new s.constructor(s)));
        Pu.commit(i), qt.emitChange();
    }
    Ue();
    T();
    re();
    S();
    var Kx = "HideAttachments_HiddenIds",
        bc = new Set();
    async function Yx() {
        return (bc = (await wt(Kx)) ?? new Set()), bc;
    }
    var Z8 = (e) => It(Kx, e);
    br("HideMedia", "HideAttachments");
    var qx = (e) =>
        e.attachments.length > 0 || e.embeds.length > 0 || e.stickerItems.length > 0 || e.components.length > 0;
    async function Q8(e, t) {
        let o = await Yx();
        o.delete(t) || o.add(t), await Z8(o), os(e, t);
    }
    var Bd = v({
        name: "HideMedia",
        description: "Hide attachments and embeds for individual messages via hover button",
        authors: [d.Ven],
        dependencies: ["MessageUpdaterAPI"],
        patches: [
            {
                find: "this.renderAttachments(",
                replacement: {
                    match: /(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories|ComponentAccessories)\((\i)\)/g,
                    replace: "$self.shouldHide($1?.id)?null:$&",
                },
            },
        ],
        messagePopoverButton: {
            icon: ms,
            render(e) {
                if (!qx(e) && !e.messageSnapshots.some((o) => qx(o.message))) return null;
                let t = bc.has(e.id);
                return {
                    label: t ? "Show Media" : "Hide Media",
                    icon: t ? Ua : ms,
                    message: e,
                    channel: Z.getChannel(e.channel_id),
                    onClick: () => Q8(e.channel_id, e.id),
                };
            },
        },
        renderMessageAccessory({ message: e }) {
            return this.shouldHide(e.id)
                ? r(
                      "span",
                      { className: L("vc-hideAttachments-accessory", !e.content && "vc-hideAttachments-no-content") },
                      "Media Hidden"
                  )
                : null;
        },
        async start() {
            await Yx();
        },
        stop() {
            bc.clear();
        },
        shouldHide(e) {
            return bc.has(e);
        },
    });
    a();
    l();
    T();
    var Ud = v({
        name: "iLoveSpam",
        description: "Do not hide messages from 'likely spammers'",
        authors: [d.botato, d.Nyako],
        patches: [
            {
                find: "hasFlag:{writable",
                replacement: {
                    match: /if\((\i)<=(?:0x40000000|(?:1<<30|1073741824))\)return/,
                    replace: "if($1===(1<<20))return false;$&",
                },
            },
        ],
    });
    a();
    l();
    T();
    S();
    var X8 = To("status", "showCurrentGame");
    function Qx(e, t, o, n) {
        return r(V, { text: t }, (i) =>
            r(
                "button",
                {
                    ...i,
                    onClick: (s) => e6(s, e),
                    style: {
                        all: "unset",
                        cursor: "pointer",
                        display: "flex",
                        justifyContent: "center",
                        alignItems: "center",
                    },
                },
                r("svg", { width: "24", height: "24", viewBox: "0 -960 960 960" }, r("path", { fill: n, d: o }))
            )
        );
    }
    var J8 = (e, t) =>
            Qx(
                e,
                "Disable activity",
                "M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",
                t
            ),
        V8 = (e, t) =>
            Qx(
                e,
                "Enable activity",
                "m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",
                t
            );
    function Zx(e, t = !1) {
        let o = Rt.use(["ignoredActivities"]),
            { ignoredActivities: n } = o;
        return n.some((i) => i.id === e.id)
            ? V8(e, "var(--status-danger)")
            : J8(e, t ? "var(--green-300)" : "var(--interactive-icon-default)");
    }
    function e6(e, t) {
        e.stopPropagation();
        let o = Rt.store.ignoredActivities.findIndex((n) => n.id === t.id);
        o === -1 ? Rt.store.ignoredActivities.push(t) : Rt.store.ignoredActivities.splice(o, 1);
    }
    function ni() {
        X8.updateSetting((e) => e);
    }
    function t6() {
        return r(
            oe,
            { flexDirection: "column" },
            r(N.FormText, null, "Import the application id of the CustomRPC plugin to the filter list"),
            r(
                "div",
                null,
                r(
                    F,
                    {
                        onClick: () => {
                            let e = W.plugins.CustomRPC?.appID;
                            if (!e) return Ge("CustomRPC application ID is not set.", J.Type.FAILURE);
                            oy?.(e) && Ge("CustomRPC application ID is already added.", J.Type.FAILURE);
                        },
                    },
                    "Import CustomRPC ID"
                )
            )
        );
    }
    var oy = null;
    function o6(e) {
        let [t, o] = k(Rt.store.idsList ?? "");
        (oy = (i) => {
            let s = new Set(
                    t
                        .split(",")
                        .map((p) => p.trim())
                        .filter(Boolean)
                ),
                c = s.has(i) || (s.add(i), !1),
                u = Array.from(s).join(", ");
            return o(u), e.setValue(u), c;
        }),
            te(
                () => () => {
                    oy = null;
                },
                []
            );
        function n(i) {
            o(i), e.setValue(i);
        }
        return r(
            "section",
            null,
            r(N.FormTitle, { tag: "h3" }, "Filter List"),
            r(
                N.FormText,
                { className: O.bottom8 },
                "Comma separated list of activity IDs to filter (Useful for filtering specific RPC activities and CustomRPC"
            ),
            r(Ti, { type: "text", value: t, onChange: n, placeholder: "235834946571337729, 343383572805058560" })
        );
    }
    var Rt = w({
        importCustomRPC: { type: 6, component: t6 },
        listMode: {
            type: 4,
            description: "Change the mode of the filter list",
            options: [
                { label: "Whitelist", value: 0, default: !0 },
                { label: "Blacklist", value: 1 },
            ],
            onChange: ni,
        },
        idsList: {
            type: 6,
            default: "",
            onChange(e) {
                let t = new Set(
                    e
                        .split(",")
                        .map((o) => o.trim())
                        .filter(Boolean)
                );
                (Rt.store.idsList = Array.from(t).join(", ")), ni();
            },
            component: (e) => r(o6, { setValue: e.setValue }),
        },
        ignorePlaying: {
            type: 3,
            description: "Ignore all playing activities (These are usually game and RPC activities)",
            default: !1,
            onChange: ni,
        },
        ignoreStreaming: { type: 3, description: "Ignore all streaming activities", default: !1, onChange: ni },
        ignoreListening: {
            type: 3,
            description: "Ignore all listening activities (These are usually spotify activities)",
            default: !1,
            onChange: ni,
        },
        ignoreWatching: { type: 3, description: "Ignore all watching activities", default: !1, onChange: ni },
        ignoreCompeting: {
            type: 3,
            description: "Ignore all competing activities (These are normally special game activities)",
            default: !1,
            onChange: ni,
        },
        ignoredActivities: { type: 7, default: [], onChange: ni },
    });
    function r6(e, t) {
        if (t && Rt.store.idsList.includes(t)) return Rt.store.listMode === 1;
        switch (e) {
            case 0:
                return Rt.store.ignorePlaying;
            case 1:
                return Rt.store.ignoreStreaming;
            case 2:
                return Rt.store.ignoreListening;
            case 3:
                return Rt.store.ignoreWatching;
            case 5:
                return Rt.store.ignoreCompeting;
        }
        return !1;
    }
    var Fd = v({
        name: "IgnoreActivities",
        authors: [d.Nuckyz, d.Kylie],
        description:
            "Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below",
        dependencies: ["UserSettingsAPI"],
        settings: Rt,
        patches: [
            {
                find: '"LocalActivityStore"',
                replacement: [
                    {
                        match: /\.LISTENING.+?(?=!?\i\(\)\(\i,\i\))(?<=(\i)\.push.+?)/,
                        replace: (e, t) => `${e}${t}=${t}.filter($self.isActivityNotIgnored);`,
                    },
                ],
            },
            {
                find: '"ActivityTrackingStore"',
                replacement: {
                    match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,
                    replace: (e, t) =>
                        `${e}${t}=${t}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`,
                },
            },
            {
                find: "#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",
                replacement: {
                    match: /(\i)&&!\i\|\|\i\?null(?<=(\i)\.verified&&.+?)/,
                    replace: "$self.renderToggleGameActivityButton($2,$1),$&",
                },
            },
            {
                find: "#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY}",
                replacement: {
                    match: /lineClamp:1.{0,50}?(?=!\i&&\i\?.+?application:(\i))/,
                    replace: "$&$self.renderToggleActivityButton($1),",
                },
            },
        ],
        async start() {
            if (Rt.store.ignoredActivities.length !== 0) {
                let e = ks.getGamesSeen();
                for (let [t, o] of Rt.store.ignoredActivities.entries())
                    o.type === 0 &&
                        (e.some((n) => n.id === o.id || n.exePath === o.id) || Rt.store.ignoredActivities.splice(t, 1));
            }
        },
        isActivityNotIgnored(e) {
            if (r6(e.type, e.application_id)) return !1;
            if (e.application_id != null)
                return (
                    !Rt.store.ignoredActivities.some((t) => t.id === e.application_id) ||
                    (Rt.store.listMode === 0 && Rt.store.idsList.includes(e.application_id))
                );
            {
                let t = ks.getRunningGames().find((o) => o.name === e.name)?.exePath;
                if (t) return !Rt.store.ignoredActivities.some((o) => o.id === t);
            }
            return !0;
        },
        renderToggleGameActivityButton(e, t) {
            return r(
                C,
                { noop: !0 },
                r(
                    "div",
                    { style: { marginLeft: 12, zIndex: 0 } },
                    Zx({ id: e.id ?? e.exePath, name: e.name, type: 0 }, t)
                )
            );
        },
        renderToggleActivityButton(e) {
            return r(C, { noop: !0 }, Zx({ id: e.id, name: e.name, type: 1 }));
        },
    });
    a();
    l();
    T();
    var n6 = /\.(png|jpg|jpeg|gif|webp|avif)$/i,
        i6 = /^(.+?\.)?(tenor|giphy|imgur)\.com$/i,
        Xx = w({
            showFullUrl: {
                description:
                    "Show the full URL of the image instead of just the file name. Always enabled for GIFs because they usually have no meaningful file name",
                type: 3,
                default: !1,
            },
        }),
        $d = v({
            name: "ImageFilename",
            authors: [d.Ven],
            description: "Display the file name of images & GIFs as a tooltip when hovering over them",
            settings: Xx,
            patches: [
                {
                    find: ".RESPONSIVE?",
                    replacement: {
                        match: /(?="data-role":"img","data-safe-src":)(?<=href:(\i).+?)/,
                        replace: "title:$self.getTitle($1),",
                    },
                },
            ],
            getTitle(e) {
                try {
                    let t = new URL(e),
                        o = i6.test(t.hostname);
                    return !o && !n6.test(t.pathname)
                        ? void 0
                        : o || Xx.store.showFullUrl
                          ? e
                          : t.pathname.split("/").pop();
                } catch {
                    return;
                }
            },
        });
    a();
    l();
    T();
    var Gd = v({
        name: "ImageLink",
        description: "Never hide image links in messages, even if it's the only content",
        authors: [d.Kyuuhachi, d.Sqaaakoi],
        patches: [
            {
                find: "unknownUserMentionPlaceholder:",
                replacement: { match: /\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/, replace: "false" },
            },
        ],
    });
    a();
    l();
    T();
    le();
    S();
    a();
    l();
    a();
    l();
    var Sc = "vc-imgzoom-magnify-modal";
    a();
    l();
    function ry(e, t) {
        e() ? t() : requestAnimationFrame(() => ry(e, t));
    }
    Pe();
    S();
    var Jx = Y("vc-imgzoom-"),
        ny = C.wrap(
            ({ instance: e, size: t, zoom: o }) => {
                let [n, i] = k(!1),
                    [s, c] = k({ x: 0, y: 0 }),
                    [u, p] = k({ x: 0, y: 0 }),
                    [m, h] = k(0),
                    y = at(!1),
                    b = at(o),
                    x = at(t),
                    P = at(null),
                    I = at(null),
                    D = at(null),
                    A = at(null);
                _n(() => {
                    let z = (ae) => {
                            ae.key === "Shift" && (y.current = !0);
                        },
                        K = (ae) => {
                            ae.key === "Shift" && (y.current = !1);
                        },
                        ue = () => {
                            I.current && D.current && (I.current.currentTime = D.current.currentTime);
                        },
                        j = (ae) => {
                            if (P.current)
                                if (e.state.mouseOver && e.state.mouseDown) {
                                    let be = x.current / 2,
                                        fo = { x: ae.pageX, y: ae.pageY },
                                        $t = -((fo.x - P.current.getBoundingClientRect().left) * b.current - be),
                                        ot = -((fo.y - P.current.getBoundingClientRect().top) * b.current - be);
                                    c({ x: ae.x - be, y: ae.y - be }), p({ x: $t, y: ot }), h(1);
                                } else h(0);
                        },
                        ne = (ae) => {
                            e.state.mouseOver &&
                                ae.button === 0 &&
                                ((b.current = ut.store.zoom),
                                (x.current = ut.store.size),
                                document.getElementById("image-context") && B.dispatch({ type: "CONTEXT_MENU_CLOSE" }),
                                j(ae),
                                h(1));
                        },
                        Q = () => {
                            h(0);
                        },
                        qe = async (ae) => {
                            if (e.state.mouseOver && e.state.mouseDown && !y.current) {
                                let be =
                                    b.current +
                                    (ae.deltaY / 100) * (ut.store.invertScroll ? -1 : 1) * ut.store.zoomSpeed;
                                (b.current = be <= 1 ? 1 : be),
                                    ut.store.saveZoomValues && (ut.store.zoom = b.current),
                                    j(ae);
                            }
                            if (e.state.mouseOver && e.state.mouseDown && y.current) {
                                let be = x.current + ae.deltaY * (ut.store.invertScroll ? -1 : 1) * ut.store.zoomSpeed;
                                (x.current = be <= 50 ? 50 : be),
                                    ut.store.saveZoomValues && (ut.store.size = x.current),
                                    j(ae);
                            }
                        };
                    return (
                        ry(
                            () => e.state.readyState === "READY",
                            () => {
                                let ae = document.getElementById(Sc);
                                (P.current = ae),
                                    ae.querySelector("img,video")?.setAttribute("draggable", "false"),
                                    e.props.animated &&
                                        ((D.current = ae.querySelector("video")),
                                        D.current.addEventListener("timeupdate", ue)),
                                    i(!0);
                            }
                        ),
                        document.addEventListener("keydown", z),
                        document.addEventListener("keyup", K),
                        document.addEventListener("mousemove", j),
                        document.addEventListener("mousedown", ne),
                        document.addEventListener("mouseup", Q),
                        document.addEventListener("wheel", qe),
                        () => {
                            document.removeEventListener("keydown", z),
                                document.removeEventListener("keyup", K),
                                document.removeEventListener("mousemove", j),
                                document.removeEventListener("mousedown", ne),
                                document.removeEventListener("mouseup", Q),
                                document.removeEventListener("wheel", qe);
                        }
                    );
                }, []);
                let E = ce(() => {
                    try {
                        let z = new URL(e.props.src);
                        return (
                            z.pathname.startsWith("/attachments/") && (z.hostname = "cdn.discordapp.com"),
                            z.searchParams.set("animated", "true"),
                            z.toString()
                        );
                    } catch {
                        return e.props.src;
                    }
                }, [e.props.src]);
                if (!n) return null;
                let q = P.current?.getBoundingClientRect();
                return q
                    ? r(
                          "div",
                          {
                              className: Jx("lens", {
                                  "nearest-neighbor": ut.store.nearestNeighbour,
                                  square: ut.store.square,
                              }),
                              style: {
                                  opacity: m,
                                  width: x.current + "px",
                                  height: x.current + "px",
                                  transform: `translate(${s.x}px, ${s.y}px)`,
                              },
                          },
                          e.props.animated
                              ? r("video", {
                                    ref: I,
                                    style: { position: "absolute", left: `${u.x}px`, top: `${u.y}px` },
                                    width: `${q.width * b.current}px`,
                                    height: `${q.height * b.current}px`,
                                    poster: e.props.src,
                                    src: D.current?.src ?? e.props.src,
                                    autoPlay: !0,
                                    loop: !0,
                                    muted: !0,
                                })
                              : r("img", {
                                    className: Jx("image"),
                                    ref: A,
                                    style: { position: "absolute", transform: `translate(${u.x}px, ${u.y}px)` },
                                    width: `${q.width * b.current}px`,
                                    height: `${q.height * b.current}px`,
                                    src: E,
                                    alt: "",
                                })
                      )
                    : null;
            },
            { noop: !0 }
        );
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/imageZoom/styles.css", {
        name: "src/plugins/imageZoom/styles.css",
        source: `.vc-imgzoom-lens {
    position: absolute;
    inset: 0;
    z-index: 9999;
    border: 2px solid grey;
    border-radius: 50%;
    overflow: hidden;
    cursor: none;
    box-shadow: inset 0 0 10px 2px grey;
    filter: drop-shadow(0 0 2px grey);
    pointer-events: none;

    /* negate the border offsetting the lens */
    margin: -2px;
}

.vc-imgzoom-square {
    border-radius: 0;
}

.vc-imgzoom-nearest-neighbor > .vc-imgzoom-image {
    image-rendering: pixelated;

    /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
}
`,
        classNames: {},
        dom: null,
    });
    var Vx = "src/plugins/imageZoom/styles.css";
    var ut = w({
            saveZoomValues: { type: 3, description: "Whether to save zoom and lens size values", default: !0 },
            invertScroll: { type: 3, description: "Invert scroll", default: !0 },
            nearestNeighbour: {
                type: 3,
                description: "Use Nearest Neighbour Interpolation when scaling images",
                default: !1,
            },
            square: { type: 3, description: "Make the lens square", default: !1 },
            zoom: {
                description: "Zoom of the lens",
                type: 5,
                markers: [1, 5, 10, 20, 30, 40, 50],
                default: 2,
                stickToMarkers: !1,
            },
            size: {
                description: "Radius / Size of the lens",
                type: 5,
                markers: [50, 100, 250, 500, 750, 1e3],
                default: 100,
                stickToMarkers: !1,
            },
            zoomSpeed: {
                description: "How fast the zoom / lens size changes",
                type: 5,
                markers: [0.1, 0.5, 1, 2, 3, 4, 5],
                default: 0.5,
                stickToMarkers: !1,
            },
        }),
        s6 = (e, t) => {
            if ("href" in t || t.target?.classList?.contains("emoji")) return;
            let { square: o, nearestNeighbour: n } = ut.use(["square", "nearestNeighbour"]);
            e.push(
                r(
                    M.MenuGroup,
                    { id: "image-zoom" },
                    r(M.MenuCheckboxItem, {
                        id: "vc-square",
                        label: "Square Lens",
                        checked: o,
                        action: () => {
                            ut.store.square = !o;
                        },
                    }),
                    r(M.MenuCheckboxItem, {
                        id: "vc-nearest-neighbour",
                        label: "Nearest Neighbour",
                        checked: n,
                        action: () => {
                            ut.store.nearestNeighbour = !n;
                        },
                    }),
                    r(M.MenuControlItem, {
                        id: "vc-zoom",
                        label: "Zoom",
                        control: (i, s) =>
                            r(M.MenuSliderControl, {
                                ref: s,
                                ...i,
                                minValue: 1,
                                maxValue: 50,
                                value: ut.store.zoom,
                                onChange: kt((c) => (ut.store.zoom = c), 100),
                            }),
                    }),
                    r(M.MenuControlItem, {
                        id: "vc-size",
                        label: "Lens Size",
                        control: (i, s) =>
                            r(M.MenuSliderControl, {
                                ref: s,
                                ...i,
                                minValue: 50,
                                maxValue: 1e3,
                                value: ut.store.size,
                                onChange: kt((c) => (ut.store.size = c), 100),
                            }),
                    }),
                    r(M.MenuControlItem, {
                        id: "vc-zoom-speed",
                        label: "Zoom Speed",
                        control: (i, s) =>
                            r(M.MenuSliderControl, {
                                ref: s,
                                ...i,
                                minValue: 0.1,
                                maxValue: 5,
                                value: ut.store.zoomSpeed,
                                onChange: kt((c) => (ut.store.zoomSpeed = c), 100),
                                renderValue: (c) => `${c.toFixed(3)}x`,
                            }),
                    })
                )
            );
        },
        Hd = v({
            name: "ImageZoom",
            description:
                "Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",
            authors: [d.Aria],
            tags: ["ImageUtilities"],
            managedStyle: Vx,
            patches: [
                {
                    find: "disableArrowKeySeek:!0",
                    replacement: [
                        { match: /useFullWidth:!0,shouldLink:/, replace: `id:"${Sc}",$&` },
                        {
                            match: /(?<=null!=(\i)\?.{0,20})\i\.\i,{children:\1/,
                            replace: "'div',{onClick:e=>e.stopPropagation(),children:$1",
                        },
                    ],
                },
                {
                    find: '="FOCUS_SENSITIVE",',
                    replacement: { match: /(?<=\[\i\.\i]:)\i&&!\i&&"PINNED"!==\i/, replace: "false" },
                },
                {
                    find: ".handleImageLoad)",
                    replacement: [
                        { match: /placeholderVersion:\i,(?=.{0,50}children:)/, replace: "...$self.makeProps(this),$&" },
                        { match: /componentDidMount\(\){/, replace: "$&$self.renderMagnifier(this);" },
                        { match: /componentWillUnmount\(\){/, replace: "$&$self.unMountMagnifier();" },
                        { match: /componentDidUpdate\(\i\){/, replace: "$&$self.updateMagnifier(this);" },
                    ],
                },
            ],
            settings: ut,
            contextMenus: { "image-context": s6 },
            currentMagnifierElement: null,
            element: null,
            Magnifier: ny,
            root: null,
            makeProps(e) {
                return {
                    onMouseOver: () => this.onMouseOver(e),
                    onMouseOut: () => this.onMouseOut(e),
                    onMouseDown: (t) => this.onMouseDown(t, e),
                    onMouseUp: () => this.onMouseUp(e),
                    id: e.props.id,
                };
            },
            renderMagnifier(e) {
                try {
                    e.props.id === Sc &&
                        (this.currentMagnifierElement ||
                            ((this.currentMagnifierElement = r(ny, {
                                size: ut.store.size,
                                zoom: ut.store.zoom,
                                instance: e,
                            })),
                            (this.root = Ii(this.element)),
                            this.root.render(this.currentMagnifierElement)));
                } catch (t) {
                    new U("ImageZoom").error("Failed to render magnifier:", t);
                }
            },
            updateMagnifier(e) {
                this.unMountMagnifier(), this.renderMagnifier(e);
            },
            unMountMagnifier() {
                this.root?.unmount(), (this.currentMagnifierElement = null), (this.root = null);
            },
            onMouseOver(e) {
                e.setState((t) => ({ ...t, mouseOver: !0 }));
            },
            onMouseOut(e) {
                e.setState((t) => ({ ...t, mouseOver: !1 }));
            },
            onMouseDown(e, t) {
                e.button === 0 && t.setState((o) => ({ ...o, mouseDown: !0 }));
            },
            onMouseUp(e) {
                e.setState((t) => ({ ...t, mouseDown: !1 }));
            },
            start() {
                (this.element = document.createElement("div")),
                    this.element.classList.add("MagnifierContainer"),
                    document.body.appendChild(this.element);
            },
            stop() {
                this.root && this.root.unmount(), this.element?.remove();
            },
        });
    a();
    l();
    T();
    le();
    G();
    S();
    var e4 = it("UserAffinitiesV2Store"),
        zd = v({
            name: "ImplicitRelationships",
            description: "Shows your implicit relationships in the Friends tab.",
            authors: [d.Dolfies],
            patches: [
                {
                    find: "#{intl::FRIENDS_ALL_HEADER}",
                    replacement: {
                        match: /toString\(\)\}\);case (\i\.\i)\.PENDING/,
                        replace: 'toString()});case $1.IMPLICIT:return "Implicit \u2014 "+arguments[1];case $1.BLOCKED',
                    },
                },
                {
                    find: "FriendsEmptyState: Invalid empty state",
                    replacement: {
                        match: /case (\i\.\i)\.ONLINE:(?=return (\i)\.SECTION_ONLINE)/,
                        replace: "case $1.ONLINE:case $1.IMPLICIT:",
                    },
                },
                {
                    find: "#{intl::FRIENDS_SECTION_ONLINE}),className:",
                    replacement: {
                        match: /,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.\i)(?=\},\{id:)/,
                        replace: (e, t, o) => `,{id:${t}.IMPLICIT,show:true,className:${o},content:"Implicit"}${e}`,
                    },
                },
                {
                    find: '"FriendsStore"',
                    replacement: {
                        match: /(?<=case (\i\.\i)\.SUGGESTIONS:return \d+===(\i)\.type)/,
                        replace: ";case $1.IMPLICIT:return $2.type===5",
                    },
                },
                {
                    find: '"FriendsStore',
                    replacement: {
                        match: /(\i\.\i)\.fetchRelationships\(\)/,
                        replace: "$1.fetchRelationships(),$self.fetchImplicitRelationships()",
                    },
                },
                {
                    find: "getRelationshipCounts(){",
                    replacement: {
                        predicate: () => W.plugins.ImplicitRelationships.sortByAffinity,
                        match: /\}\)\.sortBy\((.+?)\)\.value\(\)/,
                        replace: "}).sortBy(row => $self.wrapSort(($1), row)).value()",
                    },
                },
                {
                    find: ".REQUEST_GUILD_MEMBERS,",
                    replacement: {
                        match: /\.send\(\i\.\i\.REQUEST_GUILD_MEMBERS,{/,
                        replace: "$&nonce:arguments[1].nonce,",
                    },
                },
                {
                    find: "GUILD_MEMBERS_REQUEST:",
                    replacement: { match: /presences:!!(\i)\.presences/, replace: "$&,nonce:$1.nonce" },
                },
                {
                    find: ".not_found",
                    replacement: { match: /notFound:(\i)\.not_found/, replace: "$&,nonce:$1.nonce" },
                },
            ],
            settings: w({
                sortByAffinity: {
                    type: 3,
                    default: !0,
                    description: "Whether to sort implicit relationships by their affinity to you.",
                    restartNeeded: !0,
                },
            }),
            wrapSort(e, t) {
                return t.type === 5 ? (e4.getUserAffinity(t.user.id)?.communicationRank ?? 0) : e(t);
            },
            async fetchImplicitRelationships() {
                let e = e4.getUserAffinities(),
                    t = we.getMutableRelationships(),
                    o = e.filter((p) => !we.getRelationshipType(p.otherUserId));
                o.forEach((p) => {
                    t.set(p.otherUserId, 5);
                }),
                    we.emitChange();
                let n = o.filter((p) => !R.getUser(p.otherUserId)),
                    i = Object.keys(Ce.getGuilds()),
                    s = vo.fromTimestamp(Date.now()),
                    c = i.length * Math.ceil(n.length / 100),
                    u = ({ chunks: p }) => {
                        try {
                            let m = p.filter((h) => h.nonce === s).length;
                            if (m === 0) return;
                            (c -= m), we.emitChange(), c <= 0 && B.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH", u);
                        } catch (m) {
                            new U("ImplicitRelationships").error("Error in GUILD_MEMBERS_CHUNK_BATCH handler", m);
                        }
                    };
                B.subscribe("GUILD_MEMBERS_CHUNK_BATCH", u);
                for (let p = 0; p < n.length; p += 100)
                    B.dispatch({
                        type: "GUILD_MEMBERS_REQUEST",
                        guildIds: i,
                        userIds: n.slice(p, p + 100),
                        presences: !0,
                        nonce: s,
                    });
            },
            start() {
                vt.FriendsSections.IMPLICIT = "IMPLICIT";
            },
        });
    a();
    l();
    sh();
    T();
    S();
    function t4(e) {
        let { lightness: t } = rs.use(["lightness"]),
            o = ce(() => (e ? uu(e) : null), [e]);
        return o && `hsl(${o % 360n}, 100%, ${t}%)`;
    }
    var rs = w({
            lightness: {
                description: "Lightness, in %. Change if the colors are too light or too dark",
                type: 1,
                default: 70,
            },
            memberListColors: {
                description: "Replace role colors in the member list",
                restartNeeded: !0,
                type: 3,
                default: !0,
            },
            applyColorOnlyToUsersWithoutColor: {
                description: "Apply colors only to users who don't have a predefined color",
                restartNeeded: !1,
                type: 3,
                default: !1,
            },
            applyColorOnlyInDms: {
                description: "Apply colors only in direct messages; do not apply colors in servers.",
                restartNeeded: !1,
                type: 3,
                default: !1,
            },
        }),
        Wd = v({
            name: "IrcColors",
            description: "Makes username colors in chat unique, like in IRC clients",
            authors: [d.Grzesiek11, d.jamesbt365],
            settings: rs,
            patches: [
                {
                    find: '="SYSTEM_TAG"',
                    replacement: {
                        match: /(?<=colorString:\i,colorStrings:\i,colorRoleName:\i.*?}=)(\i),/,
                        replace: "$self.wrapMessageColorProps($1, arguments[0]),",
                    },
                },
                {
                    find: "#{intl::GUILD_OWNER}),children:",
                    replacement: {
                        match: /(?<=roleName:\i,)colorString:/,
                        replace: "colorString:$self.calculateNameColorForListContext(arguments[0]),originalColor:",
                    },
                    predicate: () => rs.store.memberListColors,
                },
            ],
            wrapMessageColorProps(e, t) {
                try {
                    let o = this.calculateNameColorForMessageContext(t);
                    return o === e.colorString
                        ? e
                        : {
                              ...e,
                              colorString: o,
                              colorStrings: e.colorStrings && {
                                  primaryColor: o,
                                  secondaryColor: void 0,
                                  tertiaryColor: void 0,
                              },
                          };
                } catch (o) {
                    return console.error("Failed to calculate message color strings:", o), e;
                }
            },
            calculateNameColorForMessageContext(e) {
                let t = e?.message?.author?.id,
                    o = e?.author?.colorString,
                    n = t4(t);
                return (e?.message?.channel_id === "1337" && t === "313337") ||
                    (rs.store.applyColorOnlyInDms && !e?.channel?.isPrivate())
                    ? o
                    : !rs.store.applyColorOnlyToUsersWithoutColor || !o
                      ? n
                      : o;
            },
            calculateNameColorForListContext(e) {
                try {
                    let t = e?.user?.id,
                        o = e?.colorString,
                        n = t4(t);
                    return rs.store.applyColorOnlyInDms && e?.guildId !== void 0
                        ? o
                        : !rs.store.applyColorOnlyToUsersWithoutColor || !o
                          ? n
                          : o;
                } catch (t) {
                    console.error("Failed to calculate name color for list context:", t);
                }
            },
        });
    a();
    l();
    T();
    S();
    var jd = !1,
        kr,
        qd = v({
            name: "KeepCurrentChannel",
            description: "Attempt to navigate to the channel you were in before switching accounts or loading Discord.",
            authors: [d.Nuckyz],
            patches: [
                {
                    find: '"Switching accounts"',
                    replacement: { match: /goHomeAfterSwitching:\i/, replace: "goHomeAfterSwitching:!1" },
                },
            ],
            flux: {
                LOGOUT(e) {
                    ({ isSwitchingAccount: jd } = e);
                },
                CONNECTION_OPEN() {
                    jd &&
                        ((jd = !1),
                        kr?.channelId &&
                            (Z.hasChannel(kr.channelId)
                                ? Os.transitionToChannel(kr.channelId)
                                : gr.transitionToGuild("@me")));
                },
                async CHANNEL_SELECT({ guildId: e, channelId: t }) {
                    jd || ((kr = { guildId: e, channelId: t }), await It("KeepCurrentChannel_previousData", kr));
                },
            },
            async start() {
                (kr = await wt("KeepCurrentChannel_previousData")),
                    kr
                        ? kr.channelId && Os.transitionToChannel(kr.channelId)
                        : ((kr = { guildId: io.getGuildId(), channelId: Le.getChannelId() ?? null }),
                          await It("KeepCurrentChannel_previousData", kr));
            },
        });
    a();
    l();
    lr();
    Ur();
    Yo();
    T();
    le();
    S();
    var a6 = "790c37d90400163a5a5fe00d6ca32ef0",
        Kd = "1108588077900898414",
        l6 = "2a96cbd8b46e442fc41c2b86b821562f",
        o4 = new U("LastFMRichPresence");
    async function iy(e) {
        return (await Ci.fetchAssetIds(Kd, [e]))[0];
    }
    function c6(e) {
        B.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: e, socketId: "LastFM" });
    }
    var uo = w({
            apiKey: {
                description:
                    "Custom Last.fm API key. Not required but highly recommended to avoid rate limiting with our shared key",
                type: 0,
            },
            username: { description: "Last.fm username", type: 0 },
            shareUsername: { description: "Show link to Last.fm profile", type: 3, default: !1 },
            clickableLinks: { description: "Make track, artist and album names clickable links", type: 3, default: !0 },
            hideWithSpotify: { description: "Hide Last.fm presence if spotify is running", type: 3, default: !0 },
            hideWithActivity: {
                description: "Hide Last.fm presence if you have any other presence",
                type: 3,
                default: !1,
            },
            statusName: { description: "Custom status text", type: 0, default: "some music" },
            statusDisplayType: {
                description: "Show the track / artist name in the member list",
                type: 4,
                options: [
                    { label: "Don't show (shows generic listening message)", value: "off" },
                    { label: "Show artist name", value: "artist", default: !0 },
                    { label: "Show track name", value: "track" },
                ],
            },
            nameFormat: {
                description: "Show name of song and artist in status name",
                type: 4,
                options: [
                    { label: "Use custom status name", value: "status-name", default: !0 },
                    { label: "Use format 'artist - song'", value: "artist-first" },
                    { label: "Use format 'song - artist'", value: "song-first" },
                    { label: "Use artist name only", value: "artist" },
                    { label: "Use song name only", value: "song" },
                    { label: "Use album name (falls back to custom status text if song has no album)", value: "album" },
                ],
            },
            useListeningStatus: {
                description: 'Show "Listening to" status instead of "Playing"',
                type: 3,
                default: !1,
            },
            missingArt: {
                description: "When album or album art is missing",
                type: 4,
                options: [
                    { label: "Use large Last.fm logo", value: "lastfmLogo", default: !0 },
                    { label: "Use generic placeholder", value: "placeholder" },
                ],
            },
            showLastFmLogo: { description: "Show the Last.fm logo by the album cover", type: 3, default: !0 },
        }),
        Yd = v({
            name: "LastFMRichPresence",
            description: "Little plugin for Last.fm rich presence",
            authors: [d.dzshn, d.RuiNtD, d.blahajZip, d.archeruwu],
            settings: uo,
            settingsAboutComponent() {
                return r(
                    mt,
                    null,
                    r(Xt, { tag: "h5" }, "How to create an API key"),
                    r(
                        Me,
                        null,
                        "Set ",
                        r("strong", null, "Application name"),
                        " and ",
                        r("strong", null, "Application description"),
                        " to anything and leave the rest blank."
                    ),
                    r(
                        za,
                        { size: "small", href: "https://www.last.fm/api/account/create", className: O.top8 },
                        "Create API Key"
                    )
                );
            },
            start() {
                this.updatePresence(),
                    (this.updateInterval = setInterval(() => {
                        this.updatePresence();
                    }, 16e3));
            },
            stop() {
                clearInterval(this.updateInterval);
            },
            async fetchTrackData() {
                if (!uo.store.username) return null;
                try {
                    let e = new URLSearchParams({
                            method: "user.getrecenttracks",
                            api_key: uo.store.apiKey || a6,
                            user: uo.store.username,
                            limit: "1",
                            format: "json",
                        }),
                        t = await g(`https://ws.audioscrobbler.com/2.0/?${e}`);
                    if (!t.ok) throw `${t.status} ${t.statusText}`;
                    let o = await t.json();
                    if (o.error) return o4.error("Error from Last.fm API", `${o.error}: ${o.message}`), null;
                    let n = o.recenttracks?.track[0];
                    return n?.["@attr"]?.nowplaying
                        ? {
                              name: n.name || "Unknown",
                              album: n.album["#text"],
                              artist: n.artist["#text"] || "Unknown",
                              url: n.url,
                              imageUrl: n.image?.find((i) => i.size === "large")?.["#text"],
                          }
                        : null;
                } catch (e) {
                    return o4.error("Failed to query Last.fm API", e), null;
                }
            },
            async updatePresence() {
                c6(await this.getActivity());
            },
            getLargeImage(e) {
                if (e.imageUrl && !e.imageUrl.includes(l6)) return e.imageUrl;
                if (uo.store.missingArt === "placeholder") return "placeholder";
            },
            async getActivity() {
                if (
                    (uo.store.hideWithActivity &&
                        no.getActivities(Kt.getId()).some((c) => c.application_id !== Kd && c.type !== 4)) ||
                    (uo.store.hideWithSpotify &&
                        no.getActivities(Kt.getId()).some((c) => c.type === 2 && c.application_id !== Kd))
                )
                    return null;
                let e = await this.fetchTrackData();
                if (!e) return null;
                let t = this.getLargeImage(e),
                    o = t
                        ? {
                              large_image: await iy(t),
                              large_text: e.album || void 0,
                              ...(uo.store.showLastFmLogo && {
                                  small_image: await iy("lastfm-small"),
                                  small_text: "Last.fm",
                              }),
                          }
                        : { large_image: await iy("lastfm-large"), large_text: e.album || void 0 },
                    n = [];
                uo.store.shareUsername &&
                    n.push({ label: "Last.fm Profile", url: `https://www.last.fm/user/${uo.store.username}` });
                let i = (() => {
                        switch (uo.store.nameFormat) {
                            case "artist-first":
                                return e.artist + " - " + e.name;
                            case "song-first":
                                return e.name + " - " + e.artist;
                            case "artist":
                                return e.artist;
                            case "song":
                                return e.name;
                            case "album":
                                return e.album || uo.store.statusName;
                            default:
                                return uo.store.statusName;
                        }
                    })(),
                    s = {
                        application_id: Kd,
                        name: i,
                        details: e.name,
                        state: e.artist,
                        status_display_type: { off: 0, artist: 1, track: 2 }[uo.store.statusDisplayType],
                        assets: o,
                        buttons: n.length ? n.map((c) => c.label) : void 0,
                        metadata: { button_urls: n.map((c) => c.url) },
                        type: uo.store.useListeningStatus ? 2 : 0,
                        flags: 1,
                    };
                return (
                    uo.store.clickableLinks &&
                        ((s.details_url = e.url),
                        (s.state_url = `https://www.last.fm/music/${encodeURIComponent(e.artist)}`),
                        e.album &&
                            (s.assets.large_url = `https://www.last.fm/music/${encodeURIComponent(e.artist)}/${encodeURIComponent(e.album)}`)),
                    s
                );
            },
        });
    a();
    l();
    T();
    le();
    a();
    l();
    var r4 = `# Blank lines and lines starting with "#" are ignored

Explode
Read if cute
Have a nice day!
Starting Lightcord...
Loading 0BDFDB.plugin.js...
Installing BetterDiscord...
h
shhhhh did you know that you're my favourite user? But don't tell the others!!
Today's video is sponsored by Raid Shadow Legends, one of the biggest mobile role-playing games of 2019 and it's totally free!
Never gonna give you up, Never gonna let you down
( \u0361\xB0 \u035C\u0296 \u0361\xB0)
(\uFF89\u25D5\u30EE\u25D5)\uFF89*:\uFF65\uFF9F\u2727
You look so pretty today!
Thinking of a funny quote...
3.141592653589793
meow
Welcome, friend
If you, or someone you love, has Ligma, please see the Ligma health line at https://bit.ly/ligma_hotline
Trans Rights
I\u2019d just like to interject for a moment. What you\u2019re refering to as Linux, is in fact, GNU/Linux, or as I\u2019ve recently taken to calling it, GNU plus Linux.
You're doing good today!
Don't worry, it's nothing 9 cups of coffee couldn't solve!
\uFFFD(repeat like 30 times)
a light amount of tomfoolery is okay
do you love?
horror
so eepy
So without further ado, let's just jump right into it!
Dying is absolutely safe
hey you! you're cute :))
heya ~
<:trolley:997086295010594867>
Time is gone, space is insane. Here it comes, here again.
sometimes it's okay to just guhhhhhhhhhhhhhh
Welcome to nginx!`;
    var u6 = r4
            .split(
                `
`
            )
            .map((e) => /^\s*[^#\s]/.test(e) && e.trim())
            .filter(Boolean),
        p6 = "Did you really disable all loading quotes? What a buffoon you are...",
        sy = w({
            replaceEvents: {
                description:
                    "Should this plugin also apply during events with special event themed quotes? (e.g. Halloween)",
                type: 3,
                default: !0,
            },
            enablePluginPresetQuotes: { description: "Enable the quotes preset by this plugin", type: 3, default: !0 },
            enableDiscordPresetQuotes: {
                description: "Enable Discord's preset quotes (including event quotes, during events)",
                type: 3,
                default: !1,
            },
            additionalQuotes: {
                description: "Additional custom quotes to possibly appear, separated by the below delimiter",
                type: 0,
                default: "",
                multiline: !0,
            },
            additionalQuotesDelimiter: { description: "Delimiter for additional quotes", type: 0, default: "|" },
        }),
        Zd = v({
            name: "LoadingQuotes",
            description: "Replace Discords loading quotes",
            authors: [d.Ven, d.KraXen72, d.UlyssesZhan],
            settings: sy,
            patches: [
                {
                    find: "#{intl::LOADING_DID_YOU_KNOW}",
                    replacement: [
                        { match: /_loadingText.+?(?=(\i)\[.{0,10}\.random)/, replace: "$&$self.mutateQuotes($1)," },
                        {
                            match: /_eventLoadingText.+?(?=(\i)\[.{0,10}\.random)/,
                            replace: "$&$self.mutateQuotes($1),",
                            predicate: () => sy.store.replaceEvents,
                        },
                    ],
                },
            ],
            mutateQuotes(e) {
                try {
                    let {
                        enableDiscordPresetQuotes: t,
                        additionalQuotes: o,
                        additionalQuotesDelimiter: n,
                        enablePluginPresetQuotes: i,
                    } = sy.store;
                    t || (e.length = 0),
                        i && e.push(...u6),
                        e.push(...o.split(n).filter(Boolean)),
                        e.length || e.push(p6);
                } catch (t) {
                    new U("LoadingQuotes").error("Failed to mutate quotes", t);
                }
            },
        });
    a();
    l();
    T();
    Pe();
    G();
    a();
    l();
    se();
    re();
    S();
    a();
    l();
    function ay({ className: e }) {
        return r("svg", { viewBox: "0 0 24 24", className: e }, r("circle", { cx: "12", cy: "12", r: "8" }));
    }
    a();
    l();
    Fo();
    re();
    S();
    var Qd = Pt(() => {
        let e = new xo(),
            t = new Map();
        class o extends Ms.Store {
            getCount(i) {
                return t.get(i);
            }
            async _ensureCount(i) {
                t.has(i) || (await yl.preload(i, Gr.getDefaultChannel(i).id));
            }
            ensureCount(i) {
                !i ||
                    t.has(i) ||
                    e.push(() =>
                        this._ensureCount(i).then(
                            () => ir(200),
                            () => ir(200)
                        )
                    );
            }
        }
        return new o(B, {
            GUILD_MEMBER_LIST_UPDATE({ guildId: n, groups: i }) {
                t.set(
                    n,
                    i.reduce((s, c) => s + (c.id === "offline" ? 0 : c.count), 0)
                );
            },
            ONLINE_GUILD_MEMBER_COUNT_UPDATE({ guildId: n, count: i }) {
                t.set(n, i);
            },
        });
    });
    a();
    l();
    function n4({ className: e }) {
        return r(
            "svg",
            { viewBox: "0 0 32 32", fill: "currentColor", className: e },
            r("path", {
                d: "M15.6668 3C14.2523 3 12.8958 3.5619 11.8956 4.5621C10.8954 5.56229 10.3335 6.91884 10.3335 8.33333V13.6666C10.3335 15.0811 10.8954 16.4378 11.8956 17.438C12.8958 18.4381 14.2523 19 15.6668 19C17.0813 19 18.4378 18.4381 19.438 17.438C20.4382 16.4378 21.0001 15.0811 21.0001 13.6666V8.33333C21.0001 6.91884 20.4382 5.56229 19.438 4.5621C18.4378 3.5619 17.0813 3 15.6668 3Z",
            }),
            r("path", {
                d: "M7.66667 13.6666C7.66667 13.313 7.52619 12.9739 7.27614 12.7238C7.02609 12.4738 6.68695 12.3333 6.33333 12.3333C5.97971 12.3333 5.64057 12.4738 5.39052 12.7238C5.14047 12.9739 5 13.313 5 13.6666C4.99911 16.2653 5.94692 18.7749 7.66545 20.7243C9.38399 22.6736 11.7551 23.9285 14.3334 24.2533V27H11.6667C11.3131 27 10.9739 27.1404 10.7239 27.3905C10.4738 27.6405 10.3334 27.9797 10.3334 28.3333C10.3334 28.6869 10.4738 29.0261 10.7239 29.2761C10.9739 29.5262 11.3131 29.6666 11.6667 29.6666H19.6667C20.0203 29.6666 20.3595 29.5262 20.6095 29.2761C20.8596 29.0261 21 28.6869 21 28.3333C21 27.9797 20.8596 27.6405 20.6095 27.3905C20.3595 27.1404 20.0203 27 19.6667 27H17V24.2533C19.5783 23.9285 21.9494 22.6736 23.6679 20.7243C25.3864 18.7749 26.3343 16.2653 26.3334 13.6666C26.3334 13.313 26.1929 12.9739 25.9428 12.7238C25.6928 12.4738 25.3536 12.3333 25 12.3333C24.6464 12.3333 24.3073 12.4738 24.0572 12.7238C23.8072 12.9739 23.6667 13.313 23.6667 13.6666C23.6667 15.7884 22.8238 17.8232 21.3235 19.3235C19.8233 20.8238 17.7884 21.6666 15.6667 21.6666C13.545 21.6666 11.5101 20.8238 10.0098 19.3235C8.50952 17.8232 7.66667 15.7884 7.66667 13.6666Z",
            })
        );
    }
    function uy({ isTooltip: e, tooltipGuildId: t }) {
        let { voiceActivity: o } = Tc.use(["voiceActivity"]),
            n = o && !e,
            i = ie([Le], () => Mo()),
            s = e ? t : i?.guild_id,
            c = ie([so], () => {
                if (!n) return 0;
                let x = so.getVoiceStates(s);
                return x
                    ? Object.values(x).filter(({ channelId: P }) => {
                          if (!P) return !1;
                          let I = Z.getChannel(P);
                          return I && Te.can(pe.VIEW_CHANNEL, I);
                      }).length
                    : 0;
            }),
            u = ie([Cs], () => Cs.getMemberCount(s)),
            p = ie([Qd], () => Qd.getCount(s)),
            { groups: m } = ie([ly], () => ly.getProps(s, i?.id)),
            h = ie([cy], () => cy.getMemberListSections(i?.id));
        if (
            (!e &&
                (m.length >= 1 || m[0].id !== "unknown") &&
                (p = m.reduce((x, P) => x + (P.id === "offline" ? 0 : P.count), 0)),
            !e &&
                h &&
                !di(h) &&
                (p = Object.values(h).reduce((x, P) => x + (P.sectionId === "offline" ? 0 : P.userIds.length), 0)),
            te(() => {
                Qd.ensureCount(s);
            }, [s]),
            u == null)
        )
            return null;
        let y = xc(c ?? 0),
            b = p != null ? xc(p) : "?";
        return r(
            "div",
            { className: Dr("widget", { tooltip: e, "member-list": !e }) },
            r(V, { text: `${b} online in this channel`, position: "bottom" }, (x) =>
                r(
                    "div",
                    { ...x, className: Dr("container") },
                    r(ay, { className: Dr("online-count") }),
                    r("span", { className: Dr("online") }, b)
                )
            ),
            r(V, { text: `${xc(u)} total server members`, position: "bottom" }, (x) =>
                r(
                    "div",
                    { ...x, className: Dr("container") },
                    r(ay, { className: Dr("total-count") }),
                    r("span", { className: Dr("total") }, xc(u))
                )
            ),
            n &&
                c > 0 &&
                r(V, { text: `${y} members in voice`, position: "bottom" }, (x) =>
                    r(
                        "div",
                        { ...x, className: Dr("container") },
                        r(n4, { className: Dr("voice-icon") }),
                        r("span", { className: Dr("voice") }, y)
                    )
                )
        );
    }
    var ly = it("ChannelMemberStore"),
        cy = it("ThreadMemberListStore"),
        Tc = w({
            toolTip: {
                type: 3,
                description: "Show member count on the server tooltip",
                default: !0,
                restartNeeded: !0,
            },
            memberList: {
                type: 3,
                description: "Show member count in the member list",
                default: !0,
                restartNeeded: !0,
            },
            voiceActivity: {
                type: 3,
                description: "Show voice activity with member count in the member list",
                default: !0,
            },
        }),
        d6 = new Intl.NumberFormat(),
        xc = (e) => d6.format(e),
        Dr = Y("vc-membercount-"),
        Xd = v({
            name: "MemberCount",
            description:
                "Shows the number of online members, total members, and users in voice channels on the server \u2014 in the member list and tooltip.",
            authors: [d.Ven, d.Commandtechno, d.Apexo],
            settings: Tc,
            patches: [
                {
                    find: "{isSidebarVisible:",
                    replacement: [
                        {
                            match: /children:\[(\i\.useMemo[^}]+"aria-multiselectable")(?<=className:(\i),.+?)/,
                            replace: "children:[$2?.includes('members')?$self.render():null,$1",
                        },
                    ],
                    predicate: () => Tc.store.memberList,
                },
                {
                    find: "GuildTooltip - ",
                    replacement: {
                        match: /#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,
                        replace: "$&,$self.renderTooltip(arguments[0].guild)",
                    },
                    predicate: () => Tc.store.toolTip,
                },
            ],
            render: C.wrap(() => r(uy, null), { noop: !0 }),
            renderTooltip: C.wrap((e) => r(uy, { isTooltip: !0, tooltipGuildId: e.id }), { noop: !0 }),
        });
    a();
    l();
    T();
    S();
    var s4 = w({
        showAtSymbol: {
            type: 3,
            description: "Whether the the @ symbol should be displayed on user mentions",
            default: !0,
        },
    });
    function m6() {
        return r(
            "svg",
            {
                className: "vc-mentionAvatars-icon vc-mentionAvatars-role-icon",
                xmlns: "http://www.w3.org/2000/svg",
                viewBox: "0 0 24 24",
                fill: "currentColor",
            },
            r("path", {
                d: "M14 8.00598C14 10.211 12.206 12.006 10 12.006C7.795 12.006 6 10.211 6 8.00598C6 5.80098 7.794 4.00598 10 4.00598C12.206 4.00598 14 5.80098 14 8.00598ZM2 19.006C2 15.473 5.29 13.006 10 13.006C14.711 13.006 18 15.473 18 19.006V20.006H2V19.006Z",
            }),
            r("path", {
                d: "M20.0001 20.006H22.0001V19.006C22.0001 16.4433 20.2697 14.4415 17.5213 13.5352C19.0621 14.9127 20.0001 16.8059 20.0001 19.006V20.006Z",
            }),
            r("path", {
                d: "M14.8834 11.9077C16.6657 11.5044 18.0001 9.9077 18.0001 8.00598C18.0001 5.96916 16.4693 4.28218 14.4971 4.0367C15.4322 5.09511 16.0001 6.48524 16.0001 8.00598C16.0001 9.44888 15.4889 10.7742 14.6378 11.8102C14.7203 11.8418 14.8022 11.8743 14.8834 11.9077Z",
            })
        );
    }
    var Jd = v({
        name: "MentionAvatars",
        description: "Shows user avatars and role icons inside mentions",
        authors: [d.Ven, d.SerStars],
        patches: [
            {
                find: ".USER_MENTION)",
                replacement: {
                    match: /children:`@\$\{(\i\?\?\i)\}`(?<=\.useName\((\i)\).+?)/,
                    replace: "children:$self.renderUsername({username:$1,user:$2})",
                },
            },
            {
                find: ".ROLE_MENTION)",
                replacement: {
                    match: /children:\[\i&&.{0,100}className:\i.\i,background:!1,.{0,50}?,\i(?=\])/,
                    replace: "$&,$self.renderRoleIcon(arguments[0])",
                },
            },
        ],
        settings: s4,
        renderUsername: C.wrap(
            (e) => {
                let { user: t, username: o } = e,
                    [n, i] = k(!1);
                return t
                    ? r(
                          "span",
                          { onMouseEnter: () => i(!0), onMouseLeave: () => i(!1) },
                          r("img", {
                              src: t.getAvatarURL(io.getGuildId(), 16, n),
                              className: "vc-mentionAvatars-icon",
                              style: { borderRadius: "50%" },
                          }),
                          i4(o)
                      )
                    : r(f, null, i4(o));
            },
            { noop: !0 }
        ),
        renderRoleIcon: C.wrap(
            ({ roleId: e, guildId: t }) => {
                if (!e) return null;
                let o = yt.getRole(t, e);
                return o?.icon
                    ? r("img", {
                          className: "vc-mentionAvatars-icon vc-mentionAvatars-role-icon",
                          src: `${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/role-icons/${e}/${o.icon}.webp?size=24&quality=lossless`,
                      })
                    : r(m6, null);
            },
            { noop: !0 }
        ),
    });
    function i4(e) {
        return s4.store.showAtSymbol ? `@${e}` : e;
    }
    a();
    l();
    a();
    l();
    T();
    S();
    var wc = w({
            userList: {
                description: "List of user ids to allow or exempt pings for (separated by commas or spaces)",
                type: 0,
                default: "1234567890123445,1234567890123445",
                multiline: !0,
            },
            roleList: {
                description: "List of role ids to allow or exempt pings for (separated by commas or spaces)",
                type: 0,
                default: "1234567890123445,1234567890123445",
                multiline: !0,
            },
            shouldPingListed: {
                description: "Behaviour",
                type: 4,
                options: [
                    { label: "Do not ping the listed users / roles", value: !1 },
                    { label: "Only ping the listed users / roles", value: !0, default: !0 },
                ],
            },
            inverseShiftReply: {
                description: "Invert Discord's shift replying behaviour (enable to make shift reply mention user)",
                type: 3,
                default: !1,
            },
        }),
        Qr = v({
            name: "NoReplyMention",
            description: "Disables reply pings by default",
            authors: [d.DustyAngel47, d.rae, d.pylix, d.outfoxxed],
            settings: wc,
            shouldMention(e, t) {
                let o = wc.store.userList.includes(e.author.id),
                    n = Z.getChannel(e.channel_id);
                if (n?.guild_id && !o) {
                    let s = Se.getMember(n.guild_id, e.author.id)?.roles;
                    o = !!s && s.some((c) => wc.store.roleList.includes(c));
                }
                let i = wc.store.shouldPingListed ? o : !o;
                return wc.store.inverseShiftReply ? t !== i : !t && i;
            },
            patches: [
                {
                    find: ',"Message")}function',
                    replacement: {
                        match: /:(\i),shouldMention:!(\i)\.shiftKey/,
                        replace: ":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)",
                    },
                },
            ],
        });
    T();
    G();
    S();
    var a4 = X("deleteMessage", "startEditMessage"),
        g6 = X("isEditing", "isEditingAny"),
        Vd = !1,
        l4 = (e) => e.key === "Backspace" && (Vd = !0),
        c4 = (e) => e.key === "Backspace" && (Vd = !1),
        u4 = () => !Hr.isFocused() && (Vd = !1),
        ca = w({
            enableDeleteOnClick: {
                type: 3,
                description: "Enable delete on click while holding backspace",
                default: !0,
            },
            enableDoubleClickToEdit: { type: 3, description: "Enable double click to edit", default: !0 },
            enableDoubleClickToReply: { type: 3, description: "Enable double click to reply", default: !0 },
            requireModifier: {
                type: 3,
                description: "Only do double click actions when shift/ctrl is held",
                default: !1,
            },
        }),
        em = v({
            name: "MessageClickActions",
            description: "Hold Backspace and click to delete, double click to edit/reply",
            authors: [d.Ven],
            settings: ca,
            start() {
                document.addEventListener("keydown", l4),
                    document.addEventListener("keyup", c4),
                    Hr.addChangeListener(u4);
            },
            stop() {
                document.removeEventListener("keydown", l4),
                    document.removeEventListener("keyup", c4),
                    Hr.removeChangeListener(u4);
            },
            onMessageClick(e, t, o) {
                let n = Kt.getId(),
                    i = e.author.id === n,
                    s = e.interactionMetadata?.authorizing_integration_owners[1] === n;
                if (Vd)
                    ca.store.enableDeleteOnClick &&
                        (i || Te.can(pe.MANAGE_MESSAGES, t) || s) &&
                        (e.deleted
                            ? B.dispatch({ type: "MESSAGE_DELETE", channelId: t.id, id: e.id, mlDeleted: !0 })
                            : a4.deleteMessage(t.id, e.id),
                        o.preventDefault());
                else {
                    if (
                        o.detail < 2 ||
                        (ca.store.requireModifier && !o.ctrlKey && !o.shiftKey) ||
                        (t.guild_id && !Te.can(pe.SEND_MESSAGES, t)) ||
                        e.deleted === !0
                    )
                        return;
                    if (i) {
                        if (!ca.store.enableDoubleClickToEdit || g6.isEditing(t.id, e.id) || e.state !== "SENT") return;
                        a4.startEditMessage(t.id, e.id, e.content), o.preventDefault();
                    } else {
                        if (!ca.store.enableDoubleClickToReply || !bl.REPLYABLE.has(e.type) || e.hasFlag(64)) return;
                        let c = o.shiftKey && !ca.store.requireModifier,
                            u = ke(Qr.name) ? Qr.shouldMention(e, c) : !c;
                        B.dispatch({
                            type: "CREATE_PENDING_REPLY",
                            channel: t,
                            message: e,
                            shouldMention: u,
                            showMentionToggle: t.guild_id !== null,
                        });
                    }
                }
            },
        });
    a();
    l();
    T();
    S();
    var p4 = 1471228928,
        tm = v({
            name: "MessageLatency",
            description: "Displays an indicator for messages that took \u2265n seconds to send",
            authors: [d.arHSM],
            settings: w({
                latency: { type: 1, description: "Threshold in seconds for latency indicator", default: 2 },
                detectDiscordKotlin: { type: 3, description: "Detect old Discord Android clients", default: !0 },
                showMillis: { type: 3, description: "Show milliseconds", default: !1 },
                ignoreSelf: { type: 3, description: "Don't add indicator to your own messages", default: !1 },
            }),
            patches: [
                {
                    find: "showCommunicationDisabledStyles",
                    replacement: {
                        match: /(message:(\i),avatar:\i,username:\(0,\i.jsxs\)\(\i.Fragment,\{children:\[)(\i&&)/,
                        replace: "$1$self.Tooltip()({ message: $2 }),$3",
                    },
                },
            ],
            stringDelta(e, t) {
                let o = {
                        days: Math.floor(e / 864e5),
                        hours: Math.floor((e / 36e5) % 24),
                        minutes: Math.floor((e / 6e4) % 60),
                        seconds: Math.floor((e / 1e3) % 60),
                        milliseconds: Math.floor(e % 1e3),
                    },
                    n = (c) => (o[c] > 0 ? `${o[c]} ${o[c] > 1 ? c : c.substring(0, c.length - 1)}` : null);
                return (
                    Object.keys(o).reduce((c, u) => {
                        let p = n(u);
                        return (
                            c +
                            (Tr(p)
                                ? (c !== "" ? ((t ? u === "milliseconds" : u === "seconds") ? " and " : " ") : "") + p
                                : "")
                        );
                    }, "") || "0 seconds"
                );
            },
            latencyTooltipData(e) {
                let { latency: t, detectDiscordKotlin: o, showMillis: n, ignoreSelf: i } = this.settings.store,
                    { id: s, nonce: c } = e;
                if (!Tr(c) || e.author.bot || (i && e.author.id === Kt.getId())) return null;
                let u = !1,
                    p = vo.extractTimestamp(s) - vo.extractTimestamp(c);
                n || (p = Math.round(p / 1e3) * 1e3), -p >= p4 - 864e5 && ((u = o), (p += p4));
                let m = Math.abs(p),
                    h = m !== p,
                    y = t * 1e3,
                    b = m >= y ? this.stringDelta(m, n) : null,
                    x = 120 * 1e3,
                    P = u
                        ? ["status-positive", "status-positive", "text-muted"]
                        : p >= x || h
                          ? ["text-muted", "text-muted", "text-muted"]
                          : p >= y * 2
                            ? ["status-danger", "text-muted", "text-muted"]
                            : ["status-warning", "status-warning", "text-muted"];
                return m >= y || u ? { delta: b, ahead: h, fill: P, isDiscordKotlin: u } : null;
            },
            Tooltip() {
                return C.wrap(
                    ({ message: e }) => {
                        let t = this.latencyTooltipData(e);
                        if (!Tr(t)) return null;
                        let o;
                        return (
                            t.delta
                                ? (o =
                                      (t.ahead
                                          ? `This user's clock is ${t.delta} ahead.`
                                          : `This message was sent with a delay of ${t.delta}.`) +
                                      (t.isDiscordKotlin
                                          ? " User is suspected to be on an old Discord Android client."
                                          : ""))
                                : (o = "User is suspected to be on an old Discord Android client"),
                            r(V, { text: o, position: "top" }, (n) =>
                                r(this.Icon, { delta: t.delta, fill: t.fill, props: n })
                            )
                        );
                    },
                    { noop: !0 }
                );
            },
            Icon({ delta: e, fill: t, props: o }) {
                return r(
                    "svg",
                    {
                        xmlns: "http://www.w3.org/2000/svg",
                        viewBox: "0 0 16 16",
                        width: "12",
                        height: "12",
                        role: "img",
                        fill: "none",
                        style: { marginRight: "8px", verticalAlign: -1 },
                        "aria-label": e ?? "Old Discord Android client",
                        "aria-hidden": "false",
                        ...o,
                    },
                    r("path", {
                        fill: `var(--${t[0]})`,
                        d: "M4.8001 12C4.8001 11.5576 4.51344 11.2 4.16023 11.2H2.23997C1.88676 11.2 1.6001 11.5576 1.6001 12V13.6C1.6001 14.0424 1.88676 14.4 2.23997 14.4H4.15959C4.5128 14.4 4.79946 14.0424 4.79946 13.6L4.8001 12Z",
                    }),
                    r("path", {
                        fill: `var(--${t[1]})`,
                        d: "M9.6001 7.12724C9.6001 6.72504 9.31337 6.39998 8.9601 6.39998H7.0401C6.68684 6.39998 6.40011 6.72504 6.40011 7.12724V13.6727C6.40011 14.0749 6.68684 14.4 7.0401 14.4H8.9601C9.31337 14.4 9.6001 14.0749 9.6001 13.6727V7.12724Z",
                    }),
                    r("path", {
                        fill: `var(--${t[2]})`,
                        d: "M14.4001 2.31109C14.4001 1.91784 14.1134 1.59998 13.7601 1.59998H11.8401C11.4868 1.59998 11.2001 1.91784 11.2001 2.31109V13.6888C11.2001 14.0821 11.4868 14.4 11.8401 14.4H13.7601C14.1134 14.4 14.4001 14.0821 14.4001 13.6888V2.31109Z",
                    })
                );
            },
        });
    a();
    l();
    T();
    re();
    G();
    S();
    var ua = new Map(),
        h6 = xs((e) => e.prototype?.renderSuppressButton),
        y6 = ge("withFooter", "childrenMessageContent:"),
        v6 = ge("childrenExecutedCommand:", ".hideAccessories"),
        d4 = ee("message", "searchResult"),
        py = ee("embedAuthorIcon", "embedAuthor", "embedAuthor", "embedMargin"),
        m4 = To("textAndImages", "messageDisplayCompact"),
        dy = /(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,
        f4 = /^https:\/\/(?:www\.)?tenor\.com\//,
        b6 = new xo(),
        om = w({
            messageBackgroundColor: { description: "Background color for messages in rich embeds", type: 3 },
            automodEmbeds: {
                description: "Use automod embeds instead of rich embeds (smaller but less info)",
                type: 4,
                options: [
                    { label: "Always use automod embeds", value: "always" },
                    {
                        label: "Prefer automod embeds, but use rich embeds if some content can't be shown",
                        value: "prefer",
                    },
                    { label: "Never use automod embeds", value: "never", default: !0 },
                ],
            },
            listMode: {
                description: "Whether to use ID list as blacklist or whitelist",
                type: 4,
                options: [
                    { label: "Blacklist", value: "blacklist", default: !0 },
                    { label: "Whitelist", value: "whitelist" },
                ],
            },
            idList: {
                description: "Guild/channel/user IDs to blacklist or whitelist (separate with comma)",
                type: 0,
                default: "",
                multiline: !0,
            },
            clearMessageCache: {
                type: 6,
                component: () => r(F, { onClick: () => ua.clear() }, "Clear the linked message cache"),
            },
        });
    async function S6(e, t) {
        let o = ua.get(t);
        if (o) return o.message;
        ua.set(t, { fetched: !1 });
        let i = (
            await Ct.get({ url: vt.Endpoints.MESSAGES(e), query: { limit: 1, around: t }, retries: 2 }).catch(
                () => null
            )
        )?.body?.[0];
        if (!i) return;
        let s = qt.getMessages(i.channel_id).receiveMessage(i).get(i.id);
        if (s) return ua.set(s.id, { message: s, fetched: !0 }), s;
    }
    function x6(e) {
        let t = [];
        for (let { content_type: o, height: n, width: i, url: s, proxy_url: c } of e.attachments ?? [])
            o?.startsWith("image/") && t.push({ height: n, width: i, url: s, proxyURL: c });
        for (let { type: o, image: n, thumbnail: i, url: s } of e.embeds ?? [])
            o === "image"
                ? t.push({ ...(n ?? i) })
                : s && o === "gifv" && !f4.test(s) && t.push({ height: i.height, width: i.width, url: s });
        return t;
    }
    function T6(e, t) {
        return !e && !t
            ? ""
            : e
              ? t
                  ? `[no content, ${e} attachment${e !== 1 ? "s" : ""} and ${t} embed${t !== 1 ? "s" : ""}]`
                  : `[no content, ${e} attachment${e !== 1 ? "s" : ""}]`
              : `[no content, ${t} embed${t !== 1 ? "s" : ""}]`;
    }
    function w6(e) {
        return !!(
            e.components.length ||
            e.attachments.some((t) => !t.content_type?.startsWith("image/")) ||
            e.embeds.some((t) => t.type !== "image" && (t.type !== "gifv" || f4.test(t.url)))
        );
    }
    function I6(e, t) {
        if (e > t) {
            let s = Math.min(e, 400);
            return { width: s, height: Math.round(t / (e / s)) };
        }
        let i = Math.min(t, 300);
        return { width: Math.round(e / (t / i)), height: i };
    }
    function P6(e, t) {
        return new Proxy(e, {
            get(o, n) {
                return n === "vencordEmbeddedBy" ? t : Reflect.get(...arguments);
            },
        });
    }
    function M6({ message: e }) {
        let t = e.vencordEmbeddedBy ?? [],
            o = [];
        for (let [n, i, s] of e.content.matchAll(dy)) {
            if (t.includes(s) || t.length > 2) continue;
            let c = Z.getChannel(i);
            if (!c || (!c.isPrivate() && !Te.can(pe.VIEW_CHANNEL, c))) continue;
            let { listMode: u, idList: p } = om.store,
                m = [c.guild_id, i, e.author.id].some((x) => x && p.includes(x));
            if ((u === "blacklist" && m) || (u === "whitelist" && !m)) continue;
            let h = ua.get(s)?.message;
            if (!h)
                if (((h ??= qt.getMessage(i, s)), h)) ua.set(s, { message: h, fetched: !0 });
                else {
                    b6.unshift(() => S6(i, s).then((x) => x && os(e.channel_id, e.id)));
                    continue;
                }
            let y = { message: P6(h, [...t, e.id]), channel: c },
                b = om.store.automodEmbeds;
            o.push(b === "always" || (b === "prefer" && !w6(h)) ? r(N6, { ...y }) : r(C6, { ...y }));
        }
        return o.length ? r(f, null, o) : null;
    }
    function g4(e) {
        return e.isDM()
            ? ["Direct Message", bt.getUserAvatarURL(R.getUser(e.recipients[0]))]
            : e.isGroupDM()
              ? ["Group DM", bt.getChannelIconURL(e)]
              : ["Server", bt.getGuildIconURL(Ce.getGuild(e.guild_id))];
    }
    function C6({ message: e, channel: t }) {
        let o = m4.useSetting(),
            n = R.getUser(Z.getChannel(t.id).recipients?.[0]),
            [i, s] = g4(t);
        return r(h6, {
            embed: {
                rawDescription: "",
                color: "var(--background-base-lower)",
                author: {
                    name: r(
                        H,
                        { variant: "text-xs/medium", tag: "span" },
                        r("span", null, i, " - "),
                        Ne.parse(t.isDM() ? `<@${n.id}>` : `<#${t.id}>`)
                    ),
                    iconProxyURL: s,
                },
            },
            renderDescription: () =>
                r(
                    "div",
                    { key: e.id, className: L(d4.message, om.store.messageBackgroundColor && d4.searchResult) },
                    r(v6, {
                        id: `message-link-embeds-${e.id}`,
                        message: e,
                        channel: t,
                        subscribeToComponentDispatch: !1,
                        compact: o,
                    })
                ),
        });
    }
    function N6(e) {
        let { message: t, channel: o } = e,
            n = m4.useSetting(),
            i = x6(t),
            { parse: s } = Ne,
            [c, u] = g4(o);
        return r(y6, {
            channel: o,
            childrenAccessories: r(
                H,
                {
                    color: "text-muted",
                    variant: "text-xs/medium",
                    tag: "span",
                    className: `${py.embedAuthor} ${py.embedMargin}`,
                },
                u && r("img", { src: u, className: py.embedAuthorIcon, alt: "" }),
                r(
                    "span",
                    null,
                    r("span", null, c, " - "),
                    o.isDM() ? Ne.parse(`<@${Z.getChannel(o.id).recipients[0]}>`) : Ne.parse(`<#${o.id}>`)
                )
            ),
            compact: n,
            content: r(
                f,
                null,
                t.content || t.attachments.length <= i.length
                    ? s(t.content)
                    : [T6(t.attachments.length, t.embeds.length)],
                i.map((p, m) => {
                    let { width: h, height: y } = I6(p.width, p.height);
                    return r("div", { key: m }, r("img", { src: p.url, width: h, height: y }));
                })
            ),
            hideTimestamp: !1,
            message: t,
            _messageEmbed: "automod",
        });
    }
    var rm = v({
        name: "MessageLinkEmbeds",
        description: "Adds a preview to messages that link another message",
        authors: [d.TheSun, d.Ven, d.RyanCaoDev],
        dependencies: ["MessageAccessoriesAPI", "MessageUpdaterAPI", "UserSettingsAPI"],
        settings: om,
        start() {
            El(
                "MessageLinkEmbeds",
                (e) => (dy.test(e.message.content) ? ((dy.lastIndex = 0), r(M6, { message: e.message })) : null),
                4
            );
        },
        stop() {
            Bl("MessageLinkEmbeds");
        },
    });
    a();
    l();
    T();
    se();
    le();
    re();
    G();
    S();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/messageLogger/deleteStyleOverlay.css", {
        name: "src/plugins/messageLogger/deleteStyleOverlay.css",
        source: `.messagelogger-deleted {
    background-color: hsl(var(--red-430-hsl, 0 85% 61%) / 15%) !important;
}`,
        classNames: {},
        dom: null,
    });
    var my = "src/plugins/messageLogger/deleteStyleOverlay.css";
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/messageLogger/deleteStyleText.css", {
        name: "src/plugins/messageLogger/deleteStyleText.css",
        source: `.messagelogger-deleted {
    --text-default: var(--status-danger, #f04747);
    --interactive-icon-default: var(--status-danger, #f04747);
    --text-muted: var(--status-danger, #f04747);
    --embed-title: var(--red-460, #be3535);
    --text-link: var(--red-460, #be3535);
    --text-strong: var(--red-460, #be3535);
}`,
        classNames: {},
        dom: null,
    });
    var fy = "src/plugins/messageLogger/deleteStyleText.css";
    a();
    l();
    hi();
    Pe();
    re();
    Oe();
    G();
    S();
    var A6 = ee("markup", "codeContainer"),
        R6 = ee("messageContent", "markupRtl"),
        Ic = Y("vc-ml-modal-");
    function h4(e) {
        fe((t) => r(C, null, r(k6, { modalProps: t, message: e })));
    }
    function k6({ modalProps: e, message: t }) {
        let [o, n] = k(t.editHistory.length),
            i = [t.firstEditTimestamp, ...t.editHistory.map((c) => c.timestamp)],
            s = [...t.editHistory.map((c) => c.content), t.content];
        return r(
            ve,
            { ...e, size: "large" },
            r(
                Re,
                { className: Ic("head") },
                r(H, { variant: "heading-lg/semibold", style: { flexGrow: 1 } }, "Message Edit History"),
                r(et, { onClick: e.onClose })
            ),
            r(
                Ie,
                { className: Ic("contents") },
                r(
                    Xo,
                    {
                        type: "top",
                        look: "brand",
                        className: L("vc-settings-tab-bar", Ic("tab-bar")),
                        selectedItem: o,
                        onItemSelect: n,
                    },
                    t.firstEditTimestamp.getTime() !== t.timestamp.getTime() &&
                        r(
                            Uo,
                            { text: "This edit state was not logged so it can't be displayed." },
                            r(
                                Xo.Item,
                                { className: "vc-settings-tab-bar-item", id: -1, disabled: !0 },
                                r(Vt, {
                                    className: Ic("timestamp"),
                                    timestamp: t.timestamp,
                                    isEdited: !0,
                                    isInline: !1,
                                })
                            )
                        ),
                    i.map((c, u) =>
                        r(
                            Xo.Item,
                            { key: u, className: "vc-settings-tab-bar-item", id: u },
                            r(Vt, { className: Ic("timestamp"), timestamp: c, isEdited: !0, isInline: !1 })
                        )
                    )
                ),
                r("div", { className: L(A6.markup, R6.messageContent, O.top20) }, gy(s[o], t))
            )
        );
    }
    var D6 = ee("edited", "communicationDisabled", "isSystemMessage");
    function y4() {
        W.plugins.MessageLogger.deleteStyle === "text" ? (Go(fy), Ho(my)) : (Ho(fy), Go(my));
    }
    var v4 = "ml-remove-history",
        b4 = "ml-toggle-style",
        L6 = (e, t) => {
            let { message: o } = t,
                { deleted: n, editHistory: i, id: s, channel_id: c } = o;
            if (!(!n && !i?.length)) {
                e: {
                    if (!n) break e;
                    let u = document.getElementById(`chat-messages-${c}-${s}`);
                    if (!u) break e;
                    e.push(
                        r(M.MenuItem, {
                            id: b4,
                            key: b4,
                            label: "Toggle Deleted Highlight",
                            action: () => u.classList.toggle("messagelogger-deleted"),
                        })
                    );
                }
                e.push(
                    r(M.MenuItem, {
                        id: v4,
                        key: v4,
                        label: "Remove Message History",
                        color: "danger",
                        action: () => {
                            n
                                ? B.dispatch({ type: "MESSAGE_DELETE", channelId: c, id: s, mlDeleted: !0 })
                                : (o.editHistory = []);
                        },
                    })
                );
            }
        },
        nm = (e, { channel: t }) => {
            let o = qt.getMessages(t?.id);
            if (!o?.some((i) => i.deleted || i.editHistory?.length)) return;
            (_e("mark-channel-read", e) ?? e).push(
                r(M.MenuItem, {
                    id: "vc-ml-clear-channel",
                    label: "Clear Message Log",
                    color: "danger",
                    action: () => {
                        o.forEach((i) => {
                            i.deleted
                                ? B.dispatch({ type: "MESSAGE_DELETE", channelId: t.id, id: i.id, mlDeleted: !0 })
                                : os(t.id, i.id, { editHistory: [] });
                        });
                    },
                })
            );
        };
    function gy(e, t) {
        return Ne.parse(e, !0, {
            channelId: t.channel_id,
            messageId: t.id,
            allowLinks: !0,
            allowHeading: !0,
            allowList: !0,
            allowEmojiLinks: !0,
            viewingChannelId: Le.getChannelId(),
        });
    }
    var im = v({
        name: "MessageLogger",
        description: "Temporarily logs deleted and edited messages.",
        authors: [d.rushii, d.Ven, d.AutumnVN, d.Nickyux, d.Kyuuhachi],
        dependencies: ["MessageUpdaterAPI"],
        contextMenus: {
            message: L6,
            "channel-context": nm,
            "thread-context": nm,
            "user-context": nm,
            "gdm-context": nm,
        },
        start() {
            y4();
        },
        renderEdits: C.wrap(
            ({ message: { id: e, channel_id: t } }) => {
                let o = ie(
                    [qt],
                    () => qt.getMessage(t, e),
                    null,
                    (n, i) => n?.editHistory === i?.editHistory
                );
                return (
                    W.plugins.MessageLogger.inlineEdits &&
                    r(
                        f,
                        null,
                        o.editHistory?.map((n, i) =>
                            r(
                                "div",
                                { key: i, className: "messagelogger-edited" },
                                gy(n.content, o),
                                r(
                                    Vt,
                                    { timestamp: n.timestamp, isEdited: !0, isInline: !1 },
                                    r("span", { className: D6.edited }, " ", "(", Ae("MESSAGE_EDITED"), ")")
                                )
                            )
                        )
                    )
                );
            },
            { noop: !0 }
        ),
        makeEdit(e, t) {
            return { timestamp: new Date(e.edited_timestamp), content: t.content };
        },
        options: {
            deleteStyle: {
                type: 4,
                description: "The style of deleted messages",
                default: "text",
                options: [
                    { label: "Red text", value: "text", default: !0 },
                    { label: "Red overlay", value: "overlay" },
                ],
                onChange: () => y4(),
            },
            logDeletes: { type: 3, description: "Whether to log deleted messages", default: !0 },
            collapseDeleted: {
                type: 3,
                description: "Whether to collapse deleted messages, similar to blocked messages",
                default: !1,
                restartNeeded: !0,
            },
            logEdits: { type: 3, description: "Whether to log edited messages", default: !0 },
            inlineEdits: {
                type: 3,
                description: "Whether to display edit history as part of message content",
                default: !0,
            },
            ignoreBots: { type: 3, description: "Whether to ignore messages by bots", default: !1 },
            ignoreSelf: { type: 3, description: "Whether to ignore messages by yourself", default: !1 },
            ignoreUsers: {
                type: 0,
                description: "Comma-separated list of user IDs to ignore",
                default: "",
                multiline: !0,
            },
            ignoreChannels: {
                type: 0,
                description: "Comma-separated list of channel IDs to ignore",
                default: "",
                multiline: !0,
            },
            ignoreGuilds: {
                type: 0,
                description: "Comma-separated list of guild IDs to ignore",
                default: "",
                multiline: !0,
            },
        },
        handleDelete(e, t, o) {
            try {
                if (e == null || (!o && !e.has(t.id))) return e;
                let n = (i) => {
                    let s = e.get(i);
                    if (!s) return;
                    let c = 64;
                    t.mlDeleted || (s.flags & c) === c || this.shouldIgnore(s)
                        ? (e = e.remove(i))
                        : (e = e.update(i, (p) =>
                              p.set("deleted", !0).set(
                                  "attachments",
                                  p.attachments.map((m) => ((m.deleted = !0), m))
                              )
                          ));
                };
                o ? t.ids.forEach(n) : n(t.id);
            } catch (n) {
                new U("MessageLogger").error("Error during handleDelete", n);
            }
            return e;
        },
        shouldIgnore(e, t = !1) {
            try {
                let {
                        ignoreBots: o,
                        ignoreSelf: n,
                        ignoreUsers: i,
                        ignoreChannels: s,
                        ignoreGuilds: c,
                        logEdits: u,
                        logDeletes: p,
                    } = W.plugins.MessageLogger,
                    m = R.getCurrentUser().id;
                return (
                    (o && e.author?.bot) ||
                    (n && e.author?.id === m) ||
                    i.includes(e.author?.id) ||
                    s.includes(e.channel_id) ||
                    s.includes(Z.getChannel(e.channel_id)?.parent_id) ||
                    (t ? !u : !p) ||
                    c.includes(Z.getChannel(e.channel_id)?.guild_id) ||
                    (e.author?.id === La && Z.getChannel(e.channel_id)?.parent_id === ui)
                );
            } catch {
                return !1;
            }
        },
        EditMarker({ message: e, className: t, children: o, ...n }) {
            return r(
                "span",
                { ...n, className: L("messagelogger-edit-marker", t), onClick: () => h4(e), role: "button" },
                o
            );
        },
        DELETED_MESSAGE_COUNT: () => ({
            ast: [
                [
                    6,
                    "count",
                    {
                        "=0": ["No deleted messages"],
                        one: [[1, "count"], " deleted message"],
                        other: [[1, "count"], " deleted messages"],
                    },
                    0,
                    "cardinal",
                ],
            ],
        }),
        patches: [
            {
                find: '"MessageStore"',
                replacement: [
                    {
                        match: /function (?=.+?MESSAGE_DELETE:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,
                        replace:
                            "function $1($2){   var cache = $3getOrCreate($2.channelId);   cache = $self.handleDelete(cache, $2, false);   $3commit(cache);}",
                    },
                    {
                        match: /function (?=.+?MESSAGE_DELETE_BULK:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,
                        replace:
                            "function $1($2){   var cache = $3getOrCreate($2.channelId);   cache = $self.handleDelete(cache, $2, true);   $3commit(cache);}",
                    },
                    {
                        match: /(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/,
                        replace:
                            "$1.update($4,m =>   (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m :   $3.message.edited_timestamp && $3.message.content !== m.content ?       m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) :       m).update($4",
                    },
                    { match: /(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/, replace: "!$1.deleted &&" },
                ],
            },
            {
                find: "}addReaction(",
                replacement: [
                    {
                        match: /this\.customRenderedContent=(\i)\.customRenderedContent,/,
                        replace:
                            "this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],this.firstEditTimestamp = $1.firstEditTimestamp || this.editedTimestamp || this.timestamp,",
                    },
                ],
            },
            {
                find: ".PREMIUM_REFERRAL&&(",
                replacement: [
                    {
                        match: /(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/,
                        replace:
                            "Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, firstEditTimestamp:$1.firstEditTimestamp })",
                    },
                    {
                        match: /attachments:(\i)\((\i)\)/,
                        replace:
                            "attachments: $1((() => {   if ($self.shouldIgnore($2)) return $2;   let old = arguments[1]?.attachments;   if (!old) return $2;   let new_ = $2.attachments?.map(a => a.id) ?? [];   let diff = old.filter(a => !new_.includes(a.id));   old.forEach(a => a.deleted = true);   $2.attachments = [...diff, ...$2.attachments];   return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory,firstEditTimestamp: new Date(arguments[1]?.firstEditTimestamp ?? $2.editedTimestamp ?? $2.timestamp)",
                    },
                    {
                        match: /(\((\i)\){return null==\2\.attachments.+?)spoiler:/,
                        replace: "$1deleted: arguments[0]?.deleted,spoiler:",
                    },
                ],
            },
            {
                find: "#{intl::REMOVE_ATTACHMENT_TOOLTIP_TEXT}",
                replacement: [
                    {
                        match: /\.SPOILER,(?=\[\i\.\i\]:)/,
                        replace: '$&"messagelogger-deleted-attachment":arguments[0]?.item?.originalItem?.deleted,',
                    },
                ],
            },
            {
                find: "Message must not be a thread starter message",
                replacement: [
                    {
                        match: /\)\("li",\{(.+?),className:/,
                        replace: ')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+',
                    },
                ],
            },
            {
                find: ".SEND_FAILED,",
                replacement: {
                    match: /\]:\i.isUnsupported.{0,20}?,children:\[/,
                    replace: "$&arguments[0]?.message?.editHistory?.length>0&&$self.renderEdits(arguments[0]),",
                },
            },
            {
                find: "#{intl::MESSAGE_EDITED}",
                replacement: {
                    match: /(isInline:!1,children:.{0,50}?)"span",\{(?=className:)/,
                    replace: "$1$self.EditMarker,{message:arguments[0].message,",
                },
            },
            {
                find: '"ReferencedMessageStore"',
                replacement: [
                    { match: /MESSAGE_DELETE:\i,/, replace: "MESSAGE_DELETE:()=>{}," },
                    { match: /MESSAGE_DELETE_BULK:\i,/, replace: "MESSAGE_DELETE_BULK:()=>{}," },
                ],
            },
            {
                find: ".MESSAGE,commandTargetId:",
                replacement: [
                    { match: /children:(\[""===.+?\])/, replace: "children:arguments[0].message.deleted?[]:$1" },
                ],
            },
            {
                find: "NON_COLLAPSIBLE.has(",
                replacement: {
                    match: /if\((\i)\.blocked\)return \i\.\i\.MESSAGE_GROUP_BLOCKED;/,
                    replace: '$&else if($1.deleted) return"MESSAGE_GROUP_DELETED";',
                },
                predicate: () => W.plugins.MessageLogger.collapseDeleted,
            },
            {
                find: "#{intl::NEW_MESSAGES_ESTIMATED_WITH_DATE}",
                replacement: [
                    {
                        match: /(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\|\|/,
                        replace: '$&$1.type==="MESSAGE_GROUP_DELETED"||',
                    },
                    {
                        match: /(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\?.*?:/,
                        replace: '$&$1.type==="MESSAGE_GROUP_DELETED"?$self.DELETED_MESSAGE_COUNT:',
                    },
                ],
                predicate: () => W.plugins.MessageLogger.collapseDeleted,
            },
        ],
    });
    a();
    l();
    T();
    var ii = "<:luna:1035316192220553236>";
    var O6 = Symbol("MessageTags");
    function S4() {
        return pa.store.tagsList;
    }
    function sm(e) {
        return pa.store.tagsList[e] ?? null;
    }
    function _6(e) {
        pa.store.tagsList[e.name] = e;
    }
    function E6(e) {
        delete pa.store.tagsList[e];
    }
    function x4(e) {
        Gs(
            {
                name: e.name,
                description: e.name,
                inputType: 1,
                execute: async (t, o) =>
                    sm(e.name)
                        ? (pa.store.clyde &&
                              rt(o.channel.id, { content: `${ii} The tag **${e.name}** has been sent!` }),
                          {
                              content: e.message.replaceAll(
                                  "\\n",
                                  `
`
                              ),
                          })
                        : (rt(o.channel.id, {
                              content: `${ii} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`,
                          }),
                          { content: `/${e.name}` }),
                [O6]: !0,
            },
            "CustomTags"
        );
    }
    var pa = w({
            clyde: {
                name: "Clyde message on send",
                description: "If enabled, clyde will send you an ephemeral message when a tag was used.",
                type: 3,
                default: !0,
            },
            tagsList: { type: 7, default: {} },
        }),
        am = v({
            name: "MessageTags",
            description: "Allows you to save messages and to use them with a simple command.",
            authors: [d.Luna],
            settings: pa,
            async start() {
                let e = S4();
                for (let t in e) x4(e[t]);
            },
            commands: [
                {
                    name: "tags",
                    description: "Manage all the tags for yourself",
                    inputType: 0,
                    options: [
                        {
                            name: "create",
                            description: "Create a new tag",
                            type: 1,
                            options: [
                                {
                                    name: "tag-name",
                                    description: "The name of the tag to trigger the response",
                                    type: 3,
                                    required: !0,
                                },
                                {
                                    name: "message",
                                    description: "The message that you will send when using this tag",
                                    type: 3,
                                    required: !0,
                                },
                            ],
                        },
                        { name: "list", description: "List all tags from yourself", type: 1, options: [] },
                        {
                            name: "delete",
                            description: "Remove a tag from your yourself",
                            type: 1,
                            options: [
                                {
                                    name: "tag-name",
                                    description: "The name of the tag to trigger the response",
                                    type: 3,
                                    required: !0,
                                },
                            ],
                        },
                        {
                            name: "preview",
                            description: "Preview a tag without sending it publicly",
                            type: 1,
                            options: [
                                {
                                    name: "tag-name",
                                    description: "The name of the tag to trigger the response",
                                    type: 3,
                                    required: !0,
                                },
                            ],
                        },
                    ],
                    async execute(e, t) {
                        switch (e[0].name) {
                            case "create": {
                                let o = Ao(e[0].options, "tag-name", ""),
                                    n = Ao(e[0].options, "message", "");
                                if (sm(o))
                                    return rt(t.channel.id, {
                                        content: `${ii} A Tag with the name **${o}** already exists!`,
                                    });
                                let i = { name: o, message: n };
                                x4(i),
                                    _6(i),
                                    rt(t.channel.id, { content: `${ii} Successfully created the tag **${o}**!` });
                                break;
                            }
                            case "delete": {
                                let o = Ao(e[0].options, "tag-name", "");
                                if (!sm(o))
                                    return rt(t.channel.id, {
                                        content: `${ii} A Tag with the name **${o}** does not exist!`,
                                    });
                                _l(o),
                                    E6(o),
                                    rt(t.channel.id, { content: `${ii} Successfully deleted the tag **${o}**!` });
                                break;
                            }
                            case "list": {
                                rt(t.channel.id, {
                                    embeds: [
                                        {
                                            title: "All Tags:",
                                            description:
                                                Object.values(S4()).map(
                                                    (o) =>
                                                        `\`${o.name}\`: ${o.message.slice(0, 72).replaceAll("\\n", " ")}${o.message.length > 72 ? "..." : ""}`
                                                ).join(`
`) || `${ii} Woops! There are no tags yet, use \`/tags create\` to create one!`,
                                            color: 14122879,
                                            type: "rich",
                                        },
                                    ],
                                });
                                break;
                            }
                            case "preview": {
                                let o = Ao(e[0].options, "tag-name", ""),
                                    n = sm(o);
                                if (!n)
                                    return rt(t.channel.id, {
                                        content: `${ii} A Tag with the name **${o}** does not exist!`,
                                    });
                                rt(t.channel.id, {
                                    content: n.message.replaceAll(
                                        "\\n",
                                        `
`
                                    ),
                                });
                                break;
                            }
                            default: {
                                rt(t.channel.id, { content: "Invalid sub-command" });
                                break;
                            }
                        }
                    },
                },
            ],
        });
    a();
    l();
    T();
    var T4 = w({ reactionCount: { description: "Number of reactions (0-42)", type: 1, default: 5 } }),
        lm = v({
            name: "MoreQuickReactions",
            description: "Increases the number of reactions available in the Quick React hover menu",
            authors: [d.iamme],
            settings: T4,
            get reactionCount() {
                return T4.store.reactionCount;
            },
            patches: [
                {
                    find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
                    replacement: {
                        match: /(?<=length>=3\?.{0,40})\.slice\(0,3\)/,
                        replace: ".slice(0,$self.reactionCount)",
                    },
                },
            ],
        });
    a();
    l();
    Vr();
    T();
    le();
    G();
    S();
    var B6 = X("selectPrivateChannel"),
        U6 = X("getGlobalName"),
        w4 = ee("empty", "textContainer", "connectionIcon"),
        F6 = ee("tabPanelScroller", "tabBarPanel"),
        cm = ee("row", "icon", "name", "details"),
        $6 = ge('action:"PRESS_SECTION"', "section");
    function G6(e) {
        return (
            e.name ||
            e.recipients
                .map(R.getUser)
                .filter(Tr)
                .map((t) => we.getNickname(t.id) || U6.getName(t))
                .join(", ")
        );
    }
    var um = (e) => Z.getSortedPrivateChannels().filter((t) => t.isGroupDM() && t.recipients.includes(e)),
        H6 = (e) => e.bot || e.id === R.getCurrentUser().id;
    function z6(e) {
        let t = um(e.id).length;
        return `${t === 0 ? "No" : t} Mutual Group${t !== 1 ? "s" : ""}`;
    }
    function I4(e, t) {
        return e.map((o) =>
            r(
                yo,
                {
                    key: o.id,
                    className: cm.row,
                    onClick: () => {
                        t(), B6.selectPrivateChannel(o.id);
                    },
                },
                r(al, {
                    src: bt.getChannelIconURL({ id: o.id, icon: o.icon, size: 32 }),
                    size: "SIZE_40",
                    className: cm.icon,
                }),
                r(
                    "div",
                    { className: cm.details },
                    r("div", { className: cm.name }, G6(o)),
                    r(H, { variant: "text-xs/medium" }, o.recipients.length + 1, " Members")
                )
            )
        );
    }
    var P4 = Symbol("MutualGroupDMs.Patched"),
        pm = v({
            name: "MutualGroupDMs",
            description: "Shows mutual group dms in profiles",
            authors: [d.amia],
            patches: [
                {
                    find: ".BOT_DATA_ACCESS?(",
                    replacement: [
                        {
                            match: /\i\.useEffect.{0,100}(\i)\[0\]\.section/,
                            replace: "$self.pushSection($1,arguments[0].user);$&",
                        },
                        {
                            match: /\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,
                            replace: "$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&",
                        },
                        { match: /className:\i\.\i(?=,type:"top")/, replace: '$& + " vc-mutual-gdms-modal-tab-bar"' },
                    ],
                },
                {
                    find: ".WIDGETS?",
                    replacement: [
                        {
                            match: /items:(\i),.+?(?=return\(0,\i\.jsxs?\)\("div)/,
                            replace: "$&$self.pushSection($1,arguments[0].user);",
                        },
                        {
                            match: /children:(?=.{0,100}?component:.+?section:(\i))/,
                            replace: "$&$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):",
                        },
                        { match: /type:"top",/, replace: '$&className:"vc-mutual-gdms-modal-v2-tab-bar",' },
                    ],
                },
                {
                    find: 'section:"MUTUAL_FRIENDS"',
                    replacement: [
                        {
                            match: /\i\|\|\i(?=\?\(0,\i\.jsxs?\)\(\i\.\i\.Overlay,)/,
                            replace: "$&||$self.getMutualGroupDms(arguments[0].user.id).length>0",
                        },
                        {
                            match: /\.openUserProfileModal.+?\)}\)}\)(?<=,(\i)&&(\i)&&(\(0,\i\.jsxs?\)\(\i\.\i,{className:(\i)\.\i}\)).{0,50}?"MUTUAL_FRIENDS".+?)/,
                            replace: (e, t, o, n, i) =>
                                `${e},$self.renderDMPageList({user:arguments[0].user,hasDivider:${t}||${o},Divider:${n},listStyle:${i}.list})`,
                        },
                    ],
                },
            ],
            getMutualGroupDms(e) {
                try {
                    return um(e);
                } catch (t) {
                    new U("MutualGroupDMs").error("Failed to get mutual group dms:", t);
                }
                return [];
            },
            pushSection(e, t) {
                try {
                    if (H6(t) || e[P4]) return;
                    (e[P4] = !0), e.push({ text: z6(t), section: "MUTUAL_GDMS" });
                } catch (o) {
                    new U("MutualGroupDMs").error("Failed to push mutual group dms section:", o);
                }
            },
            renderMutualGDMs: C.wrap(({ user: e, onClose: t }) => {
                let o = ce(() => um(e.id), [e.id]),
                    n = I4(o, t);
                return r(
                    On,
                    { className: F6.tabPanelScroller, fade: !0, onClose: t },
                    n.length > 0
                        ? n
                        : r(
                              "div",
                              { className: w4.empty },
                              r(
                                  "div",
                                  { className: w4.textContainer },
                                  r(
                                      qo,
                                      {
                                          tag: "h3",
                                          size: "md",
                                          weight: "medium",
                                          style: { color: "var(--text-strong)" },
                                      },
                                      "You don't have any group chats in common"
                                  )
                              )
                          )
                );
            }),
            renderDMPageList: C.wrap(
                ({ user: e, hasDivider: t, Divider: o, listStyle: n }) => {
                    let i = um(e.id);
                    return i.length === 0
                        ? null
                        : r(
                              f,
                              null,
                              t && o,
                              r($6, {
                                  listClassName: n,
                                  header: "Mutual Groups",
                                  isLoading: !1,
                                  items: I4(i, () => {}),
                              })
                          );
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    Ue();
    T();
    G();
    S();
    var { updateGuildNotificationSettings: M4 } = X("updateGuildNotificationSettings"),
        { toggleShowAllChannels: W6 } = Ye(".onboardExistingMember(", {
            toggleShowAllChannels: (e) => {
                let t = String(e);
                return t.length < 100 && !t.includes("onboardExistingMember") && !t.includes("getOptedInChannels");
            },
        }),
        j6 = de(".COMMUNITY)||", ".isOptInEnabled("),
        xn = w({
            guild: { description: "Mute Guild automatically", type: 3, default: !0 },
            messages: {
                description: "Server Notification Settings",
                type: 4,
                options: [
                    { label: "All messages", value: 0 },
                    { label: "Only @mentions", value: 1 },
                    { label: "Nothing", value: 2 },
                    { label: "Server default", value: 3, default: !0 },
                ],
            },
            everyone: { description: "Suppress @everyone and @here", type: 3, default: !0 },
            role: { description: "Suppress All Role @mentions", type: 3, default: !0 },
            highlights: { description: "Suppress Highlights automatically", type: 3, default: !0 },
            events: { description: "Mute New Events automatically", type: 3, default: !0 },
            showAllChannels: { description: "Show all channels automatically", type: 3, default: !0 },
        }),
        C4 =
            (e) =>
            (t, { guild: o }) => {
                if (!o) return;
                _e("privacy", t)?.push(
                    r(M.MenuItem, {
                        label: "Apply NewGuildSettings",
                        id: "vc-newguildsettings-apply",
                        icon: e ? Fa : void 0,
                        action: () => N4(o.id),
                    })
                );
            };
    function N4(e) {
        e === "@me" ||
            e === "null" ||
            e == null ||
            (M4(e, {
                muted: xn.store.guild,
                suppress_everyone: xn.store.everyone,
                suppress_roles: xn.store.role,
                mute_scheduled_events: xn.store.events,
                notify_highlights: xn.store.highlights ? 1 : 0,
            }),
            xn.store.messages !== 3 && M4(e, { message_notifications: xn.store.messages }),
            xn.store.showAllChannels && j6(e) && W6(e));
    }
    var dm = v({
        name: "NewGuildSettings",
        description: "Automatically mute new servers and change various other settings upon joining",
        tags: ["MuteNewGuild", "mute", "server"],
        authors: [d.Glitch, d.Nuckyz, d.carince, d.Mopi, d.GabiRP],
        contextMenus: { "guild-context": C4(!1), "guild-header-popout": C4(!0) },
        patches: [
            {
                find: ",acceptInvite(",
                replacement: {
                    match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!=.+?;/,
                    replace: (e, t) => `${e}$self.applyDefaultSettings(${t});`,
                },
            },
            {
                find: "{joinGuild:",
                replacement: {
                    match: /guildId:(\i),lurker:(\i).{0,20}}\)\);/,
                    replace: (e, t, o) => `${e}if(!${o})$self.applyDefaultSettings(${t});`,
                },
            },
        ],
        settings: xn,
        applyDefaultSettings: N4,
    });
    a();
    l();
    T();
    vs();
    le();
    S();
    e1("NoBlockedMessages", "ignoreBlockedMessages", "ignoreMessages");
    var mm = w({
            ignoreMessages: {
                description: "Completely ignores incoming messages from blocked and ignored (if enabled) users",
                type: 3,
                default: !1,
                restartNeeded: !0,
            },
            applyToIgnoredUsers: {
                description: "Additionally apply to 'ignored' users",
                type: 3,
                default: !0,
                restartNeeded: !1,
            },
        }),
        ns = v({
            name: "NoBlockedMessages",
            description: "Hides all blocked/ignored messages from chat completely",
            authors: [d.rushii, d.Samu, d.jamesbt365],
            settings: mm,
            patches: [
                {
                    find: ".__invalid_blocked,",
                    replacement: [
                        {
                            match: /let{messages:\i,[^}]*?collapsedReason[^}]*}/,
                            replace: "if($self.shouldHide(arguments[0]))return null;$&",
                        },
                    ],
                },
                ...['"MessageStore"', '"ReadStateStore"'].map((e) => ({
                    find: e,
                    predicate: () => mm.store.ignoreMessages,
                    replacement: [
                        {
                            match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,
                            replace: (t, o, n) => `if($self.shouldIgnoreMessage(${n}.message))return;`,
                        },
                    ],
                })),
            ],
            shouldIgnoreMessage(e) {
                try {
                    return we.isBlocked(e.author.id) ? !0 : mm.store.applyToIgnoredUsers && we.isIgnored(e.author.id);
                } catch (t) {
                    return new U("NoBlockedMessages").error("Failed to check if user is blocked or ignored:", t), !1;
                }
            },
            shouldHide(e) {
                try {
                    let t = e.collapsedReason(),
                        o = (n) => t === zr.t[sn(n)]();
                    return o("BLOCKED_MESSAGE_COUNT") || (mm.store.applyToIgnoredUsers && o("IGNORED_MESSAGE_COUNT"));
                } catch (t) {
                    return new U("NoBlockedMessages").error("Failed to check if message should be hidden:", t), !1;
                }
            },
        });
    a();
    l();
    T();
    var fm = v({
        name: "DisableDeepLinks",
        description: "Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",
        authors: [d.Ven],
        required: !0,
        noop: () => {},
        patches: [
            {
                find: /\.openNativeAppModal\(.{0,50}?\.DEEP_LINK/,
                replacement: { match: /\i\.\i\.openNativeAppModal/, replace: "$self.noop" },
            },
        ],
    });
    a();
    l();
    T();
    var gm = v({
        name: "NoDefaultHangStatus",
        description: "Disable the default hang status when joining voice channels",
        authors: [d.D3SOX],
        patches: [
            {
                find: ".CHILLING)",
                replacement: { match: /{enableHangStatus:(\i),/, replace: "{_enableHangStatus:$1=false," },
            },
        ],
    });
    a();
    l();
    T();
    var hm = v({
        name: "NoDevtoolsWarning",
        description:
            "Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",
        authors: [d.Ven],
        patches: [
            {
                find: "setDevtoolsCallbacks",
                replacement: { match: /if\(null!=\i&&"0.0.0"===\i\.app\.getVersion\(\)\)/, replace: "if(true)" },
            },
        ],
    });
    a();
    l();
    T();
    var ym = v({
        name: "NoF1",
        description: "Disables F1 help bind.",
        authors: [d.Cyn],
        patches: [
            {
                find: ',"f1"],comboKeysBindGlobal:',
                replacement: { match: ',"f1"],comboKeysBindGlobal:', replace: "],comboKeysBindGlobal:" },
            },
        ],
    });
    a();
    l();
    T();
    var vm = v({
        name: "NoMaskedUrlPaste",
        authors: [d.CatNoir],
        description: "Pasting a link while having text selected will not paste as masked URL",
        patches: [
            {
                find: ".selection,preventEmojiSurrogates:",
                replacement: {
                    match: /if\(null!=\i.selection&&\i.\i.isExpanded\(\i.selection\)\)/,
                    replace: "if(false)",
                },
            },
        ],
    });
    a();
    l();
    T();
    var A4 = w({
            inlineVideo: { description: "Play videos without carousel modal", type: 3, default: !0, restartNeeded: !0 },
        }),
        bm = v({
            name: "NoMosaic",
            authors: [d.AutumnVN],
            description: "Removes Discord image mosaic",
            tags: ["image", "mosaic", "media"],
            settings: A4,
            patches: [
                {
                    find: '"PLAINTEXT_PREVIEW":"OTHER"',
                    replacement: {
                        match: /=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,
                        replace: (e, t) => (t != null ? `=>${t};` : "=>false;"),
                    },
                },
                {
                    find: "renderAttachments(",
                    predicate: () => A4.store.inlineVideo,
                    replacement: {
                        match: /url:(\i)\.url\}\);return /,
                        replace: "$&$1.content_type?.startsWith('image/')&&",
                    },
                },
            ],
        });
    a();
    l();
    T();
    var Sm = v({
        name: "NoOnboardingDelay",
        description: "Skips the slow and annoying onboarding delay",
        authors: [d.nekohaxx],
        patches: [{ find: "#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}", replacement: { match: "3e3", replace: "0" } }],
    });
    a();
    l();
    T();
    G();
    var q6 = X("getMessageRequestsCount"),
        Pc = w({
            hideFriendRequestsCount: {
                type: 3,
                description: "Hide incoming friend requests count",
                default: !0,
                restartNeeded: !0,
            },
            hideMessageRequestsCount: {
                type: 3,
                description: "Hide message requests count",
                default: !0,
                restartNeeded: !0,
            },
            hidePremiumOffersCount: { type: 3, description: "Hide nitro offers count", default: !0, restartNeeded: !0 },
        }),
        xm = v({
            name: "NoPendingCount",
            description: "Removes the ping count of incoming friend requests, message requests, and nitro offers.",
            authors: [d.amia],
            settings: Pc,
            patches: [
                {
                    find: "getPendingCount(){",
                    predicate: () => Pc.store.hideFriendRequestsCount,
                    replacement: { match: /(?<=getPendingCount\(\)\{)/, replace: "return 0;" },
                },
                {
                    find: "getMessageRequestsCount(){",
                    predicate: () => Pc.store.hideMessageRequestsCount,
                    replacement: { match: /(?<=getMessageRequestsCount\(\)\{)/, replace: "return 0;" },
                },
                {
                    find: ".getSpamChannelsCount();return",
                    predicate: () => Pc.store.hideMessageRequestsCount,
                    replacement: {
                        match: /(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,
                        replace: "$self.getRealMessageRequestCount()",
                    },
                },
                {
                    find: "showProgressBadge:",
                    predicate: () => Pc.store.hidePremiumOffersCount,
                    replacement: {
                        match: /(\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.+?)\2\+\3/,
                        replace: (e, t) => `${t}0`,
                    },
                },
            ],
            getRealMessageRequestCount() {
                return q6.getMessageRequestChannelIds().size;
            },
        });
    a();
    l();
    T();
    S();
    var Tm = v({
        name: "NoProfileThemes",
        description: "Completely removes Nitro profile themes from everyone but yourself",
        authors: [d.TheKodeToad],
        patches: [
            {
                find: "hasThemeColors(){",
                replacement: {
                    match: /get canUsePremiumProfileCustomization\(\){return /,
                    replace: "$&$self.isCurrentUser(this.userId)&&",
                },
            },
        ],
        isCurrentUser: (e) => e === R.getCurrentUser()?.id,
    });
    a();
    l();
    T();
    var hy = w({
            shownEmojis: {
                description: "The types of emojis to show in the autocomplete menu.",
                type: 4,
                default: "onlyUnicode",
                options: [
                    { label: "Only unicode emojis", value: "onlyUnicode" },
                    { label: "Unicode emojis and server emojis from current server", value: "currentServer" },
                    { label: "Unicode emojis and all server emojis (Discord default)", value: "all" },
                ],
            },
        }),
        wm = v({
            name: "NoServerEmojis",
            authors: [d.UlyssesZhan],
            description: "Do not show server emojis in the autocomplete menu.",
            settings: hy,
            patches: [
                {
                    find: "}searchWithoutFetchingLatest(",
                    replacement: {
                        match: /\.nameMatchesChain\(\i\)\.reduce\(\((\i),(\i)\)=>\{(?<=channel:(\i).+?)/,
                        replace: "$&if($self.shouldSkip($3,$2))return $1;",
                    },
                },
            ],
            shouldSkip(e, t) {
                return t.type !== 1
                    ? !1
                    : hy.store.shownEmojis === "onlyUnicode"
                      ? !0
                      : hy.store.shownEmojis === "currentServer"
                        ? t.guildId !== (e != null ? e.getGuildId() : null)
                        : !1;
            },
        });
    a();
    l();
    T();
    var Im = v({
        name: "NoTypingAnimation",
        authors: [d.AutumnVN],
        description: "Disables the CPU-intensive typing dots animation",
        patches: [
            { find: "dotCycle", replacement: { match: /focused:(\i)/g, replace: (e, t) => `_focused:${t}=false` } },
        ],
    });
    a();
    l();
    T();
    var Pm = v({
        name: "NoUnblockToJump",
        description:
            "Allows you to jump to messages of blocked or ignored users and likely spammers without unblocking them",
        authors: [d.dzshn],
        patches: [
            {
                find: "#{intl::UNIGNORE_TO_JUMP_BODY}",
                replacement: { match: /if\(\i\.\i\.isBlockedForMessage\(/, replace: "return true;$&" },
            },
        ],
    });
    a();
    l();
    T();
    var K6 = w({
            notificationVolume: {
                type: 5,
                description: "Notification volume",
                markers: [0, 25, 50, 75, 100],
                default: 100,
                stickToMarkers: !1,
            },
        }),
        Mm = v({
            name: "NotificationVolume",
            description: "Save your ears and set a separate volume for notifications and in-app sounds",
            authors: [d.philipbry],
            settings: K6,
            patches: [
                {
                    find: "ensureAudio(){",
                    replacement: {
                        match: /(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,
                        replace: "$self.settings.store.notificationVolume/100*",
                    },
                },
            ],
        });
    a();
    l();
    T();
    S();
    var Mc = w({
            channelToAffect: {
                type: 4,
                description: "Select the type of DM for the plugin to affect",
                options: [
                    { label: "Both", value: "both_dms", default: !0 },
                    { label: "User DMs", value: "user_dm" },
                    { label: "Group DMs", value: "group_dm" },
                ],
            },
            allowMentions: { type: 3, description: "Receive audio pings for @mentions", default: !1 },
            allowEveryone: {
                type: 3,
                description: "Receive audio pings for @everyone and @here in group DMs",
                default: !1,
            },
        }),
        Cm = v({
            name: "OnePingPerDM",
            description:
                "If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",
            authors: [d.ProffDea],
            settings: Mc,
            patches: [
                {
                    find: ".getDesktopType()===",
                    replacement: [
                        {
                            match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,
                            replace: "$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else ",
                        },
                        {
                            match: /sound:(\i\?\i:void 0,volume:\i,onClick)/,
                            replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1",
                        },
                    ],
                },
            ],
            isPrivateChannelRead(e) {
                let t = Z.getChannel(e.channel_id)?.type;
                return (t !== 1 && t !== 3) ||
                    (t === 1 && Mc.store.channelToAffect === "group_dm") ||
                    (t === 3 && Mc.store.channelToAffect === "user_dm") ||
                    (Mc.store.allowMentions && e.mentions.some((o) => o.id === R.getCurrentUser().id)) ||
                    (Mc.store.allowEveryone && e.mention_everyone)
                    ? !0
                    : En.getOldestUnreadMessageId(e.channel_id) === e.id;
            },
        });
    a();
    l();
    T();
    var Nm = v({
        name: "oneko",
        description: "cat follow mouse (real)",
        authors: [d.Ven, d.adryd],
        start() {
            g("https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/oneko.js")
                .then((e) => e.text())
                .then((e) =>
                    e
                        .replace(
                            "./oneko.gif",
                            "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif"
                        )
                        .replace("(isReducedMotion)", "(false)")
                )
                .then(eval);
        },
        stop() {
            document.getElementById("oneko")?.remove();
        },
    });
    a();
    l();
    T();
    S();
    var yy = {
            spotify: {
                match: /^https:\/\/open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|artist|playlist|user|episode|prerelease)\/(.+)(?:\?.+?)?$/,
                replace: (e, t, o) => `spotify://${t}/${o}`,
                description: "Open Spotify links in the Spotify app",
                shortlinkMatch: /^https:\/\/spotify\.link\/.+$/,
                accountViewReplace: (e) => `spotify:user:${e}`,
            },
            steam: {
                match: /^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,
                replace: (e) => `steam://openurl/${e}`,
                description: "Open Steam links in the Steam app",
                shortlinkMatch: /^https:\/\/s.team\/.+$/,
                accountViewReplace: (e) => `steam://openurl/https://steamcommunity.com/profiles/${e}`,
            },
            epic: {
                match: /^https:\/\/store\.epicgames\.com\/(.+)$/,
                replace: (e, t) => `com.epicgames.launcher://store/${t}`,
                description: "Open Epic Games links in the Epic Games Launcher",
            },
            tidal: {
                match: /^https:\/\/(?:listen\.)?tidal\.com\/(?:browse\/)?(track|album|artist|playlist|user|video|mix)\/([a-f0-9-]+).*/,
                replace: (e, t, o) => `tidal://${t}/${o}`,
                description: "Open Tidal links in the Tidal app",
            },
            itunes: {
                match: /^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/,
                replace: (e, t, o, n, i) =>
                    i ? `itunes://music.apple.com/us/${o}/${n}/${i}` : `itunes://music.apple.com/us/${o}/${n}`,
                description: "Open Apple Music links in the iTunes app",
            },
        },
        Am = w(
            Object.entries(yy).reduce(
                (e, [t, o]) => ((e[t] = { type: 3, description: o.description, default: !0 }), e),
                {}
            )
        ),
        Y6 = VencordNative.pluginHelpers.OpenInApp,
        Tn = v({
            name: "OpenInApp",
            description: "Open links in their respective apps instead of your browser",
            authors: [d.Ven, d.surgedevs],
            settings: Am,
            patches: [
                {
                    find: "trackAnnouncementMessageLinkClicked({",
                    replacement: {
                        match: /function (\i\(\i,\i\)\{)(?=.{0,150}trusted:)/,
                        replace: "async function $1 if(await $self.handleLink(...arguments)) return;",
                    },
                },
                {
                    find: "no artist ids in metadata",
                    predicate: () => Am.store.spotify,
                    replacement: [
                        { match: /\i\.\i\.isProtocolRegistered\(\)/g, replace: "true" },
                        { match: /\(0,\i\.isDesktop\)\(\)/, replace: "true" },
                    ],
                },
                ...[".__invalid_connectedAccountOpenIconContainer", ".BLUESKY||"].map((e) => ({
                    find: e,
                    replacement: {
                        match: /(?<=onClick:(\i)=>\{)(?=.{0,100}\.CONNECTED_ACCOUNT_VIEWED)(?<==(\i)\.metadata.+?)/,
                        replace: "if($self.handleAccountView($1,$2.type,$2.id)) return;",
                    },
                })),
            ],
            async handleLink(e, t) {
                if (!e) return !1;
                let o = e.href;
                if (!o) return !1;
                for (let [n, i] of Object.entries(yy))
                    if (
                        Am.store[n] &&
                        (i.shortlinkMatch?.test(o) && (t?.preventDefault(), (o = await Y6.resolveRedirect(o))),
                        i.match.test(o))
                    ) {
                        Ge("Opened link in native app", J.Type.SUCCESS);
                        let s = o.replace(i.match, i.replace);
                        return VencordNative.native.openExternal(s), t?.preventDefault(), !0;
                    }
                return t?.defaultPrevented ? (unsafeWindow.open(o, "_blank"), !0) : !1;
            },
            handleAccountView(e, t, o) {
                let n = yy[t];
                if (n?.accountViewReplace && Am.store[t])
                    return VencordNative.native.openExternal(n.accountViewReplace(o)), e.preventDefault(), !0;
            },
        });
    a();
    l();
    T();
    var vy = w({
            defaultLayout: {
                type: 4,
                options: [
                    { label: "List", value: 1, default: !0 },
                    { label: "Gallery", value: 2 },
                ],
                description: "Which layout to use as default",
            },
            defaultSortOrder: {
                type: 4,
                options: [
                    { label: "Recently Active", value: 0, default: !0 },
                    { label: "Date Posted", value: 1 },
                ],
                description: "Which sort order to use as default",
            },
        }),
        Rm = v({
            name: "OverrideForumDefaults",
            description:
                "Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",
            authors: [d.Inbestigator],
            patches: [
                {
                    find: "getDefaultLayout(){",
                    replacement: [
                        { match: /}getDefaultLayout\(\){/, replace: "$&return $self.getLayout();" },
                        { match: /}getDefaultSortOrder\(\){/, replace: "$&return $self.getSortOrder();" },
                    ],
                },
            ],
            getLayout: () => vy.store.defaultLayout,
            getSortOrder: () => vy.store.defaultSortOrder,
            settings: vy,
        });
    a();
    l();
    T();
    se();
    S();
    function Z6(e) {
        let t = Ce.getGuild(e);
        return t ? !Bs(t, "INVITES_DISABLED") && Te.getGuildPermissionProps(t).canManageRoles : !1;
    }
    function Q6(e) {
        let o = [...Ce.getGuild(e).features, "INVITES_DISABLED"];
        Ct.patch({ url: vt.Endpoints.GUILD(e), body: { features: o } });
    }
    var km = v({
        name: "PauseInvitesForever",
        tags: ["DisableInvitesForever"],
        description: "Brings back the option to pause invites indefinitely that stupit Discord removed.",
        authors: [d.Dolfies, d.amia],
        patches: [
            {
                find: "#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}",
                group: !0,
                replacement: [
                    {
                        match: /children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/,
                        replace: "children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})",
                    },
                    {
                        match: /\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,
                        replace: "$&,setChecked=$2",
                    },
                ],
            },
        ],
        renderInvitesLabel: C.wrap(
            ({ guildId: e, setChecked: t }) =>
                r(
                    "div",
                    null,
                    Ae("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),
                    Z6(e) &&
                        r(
                            "a",
                            {
                                role: "button",
                                onClick: () => {
                                    t(!0), Q6(e);
                                },
                            },
                            " Pause Indefinitely."
                        )
                ),
            { noop: !0 }
        ),
    });
    a();
    l();
    T();
    pr();
    var by = w({
            lockout: {
                type: 3,
                default: !0,
                description: `Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,
                restartNeeded: !0,
            },
            onboarding: {
                type: 3,
                default: !0,
                description:
                    'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',
                restartNeeded: !0,
            },
        }),
        Dm = v({
            name: "PermissionFreeWill",
            description: "Disables the client-side restrictions for channel permission management.",
            authors: [d.lewisakura],
            patches: [
                {
                    find: "#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",
                    replacement: [{ match: /case"DENY":.{0,50}if\((?=\i\.\i\.can)/, replace: "$&true||" }],
                    predicate: () => by.store.lockout,
                },
                {
                    find: "#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",
                    replacement: [
                        {
                            match: /{(?:\i:\(\)=>\i,?){2}}/,
                            replace: (e) => e.replaceAll(Lt(/\(\)=>\i/g), "()=>()=>Promise.resolve(true)"),
                        },
                    ],
                    predicate: () => by.store.onboarding,
                },
            ],
            settings: by,
        });
    a();
    l();
    Ue();
    hi();
    T();
    re();
    G();
    S();
    a();
    l();
    Ue();
    a();
    l();
    Pe();
    G();
    S();
    var { getGuildPermissionSpecMap: Lm } = X("getGuildPermissionSpecMap"),
        nt = Y("vc-permviewer-");
    function Om({ id: e }, t) {
        return yt.getSortedRoles(e).filter((o) => o.id === e || t.roles.includes(o.id));
    }
    function k4(e) {
        switch (si.store.permissionsSortOrder) {
            case 0:
                return e.sort((t, o) => o.position - t.position);
            case 1:
                return e.sort((t, o) => t.position - o.position);
            default:
                return e;
        }
    }
    function _m(e, t) {
        let o = yt.getRolesSnapshot(t);
        return e.sort((n, i) => {
            if (n.type !== 0 || i.type !== 0) return 0;
            let s = o[n.id];
            return o[i.id].position - s.position;
        });
    }
    Gn();
    se();
    Oe();
    G();
    S();
    a();
    l();
    function Sy() {
        return r(
            "svg",
            { height: "24", width: "24", viewBox: "0 0 24 24" },
            r("title", null, "Denied"),
            r("path", {
                fill: "var(--status-danger)",
                d: "M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z",
            })
        );
    }
    function xy() {
        return r(
            "svg",
            { height: "24", width: "24", viewBox: "0 0 24 24" },
            r("title", null, "Allowed"),
            r("path", {
                fill: "var(--status-positive)",
                d: "M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ",
            })
        );
    }
    function L4() {
        return r(
            "svg",
            { height: "24", width: "24", viewBox: "0 0 16 16" },
            r(
                "g",
                null,
                r("title", null, "Not overwritten"),
                r("polygon", { fill: "var(--text-default)", points: "12 2.32 10.513 2 4 13.68 5.487 14" })
            )
        );
    }
    var J6 = de("convertSurrogateToName", "customIconSrc", "unicodeEmoji");
    function V6(e) {
        let t = J6(e, 20);
        if (!t) return;
        let { customIconSrc: o, unicodeEmoji: n } = t;
        return o ?? n?.url;
    }
    function eC({ permissions: e, guild: t, modalProps: o, header: n }) {
        let i = ce(() => Lm(t), [t.id]);
        ie(
            [Se],
            () => Se.getMemberIds(t.id),
            null,
            (m, h) => m.length === h.length
        ),
            te(() => {
                e.sort((m, h) => m.type - h.type);
            }, [e]),
            te(() => {
                let m = e.filter((h) => h.type === 1 && !Se.isMember(t.id, h.id)).map(({ id: h }) => h);
                B.dispatch({ type: "GUILD_MEMBERS_REQUEST", guildIds: [t.id], userIds: m });
            }, []);
        let [s, c] = k(0),
            u = e[s],
            p = yt.getRolesSnapshot(t.id);
        return r(
            ve,
            { ...o, size: "large" },
            r(
                Re,
                null,
                r(H, { className: nt("modal-title"), variant: "heading-lg/semibold" }, n, " Permissions"),
                r(et, { onClick: o.onClose })
            ),
            r(
                Ie,
                { className: nt("modal-content") },
                !u &&
                    r(
                        "div",
                        { className: nt("modal-no-perms") },
                        r(H, { variant: "heading-lg/normal" }, "No permissions to display!")
                    ),
                u &&
                    r(
                        "div",
                        { className: nt("modal-container") },
                        r(
                            On,
                            { className: nt("modal-list"), orientation: "auto" },
                            e.map((m, h) => {
                                let y = R.getUser(m.id ?? ""),
                                    b = p[m.id ?? ""],
                                    x = b != null ? V6(b) : void 0;
                                return r(
                                    "div",
                                    {
                                        key: h,
                                        className: nt("modal-list-item-btn"),
                                        onClick: () => c(h),
                                        role: "button",
                                        tabIndex: 0,
                                    },
                                    r(
                                        "div",
                                        {
                                            className: nt("modal-list-item", { "modal-list-item-active": s === h }),
                                            onContextMenu: (P) => {
                                                m.type === 0
                                                    ? st.openContextMenu(P, () =>
                                                          r(tC, { guild: t, roleId: m.id, onClose: o.onClose })
                                                      )
                                                    : m.type === 1 &&
                                                      st.openContextMenu(P, () => r(oC, { userId: m.id }));
                                            },
                                        },
                                        (m.type === 0 || m.type === 2) &&
                                            r("span", {
                                                className: nt("modal-role-circle"),
                                                style: { backgroundColor: b?.colorString ?? "var(--primary-300)" },
                                            }),
                                        m.type === 0 &&
                                            x != null &&
                                            r("img", { className: nt("modal-role-image"), src: x }),
                                        m.type === 1 &&
                                            y != null &&
                                            r("img", {
                                                className: nt("modal-user-img"),
                                                src: y.getAvatarURL(void 0, void 0, !1),
                                            }),
                                        r(
                                            H,
                                            { variant: "text-md/normal", className: nt("modal-list-item-text") },
                                            m.type === 0
                                                ? (b?.name ?? "Unknown Role")
                                                : m.type === 1
                                                  ? ((y != null && qr(y)) ?? "Unknown User")
                                                  : r(
                                                        oe,
                                                        { gap: "0.2em" },
                                                        "@owner",
                                                        r(Hg, { height: 18, width: 18, "aria-hidden": "true" })
                                                    )
                                        )
                                    )
                                );
                            })
                        ),
                        r("div", { className: nt("modal-divider") }),
                        r(
                            On,
                            { className: nt("modal-perms"), orientation: "auto" },
                            Object.values(pe).map((m) =>
                                r(
                                    "div",
                                    { key: m, className: nt("modal-perms-item") },
                                    r(
                                        "div",
                                        { className: nt("modal-perms-item-icon") },
                                        (() => {
                                            let { permissions: h, overwriteAllow: y, overwriteDeny: b } = u;
                                            return h
                                                ? (h & m) === m
                                                    ? xy()
                                                    : Sy()
                                                : y && (y & m) === m
                                                  ? xy()
                                                  : b && (b & m) === m
                                                    ? Sy()
                                                    : L4();
                                        })()
                                    ),
                                    r(H, { variant: "text-md/normal" }, i[String(m)].title),
                                    r(
                                        V,
                                        {
                                            text: (() => {
                                                let { description: h } = i[String(m)];
                                                return typeof h == "function" ? zr.intl.format(h, {}) : h;
                                            })(),
                                        },
                                        (h) => r(Ba, { ...h })
                                    )
                                )
                            )
                        )
                    )
            )
        );
    }
    function tC({ guild: e, roleId: t, onClose: o }) {
        return r(
            M.Menu,
            { navId: nt("role-context-menu"), onClose: st.closeContextMenu, "aria-label": "Role Options" },
            r(M.MenuItem, {
                id: nt("copy-role-id"),
                label: Ae("COPY_ID_ROLE"),
                action: () => {
                    Po(t);
                },
            }),
            si.store.unsafeViewAsRole &&
                r(M.MenuItem, {
                    id: nt("view-as-role"),
                    label: Ae("VIEW_AS_ROLE"),
                    action: () => {
                        let n = yt.getRole(e.id, t);
                        n &&
                            (o(),
                            B.dispatch({
                                type: "IMPERSONATE_UPDATE",
                                guildId: e.id,
                                data: { type: "ROLES", roles: { [t]: n } },
                            }));
                    },
                })
        );
    }
    function oC({ userId: e }) {
        return r(
            M.Menu,
            { navId: nt("user-context-menu"), onClose: st.closeContextMenu, "aria-label": "User Options" },
            r(M.MenuItem, {
                id: nt("copy-user-id"),
                label: Ae("COPY_ID_USER"),
                action: () => {
                    Po(e);
                },
            })
        );
    }
    var rC = C.wrap(eC);
    function is(e, t, o) {
        return fe((n) => r(rC, { modalProps: n, permissions: e, guild: t, header: o }));
    }
    a();
    l();
    Ur();
    se();
    re();
    G();
    S();
    var Cc = ee("role", "roleName", "roleRemoveButton", "roleNameOverflow", "root"),
        nC = ee("roleCircle", "dot", "dotBorderColor");
    function O4({ text: e, color: t, ...o }) {
        return r(
            "div",
            { ...o, className: L(Cc.role) },
            r(
                "div",
                { className: Cc.roleRemoveButton },
                r("span", { className: nC.roleCircle, style: { backgroundColor: t } })
            ),
            r("div", { className: Cc.roleName }, r(H, { className: Cc.roleNameOverflow, variant: "text-xs/medium" }, e))
        );
    }
    function iC({ roleName: e, roleColor: t }) {
        return r(f, null, r(H, { variant: "text-sm/medium" }, "Granted By"), r(O4, { text: e, color: t }));
    }
    function sC({ guild: e, guildMember: t, closePopout: o }) {
        let { permissionsSortOrder: n } = si.use(["permissionsSortOrder"]),
            i = ce(() => Lm(e), [e.id]),
            [s, c] = ce(() => {
                let u = [],
                    p = Om(e, t),
                    m = p.map((h) => ({ type: 0, ...h }));
                if (e.ownerId === t.userId) {
                    m.push({ type: 2, permissions: Object.values(pe).reduce((y, b) => y | b, 0n) });
                    let h = Ae("GUILD_OWNER") ?? "Server Owner";
                    u.push({ permission: h, roleName: "Owner", roleColor: "var(--primary-300)", rolePosition: 1 / 0 });
                }
                k4(p);
                for (let h of Object.values(pe))
                    for (let { permissions: y, colorString: b, position: x, name: P } of p)
                        if ((y & h) === h) {
                            u.push({
                                permission: i[String(h)].title,
                                roleName: P,
                                roleColor: b || "var(--primary-300)",
                                rolePosition: x,
                            });
                            break;
                        }
                return u.sort((h, y) => y.rolePosition - h.rolePosition), [m, u];
            }, [n]);
        return r(
            "div",
            null,
            r(
                "div",
                { className: nt("user-header-container") },
                r(Br, null, "Permissions"),
                r(
                    "div",
                    { className: nt("user-header-btns") },
                    r(V, { text: `Sorting by ${n === 0 ? "Highest Role" : "Lowest Role"}` }, (u) =>
                        r(
                            "div",
                            {
                                ...u,
                                className: nt("user-header-btn"),
                                role: "button",
                                tabIndex: 0,
                                onClick: () => {
                                    si.store.permissionsSortOrder = n === 0 ? 1 : 0;
                                },
                            },
                            r(
                                "svg",
                                {
                                    width: "24",
                                    height: "24",
                                    viewBox: "0 96 960 960",
                                    transform: n === 0 ? "scale(1 1)" : "scale(1 -1)",
                                },
                                r("path", {
                                    fill: "var(--text-default)",
                                    d: "M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z",
                                })
                            )
                        )
                    ),
                    r(V, { text: "Role Details" }, (u) =>
                        r(
                            "div",
                            {
                                ...u,
                                className: nt("user-header-btn"),
                                role: "button",
                                tabIndex: 0,
                                onClick: () => {
                                    o(), is(s, e, t.nick || R.getUser(t.userId).username);
                                },
                            },
                            r(
                                "svg",
                                { width: "24", height: "24", viewBox: "0 0 24 24" },
                                r("path", {
                                    fill: "var(--text-default)",
                                    d: "M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z",
                                })
                            )
                        )
                    )
                )
            ),
            c.length > 0 &&
                r(
                    "div",
                    { className: L(Cc.root) },
                    c.map(({ permission: u, roleColor: p, roleName: m }) =>
                        r(
                            V,
                            {
                                key: u,
                                text: r(iC, { roleName: m, roleColor: p }),
                                tooltipClassName: nt("granted-by-container"),
                                tooltipContentClassName: nt("granted-by-content"),
                            },
                            (h) => r(O4, { ...h, text: u, color: p })
                        )
                    )
                )
        );
    }
    var _4 = C.wrap(sC, { noop: !0 });
    var aC = ee("container", "scroller", "list");
    var si = w({
        permissionsSortOrder: {
            description: "The sort method used for defining which role grants an user a certain permission",
            type: 4,
            options: [
                { label: "Highest Role", value: 0, default: !0 },
                { label: "Lowest Role", value: 1 },
            ],
        },
    });
    function Ty(e, t, o) {
        return o === 0 && !Se.isMember(e, t)
            ? null
            : r(M.MenuItem, {
                  id: "perm-viewer-permissions",
                  label: "Permissions",
                  action: () => {
                      let n = Ce.getGuild(e),
                          { permissions: i, header: s } = Iu(o)
                              .returnType()
                              .with(0, () => {
                                  let c = Se.getMember(e, t),
                                      u = Om(n, c).map((p) => ({ type: 0, ...p }));
                                  return (
                                      n.ownerId === t &&
                                          u.push({
                                              type: 2,
                                              permissions: Object.values(pe).reduce((p, m) => p | m, 0n),
                                          }),
                                      { permissions: u, header: c.nick ?? R.getUser(c.userId).username }
                                  );
                              })
                              .with(1, () => {
                                  let c = Z.getChannel(t);
                                  return {
                                      permissions: _m(
                                          Object.values(c.permissionOverwrites).map(
                                              ({ id: p, allow: m, deny: h, type: y }) => ({
                                                  type: y,
                                                  id: p,
                                                  overwriteAllow: m,
                                                  overwriteDeny: h,
                                              })
                                          ),
                                          e
                                      ),
                                      header: c.name,
                                  };
                              })
                              .otherwise(() => ({
                                  permissions: yt.getSortedRoles(n.id).map((u) => ({ type: 0, ...u })),
                                  header: n.name,
                              }));
                      is(i, n, s);
                  },
              });
    }
    function Em(e, t) {
        return (o, n) => {
            if (!n || (t === 0 && !n.user) || (t === 2 && !n.guild) || (t === 1 && (!n.channel || !n.guild))) return;
            let i = _e(e, o),
                s = Iu(t)
                    .with(0, () => Ty(n.guildId, n.user.id, t))
                    .with(1, () => Ty(n.guild.id, n.channel.id, t))
                    .with(2, () => Ty(n.guild.id))
                    .otherwise(() => null);
            if (s != null) {
                if (i) return i.push(s);
                e === "roles" && n.guildId && o.splice(-1, 0, r(M.MenuGroup, null, s));
            }
        };
    }
    var da = v({
        name: "PermissionsViewer",
        description: "View the permissions a user or channel has, and the roles of a server",
        authors: [d.Nuckyz, d.Ven],
        settings: si,
        patches: [
            {
                find: "#{intl::COLLAPSE_ROLES}",
                replacement: {
                    match: /(?<=\i\.id\)\),\i\(\))(?=,\i\?)/,
                    replace: ",$self.ViewPermissionsButton(arguments[0])",
                },
            },
        ],
        ViewPermissionsButton: C.wrap(
            ({ className: e, guild: t, userId: o }) => {
                let n = Se.getMember(t.id, o);
                if (!n) return null;
                let i = at(null);
                return r(
                    Ps,
                    {
                        position: "bottom",
                        align: "center",
                        targetElementRef: i,
                        renderPopout: ({ closePopout: s }) =>
                            r(
                                yh,
                                { className: aC.container, style: { width: "500px" } },
                                r(_4, { guild: t, guildMember: n, closePopout: s })
                            ),
                    },
                    (s) =>
                        r(
                            Uo,
                            { text: "View Permissions" },
                            r(
                                F,
                                {
                                    ...s,
                                    ref: i,
                                    color: F.Colors.CUSTOM,
                                    look: F.Looks.FILLED,
                                    size: F.Sizes.NONE,
                                    className: L(e, "vc-permviewer-role-button"),
                                },
                                r(Wg, { height: "16", width: "16" })
                            )
                        )
                );
            },
            { noop: !0 }
        ),
        contextMenus: {
            "user-context": Em("roles", 0),
            "channel-context": Em(["mute-channel", "unmute-channel"], 1),
            "guild-context": Em("privacy", 2),
            "guild-header-popout": Em("privacy", 2),
        },
    });
    a();
    l();
    T();
    Fo();
    S();
    var ma = Nv(X0()),
        lC = 20,
        cC = 128,
        Bm = 10,
        uC = rn(() =>
            Promise.all(
                Array.from({ length: Bm }, (e, t) =>
                    E4(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)
                )
            )
        );
    function E4(e) {
        let t = e instanceof File,
            o = t ? URL.createObjectURL(e) : e;
        return new Promise((n, i) => {
            let s = new Image();
            (s.onload = () => {
                t && URL.revokeObjectURL(o), n(s);
            }),
                (s.onerror = (c) => i(Error(`An error occurred while loading ${o}. Check the console for more info.`))),
                (s.crossOrigin = "Anonymous"),
                (s.src = o);
        });
    }
    async function pC(e, t, o) {
        for (let n of e)
            switch (n.name) {
                case "image":
                    let i = Bn.getUpload(t.channel.id, n.name, Gt.SlashCommand);
                    if (i) {
                        if (!i.isImage) throw (Mi.clearAll(t.channel.id, Gt.SlashCommand), "Upload is not an image");
                        return i.item.file;
                    }
                    break;
                case "url":
                    return n.value;
                case "user":
                    try {
                        return (await lo.getUser(n.value))
                            .getAvatarURL(o ? void 0 : t.guild?.id, 2048)
                            .replace(/\?size=\d+$/, "?size=2048");
                    } catch (s) {
                        throw (
                            (console.error(
                                `[petpet] Failed to fetch user
`,
                                s
                            ),
                            Mi.clearAll(t.channel.id, Gt.SlashCommand),
                            "Failed to fetch user. Check the console for more info.")
                        );
                    }
            }
        return Mi.clearAll(t.channel.id, Gt.SlashCommand), null;
    }
    function dC(e, t, o) {
        return ((e << 8) & 63488) | ((t << 3) & 2016) | (o >> 3);
    }
    function mC(e, t, o, n) {
        let i = new Uint8Array(Math.floor(e.length / 4));
        for (let s = 0; s < i.length; s += 1) {
            let c = e[4 * s],
                u = e[4 * s + 1],
                p = e[4 * s + 2];
            if (e[4 * s + 3] < n) i[s] = 255;
            else {
                let h = dC(c, u, p);
                i[s] = h in o ? o[h] : (o[h] = (0, ma.nearestColorIndex)(t, [c, u, p]));
            }
        }
        return i;
    }
    var Um = v({
        name: "petpet",
        description: "Adds a /petpet slash command to create headpet gifs from any image",
        authors: [d.Ven, d.u32],
        commands: [
            {
                inputType: 0,
                name: "petpet",
                description: "Create a petpet gif. You can only specify one of the image options",
                options: [
                    {
                        name: "delay",
                        description:
                            "The delay between each frame in ms. Rounded to nearest 10ms. Defaults to the minimum value of 20.",
                        type: 4,
                    },
                    {
                        name: "resolution",
                        description:
                            "Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",
                        type: 4,
                    },
                    { name: "image", description: "Image attachment to use", type: 11 },
                    { name: "url", description: "URL to fetch image from", type: 3 },
                    { name: "user", description: "User whose avatar to use as image", type: 6 },
                    {
                        name: "no-server-pfp",
                        description:
                            "Use the normal avatar instead of the server specific one when using the 'user' option",
                        type: 5,
                    },
                ],
                execute: async (e, t) => {
                    let o = await uC(),
                        n = Ao(e, "no-server-pfp", !1);
                    try {
                        var i = await pC(e, t, n);
                        if (!i) throw "No Image specified!";
                    } catch (D) {
                        Mi.clearAll(t.channel.id, Gt.SlashCommand), rt(t.channel.id, { content: String(D) });
                        return;
                    }
                    let s = await E4(i),
                        c = Ao(e, "delay", lC);
                    if (c < 20) return rt(t.channel.id, { content: "Delay must be at least 20." });
                    let u = Ao(e, "resolution", cC),
                        p = (0, ma.GIFEncoder)(),
                        m = Math.min(120, u),
                        h = document.createElement("canvas");
                    (h.width = u), (h.height = Math.max(u, 2 * m));
                    let y = h.getContext("2d", { willReadFrequently: !0 });
                    Mi.clearAll(t.channel.id, Gt.SlashCommand),
                        y.drawImage(s, 0, m, 0.8 * m, 0.8 * m),
                        y.drawImage(o[0], 0, 0, m, m);
                    let { data: b } = y.getImageData(0, 0, m, 2 * m),
                        x = (0, ma.quantize)(b, 255),
                        P = new Array(2 ** 16);
                    for (let D = 0; D < Bm; D++) {
                        y.clearRect(0, 0, h.width, h.height);
                        let A = D < Bm / 2 ? D : Bm - D,
                            E = 0.8 + A * 0.02,
                            q = 0.8 - A * 0.05,
                            z = (1 - E) * 0.5 + 0.1,
                            K = 1 - q - 0.08;
                        y.drawImage(s, z * u, K * u, E * u, q * u), y.drawImage(o[D], 0, 0, u, u);
                        let { data: ue } = y.getImageData(0, 0, u, u),
                            j = mC(ue, x, P, 1);
                        p.writeFrame(j, u, u, {
                            transparent: !0,
                            transparentIndex: 255,
                            delay: c,
                            palette: D === 0 ? x : void 0,
                        });
                    }
                    p.finish();
                    let I = new File([p.bytesView()], "petpet.gif", { type: "image/gif" });
                    setTimeout(() => hl.promptToUpload([I], t.channel, Gt.ChannelMessage), 10);
                },
            },
        ],
    });
    a();
    l();
    T();
    S();
    var B4 = w({
            loop: { description: "Whether to make the PiP video loop or not", type: 3, default: !0, restartNeeded: !1 },
        }),
        Fm = v({
            name: "PictureInPicture",
            description: "Adds picture in picture to videos (next to the Download button)",
            authors: [d.Lumap],
            settings: B4,
            patches: [
                {
                    find: '["VIDEO","CLIP","AUDIO"]',
                    replacement: {
                        match: /(\[\i>0&&\i\.length>0.{0,150}?children:)(\i.slice\(\i\))(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/,
                        replace: (e, t, o, n, i) => `${t}[${n}&&${i}&&$self.PictureInPictureButton(),...${o}]`,
                    },
                },
            ],
            PictureInPictureButton: C.wrap(
                () =>
                    r(V, { text: "Toggle Picture in Picture" }, (e) =>
                        r(
                            "div",
                            {
                                ...e,
                                className: "vc-pip-button",
                                role: "button",
                                style: {
                                    cursor: "pointer",
                                    paddingTop: "4px",
                                    paddingLeft: "4px",
                                    paddingRight: "4px",
                                },
                                onClick: (t) => {
                                    let o = t.currentTarget.parentNode.parentNode.querySelector("video"),
                                        n = document.body.appendChild(o.cloneNode(!0));
                                    (n.loop = B4.store.loop),
                                        (n.style.display = "none"),
                                        (n.onleavepictureinpicture = () => n.remove());
                                    function i() {
                                        (n.currentTime = o.currentTime),
                                            n.requestPictureInPicture(),
                                            o.pause(),
                                            n.play();
                                    }
                                    n.readyState === 4 ? i() : (n.onloadedmetadata = i);
                                },
                            },
                            r(
                                "svg",
                                { width: "24px", height: "24px", viewBox: "0 0 24 24" },
                                r("path", {
                                    fill: "currentColor",
                                    d: "M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z",
                                })
                            )
                        )
                    ),
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    re();
    G();
    S();
    a();
    l();
    a();
    l();
    pt();
    S();
    var U4,
        Nt = [];
    async function wy() {
        let e = R.getCurrentUser()?.id;
        e != null && ((Nt = po.store.userBasedCategoryList[e] ??= []), U4?.());
    }
    function F4() {
        (U4 = Qo()), po.use(["pinOrder", "canCollapseDmSection", "dmSectionCollapsed", "userBasedCategoryList"]);
    }
    function $4(e) {
        return Nt.find((t) => t.id === e);
    }
    function Ac(e) {
        return Nt[e];
    }
    function G4(e) {
        Nt.push(e);
    }
    function H4(e, t) {
        let o = Nt.find((n) => n.id === t);
        o != null && (o.channels.includes(e) || o.channels.push(e));
    }
    function z4(e) {
        let t = Nt.find((o) => o.channels.includes(e));
        t != null && (t.channels = t.channels.filter((o) => o !== e));
    }
    function W4(e) {
        let t = Nt.findIndex((o) => o.id === e);
        t !== -1 && Nt.splice(t, 1);
    }
    function j4(e, t = !0) {
        let o = Nt.find((n) => n.id === e);
        o != null && (o.collapsed = t);
    }
    function Rc(e) {
        return Nt.some((t) => t.channels.includes(e));
    }
    function $m() {
        return Nt.length;
    }
    function q4() {
        if (po.store.pinOrder === 0) {
            let e = Cy.getPrivateChannelIds();
            return Nt.filter((t) => !t.collapsed).flatMap((t) => e.filter((o) => t.channels.includes(o)));
        }
        return Nt.filter((e) => !e.collapsed).flatMap((e) => e.channels);
    }
    function K4() {
        return Nt.reduce((e, t) => (e.push(t.channels.length === 0 ? 1 : t.channels.length), e), []);
    }
    var Y4 = (e, t, o) => {
            let n = e[t],
                i = e[t + o];
            return n && i;
        },
        Nc = (e, t) => {
            let o = Nt.findIndex((n) => n.id === e);
            return Y4(Nt, o, t);
        },
        Z4 = (e) => Nc(e, -1) || Nc(e, 1),
        Iy = (e, t) => {
            let o = Nt.find((i) => i.channels.includes(e));
            if (o == null) return !1;
            let n = o.channels.indexOf(e);
            return Y4(o.channels, n, t);
        };
    function Q4(e, t, o) {
        !e[t] || !e[o] || ([e[t], e[o]] = [e[o], e[t]]);
    }
    function Py(e, t) {
        let o = Nt.findIndex((i) => i.id === e),
            n = o + t;
        Q4(Nt, o, n);
    }
    function My(e, t) {
        let o = Nt.find((s) => s.channels.includes(e));
        if (o == null) return;
        let n = o.channels.indexOf(e),
            i = n + t;
        Q4(o.channels, n, i);
    }
    S();
    a();
    l();
    Qt();
    a();
    l();
    var X4 = [
        1752220, 3066993, 3447003, 10181046, 15277667, 15844367, 15105570, 15158332, 9807270, 6323595, 1146986, 2067276,
        2123412, 7419530, 11342935, 12745742, 11027200, 10038562, 9936031, 5533306,
    ];
    Pe();
    Oe();
    G();
    S();
    var gC = ge('id:"color-picker"'),
        Ny = xi(['type:"USER_SETTINGS_MODAL_OPEN"']),
        hC = Y("vc-pindms-modal-");
    function yC(e, t) {
        return ce(() => {
            if (e) return $4(e);
            if (t)
                return {
                    id: J.genId(),
                    name: `Pin Category ${$m() + 1}`,
                    color: 10070709,
                    collapsed: !1,
                    channels: [t],
                };
        }, [e, t]);
    }
    function vC({ categoryId: e, modalProps: t, initialChannelId: o }) {
        let n = yC(e, o);
        if (!n) return null;
        let [i, s] = k(n.name),
            [c, u] = k(n.color),
            p = (m) => {
                m.preventDefault(), (n.name = i), (n.color = c), e || G4(n), t.onClose();
            };
        return r(
            ve,
            { ...t },
            r(
                Re,
                null,
                r(H, { variant: "heading-lg/semibold", style: { flexGrow: 1 } }, e ? "Edit" : "New", " Category")
            ),
            r(
                "form",
                { onSubmit: p },
                r(
                    Ie,
                    { className: hC("content") },
                    r("section", null, r(N.FormTitle, null, "Name"), r(ht, { value: i, onChange: (m) => s(m) })),
                    r(Fe, null),
                    r(
                        "section",
                        null,
                        r(N.FormTitle, null, "Color"),
                        r(gC, {
                            key: n.id,
                            defaultColor: 10070709,
                            colors: X4,
                            onChange: (m) => u(m),
                            value: c,
                            renderDefaultButton: () => null,
                            renderCustomButton: () =>
                                r(Ln, { color: c, onChange: (m) => u(m), key: n.id, showEyeDropper: !1 }),
                        })
                    )
                ),
                r(St, null, r(F, { type: "submit", onClick: p, disabled: !i }, e ? "Save" : "Create"))
            )
        );
    }
    var Gm = (e, t) =>
        xl(async () => (await Ny(), (o) => r(vC, { categoryId: e, modalProps: o, initialChannelId: t })));
    function V4(e) {
        let t = Rc(e);
        return r(
            M.MenuItem,
            { id: "pin-dm", label: "Pin DMs" },
            !t &&
                r(
                    f,
                    null,
                    r(M.MenuItem, {
                        id: "vc-add-category",
                        label: "Add Category",
                        color: "brand",
                        action: () => Gm(null, e),
                    }),
                    r(M.MenuSeparator, null),
                    Nt.map((o) =>
                        r(M.MenuItem, {
                            key: o.id,
                            id: `pin-category-${o.id}`,
                            label: o.name,
                            action: () => H4(e, o.id),
                        })
                    )
                ),
            t &&
                r(
                    f,
                    null,
                    r(M.MenuItem, { id: "unpin-dm", label: "Unpin DM", color: "danger", action: () => z4(e) }),
                    po.store.pinOrder === 1 &&
                        Iy(e, -1) &&
                        r(M.MenuItem, { id: "move-up", label: "Move Up", action: () => My(e, -1) }),
                    po.store.pinOrder === 1 &&
                        Iy(e, 1) &&
                        r(M.MenuItem, { id: "move-down", label: "Move Down", action: () => My(e, 1) })
                )
        );
    }
    var bC = (e, t) => {
            _e("leave-channel", e)?.unshift(V4(t.channel.id));
        },
        SC = (e, t) => {
            let o = _e("close-dm", e);
            if (o) {
                let n = o.findIndex((i) => i?.props?.id === "close-dm");
                o.splice(n, 0, V4(t.channel.id));
            }
        },
        e5 = { "gdm-context": bC, "user-context": SC };
    var t5 = ee("privateChannelsHeaderContainer", "headerText"),
        Cy = it("PrivateChannelSortStore"),
        TC;
    var po = w({
            pinOrder: {
                type: 4,
                description: "Which order should pinned DMs be displayed in?",
                options: [
                    { label: "Most recent message", value: 0, default: !0 },
                    { label: "Custom (right click channels to reorder)", value: 1 },
                ],
            },
            canCollapseDmSection: {
                type: 3,
                description: "Allow uncategorised DMs section to be collapsable",
                default: !1,
            },
            dmSectionCollapsed: { type: 3, description: "Collapse DM section", default: !1, hidden: !0 },
            userBasedCategoryList: { type: 7, default: {} },
        }),
        Hm = v({
            name: "PinDMs",
            description:
                "Allows you to pin private channels to the top of your DM list. To pin/unpin or re-order pins, right click DMs",
            authors: [d.Ven, d.Aria],
            settings: po,
            contextMenus: e5,
            patches: [
                {
                    find: '"dm-quick-launcher"===',
                    replacement: [
                        {
                            match: /(?<=channels:\i,)privateChannelIds:(\i)(?=,listRef:)/,
                            replace: "privateChannelIds:$1.filter(c=>!$self.isPinned(c))",
                        },
                        {
                            match: /(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,
                            replace: "...$self.makeProps(this,{$&})",
                        },
                        {
                            match: /renderRow(?:",|=)(\i)=>{(?<=renderDM(?:",|=).+?(\i\.\i),\{channel:.+?)/,
                            replace:
                                "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();",
                        },
                        {
                            match: /renderSection(?:",|=)(\i)=>{/,
                            replace: "$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);",
                        },
                        { match: /renderSection(?:",|=).{0,300}?"span",{/, replace: "$&...$self.makeSpanProps()," },
                        {
                            match: /(\.startsWith\("section-divider"\).+?return 1===)(\i)/,
                            replace: "$1($2-$self.categoryLen())",
                        },
                        {
                            match: /getRowHeight(?:",|=)\((\i),(\i)\)=>{/,
                            replace: "$&if($self.isChannelHidden($1,$2))return 0;",
                        },
                        {
                            match: /(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,
                            replace:
                                "$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)",
                        },
                        {
                            match: /(scrollToChannel\(\i\){.{1,300})(this\.props\.privateChannelIds)/,
                            replace: "$1[...$2,...$self.getAllUncollapsedChannels()]",
                        },
                    ],
                },
                {
                    find: '.FRIENDS},"friends"',
                    replacement: { match: /let{showLibrary:\i,/, replace: "$self.usePinnedDms();$&" },
                },
                {
                    find: ".APPLICATION_STORE&&",
                    replacement: {
                        match: /(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,
                        replace: "$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))",
                    },
                },
                {
                    find: "=()=>!1,ensureChatIsVisible:",
                    replacement: {
                        match: /(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,
                        replace: "$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))",
                    },
                },
            ],
            sections: null,
            set _instance(e) {
                (this.instance = e), (TC = e);
            },
            startAt: "WebpackReady",
            start: wy,
            flux: { CONNECTION_OPEN: wy },
            usePinnedDms: F4,
            isPinned: Rc,
            categoryLen: $m,
            getSections: K4,
            getAllUncollapsedChannels: q4,
            requireSettingsMenu: Ny,
            makeProps(e, { sections: t }) {
                return (
                    (this._instance = e),
                    (this.sections = t),
                    this.sections.splice(1, 0, ...this.getSections()),
                    this.instance?.props?.privateChannelIds?.length === 0 &&
                        (this.sections[this.sections.length - 1] = 0),
                    { sections: this.sections, chunkSize: this.getChunkSize() }
                );
            },
            makeSpanProps() {
                return po.store.canCollapseDmSection
                    ? { onClick: () => this.collapseDMList(), role: "button", style: { cursor: "pointer" } }
                    : void 0;
            },
            getChunkSize() {
                let e = this.getSections();
                return (e.length * 40 + e.reduce((o, n) => (o += n + 44), 0) + 256) * 1.5;
            },
            isCategoryIndex(e) {
                return this.sections && e > 0 && e < this.sections.length - 1;
            },
            isChannelIndex(e, t) {
                if (po.store.canCollapseDmSection && po.store.dmSectionCollapsed && e !== 0) return !0;
                let o = Ac(e - 1);
                return this.isCategoryIndex(e) && (o?.channels?.length === 0 || o?.channels[t]);
            },
            collapseDMList() {
                po.store.dmSectionCollapsed = !po.store.dmSectionCollapsed;
            },
            isChannelHidden(e, t) {
                if (e === 0) return !1;
                if (po.store.canCollapseDmSection && po.store.dmSectionCollapsed && this.getSections().length + 1 === e)
                    return !0;
                if (!this.instance || !this.isChannelIndex(e, t)) return !1;
                let o = Ac(e - 1);
                return o ? o.collapsed && this.instance.props.selectedChannelId !== this.getCategoryChannels(o)[t] : !1;
            },
            getScrollOffset(e, t, o, n, i) {
                return Rc(e)
                    ? t * (this.getAllUncollapsedChannels().indexOf(e) + n) + o
                    : (t + o) * 2 + t * this.getAllUncollapsedChannels().length + i;
            },
            renderCategory: C.wrap(
                ({ section: e }) => {
                    let t = Ac(e - 1);
                    return t
                        ? r(
                              yo,
                              {
                                  onClick: () => j4(t.id, !t.collapsed),
                                  onContextMenu: (o) => {
                                      st.openContextMenu(o, () =>
                                          r(
                                              M.Menu,
                                              {
                                                  navId: "vc-pindms-header-menu",
                                                  onClose: () => B.dispatch({ type: "CONTEXT_MENU_CLOSE" }),
                                                  color: "danger",
                                                  "aria-label": "Pin DMs Category Menu",
                                              },
                                              r(M.MenuItem, {
                                                  id: "vc-pindms-edit-category",
                                                  label: "Edit Category",
                                                  action: () => Gm(t.id, null),
                                              }),
                                              Z4(t.id) &&
                                                  r(
                                                      f,
                                                      null,
                                                      Nc(t.id, -1) &&
                                                          r(M.MenuItem, {
                                                              id: "vc-pindms-move-category-up",
                                                              label: "Move Up",
                                                              action: () => Py(t.id, -1),
                                                          }),
                                                      Nc(t.id, 1) &&
                                                          r(M.MenuItem, {
                                                              id: "vc-pindms-move-category-down",
                                                              label: "Move Down",
                                                              action: () => Py(t.id, 1),
                                                          })
                                                  ),
                                              r(M.MenuSeparator, null),
                                              r(M.MenuItem, {
                                                  id: "vc-pindms-delete-category",
                                                  color: "danger",
                                                  label: "Delete Category",
                                                  action: () => W4(t.id),
                                              })
                                          )
                                      );
                                  },
                              },
                              r(
                                  "h2",
                                  {
                                      className: L(
                                          t5.privateChannelsHeaderContainer,
                                          "vc-pindms-section-container",
                                          t.collapsed ? "vc-pindms-collapsed" : ""
                                      ),
                                      style: { color: `#${t.color.toString(16).padStart(6, "0")}` },
                                  },
                                  r("span", { className: t5.headerText }, t?.name ?? "uh oh"),
                                  r(
                                      "svg",
                                      {
                                          className: "vc-pindms-collapse-icon",
                                          "aria-hidden": "true",
                                          role: "img",
                                          xmlns: "http://www.w3.org/2000/svg",
                                          width: "24",
                                          height: "24",
                                          fill: "none",
                                          viewBox: "0 0 24 24",
                                      },
                                      r("path", {
                                          fill: "currentColor",
                                          d: "M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z",
                                      })
                                  )
                              )
                          )
                        : null;
                },
                { noop: !0 }
            ),
            renderChannel(e, t, o) {
                return C.wrap(
                    () => {
                        let { channel: n, category: i } = this.getChannel(e, t, this.instance.props.channels);
                        return !n || !i || this.isChannelHidden(e, t)
                            ? null
                            : r(o, { channel: n, selected: this.instance.props.selectedChannelId === n.id }, n.id);
                    },
                    { noop: !0 }
                );
            },
            getChannel(e, t, o) {
                let n = Ac(e - 1);
                if (!n) return { channel: null, category: null };
                let i = this.getCategoryChannels(n)[t];
                return { channel: o[i], category: n };
            },
            getCategoryChannels(e) {
                return e.channels.length === 0
                    ? []
                    : po.store.pinOrder === 0
                      ? Cy.getPrivateChannelIds().filter((t) => e.channels.includes(t))
                      : (e?.channels ?? []);
            },
        });
    a();
    l();
    T();
    var zm = v({
        name: "PlainFolderIcon",
        description: "Dont show the small guild icons in folders",
        authors: [d.botato],
        patches: [
            {
                find: "#{intl::GUILD_FOLDER_TOOLTIP_A11Y_LABEL}",
                replacement: [
                    {
                        match: /\.slice\(0,4\).+?\]:(\i),\[\i\.\i\]:!\1/,
                        replace: (e, t) => `${e},"vc-plainFolderIcon-plain":!${t}`,
                    },
                ],
            },
        ],
    });
    a();
    l();
    T();
    G();
    S();
    var wC = it("SessionsStore"),
        { useStatusFillColor: IC } = Ye([".5625*", "translate"], { useStatusFillColor: _.byCode(".hex") }),
        PC = { embedded: "Console", vr: "VR" };
    function kc(e, t) {
        return ({ color: o, tooltip: n, small: i }) =>
            r(V, { text: n }, (s) =>
                r(
                    "svg",
                    {
                        ...s,
                        height: (t?.height ?? 20) - (i ? 3 : 0),
                        width: (t?.width ?? 20) - (i ? 3 : 0),
                        viewBox: t?.viewBox ?? "0 0 24 24",
                        fill: o,
                    },
                    r("path", { d: e })
                )
            );
    }
    var o5 = {
        desktop: kc(
            "M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"
        ),
        web: kc(
            "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"
        ),
        mobile: kc(
            "M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",
            { viewBox: "0 0 1000 1500", height: 17, width: 17 }
        ),
        embedded: kc(
            "M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",
            { viewBox: "0 0 50 50" }
        ),
        vr: kc(
            "M8.46 8.64a1 1 0 0 1 1 1c0 .44-.3.8-.72.92l-.11.07c-.08.06-.2.19-.2.41a.99.99 0 0 1-.98.86h-.06a1 1 0 0 1-.94-1.05l.02-.32c.05-1.06.92-1.9 1.99-1.9ZM15.55 5a5.5 5.5 0 0 1 5.15 3.67h.3a2 2 0 0 1 2 2v3.18a2 2 0 0 1-2 1.99h-.2A4.54 4.54 0 0 1 16.55 19a4.45 4.45 0 0 1-3.6-1.83 1.2 1.2 0 0 0-1.9 0 4.44 4.44 0 0 1-3.9 1.82 4.54 4.54 0 0 1-3.94-3.15H3a2 2 0 0 1-2-2v-3.18c0-1.1.9-1.99 2-1.99h.3A5.5 5.5 0 0 1 8.46 5h7.09Zm-7.1 2C6.6 7 5.06 8.5 4.97 10.41l-.02.66v3.18c0 1.43 1.05 2.66 2.34 2.74.85.06 1.63-.32 2.14-1.01a3.2 3.2 0 0 1 2.57-1.3c1 0 1.97.48 2.57 1.3.5.69 1.3 1.08 2.14 1.01 1.3-.08 2.34-1.31 2.34-2.74l-.02-3.84a3.54 3.54 0 0 0-3.49-3.43H8.45Z",
            { viewBox: "0 4 24 16", height: 20, width: 20 }
        ),
    };
    function MC(e) {
        return PC[e] ?? e.charAt(0).toUpperCase() + e.slice(1);
    }
    var i5 = ({ platform: e, status: t, small: o }) => {
        let n = MC(e),
            i = o5[e] ?? o5.desktop;
        return r(i, { color: IC(t), tooltip: n, small: o });
    };
    function s5(e) {
        if (e.id === Kt.getId()) {
            let t = wC.getSessions();
            if (typeof t != "object") return null;
            let o = Object.values(t).sort(({ status: s }, { status: c }) =>
                    s === c ? 0 : s === "online" ? 1 : c === "online" ? -1 : s === "idle" ? 1 : c === "idle" ? -1 : 0
                ),
                n = Object.values(o).reduce(
                    (s, c) => (c.clientInfo.client !== "unknown" && (s[c.clientInfo.client] = c.status), s),
                    {}
                ),
                { clientStatuses: i } = no.getState();
            i[Kt.getId()] = n;
        }
    }
    function CC({ userId: e }) {
        let t = R.getUser(e);
        if (!t || t.bot) return [];
        s5(t);
        let o = no.getClientStatus(t.id);
        return o
            ? Object.entries(o).map(([n, i]) => ({
                  key: `vc-platform-indicator-${n}`,
                  component: () =>
                      r(
                          "span",
                          { className: "vc-platform-indicator" },
                          r(i5, { key: n, platform: n, status: i, small: !1 })
                      ),
              }))
            : [];
    }
    var r5 = ({ user: e, small: t = !1 }) => {
            s5(e);
            let o = ie([no], () => no.getClientStatus(e.id));
            if (!o) return null;
            let n = Object.entries(o).map(([i, s]) => r(i5, { key: i, platform: i, status: s, small: t }));
            return n.length ? r("span", { className: "vc-platform-indicator", style: { gap: "2px" } }, n) : null;
        },
        n5 = { getBadges: CC, position: 0 },
        Ay = {
            list: {
                description: "In the member list",
                onEnable: () =>
                    Oi("platform-indicator", ({ user: e }) => (e && !e.bot ? r(r5, { user: e, small: !0 }) : null)),
                onDisable: () => _i("platform-indicator"),
            },
            badges: { description: "In user profiles, as badges", onEnable: () => wl(n5), onDisable: () => Il(n5) },
            messages: {
                description: "Inside messages",
                onEnable: () =>
                    Ei("platform-indicator", (e) => {
                        let t = e.message?.author;
                        return t && !t.bot ? r(r5, { user: e.message?.author }) : null;
                    }),
                onDisable: () => Bi("platform-indicator"),
            },
        },
        Wm = v({
            name: "PlatformIndicators",
            description: "Adds platform indicators (Desktop, Mobile, Web...) to users",
            authors: [d.kemo, d.TheSun, d.Nuckyz, d.Ven],
            dependencies: ["MessageDecorationsAPI", "MemberListDecoratorsAPI"],
            start() {
                let e = W.plugins.PlatformIndicators;
                Object.entries(Ay).forEach(([t, o]) => {
                    e[t] && o.onEnable();
                });
            },
            stop() {
                Object.entries(Ay).forEach(([e, t]) => {
                    t.onDisable();
                });
            },
            patches: [
                {
                    find: ".Masks.STATUS_ONLINE_MOBILE",
                    predicate: () => W.plugins.PlatformIndicators.colorMobileIndicator,
                    replacement: [
                        {
                            match: /\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,
                            replace: ".STATUS_TYPING;$1;switch",
                        },
                        { match: /switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/, replace: "$1;$&" },
                    ],
                },
                {
                    find: ".AVATAR_STATUS_MOBILE_16;",
                    predicate: () => W.plugins.PlatformIndicators.colorMobileIndicator,
                    replacement: [
                        { match: /\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/, replace: "" },
                        { match: /(?<=\(\i\.status,)(\i)(?=,\{.{0,15}isMobile:(\i))/, replace: '$2?"online":$1' },
                        { match: /(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/, replace: "" },
                    ],
                },
                {
                    find: "}isMobileOnline(",
                    predicate: () => W.plugins.PlatformIndicators.colorMobileIndicator,
                    replacement: { match: /(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/, replace: "!= null" },
                },
            ],
            options: {
                ...Object.fromEntries(
                    Object.entries(Ay).map(([e, t]) => [
                        e,
                        {
                            type: 3,
                            description: `Show indicators ${t.description.toLowerCase()}`,
                            restartNeeded: !0,
                            default: !0,
                        },
                    ])
                ),
                colorMobileIndicator: {
                    type: 3,
                    description: "Whether to make the mobile indicator match the color of the user status.",
                    default: !0,
                    restartNeeded: !0,
                },
            },
        });
    a();
    l();
    T();
    S();
    var a5 = (e) => As.getDraft(e, Gt.ChannelMessage),
        NC = (e) =>
            new Promise((t) => {
                let o = new Image();
                (o.onload = () => t({ width: o.width, height: o.height })), (o.onerror = () => t(null)), (o.src = e);
            }),
        AC = async (e) =>
            await Promise.all(
                Bn.getUploads(e, Gt.ChannelMessage).map(async (t) => {
                    let {
                            isImage: o,
                            filename: n,
                            spoiler: i,
                            item: { file: s },
                        } = t,
                        c = URL.createObjectURL(s),
                        u = {
                            id: Ll(),
                            filename: i ? "SPOILER_" + n : n,
                            content_type: void 0,
                            size: t.getSize(),
                            spoiler: i,
                            url: c + "#",
                            proxy_url: c + "#",
                        };
                    if (o) {
                        let p = await NC(c);
                        if (!p) return u;
                        (u.width = p.width), (u.height = p.height);
                    }
                    return u;
                })
            ),
        l5 = ({ height: e = 20, width: t = 20, className: o }) =>
            r(
                "svg",
                {
                    fill: "currentColor",
                    fillRule: "evenodd",
                    width: t,
                    height: e,
                    className: o,
                    viewBox: "0 0 24 24",
                    style: { scale: "1.096", translate: "0 -1px" },
                },
                r("path", {
                    d: "M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08ZM15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z",
                })
            ),
        RC = ({ isAnyChat: e, isEmpty: t, type: { attachments: o }, channel: { id: n } }) => {
            let i = ie([As], () => a5(n));
            if (!e) return null;
            let s = o && Bn.getUploads(n, Gt.ChannelMessage).length > 0;
            return !(!t && i?.length > 0) && !s
                ? null
                : r(
                      Sr,
                      {
                          tooltip: "Preview Message",
                          onClick: async () =>
                              rt(n, {
                                  content: a5(n),
                                  author: R.getCurrentUser(),
                                  attachments: s ? await AC(n) : void 0,
                              }),
                          buttonProps: { style: { translate: "0 2px" } },
                      },
                      r(l5, null)
                  );
        },
        jm = v({
            name: "PreviewMessage",
            description: "Lets you preview your message before sending it.",
            authors: [d.Aria],
            startAt: "Init",
            chatBarButton: { icon: l5, render: RC },
        });
    a();
    l();
    T();
    se();
    S();
    function c5({ height: e = 24, width: t = 24, className: o = "icon" }) {
        return r(
            "svg",
            { className: o, height: e, width: t, viewBox: "0 0 24 24", fill: "currentColor" },
            r("path", {
                d: "M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z",
            })
        );
    }
    var qm = v({
        name: "QuickMention",
        authors: [d.kemo],
        description: "Adds a quick mention button to the message actions bar",
        messagePopoverButton: {
            icon: c5,
            render(e) {
                let t = Z.getChannel(e.channel_id);
                return t.guild_id && !Te.can(pe.SEND_MESSAGES, t)
                    ? null
                    : {
                          label: "Quick Mention",
                          icon: c5,
                          message: e,
                          channel: t,
                          onClick: () => Hn(`<@${e.author.id}> `),
                      };
            },
        },
    });
    a();
    l();
    T();
    S();
    var Dc = null,
        Lc = null;
    var Ry = w({
            shouldMention: {
                type: 4,
                description: "Ping reply by default",
                options: [
                    { label: "Follow NoReplyMention plugin (if enabled)", value: 2, default: !0 },
                    { label: "Enabled", value: 1 },
                    { label: "Disabled", value: 0 },
                ],
            },
            ignoreBlockedAndIgnored: {
                type: 3,
                description: "Ignore messages by blocked/ignored users when navigating",
                default: !0,
            },
        }),
        Km = v({
            name: "QuickReply",
            authors: [d.fawn, d.Ven, d.pylix],
            description: "Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",
            settings: Ry,
            start() {
                document.addEventListener("keydown", u5);
            },
            stop() {
                document.removeEventListener("keydown", u5);
            },
            flux: {
                DELETE_PENDING_REPLY() {
                    Dc = null;
                },
                MESSAGE_END_EDIT() {
                    Lc = null;
                },
                CHANNEL_SELECT() {
                    (Dc = null), (Lc = null);
                },
                MESSAGE_START_EDIT: kC,
                CREATE_PENDING_REPLY: DC,
            },
        });
    function kC({ messageId: e, _isQuickEdit: t }) {
        t || (Lc = e);
    }
    function DC({ message: e, _isQuickReply: t }) {
        t || (Dc = e.id);
    }
    var LC = (e) => (Bo ? e.metaKey : e.ctrlKey),
        OC = (e) => e.altKey || (!Bo && e.metaKey);
    function u5(e) {
        let t = e.key === "ArrowUp";
        (!t && e.key !== "ArrowDown") || !LC(e) || OC(e) || (e.preventDefault(), e.shiftKey ? BC(t) : EC(t));
    }
    function p5(e, t) {
        let o = document.getElementById("message-content-" + t);
        if (!o) return;
        let n = Math.max(document.documentElement.clientHeight, unsafeWindow.innerHeight),
            i = o.getBoundingClientRect();
        (i.bottom < 150 || i.top - n >= -150) &&
            bo.jumpToMessage({ channelId: e, messageId: t, flash: !1, jumpType: "INSTANT" });
    }
    function d5(e, t) {
        let o = qt.getMessages(Le.getChannelId())._array,
            n = R.getCurrentUser().id,
            i = ke(ns.name);
        o = o.filter(
            (c) =>
                !(
                    c.deleted ||
                    (!t && c.author.id !== n) ||
                    !bl.REPLYABLE.has(c.type) ||
                    c.hasFlag(64) ||
                    (Ry.store.ignoreBlockedAndIgnored && we.isBlockedOrIgnored(c.author.id)) ||
                    (i && ns.shouldIgnoreMessage(c))
                )
        );
        let s = (c) => {
            if (c === null) return o[o.length - 1];
            let u = o.findIndex((m) => m.id === c);
            if (u === -1) return o[o.length - 1];
            let p = e ? u - 1 : u + 1;
            return o[p] ?? null;
        };
        if (t) {
            let c = s(Dc);
            return (Dc = c?.id ?? null), c;
        } else {
            let c = s(Lc);
            return (Lc = c?.id ?? null), c;
        }
    }
    function _C(e) {
        switch (Ry.store.shouldMention) {
            case 2:
                return ke(Qr.name) ? Qr.shouldMention(e, !1) : !0;
            case 0:
                return !1;
            default:
                return !0;
        }
    }
    function EC(e) {
        let t = Z.getChannel(Le.getChannelId());
        if (t.guild_id && !Te.can(pe.SEND_MESSAGES, t)) return;
        let o = d5(e, !0);
        if (!o) return void B.dispatch({ type: "DELETE_PENDING_REPLY", channelId: Le.getChannelId() });
        let n = Z.getChannel(o.channel_id),
            i = R.getCurrentUser().id;
        B.dispatch({
            type: "CREATE_PENDING_REPLY",
            channel: n,
            message: o,
            shouldMention: _C(o),
            showMentionToggle: !n.isPrivate() && o.author.id !== i,
            _isQuickReply: !0,
        }),
            Io.dispatchToLastSubscribed("TEXTAREA_FOCUS"),
            p5(n.id, o.id);
    }
    function BC(e) {
        let t = Z.getChannel(Le.getChannelId());
        if (t.guild_id && !Te.can(pe.SEND_MESSAGES, t)) return;
        let o = d5(e, !1);
        if (!o) return B.dispatch({ type: "MESSAGE_END_EDIT", channelId: Le.getChannelId() });
        B.dispatch({
            type: "MESSAGE_START_EDIT",
            channelId: o.channel_id,
            messageId: o.id,
            content: o.content,
            _isQuickEdit: !0,
        }),
            p5(o.channel_id, o.id);
    }
    a();
    l();
    T();
    S();
    var ky,
        Ym = v({
            name: "ReactErrorDecoder",
            description: 'Replaces "Minifed React Error" with the actual error.',
            authors: [d.Cyn, d.maisymoe],
            patches: [
                {
                    find: "React has blocked a javascript: URL as a security precaution.",
                    replacement: {
                        match: /"https:\/\/react.dev\/errors\/"\+\i;/,
                        replace:
                            "$&const vcDecodedError=$self.decodeError(...arguments);if(vcDecodedError)return vcDecodedError;",
                    },
                },
            ],
            async start() {
                let e = `https://raw.githubusercontent.com/facebook/react/v${xe.version}/scripts/error-codes/codes.json`;
                ky = await g(e)
                    .then((t) => t.json())
                    .catch((t) =>
                        console.error(
                            `[ReactErrorDecoder] Failed to fetch React error codes
`,
                            t
                        )
                    );
            },
            stop() {
                ky = void 0;
            },
            decodeError(e, ...t) {
                let o = 0;
                return ky?.[e]?.replace(/%s/g, () => {
                    let n = t[o];
                    return o++, n;
                });
            },
        });
    a();
    l();
    var Ly = {};
    Ke(Ly, {
        ServerListRenderPosition: () => Zm,
        addServerListElement: () => Oc,
        removeServerListElement: () => _c,
        renderAll: () => $C,
    });
    a();
    l();
    var Zm = ((o) => ((o[(o.Above = 0)] = "Above"), (o[(o.In = 1)] = "In"), o))(Zm || {}),
        UC = new Set(),
        FC = new Set();
    function Dy(e) {
        return e === 0 ? UC : FC;
    }
    function Oc(e, t) {
        Dy(e).add(t);
    }
    function _c(e, t) {
        Dy(e).delete(t);
    }
    var $C = (e) => Array.from(Dy(e), (t, o) => r(C, { noop: !0, key: o }, r(t, null)));
    lr();
    T();
    S();
    function GC() {
        let e = [];
        Object.values(Ce.getGuilds()).forEach((t) => {
            Gr.getChannels(t.id)
                .SELECTABLE.concat(Gr.getChannels(t.id).VOCAL)
                .concat(Object.values(dl.getActiveJoinedThreadsForGuild(t.id)).flatMap((o) => Object.values(o)))
                .forEach((o) => {
                    En.hasUnread(o.channel.id) &&
                        e.push({
                            channelId: o.channel.id,
                            messageId: En.lastMessageId(o.channel.id),
                            readStateType: 0,
                        });
                });
        }),
            B.dispatch({ type: "BULK_ACK", context: "APP", channels: e });
    }
    var HC = () => r(au, { variant: "secondary", onClick: GC, className: "vc-ranb-button" }, "Read All"),
        Qm = v({
            name: "ReadAllNotificationsButton",
            description: "Read all server notifications with a single button click!",
            authors: [d.kemo],
            dependencies: ["ServerListAPI"],
            renderReadAllButton: C.wrap(HC, { noop: !0 }),
            start() {
                Oc(0, this.renderReadAllButton);
            },
            stop() {
                _c(0, this.renderReadAllButton);
            },
        });
    a();
    l();
    T();
    a();
    l();
    se();
    S();
    a();
    l();
    var ko = w({
        notices: {
            type: 3,
            description:
                "Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",
            default: !1,
        },
        offlineRemovals: {
            type: 3,
            description: "Notify you when starting discord if you were removed while offline.",
            default: !0,
        },
        friends: { type: 3, description: "Notify when a friend removes you", default: !0 },
        friendRequestCancels: { type: 3, description: "Notify when a friend request is cancelled", default: !0 },
        servers: { type: 3, description: "Notify when removed from a server", default: !0 },
        groups: { type: 3, description: "Notify when removed from a group chat", default: !0 },
    });
    a();
    l();
    se();
    G();
    S();
    var Oy = it("GuildAvailabilityStore"),
        fa = new Map(),
        ga = new Map(),
        ss = { friends: [], requests: [] },
        m5 = () => `relationship-notifier-guilds-${R.getCurrentUser().id}`,
        f5 = () => `relationship-notifier-groups-${R.getCurrentUser().id}`,
        g5 = () => `relationship-notifier-friends-${R.getCurrentUser().id}`;
    async function WC() {
        Mg(["relationship-notifier-guilds", "relationship-notifier-groups", "relationship-notifier-friends"]);
    }
    async function _y() {
        if ((await WC(), R.getCurrentUser() == null)) return;
        let [e, t, o] = await Pg([m5(), f5(), g5()]);
        if ((await Promise.all([Xm(), Jm(), Ec()]), ko.store.offlineRemovals)) {
            if (ko.store.groups && t?.size)
                for (let [n, i] of t) ga.has(n) || wn(`You are no longer in the group ${i.name}.`, i.iconURL);
            if (ko.store.servers && e?.size)
                for (let [n, i] of e)
                    !fa.has(n) && !Oy.isUnavailable(n) && wn(`You are no longer in the server ${i.name}.`, i.iconURL);
            if (ko.store.friends && o?.friends.length)
                for (let n of o.friends) {
                    if (ss.friends.includes(n)) continue;
                    let i = await lo.getUser(n).catch(() => {});
                    i &&
                        wn(`You are no longer friends with ${qr(i)}.`, i.getAvatarURL(void 0, void 0, !1), () =>
                            No(i.id)
                        );
                }
            if (ko.store.friendRequestCancels && o?.requests?.length)
                for (let n of o.requests) {
                    if (ss.requests.includes(n) || [1, 2, 4].includes(we.getRelationshipType(n))) continue;
                    let i = await lo.getUser(n).catch(() => {});
                    i &&
                        wn(`Friend request from ${qr(i)} has been revoked.`, i.getAvatarURL(void 0, void 0, !1), () =>
                            No(i.id)
                        );
                }
        }
    }
    function wn(e, t, o) {
        ko.store.notices && fn(e, "OK", () => Wi()),
            He({ title: "Relationship Notifier", body: e, icon: t, onClick: o });
    }
    function h5(e) {
        return fa.get(e);
    }
    function Ey(e) {
        fa.delete(e), Xm();
    }
    async function Xm() {
        fa.clear();
        let e = R.getCurrentUser().id;
        for (let [t, { name: o, icon: n }] of Object.entries(Ce.getGuilds()))
            Se.isMember(t, e) &&
                fa.set(t, { id: t, name: o, iconURL: n && `https://cdn.discordapp.com/icons/${t}/${n}.png` });
        await It(m5(), fa);
    }
    function y5(e) {
        return ga.get(e);
    }
    function By(e) {
        ga.delete(e), Jm();
    }
    async function Jm() {
        ga.clear();
        for (let { type: e, id: t, name: o, rawRecipients: n, icon: i } of Z.getSortedPrivateChannels())
            e === 3 &&
                ga.set(t, {
                    id: t,
                    name: o || n.map((s) => s.username).join(", "),
                    iconURL: i && `https://cdn.discordapp.com/channel-icons/${t}/${i}.png`,
                });
        await It(f5(), ga);
    }
    async function Ec() {
        (ss.friends = []), (ss.requests = []);
        let e = we.getMutableRelationships();
        for (let [t, o] of e)
            switch (o) {
                case 1:
                    ss.friends.push(t);
                    break;
                case 3:
                    ss.requests.push(t);
                    break;
            }
        await It(g5(), ss);
    }
    var Uy,
        Fy,
        $y,
        v5 = (e) => (Uy = e),
        b5 = (e) => (Fy = e),
        S5 = (e) => ($y = e);
    async function x5({ relationship: { type: e, id: t } }) {
        if (Uy === t) {
            Uy = void 0;
            return;
        }
        let o = await lo.getUser(t).catch(() => null);
        if (o)
            switch (e) {
                case 1:
                    ko.store.friends &&
                        wn(`${qr(o)} removed you as a friend.`, o.getAvatarURL(void 0, void 0, !1), () => No(o.id));
                    break;
                case 3:
                    ko.store.friendRequestCancels &&
                        wn(`A friend request from ${qr(o)} has been removed.`, o.getAvatarURL(void 0, void 0, !1), () =>
                            No(o.id)
                        );
                    break;
            }
    }
    function T5({ guild: { id: e, unavailable: t } }) {
        if (!ko.store.servers || t || Oy.isUnavailable(e)) return;
        if (Fy === e) {
            Ey(e), (Fy = void 0);
            return;
        }
        let o = h5(e);
        o && (Ey(e), wn(`You were removed from the server ${o.name}.`, o.iconURL));
    }
    function w5({ channel: { id: e, type: t } }) {
        if (!ko.store.groups || t !== 3) return;
        if ($y === e) {
            By(e), ($y = void 0);
            return;
        }
        let o = y5(e);
        o && (By(e), wn(`You were removed from the group ${o.name}.`, o.iconURL));
    }
    var Vm = v({
        name: "RelationshipNotifier",
        description: "Notifies you when a friend, group chat, or server removes you.",
        authors: [d.nick],
        settings: ko,
        patches: [
            {
                find: "removeRelationship:(",
                replacement: {
                    match: /(removeRelationship:\((\i),\i,\i\)=>)/,
                    replace: "$1($self.removeFriend($2),0)||",
                },
            },
            {
                find: "async leaveGuild(",
                replacement: { match: /(leaveGuild\((\i)\){)/, replace: "$1$self.removeGuild($2);" },
            },
            {
                find: "},closePrivateChannel(",
                replacement: { match: /(closePrivateChannel\((\i)\){)/, replace: "$1$self.removeGroup($2);" },
            },
        ],
        flux: {
            GUILD_CREATE: Xm,
            GUILD_DELETE: T5,
            CHANNEL_CREATE: Jm,
            CHANNEL_DELETE: w5,
            RELATIONSHIP_ADD: Ec,
            RELATIONSHIP_UPDATE: Ec,
            RELATIONSHIP_REMOVE(e) {
                x5(e), Ec();
            },
            CONNECTION_OPEN: _y,
        },
        async start() {
            setTimeout(() => {
                _y();
            }, 5e3);
        },
        removeFriend: v5,
        removeGroup: S5,
        removeGuild: b5,
    });
    a();
    l();
    T();
    S();
    var P5 = {
        Google: "https://www.google.com/search?q=",
        DuckDuckGo: "https://duckduckgo.com/?q=",
        Brave: "https://search.brave.com/search?q=",
        Bing: "https://www.bing.com/search?q=",
        Yahoo: "https://search.yahoo.com/search?p=",
        Yandex: "https://yandex.com/search/?text=",
        GitHub: "https://github.com/search?q=",
        Reddit: "https://www.reddit.com/search?q=",
        Wikipedia: "https://wikipedia.org/w/index.php?search=",
        Startpage: "https://www.startpage.com/sp/search?query=",
    };
    var M5 = w({
        customEngineName: { description: "Name of the custom search engine", type: 0, placeholder: "Google" },
        customEngineURL: {
            description: "The URL of your Engine",
            type: 0,
            placeholder: "https://google.com/search?q=",
        },
        replacementEngine: {
            description: "Replace with a specific search engine instead of adding a menu",
            type: 4,
            options: [
                { label: "Off", value: "off", default: !0 },
                { label: "Custom Engine", value: "custom" },
                ...Object.keys(P5).map((e) => ({ label: e, value: e })),
            ],
        },
    });
    function I5(e, t) {
        open(t + encodeURIComponent(e.trim()), "_blank");
    }
    function jC(e) {
        let { customEngineName: t, customEngineURL: o, replacementEngine: n } = M5.store,
            i = !!(t && o),
            s = n !== "off" && !(n === "custom" && !i),
            c = { ...P5 };
        if ((i && (c[t] = o), s)) {
            let u = n === "custom" && i ? t : n;
            return r(M.MenuItem, {
                label: `Search with ${u}`,
                key: "search-custom-engine",
                id: "vc-search-custom-engine",
                action: () => I5(e, c[u]),
            });
        }
        return r(
            M.MenuItem,
            { label: "Search Text", key: "search-text", id: "vc-search-text" },
            Object.keys(c).map((u) => {
                let p = "vc-search-content-" + u;
                return r(M.MenuItem, {
                    key: p,
                    id: p,
                    label: r(
                        oe,
                        { gap: "0.5em", alignItems: "center" },
                        r("img", {
                            style: { borderRadius: "50%" },
                            "aria-hidden": "true",
                            height: 16,
                            width: 16,
                            src: `https://icons.duckduckgo.com/ip3/${new URL(c[u]).hostname}.ico`,
                        }),
                        u
                    ),
                    action: () => I5(e, c[u]),
                });
            })
        );
    }
    var qC = (e, t) => {
            let o = document.getSelection()?.toString();
            if (!o) return;
            let n = _e("search-google", e);
            if (n) {
                let i = n.findIndex((s) => s?.props?.id === "search-google");
                i !== -1 && (n[i] = jC(o));
            }
        },
        ef = v({
            name: "ReplaceGoogleSearch",
            description: "Replaces the Google search with different Engine(s)",
            authors: [d.Moxxie, d.Ethan],
            settings: M5,
            contextMenus: { message: qC },
        });
    a();
    l();
    T();
    G();
    S();
    var KC = ee("separator", "latin24CompactTimeStamp");
    function C5(e) {
        return r("i", { className: KC.separator, "aria-hidden": !0, ...e });
    }
    function YC({ referencedMessage: e, baseMessage: t }) {
        if (e.state !== 0) return null;
        let o = e.message.timestamp,
            n = t.timestamp;
        return r(
            Vt,
            { className: "vc-reply-timestamp", compact: $n.isSameDay(o, n), timestamp: o, isInline: !1 },
            r(C5, null, "["),
            $n.isSameDay(o, n) ? $n.dateFormat(o, "LT") : $n.calendarFormat(o),
            r(C5, null, "]")
        );
    }
    var tf = v({
        name: "ReplyTimestamp",
        description: "Shows a timestamp on replied-message previews",
        authors: [d.Kyuuhachi],
        patches: [
            {
                find: "#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}",
                replacement: {
                    match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/,
                    replace: "$&$self.ReplyTimestamp(arguments[0]),",
                },
            },
        ],
        ReplyTimestamp: C.wrap(YC, { noop: !0 }),
    });
    a();
    l();
    T();
    G();
    var ZC = ee("spoilerContent", "hidden"),
        QC = ee("messagesWrapper", "navigationDescription"),
        of = v({
            name: "RevealAllSpoilers",
            description:
                "Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",
            authors: [d.whqwert],
            patches: [
                {
                    find: ".removeObscurity,",
                    replacement: {
                        match: /(?<=removeObscurity(?:",|=)(\i)=>{)/,
                        replace: (e, t) => `$self.reveal(${t});`,
                    },
                },
            ],
            reveal(e) {
                let { ctrlKey: t, metaKey: o, shiftKey: n, target: i } = e;
                if (!(Bo ? o : t)) return;
                let { spoilerContent: s, hidden: c } = ZC,
                    { messagesWrapper: u } = QC,
                    p = n ? document.querySelector(`div.${u}`) : i.parentElement;
                for (let m of p.querySelectorAll(`span.${s}.${c}`)) m.click();
            },
        });
    a();
    l();
    Ue();
    T();
    S();
    var rf = {
        Google: "https://lens.google.com/uploadbyurl?url=",
        Yandex: "https://yandex.com/images/search?rpt=imageview&url=",
        SauceNAO: "https://saucenao.com/search.php?url=",
        IQDB: "https://iqdb.org/?url=",
        Bing: "https://www.bing.com/images/search?view=detailv2&iss=sbi&q=imgurl:",
        TinEye: "https://www.tineye.com/search?url=",
        ImgOps: "https://imgops.com/start?url=",
    };
    function N5(e, t) {
        open(t + encodeURIComponent(e), "_blank");
    }
    function A5(e) {
        return r(
            M.MenuItem,
            { label: "Search Image", key: "search-image", id: "search-image" },
            Object.keys(rf).map((t, o) => {
                let n = "search-image-" + t;
                return r(M.MenuItem, {
                    key: n,
                    id: n,
                    label: r(
                        oe,
                        { alignItems: "center", gap: "0.5em" },
                        r("img", {
                            style: { borderRadius: "50%" },
                            "aria-hidden": "true",
                            height: 16,
                            width: 16,
                            src: `https://icons.duckduckgo.com/ip3/${new URL(rf[t]).host}.ico`,
                        }),
                        t
                    ),
                    action: () => N5(e, rf[t]),
                });
            }),
            r(M.MenuItem, {
                key: "search-image-all",
                id: "search-image-all",
                label: r(oe, { alignItems: "center", gap: "0.5em" }, r(Ko, { height: 16, width: 16 }), "All"),
                action: () => Object.values(rf).forEach((t) => N5(e, t)),
            })
        );
    }
    var XC = (e, t) => {
            if (t?.reverseImageSearchType !== "img") return;
            let o = t.itemHref ?? t.itemSrc;
            _e("copy-link", e)?.push(A5(o));
        },
        JC = (e, t) => {
            if (!t?.src) return;
            (_e("copy-native-link", e) ?? e).push(A5(t.src));
        },
        nf = v({
            name: "ReverseImageSearch",
            description: "Adds ImageSearch to image context menus",
            authors: [d.Ven, d.Nuckyz],
            tags: ["ImageUtilities"],
            patches: [
                {
                    find: "#{intl::MESSAGE_ACTIONS_MENU_LABEL}),shouldHideMediaOptions:",
                    replacement: {
                        match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,
                        replace: (e, t) => `${e}reverseImageSearchType:${t}.getAttribute("data-role"),`,
                    },
                },
            ],
            contextMenus: { message: XC, "image-context": JC },
        });
    a();
    l();
    Ue();
    hi();
    T();
    G();
    S();
    a();
    l();
    le();
    Oe();
    S();
    var R5 = "rdb-auth",
        xt = {};
    async function Gy() {
        xt = (await k5()) ?? {};
    }
    async function k5() {
        return (await wt(R5))?.[R.getCurrentUser()?.id];
    }
    async function In() {
        return (await k5())?.token;
    }
    async function Bc(e) {
        return jo(
            R5,
            (t) => (
                (t ??= {}),
                (xt = t[R.getCurrentUser().id] ??= {}),
                e.token && (xt.token = e.token),
                e.user && (xt.user = e.user),
                t
            )
        );
    }
    function ha(e) {
        fe((t) =>
            r(wi, {
                ...t,
                scopes: ["identify"],
                responseType: "code",
                redirectUri: "https://manti.vendicated.dev/api/reviewdb/auth",
                permissions: 0n,
                clientId: "915703782174752809",
                cancelCompletesFlow: !1,
                callback: async (o) => {
                    try {
                        let n = new URL(o.location);
                        n.searchParams.append("clientMod", "vencord");
                        let i = await g(n, { headers: { Accept: "application/json" } });
                        if (!i.ok) {
                            let { message: c } = await i.json();
                            Ge(c || "An error occured while authorizing", J.Type.FAILURE);
                            return;
                        }
                        let { token: s } = await i.json();
                        Bc({ token: s }), Ge("Successfully logged in!", J.Type.SUCCESS), e?.();
                    } catch (n) {
                        new U("ReviewDB").error("Failed to authorize", n);
                    }
                },
            })
        );
    }
    a();
    l();
    a();
    l();
    S();
    a();
    l();
    a();
    l();
    lr();
    se();
    a();
    l();
    a();
    l();
    Pe();
    S();
    var ft = Y("vc-rdb-");
    function D5(e, t) {
        let o = R.getCurrentUser().id;
        return o === e || t.sender.discordID === o || xt.user?.type === 1;
    }
    function L5(e, t) {
        let o = R.getCurrentUser().id;
        return e === o && t.sender.discordID !== o;
    }
    function O5(e) {
        return e.sender.discordID !== R.getCurrentUser().id;
    }
    function mo(e, t = J.Type.MESSAGE) {
        J.show({ id: J.genId(), message: e, type: t, options: { position: J.Position.BOTTOM } });
    }
    le();
    Oe();
    pt();
    S();
    function VC(e) {
        return r(V, { text: "Unblock user" }, (t) =>
            r(
                "div",
                { ...t, role: "button", onClick: e.onClick, className: ft("block-modal-unblock") },
                r(
                    "svg",
                    { height: "20", viewBox: "0 -960 960 960", width: "20", fill: "var(--status-danger)" },
                    r("path", {
                        d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z",
                    })
                )
            )
        );
    }
    function eN({ user: e, isBusy: t, setIsBusy: o }) {
        let [n, i] = k(!1);
        return n
            ? null
            : r(
                  "div",
                  { className: ft("block-modal-row") },
                  r("img", { className: ft("block-modal-avatar"), src: e.profilePhoto, alt: "" }),
                  r(N.FormText, { className: ft("block-modal-username") }, e.username),
                  r(VC, {
                      onClick: t
                          ? void 0
                          : async () => {
                                o(!0);
                                try {
                                    await af(e.discordID), i(!0);
                                } finally {
                                    o(!1);
                                }
                            },
                  })
              );
    }
    function tN() {
        let [e, t] = k(!1),
            [o, n, i] = _t(_5, {
                onError: (s) => new U("ReviewDB").error("Failed to fetch blocks", s),
                fallbackValue: [],
            });
        return i
            ? null
            : n
              ? r(N.FormText, null, "Failed to fetch blocks: $", String(n))
              : o.length
                ? r(
                      f,
                      null,
                      o.map((s) => r(eN, { key: s.discordID, user: s, isBusy: e, setIsBusy: t }))
                  )
                : r(N.FormText, null, "No blocked users.");
    }
    function sf() {
        fe((e) =>
            r(
                ve,
                { ...e },
                r(
                    Re,
                    { className: ft("block-modal-header") },
                    r(N.FormTitle, { style: { margin: 0 } }, "Blocked Users"),
                    r(et, { onClick: e.onClose })
                ),
                r(
                    Ie,
                    { className: ft("block-modal") },
                    xt.token ? r(tN, null) : r(N.FormText, null, "You are not logged into ReviewDB!")
                )
            )
        );
    }
    var Pn = w({
        authorize: { type: 6, component: () => r(jt, { onClick: () => ha() }, "Authorize with ReviewDB") },
        notifyReviews: { type: 3, description: "Notify about new reviews on startup", default: !0 },
        showWarning: {
            type: 3,
            description: "Display warning to be respectful at the top of the reviews list",
            default: !0,
        },
        hideTimestamps: { type: 3, description: "Hide timestamps on reviews", default: !1 },
        hideBlockedUsers: { type: 3, description: "Hide reviews from blocked users", default: !0 },
        buttons: {
            type: 6,
            component: () =>
                r(
                    "div",
                    { className: ft("button-grid") },
                    r(jt, { onClick: sf }, "Manage Blocked Users"),
                    r(
                        jt,
                        {
                            variant: "positive",
                            onClick: () => {
                                VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi");
                            },
                        },
                        "Support ReviewDB development"
                    ),
                    r(
                        jt,
                        {
                            variant: "link",
                            onClick: async () => {
                                let e = "https://reviewdb.mantikafasi.dev",
                                    t = await In();
                                t && (e += "/api/redirect?token=" + encodeURIComponent(t)),
                                    VencordNative.native.openExternal(e);
                            },
                        },
                        "ReviewDB website"
                    ),
                    r(jt, { variant: "link", onClick: () => pn("eWPBSbvznt") }, "ReviewDB Support Server")
                ),
        },
    }).withPrivateSettings();
    var E5 = "https://manti.vendicated.dev/api/reviewdb",
        lf = 50,
        oN = 2;
    async function as(e, t = {}) {
        return g(E5 + e, { ...t, headers: { ...t.headers, Authorization: (await In()) || "" } });
    }
    async function B5(e, t = 0) {
        let o = 0;
        Pn.store.showWarning || (o |= oN);
        let n = new URLSearchParams({ flags: String(o), offset: String(t) }),
            i = await g(`${E5}/users/${e}/reviews?${n}`),
            s = i.ok
                ? await i.json()
                : {
                      message:
                          i.status === 429
                              ? "You are sending requests too fast. Wait a few seconds and try again."
                              : "An Error occured while fetching reviews. Please try again later.",
                      reviews: [],
                      updated: !1,
                      hasNextPage: !1,
                      reviewCount: 0,
                  };
        return i.ok
            ? s
            : (mo(s.message, J.Type.FAILURE),
              {
                  ...s,
                  reviews: [
                      {
                          id: 0,
                          comment: s.message,
                          star: 0,
                          timestamp: 0,
                          type: 3,
                          sender: {
                              id: 0,
                              username: "ReviewDB",
                              profilePhoto:
                                  "https://cdn.discordapp.com/avatars/1134864775000629298/3f87ad315b32ee464d84f1270c8d1b37.png?size=256&format=webp&quality=lossless",
                              discordID: "1134864775000629298",
                              badges: [],
                          },
                      },
                  ],
              });
    }
    async function U5(e) {
        return (await In())
            ? await as(`/users/${e.userid}/reviews`, {
                  method: "PUT",
                  body: JSON.stringify(e),
                  headers: { "Content-Type": "application/json" },
              }).then(async (o) => {
                  let n = await o.json();
                  return mo(n.message), o.ok ? n : null;
              })
            : (mo("Please authorize to add a review."), ha(), null);
    }
    async function F5(e) {
        return await as(`/users/${e}/reviews`, {
            method: "DELETE",
            headers: { "Content-Type": "application/json", Accept: "application/json" },
            body: JSON.stringify({ reviewid: e }),
        }).then(async (t) => {
            let o = await t.json();
            return mo(o.message), t.ok ? o : null;
        });
    }
    async function $5(e) {
        let t = await as("/reports", {
            method: "PUT",
            headers: { "Content-Type": "application/json", Accept: "application/json" },
            body: JSON.stringify({ reviewid: e }),
        }).then((o) => o.json());
        mo(t.message);
    }
    async function G5(e, t) {
        if (
            !(
                await as("/blocks", {
                    method: "PATCH",
                    headers: { "Content-Type": "application/json", Accept: "application/json" },
                    body: JSON.stringify({ action: e, discordId: t }),
                })
            ).ok
        )
            mo(`Failed to ${e} user`, J.Type.FAILURE);
        else if ((mo(`Successfully ${e}ed user`, J.Type.SUCCESS), xt?.user?.blockedUsers)) {
            let n = e === "block" ? [...xt.user.blockedUsers, t] : xt.user.blockedUsers.filter((i) => i !== t);
            Bc({ user: { ...xt.user, blockedUsers: n } });
        }
    }
    var H5 = (e) => G5("block", e),
        af = (e) => G5("unblock", e);
    async function _5() {
        let e = await as("/blocks", { method: "GET", headers: { Accept: "application/json" } });
        if (!e.ok) throw new Error(`${e.status}: ${e.statusText}`);
        return e.json();
    }
    function z5(e) {
        return as("/users", { method: "POST" }).then((t) => t.json());
    }
    async function W5(e) {
        return as(`/notifications?id=${e}`, { method: "PATCH" });
    }
    Oe();
    pt();
    S();
    a();
    l();
    se();
    re();
    G();
    S();
    a();
    l();
    Ue();
    re();
    G();
    S();
    var cf = ee("button", "wrapper", "disabled", "separator", "dangerous");
    function j5({ onClick: e }) {
        return r(V, { text: "Delete Review" }, (t) =>
            r(
                "div",
                { ...t, className: L(cf.button, cf.dangerous), onClick: e, role: "button" },
                r(ar, { width: "20", height: "20" })
            )
        );
    }
    function q5({ onClick: e }) {
        return r(V, { text: "Report Review" }, (t) =>
            r(
                "div",
                { ...t, className: cf.button, onClick: e, role: "button" },
                r(
                    "svg",
                    { width: "20", height: "20", viewBox: "0 0 24 24" },
                    r("path", {
                        fill: "currentColor",
                        d: "M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z",
                    })
                )
            )
        );
    }
    function K5({ onClick: e, isBlocked: t }) {
        return r(V, { text: `${t ? "Unblock" : "Block"} user` }, (o) =>
            r(
                "div",
                { ...o, className: cf.button, onClick: e, role: "button" },
                r(
                    "svg",
                    { height: "20", viewBox: "0 -960 960 960", width: "20", fill: "currentColor" },
                    t
                        ? r("path", {
                              d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z",
                          })
                        : r("path", {
                              d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z",
                          })
                )
            )
        );
    }
    a();
    l();
    S();
    function uf(e) {
        let t = e.redirectURL ? ul : (o) => r("span", { ...o, role: "button" }, o.children);
        return r(V, { text: e.name }, ({ onMouseEnter: o, onMouseLeave: n }) =>
            r(
                t,
                { className: ft("blocked-badge"), href: e.redirectURL, onClick: e.onClick },
                r("img", {
                    className: ft("badge"),
                    width: "22px",
                    height: "22px",
                    onMouseEnter: o,
                    onMouseLeave: n,
                    src: e.icon,
                    alt: e.description,
                })
            )
        );
    }
    var Uc = ee("cozyMessage", "message", "groupStart", "buttons", "buttonsInner"),
        Y5 = ee("container", "isHeader"),
        ya = ee("avatar", "wrapper", "cozy", "clickable", "username"),
        rN = ee("button", "wrapper", "selected"),
        Fc = ee("botTagVerified", "botTagRegular", "botText", "px", "rem"),
        nN = new Intl.DateTimeFormat();
    function $c({ review: e, refetch: t, profileId: o }) {
        let [n, i] = k(!1);
        function s() {
            No(e.sender.discordID);
        }
        function c() {
            Qe.show({
                title: "Are you sure?",
                body: "Do you really want to delete this review?",
                confirmText: "Delete",
                cancelText: "Nevermind",
                onConfirm: async () => {
                    if (await In())
                        F5(e.id).then((h) => {
                            h && t();
                        });
                    else return mo("You must be logged in to delete reviews.");
                },
            });
        }
        function u() {
            Qe.show({
                title: "Are you sure?",
                body: "Do you really you want to report this review?",
                confirmText: "Report",
                cancelText: "Nevermind",
                onConfirm: async () => {
                    if (await In()) $5(e.id);
                    else return mo("You must be logged in to report reviews.");
                },
            });
        }
        let p = xt?.user?.blockedUsers?.includes(e.sender.discordID) ?? !1;
        function m() {
            if (p) return af(e.sender.discordID);
            Qe.show({
                title: "Are you sure?",
                body: "Do you really you want to block this user? They will be unable to leave further reviews on your profile. You can unblock users in the plugin settings.",
                confirmText: "Block",
                cancelText: "Nevermind",
                onConfirm: async () => {
                    if (await In()) H5(e.sender.discordID);
                    else return mo("You must be logged in to block users.");
                },
            });
        }
        return r(
            "div",
            {
                className: L(ft("review"), Uc.cozyMessage, ya.wrapper, Uc.message, Uc.groupStart, ya.cozy),
                style: { marginLeft: "0px", paddingLeft: "52px" },
            },
            r("img", {
                className: L(ya.avatar, ya.clickable),
                onClick: s,
                src: e.sender.profilePhoto || "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",
                style: { left: "0px", zIndex: 0 },
            }),
            r(
                "div",
                { style: { display: "inline-flex", justifyContent: "center", alignItems: "center" } },
                r(
                    "span",
                    {
                        className: L(ya.clickable, ya.username),
                        style: { color: "var(--channels-default)", fontSize: "14px" },
                        onClick: () => s(),
                    },
                    e.sender.username
                ),
                e.type === 3 &&
                    r(
                        "span",
                        {
                            className: L(Fc.botTagVerified, Fc.botTagRegular, Fc.px, Fc.rem),
                            style: { marginLeft: "4px" },
                        },
                        r("span", { className: Fc.botText }, "System")
                    )
            ),
            p &&
                r(uf, {
                    name: "You have blocked this user",
                    description: "You have blocked this user",
                    icon: "/assets/aaee57e0090991557b66.svg",
                    type: 0,
                    onClick: () => sf(),
                }),
            e.sender.badges.map((h, y) => r(uf, { key: y, ...h })),
            !Pn.store.hideTimestamps &&
                e.type !== 3 &&
                r(Vt, { timestamp: new Date(e.timestamp * 1e3) }, nN.format(e.timestamp * 1e3)),
            r(
                "div",
                { className: ft("review-comment") },
                e.comment.length > 200 && !n
                    ? r(
                          f,
                          null,
                          Ne.parseGuildEventDescription(e.comment.substring(0, 200)),
                          "...",
                          r("br", null),
                          r("a", { onClick: () => i(!0) }, "Read more"),
                          "]"
                      )
                    : Ne.parseGuildEventDescription(e.comment)
            ),
            e.id !== 0 &&
                r(
                    "div",
                    { className: L(Y5.container, Y5.isHeader, Uc.buttons), style: { padding: "0px" } },
                    r(
                        "div",
                        { className: L(rN.wrapper, Uc.buttonsInner) },
                        O5(e) && r(q5, { onClick: u }),
                        L5(o, e) && r(K5, { isBlocked: p, onClick: m }),
                        D5(o, e) && r(j5, { onClick: c })
                    )
                )
        );
    }
    a();
    l();
    pt();
    G();
    S();
    var iN = X("insertNodes", "textToText"),
        Z5 = X("start", "end", "toSlateRange"),
        sN = X("FORM", "USER_PROFILE"),
        aN = ge("editorClassName", "CHANNEL_TEXT_AREA"),
        lN = de(".GUILD_TEXT]", "fromServer)");
    function zy({
        discordId: e,
        name: t,
        onFetchReviews: o,
        refetchSignal: n,
        scrollToTop: i,
        page: s = 1,
        showInput: c = !1,
        hideOwnReview: u = !1,
        type: p,
    }) {
        let [m, h] = Qo(!0),
            [y] = _t(() => B5(e, (s - 1) * lf), {
                fallbackValue: null,
                deps: [n, m, s],
                onSuccess: (b) => {
                    Pn.store.hideBlockedUsers &&
                        (b.reviews = b.reviews?.filter((x) => !we.isBlocked(x.sender.discordID))),
                        i?.(),
                        o(b);
                },
            });
        return y
            ? r(
                  f,
                  null,
                  r(cN, { refetch: h, reviews: y.reviews, hideOwnReview: u, profileId: e, type: p }),
                  c &&
                      r(Wy, {
                          name: t,
                          discordId: e,
                          refetch: h,
                          isAuthor: y.reviews?.some((b) => b.sender.discordID === R.getCurrentUser().id),
                      })
              )
            : null;
    }
    function cN({ refetch: e, reviews: t, hideOwnReview: o, profileId: n, type: i }) {
        let s = R.getCurrentUser().id;
        return r(
            "div",
            { className: ft("view") },
            t?.map(
                (c) => (c.sender.discordID !== s || !o) && r($c, { key: c.id, review: c, refetch: e, profileId: n })
            ),
            t?.length === 0 &&
                r(
                    N.FormText,
                    { className: ft("placeholder") },
                    "Looks like nobody reviewed this ",
                    i === 0 ? "user" : "server",
                    " yet. You could be the first!"
                )
        );
    }
    function Wy({ discordId: e, isAuthor: t, refetch: o, name: n, modalKey: i }) {
        let { token: s } = xt,
            c = at(null),
            u = sN.USER_PROFILE_REPLY;
        u.disableAutoFocus = !0;
        let p = lN({ id: "0", type: 1 });
        return r(
            f,
            null,
            r(
                "div",
                {
                    onClick: () => {
                        s || (mo("Opening authorization window..."), ha());
                    },
                },
                r(aN, {
                    className: ft("input"),
                    channel: p,
                    placeholder: s
                        ? t
                            ? `Update review for @${n}`
                            : `Review @${n}`
                        : "You need to authorize to review users!",
                    type: u,
                    disableThemedBackground: !0,
                    setEditorRef: (m) => (c.current = m),
                    parentModalKey: i,
                    textValue: "",
                    onSubmit: async (m) => {
                        if (await U5({ userid: e, comment: m.value })) {
                            o();
                            let y = c.current.ref.current.getSlateEditor();
                            iN.delete(y, { at: { anchor: Z5.start(y, []), focus: Z5.end(y, []) } });
                        }
                        return { shouldClear: !1, shouldRefocus: !0 };
                    },
                })
            )
        );
    }
    function uN({ modalProps: e, modalKey: t, discordId: o, name: n, type: i }) {
        let [s, c] = k(),
            [u, p] = Qo(!0),
            [m, h] = k(1),
            y = at(null),
            b = s?.reviewCount,
            x = s?.reviews.find((P) => P.sender.discordID === xt.user?.discordID);
        return r(
            C,
            null,
            r(
                ve,
                { ...e, size: "medium" },
                r(
                    Re,
                    null,
                    r(
                        H,
                        { variant: "heading-lg/semibold", className: ft("modal-header") },
                        n,
                        "'s Reviews",
                        !!b && r("span", null, " (", b, " Reviews)")
                    ),
                    r(et, { onClick: e.onClose })
                ),
                r(
                    Ie,
                    { scrollerRef: y },
                    r(
                        "div",
                        { className: ft("modal-reviews") },
                        r(zy, {
                            discordId: o,
                            name: n,
                            page: m,
                            refetchSignal: u,
                            onFetchReviews: c,
                            scrollToTop: () => y.current?.scrollTo({ top: 0, behavior: "smooth" }),
                            hideOwnReview: !0,
                            type: i,
                        })
                    )
                ),
                r(
                    St,
                    { className: ft("modal-footer") },
                    r(
                        "div",
                        { className: ft("modal-footer-wrapper") },
                        x && r($c, { refetch: p, review: x, profileId: o }),
                        r(Wy, { isAuthor: x != null, discordId: o, name: n, refetch: p, modalKey: t }),
                        !!b &&
                            r(vh, { currentPage: m, maxVisiblePages: 5, pageSize: lf, totalCount: b, onPageChange: h })
                    )
                )
            )
        );
    }
    function pf(e, t, o) {
        let n = "vc-rdb-modal-" + Date.now();
        fe((i) => r(uN, { modalKey: n, modalProps: i, discordId: e, name: t, type: o }), { modalKey: n });
    }
    var pN = ee("bannerButton"),
        Q5 = (e, { guild: t }) => {
            t &&
                e.push(
                    r(M.MenuItem, {
                        label: "View Reviews",
                        id: "vc-rdb-server-reviews",
                        icon: Ko,
                        action: () => pf(t.id, t.name, 1),
                    })
                );
        },
        jy = (e, { user: t }) => {
            t &&
                e.push(
                    r(M.MenuItem, {
                        label: "View Reviews",
                        id: "vc-rdb-user-reviews",
                        icon: Ko,
                        action: () => pf(t.id, t.username, 0),
                    })
                );
        },
        df = v({
            name: "ReviewDB",
            description: "Review other users (Adds a new settings to profiles)",
            authors: [d.mantikafasi, d.Ven],
            settings: Pn,
            contextMenus: {
                "guild-header-popout": Q5,
                "guild-context": Q5,
                "user-context": jy,
                "user-profile-actions": jy,
                "user-profile-overflow-menu": jy,
            },
            patches: [
                {
                    find: ".POPOUT,user:",
                    replacement: {
                        match: /children:\[(?=[^[]+?shouldShowTooltip:)/,
                        replace: "$&$self.BiteSizeReviewsButton({user:arguments[0].user}),",
                    },
                },
                {
                    find: ".SIDEBAR,disableToolbar:",
                    replacement: {
                        match: /children:\[(?=[^[]+?\.SIDEBAR}\),\i\.bot)/,
                        replace: "$&$self.BiteSizeReviewsButton({user:arguments[0].user}),",
                    },
                },
            ],
            flux: { CONNECTION_OPEN: Gy },
            async start() {
                let e = Pn.store,
                    { lastReviewId: t, notifyReviews: o } = e;
                await Gy(),
                    setTimeout(async () => {
                        if (!xt.token) return;
                        let n = await z5(xt.token);
                        if (
                            (Bc({ user: n }),
                            o &&
                                t &&
                                t < n.lastReviewID &&
                                ((e.lastReviewId = n.lastReviewID),
                                n.lastReviewID !== 0 && mo("You have new reviews on your profile!")),
                            n.notification)
                        ) {
                            let i =
                                n.notification.type === 1
                                    ? {
                                          cancelText: "Appeal",
                                          confirmText: "Ok",
                                          onCancel: async () =>
                                              VencordNative.native.openExternal(
                                                  "https://reviewdb.mantikafasi.dev/api/redirect?" +
                                                      new URLSearchParams({ token: xt.token, page: "dashboard/appeal" })
                                              ),
                                      }
                                    : {};
                            Qe.show({ title: n.notification.title, body: Ne.parse(n.notification.content, !1), ...i }),
                                W5(n.notification.id);
                        }
                    }, 4e3);
            },
            BiteSizeReviewsButton: C.wrap(
                ({ user: e }) =>
                    r(
                        Uo,
                        { text: "View Reviews" },
                        r(
                            yo,
                            { onClick: () => pf(e.id, e.username, 0), className: pN.bannerButton },
                            r(jg, { height: 16, width: 16 })
                        )
                    ),
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    le();
    G();
    S();
    var dN = de('"Result cannot be null because the message is not null"'),
        Xr = w({
            chatMentions: {
                type: 3,
                default: !0,
                description: "Show role colors in chat mentions (including in the message box)",
                restartNeeded: !0,
            },
            memberList: {
                type: 3,
                default: !0,
                description: "Show role colors in member list role headers",
                restartNeeded: !0,
            },
            voiceUsers: {
                type: 3,
                default: !0,
                description: "Show role colors in the voice chat user list",
                restartNeeded: !0,
            },
            reactorsList: {
                type: 3,
                default: !0,
                description: "Show role colors in the reactors list",
                restartNeeded: !0,
            },
            pollResults: {
                type: 3,
                default: !0,
                description: "Show role colors in the poll results",
                restartNeeded: !0,
            },
            colorChatMessages: {
                type: 3,
                default: !1,
                description: "Color chat messages based on the author's role color",
                restartNeeded: !0,
            },
            messageSaturation: {
                type: 5,
                description: "Intensity of message coloring.",
                markers: yr(0, 100, 10),
                default: 30,
            },
        }),
        mf = v({
            name: "RoleColorEverywhere",
            authors: [d.KingFish, d.lewisakura, d.AutumnVN, d.Kyuuhachi, d.jamesbt365],
            description: "Adds the top role color anywhere possible",
            settings: Xr,
            patches: [
                {
                    find: ".USER_MENTION)",
                    replacement: [
                        {
                            match: /(?<=user:(\i),guildId:([^,]+?),.{0,100}?children:\i=>\i)\((\i)\)/,
                            replace: "({...$3,color:$self.getColorInt($1?.id,$2)})",
                        },
                    ],
                    predicate: () => Xr.store.chatMentions,
                },
                {
                    find: '"text":"locked"',
                    replacement: [
                        {
                            match: /let\{id:(\i),guildId:\i,channelId:(\i)[^}]*\}.*?\.\i,{(?=children)/,
                            replace: "$&color:$self.getColorInt($1,$2),",
                        },
                    ],
                    predicate: () => Xr.store.chatMentions,
                },
                {
                    find: 'tutorialId:"whos-online',
                    replacement: [
                        {
                            match: /(#{intl::CHANNEL_MEMBERS_A11Y_LABEL}.+}\):null,).{0,100}?— ",\i\]\}\)\]/,
                            replace: (e, t) => `${t}$self.RoleGroupColor(arguments[0])]`,
                        },
                    ],
                    predicate: () => Xr.store.memberList,
                },
                {
                    find: "#{intl::THREAD_BROWSER_PRIVATE}",
                    replacement: [
                        { match: /children:\[\i," — ",\i\]/, replace: "children:[$self.RoleGroupColor(arguments[0])]" },
                    ],
                    predicate: () => Xr.store.memberList,
                },
                {
                    find: "#{intl::GUEST_NAME_SUFFIX})]",
                    replacement: [
                        {
                            match: /#{intl::GUEST_NAME_SUFFIX}.{0,50}?""\](?<=guildId:(\i),.+?user:(\i).+?)/,
                            replace: "$&,style:$self.getColorStyle($2.id,$1),",
                        },
                    ],
                    predicate: () => Xr.store.voiceUsers,
                },
                {
                    find: "MessageReactions.render:",
                    replacement: {
                        match: /tag:"strong",variant:"text-md\/(?:medium|normal)"(?<=onContextMenu:.{0,15}\((\i),(\i),\i\).+?)/,
                        replace: "$&,style:$self.getColorStyle($2?.id,$1?.channel?.id)",
                    },
                    predicate: () => Xr.store.reactorsList,
                },
                {
                    find: ",reactionVoteCounts",
                    replacement: {
                        match: /\.SIZE_32.+?variant:"text-md\/normal",className:\i\.\i,(?="aria-label":)/,
                        replace: "$&style:$self.getColorStyle(arguments[0]?.user?.id,arguments[0]?.channel?.id),",
                    },
                    predicate: () => Xr.store.pollResults,
                },
                {
                    find: ".SEND_FAILED,",
                    replacement: {
                        match: /(?<=\]:(\i)\.isUnsupported.{0,50}?,)(?=children:\[)/,
                        replace: "style:$self.useMessageColorsStyle($1),",
                    },
                    predicate: () => Xr.store.colorChatMessages,
                },
            ],
            getColorString(e, t) {
                try {
                    let o = Z.getChannel(t)?.guild_id ?? Ce.getGuild(t)?.id;
                    return o == null ? null : (Se.getMember(o, e)?.colorString ?? null);
                } catch (o) {
                    new U("RoleColorEverywhere").error("Failed to get color string", o);
                }
                return null;
            },
            getColorInt(e, t) {
                let o = this.getColorString(e, t);
                return o && parseInt(o.slice(1), 16);
            },
            getColorStyle(e, t) {
                let o = this.getColorString(e, t);
                return o && { color: o };
            },
            useMessageColorsStyle(e) {
                try {
                    let { messageSaturation: t } = Xr.use(["messageSaturation"]),
                        o = dN(e);
                    if (e.state === "SEND_FAILED") return;
                    if (o.colorString != null && t !== 0) {
                        let n = `color-mix(in oklab, ${o.colorString} ${t}%, var({DEFAULT}))`;
                        return {
                            color: n.replace("{DEFAULT}", "--text-default"),
                            "--text-strong": n.replace("{DEFAULT}", "--text-strong"),
                            "--text-muted": n.replace("{DEFAULT}", "--text-muted"),
                        };
                    }
                } catch (t) {
                    new U("RoleColorEverywhere").error("Failed to get message color", t);
                }
                return null;
            },
            RoleGroupColor: C.wrap(
                ({ id: e, count: t, title: o, guildId: n, label: i }) => {
                    let s = yt.getRole(n, e);
                    return r(
                        "span",
                        { style: { color: s?.colorString, fontWeight: "unset", letterSpacing: ".05em" } },
                        o ?? i,
                        " \u2014 ",
                        t
                    );
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    var X5 = w({
            onlySnow: { type: 3, description: "Only play the Snow Halation Theme", default: !1, restartNeeded: !0 },
        }),
        ff = v({
            name: "SecretRingToneEnabler",
            description:
                "Always play the secret version of the discord ringtone (except during special ringtone events)",
            authors: [d.AndrewDLO, d.FieryFlames, d.RamziAH],
            settings: X5,
            patches: [
                {
                    find: '"call_ringing_beat"',
                    replacement: [
                        { match: /500!==\i\(\)\.random\(1,1e3\)/, replace: "false" },
                        { predicate: () => X5.store.onlySnow, match: /"call_ringing_beat",/, replace: "" },
                    ],
                },
            ],
        });
    a();
    l();
    T();
    se();
    G();
    S();
    var mN = X("allSummaries", "findSummary"),
        fN = de(".people)),startId:", ".type}"),
        J5 = w({
            summaryExpiryThresholdDays: {
                type: 5,
                description:
                    "The time in days before a summary is removed. Note that only up to 50 summaries are kept per channel",
                markers: [1, 3, 5, 7, 10, 15, 20, 25, 30],
                stickToMarkers: !1,
                default: 3,
            },
        }),
        gf = v({
            name: "Summaries",
            description:
                "Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",
            authors: [d.mantikafasi],
            settings: J5,
            patches: [
                {
                    find: "SUMMARIZEABLE.has",
                    replacement: { match: /\i\.features\.has\(\i\.\i\.SUMMARIES_ENABLED\w+?\)/g, replace: "true" },
                },
                {
                    find: "RECEIVE_CHANNEL_SUMMARY(",
                    replacement: {
                        match: /shouldFetch\((\i),\i\){/,
                        replace: "$& if(!$self.shouldFetch($1)) return false;",
                    },
                },
            ],
            flux: {
                CONVERSATION_SUMMARY_UPDATE(e) {
                    let t = e.summaries.map((o) => ({ ...fN(o), time: Date.now() }));
                    jo(
                        "summaries-data",
                        (o) => (
                            (o ??= {}),
                            o[e.channel_id] ? o[e.channel_id].unshift(...t) : (o[e.channel_id] = t),
                            o[e.channel_id].length > 50 && (o[e.channel_id] = o[e.channel_id].slice(0, 50)),
                            o
                        )
                    );
                },
            },
            async start() {
                await jo("summaries-data", (e) => {
                    e ??= {};
                    for (let t of Object.keys(e)) {
                        for (let o = e[t].length - 1; o >= 0; o--)
                            e[t][o].time < Date.now() - 1e3 * 60 * 60 * 24 * J5.store.summaryExpiryThresholdDays &&
                                e[t].splice(o, 1);
                        e[t].length === 0 && delete e[t];
                    }
                    return Object.assign(mN.allSummaries(), e), e;
                });
            },
            shouldFetch(e) {
                let t = Z.getChannel(e),
                    o = Ce.getGuild(t.guild_id);
                return Bs(o, "SUMMARIES_ENABLED_GA");
            },
        });
    a();
    l();
    T();
    Pe();
    se();
    Oe();
    S();
    var V5 = w({
        replaceMessageContents: { description: "Replace timestamps in message contents", type: 3, default: !0 },
    });
    function e3(e) {
        let t = e.slice(1, -1).replace(/(\d)(AM|PM)$/i, "$1 $2"),
            o = new Date(`${new Date().toDateString()} ${t}`).getTime() / 1e3;
        return isNaN(o) ? e : (Date.now() / 1e3 > o && (o += 86400), `<t:${Math.round(o)}:t>`);
    }
    var gN = ["", "t", "T", "d", "D", "f", "F", "s", "S", "R"],
        ai = Y("vc-st-");
    function hN({ rootProps: e, close: t }) {
        let [o, n] = k(),
            [i, s] = k(""),
            c = Math.round((new Date(o).getTime() || Date.now()) / 1e3),
            u = (h, y) => `<t:${h}${y && `:${y}`}>`,
            [p, m] = ce(() => {
                let h = u(c, i);
                return [h, Ne.parse(h)];
            }, [c, i]);
        return r(
            ve,
            { ...e },
            r(
                Re,
                { className: ai("modal-header") },
                r(N.FormTitle, { tag: "h2", className: ai("modal-title") }, "Timestamp Picker"),
                r(et, { onClick: t, className: ai("modal-close-button") })
            ),
            r(
                Ie,
                { className: ai("modal-content") },
                r("input", {
                    className: ai("date-picker"),
                    type: "datetime-local",
                    value: o,
                    onChange: (h) => n(h.currentTarget.value),
                    style: { colorScheme: Ai() === 2 ? "light" : "dark" },
                }),
                r(N.FormTitle, null, "Timestamp Format"),
                r(
                    "div",
                    { className: ai("format-select") },
                    r(ro, {
                        options: gN.map((h) => ({ label: h, value: h })),
                        isSelected: (h) => h === i,
                        select: (h) => s(h),
                        serialize: (h) => h,
                        renderOptionLabel: (h) => r("div", { className: ai("format-label") }, Ne.parse(u(c, h.value))),
                        renderOptionValue: () => m,
                    })
                ),
                r(N.FormTitle, { className: O.bottom8 }, "Preview"),
                r(N.FormText, { className: ai("preview-text") }, m, " (", p, ")")
            ),
            r(
                St,
                null,
                r(
                    F,
                    {
                        onClick: () => {
                            Hn(p + " "), t();
                        },
                    },
                    "Insert"
                )
            )
        );
    }
    var t3 = ({ height: e = 20, width: t = 20, className: o }) =>
            r(
                "svg",
                {
                    "aria-hidden": "true",
                    role: "img",
                    width: t,
                    height: e,
                    className: o,
                    viewBox: "0 0 24 24",
                    style: { scale: "1.2" },
                },
                r(
                    "g",
                    { fill: "none", fillRule: "evenodd" },
                    r("path", {
                        fill: "currentColor",
                        d: "M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z",
                    }),
                    r("rect", { width: "24", height: "24" })
                )
            ),
        yN = ({ isAnyChat: e }) =>
            e
                ? r(
                      Sr,
                      {
                          tooltip: "Insert Timestamp",
                          onClick: () => {
                              let t = fe((o) => r(hN, { rootProps: o, close: () => un(t) }));
                          },
                          buttonProps: { "aria-haspopup": "dialog" },
                      },
                      r(t3, null)
                  )
                : null,
        hf = v({
            name: "SendTimestamps",
            description: "Send timestamps easily via chat box button & text shortcuts. Read the extended description!",
            authors: [d.Ven, d.Tyler, d.Grzesiek11],
            settings: V5,
            chatBarButton: { icon: t3, render: yN },
            onBeforeMessageSend(e, t) {
                V5.store.replaceMessageContents && (t.content = t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi, e3));
            },
            settingsAboutComponent() {
                let e = ["12:00", "3:51", "17:59", "24:00", "12:00 AM", "0:13PM"].map((t) => `\`${t}\``);
                return r(
                    f,
                    null,
                    r(
                        N.FormText,
                        null,
                        "To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"
                    ),
                    r(
                        N.FormText,
                        null,
                        "See below for examples. If you need anything more specific, use the Date button in the chat bar!"
                    ),
                    r(
                        N.FormText,
                        null,
                        "Examples:",
                        r(
                            "ul",
                            null,
                            e.map((t) => r("li", { key: t }, r("code", null, t), " ", "->", " ", Ne.parse(e3(t))))
                        )
                    )
                );
            },
        });
    a();
    l();
    T();
    S();
    a();
    l();
    Pe();
    se();
    re();
    Oe();
    pt();
    G();
    S();
    var o3 = ee("icon", "acronym", "childWrapper"),
        vN = ge("discriminatorClass:", ".isMobileOnline", "getAvatarURL"),
        to = Y("vc-gp-");
    function n3(e) {
        fe((t) => r(ve, { ...t, size: "medium" }, r(bN, { guild: e })));
    }
    var Gc = { friends: !1, blocked: !1, ignored: !1 };
    function r3(e) {
        return r(Vt, { timestamp: new Date(e) });
    }
    function bN({ guild: e }) {
        let [t, o] = k(),
            [n, i] = k(),
            [s, c] = k();
        te(() => {
            (Gc.friends = !1), (Gc.blocked = !1), (Gc.ignored = !1);
        }, []);
        let [u, p] = k(0),
            m = e.banner && bt.getGuildBannerURL(e, !0).replace(/\?size=\d+$/, "?size=1024"),
            h = e.icon && bt.getGuildIconURL({ id: e.id, icon: e.icon, canAnimate: !0, size: 512 });
        return r(
            "div",
            { className: to("root") },
            m &&
                u === 0 &&
                r("img", { className: to("banner"), src: m, alt: "", onClick: () => Co({ url: m, width: 1024 }) }),
            r(
                "div",
                { className: to("header") },
                h
                    ? r("img", {
                          className: to("icon"),
                          src: h,
                          alt: "",
                          onClick: () => Co({ url: h, height: 512, width: 512 }),
                      })
                    : r("div", { "aria-hidden": !0, className: L(o3.childWrapper, o3.acronym) }, ki(e)),
                r(
                    "div",
                    { className: to("name-and-description") },
                    r(N.FormTitle, { tag: "h5", className: to("name") }, e.name),
                    e.description && r(N.FormText, null, e.description)
                )
            ),
            r(
                Xo,
                { type: "top", look: "brand", className: to("tab-bar"), selectedItem: u, onItemSelect: p },
                r(Xo.Item, { className: to("tab", { selected: u === 0 }), id: 0 }, "Server Info"),
                r(
                    Xo.Item,
                    { className: to("tab", { selected: u === 1 }), id: 1 },
                    "Friends",
                    t !== void 0 ? ` (${t})` : ""
                ),
                r(
                    Xo.Item,
                    { className: to("tab", { selected: u === 2 }), id: 2 },
                    "Blocked Users",
                    n !== void 0 ? ` (${n})` : ""
                ),
                r(
                    Xo.Item,
                    { className: to("tab", { selected: u === 3 }), id: 3 },
                    "Ignored Users",
                    s !== void 0 ? ` (${s})` : ""
                )
            ),
            r(
                "div",
                { className: to("tab-content") },
                u === 0 && r(xN, { guild: e }),
                u === 1 && r(TN, { guild: e, setCount: o }),
                u === 2 && r(wN, { guild: e, setCount: i }),
                u === 3 && r(IN, { guild: e, setCount: c })
            )
        );
    }
    function SN(e, t) {
        let o = Se.getMember(e, t.id)?.avatar,
            n = o
                ? bt.getGuildMemberAvatarURLSimple({ userId: t.id, avatar: o, guildId: e, canAnimate: !0 })
                : bt.getUserAvatarURL(t, !0);
        return r(
            "div",
            { className: to("owner") },
            r("img", {
                className: to("owner-avatar"),
                src: n,
                alt: "",
                onClick: () => Co({ url: n, height: 512, width: 512 }),
            }),
            Ne.parse(`<@${t.id}>`)
        );
    }
    function xN({ guild: e }) {
        let [t] = _t(() => lo.getUser(e.ownerId), { deps: [e.ownerId], fallbackValue: null }),
            o = {
                "Server Owner": t ? SN(e.id, t) : "Loading...",
                "Created At": r3(vo.extractTimestamp(e.id)),
                "Joined At": e.joinedAt ? r3(e.joinedAt.getTime()) : "-",
                "Vanity Link": e.vanityURLCode ? r("a", null, `discord.gg/${e.vanityURLCode}`) : "-",
                "Preferred Locale": e.preferredLocale || "-",
                "Verification Level": ["None", "Low", "Medium", "High", "Highest"][e.verificationLevel] || "?",
                "Server Boosts": `${e.premiumSubscriberCount ?? 0} (Level ${e.premiumTier ?? 0})`,
                Channels: Gr.getChannels(e.id)?.count - 1 || "?",
                Roles: yt.getSortedRoles(e.id).length - 1,
            };
        return r(
            "div",
            { className: to("info") },
            Object.entries(o).map(([n, i]) =>
                r(
                    "div",
                    { className: to("server-info-pair"), key: n },
                    r(N.FormTitle, { tag: "h5" }, n),
                    typeof i == "string" ? r("span", null, i) : i
                )
            )
        );
    }
    function TN({ guild: e, setCount: t }) {
        return qy("friends", e, we.getFriendIDs(), t);
    }
    function wN({ guild: e, setCount: t }) {
        let o = we.getBlockedIDs();
        return qy("blocked", e, o, t);
    }
    function IN({ guild: e, setCount: t }) {
        let o = we.getIgnoredIDs();
        return qy("ignored", e, o, t);
    }
    function qy(e, t, o, n) {
        let i = [],
            s = [];
        for (let c of o) Se.isMember(t.id, c) ? s.push(c) : i.push(c);
        return (
            ie(
                [Se],
                () => Se.getMemberIds(t.id),
                null,
                (c, u) => c.length === u.length
            ),
            te(() => {
                !Gc[e] &&
                    i.length &&
                    ((Gc[e] = !0), B.dispatch({ type: "GUILD_MEMBERS_REQUEST", guildIds: [t.id], userIds: i }));
            }, []),
            te(() => n(s.length), [s.length]),
            r(
                On,
                { fade: !0, className: to("scroller") },
                s.map((c) =>
                    r(vN, {
                        key: c,
                        user: R.getUser(c),
                        status: no.getStatus(c) || "offline",
                        onSelect: () => No(c),
                        onContextMenu: () => {},
                    })
                )
            )
        );
    }
    var i3 = (e, { guild: t }) => {
            _e("privacy", e)?.push(r(M.MenuItem, { id: "vc-server-info", label: "Server Info", action: () => n3(t) }));
        },
        yf = v({
            name: "ServerInfo",
            description: "Allows you to view info about a server",
            authors: [d.Ven, d.Nuckyz],
            dependencies: ["DynamicImageModalAPI"],
            tags: ["guild", "info", "ServerProfile"],
            contextMenus: { "guild-context": i3, "guild-header-popout": i3 },
        });
    a();
    l();
    T();
    G();
    S();
    var s3 = it("UserGuildJoinRequestStore");
    function PN() {
        let e = ie([we, no], () => {
            let t = 0,
                o = we.getFriendIDs();
            for (let n of o) (no.getStatus(n) ?? "offline") !== "offline" && t++;
            return t;
        });
        return r(
            "span",
            {
                id: "vc-friendcount",
                style: {
                    display: "inline-block",
                    width: "100%",
                    fontSize: "12px",
                    fontWeight: "600",
                    color: "var(--text-default)",
                    textTransform: "uppercase",
                    textAlign: "center",
                },
            },
            e,
            " online"
        );
    }
    function MN() {
        let e = ie([Ce, s3], () => {
            let t = s3.computeGuildIds(),
                o = Ce.getGuilds();
            return Ce.getGuildCount() + t.filter((n) => o[n] == null).length;
        });
        return r(
            "span",
            {
                id: "vc-guildcount",
                style: {
                    display: "inline-block",
                    width: "100%",
                    fontSize: "12px",
                    fontWeight: "600",
                    color: "var(--text-default)",
                    textTransform: "uppercase",
                    textAlign: "center",
                },
            },
            e,
            " servers"
        );
    }
    var vf = v({
        name: "ServerListIndicators",
        description: "Add online friend count or server count in the server list",
        authors: [d.dzshn],
        dependencies: ["ServerListAPI"],
        options: {
            mode: {
                description: "mode",
                type: 4,
                options: [
                    { label: "Only online friend count", value: 2, default: !0 },
                    { label: "Only server count", value: 1 },
                    { label: "Both server and online friend counts", value: 3 },
                ],
            },
        },
        renderIndicator: () => {
            let { mode: e } = W.plugins.ServerListIndicators;
            return r(
                C,
                { noop: !0 },
                r("div", { style: { marginBottom: "4px" } }, !!(e & 2) && r(PN, null), !!(e & 1) && r(MN, null))
            );
        },
        start() {
            Oc(0, this.renderIndicator);
        },
        stop() {
            _c(0, this.renderIndicator);
        },
    });
    a();
    l();
    T();
    var bf = v({
        name: "ShowAllMessageButtons",
        description: "Always show all message buttons no matter if you are holding the shift key or not.",
        authors: [d.Nuckyz],
        patches: [
            {
                find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
                replacement: { match: /isExpanded:\i&&(.+?),/, replace: "isExpanded:$1," },
            },
        ],
    });
    a();
    l();
    Ue();
    T();
    se();
    G();
    S();
    a();
    l();
    se();
    G();
    S();
    var Ky = Ot((e) => e.colors?.INTERACTIVE_MUTED?.css),
        CN = ge("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}");
    function a3() {
        let e = cl(Ky.colors.INTERACTIVE_MUTED).hex(),
            t = cl(Ky.colors.INTERACTIVE_ICON_ACTIVE ?? Ky.colors.INTERACTIVE_ACTIVE).hex();
        return r(CN, {
            color: e,
            forcedIconColor: t,
            size: 16,
            tooltipText: Ae("CONNECTION_VERIFIED"),
            className: "vc-sc-tooltip-icon",
        });
    }
    var NN = de(".TWITTER_LEGACY:"),
        AN = X("isSupported", "getByUrl"),
        RN = de(".getPreviewThemeColors", "primaryColor:");
    var kN = (e) => (e ?? 0) * 2 + 4,
        Sf = w({
            iconSize: { type: 1, description: "Icon size (px)", default: 32 },
            iconSpacing: {
                type: 4,
                description: "Icon margin",
                default: 1,
                options: [
                    { label: "Compact", value: 0 },
                    { label: "Cozy", value: 1 },
                    { label: "Roomy", value: 2 },
                ],
            },
        }),
        DN = C.wrap((e) => r(LN, { ...e, id: e.user.id, theme: RN(e).theme }), { noop: !0 });
    function LN({ id: e, theme: t }) {
        let o = Bt.getUserProfile(e);
        if (!o) return null;
        let n = o.connectedAccounts;
        return n?.length
            ? r(
                  oe,
                  { gap: kN(Sf.store.iconSpacing), flexWrap: "wrap" },
                  n.map((i) => r(ON, { connection: i, theme: t, key: i.id }))
              )
            : null;
    }
    function ON({ connection: e, theme: t }) {
        let o = AN.get(NN(e.type)),
            n = o.getPlatformUserUrl?.(e),
            i = r("img", {
                "aria-label": e.name,
                src: t === "light" ? o.icon.lightSVG : o.icon.darkSVG,
                style: { width: Sf.store.iconSize, height: Sf.store.iconSize },
            }),
            s = n ? mi : en;
        return r(
            V,
            {
                text: r(
                    "span",
                    { className: "vc-sc-tooltip" },
                    r("span", { className: "vc-sc-connection-name" }, e.name),
                    e.verified && r(a3, null),
                    r(s, { height: 16, width: 16, className: "vc-sc-tooltip-icon" })
                ),
                key: e.id,
            },
            (c) =>
                n
                    ? r(
                          "a",
                          {
                              ...c,
                              className: "vc-user-connection",
                              href: n,
                              target: "_blank",
                              rel: "noreferrer",
                              onClick: (u) => {
                                  ke(Tn.name) && Tn.handleLink(u.currentTarget, u);
                              },
                          },
                          i
                      )
                    : r("button", { ...c, className: "vc-user-connection", onClick: () => tt(e.name) }, i)
        );
    }
    var xf = v({
        name: "ShowConnections",
        description: "Show connected accounts in user popouts",
        authors: [d.TheKodeToad],
        settings: Sf,
        patches: [
            {
                find: /\.POPOUT,onClose:\i}\),nicknameIcons:.+?\.isProvisional/,
                replacement: {
                    match: /userId:\i\.id,guild:\i\}\)(?=])/,
                    replace: "$&,$self.profilePopoutComponent(arguments[0])",
                },
            },
        ],
        profilePopoutComponent: DN,
    });
    a();
    l();
    T();
    Pe();
    re();
    G();
    S();
    a();
    l();
    re();
    dr();
    G();
    S();
    var Yy = ee("auto", "managedReactiveScroller", "customTheme"),
        _N = ge("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),
        EN = ge("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),
        BN = X("convertSurrogateToName"),
        UN = X("getURL", "getEmojiColors"),
        FN = { 0: "text", 5: "announcement", 15: "forum", 2: "voice", 13: "stage" },
        $N = { 0: "Latest activity", 1: "Creation date" },
        GN = { 0: "Not set", 1: "List view", 2: "Gallery view" },
        HN = { 1: "Automatic", 2: "720p" },
        zN = "/assets/433e3ec4319a9d11b0cbe39342614982.svg";
    function WN({ channel: e }) {
        let { defaultAllowedUsersAndRolesDropdownState: t } = Mn.use(["defaultAllowedUsersAndRolesDropdownState"]),
            [o, n] = k([]),
            {
                type: i,
                topic: s,
                lastMessageId: c,
                defaultForumLayout: u,
                lastPinTimestamp: p,
                defaultAutoArchiveDuration: m,
                availableTags: h,
                id: y,
                rateLimitPerUser: b,
                defaultThreadRateLimitPerUser: x,
                defaultSortOrder: P,
                defaultReactionEmoji: I,
                bitrate: D,
                rtcRegion: A,
                videoQualityMode: E,
                permissionOverwrites: q,
                guild_id: z,
            } = e;
        return (
            te(() => {
                let K = [],
                    ue = Ce.getGuild(z).ownerId;
                Se.getMember(z, ue) || K.push(ue),
                    Object.values(q).forEach(({ type: j, id: ne }) => {
                        j === 1 && !Se.getMember(z, ne) && K.push(ne);
                    }),
                    K.length > 0 && B.dispatch({ type: "GUILD_MEMBERS_REQUEST", guildIds: [z], userIds: K }),
                    W.plugins.PermissionsViewer.enabled &&
                        n(
                            _m(
                                Object.values(q).map((j) => ({
                                    type: j.type,
                                    id: j.id,
                                    overwriteAllow: j.allow,
                                    overwriteDeny: j.deny,
                                })),
                                z
                            )
                        );
            }, [y]),
            r(
                "div",
                { className: L(Yy.auto, Yy.customTheme, Yy.managedReactiveScroller) },
                r(
                    "div",
                    { className: Do("container") },
                    r("img", { className: Do("logo"), src: zN }),
                    r(
                        "div",
                        { className: Do("heading-container") },
                        r(
                            H,
                            { variant: "heading-xxl/bold" },
                            "This is a ",
                            Te.can(pe.VIEW_CHANNEL, e) ? "locked" : "hidden",
                            " ",
                            FN[i],
                            " channel"
                        ),
                        e.isNSFW() &&
                            r(V, { text: "NSFW" }, ({ onMouseLeave: K, onMouseEnter: ue }) =>
                                r(
                                    "svg",
                                    {
                                        onMouseLeave: K,
                                        onMouseEnter: ue,
                                        className: Do("heading-nsfw-icon"),
                                        width: "32",
                                        height: "32",
                                        viewBox: "0 0 48 48",
                                        "aria-hidden": !0,
                                        role: "img",
                                    },
                                    r("path", {
                                        fill: "currentColor",
                                        d: "M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z",
                                    })
                                )
                            )
                    ),
                    !e.isGuildVoice() &&
                        !e.isGuildStageVoice() &&
                        r(
                            H,
                            { variant: "text-lg/normal" },
                            "You can not see the ",
                            e.isForumChannel() ? "posts" : "messages",
                            " of this channel.",
                            e.isForumChannel() && s && s.length > 0 && " However you may see its guidelines:"
                        ),
                    e.isForumChannel() &&
                        s &&
                        s.length > 0 &&
                        r("div", { className: Do("topic-container") }, Ne.parseTopic(s, !1, { channelId: y })),
                    c &&
                        r(
                            H,
                            { variant: "text-md/normal" },
                            "Last ",
                            e.isForumChannel() ? "post" : "message",
                            " created:",
                            r(Vt, { timestamp: new Date(vo.extractTimestamp(c)) })
                        ),
                    p && r(H, { variant: "text-md/normal" }, "Last message pin: ", r(Vt, { timestamp: new Date(p) })),
                    (b ?? 0) > 0 && r(H, { variant: "text-md/normal" }, "Slowmode: ", Za(b, "seconds")),
                    (x ?? 0) > 0 && r(H, { variant: "text-md/normal" }, "Default thread slowmode: ", Za(x, "seconds")),
                    (e.isGuildVoice() || e.isGuildStageVoice()) &&
                        D != null &&
                        r(H, { variant: "text-md/normal" }, "Bitrate: ", D, " bits"),
                    A !== void 0 && r(H, { variant: "text-md/normal" }, "Region: ", A ?? "Automatic"),
                    (e.isGuildVoice() || e.isGuildStageVoice()) &&
                        r(H, { variant: "text-md/normal" }, "Video quality mode: ", HN[E ?? 1]),
                    (m ?? 0) > 0 &&
                        r(
                            H,
                            { variant: "text-md/normal" },
                            "Default inactivity duration before archiving ",
                            e.isForumChannel() ? "posts" : "threads",
                            ":",
                            " " + Za(m, "minutes")
                        ),
                    u != null && r(H, { variant: "text-md/normal" }, "Default layout: ", GN[u]),
                    P != null && r(H, { variant: "text-md/normal" }, "Default sort order: ", $N[P]),
                    I != null &&
                        r(
                            "div",
                            { className: Do("default-emoji-container") },
                            r(H, { variant: "text-md/normal" }, "Default reaction emoji:"),
                            Ne.defaultRules[I.emojiName ? "emoji" : "customEmoji"].react(
                                {
                                    name: I.emojiName
                                        ? BN.convertSurrogateToName(I.emojiName)
                                        : (Jo.getCustomEmojiById(I.emojiId)?.name ?? ""),
                                    emojiId: I.emojiId ?? void 0,
                                    surrogate: I.emojiName ?? void 0,
                                    src: I.emojiName ? UN.getURL(I.emojiName) : void 0,
                                },
                                void 0,
                                { key: 0 }
                            )
                        ),
                    e.hasFlag(16) &&
                        r(H, { variant: "text-md/normal" }, "Posts on this forum require a tag to be set."),
                    h &&
                        h.length > 0 &&
                        r(
                            "div",
                            { className: Do("tags-container") },
                            r(H, { variant: "text-lg/bold" }, "Available tags:"),
                            r(
                                "div",
                                { className: Do("tags") },
                                h.map((K) => r(EN, { tag: K, key: K.id }))
                            )
                        ),
                    r(
                        "div",
                        { className: Do("allowed-users-and-roles-container") },
                        r(
                            "div",
                            { className: Do("allowed-users-and-roles-container-title") },
                            ke(da.name) &&
                                r(V, { text: "Permission Details" }, ({ onMouseLeave: K, onMouseEnter: ue }) =>
                                    r(
                                        "button",
                                        {
                                            onMouseLeave: K,
                                            onMouseEnter: ue,
                                            className: Do("allowed-users-and-roles-container-permdetails-btn"),
                                            onClick: () => is(o, Ce.getGuild(e.guild_id), e.name),
                                        },
                                        r(
                                            "svg",
                                            { width: "24", height: "24", viewBox: "0 0 24 24" },
                                            r("path", {
                                                fill: "currentColor",
                                                d: "M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z",
                                            })
                                        )
                                    )
                                ),
                            r(H, { variant: "text-lg/bold" }, "Allowed users and roles:"),
                            r(
                                V,
                                { text: t ? "Hide Allowed Users and Roles" : "View Allowed Users and Roles" },
                                ({ onMouseLeave: K, onMouseEnter: ue }) =>
                                    r(
                                        "button",
                                        {
                                            onMouseLeave: K,
                                            onMouseEnter: ue,
                                            className: Do("allowed-users-and-roles-container-toggle-btn"),
                                            onClick: () => (Mn.store.defaultAllowedUsersAndRolesDropdownState = !t),
                                        },
                                        r(
                                            "svg",
                                            {
                                                width: "24",
                                                height: "24",
                                                viewBox: "0 0 24 24",
                                                transform: t ? "scale(1 -1)" : "scale(1 1)",
                                            },
                                            r("path", {
                                                fill: "currentColor",
                                                d: "M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z",
                                            })
                                        )
                                    )
                            )
                        ),
                        t && r(_N, { channel: e })
                    )
                )
            )
        );
    }
    var l3 = C.wrap(WN);
    var Do = Y("vc-shc-"),
        c3 = ee("modeSelected", "modeMuted", "unread", "icon");
    var jN = 1n << 20n,
        Mn = w({
            hideUnreads: { description: "Hide Unreads", type: 3, default: !0, restartNeeded: !0 },
            showMode: {
                description: "The mode used to display hidden channels.",
                type: 4,
                options: [
                    { label: "Plain style with Lock Icon instead", value: 0, default: !0 },
                    { label: "Muted style with hidden eye icon on the right", value: 1 },
                ],
                restartNeeded: !0,
            },
            defaultAllowedUsersAndRolesDropdownState: {
                description:
                    "Whether the allowed users and roles dropdown on hidden channels should be open by default",
                type: 3,
                default: !0,
            },
        });
    function qN(e) {
        return e.channel.id === "null" && e.channel.name === "Uncategorized" && e.comparator === -1;
    }
    var va = v({
        name: "ShowHiddenChannels",
        description: "Show channels that you do not have access to view.",
        authors: [d.BigDuck, d.AverageReactEnjoyer, d.D3SOX, d.Ven, d.Nuckyz, d.Nickyux, d.dzshn],
        settings: Mn,
        patches: [
            {
                find: '"placeholder-channel-id"',
                replacement: [
                    {
                        match: /if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\[\]}}/,
                        replace: "",
                    },
                    {
                        match: /(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,
                        replace: "$self.isHiddenChannel(this.record)||",
                    },
                    {
                        match: /(this\.record\)\?{renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,
                        replace: (e, t, o) => `${t}${o}`,
                    },
                    {
                        match: /(getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,
                        replace: (e, t) => `${t} `,
                    },
                ],
            },
            {
                find: "VoiceChannel, transitionTo: Channel does not have a guildId",
                replacement: [
                    {
                        match: /(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\)[^;]+?;return\()/,
                        replace: (e, t) => `!$self.isHiddenChannel(${t})&&`,
                    },
                    {
                        match: /(?=\|\|\i\.\i\.selectVoiceChannel\((\i)\.id\))/,
                        replace: (e, t) => `||$self.isHiddenChannel(${t})`,
                    },
                    {
                        match: /!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,
                        replace: (e, t) => `${e}$self.isHiddenChannel(${t},true)||`,
                    },
                ],
            },
            {
                find: ".AUDIENCE),{isSubscriptionGated",
                replacement: {
                    match: /(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,
                    replace: (e, t) => `${e}||$self.isHiddenChannel(${t})`,
                },
            },
            {
                find: 'tutorialId:"instant-invite"',
                replacement: [
                    ...["renderEditButton", "renderInviteButton"].map((e) => ({
                        match: new RegExp(`(?<=${e}\\(\\){)`, "g"),
                        replace: "if($self.isHiddenChannel(this.props.channel))return null;",
                    })),
                ],
            },
            {
                find: "VoiceChannel.renderPopout: There must always be something to render",
                all: !0,
                replacement: {
                    match: /(?<=renderOpenChatButton(?:",|=)\(\)=>{)/,
                    replace: "if($self.isHiddenChannel(this.props.channel))return null;",
                },
            },
            {
                find: "#{intl::CHANNEL_TOOLTIP_DIRECTORY}",
                predicate: () => Mn.store.showMode === 0,
                replacement: {
                    match: /(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,
                    replace: (e, t) => `if($self.isHiddenChannel(${t}))return $self.LockIcon;`,
                },
            },
            {
                find: "UNREAD_IMPORTANT:",
                predicate: () => Mn.store.showMode === 1,
                replacement: [
                    {
                        match: /Children\.count.+?;(?=return\(0,\i\.jsxs?\)\(\i\.\i,{focusTarget:)(?<={channel:(\i),name:\i,muted:(\i).+?;)/,
                        replace: (e, t, o) => `${e}${o}=$self.isHiddenChannel(${t})?true:${o};`,
                    },
                    {
                        match: /\.Children\.count.+?:null(?<=,channel:(\i).+?)/,
                        replace: (e, t) => `${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`,
                    },
                    {
                        match: /(?<=\?\i\.\i:\i\.\i,)(.{0,150}?)if\((\i)(?:\)return |\?)(\i\.MUTED)/,
                        replace: (e, t, o, n) => `${o}?${n}:"",${t}if(${o})return ""`,
                    },
                ],
            },
            {
                find: "UNREAD_IMPORTANT:",
                replacement: [
                    {
                        predicate: () => Mn.store.hideUnreads === !1 && Mn.store.showMode === 1,
                        match: /(?<=\.LOCKED;if\()(?<={channel:(\i).+?)/,
                        replace: (e, t) => `!$self.isHiddenChannel(${t})&&`,
                    },
                    {
                        predicate: () => Mn.store.hideUnreads === !0,
                        match: /Children\.count.+?;(?=return\(0,\i\.jsxs?\)\(\i\.\i,{focusTarget:)(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/,
                        replace: (e, t, o) => `${e}${o}=$self.isHiddenChannel(${t})?false:${o};`,
                    },
                ],
            },
            {
                find: '"ChannelListUnreadsStore"',
                replacement: {
                    match: /(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,
                    replace: (e, t) => `&&!$self.isHiddenChannel(${t})`,
                },
            },
            {
                find: "renderBottomUnread(){",
                replacement: {
                    match: /(?<=!0\))(?=&&\(0,\i\.\i\)\((\i\.record)\))/,
                    replace: "&&!$self.isHiddenChannel($1)",
                },
            },
            {
                find: "ignoreRecents:!0",
                replacement: {
                    match: /(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,
                    replace: "&&!$self.isHiddenChannel($1)",
                },
            },
            {
                find: "Missing channel in Channel.renderHeaderToolbar",
                replacement: [
                    {
                        match: /renderHeaderToolbar(?:",|=)\(\)=>{.+?case \i\.\i\.GUILD_TEXT:(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,
                        replace: (e, t, o, n) => `${e}if(!${n}&&$self.isHiddenChannel(${o})){${t};break;}`,
                    },
                    {
                        match: /renderHeaderToolbar(?:",|=)\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,
                        replace: (e, t, o, n) => `${e}if(!${n}&&$self.isHiddenChannel(${o})){${t};break;}`,
                    },
                    {
                        match: /renderMobileToolbar(?:",|=)\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,
                        replace: (e, t) => `${e}if($self.isHiddenChannel(${t}))break;`,
                    },
                    {
                        match: /(?<=renderHeaderBar(?:",|=)\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,
                        replace: (e, t) => `||$self.isHiddenChannel(${t})`,
                    },
                    {
                        match: /(?<=renderSidebar\(\){)/,
                        replace: "if($self.isHiddenChannel(this.props.channel))return null;",
                    },
                    {
                        match: /(?<=renderChat\(\){)/,
                        replace:
                            "if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);",
                    },
                ],
            },
            {
                find: '"MessageManager"',
                replacement: {
                    match: /forceFetch:\i,isPreload:.+?}=\i;(?=.+?getChannel\((\i)\))/,
                    replace: (e, t) => `${e}if($self.isHiddenChannel({channelId:${t}}))return;`,
                },
            },
            {
                find: '"alt+shift+down"',
                replacement: {
                    match: /(?<=getChannel\(\i\);return null!=(\i))(?=.{0,200}?>0\)&&\(0,\i\.\i\)\(\i\))/,
                    replace: (e, t) => `&&!$self.isHiddenChannel(${t})`,
                },
            },
            {
                find: ".APPLICATION_STORE&&null!=",
                replacement: {
                    match: /getState\(\)\.channelId.+?(?=\.map\(\i=>\i\.id)/,
                    replace: "$&.filter(e=>!$self.isHiddenChannel(e))",
                },
            },
            {
                find: "#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}",
                replacement: [
                    {
                        match: /(forceRoles:.+?)(\i\.\i\(\i\.\i\.ADMINISTRATOR,\i\.\i\.VIEW_CHANNEL\))(?<=context:(\i)}.+?)/,
                        replace: (e, t, o, n) => `${t}$self.swapViewChannelWithConnectPermission(${o},${n})`,
                    },
                    {
                        match: /permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,
                        replace: (e, t, o) =>
                            `${e}!Vencord.Webpack.Common.PermissionStore.can(${jN}n,${t})?${o}CONNECT):`,
                    },
                    {
                        match: /getSortedRoles.+?\.filter\(\i=>(?=!)/,
                        replace: (e) => `${e}$self.isHiddenChannel(arguments[0]?.channel)?true:`,
                    },
                    {
                        match: /forceRoles:.+?.value\(\)(?<=channel:(\i).+?)/,
                        replace: (e, t) => `${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`,
                    },
                    {
                        match: /return\(0,\i\.jsxs?\)\(\i\.\i,{channelId:(\i)\.id(?=.+?(\(0,\i\.jsxs?\)\("div",{className:\i\.\i,children:\[.{0,100}\i\.length>0.+?\]}\)),)/,
                        replace: (e, t, o) => `if($self.isHiddenChannel(${t},true)){return${o};}${e}`,
                    },
                    { match: /maxUsers:\d+?,users:\i(?<=channel:(\i).+?)/, replace: (e, t) => `${e},shcChannel:${t}` },
                    { match: /1!==\i\.length(?=\|\|)/, replace: "true" },
                ],
            },
            {
                find: '="interactive-text-default",overflowCountClassName:',
                replacement: [
                    { match: /let{users:\i,maxUsers:\i,/, replace: "let{shcChannel}=arguments[0];$&" },
                    {
                        match: /\i>0(?=&&!\i&&!\i)/,
                        replace: (e) =>
                            `($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`,
                    },
                    {
                        match: /(?<=`\+\$\{)\i(?=\})/,
                        replace: (e) =>
                            `$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&(${e}-1)<=0?"":${e}`,
                    },
                ],
            },
            {
                find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",
                replacement: [
                    {
                        match: /(?<=&&)\i\.push\(.{0,120}"chat-spacer"/,
                        replace: "(arguments[0]?.inCall||!$self.isHiddenChannel(arguments[0]?.channel,true))&&$&",
                    },
                ],
            },
            {
                find: "#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR}",
                replacement: [
                    {
                        match: /renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,
                        replace:
                            "$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):",
                    },
                    {
                        match: /renderContent\(\i\){.+?disableGradients:/,
                        replace: "$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||",
                    },
                    {
                        match: /(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,
                        replace: "$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:",
                    },
                    {
                        match: /(?=\i\|\|\i!==\i\.\i\.FULL_SCREEN.{0,100}?this\._callContainerRef)/,
                        replace: '$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":',
                    },
                ],
            },
            {
                find: '"HasBeenInStageChannel"',
                replacement: [
                    {
                        match: /screenMessage:(\i)\?.+?children:(?=!\1)(?<=let \i,{channel:(\i).+?)/,
                        replace: (e, t, o) => `${e}$self.isHiddenChannel(${o})?$self.HiddenChannelLockScreen(${o}):`,
                    },
                    {
                        match: /render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,
                        replace: (e, t) => `${e}$self.isHiddenChannel(${t})?null:`,
                    },
                    {
                        match: /"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,
                        replace: (e, t) => `${e}$self.isHiddenChannel(${t})||`,
                    },
                    {
                        match: /"124px".+?style:(?<=let \i,{channel:(\i).+?)/,
                        replace: (e, t) => `${e}$self.isHiddenChannel(${t})?void 0:`,
                    },
                ],
            },
            {
                find: "#{intl::STAGE_FULL_MODERATOR_TITLE}",
                replacement: [
                    {
                        match: /\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,
                        replace: (e, t) => `$self.isHiddenChannel(${t})?null:(${e})`,
                    },
                    {
                        match: /(?<=numRequestToSpeak:\i\}\)\}\):null,!\i&&)\(0,\i\.jsxs?\).{0,280}?iconClassName:/,
                        replace: "!$self.isHiddenChannel(arguments[0]?.channel,true)&&$&",
                    },
                ],
            },
            {
                find: ",queryStaticRouteChannels(",
                replacement: [
                    { match: /(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/, replace: ",true" },
                    {
                        match: /(?<=queryChannels\(\i\){.+?\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,
                        replace: "&&!$self.isHiddenChannel($1)",
                    },
                ],
            },
            {
                find: '"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',
                replacement: { match: /\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/, replace: "true" },
            },
            {
                find: 'getConfig({location:"channel_mention"})',
                replacement: {
                    match: /(?<=getChannel\(\i\);if\(null!=(\i)).{0,200}?return void (?=\i\.default\.selectVoiceChannel)/,
                    replace: (e, t) => `${e}!$self.isHiddenChannel(${t})&&`,
                },
            },
            {
                find: '"GuildChannelStore"',
                replacement: [
                    { match: /isChannelGated\(.+?\)(?=&&)/, replace: (e) => `${e}&&false` },
                    {
                        match: /(?<=getChannels\(\i)(\){.*?)return (.+?)}/,
                        replace: (e, t, o) =>
                            `,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??arguments[0]==="@favorites");}`,
                    },
                ],
            },
            { find: "GuildTooltip - ", replacement: { match: /(?<=getChannels\(\i)(?=\))/, replace: ",true" } },
            {
                find: '"NowPlayingViewStore"',
                replacement: {
                    match: /(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,
                    replace: "$1",
                },
            },
        ],
        swapViewChannelWithConnectPermission(e, t) {
            return Te.can(pe.CONNECT, t) || ((e &= ~pe.VIEW_CHANNEL), (e |= pe.CONNECT)), e;
        },
        isHiddenChannel(e, t = !1) {
            try {
                return e == null ||
                    (Object.hasOwn(e, "channelId") && e.channelId == null) ||
                    (e.channelId != null && (e = Z.getChannel(e.channelId)),
                    e == null || e.isDM() || e.isGroupDM() || e.isMultiUserDM()) ||
                    ["browse", "customize", "guide"].includes(e.id)
                    ? !1
                    : !Te.can(pe.VIEW_CHANNEL, e) || (t && !Te.can(pe.CONNECT, e));
            } catch (o) {
                return console.error("[ViewHiddenChannels#isHiddenChannel]: ", o), !1;
            }
        },
        resolveGuildChannels(e, t) {
            if (t) return e;
            let o = {};
            for (let [n, i] of Object.entries(e)) {
                if (!Array.isArray(i)) {
                    o[n] = i;
                    continue;
                }
                o[n] ??= [];
                for (let s of i) (qN(s) || s.channel.id === null || !this.isHiddenChannel(s.channel)) && o[n].push(s);
            }
            return o;
        },
        makeAllowedRolesReduce(e) {
            return [
                (t, o, n, i) => {
                    if (n !== 0) return t;
                    let s = i.find((c) => c.id === e);
                    return s ? [s] : i;
                },
                [],
            ];
        },
        HiddenChannelLockScreen: (e) => r(l3, { channel: e }),
        LockIcon: C.wrap(
            () =>
                r(
                    "svg",
                    {
                        className: c3.icon,
                        height: "18",
                        width: "20",
                        viewBox: "0 0 24 24",
                        "aria-hidden": !0,
                        role: "img",
                    },
                    r("path", {
                        fill: "currentcolor",
                        fillRule: "evenodd",
                        d: "M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z",
                    })
                ),
            { noop: !0 }
        ),
        HiddenChannelIcon: C.wrap(
            () =>
                r(V, { text: "Hidden Channel" }, ({ onMouseLeave: e, onMouseEnter: t }) =>
                    r(
                        "svg",
                        {
                            onMouseLeave: e,
                            onMouseEnter: t,
                            className: L(c3.icon, Do("hidden-channel-icon")),
                            width: "24",
                            height: "24",
                            viewBox: "0 0 24 24",
                            "aria-hidden": !0,
                            role: "img",
                        },
                        r("path", {
                            fill: "currentcolor",
                            fillRule: "evenodd",
                            d: "m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z",
                        })
                    )
                ),
            { noop: !0 }
        ),
    });
    a();
    l();
    T();
    le();
    var Zy = (e) => ({ type: 3, description: e, default: !0, restartNeeded: !0 }),
        ba = w({
            showTimeouts: Zy("Show member timeout icons in chat."),
            showInvitesPaused: Zy("Show the invites paused tooltip in the server list."),
            showModView: Zy("Show the member mod view context menu item in all servers."),
        }),
        Tf = v({
            name: "ShowHiddenThings",
            tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
            description: "Displays various hidden & moderator-only things regardless of permissions.",
            authors: [d.Dolfies],
            settings: ba,
            patches: [
                {
                    find: "showCommunicationDisabledStyles",
                    predicate: () => ba.store.showTimeouts,
                    replacement: {
                        match: /&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,
                        replace: "",
                    },
                },
                {
                    find: "INVITES_DISABLED)||",
                    predicate: () => ba.store.showInvitesPaused,
                    replacement: { match: /\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/, replace: "true" },
                },
                {
                    find: /,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,
                    predicate: () => ba.store.showModView,
                    replacement: {
                        match: /return \i\.\i\(\i\.\i\(\{user:\i,context:\i,checkElevated:!1\}\),\i\.\i\)/,
                        replace: "return true",
                    },
                },
                {
                    find: "#{intl::GUILD_MEMBER_MOD_VIEW_HIGHEST_ROLE}),children:",
                    predicate: () => ba.store.showModView,
                    replacement: {
                        match: /(#{intl::GUILD_MEMBER_MOD_VIEW_HIGHEST_ROLE}.{0,80})role:\i(?<=\[\i\.roles,\i\.highestRoleId,(\i)\].+?)/,
                        replace: (e, t, o) => `${t}role:$self.getHighestRole(arguments[0],${o})`,
                    },
                },
                {
                    find: 'action:"PRESS_MOD_VIEW",icon:',
                    predicate: () => ba.store.showModView,
                    replacement: { match: /\i(?=\?null)/, replace: "false" },
                },
            ],
            getHighestRole({ member: e }, t) {
                try {
                    return t.find((o) => o.id === e.highestRoleId);
                } catch (o) {
                    new U("ShowHiddenThings").error("Failed to find highest role", o);
                    return;
                }
            },
        });
    a();
    l();
    T();
    S();
    var u3 = w({
            mode: {
                type: 4,
                description: "How to display usernames and nicks",
                options: [
                    { label: "Username then nickname", value: "user-nick", default: !0 },
                    { label: "Nickname then username", value: "nick-user" },
                    { label: "Username only", value: "user" },
                ],
            },
            friendNicknames: {
                type: 4,
                description: "How to prioritise friend nicknames over server nicknames",
                options: [
                    { label: "Show friend nicknames only in direct messages", value: "dms", default: !0 },
                    { label: "Prefer friend nicknames over server nicknames", value: "always" },
                    { label: "Prefer server nicknames over friend nicknames", value: "fallback" },
                ],
            },
            displayNames: { type: 3, description: "Use display names in place of usernames", default: !1 },
            inReplies: { type: 3, default: !1, description: "Also apply functionality to reply previews" },
        }),
        wf = v({
            name: "ShowMeYourName",
            description: "Display usernames next to nicks, or no nicks at all",
            authors: [d.Rini, d.TheKodeToad, d.rae],
            patches: [
                {
                    find: '="SYSTEM_TAG"',
                    replacement: {
                        match: /(?<=onContextMenu:\i,children:)\i\?(?=.{0,100}?user[Nn]ame:)/,
                        replace: "$self.renderUsername(arguments[0]),_oldChildren:$&",
                    },
                },
            ],
            settings: u3,
            renderUsername: C.wrap(
                ({ author: e, channel: t, message: o, isRepliedMessage: n, withMentionPrefix: i, userOverride: s }) => {
                    try {
                        let { mode: c, friendNicknames: u, displayNames: p, inReplies: m } = u3.store,
                            h = s ?? o.author,
                            y = pl.enabled ? h.username[0] + "\u2026" : h.username;
                        p && (y = h.globalName || y);
                        let { nick: b } = e,
                            x = we.getNickname(e.authorId);
                        x && (u === "always" || (u === "dms" && t.isPrivate()) || (u === "fallback" && !b)) && (b = x);
                        let P = i ? "@" : "";
                        return (n && !m) || y.toLowerCase() === b.toLowerCase()
                            ? r(f, null, P, b)
                            : c === "user-nick"
                              ? r(f, null, P, y, " ", r("span", { className: "vc-smyn-suffix" }, b))
                              : c === "nick-user"
                                ? r(f, null, P, b, " ", r("span", { className: "vc-smyn-suffix" }, y))
                                : r(f, null, P, y);
                    } catch {
                        return r(f, null, e?.nick);
                    }
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    hi();
    T();
    se();
    pr();
    G();
    S();
    var KN = Lt(/#{intl::MAX_AGE_NEVER}/),
        YN = xs((e) => e.prototype?.render && KN.test(e.prototype.render.toString()));
    var p3 = w({
        displayStyle: {
            description: "How to display the timeout duration",
            type: 4,
            options: [
                { label: "In the Tooltip", value: "tooltip" },
                { label: "Next to the timeout icon", value: "ssalggnikool", default: !0 },
            ],
        },
    });
    function d3(e, t) {
        let o = Z.getChannel(e.channel_id)?.guild_id;
        if (!o) return null;
        let n = Se.getMember(o, e.author.id);
        if (!n?.communicationDisabledUntil) return null;
        let i = () => r(YN, { deadline: new Date(n.communicationDisabledUntil), showUnits: !0, stopAtOneSec: !0 });
        return (
            Ae("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING", { username: e.author.username, countdown: i }),
            t ? i() : Ae("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING", { username: e.author.username, countdown: i })
        );
    }
    var If = v({
        name: "ShowTimeoutDuration",
        description:
            "Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it",
        authors: [d.Ven, d.Sqaaakoi],
        settings: p3,
        patches: [
            {
                find: "#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}",
                replacement: [
                    {
                        match: /\i\.\i,{(text:.{0,30}#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}\))/,
                        replace: "$self.TooltipWrapper,{message:arguments[0].message,$1",
                    },
                ],
            },
        ],
        TooltipWrapper: C.wrap(
            ({ message: e, children: t, text: o }) =>
                p3.store.displayStyle === "tooltip"
                    ? r(Uo, { text: d3(e, !1) }, t)
                    : r(
                          "div",
                          { className: "vc-std-wrapper" },
                          r(Uo, { text: o }, t),
                          r(H, { variant: "text-md/normal", color: "status-danger" }, d3(e, !0), " timeout remaining")
                      ),
            { noop: !0 }
        ),
    });
    a();
    l();
    T();
    S();
    var Qy = !1,
        Xy = w({
            persistState: {
                type: 3,
                description: "Whether to persist the state of the silent message toggle when changing channels",
                default: !1,
                onChange(e) {
                    e === !1 && (Qy = !1);
                },
            },
            autoDisable: {
                type: 3,
                description: "Automatically disable the silent message toggle again after sending one",
                default: !0,
            },
        });
    function ZN() {
        return r(
            Jy,
            null,
            r(
                "mask",
                { id: "vc-silent-msg-mask" },
                r("path", { fill: "#fff", d: "M0 0h24v24H0Z" }),
                r("path", { stroke: "#000", strokeWidth: "5.99068", d: "M0 24 24 0" })
            ),
            r("path", {
                fill: "var(--status-danger)",
                d: "m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z",
            })
        );
    }
    var Jy = ({ height: e = 20, width: t = 20, className: o, children: n }) =>
            r(
                "svg",
                { width: t, height: e, viewBox: "0 0 24 24", className: o, style: { scale: "1.2" } },
                r("path", {
                    fill: "currentColor",
                    mask: "url(#vc-silent-msg-mask)",
                    d: "M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z",
                }),
                n
            ),
        QN = ({ isMainChat: e }) => {
            let [t, o] = k(Qy);
            function n(i) {
                Xy.store.persistState && (Qy = i), o(i);
            }
            return (
                te(() => {
                    let i = (s, c) => {
                        t &&
                            (Xy.store.autoDisable && n(!1),
                            c.content.startsWith("@silent ") || (c.content = "@silent " + c.content));
                    };
                    return Ui(i), () => void Fi(i);
                }, [t]),
                e
                    ? r(
                          Sr,
                          { tooltip: t ? "Disable Silent Message" : "Enable Silent Message", onClick: () => n(!t) },
                          t ? r(Jy, null) : r(ZN, null)
                      )
                    : null
            );
        },
        Pf = v({
            name: "SilentMessageToggle",
            authors: [d.Nuckyz, d.CatNoir],
            description: "Adds a button to the chat bar to toggle sending a silent message.",
            settings: Xy,
            chatBarButton: { icon: Jy, render: QN },
        });
    a();
    l();
    T();
    S();
    var Lr = w({
        showIcon: { type: 3, default: !1, description: "Show an icon for toggling the plugin", restartNeeded: !0 },
        contextMenu: {
            type: 3,
            description: "Add option to toggle the functionality in the chat input context menu",
            default: !0,
        },
        isEnabled: { type: 3, description: "Toggle functionality", default: !0 },
    });
    function XN() {
        return r(
            Vy,
            null,
            r(
                "mask",
                { id: "silent-typing-msg-mask" },
                r("path", { fill: "#fff", d: "M0 0h24v24H0Z" }),
                r("path", { stroke: "#000", strokeWidth: "5.99068", d: "M0 24 24 0", transform: "translate(-2, -3)" })
            ),
            r("path", {
                fill: "var(--status-danger)",
                d: "m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z",
            })
        );
    }
    var Vy = ({ height: e = 20, width: t = 20, className: o, children: n }) =>
            r(
                "svg",
                { width: t, height: e, className: o, viewBox: "0 0 24 24", style: { scale: "1.2" } },
                r("path", {
                    fill: "currentColor",
                    mask: "url(#silent-typing-msg-mask)",
                    d: "M18.333 15.556H1.667a1.667 1.667 0 0 1 -1.667 -1.667v-10a1.667 1.667 0 0 1 1.667 -1.667h16.667a1.667 1.667 0 0 1 1.667 1.667v10a1.667 1.667 0 0 1 -1.667 1.667M4.444 6.25V4.861a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333V8.194a0.417 0.417 0 0 0 -0.417 -0.417H4.306a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417H7.639a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m10 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h8.056a0.417 0.417 0 0 0 0.417 -0.417m3.333 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417",
                    transform: "translate(2, 3)",
                }),
                n
            ),
        JN = ({ isMainChat: e }) => {
            let { isEnabled: t, showIcon: o } = Lr.use(["isEnabled", "showIcon"]),
                n = () => (Lr.store.isEnabled = !Lr.store.isEnabled);
            return !e || !o
                ? null
                : r(
                      Sr,
                      { tooltip: t ? "Disable Silent Typing" : "Enable Silent Typing", onClick: n },
                      t ? r(XN, null) : r(Vy, null)
                  );
        },
        VN = (e) => {
            let { isEnabled: t, contextMenu: o } = Lr.use(["isEnabled", "contextMenu"]);
            if (!o) return;
            let n = _e("submit-button", e);
            if (!n) return;
            let i = n.findIndex((s) => s?.props?.id === "submit-button");
            n.splice(
                i + 1,
                0,
                r(M.MenuCheckboxItem, {
                    id: "vc-silent-typing",
                    label: "Enable Silent Typing",
                    checked: t,
                    action: () => (Lr.store.isEnabled = !Lr.store.isEnabled),
                })
            );
        },
        Mf = v({
            name: "SilentTyping",
            authors: [d.Ven, d.Rini, d.ImBanana],
            description: "Hide that you are typing",
            settings: Lr,
            contextMenus: { "textarea-context": VN },
            patches: [
                {
                    find: '.dispatch({type:"TYPING_START_LOCAL"',
                    replacement: {
                        match: /startTyping\(\i\){.+?},stop/,
                        replace: "startTyping:$self.startTyping,stop",
                    },
                },
            ],
            commands: [
                {
                    name: "silenttype",
                    description: "Toggle whether you're hiding that you're typing or not.",
                    inputType: 0,
                    options: [
                        {
                            name: "value",
                            description: "whether to hide or not that you're typing (default is toggle)",
                            required: !1,
                            type: 5,
                        },
                    ],
                    execute: async (e, t) => {
                        (Lr.store.isEnabled = !!Ao(e, "value", !Lr.store.isEnabled)),
                            rt(t.channel.id, {
                                content: Lr.store.isEnabled ? "Silent typing enabled!" : "Silent typing disabled!",
                            });
                    },
                },
            ],
            async startTyping(e) {
                Lr.store.isEnabled || B.dispatch({ type: "TYPING_START_LOCAL", channelId: e });
            },
            chatBarButton: { icon: Vy, render: JN },
        });
    a();
    l();
    hi();
    T();
    Pe();
    S();
    var eA = new Intl.DateTimeFormat(void 0, { month: "numeric", day: "numeric", year: "numeric" }),
        ev = Y("vc-sortFriendRequests-");
    function m3(e) {
        return new Date(we.getSince(e.id));
    }
    var f3 = w({
            showDates: { type: 3, description: "Show dates on friend requests", default: !1, restartNeeded: !0 },
        }),
        Cf = v({
            name: "SortFriendRequests",
            authors: [d.Megu],
            description: "Sorts friend requests by date of receipt",
            settings: f3,
            patches: [
                {
                    find: "getRelationshipCounts(){",
                    replacement: {
                        match: /\}\)\.sortBy\((.+?)\)\.value\(\)/,
                        replace: "}).sortBy(row => $self.wrapSort(($1), row)).value()",
                    },
                },
                {
                    find: "#{intl::FRIEND_REQUEST_CANCEL}",
                    replacement: {
                        predicate: () => f3.store.showDates,
                        match: /(?<=children:\[)\(0,.{0,100}user:\i,hovered:\i.+?(?=,\(0)(?<=user:(\i).+?)/,
                        replace: (e, t) => `$self.WrapperDateComponent({user:${t},children:${e}})`,
                    },
                },
            ],
            wrapSort(e, t) {
                return t.type === 3 || t.type === 4 ? -m3(t.user) : e(t);
            },
            WrapperDateComponent: C.wrap(
                ({ user: e, children: t }) => {
                    let o = m3(e);
                    return r(
                        "div",
                        { className: ev("wrapper") },
                        t,
                        !isNaN(o.getTime()) &&
                            r(
                                Uo,
                                { text: $n.dateFormat(o, "LLLL"), tooltipClassName: ev("tooltip") },
                                r(H, { variant: "text-xs/normal", className: ev("date") }, eA.format(o))
                            )
                    );
                },
                { noop: !0 }
            ),
        });
    a();
    l();
    T();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/spotifyControls/hoverOnly.css", {
        name: "src/plugins/spotifyControls/hoverOnly.css",
        source: `.vc-spotify-button-row {
    height: 0;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    transition-property: height;
}

#vc-spotify-player:hover .vc-spotify-button-row {
    opacity: 1;
    height: 32px;
    pointer-events: auto;

    /* only transition opacity on show to prevent clipping */
    transition-property: height, opacity;
}
`,
        classNames: {},
        dom: null,
    });
    var g3 = "src/plugins/spotifyControls/hoverOnly.css";
    a();
    l();
    Ue();
    Yo();
    lu();
    Pe();
    se();
    re();
    S();
    a();
    l();
    yi();
    S();
    var h3 = lt(() => {
        let e = Dn.$$vencordGetWrappedComponent();
        return class extends e {
            static getDerivedStateFromProps(o, n) {
                let i = super.getDerivedStateFromProps(o, n);
                return i && (i.value = o.initialValue), i;
            }
        };
    });
    a();
    l();
    G();
    S();
    var je = wo(() => {
        let { Store: e } = Ms,
            t = tl("getActiveSocketAndDevice"),
            o = X("vcSpotifyMarker"),
            n = "https://api.spotify.com/v1/me/player";
        class i extends e {
            mPosition = 0;
            _start = 0;
            track = null;
            device = null;
            isPlaying = !1;
            repeat = "off";
            shuffle = !1;
            volume = 0;
            isSettingPosition = !1;
            openExternal(u) {
                let p =
                    W.plugins.SpotifyControls.useSpotifyUris || ke(Tn.name)
                        ? "spotify:" + u.replaceAll("/", (m, h) => (h === 0 ? "" : ":"))
                        : "https://open.spotify.com" + u;
                VencordNative.native.openExternal(p);
            }
            get position() {
                let u = this.mPosition;
                return this.isPlaying && (u += Date.now() - this._start), u;
            }
            set position(u) {
                (this.mPosition = u), (this._start = Date.now());
            }
            prev() {
                this._req("post", "/previous");
            }
            next() {
                this._req("post", "/next");
            }
            setVolume(u) {
                this._req("put", "/volume", { query: { volume_percent: Math.round(u) } }).then(() => {
                    (this.volume = u), this.emitChange();
                });
            }
            setPlaying(u) {
                this._req("put", u ? "/play" : "/pause");
            }
            setRepeat(u) {
                this._req("put", "/repeat", { query: { state: u } });
            }
            setShuffle(u) {
                this._req("put", "/shuffle", { query: { state: u } }).then(() => {
                    (this.shuffle = u), this.emitChange();
                });
            }
            seek(u) {
                return this.isSettingPosition
                    ? Promise.resolve()
                    : ((this.isSettingPosition = !0),
                      this._req("put", "/seek", { query: { position_ms: Math.round(u) } }).catch((p) => {
                          console.error("[VencordSpotifyControls] Failed to seek", p), (this.isSettingPosition = !1);
                      }));
            }
            _req(u, p, m = {}) {
                this.device?.is_active && ((m.query ??= {}).device_id = this.device.id);
                let { socket: h } = t.getActiveSocketAndDevice();
                return o[u](h.accountId, h.accessToken, { url: n + p, ...m });
            }
        }
        let s = new i(B, {
            SPOTIFY_PLAYER_STATE(c) {
                (s.track = c.track),
                    (s.device = c.device ?? null),
                    (s.isPlaying = c.isPlaying ?? !1),
                    (s.volume = c.volumePercent ?? 0),
                    (s.repeat = c.actual_repeat || "off"),
                    (s.shuffle = c.shuffle ?? !1),
                    (s.position = c.position ?? 0),
                    (s.isSettingPosition = !1),
                    s.emitChange();
            },
            SPOTIFY_SET_DEVICES({ devices: c }) {
                (s.device = c.find((u) => u.is_active) ?? c[0] ?? null), s.emitChange();
            },
        });
        return s;
    });
    var Xe = Y("vc-spotify-");
    function tv(e) {
        let t = e / 1e3 / 60,
            o = Math.floor(t),
            n = Math.floor((t - o) * 60);
        return `${o.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
    }
    function Sa(e, t) {
        return () =>
            r(
                "svg",
                {
                    className: Xe("button-icon", t),
                    height: "24",
                    width: "24",
                    viewBox: "0 0 24 24",
                    fill: "currentColor",
                    "aria-label": t,
                    focusable: !1,
                },
                r("path", { d: e })
            );
    }
    var tA = Sa(
            "M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z",
            "play"
        ),
        oA = Sa(
            "M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z",
            "pause"
        ),
        rA = Sa(
            "M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z",
            "previous"
        ),
        nA = Sa(
            "M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z",
            "next"
        ),
        iA = Sa(
            "M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1V7zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1v3z",
            "repeat"
        ),
        sA = Sa(
            "M10.59 9.17L6.12 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.46 4.46 1.42-1.4zm4.76-4.32l1.19 1.19L4.7 17.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L17.96 7.46l1.19 1.19c.31.31.85.09.85-.36V4.5c0-.28-.22-.5-.5-.5h-3.79c-.45 0-.67.54-.36.85zm-.52 8.56l-1.41 1.41 3.13 3.13-1.2 1.2c-.31.31-.09.85.36.85h3.79c.28 0 .5-.22.5-.5v-3.79c0-.45-.54-.67-.85-.35l-1.19 1.19-3.13-3.14z",
            "shuffle"
        );
    function Hc(e) {
        return r("button", { className: Xe("button"), ...e }, e.children);
    }
    function aA({ name: e, type: t, path: o }) {
        return r(
            M.Menu,
            { navId: "vc-spotify-menu", onClose: st.closeContextMenu, "aria-label": `Spotify ${t} Menu` },
            r(M.MenuItem, { id: "vc-spotify-copy-name", label: `Copy ${t} Name`, action: () => tt(e), icon: en }),
            r(M.MenuItem, {
                id: "vc-spotify-copy-link",
                label: `Copy ${t} Link`,
                action: () => tt("https://open.spotify.com" + o),
                icon: mi,
            }),
            r(M.MenuItem, {
                id: "vc-spotify-open",
                label: `Open ${t} in Spotify`,
                action: () => je.openExternal(o),
                icon: Ko,
            })
        );
    }
    function lA() {
        let [e, t, o] = ie([je], () => [je.isPlaying, je.shuffle, je.repeat]),
            [n, i] = (() => {
                switch (o) {
                    case "off":
                        return ["context", "repeat-off"];
                    case "context":
                        return ["track", "repeat-context"];
                    case "track":
                        return ["off", "repeat-track"];
                    default:
                        throw new Error(`Invalid repeat state ${o}`);
                }
            })();
        return r(
            oe,
            { className: Xe("button-row"), gap: "0" },
            r(
                Hc,
                {
                    className: L(Xe("button"), Xe("shuffle"), Xe(t ? "shuffle-on" : "shuffle-off")),
                    onClick: () => je.setShuffle(!t),
                },
                r(sA, null)
            ),
            r(
                Hc,
                {
                    onClick: () => {
                        W.plugins.SpotifyControls.previousButtonRestartsTrack && je.position > 3e3
                            ? je.seek(0)
                            : je.prev();
                    },
                },
                r(rA, null)
            ),
            r(Hc, { onClick: () => je.setPlaying(!e) }, e ? r(oA, null) : r(tA, null)),
            r(Hc, { onClick: () => je.next() }, r(nA, null)),
            r(
                Hc,
                {
                    className: L(Xe("button"), Xe("repeat"), Xe(i)),
                    onClick: () => je.setRepeat(n),
                    style: { position: "relative" },
                },
                o === "track" && r("span", { className: Xe("repeat-1") }, "1"),
                r(iA, null)
            )
        );
    }
    var cA = kt((e) => {
        je.seek(e);
    });
    function uA() {
        let { duration: e } = je.track,
            [t, o, n] = ie([je], () => [je.mPosition, je.isSettingPosition, je.isPlaying]),
            [i, s] = k(t);
        te(() => {
            if (n && !o) {
                s(je.position);
                let u = setInterval(() => {
                    s((p) => p + 1e3);
                }, 1e3);
                return () => clearInterval(u);
            }
        }, [t, o, n]);
        let c = (u) => {
            o || (s(u), cA(u));
        };
        return r(
            "div",
            { id: Xe("progress-bar") },
            r(
                fi,
                {
                    size: "xs",
                    weight: "medium",
                    className: Xe("progress-time") + " " + Xe("time-left"),
                    "aria-label": "Progress",
                },
                tv(i)
            ),
            r(h3, {
                initialValue: i,
                minValue: 0,
                maxValue: e,
                onValueChange: c,
                asValueChanges: c,
                onValueRender: tv,
            }),
            r(
                fi,
                {
                    size: "xs",
                    weight: "medium",
                    className: Xe("progress-time") + " " + Xe("time-right"),
                    "aria-label": "Total Duration",
                },
                tv(e)
            )
        );
    }
    function pA({ track: e }) {
        let t = ie([je], () => je.volume);
        return r(
            M.Menu,
            {
                navId: "spotify-album-menu",
                onClose: () => B.dispatch({ type: "CONTEXT_MENU_CLOSE" }),
                "aria-label": "Spotify Album Menu",
            },
            r(M.MenuItem, {
                key: "open-album",
                id: "open-album",
                label: "Open Album",
                action: () => je.openExternal(`/album/${e.album.id}`),
                icon: Ko,
            }),
            r(M.MenuItem, {
                key: "view-cover",
                id: "view-cover",
                label: "View Album Cover",
                action: () => Co(e.album.image),
                icon: sr,
            }),
            r(M.MenuControlItem, {
                id: "spotify-volume",
                key: "spotify-volume",
                label: "Volume",
                control: (o, n) =>
                    r(M.MenuSliderControl, {
                        ...o,
                        ref: n,
                        value: t,
                        minValue: 0,
                        maxValue: 100,
                        onChange: kt((i) => je.setVolume(i)),
                    }),
            })
        );
    }
    function ov(e, t, o, n) {
        return t
            ? {
                  role: "link",
                  onClick: () => je.openExternal(n),
                  onContextMenu: (i) => st.openContextMenu(i, () => r(aA, { type: e, name: o, path: n })),
              }
            : {};
    }
    function dA({ track: e }) {
        let t = e?.album?.image,
            [o, n] = k(!1),
            i = r(
                f,
                null,
                t &&
                    r("img", {
                        id: Xe("album-image"),
                        src: t.url,
                        alt: "Album Image",
                        onClick: () => n(!o),
                        onContextMenu: (s) => {
                            st.openContextMenu(s, () => r(pA, { track: e }));
                        },
                    })
            );
        return o && t
            ? r("div", { id: Xe("album-expanded-wrapper") }, i)
            : r(
                  "div",
                  { id: Xe("info-wrapper") },
                  i,
                  r(
                      "div",
                      { id: Xe("titles") },
                      r(
                          Me,
                          {
                              weight: "semibold",
                              id: Xe("song-title"),
                              className: Xe("ellipoverflow"),
                              title: e.name,
                              ...ov("Song", e.id, e.name, `/track/${e.id}`),
                          },
                          e.name
                      ),
                      e.artists.some((s) => s.name) &&
                          r(
                              Me,
                              { className: Xe(["ellipoverflow", "secondary-song-info"]) },
                              r("span", { className: Xe("song-info-prefix") }, "by\xA0"),
                              e.artists.map((s, c) =>
                                  r(
                                      xe.Fragment,
                                      { key: s.name },
                                      r(
                                          "span",
                                          {
                                              className: Xe("artist"),
                                              style: { fontSize: "inherit" },
                                              title: s.name,
                                              ...ov("Artist", s.id, s.name, `/artist/${s.id}`),
                                          },
                                          s.name
                                      ),
                                      c !== e.artists.length - 1 && r("span", { className: Xe("comma") }, ", ")
                                  )
                              )
                          ),
                      e.album.name &&
                          r(
                              Me,
                              { className: Xe(["ellipoverflow", "secondary-song-info"]) },
                              r("span", { className: Xe("song-info-prefix") }, "on\xA0"),
                              r(
                                  "span",
                                  {
                                      id: Xe("album-title"),
                                      className: Xe("album"),
                                      style: { fontSize: "inherit" },
                                      title: e.album.name,
                                      ...ov("Album", e.album.id, e.album.name, `/album/${e.album.id}`),
                                  },
                                  e.album.name
                              )
                          )
                  )
              );
    }
    function y3() {
        let e = ie(
                [je],
                () => je.track,
                null,
                (c, u) => (c?.id ? c.id === u?.id : c?.name === u?.name)
            ),
            t = ie(
                [je],
                () => je.device,
                null,
                (c, u) => c?.id === u?.id
            ),
            o = ie([je], () => je.isPlaying),
            [n, i] = k(!1);
        if (
            (xe.useEffect(() => {
                if ((i(!1), !o)) {
                    let c = setTimeout(() => i(!0), 3e5);
                    return () => clearTimeout(c);
                }
            }, [o]),
            !e || !t?.is_active || n)
        )
            return null;
        let s = { "--vc-spotify-track-image": `url(${e?.album?.image?.url || ""})` };
        return r("div", { id: Xe("player"), style: s }, r(dA, { track: e }), r(uA, null), r(lA, null));
    }
    function v3(e) {
        (e ? Go : Ho)(g3);
    }
    var Nf = v({
        name: "SpotifyControls",
        description: "Adds a Spotify player above the account panel",
        authors: [d.Ven, d.afn, d.KraXen72, d.Av32000, d.nin0dev],
        options: {
            hoverControls: { description: "Show controls on hover", type: 3, default: !1, onChange: (e) => v3(e) },
            useSpotifyUris: {
                type: 3,
                description:
                    "Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",
                default: !1,
            },
            previousButtonRestartsTrack: {
                type: 3,
                description: "Restart currently playing track when pressing the previous button if playtime is >3s",
                default: !0,
            },
        },
        patches: [
            {
                find: ".DISPLAY_NAME_STYLES_COACHMARK),",
                replacement: {
                    match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,occluded:)/,
                    replace: "$self.PanelWrapper,{VencordOriginal:$1,",
                },
            },
            {
                find: ".PLAYER_DEVICES",
                replacement: [
                    {
                        match: /get:(\i)\.bind\(null,(\i\.\i)\.get\)/,
                        replace: "post:$1.bind(null,$2.post),vcSpotifyMarker:1,$&",
                    },
                    { match: /202===\i\.status/, replace: "false" },
                ],
            },
            {
                find: 'repeat:"off"!==',
                replacement: [
                    {
                        match: /repeat:"off"!==(\i),/,
                        replace: "shuffle:arguments[2]?.shuffle_state??false,actual_repeat:$1,$&",
                    },
                    { match: /(?<=artists.filter\(\i=>).{0,10}\i\.id\)&&/, replace: "" },
                ],
            },
        ],
        start: () => v3(W.plugins.SpotifyControls.hoverControls),
        PanelWrapper({ VencordOriginal: e, ...t }) {
            return r(
                f,
                null,
                r(
                    C,
                    {
                        fallback: () =>
                            r(
                                "div",
                                { className: "vc-spotify-fallback" },
                                r("p", null, "Failed to render Spotify Modal :("),
                                r("p", null, "Check the console for errors")
                            ),
                    },
                    r(y3, null)
                ),
                r(e, { ...t })
            );
        },
    });
    a();
    l();
    T();
    var rv = w({
            noSpotifyAutoPause: { description: "Disable Spotify auto-pause", type: 3, default: !0, restartNeeded: !0 },
            keepSpotifyActivityOnIdle: {
                description: "Keep Spotify activity playing when idling",
                type: 3,
                default: !1,
                restartNeeded: !0,
            },
        }),
        Af = v({
            name: "SpotifyCrack",
            description:
                "Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",
            authors: [d.Cyn, d.Nuckyz],
            settings: rv,
            patches: [
                {
                    find: 'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',
                    replacement: {
                        match: /SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,
                        replace: (e, t) => `${e}(${t}.body.product="premium")&&`,
                    },
                },
                {
                    find: "}getPlayableComputerDevices(){",
                    replacement: [
                        {
                            predicate: () => rv.store.noSpotifyAutoPause,
                            match: /(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,
                            replace: "return;",
                        },
                        {
                            predicate: () => rv.store.keepSpotifyActivityOnIdle,
                            match: /(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,
                            replace: "$1",
                        },
                    ],
                },
            ],
        });
    a();
    l();
    T();
    se();
    G();
    S();
    var mA = X("getPlayerState"),
        fA = X("getPendingReply");
    function nv(e, t) {
        return {
            name: e,
            description: `Share your current Spotify ${e} in chat`,
            inputType: 0,
            options: [Ol],
            execute(o, { channel: n }) {
                let i = mA.getTrack();
                if (!i) return rt(n.id, { content: "You're not listening to any music." });
                if (i.id == null) return rt(n.id, { content: "Failed to find the track on spotify." });
                let s = t(i),
                    c = Ao(o, "message");
                Ri(
                    n.id,
                    { content: c ? `${c} ${s}` : s },
                    !1,
                    bo.getSendMessageOptionsForReply(fA.getPendingReply(n.id))
                ).then(() => {
                    B.dispatch({ type: "DELETE_PENDING_REPLY", channelId: n.id });
                });
            },
        };
    }
    var Rf = v({
        name: "SpotifyShareCommands",
        description: "Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",
        authors: [d.katlyn],
        commands: [
            nv("track", (e) => `https://open.spotify.com/track/${e.id}`),
            nv("album", (e) => `https://open.spotify.com/album/${e.album.id}`),
            nv("artist", (e) => e.artists[0].external_urls.spotify),
        ],
    });
    a();
    l();
    Ue();
    T();
    a();
    l();
    G();
    S();
    var zc = X("markWithDelta", "markAndLog", "markAt");
    function gA({ emoji: e, prefix: t, log: o, delta: n, instance: i }) {
        return r(
            xe.Fragment,
            null,
            r("span", null, i.sinceStart.toFixed(3), "s"),
            r("span", null, i.sinceLast.toFixed(3), "s"),
            r("span", null, n?.toFixed(0) ?? ""),
            r("span", null, r("pre", null, e, " ", t ?? " ", o))
        );
    }
    function hA({ title: e, logs: t, traceEnd: o }) {
        let n = t.find((c) => c.timestamp)?.timestamp ?? 0,
            i = n,
            s = t.map((c) => {
                let u = c.timestamp ?? i,
                    p = (u - n) / 1e3,
                    m = (u - i) / 1e3;
                return (i = u), { sinceStart: p, sinceLast: m };
            });
        return r(
            "section",
            null,
            r(N.FormTitle, { tag: "h2" }, e),
            r(
                "code",
                null,
                o &&
                    r(
                        "div",
                        { style: { color: "var(--text-strong)", marginBottom: 5, userSelect: "text" } },
                        "Trace ended at: ",
                        new Date(o).toTimeString()
                    ),
                r(
                    "div",
                    {
                        style: {
                            color: "var(--text-strong)",
                            display: "grid",
                            gridTemplateColumns: "repeat(3, auto) 1fr",
                            gap: "2px 10px",
                            userSelect: "text",
                        },
                    },
                    r("span", null, "Start"),
                    r("span", null, "Interval"),
                    r("span", null, "Delta"),
                    r("span", { style: { marginBottom: 5 } }, "Event"),
                    zc.logs.map((c, u) => r(gA, { key: u, ...c, instance: s[u] }))
                )
            )
        );
    }
    function yA({ trace: e }) {
        let t = e.split(`
`);
        return r(
            "section",
            null,
            r(N.FormTitle, { tag: "h3" }, "Server Trace"),
            r(
                "code",
                null,
                r(
                    oe,
                    { flexDirection: "column", gap: "5px", style: { color: "var(--text-strong)", userSelect: "text" } },
                    t.map((o, n) => r("span", { key: n }, o))
                )
            )
        );
    }
    function vA() {
        if (!zc?.logs) return r("div", null, "Loading...");
        let e = zc.logGroups.find((t) => t.serverTrace)?.serverTrace;
        return r(
            xe.Fragment,
            null,
            r(hA, { title: "Startup Timings", logs: zc.logs, traceEnd: zc.endTime_ }),
            r("div", { style: { marginTop: 5 } }, "\xA0"),
            e && r(yA, { trace: e })
        );
    }
    var b3 = C.wrap(vA);
    var kf = v({
        name: "StartupTimings",
        description: "Adds Startup Timings to the Settings menu",
        authors: [d.Megu],
        start() {
            Cr.customEntries.push({
                key: "vencord_startup_timings",
                title: "Startup Timings",
                Component: b3,
                Icon: th,
            }),
                Cr.settingsSectionMap.push(["VencordStartupTimings", "vencord_startup_timings"]);
        },
        stop() {
            function e(t, o) {
                let n = t.findIndex(o);
                n !== -1 && t.splice(n, 1);
            }
            e(Cr.customEntries, (t) => t.key === "vencord_startup_timings"),
                e(Cr.settingsSectionMap, (t) => t[1] === "vencord_startup_timings");
        },
    });
    a();
    l();
    T();
    var Df = v({
        name: "StickerPaste",
        description:
            "Makes picking a sticker in the sticker picker insert it into the chatbox instead of instantly sending",
        authors: [d.ImBanana],
        patches: [
            {
                find: ".stickers,previewSticker:",
                replacement: { match: /if\(\i\.\i\.getUploadCount/, replace: "return true;$&" },
            },
        ],
    });
    a();
    l();
    T();
    S();
    function S3({ streamKey: e }, t) {
        e.endsWith(R.getCurrentUser().id) && B.dispatch({ type: "STREAMER_MODE_UPDATE", key: "enabled", value: t });
    }
    var Lf = v({
        name: "StreamerModeOnStream",
        description: "Automatically enables streamer mode when you start streaming in Discord",
        authors: [d.IcedMarina],
        flux: { STREAM_CREATE: (e) => S3(e, !0), STREAM_DELETE: (e) => S3(e, !1) },
    });
    a();
    l();
    T();
    S();
    var Of = w(
            {
                superReactByDefault: {
                    type: 3,
                    description: "Reaction picker will default to Super Reactions",
                    default: !0,
                },
                unlimitedSuperReactionPlaying: {
                    type: 3,
                    description: "Remove the limit on Super Reactions playing at once",
                    default: !1,
                },
                superReactionPlayingLimit: {
                    description: "Max Super Reactions to play at once. 0 to disable playing Super Reactions",
                    type: 5,
                    default: 20,
                    markers: [0, 5, 10, 20, 40, 60, 80, 100],
                    stickToMarkers: !0,
                },
            },
            {
                superReactionPlayingLimit: {
                    disabled() {
                        return this.store.unlimitedSuperReactionPlaying;
                    },
                },
            }
        ),
        _f = v({
            name: "SuperReactionTweaks",
            description: "Customize the limit of Super Reactions playing at once, and super react by default",
            authors: [d.FieryFlames, d.ant0n],
            patches: [
                {
                    find: ",BURST_REACTION_EFFECT_PLAY",
                    replacement: [
                        {
                            match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=5+?(?=\))/,
                            replace: (e, t, o) => `${t}!$self.shouldPlayBurstReaction(${o})`,
                        },
                        {
                            match: /((\i)=5.+?)if\((.{0,20}?)>=\2\)return;/,
                            replace: (e, t, o) => `${t}if(!$self.shouldPlayBurstReaction(${o}))return;`,
                            noWarn: !0,
                        },
                    ],
                },
                {
                    find: ".EMOJI_PICKER_CONSTANTS_EMOJI_CONTAINER_PADDING_HORIZONTAL)",
                    replacement: {
                        match: /(openPopoutType:void 0(?=.+?isBurstReaction:(\i).+?(\i===\i\.\i.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,
                        replace: (e, t, o, n) => `${t}$self.shouldSuperReactByDefault&&${n})`,
                    },
                },
            ],
            settings: Of,
            shouldPlayBurstReaction(e) {
                return !!(Of.store.unlimitedSuperReactionPlaying || Of.store.superReactionPlayingLimit > e);
            },
            get shouldSuperReactByDefault() {
                return Of.store.superReactByDefault && R.getCurrentUser().premiumType != null;
            },
        });
    a();
    l();
    Ue();
    T();
    le();
    S();
    var w3 = () => ({ find: "", replace: "", onlyIfIncludes: "" }),
        x3 = () => [w3()],
        Ef = w({
            replace: {
                type: 6,
                component: () => {
                    let { stringRules: e, regexRules: t } = Ef.use(["stringRules", "regexRules"]);
                    return r(
                        f,
                        null,
                        r(T3, { title: "Using String", rulesArray: e }),
                        r(T3, { title: "Using Regex", rulesArray: t }),
                        r(SA, null)
                    );
                },
            },
            stringRules: { type: 7, default: x3() },
            regexRules: { type: 7, default: x3() },
        });
    function I3(e) {
        let t = e.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/);
        return t
            ? new RegExp(
                  t[2],
                  t[3]
                      ?.split("")
                      .filter((o, n, i) => i.indexOf(o) === n)
                      .join("") ?? "g"
              )
            : new RegExp(e);
    }
    function bA(e) {
        try {
            return I3(e), null;
        } catch (t) {
            return r("span", { style: { color: "var(--text-feedback-critical)" } }, String(t));
        }
    }
    function iv({ initialValue: e, onChange: t, placeholder: o }) {
        let [n, i] = k(e);
        return r(ht, { placeholder: o, value: n, onChange: i, spellCheck: !1, onBlur: () => n !== e && t(n) });
    }
    function T3({ title: e, rulesArray: t }) {
        let o = e === "Using Regex";
        async function n(s) {
            s !== t.length - 1 && t.splice(s, 1);
        }
        async function i(s, c, u) {
            c === t.length - 1 && t.push(w3()),
                (t[c][u] = s),
                t[c].find === "" &&
                    t[c].replace === "" &&
                    t[c].onlyIfIncludes === "" &&
                    c !== t.length - 1 &&
                    t.splice(c, 1);
        }
        return r(
            f,
            null,
            r(N.FormTitle, { tag: "h4" }, e),
            r(
                oe,
                { flexDirection: "column", style: { gap: "0.5em" } },
                t.map((s, c) =>
                    r(
                        xe.Fragment,
                        { key: `${s.find}-${c}` },
                        r(
                            oe,
                            { gap: "0.5em", flexDirection: "row", style: { flexGrow: 1 } },
                            r(iv, { placeholder: "Find", initialValue: s.find, onChange: (u) => i(u, c, "find") }),
                            r(iv, {
                                placeholder: "Replace",
                                initialValue: s.replace,
                                onChange: (u) => i(u, c, "replace"),
                            }),
                            r(iv, {
                                placeholder: "Only if includes",
                                initialValue: s.onlyIfIncludes,
                                onChange: (u) => i(u, c, "onlyIfIncludes"),
                            }),
                            r(
                                F,
                                {
                                    size: F.Sizes.MIN,
                                    onClick: () => n(c),
                                    style: {
                                        background: "none",
                                        color: "var(--status-danger)",
                                        ...(c === t.length - 1 ? { visibility: "hidden", pointerEvents: "none" } : {}),
                                    },
                                },
                                r(ar, null)
                            )
                        ),
                        o && bA(s.find)
                    )
                )
            )
        );
    }
    function SA() {
        let [e, t] = k("");
        return r(
            f,
            null,
            r(N.FormTitle, { tag: "h4" }, "Test Rules"),
            r(ht, { placeholder: "Type a message", onChange: t }),
            r(ht, { placeholder: "Message with rules applied", editable: !1, value: P3(e) })
        );
    }
    function P3(e) {
        if (e.length === 0) return e;
        for (let t of Ef.store.stringRules)
            t.find &&
                ((t.onlyIfIncludes && !e.includes(t.onlyIfIncludes)) ||
                    (e = ` ${e} `
                        .replaceAll(
                            t.find,
                            t.replace.replaceAll(
                                "\\n",
                                `
`
                            )
                        )
                        .replace(/^\s|\s$/g, "")));
        for (let t of Ef.store.regexRules)
            if (t.find && !(t.onlyIfIncludes && !e.includes(t.onlyIfIncludes)))
                try {
                    let o = I3(t.find);
                    e = e.replace(
                        o,
                        t.replace.replaceAll(
                            "\\n",
                            `
`
                        )
                    );
                } catch {
                    new U("TextReplace").error(`Invalid regex: ${t.find}`);
                }
        return (e = e.trim()), e;
    }
    var xA = "1102784112584040479",
        Bf = v({
            name: "TextReplace",
            description:
                "Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",
            authors: [d.AutumnVN, d.TheKodeToad],
            settings: Ef,
            onBeforeMessageSend(e, t) {
                e !== xA && (t.content = P3(t.content));
            },
        });
    a();
    l();
    T();
    le();
    S();
    var Uf = v({
        name: "ThemeAttributes",
        description: "Adds data attributes to various elements for theming purposes",
        authors: [d.Ven, d.Board],
        patches: [
            {
                find: ".tabBarRef",
                replacement: {
                    match: /style:this\.getStyle\(\),role:"tab"/,
                    replace: "$&,'data-tab-id':this.props.id",
                },
            },
            {
                find: "Message must not be a thread starter message",
                replacement: {
                    match: /"aria-setsize":-1,(?=.{0,150}?#{intl::MESSAGE_A11Y_ROLE_DESCRIPTION})/,
                    replace: "...$self.getMessageProps(arguments[0]),$&",
                },
            },
            {
                find: "#{intl::LABEL_WITH_ONLINE_STATUS}",
                replacement: [
                    {
                        match: /src:(\i)\?\?void 0.{1,50}"aria-hidden":!0/,
                        replace: "$&,style:$self.getAvatarStyles($1)",
                    },
                ],
            },
            {
                find: "showCommunicationDisabledStyles",
                replacement: { match: /src:(\i),"aria-hidden":!0/, replace: "$&,style:$self.getAvatarStyles($1)" },
            },
        ],
        getAvatarStyles(e) {
            return !e || e.startsWith("data:")
                ? {}
                : Object.fromEntries(
                      [128, 256, 512, 1024, 2048, 4096].map((t) => [
                          `--avatar-url-${t}`,
                          `url(${e.replace(/\d+$/, String(t))})`,
                      ])
                  );
        },
        getMessageProps(e) {
            try {
                let t = e.message?.author,
                    o = t?.id;
                return {
                    "data-author-id": o,
                    "data-author-username": t?.username,
                    "data-is-self": o && o === R.getCurrentUser()?.id,
                };
            } catch (t) {
                return new U("ThemeAttributes").error("Error in getMessageProps", t), {};
            }
        },
    });
    a();
    l();
    T();
    S();
    a();
    l();
    var gt = w({
        receivedInput: {
            type: 0,
            description: "Language that received messages should be translated from",
            default: "auto",
            hidden: !0,
        },
        receivedOutput: {
            type: 0,
            description: "Language that received messages should be translated to",
            default: "en",
            hidden: !0,
        },
        sentInput: {
            type: 0,
            description: "Language that your own messages should be translated from",
            default: "auto",
            hidden: !0,
        },
        sentOutput: {
            type: 0,
            description: "Language that your own messages should be translated to",
            default: "en",
            hidden: !0,
        },
        service: {
            type: 4,
            description: "Translation service (Not supported on Web!)",
            disabled: () => !0,
            options: [
                { label: "Google Translate", value: "google", default: !0 },
                { label: "DeepL Free", value: "deepl" },
                { label: "DeepL Pro", value: "deepl-pro" },
            ],
            onChange: M3,
        },
        deeplApiKey: {
            type: 0,
            description: "DeepL API key",
            default: "",
            placeholder: "Get your API key from https://deepl.com/your-account",
            disabled: () => !0,
        },
        autoTranslate: {
            type: 3,
            description:
                "Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",
            default: !1,
        },
        showAutoTranslateTooltip: {
            type: 3,
            description: "Show a tooltip on the ChatBar button whenever a message is automatically translated",
            default: !0,
        },
    }).withPrivateSettings();
    function M3() {
        (gt.store.receivedInput = "auto"),
            (gt.store.receivedOutput = "en"),
            (gt.store.sentInput = "auto"),
            (gt.store.sentOutput = "en");
    }
    a();
    l();
    re();
    Oe();
    S();
    a();
    l();
    Qt();
    Nn();
    Oe();
    S();
    a();
    l();
    Pe();
    S();
    a();
    l();
    var sv = {
        auto: "Detect language",
        af: "Afrikaans",
        sq: "Albanian",
        am: "Amharic",
        ar: "Arabic",
        hy: "Armenian",
        as: "Assamese",
        ay: "Aymara",
        az: "Azerbaijani",
        bm: "Bambara",
        eu: "Basque",
        be: "Belarusian",
        bn: "Bengali",
        bho: "Bhojpuri",
        bs: "Bosnian",
        bg: "Bulgarian",
        ca: "Catalan",
        ceb: "Cebuano",
        ny: "Chichewa",
        "zh-CN": "Chinese (Simplified)",
        "zh-TW": "Chinese (Traditional)",
        co: "Corsican",
        hr: "Croatian",
        cs: "Czech",
        da: "Danish",
        dv: "Dhivehi",
        doi: "Dogri",
        nl: "Dutch",
        en: "English",
        eo: "Esperanto",
        et: "Estonian",
        ee: "Ewe",
        tl: "Filipino",
        fi: "Finnish",
        fr: "French",
        fy: "Frisian",
        gl: "Galician",
        ka: "Georgian",
        de: "German",
        el: "Greek",
        gn: "Guarani",
        gu: "Gujarati",
        ht: "Haitian Creole",
        ha: "Hausa",
        haw: "Hawaiian",
        iw: "Hebrew",
        hi: "Hindi",
        hmn: "Hmong",
        hu: "Hungarian",
        is: "Icelandic",
        ig: "Igbo",
        ilo: "Ilocano",
        id: "Indonesian",
        ga: "Irish",
        it: "Italian",
        ja: "Japanese",
        jw: "Javanese",
        kn: "Kannada",
        kk: "Kazakh",
        km: "Khmer",
        rw: "Kinyarwanda",
        gom: "Konkani",
        ko: "Korean",
        kri: "Krio",
        ku: "Kurdish (Kurmanji)",
        ckb: "Kurdish (Sorani)",
        ky: "Kyrgyz",
        lo: "Lao",
        la: "Latin",
        lv: "Latvian",
        ln: "Lingala",
        lt: "Lithuanian",
        lg: "Luganda",
        lb: "Luxembourgish",
        mk: "Macedonian",
        mai: "Maithili",
        mg: "Malagasy",
        ms: "Malay",
        ml: "Malayalam",
        mt: "Maltese",
        mi: "Maori",
        mr: "Marathi",
        "mni-Mtei": "Meiteilon (Manipuri)",
        lus: "Mizo",
        mn: "Mongolian",
        my: "Myanmar (Burmese)",
        ne: "Nepali",
        no: "Norwegian",
        or: "Odia (Oriya)",
        om: "Oromo",
        ps: "Pashto",
        fa: "Persian",
        pl: "Polish",
        pt: "Portuguese",
        pa: "Punjabi",
        qu: "Quechua",
        ro: "Romanian",
        ru: "Russian",
        sm: "Samoan",
        sa: "Sanskrit",
        gd: "Scots Gaelic",
        nso: "Sepedi",
        sr: "Serbian",
        st: "Sesotho",
        sn: "Shona",
        sd: "Sindhi",
        si: "Sinhala",
        sk: "Slovak",
        sl: "Slovenian",
        so: "Somali",
        es: "Spanish",
        su: "Sundanese",
        sw: "Swahili",
        sv: "Swedish",
        tg: "Tajik",
        ta: "Tamil",
        tt: "Tatar",
        te: "Telugu",
        th: "Thai",
        ti: "Tigrinya",
        ts: "Tsonga",
        tr: "Turkish",
        tk: "Turkmen",
        ak: "Twi",
        uk: "Ukrainian",
        ur: "Urdu",
        ug: "Uyghur",
        uz: "Uzbek",
        vi: "Vietnamese",
        cy: "Welsh",
        xh: "Xhosa",
        yi: "Yiddish",
        yo: "Yoruba",
        zu: "Zulu",
    };
    var Or = Y("vc-trans-"),
        UMe = VencordNative.pluginHelpers.Translate,
        C3 = () => sv;
    async function Wc(e, t) {
        let o = TA;
        try {
            return await o(t, gt.store[`${e}Input`], gt.store[`${e}Output`]);
        } catch (n) {
            let i =
                typeof n == "string"
                    ? n
                    : "Something went wrong. If this issue persists, please check the console or ask for help in the support server.";
            throw (Ge(i, J.Type.FAILURE), n instanceof Error ? n : new Error(i));
        }
    }
    async function TA(e, t, o) {
        let n =
                "https://translate-pa.googleapis.com/v1/translate?" +
                new URLSearchParams({
                    "params.client": "gtx",
                    dataTypes: "TRANSLATION",
                    key: "AIzaSyDLEeFI5OtFBwYBIoK_jj5m32rZK5CkCXA",
                    "query.sourceLanguage": t,
                    "query.targetLanguage": o,
                    "query.text": e,
                }),
            i = await g(n);
        if (!i.ok)
            throw new Error(`Failed to translate "${e}" (${t} -> ${o})
${i.status} ${i.statusText}`);
        let { sourceLanguage: s, translation: c } = await i.json();
        return { sourceLanguage: sv[s] ?? s, text: c };
    }
    var FMe = dn(() => Ge("Deepl API quota exceeded. Falling back to Google Translate", J.Type.FAILURE));
    var wA = ["receivedInput", "receivedOutput", "sentInput", "sentOutput"];
    function IA({ settingsKey: e, includeAuto: t }) {
        let o = gt.use([e])[e],
            n = ce(() => {
                let i = Object.entries(C3()).map(([s, c]) => ({ value: s, label: c }));
                return t || i.shift(), i;
            }, []);
        return r(
            "section",
            { className: O.bottom16 },
            r(N.FormTitle, { tag: "h3" }, gt.def[e].description),
            r(Is, {
                options: n,
                value: n.find((i) => i.value === o)?.value,
                placeholder: "Select a language",
                maxVisibleItems: 5,
                closeOnSelect: !0,
                onChange: (i) => (gt.store[e] = i),
            })
        );
    }
    function PA() {
        let e = gt.use(["autoTranslate"]).autoTranslate;
        return r(cr, {
            title: "Auto Translate",
            description: gt.def.autoTranslate.description,
            value: e,
            onChange: (t) => (gt.store.autoTranslate = t),
            hideBorder: !0,
        });
    }
    function N3({ rootProps: e }) {
        return r(
            ve,
            { ...e },
            r(
                Re,
                { className: Or("modal-header") },
                r(N.FormTitle, { tag: "h2", className: Or("modal-title") }, "Translate"),
                r(et, { onClick: e.onClose })
            ),
            r(
                Ie,
                { className: Or("modal-content") },
                wA.map((t) => r(IA, { key: t, settingsKey: t, includeAuto: t.endsWith("Input") })),
                r(Fe, { className: O.bottom16 }),
                r(PA, null)
            )
        );
    }
    var li = ({ height: e = 20, width: t = 20, className: o }) =>
            r(
                "svg",
                { viewBox: "0 96 960 960", height: e, width: t, className: L(Or("icon"), o) },
                r("path", {
                    fill: "currentColor",
                    d: "m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z",
                })
            ),
        jc,
        A3 = ({ isMainChat: e }) => {
            let { autoTranslate: t } = gt.use(["autoTranslate"]),
                [o, n] = k(!1);
            if ((te(() => ((jc = n), () => (jc = void 0)), []), !e)) return null;
            let i = () => {
                    let c = !t;
                    (gt.store.autoTranslate = c),
                        c &&
                            gt.store.showAutoTranslateAlert !== !1 &&
                            Qe.show({
                                title: "Vencord Auto-Translate Enabled",
                                body: r(
                                    f,
                                    null,
                                    r(
                                        N.FormText,
                                        null,
                                        "You just enabled Auto Translate! Any message ",
                                        r("b", null, "will automatically be translated"),
                                        " before being sent."
                                    )
                                ),
                                confirmText: "Disable Auto-Translate",
                                cancelText: "Got it",
                                secondaryConfirmText: "Don't show again",
                                onConfirmSecondary: () => (gt.store.showAutoTranslateAlert = !1),
                                onConfirm: () => (gt.store.autoTranslate = !1),
                                confirmColor: "vc-notification-log-danger-btn",
                            });
                },
                s = r(
                    Sr,
                    {
                        tooltip: "Open Translate Modal",
                        onClick: (c) => {
                            if (c.shiftKey) return i();
                            fe((u) => r(N3, { rootProps: u }));
                        },
                        onContextMenu: i,
                        buttonProps: { "aria-haspopup": "dialog" },
                    },
                    r(li, { className: Or({ "auto-translate": t, "chat-button": !0 }) })
                );
            return o && gt.store.showAutoTranslateTooltip
                ? r(V, { text: "Auto Translate Enabled", forceOpen: !0 }, () => s)
                : s;
        };
    a();
    l();
    S();
    var av = new Map();
    function lv(e, t) {
        av.get(e)(t);
    }
    function MA({ onDismiss: e }) {
        return r("button", { onClick: e, className: Or("dismiss") }, "Dismiss");
    }
    function R3({ message: e }) {
        let [t, o] = k();
        return (
            te(() => {
                if (!e.vencordEmbeddedBy) return av.set(e.id, o), () => void av.delete(e.id);
            }, []),
            t
                ? r(
                      "span",
                      { className: Or("accessory") },
                      r(li, { width: 16, height: 16, className: Or("accessory-icon") }),
                      Ne.parse(t.text),
                      r("br", null),
                      "(translated from ",
                      t.sourceLanguage,
                      " - ",
                      r(MA, { onDismiss: () => o(void 0) }),
                      ")"
                  )
                : null
        );
    }
    var CA = (e, { message: t }) => {
        let o = D3(t);
        if (!o) return;
        let n = _e("copy-text", e);
        n &&
            n.splice(
                n.findIndex((i) => i?.props?.id === "copy-text") + 1,
                0,
                r(M.MenuItem, {
                    id: "vc-trans",
                    label: "Translate",
                    icon: li,
                    action: async () => {
                        let i = await Wc("received", o);
                        lv(t.id, i);
                    },
                })
            );
    };
    function D3(e) {
        return (
            e.content ||
            e.messageSnapshots?.[0]?.message.content ||
            e.embeds?.find((t) => t.type === "auto_moderation_message")?.rawDescription ||
            ""
        );
    }
    var k3,
        Ff = v({
            name: "Translate",
            description: "Translate messages with Google Translate or DeepL",
            authors: [d.Ven, d.AshtonMemer],
            settings: gt,
            contextMenus: { message: CA },
            translate: Wc,
            renderMessageAccessory: (e) => r(R3, { message: e.message }),
            chatBarButton: { icon: li, render: A3 },
            messagePopoverButton: {
                icon: li,
                render(e) {
                    let t = D3(e);
                    return t
                        ? {
                              label: "Translate",
                              icon: li,
                              message: e,
                              channel: Z.getChannel(e.channel_id),
                              onClick: async () => {
                                  let o = await Wc("received", t);
                                  lv(e.id, o);
                              },
                          }
                        : null;
                },
            },
            async onBeforeMessageSend(e, t) {
                if (!gt.store.autoTranslate || !t.content) return;
                jc?.(!0), clearTimeout(k3), (k3 = setTimeout(() => jc?.(!1), 2e3));
                let o = await Wc("sent", t.content);
                t.content = o.text;
            },
        });
    a();
    l();
    a();
    l();
    T();
    se();
    le();
    S();
    a();
    l();
    (unsafeWindow.VencordStyles ??= new Map()).set("src/plugins/typingTweaks/style.css", {
        name: "src/plugins/typingTweaks/style.css",
        source: `.vc-typing-user {
    cursor: pointer;

    [class*="wrapper"] {
        display: inline-block;
        margin-right: 0.25em;
        vertical-align: -4px;
    }
}`,
        classNames: {},
        dom: null,
    });
    var L3 = "src/plugins/typingTweaks/style.css";
    var $f = w({
            showAvatars: { type: 3, default: !0, description: "Show avatars in the typing indicator" },
            showRoleColors: { type: 3, default: !0, description: "Show role colors in the typing indicator" },
            alternativeFormatting: {
                type: 3,
                default: !0,
                description: "Show a more useful message when several users are typing",
            },
        }),
        cv = C.wrap(
            function ({ users: t, count: o, guildId: n }) {
                return r(
                    f,
                    null,
                    t.slice(0, o).map((i) => r(xe.Fragment, { key: i.id }, r(O3, { user: i, guildId: n }), ", ")),
                    "and ",
                    o,
                    " others are typing..."
                );
            },
            { noop: !0 }
        ),
        O3 = C.wrap(
            function ({ user: t, guildId: o }) {
                return r(
                    "strong",
                    {
                        className: "vc-typing-user",
                        role: "button",
                        onClick: () => {
                            No(t.id);
                        },
                        style: { color: $f.store.showRoleColors ? Se.getMember(o, t.id)?.colorString : void 0 },
                    },
                    $f.store.showAvatars && r(al, { size: "SIZE_16", src: t.getAvatarURL(o, 128) }),
                    Se.getNick(o, t.id) || (!o && we.getNickname(t.id)) || t.globalName || t.username
                );
            },
            { noop: !0 }
        ),
        Gf = v({
            name: "TypingTweaks",
            description: "Show avatars and role colours in the typing indicator",
            authors: [d.zt, d.sadan],
            settings: $f,
            managedStyle: L3,
            patches: [
                {
                    find: "#{intl::SEVERAL_USERS_TYPING_STRONG}",
                    group: !0,
                    replacement: [
                        {
                            match: /(?<="aria-atomic":!0,children:)\i/,
                            replace:
                                "$self.renderTypingUsers({ users: arguments[0]?.typingUserObjects, guildId: arguments[0]?.channel?.guild_id, children: $& })",
                        },
                        {
                            match: /(?<=function \i\(\i\)\{)(?=[^}]+?\{channel:\i,isThreadCreation:\i=!1,\.\.\.\i\})/,
                            replace: "let typingUserObjects = $self.useTypingUsers(arguments[0]?.channel);",
                        },
                        {
                            match: /typingUsers:(\i)\?\[\]:\i,/,
                            replace:
                                "$&typingUserObjects: $1 || typeof typingUserObjects === 'undefined' ? [] : typingUserObjects,",
                        },
                        {
                            match: /(&&\(\i=)\i\.\i\.format\(\i\.\i#{intl::SEVERAL_USERS_TYPING_STRONG},\{\}\)/,
                            replace:
                                "$1$self.buildSeveralUsers({ users: arguments[0]?.typingUserObjects, count: arguments[0]?.typingUserObjects?.length - 2, guildId: arguments[0]?.channel?.guild_id })",
                            predicate: () => $f.store.alternativeFormatting,
                        },
                    ],
                },
            ],
            useTypingUsers(e) {
                try {
                    if (!e) throw new Error("No channel");
                    let t = ie([cn], () => cn.getTypingUsers(e.id)),
                        o = ie([Kt], () => Kt.getId());
                    return Object.keys(t)
                        .filter((n) => n && n !== o && !we.isBlockedOrIgnored(n))
                        .map((n) => R.getUser(n))
                        .filter(Tr);
                } catch (t) {
                    return new U("TypingTweaks").error("Failed to get typing users:", t), [];
                }
            },
            buildSeveralUsers: cv,
            renderTypingUsers: C.wrap(
                ({ guildId: e, users: t, children: o }) => {
                    try {
                        if (!Array.isArray(o)) return o;
                        let n = 0;
                        return o.map((i) => {
                            if (i.type !== "strong" && !(typeof i != "string" && !xe.isValidElement(i))) return i;
                            let s = t[n++];
                            return r(O3, { key: s.id, guildId: e, user: s });
                        });
                    } catch (n) {
                        new U("TypingTweaks").error("Failed to render typing users:", n);
                    }
                    return o;
                },
                { noop: !0 }
            ),
        });
    T();
    se();
    G();
    S();
    var NA = ge("Math.min(1,Math.max(", "dotRadius:");
    function xa(e, t) {
        let o = R.getUser(t);
        return Se.getNick(e, t) ?? o.globalName ?? o.username;
    }
    function AA({ channelId: e, guildId: t }) {
        let o = ie(
                [cn],
                () => ({ ...cn.getTypingUsers(e) }),
                null,
                (h, y) => {
                    let b = Object.keys(h),
                        x = Object.keys(y);
                    return b.length === x.length && x.every((P) => h[P] != null);
                }
            ),
            n = ie([Le], () => Le.getChannelId());
        if ((!Ta.store.includeMutedChannels && ml.isChannelMuted(t, e)) || (!Ta.store.includeCurrentChannel && n === e))
            return null;
        let i = R.getCurrentUser()?.id,
            s = Object.keys(o).filter((h) => h !== i && !(we.isBlocked(h) && !Ta.store.includeBlockedUsers)),
            [c, u, p] = s,
            m;
        switch (s.length) {
            case 0:
                break;
            case 1: {
                m = Ae("ONE_USER_TYPING", { a: xa(t, c) });
                break;
            }
            case 2: {
                m = Ae("TWO_USERS_TYPING", { a: xa(t, c), b: xa(t, u) });
                break;
            }
            case 3: {
                m = Ae("THREE_USERS_TYPING", { a: xa(t, c), b: xa(t, u), c: xa(t, p) });
                break;
            }
            default: {
                m = W.plugins.TypingTweaks.enabled
                    ? cv({ users: [c, u].map(R.getUser), count: s.length - 2, guildId: t })
                    : Ae("SEVERAL_USERS_TYPING");
                break;
            }
        }
        return s.length > 0
            ? r(V, { text: m }, (h) =>
                  r(
                      "div",
                      { className: "vc-typing-indicator", ...h },
                      (Ta.store.indicatorMode & 2) === 2 &&
                          r(
                              "div",
                              {
                                  onClick: (y) => {
                                      y.stopPropagation(), y.preventDefault();
                                  },
                                  onKeyPress: (y) => y.stopPropagation(),
                              },
                              r(fr, {
                                  users: s.map((y) => R.getUser(y)),
                                  guildId: t,
                                  renderIcon: !1,
                                  max: 3,
                                  showDefaultAvatarsForNullUsers: !0,
                                  showUserPopout: !0,
                                  size: 16,
                                  className: "vc-typing-indicator-avatars",
                              })
                          ),
                      (Ta.store.indicatorMode & 1) === 1 &&
                          r("div", { className: "vc-typing-indicator-dots" }, r(NA, { dotRadius: 3, themed: !0 }))
                  )
              )
            : null;
    }
    var Ta = w({
            includeCurrentChannel: {
                type: 3,
                description: "Whether to show the typing indicator for the currently selected channel",
                default: !0,
            },
            includeMutedChannels: {
                type: 3,
                description: "Whether to show the typing indicator for muted channels.",
                default: !1,
            },
            includeBlockedUsers: {
                type: 3,
                description: "Whether to show the typing indicator for blocked users.",
                default: !1,
            },
            indicatorMode: {
                type: 4,
                description: "How should the indicator be displayed?",
                options: [
                    { label: "Avatars and animated dots", value: 3, default: !0 },
                    { label: "Animated dots", value: 1 },
                    { label: "Avatars", value: 2 },
                ],
            },
        }),
        Hf = v({
            name: "TypingIndicator",
            description: "Adds an indicator if someone is typing on a channel.",
            authors: [d.Nuckyz, d.fawn, d.Sqaaakoi],
            settings: Ta,
            patches: [
                {
                    find: "UNREAD_IMPORTANT:",
                    replacement: {
                        match: /\.Children\.count.+?:null(?<=,channel:(\i).+?)/,
                        replace: "$&,$self.TypingIndicator($1.id,$1.getGuildId())",
                    },
                },
                {
                    find: "M0 15H2c0 1.6569",
                    replacement: {
                        match: /mentionsCount:\i.+?null(?<=channel:(\i).+?)/,
                        replace: "$&,$self.TypingIndicator($1.id,$1.getGuildId())",
                    },
                },
            ],
            TypingIndicator: (e, t) => r(C, { noop: !0 }, r(AA, { channelId: e, guildId: t })),
        });
    a();
    l();
    T();
    var zf = v({
        name: "Unindent",
        description: "Trims leading indentation from codeblocks",
        authors: [d.Ven],
        patches: [
            {
                find: "inQuote:",
                replacement: {
                    match: /,content:([^,]+),inQuote/,
                    replace: (e, t) => `,content:$self.unindent(${t}),inQuote`,
                },
            },
        ],
        unindent(e) {
            e = e.replace(/\t/g, "    ");
            let t = e.match(/^ *(?=\S)/gm)?.reduce((o, n) => Math.min(o, n.length), 1 / 0) ?? 0;
            return t ? e.replace(new RegExp(`^ {${t}}`, "gm"), "") : e;
        },
        unindentMsg(e) {
            e.content = e.content.replace(/```(.|\n)*?```/g, (t) => {
                let o = t.split(`
`);
                if (o.length < 2) return t;
                let n = "";
                return (
                    o[o.length - 1] === "```" && (n = o.pop()),
                    `${o[0]}
${this.unindent(
    o.slice(1).join(`
`)
)}
${n}`
                );
            });
        },
        onBeforeMessageSend(e, t) {
            return this.unindentMsg(t);
        },
        onBeforeMessageEdit(e, t, o) {
            return this.unindentMsg(o);
        },
    });
    a();
    l();
    T();
    var RA = w({ zoomMultiplier: { type: 5, description: "Zoom multiplier", markers: yr(2, 16), default: 4 } }),
        Wf = v({
            name: "UnlockedAvatarZoom",
            description: "Allows you to zoom in further in the image crop tool when changing your avatar",
            authors: [d.nakoyasha],
            settings: RA,
            patches: [
                {
                    find: "#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",
                    replacement: { match: /maxValue:\d/, replace: "maxValue:$self.settings.store.zoomMultiplier" },
                },
            ],
        });
    a();
    l();
    Ue();
    T();
    S();
    var uv = 4,
        kA = (e, { channel: t, message: { author: o, messageSnapshots: n, embeds: i, flags: s, id: c } }) => {
            let u = (s & uv) !== 0,
                p = n.some((b) => b.message.embeds.length);
            if (!u && !i.length && !p) return;
            let m = t.isPrivate() || !!(Te.getChannelPermissions({ id: t.id }) & pe.EMBED_LINKS);
            if (o.id === R.getCurrentUser().id && !m) return;
            let h = _e("delete", e),
                y = h?.findIndex((b) => b?.props?.id === "delete");
            !y ||
                !h ||
                h.splice(
                    y - 1,
                    0,
                    r(M.MenuItem, {
                        id: "unsuppress-embeds",
                        key: "unsuppress-embeds",
                        label: u ? "Unsuppress Embeds" : "Suppress Embeds",
                        color: u ? void 0 : "danger",
                        icon: u ? Ua : ms,
                        action: () =>
                            Ct.patch({ url: vt.Endpoints.MESSAGE(t.id, c), body: { flags: u ? s & ~uv : s | uv } }),
                    })
                );
        },
        jf = v({
            name: "UnsuppressEmbeds",
            authors: [d.rad, d.HypedDomi],
            description: "Allows you to unsuppress embeds in messages",
            contextMenus: { message: kA },
        });
    a();
    l();
    T();
    a();
    l();
    se();
    re();
    G();
    S();
    a();
    l();
    var wa = w({
        pronounsFormat: {
            type: 4,
            description: "The format for pronouns to appear in chat",
            options: [
                { label: "Lowercase", value: "LOWERCASE", default: !0 },
                { label: "Capitalized", value: "CAPITALIZED" },
            ],
        },
        showSelf: { type: 3, description: "Enable or disable showing pronouns for yourself", default: !0 },
    });
    a();
    l();
    se();
    S();
    function DA(e, t = !1) {
        let o = ie([Bt], () => Bt.getUserProfile(e)?.pronouns),
            n = ie([Bt], () => Bt.getGuildMemberProfile(e, Mo()?.getGuildId())?.pronouns);
        return t ? o : n || o;
    }
    function _3(e, t = !1) {
        let o = DA(e, t)?.trim().replace(/\n+/g, "");
        return wa.store.pronounsFormat === "LOWERCASE" ? o?.toLowerCase() : o;
    }
    var E3 = ee("timestampInline", "timestamp"),
        LA = To("textAndImages", "messageDisplayCompact"),
        OA = 24;
    function B3(e) {
        return !(
            e.author.bot ||
            e.author.system ||
            e.type === OA ||
            (!wa.store.showSelf && e.author.id === R.getCurrentUser().id)
        );
    }
    function U3({ message: e }) {
        let t = _3(e.author.id);
        return (
            t &&
            r(V, { text: Ae("USER_PROFILE_PRONOUNS") }, (o) =>
                r("span", { ...o, className: L(E3.timestampInline, E3.timestamp) }, "\u2022 ", t)
            )
        );
    }
    var F3 = C.wrap(({ message: e }) => (B3(e) ? r(U3, { message: e }) : null), { noop: !0 }),
        $3 = C.wrap(({ message: e }) => (!LA.useSetting() || !B3(e) ? null : r(U3, { message: e })), { noop: !0 });
    br("UserMessagesPronouns", "PronounDB");
    var qf = v({
        name: "UserMessagesPronouns",
        authors: [d.Tyman, d.TheKodeToad, d.Ven, d.Elvyra],
        description: "Adds pronouns to chat user messages",
        settings: wa,
        patches: [
            {
                find: "showCommunicationDisabledStyles",
                replacement: {
                    match: /(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,
                    replace: "[$1, $self.PronounsChatComponentWrapper(arguments[0])]",
                },
            },
            {
                find: '="SYSTEM_TAG"',
                replacement: [
                    {
                        match: /className:\i\(\)\(\i\.className(?:,\i\.\i)?,\i\)\}\)(?:\))?,(?=\i)/g,
                        replace: "$&$self.CompactPronounsChatComponentWrapper(arguments[0]),",
                    },
                ],
            },
        ],
        PronounsChatComponentWrapper: F3,
        CompactPronounsChatComponentWrapper: $3,
    });
    a();
    l();
    T();
    a();
    l();
    Pe();
    re();
    G();
    S();
    var Ia = Y("vc-uvs-"),
        { selectVoiceChannel: _A } = X("selectVoiceChannel", "selectChannel"),
        G3 = ee("actionButton", "highlight");
    function Yf(e) {
        let { size: t = 16, className: o, ...n } = e;
        return r(
            "div",
            { ...n, className: L(Ia("speaker"), o) },
            r("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "currentColor" }, e.children)
        );
    }
    function H3(e) {
        return r(
            Yf,
            { ...e },
            r("path", {
                d: "M12 3a1 1 0 0 0-1-1h-.06a1 1 0 0 0-.74.32L5.92 7H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.92l4.28 4.68a1 1 0 0 0 .74.32H11a1 1 0 0 0 1-1V3ZM15.1 20.75c-.58.14-1.1-.33-1.1-.92v-.03c0-.5.37-.92.85-1.05a7 7 0 0 0 0-13.5A1.11 1.11 0 0 1 14 4.2v-.03c0-.6.52-1.06 1.1-.92a9 9 0 0 1 0 17.5Z",
            }),
            r("path", {
                d: "M15.16 16.51c-.57.28-1.16-.2-1.16-.83v-.14c0-.43.28-.8.63-1.02a3 3 0 0 0 0-5.04c-.35-.23-.63-.6-.63-1.02v-.14c0-.63.59-1.1 1.16-.83a5 5 0 0 1 0 9.02Z",
            })
        );
    }
    function z3(e) {
        return r(
            Yf,
            { ...e },
            r("path", {
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M16 4h.5v-.5a2.5 2.5 0 0 1 5 0V4h.5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm4-.5V4h-2v-.5a1 1 0 1 1 2 0Z",
            }),
            r("path", {
                d: "M11 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1h-.06a1 1 0 0 1-.74-.32L5.92 17H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.92l4.28-4.68a1 1 0 0 1 .74-.32H11ZM20.5 12c-.28 0-.5.22-.52.5a7 7 0 0 1-5.13 6.25c-.48.13-.85.55-.85 1.05v.03c0 .6.52 1.06 1.1.92a9 9 0 0 0 6.89-8.25.48.48 0 0 0-.49-.5h-1ZM16.5 12c-.28 0-.5.23-.54.5a3 3 0 0 1-1.33 2.02c-.35.23-.63.6-.63 1.02v.14c0 .63.59 1.1 1.16.83a5 5 0 0 0 2.82-4.01c.02-.28-.2-.5-.48-.5h-1Z",
            })
        );
    }
    function EA(e) {
        return r(
            Yf,
            { ...e },
            r("path", {
                d: "m2.7 22.7 20-20a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4ZM10.8 17.32c-.21.21-.1.58.2.62V20H9a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-2v-2.06A8 8 0 0 0 20 10a1 1 0 0 0-2 0c0 1.45-.52 2.79-1.38 3.83l-.02.02A5.99 5.99 0 0 1 12.32 16a.52.52 0 0 0-.34.15l-1.18 1.18ZM15.36 4.52c.15-.15.19-.38.08-.56A4 4 0 0 0 8 6v4c0 .3.03.58.1.86.07.34.49.43.74.18l6.52-6.52ZM5.06 13.98c.16.28.53.31.75.09l.75-.75c.16-.16.19-.4.08-.61A5.97 5.97 0 0 1 6 10a1 1 0 0 0-2 0c0 1.45.39 2.81 1.06 3.98Z",
            })
        );
    }
    function BA(e) {
        return r(
            Yf,
            { ...e },
            r("path", {
                d: "M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4l20-20ZM17.06 2.94a.48.48 0 0 0-.11-.77A11 11 0 0 0 2.18 16.94c.14.3.53.35.76.12l3.2-3.2c.25-.25.15-.68-.2-.76a5 5 0 0 0-1.02-.1H3.05a9 9 0 0 1 12.66-9.2c.2.09.44.05.59-.1l.76-.76ZM20.2 8.28a.52.52 0 0 1 .1-.58l.76-.76a.48.48 0 0 1 .77.11 11 11 0 0 1-4.5 14.57c-1.27.71-2.73.23-3.55-.74a3.1 3.1 0 0 1-.17-3.78l1.38-1.97a5 5 0 0 1 4.1-2.13h1.86a9.1 9.1 0 0 0-.75-4.72ZM10.1 17.9c.25-.25.65-.18.74.14a3.1 3.1 0 0 1-.62 2.84 2.85 2.85 0 0 1-3.55.74.16.16 0 0 1-.04-.25l3.48-3.48Z",
            })
        );
    }
    function UA({ channel: e, isLocked: t }) {
        let o = ie([so], () => so.getVoiceStatesForChannel(e.id)),
            n = ce(
                () =>
                    Object.values(o)
                        .map((s) => R.getUser(s.userId))
                        .filter((s) => s != null),
                [o]
            ),
            i = t ? z3 : H3;
        return r(
            f,
            null,
            r(H, { variant: "text-sm/bold" }, "In Voice Chat"),
            r(H, { variant: "text-sm/bold" }, Ne.parse(`<#${e.id}>`)),
            r(
                "div",
                { className: Ia("vc-members") },
                r(i, { size: 18 }),
                r(fr, { users: n, renderIcon: !1, max: 13, size: 18 })
            )
        );
    }
    var Kf = new Map(),
        Zf = C.wrap(
            ({ userId: e, isProfile: t, isActionButton: o, shouldHighlight: n }) => {
                let i = ie([so], () => so.getVoiceStateForUser(e)?.channelId),
                    { isMuted: s, isDeaf: c } = ie([so], () => {
                        let b = so.getVoiceStateForUser(e);
                        return { isMuted: b?.mute || b?.selfMute || !1, isDeaf: b?.deaf || b?.selfDeaf || !1 };
                    }),
                    u = i == null ? void 0 : Z.getChannel(i);
                if (u == null) return null;
                let p = u.isDM() || u.isMultiUserDM();
                if (!p && !Te.can(pe.VIEW_CHANNEL, u) && !ke(va.name)) return null;
                let m = !p && (!Te.can(pe.VIEW_CHANNEL, u) || !Te.can(pe.CONNECT, u));
                function h(b) {
                    if ((b.preventDefault(), b.stopPropagation(), !(u == null || i == null)))
                        if ((clearTimeout(Kf.get(i)), Kf.delete(i), b.detail > 1)) {
                            if (!p && !Te.can(pe.CONNECT, u)) {
                                Ge("You cannot join the user's Voice Channel", J.Type.FAILURE);
                                return;
                            }
                            _A(i);
                        } else {
                            let x = setTimeout(() => {
                                Os.transitionToChannel(i), Kf.delete(i);
                            }, 250);
                            Kf.set(i, x);
                        }
                }
                let y = m ? z3 : c ? BA : s ? EA : H3;
                return r(
                    V,
                    {
                        text: r(UA, { channel: u, isLocked: m }),
                        tooltipClassName: Ia("tooltip-container"),
                        tooltipContentClassName: Ia("tooltip-content"),
                    },
                    (b) =>
                        r(y, {
                            ...b,
                            role: "button",
                            onClick: h,
                            className: L(
                                Ia("clickable"),
                                o && G3.actionButton,
                                o && n && G3.highlight,
                                Ia(t && "profile-speaker")
                            ),
                            size: o ? 20 : 16,
                        })
                );
            },
            { noop: !0 }
        );
    var qc = w({
            showInUserProfileModal: {
                type: 3,
                description: "Show a user's Voice Channel indicator in their profile next to the name",
                default: !0,
                restartNeeded: !0,
            },
            showInMemberList: {
                type: 3,
                description: "Show a user's Voice Channel indicator in the member and DMs list",
                default: !0,
                restartNeeded: !0,
            },
            showInMessages: {
                type: 3,
                description: "Show a user's Voice Channel indicator in messages",
                default: !0,
                restartNeeded: !0,
            },
        }),
        Qf = v({
            name: "UserVoiceShow",
            description: "Shows an indicator when a user is in a Voice Channel",
            authors: [d.Nuckyz, d.LordElias],
            dependencies: ["MemberListDecoratorsAPI", "MessageDecorationsAPI"],
            settings: qc,
            patches: [
                {
                    find: "#{intl::USER_PROFILE_PRONOUNS}",
                    replacement: {
                        match: /(?<=children:\[\i," ",\i)(?=\])/,
                        replace: ",$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id,isProfile:true})",
                    },
                    predicate: () => qc.store.showInUserProfileModal,
                },
                {
                    find: "null!=this.peopleListItemRef.current",
                    replacement: {
                        match: /\.isProvisional.{0,50}?className:\i\.\i,children:\[(?<=isFocused:(\i).+?)/,
                        replace:
                            "$&$self.VoiceChannelIndicator({userId:this?.props?.user?.id,isActionButton:true,shouldHighlight:$1}),",
                    },
                    predicate: () => qc.store.showInMemberList,
                },
            ],
            start() {
                qc.store.showInMemberList &&
                    Oi("UserVoiceShow", ({ user: e }) => (e == null ? null : r(Zf, { userId: e.id }))),
                    qc.store.showInMessages &&
                        Ei("UserVoiceShow", ({ message: e }) =>
                            e?.author == null ? null : r(Zf, { userId: e.author.id })
                        );
            },
            stop() {
                _i("UserVoiceShow"), Bi("UserVoiceShow");
            },
            VoiceChannelIndicator: Zf,
        });
    a();
    l();
    lr();
    T();
    var FA = "https://usrbg.is-hardly.online/users",
        Xf = w({
            nitroFirst: {
                description: "Banner to use if both Nitro and USRBG banners are present",
                type: 4,
                options: [
                    { label: "Nitro banner", value: !0, default: !0 },
                    { label: "USRBG banner", value: !1 },
                ],
            },
            voiceBackground: {
                description: "Use USRBG banners as voice chat backgrounds",
                type: 3,
                default: !0,
                restartNeeded: !0,
            },
        }),
        Jf = v({
            name: "USRBG",
            description: "Displays user banners from USRBG, allowing anyone to get a banner without Nitro",
            authors: [d.AutumnVN, d.katlyn, d.pylix, d.TheKodeToad],
            settings: Xf,
            patches: [
                {
                    find: ':"SHOULD_LOAD");',
                    replacement: {
                        match: /\i(?:\?)?.getPreviewBanner\(\i,\i,\i\)(?=.{0,100}"COMPLETE")/,
                        replace: "$self.patchBannerUrl(arguments[0])||$&",
                    },
                },
                {
                    find: '"data-selenium-video-tile":',
                    predicate: () => Xf.store.voiceBackground,
                    replacement: [
                        {
                            match: /(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,
                            replace: "$1.style=$self.getVoiceBackgroundStyles($1);",
                        },
                    ],
                },
                {
                    find: '"VideoBackground-web"',
                    predicate: () => Xf.store.voiceBackground,
                    replacement: {
                        match: /backgroundColor:.{0,25},\{style:(?=\i\?)/,
                        replace: "$&$self.userHasBackground(arguments[0]?.userId)?null:",
                    },
                },
            ],
            data: null,
            settingsAboutComponent: () =>
                r(
                    za,
                    {
                        href: "https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner",
                        variant: "primary",
                    },
                    "Get your own USRBG banner"
                ),
            getVoiceBackgroundStyles({ className: e, participantUserId: t }) {
                if (e.includes("tile") && this.userHasBackground(t))
                    return {
                        backgroundImage: `url(${this.getImageUrl(t)})`,
                        backgroundSize: "cover",
                        backgroundPosition: "center",
                        backgroundRepeat: "no-repeat",
                    };
            },
            patchBannerUrl({ displayProfile: e }) {
                if (!(e?.banner && Xf.store.nitroFirst) && this.userHasBackground(e?.userId))
                    return this.getImageUrl(e?.userId);
            },
            userHasBackground(e) {
                return !!this.data?.users[e];
            },
            getImageUrl(e) {
                if (!this.userHasBackground(e)) return null;
                let {
                    endpoint: t,
                    bucket: o,
                    prefix: n,
                    users: { [e]: i },
                } = this.data;
                return `${t}/${o}/${n}${e}?${i}`;
            },
            async start() {
                let e = await g(FA);
                e.ok && (this.data = await e.json());
            },
        });
    a();
    l();
    T();
    G();
    S();
    var pv = new Map(),
        dv,
        $A = de(".createFromServer(", ".isBlockedForMessage", "messageReference:"),
        Vf = v({
            name: "ValidReply",
            description: 'Fixes "Message could not be loaded" upon hovering over the reply',
            authors: [d.newwares],
            patches: [
                {
                    find: "#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}",
                    replacement: {
                        match: /#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}\)/,
                        replace: "$&,onMouseEnter:()=>$self.fetchReply(arguments[0])",
                    },
                },
                {
                    find: "ReferencedMessageStore",
                    replacement: [
                        {
                            match: /constructor\(\)\{\i\(this,"_channelCaches",new Map\)/,
                            replace: "$&;$self.setReplyStore(this);",
                            noWarn: !0,
                        },
                        { match: /_channelCaches=new Map;/, replace: "$&_=$self.setReplyStore(this);" },
                    ],
                },
            ],
            setReplyStore(e) {
                dv = e;
            },
            async fetchReply(e) {
                let { channel_id: t, message_id: o } = e.baseMessage.messageReference;
                pv.has(o) ||
                    (pv.set(o, t),
                    Ct.get({ url: `/channels/${t}/messages`, query: { limit: 1, around: o }, retries: 2 })
                        .then((n) => {
                            let i = n?.body?.[0];
                            i &&
                                (i.id !== o
                                    ? (dv.set(t, o, { state: 2 }),
                                      B.dispatch({ type: "MESSAGE_DELETE", channelId: t, message: o }))
                                    : (dv.set(i.channel_id, i.id, { state: 0, message: $A(i) }),
                                      B.dispatch({ type: "MESSAGE_UPDATE", message: i })));
                        })
                        .catch(() => {})
                        .finally(() => {
                            pv.delete(o);
                        }));
            },
        });
    a();
    l();
    T();
    re();
    S();
    var GA = vt.UserFlags,
        W3 = {
            active_developer: {
                id: "active_developer",
                description: "Active Developer",
                icon: "6bdc42827a38498929a4920da12695d9",
                link: "https://support-dev.discord.com/hc/en-us/articles/10113997751447",
            },
            bug_hunter_level_1: {
                id: "bug_hunter_level_1",
                description: "Discord Bug Hunter",
                icon: "2717692c7dca7289b35297368a940dd0",
                link: "https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs",
            },
            bug_hunter_level_2: {
                id: "bug_hunter_level_2",
                description: "Discord Bug Hunter",
                icon: "848f79194d4be5ff5f81505cbd0ce1e6",
                link: "https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs",
            },
            certified_moderator: {
                id: "certified_moderator",
                description: "Moderator Programs Alumni",
                icon: "fee1624003e2fee35cb398e125dc479b",
                link: "https://discord.com/safety",
            },
            discord_employee: {
                id: "staff",
                description: "Discord Staff",
                icon: "5e74e9b61934fc1f67c65515d1f7e60d",
                link: "https://discord.com/company",
            },
            get staff() {
                return this.discord_employee;
            },
            hypesquad: {
                id: "hypesquad",
                description: "HypeSquad Events",
                icon: "bf01d1073931f921909045f3a39fd264",
                link: "https://discord.com/hypesquad",
            },
            hypesquad_online_house_1: {
                id: "hypesquad_house_1",
                description: "HypeSquad Bravery",
                icon: "8a88d63823d8a71cd5e390baa45efa02",
                link: "https://discord.com/settings/hypesquad-online",
            },
            hypesquad_online_house_2: {
                id: "hypesquad_house_2",
                description: "HypeSquad Brilliance",
                icon: "011940fd013da3f7fb926e4a1cd2e618",
                link: "https://discord.com/settings/hypesquad-online",
            },
            hypesquad_online_house_3: {
                id: "hypesquad_house_3",
                description: "HypeSquad Balance",
                icon: "3aa41de486fa12454c3761e8e223442e",
                link: "https://discord.com/settings/hypesquad-online",
            },
            partner: {
                id: "partner",
                description: "Partnered Server Owner",
                icon: "3f9748e53446a137a052f3454e2de41e",
                link: "https://discord.com/partners",
            },
            premium: {
                id: "premium",
                description: "Subscriber",
                icon: "2ba85e8026a8614b640c2837bcdfe21b",
                link: "https://discord.com/settings/premium",
            },
            premium_early_supporter: {
                id: "early_supporter",
                description: "Early Supporter",
                icon: "7060786766c9c840eb3019e725d2b358",
                link: "https://discord.com/settings/premium",
            },
            verified_developer: {
                id: "verified_developer",
                description: "Early Verified Bot Developer",
                icon: "6df5892e0f35b051f8b61eace34f4967",
            },
        },
        eg = new Set(),
        j3 = new xo(5);
    async function HA(e) {
        let t = R.getUser(e);
        if (t) return t;
        let o = await Ct.get({ url: vt.Endpoints.USER(e) }).then(
            (s) => (B.dispatch({ type: "USER_UPDATE", user: s.body }), s.body)
        );
        await B.dispatch({ type: "USER_PROFILE_FETCH_FAILURE", userId: e }), (t = R.getUser(e));
        let n = Object.entries(GA)
            .filter(([s, c]) => !isNaN(c) && t.hasFlag(c))
            .map(([s]) => W3[s.toLowerCase()])
            .filter(Tr);
        (o.premium_type || (!o.bot && (o.banner || o.avatar?.startsWith?.("a_")))) && n.push(W3.premium);
        let i = Bt.getUserProfile(e);
        return (
            i &&
                ((i.accentColor = o.accent_color),
                (i.badges = n),
                (i.banner = o.banner),
                (i.premiumType = o.premium_type)),
            t
        );
    }
    function zA({ data: e, UserMention: t, RoleMention: o, parse: n, props: i }) {
        let [s, c] = k(e.userId);
        if (s)
            return r(t, {
                className: "mention",
                userId: s,
                channelId: e.channelId,
                inlinePreview: i.noStyleAndInteraction,
                key: i.key,
            });
        let u = n(e.content, i);
        return r(
            o,
            { ...e, inlinePreview: i.formatInline },
            r(
                "span",
                {
                    onMouseEnter: () => {
                        let p = u?.[0]?.props?.children;
                        if (typeof p != "string") return;
                        let m = p.match(/<@!?(\d+)>/)?.[1];
                        if (!m || eg.has(m)) return;
                        if (R.getUser(m)) return c(m);
                        let h = () => {
                            eg.add(m),
                                j3.unshift(() =>
                                    HA(m)
                                        .then(() => {
                                            c(m), eg.delete(m);
                                        })
                                        .catch((y) => {
                                            y?.status === 429 &&
                                                (j3.unshift(() => ir(y?.body?.retry_after ?? 1e3).then(h)),
                                                eg.delete(m));
                                        })
                                        .finally(() => ir(300))
                                );
                        };
                        h();
                    },
                },
                u
            )
        );
    }
    var tg = v({
        name: "ValidUser",
        description: "Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",
        authors: [d.Ven, d.Dolfies],
        tags: ["MentionCacheFix"],
        patches: [
            {
                find: 'className:"mention"',
                replacement: {
                    match: /react(?=\(\i,\i,\i\).{0,100}return null==.{0,70}\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,
                    replace: "react:(...args)=>$self.renderMention($1,$2,...args),originalReact",
                },
            },
            {
                find: "unknownUserMentionPlaceholder:",
                replacement: { match: /unknownUserMentionPlaceholder:/, replace: "$&false&&" },
            },
        ],
        renderMention(e, t, o, n, i) {
            return r(
                C,
                { noop: !0 },
                r(zA, { key: "mention" + o.userId, RoleMention: e, UserMention: t, data: o, parse: n, props: i })
            );
        },
    });
    a();
    l();
    T();
    S();
    var mv = {},
        og = v({
            name: "VoiceChatDoubleClick",
            description: "Join voice chats via double click instead of single click",
            authors: [d.Ven, d.D3SOX],
            patches: [
                ...[".handleVoiceStatusClick", ".handleClickChat"].map((e) => ({
                    find: e,
                    replacement: [
                        {
                            match: /onClick:\(\)=>\{this.handleClick\(\)/g,
                            replace: "onClick:()=>{$self.schedule(()=>{this.handleClick()},this)",
                        },
                    ],
                })),
                {
                    find: 'className:"channelMention",children',
                    replacement: {
                        match: /onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,
                        replace: (e, t, o) =>
                            `onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`,
                    },
                },
            ],
            shouldRunOnClick(e, { channelId: t }) {
                let o = Z.getChannel(t);
                return !o || ![2, 13].includes(o.type) ? !0 : e.detail >= 2;
            },
            schedule(e, t) {
                let o = t.props.channel.id;
                if (Le.getVoiceChannelId() === o) {
                    e();
                    return;
                }
                let n = (mv[o] ??= { timeout: void 0, i: 0 });
                clearTimeout(n.timeout),
                    ++n.i >= 2
                        ? (e(), delete mv[o])
                        : (n.timeout = setTimeout(() => {
                              delete mv[o];
                          }, 500));
            },
        });
    a();
    l();
    T();
    le();
    dr();
    S();
    a();
    l();
    le();
    a();
    l();
    S();
    function WA(e, t) {
        return e.reduce((o, n) => {
            let i = t(n);
            return (o[i] ??= []), o[i].push(n), o;
        }, {});
    }
    function fv({ voice: e, voices: t }) {
        let o = t.map((n) => ({ label: n.name, value: n.voiceURI, default: n.default }));
        return r(Is, {
            placeholder: "Select a voice",
            maxVisibleItems: 5,
            options: o,
            value: o.find((n) => n.value === e)?.value,
            onChange: (n) => (oo.store.voice = n),
            closeOnSelect: !0,
        });
    }
    var jA = new Intl.DisplayNames(["en"], { type: "language" });
    function qA({ voice: e, voices: t }) {
        let o = ce(() => WA(t, (p) => p.lang), [t]),
            n = ce(() => {
                let p = [];
                for (let m in o)
                    try {
                        let h = jA.of(m);
                        h && p.push({ name: m, friendlyName: h });
                    } catch {}
                return p;
            }, [o]),
            [i, s] = k(() => rg()?.lang ?? n[0].name);
        if (n.length === 1) return r(fv, { voice: e, voices: o[n[0].name] });
        let c = o[i],
            u = n.map((p) => ({ label: p.friendlyName, value: p.name }));
        return r(
            f,
            null,
            r(N.FormTitle, null, "Language"),
            r(Is, {
                placeholder: "Select a language",
                options: u,
                value: u.find((p) => p.value === i)?.value,
                onChange: (p) => s(p),
                maxVisibleItems: 5,
                closeOnSelect: !0,
            }),
            r(N.FormTitle, null, "Voice"),
            r(fv, { voice: e, voices: c })
        );
    }
    function KA() {
        let e = ce(() => unsafeWindow.speechSynthesis?.getVoices() ?? [], []),
            { voice: t } = oo.use(["voice"]);
        if (!e.length) return r(N.FormText, null, "No voices found.");
        let o = e.length > 20 ? qA : fv;
        return r(o, { voice: t, voices: e });
    }
    function q3() {
        return r("section", null, r(N.FormTitle, null, "Voice"), r(KA, null));
    }
    var YA = () => unsafeWindow.speechSynthesis?.getVoices().find((e) => e.default);
    function rg(e = unsafeWindow.speechSynthesis?.getVoices()) {
        if (!e) return;
        if (oo.store.voice) {
            let o = e.find((n) => n.voiceURI === oo.store.voice);
            if (o) return o;
            new U("VcNarrator").error(`Voice "${oo.store.voice}" not found. Resetting to default.`);
        }
        let t = e.find((o) => o.default);
        return (oo.store.voice = t?.voiceURI), t;
    }
    var oo = w({
        voice: {
            type: 6,
            component: q3,
            get default() {
                return YA()?.voiceURI;
            },
        },
        volume: {
            type: 5,
            description: "Narrator Volume",
            default: 1,
            markers: [0, 0.25, 0.5, 0.75, 1],
            stickToMarkers: !1,
        },
        rate: {
            type: 5,
            description: "Narrator Speed",
            default: 1,
            markers: [0.1, 0.5, 1, 2, 5, 10],
            stickToMarkers: !1,
        },
        sayOwnName: { description: "Say own name", type: 3, default: !1 },
        latinOnly: { description: "Strip non latin characters from names before saying them", type: 3, default: !1 },
        joinMessage: { type: 0, description: "Join Message", default: "{{USER}} joined" },
        leaveMessage: { type: 0, description: "Leave Message", default: "{{USER}} left" },
        moveMessage: { type: 0, description: "Move Message", default: "{{USER}} moved to {{CHANNEL}}" },
        muteMessage: { type: 0, description: "Mute Message (only self for now)", default: "{{USER}} muted" },
        unmuteMessage: { type: 0, description: "Unmute Message (only self for now)", default: "{{USER}} unmuted" },
        deafenMessage: { type: 0, description: "Deafen Message (only self for now)", default: "{{USER}} deafened" },
        undeafenMessage: {
            type: 0,
            description: "Undeafen Message (only self for now)",
            default: "{{USER}} undeafened",
        },
    });
    function ig(e) {
        if (!e) return;
        let { volume: t, rate: o } = oo.store,
            n = new SpeechSynthesisUtterance(e),
            i = rg();
        (n.voice = i), (n.volume = t), (n.rate = o), speechSynthesis.speak(n);
    }
    function ng(e) {
        let t = oo.store.latinOnly
            ? /[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu
            : /[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;
        return e.normalize("NFKC").replace(t, "").replace(/_{2,}/g, "_").trim();
    }
    function sg(e, t, o, n, i) {
        return e
            .replaceAll("{{USER}}", ng(t) || (t ? "Someone" : ""))
            .replaceAll("{{CHANNEL}}", ng(o) || "channel")
            .replaceAll("{{DISPLAY_NAME}}", ng(n) || (n ? "Someone" : ""))
            .replaceAll("{{NICKNAME}}", ng(i) || (i ? "Someone" : ""));
    }
    var gv;
    function ZA({ channelId: e, oldChannelId: t }, o) {
        if ((o && e !== gv && ((t = gv), (gv = e)), e !== t)) {
            if (e) return [t ? "move" : "join", e];
            if (t) return ["leave", t];
        }
        return ["", ""];
    }
    function QA(e) {
        let t = R.getCurrentUser(),
            o = io.getGuildId();
        ig(
            sg(
                oo.store[e + "Message"],
                t.username,
                "general",
                t.globalName ?? t.username,
                Se.getNick(o, t.id) ?? t.username
            )
        );
    }
    var ag = v({
        name: "VcNarrator",
        description: "Announces when users join, leave, or move voice channels via narrator",
        authors: [d.Ven],
        reporterTestable: 2,
        settings: oo,
        flux: {
            VOICE_STATE_UPDATES({ voiceStates: e }) {
                let t = io.getGuildId(),
                    o = Le.getVoiceChannelId(),
                    n = R.getCurrentUser().id;
                if (Z.getChannel(o)?.type !== 13)
                    for (let i of e) {
                        let { userId: s, channelId: c, oldChannelId: u } = i,
                            p = s === n;
                        if ((p && i.sessionId !== Kt.getSessionId()) || (!p && (!o || (c !== o && u !== o)))) continue;
                        let [m, h] = ZA(i, p);
                        if (!m) continue;
                        let y = oo.store[m + "Message"],
                            b = p && !oo.store.sayOwnName ? "" : R.getUser(s).username,
                            x = b && (R.getUser(s).globalName ?? b),
                            P = b && (Se.getNick(t, s) ?? x),
                            I = Z.getChannel(h).name;
                        ig(sg(y, b, I, x, P));
                    }
            },
            AUDIO_TOGGLE_SELF_MUTE() {
                let e = Le.getVoiceChannelId(),
                    t = so.getVoiceStateForChannel(e);
                if (!t) return;
                let o = t.mute || t.selfMute ? "unmute" : "mute";
                ig(sg(oo.store[o + "Message"], "", Z.getChannel(e).name, "", ""));
            },
            AUDIO_TOGGLE_SELF_DEAF() {
                let e = Le.getVoiceChannelId(),
                    t = so.getVoiceStateForChannel(e);
                if (!t) return;
                let o = t.deaf || t.selfDeaf ? "undeafen" : "deafen";
                ig(sg(oo.store[o + "Message"], "", Z.getChannel(e).name, "", ""));
            },
        },
        start() {
            if (typeof speechSynthesis > "u" || speechSynthesis.getVoices().length === 0) {
                new U("VcNarrator").warn(
                    "SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info"
                );
                return;
            }
        },
        settingsAboutComponent() {
            let [e, t] = ce(() => {
                    let i = speechSynthesis.getVoices();
                    return [i.length !== 0, i.some((s) => s.lang.startsWith("en"))];
                }, []),
                o = ce(
                    () =>
                        Object.keys(oo.def)
                            .filter((i) => i.endsWith("Message"))
                            .map((i) => i.slice(0, -7)),
                    []
                ),
                n = null;
            if (e)
                t ||
                    (n = r(eo, null, "You don't have any English voices installed, so the narrator might sound weird"));
            else {
                let i = "No narrator voices found. ";
                (i += Og
                    ? "Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag"
                    : "Try installing some in the Narrator settings of your Operating System"),
                    (n = r(eo, null, i));
            }
            return r(
                "section",
                null,
                r(
                    N.FormText,
                    null,
                    "You can customise the spoken messages below. You can disable specific messages by setting them to nothing"
                ),
                r(
                    N.FormText,
                    null,
                    "The special placeholders ",
                    r("code", null, "{{USER}}"),
                    ", ",
                    r("code", null, "{{DISPLAY_NAME}}"),
                    ", ",
                    r("code", null, "{{NICKNAME}}"),
                    " and ",
                    r("code", null, "{{CHANNEL}}"),
                    " ",
                    "will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"
                ),
                t &&
                    r(
                        f,
                        null,
                        r(N.FormTitle, { className: O.top20, tag: "h3" }, "Play Example Sounds"),
                        r(
                            "div",
                            {
                                style: { display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: "1rem" },
                                className: "vc-narrator-buttons",
                            },
                            o.map((i) => r(F, { key: i, onClick: () => QA(i) }, vi([i])))
                        )
                    ),
                n
            );
        },
    });
    a();
    l();
    Ue();
    T();
    se();
    S();
    var hv = w({
            format: {
                type: 4,
                description:
                    "Choose the image format to use for non animated images. Animated images will always use .gif",
                options: [
                    { label: "webp", value: "webp", default: !0 },
                    { label: "png", value: "png" },
                    { label: "jpg", value: "jpg" },
                ],
            },
            imgSize: {
                type: 4,
                description: "The image size to use",
                options: ["128", "256", "512", "1024", "2048", "4096"].map((e) => ({
                    label: e,
                    value: e,
                    default: e === "1024",
                })),
            },
        }),
        Kc = (e) => Y3(e, 512, 512),
        K3 = (e) => Y3(e, 1024);
    function Y3(e, t, o) {
        let n = new URL(e, unsafeWindow.location.href),
            i = e.startsWith("/") ? "png" : n.searchParams.get("animated") === "true" ? "gif" : hv.store.format;
        n.searchParams.set("size", hv.store.imgSize),
            (n.pathname = n.pathname.replace(/\.(png|jpe?g|webp)$/, `.${i}`)),
            (e = n.toString()),
            n.searchParams.set("size", "4096");
        let s = n.toString();
        Co({ url: e, original: s, width: t, height: o });
    }
    var XA = (e, { user: t, guildId: o }) => {
            if (!t) return;
            let n = Se.getMember(o, t.id)?.avatar || null;
            e.splice(
                -1,
                0,
                r(
                    M.MenuGroup,
                    null,
                    r(M.MenuItem, {
                        id: "view-avatar",
                        label: "View Avatar",
                        action: () => Kc(bt.getUserAvatarURL(t, !0)),
                        icon: sr,
                    }),
                    n &&
                        r(M.MenuItem, {
                            id: "view-server-avatar",
                            label: "View Server Avatar",
                            action: () =>
                                Kc(
                                    bt.getGuildMemberAvatarURLSimple({
                                        userId: t.id,
                                        avatar: n,
                                        guildId: o,
                                        canAnimate: !0,
                                    })
                                ),
                            icon: sr,
                        })
                )
            );
        },
        JA = (e, { guild: t }) => {
            if (!t) return;
            let { id: o, icon: n, banner: i } = t;
            (!i && !n) ||
                e.splice(
                    -1,
                    0,
                    r(
                        M.MenuGroup,
                        null,
                        n
                            ? r(M.MenuItem, {
                                  id: "view-icon",
                                  label: "View Icon",
                                  action: () => Kc(bt.getGuildIconURL({ id: o, icon: n, canAnimate: !0 })),
                                  icon: sr,
                              })
                            : null,
                        i
                            ? r(M.MenuItem, {
                                  id: "view-banner",
                                  label: "View Banner",
                                  action: () => K3(bt.getGuildBannerURL(t, !0)),
                                  icon: sr,
                              })
                            : null
                    )
                );
        },
        VA = (e, { channel: t }) => {
            t &&
                e.splice(
                    -1,
                    0,
                    r(
                        M.MenuGroup,
                        null,
                        r(M.MenuItem, {
                            id: "view-group-channel-icon",
                            label: "View Icon",
                            action: () => Kc(bt.getChannelIconURL(t)),
                            icon: sr,
                        })
                    )
                );
        },
        lg = v({
            name: "ViewIcons",
            authors: [d.Ven, d.TheKodeToad, d.Nuckyz, d.nyx],
            description:
                "Makes avatars and banners in user profiles clickable, adds View Icon/Banner entries in the user, server and group channel context menu.",
            tags: ["ImageUtilities"],
            dependencies: ["DynamicImageModalAPI"],
            settings: hv,
            openAvatar: Kc,
            openBanner: K3,
            contextMenus: { "user-context": XA, "guild-context": JA, "gdm-context": VA },
            patches: [
                {
                    find: "imageClassName:null!=",
                    replacement: {
                        match: /avatarSrc:(\i),eventHandlers:(\i).+?"div",.{0,100}className:\i,/,
                        replace: '$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},',
                    },
                },
                {
                    find: 'backgroundColor:"COMPLETE"',
                    replacement: {
                        match: /(overflow:"visible",.{0,125}?!1\),)style:{(?=.+?backgroundImage:null!=(\i)\?`url\(\$\{\2\}\))/,
                        replace: (e, t, o) =>
                            `${t}onClick:()=>${o}!=null&&$self.openBanner(${o}),style:{cursor:${o}!=null?"pointer":void 0,`,
                    },
                },
                {
                    find: '["aria-hidden"],"aria-label":',
                    replacement: {
                        match: /null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,
                        replace: (e, t) => `${e},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${t})`,
                    },
                },
                {
                    find: ".channel.getRecipientId(),",
                    replacement: {
                        match: /(?=,src:(\i.getAvatarURL\(.+?[)]))/,
                        replace: (e, t) => `,onClick:()=>$self.openAvatar(${t})`,
                    },
                },
                {
                    find: ".EMPTY_GROUP_DM)",
                    replacement: {
                        match: /(?<=SIZE_80,)(?=src:(.+?\))[,}])/,
                        replace: (e, t) => `onClick:()=>$self.openAvatar(${t}),`,
                    },
                },
            ],
        });
    a();
    l();
    Qt();
    T();
    se();
    Oe();
    S();
    var ug = ({ height: e = 20, width: t = 20, className: o }) =>
        r(
            "svg",
            { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", width: t, height: e, className: o },
            r("path", {
                d: "M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z",
            }),
            r("path", {
                d: "M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z",
            })
        );
    function eR(e) {
        return Object.fromEntries(Object.entries(e).sort(([t], [o]) => t.localeCompare(o)));
    }
    function tR(e) {
        let t = eR(JSON.parse(JSON.stringify(e)));
        for (let n of ["email", "phone", "mfaEnabled", "personalConnectionId"]) delete t.author[n];
        let o = t;
        return (
            delete o.editHistory,
            delete o.deleted,
            delete o.firstEditTimestamp,
            o.attachments?.forEach((n) => delete n.deleted),
            t
        );
    }
    function yv(e, t, o) {
        let n = fe((i) =>
            r(
                C,
                null,
                r(
                    ve,
                    { ...i, size: "large" },
                    r(
                        Re,
                        null,
                        r(H, { variant: "heading-lg/semibold", style: { flexGrow: 1 } }, "View Raw"),
                        r(et, { onClick: () => un(n) })
                    ),
                    r(
                        Ie,
                        null,
                        r(
                            "div",
                            { style: { padding: "16px 0" } },
                            !!o &&
                                r(
                                    f,
                                    null,
                                    r(N.FormTitle, { tag: "h5" }, "Content"),
                                    r(Rl, { content: o, lang: "" }),
                                    r(Fe, { className: O.bottom20 })
                                ),
                            r(N.FormTitle, { tag: "h5" }, t, " Data"),
                            r(Rl, { content: e, lang: "json" })
                        )
                    ),
                    r(
                        St,
                        null,
                        r(
                            oe,
                            null,
                            r(F, { onClick: () => tt(e, `${t} data copied to clipboard!`) }, "Copy ", t, " JSON"),
                            !!o && r(F, { onClick: () => tt(o, "Content copied to clipboard!") }, "Copy Raw Content")
                        )
                    )
                )
            )
        );
    }
    function Z3(e) {
        e = tR(e);
        let t = JSON.stringify(e, null, 4);
        return yv(t, "Message", e.content);
    }
    var cg = w({
        clickMethod: {
            description: "Change the button to view the raw content/data of any message.",
            type: 4,
            options: [
                { label: "Left Click to view the raw content.", value: "Left", default: !0 },
                { label: "Right click to view the raw content.", value: "Right" },
            ],
        },
    });
    function Pa(e) {
        return (t, o) => {
            let n = o[e.toLowerCase()];
            if (!n || o.label === Ae("CHANNEL_ACTIONS_MENU_LABEL")) return;
            let i = t.at(-1);
            if (i?.key === "developer-actions") {
                let c = i.props;
                Array.isArray(c.children) || (c.children = [c.children]), (t = c.children);
            }
            let s = `vc-view-${e.toLowerCase()}-raw`;
            t.splice(
                -1,
                0,
                r(M.MenuItem, { id: s, label: "View Raw", action: () => yv(JSON.stringify(n, null, 4), e), icon: ug })
            );
        };
    }
    var oR = (e, { id: t }) => {
            let o = jr();
            if (!o) return;
            let n = yt.getRole(o.id, t);
            n &&
                e.push(
                    r(M.MenuItem, {
                        id: "vc-view-role-raw",
                        label: "View Raw",
                        action: () => yv(JSON.stringify(n, null, 4), "Role"),
                        icon: ug,
                    })
                );
        },
        pg = v({
            name: "ViewRaw",
            description: "Copy and view the raw content/data of any message, channel or guild",
            authors: [d.KingFish, d.Ven, d.rad, d.ImLvna],
            settings: cg,
            contextMenus: {
                "guild-context": Pa("Guild"),
                "guild-settings-role-context": Pa("Role"),
                "channel-context": Pa("Channel"),
                "thread-context": Pa("Channel"),
                "gdm-context": Pa("Channel"),
                "user-context": Pa("User"),
                "dev-context": oR,
            },
            messagePopoverButton: {
                icon: ug,
                render(e) {
                    let t = () => {
                            cg.store.clickMethod === "Right" ? tt(e.content) : Z3(e);
                        },
                        o = (i) => {
                            cg.store.clickMethod === "Left"
                                ? (i.preventDefault(), i.stopPropagation(), tt(e.content))
                                : (i.preventDefault(), i.stopPropagation(), Z3(e));
                        };
                    return {
                        label:
                            cg.store.clickMethod === "Right"
                                ? "Copy Raw (Left Click) / View Raw (Right Click)"
                                : "View Raw (Left Click) / Copy Raw (Right Click)",
                        icon: ug,
                        message: e,
                        channel: Z.getChannel(e.channel_id),
                        onClick: t,
                        onContextMenu: o,
                    };
                },
            },
        });
    a();
    l();
    T();
    var dg = v({
        name: "VoiceDownload",
        description: "Adds a download to voice messages. (Opens a new browser tab)",
        authors: [d.puv],
        patches: [
            {
                find: "#{intl::VOICE_MESSAGES_PLAYBACK_RATE_LABEL}",
                replacement: { match: /(?<=onVolumeHide:\i\}\))/, replace: ",$self.renderDownload(arguments[0].src)" },
            },
        ],
        renderDownload(e) {
            return r(
                "a",
                {
                    className: "vc-voice-download",
                    href: e,
                    onClick: (t) => t.stopPropagation(),
                    "aria-label": "Download voice message",
                    download: "voice-message.ogg",
                },
                r(this.Icon, null)
            );
        },
        Icon: () =>
            r(
                "svg",
                { height: "24", width: "24", viewBox: "0 0 24 24", fill: "currentColor" },
                r("path", {
                    d: "M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z",
                })
            ),
    });
    a();
    l();
    Ue();
    Wt();
    Yo();
    T();
    Pe();
    Oe();
    pt();
    G();
    S();
    a();
    l();
    S();
    a();
    l();
    var Ma = w({
        noiseSuppression: { type: 3, description: "Noise Suppression", default: !0 },
        echoCancellation: { type: 3, description: "Echo Cancellation", default: !0 },
    });
    var dAe = VencordNative.pluginHelpers.VoiceMessages;
    a();
    l();
    pt();
    G();
    var rR = ge("waveform:", "onVolumeChange"),
        Q3 = ({ src: e, waveform: t, recording: o }) => {
            let n = il({ deps: [o] }),
                i = o ? Math.floor(n / 1e3) : 0,
                s = Math.floor(i / 60) + ":" + (i % 60).toString().padStart(2, "0");
            return e && !o
                ? r(rR, { key: e, src: e, waveform: t })
                : r(
                      "div",
                      { className: ci("preview", o ? "preview-recording" : []) },
                      r("div", { className: ci("preview-indicator") }),
                      r("div", { className: ci("preview-time") }, s),
                      r("div", { className: ci("preview-label") }, o ? "RECORDING" : "----")
                  );
        };
    a();
    l();
    S();
    var X3 = ({ setAudioBlob: e, onRecordingChange: t }) => {
        let [o, n] = k(!1),
            [i, s] = k(!1),
            [c, u] = k(),
            [p, m] = k([]),
            h = (b) => {
                n(b), t?.(b);
            };
        function y() {
            !o
                ? navigator.mediaDevices
                      .getUserMedia({
                          audio: {
                              echoCancellation: Ma.store.echoCancellation,
                              noiseSuppression: Ma.store.noiseSuppression,
                              deviceId: Rs.getInputDeviceId(),
                          },
                      })
                      .then((x) => {
                          let P = [];
                          m(P);
                          let I = new MediaRecorder(x);
                          u(I),
                              I.addEventListener("dataavailable", (D) => {
                                  P.push(D.data);
                              }),
                              I.start(),
                              h(!0);
                      })
                : c &&
                  (c.addEventListener("stop", () => {
                      e(new Blob(p, { type: "audio/ogg; codecs=opus" })), h(!1);
                  }),
                  c.stop());
        }
        return r(
            f,
            null,
            r(F, { onClick: y }, o ? "Stop" : "Start", " recording"),
            r(
                F,
                {
                    disabled: !o,
                    onClick: () => {
                        s(!i), i ? c?.resume() : c?.pause();
                    },
                },
                i ? "Resume" : "Pause",
                " recording"
            )
        );
    };
    var nR = Ot((e) => e.prototype?.trackUploadFinished),
        iR = it("PendingReplyStore"),
        ci = Y("vc-vmsg-"),
        sR = X3,
        aR = (e, t) => {
            (t.channel.guild_id &&
                !(Te.can(pe.SEND_VOICE_MESSAGES, t.channel) && Te.can(pe.SEND_MESSAGES, t.channel))) ||
                e.push(
                    r(M.MenuItem, {
                        id: "vc-send-vmsg",
                        iconLeft: ru,
                        leadingAccessory: { type: "icon", icon: ru },
                        label: "Send Voice Message",
                        action: () => fe((o) => r(uR, { modalProps: o })),
                    })
                );
        },
        mg = v({
            name: "VoiceMessages",
            description:
                "Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",
            authors: [d.Ven, d.Vap, d.Nickyux],
            settings: Ma,
            contextMenus: { "channel-attach": aR },
        }),
        vv = { waveform: "AAAAAAAAAAAA", duration: 1 };
    function lR(e, t) {
        let o = Le.getChannelId(),
            n = iR.getPendingReply(o);
        n && B.dispatch({ type: "DELETE_PENDING_REPLY", channelId: o });
        let i = new nR(
            {
                file: new File([e], "voice-message.ogg", { type: "audio/ogg; codecs=opus" }),
                isThumbnail: !1,
                platform: 1,
            },
            o
        );
        i.on("complete", () => {
            Ct.post({
                url: vt.Endpoints.MESSAGES(o),
                body: {
                    flags: 8192,
                    channel_id: o,
                    content: "",
                    nonce: vo.fromTimestamp(Date.now()),
                    sticker_ids: [],
                    type: 0,
                    attachments: [
                        {
                            id: "0",
                            filename: i.filename,
                            uploaded_filename: i.uploadedFilename,
                            waveform: t.waveform,
                            duration_secs: t.duration,
                        },
                    ],
                    message_reference: n ? bo.getSendMessageOptionsForReply(n)?.messageReference : null,
                },
            });
        }),
            i.on("error", () => Ge("Failed to upload voice message", J.Type.FAILURE)),
            i.upload();
    }
    function cR() {
        let [e, t] = k();
        return [
            e,
            (n) => {
                e && URL.revokeObjectURL(e), t(URL.createObjectURL(n));
            },
        ];
    }
    function uR({ modalProps: e }) {
        let [t, o] = k(!1),
            [n, i] = k(),
            [s, c] = cR();
        te(
            () => () => {
                s && URL.revokeObjectURL(s);
            },
            [s]
        );
        let [u, p] = _t(
                async () => {
                    if (!n) return vv;
                    let y = await new AudioContext().decodeAudioData(await n.arrayBuffer()),
                        b = y.getChannelData(0),
                        x = new Uint8Array(Pi.clamp(Math.floor(y.duration * 10), Math.min(32, b.length), 256)),
                        P = Math.floor(b.length / x.length);
                    for (let A = 0; A < x.length; A++) {
                        let E = 0;
                        for (let q = 0; q < P; q++) {
                            let z = A * P + q;
                            E += b[z] ** 2;
                        }
                        x[A] = ~~(Math.sqrt(E / P) * 255);
                    }
                    let I = Math.max(...x),
                        D = 1 + (255 / I - 1) * Math.min(1, 100 * (I / 255) ** 3);
                    for (let A = 0; A < x.length; A++) x[A] = Math.min(255, ~~(x[A] * D));
                    return { waveform: unsafeWindow.btoa(String.fromCharCode(...x)), duration: y.duration };
                },
                { deps: [n], fallbackValue: vv }
            ),
            m = n && (!n.type.startsWith("audio/ogg") || (n.type.includes("codecs") && !n.type.includes("opus")));
        return r(
            ve,
            { ...e },
            r(Re, null, r(N.FormTitle, null, "Record Voice Message")),
            r(
                Ie,
                { className: ci("modal") },
                r(
                    "div",
                    { className: ci("buttons") },
                    r(sR, {
                        setAudioBlob: (h) => {
                            i(h), c(h);
                        },
                        onRecordingChange: o,
                    }),
                    r(
                        F,
                        {
                            onClick: async () => {
                                let h = await eu("audio/*");
                                h && (i(h), c(h));
                            },
                        },
                        "Upload File"
                    )
                ),
                r(N.FormTitle, null, "Preview"),
                p
                    ? r(Me, { className: ci("error") }, "Failed to parse selected audio file: ", p.message)
                    : r(Q3, { src: s, waveform: u.waveform, recording: t }),
                m &&
                    r(
                        mt,
                        { variant: "warning", className: O.top16, defaultPadding: !0 },
                        r(
                            N.FormText,
                            null,
                            "Voice Messages have to be OggOpus to be playable on iOS. This file is ",
                            r("code", null, n.type),
                            " so it will not be playable on iOS."
                        ),
                        r(
                            N.FormText,
                            { className: O.top8 },
                            "To fix it, first convert it to OggOpus, for example using the ",
                            r(Ve, { href: "https://convertio.co/mp3-opus/" }, "convertio web converter")
                        )
                    )
            ),
            r(
                St,
                null,
                r(
                    F,
                    {
                        disabled: !n,
                        onClick: () => {
                            lR(n, u ?? vv),
                                e.onClose(),
                                Ge("Now sending voice message... Please be patient", J.Type.MESSAGE);
                        },
                    },
                    "Send"
                )
            )
        );
    }
    a();
    l();
    T();
    var pR = w({
            multiplier: {
                description: "Volume Multiplier",
                type: 5,
                markers: yr(1, 5, 0.5),
                default: 2,
                stickToMarkers: !0,
            },
        }),
        fg = v({
            name: "VolumeBooster",
            authors: [d.Nuckyz, d.sadan],
            description: "Allows you to set the user and stream volume above the default maximum",
            settings: pR,
            patches: [
                {
                    find: "#{intl::USER_VOLUME}",
                    replacement: {
                        match: /(?<=maxValue:)\i\.isPlatformEmbedded\?(\i\.\i):\i\.\i(?=,)/,
                        replace: (e, t) => `${t}*$self.settings.store.multiplier`,
                    },
                },
                {
                    find: "currentVolume:",
                    replacement: {
                        match: /(?<=maxValue:)\i\.\i\?(\d+?):\d+?(?=,)/,
                        replace: (e, t) => `${t}*$self.settings.store.multiplier`,
                    },
                },
                {
                    find: "streamSourceNode",
                    predicate: () => !0,
                    group: !0,
                    replacement: [
                        { match: /Math\.max.{0,30}\)\)/, replace: "arguments[0]" },
                        { match: /\}return"video"/, replace: "this.updateAudioElement();$&" },
                        { match: /\.volume=this\._volume\/100;/, replace: ".volume=0.00;$self.patchVolume(this);" },
                    ],
                },
                {
                    find: "AudioContextSettingsMigrated",
                    replacement: [
                        {
                            match: /(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/,
                            replace: "$&>200?200:$&",
                        },
                        { match: /(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/, replace: "$&>200?200:$&" },
                        {
                            match: /(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,
                            replace: "$&>200?200:$&",
                        },
                    ],
                },
                {
                    find: '="MediaEngineStore",',
                    replacement: [
                        {
                            match: /(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,
                            replace: (e, t, o, n, i) => t + `(${o}>200?void 0:${o}=${n})` + i + `${o}??${n})`,
                        },
                    ],
                },
            ],
            patchVolume(e) {
                if (e.stream.getAudioTracks().length !== 0) {
                    if (((e.streamSourceNode ??= e.audioContext.createMediaStreamSource(e.stream)), !e.gainNode)) {
                        let t = (e.gainNode = e.audioContext.createGain());
                        e.streamSourceNode.connect(t), t.connect(e.audioContext.destination);
                    }
                    e.sinkId != null &&
                        e.sinkId !== e.audioContext.sinkId &&
                        "setSinkId" in AudioContext.prototype &&
                        e.audioContext.setSinkId(e.sinkId === "default" ? "" : e.sinkId),
                        (e.gainNode.gain.value = e._mute ? 0 : e._volume / 100);
                }
            },
        });
    a();
    l();
    Gn();
    T();
    G();
    S();
    var gg = Ye('closest("[contenteditable=true]")', {
        contextMenuCallbackWeb: _.byCode('"[contenteditable=true]"'),
        contextMenuCallbackNative: _.byCode('.getPropertyValue("-webkit-user-select")'),
    });
    async function dR(e) {
        let t = await g(e);
        if (t.status === 200) return await t.blob();
    }
    var eT = w({
            addBack: {
                type: 3,
                description: "Add back the Discord context menus for images, links and the chat input bar",
                default: !1,
                restartNeeded: !0,
                hidden: !1,
            },
        }),
        Ca = () => eT.store.addBack,
        mR = "https://media.discordapp.net",
        J3 = "cdn.discordapp.com";
    function V3(e) {
        let t = new URL(e);
        return t.host === J3
            ? e
            : (t.searchParams.delete("width"),
              t.searchParams.delete("height"),
              t.origin === mR
                  ? ((t.host = J3),
                    t.searchParams.delete("size"),
                    t.searchParams.delete("quality"),
                    t.searchParams.delete("format"))
                  : t.searchParams.set("quality", "lossless"),
              t.toString());
    }
    var hg = v({
        name: "WebContextMenus",
        description:
            "Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",
        authors: [d.Ven],
        enabledByDefault: !0,
        required: !1,
        settings: eT,
        start() {
            Ca() &&
                (unsafeWindow.removeEventListener("contextmenu", gg.contextMenuCallbackWeb),
                unsafeWindow.addEventListener("contextmenu", gg.contextMenuCallbackNative),
                (this.changedListeners = !0));
        },
        stop() {
            this.changedListeners &&
                (unsafeWindow.removeEventListener("contextmenu", gg.contextMenuCallbackNative),
                unsafeWindow.addEventListener("contextmenu", gg.contextMenuCallbackWeb));
        },
        patches: [
            {
                find: "open-native-link",
                replacement: [
                    { match: /if\(!\i\.\i\|\|null==/, replace: "if(null==" },
                    { match: /\i\.\i\.copy/, replace: "Vencord.Util.copyToClipboard" },
                ],
            },
            {
                find: "Copy image not supported",
                replacement: [
                    {
                        match: /(?<=(?:canSaveImage|canCopyImage)\(.{0,120}?)!\i\.isPlatformEmbedded/g,
                        replace: "false",
                    },
                    { match: /(?<=canCopyImage\(.+?)typeof \i\.clipboard\.copyImage/, replace: '"function"' },
                ],
            },
            {
                find: 'id:"copy-image"',
                replacement: [
                    { match: /!\i\.isPlatformEmbedded/, replace: "false" },
                    {
                        match: /(#{intl::COPY_IMAGE_MENU_ITEM}\),.{0,75}?)action:/,
                        replace: "$1action:()=>$self.copyImage(arguments[0]),oldAction:",
                    },
                    {
                        match: /(#{intl::SAVE_IMAGE_MENU_ITEM}\),.{0,75}?)action:/,
                        replace: "$1action:()=>$self.saveImage(arguments[0]),oldAction:",
                    },
                ],
            },
            {
                find: 'navId:"image-context"',
                all: !0,
                predicate: Ca,
                replacement: { match: /return \i\.\i(?=\?|&&)/, replace: "return true" },
            },
            {
                find: '"interactionUsernameProfile"',
                predicate: Ca,
                replacement: { match: /if\((?="A"===\i\.tagName&&""!==\i\.textContent)/, replace: "if(false&&" },
            },
            {
                find: 'getElementById("slate-toolbar"',
                predicate: Ca,
                replacement: {
                    match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,
                    replace: "||true)",
                },
            },
            {
                find: ".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",
                predicate: Ca,
                replacement: [
                    { match: /if\(!\i\.\i\)return null;/, replace: "" },
                    { match: /\b\i\.\i\.(copy|cut|paste)/g, replace: "$self.$1" },
                ],
            },
            {
                find: '"add-to-dictionary"',
                predicate: Ca,
                replacement: { match: /let\{text:\i=""/, replace: "return [null,null];$&" },
            },
            {
                find: '"MediaEngineWebRTC");',
                replacement: {
                    match: /supports\(\i\)\{switch\(\i\)\{(case (\i).\i)/,
                    replace: "$&.DISABLE_VIDEO:return true;$1",
                },
            },
            { find: "#{intl::SEARCH_WITH_GOOGLE}", replacement: { match: /\i\.isPlatformEmbedded/, replace: "true" } },
            {
                find: "#{intl::COPY}),hint:",
                replacement: [
                    { match: /\i\.isPlatformEmbedded/, replace: "true" },
                    { match: /\i\.\i\.copy(?=\(\i)/, replace: "Vencord.Util.copyToClipboard" },
                ],
                all: !0,
                noWarn: !0,
            },
            {
                find: '("interactionUsernameProfile',
                replacement: { match: /\i\.isPlatformEmbedded(?=.{0,50}\.tagName)/, replace: "true" },
            },
        ],
        async copyImage(e) {
            e = V3(e);
            let t = await g(e).then((o) => o.blob());
            if (t.type !== "image/png") {
                let o = await createImageBitmap(t),
                    n = document.createElement("canvas");
                (n.width = o.width),
                    (n.height = o.height),
                    n.getContext("2d").drawImage(o, 0, 0),
                    await new Promise((i) => {
                        n.toBlob((s) => {
                            (t = s), i();
                        }, "image/png");
                    });
            }
            navigator.clipboard.write([new ClipboardItem({ "image/png": t })]);
        },
        async saveImage(e) {
            e = V3(e);
            let t = await dR(e);
            if (!t) return;
            let o = new URL(e).pathname.split("/").pop(),
                n = new File([t], o, { type: t.type });
            Vc(n);
        },
        copy() {
            let e = document.getSelection();
            e && Po(e.toString());
        },
        cut() {
            this.copy(), Io.dispatch("INSERT_TEXT", { rawText: "" });
        },
        async paste() {
            let e = (await navigator.clipboard.read())[0];
            if (!e) return;
            let t = new DataTransfer();
            for (let o of e.types)
                if (o === "image/png") {
                    let n = new File([await e.getType(o)], "unknown.png", { type: o });
                    t.items.add(n);
                } else if (o === "text/plain") {
                    let n = await e.getType(o);
                    t.setData(o, await n.text());
                }
            document.dispatchEvent(new ClipboardEvent("paste", { clipboardData: t }));
        },
    });
    a();
    l();
    T();
    G();
    S();
    var bv = X("JUMP_TO_GUILD", "SERVER_NEXT"),
        yg = v({
            name: "WebKeybinds",
            description:
                "Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/Legcord, not inside your browser",
            authors: [d.Ven],
            enabledByDefault: !0,
            onKey(e) {
                if (e.ctrlKey || (e.metaKey && Bo))
                    switch (e.key) {
                        case "t":
                        case "T":
                            return;
                        case "Tab":
                            return;
                        case ",":
                            e.preventDefault(), Fn.openUserSettings("my_account_panel");
                            break;
                        default:
                            e.key >= "1" &&
                                e.key <= "9" &&
                                (e.preventDefault(), bv.JUMP_TO_GUILD.action(e, `mod+${e.key}`));
                            break;
                    }
            },
            start() {
                document.addEventListener("keydown", this.onKey);
            },
            stop() {
                document.removeEventListener("keydown", this.onKey);
            },
        });
    a();
    l();
    T();
    var vg = v({
        name: "WebScreenShareFixes",
        authors: [d.Kaitlyn],
        description: "Removes 2500kbps bitrate cap on chromium and vesktop clients.",
        enabledByDefault: !0,
        patches: [
            {
                find: "x-google-max-bitrate",
                replacement: [
                    { match: /`x-google-max-bitrate=\$\{\i\}`/, replace: '"x-google-max-bitrate=80_000"' },
                    { match: ";level-asymmetry-allowed=1", replace: ";b=AS:800000;level-asymmetry-allowed=1" },
                    { match: /;usedtx=\$\{(\i)\?"0":"1"\}/, replace: '$&${$1?";stereo=1;sprop-stereo=1":""}' },
                ],
            },
        ],
    });
    a();
    l();
    T();
    re();
    pt();
    S();
    var Sv = null,
        fR = new xo(),
        oT;
    function gR(e, t, o) {
        let n = t.name + (t.id ? `:${t.id}` : "");
        return Ct.get({
            url: vt.Endpoints.REACTIONS(e.channel_id, e.id, n),
            query: { limit: 100, type: o },
            oldFormErrors: !0,
        })
            .then((i) => {
                for (let s of i.body) B.dispatch({ type: "USER_UPDATE", user: s });
                B.dispatch({
                    type: "MESSAGE_REACTION_ADD_USERS",
                    channelId: e.channel_id,
                    messageId: e.id,
                    users: i.body,
                    emoji: t,
                    reactionType: o,
                });
            })
            .catch(console.error)
            .finally(() => ir(250));
    }
    function hR(e, t, o) {
        let n = `${e.id}:${t.name}:${t.id ?? ""}:${o}`,
            i = (oT[n] ??= { fetched: !1, users: new Map() });
        return i.fetched || (fR.unshift(() => gR(e, t, o)), (i.fetched = !0)), i.users;
    }
    function tT(e) {
        e.stopPropagation();
    }
    var bg = v({
        name: "WhoReacted",
        description: "Renders the avatars of users who reacted to a message",
        authors: [d.Ven, d.KannaDev, d.newwares],
        patches: [
            {
                find: ",reactionRef:",
                replacement: {
                    match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
                    replace: "$&$1?null:$self.renderUsers(this.props),",
                },
            },
            {
                find: '"MessageReactionsStore"',
                replacement: {
                    match: /function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/,
                    replace: "$&;$self.reactions=$2;",
                },
            },
            {
                find: "cleanAutomaticAnchor(){",
                replacement: {
                    match: /constructor\(\i\)\{(?=.{0,100}(?:automaticAnchor|\.messages\.loadingMore))/,
                    replace: "$&$self.setScrollObj(this);",
                },
            },
        ],
        setScrollObj(e) {
            Sv = e;
        },
        renderUsers(e) {
            return e.message.reactions.length > 10 ? null : r(C, { noop: !0 }, r(this.UsersComponent, { ...e }));
        },
        UsersComponent({ message: e, emoji: t, type: o }) {
            let n = Qo();
            _n(() => {
                Sv?.scrollCounter > 0 && Sv.setAutomaticAnchor(null);
            }),
                te(() => {
                    let c = (u) => {
                        u?.messageId === e.id && n();
                    };
                    return (
                        B.subscribe("MESSAGE_REACTION_ADD_USERS", c),
                        () => B.unsubscribe("MESSAGE_REACTION_ADD_USERS", c)
                    );
                }, [e.id, n]);
            let i = hR(e, t, o),
                s = Array.from(i, ([c]) => R.getUser(c)).filter(Boolean);
            return r(
                "div",
                { style: { marginLeft: "0.5em", transform: "scale(0.9)" } },
                r(
                    "div",
                    { onClick: tT, onKeyDown: tT },
                    r(fr, {
                        users: s,
                        guildId: Z.getChannel(e.channel_id)?.guild_id,
                        renderIcon: !1,
                        max: 5,
                        showDefaultAvatarsForNullUsers: !0,
                        showUserPopout: !0,
                    })
                )
            );
        },
        set reactions(e) {
            oT = e;
        },
    });
    a();
    l();
    T();
    le();
    G();
    S();
    var Sg = Ot((e) => e.ANNOUNCEMENT_THREAD === 10),
        yR = de(".SUPPRESS_NOTIFICATIONS))return!1"),
        WRe = new U("XSOverlay"),
        Ht = w({
            webSocketPort: {
                type: 1,
                description: "Websocket port",
                default: 42070,
                async onChange() {
                    await xv();
                },
            },
            preferUDP: {
                type: 3,
                description:
                    "Enable if you use an older build of XSOverlay unable to connect through websockets. This setting is ignored on web.",
                default: !1,
                disabled: () => !0,
            },
            botNotifications: { type: 3, description: "Allow bot notifications", default: !1 },
            serverNotifications: { type: 3, description: "Allow server notifications", default: !0 },
            dmNotifications: { type: 3, description: "Allow Direct Message notifications", default: !0 },
            groupDmNotifications: { type: 3, description: "Allow Group DM notifications", default: !0 },
            callNotifications: { type: 3, description: "Allow call notifications", default: !0 },
            pingColor: { type: 0, description: "User mention color", default: "#7289da" },
            channelPingColor: { type: 0, description: "Channel mention color", default: "#8a2be2" },
            soundPath: { type: 0, description: "Notification sound (default/warning/error)", default: "default" },
            timeout: { type: 1, description: "Notification duration (secs)", default: 3 },
            lengthBasedTimeout: { type: 3, description: "Extend duration with message length", default: !0 },
            opacity: { type: 5, description: "Notif opacity", default: 1, markers: yr(0, 1, 0.1) },
            volume: { type: 5, description: "Volume", default: 0.2, markers: yr(0, 1, 0.1) },
        }),
        Cn;
    async function xv() {
        return (
            Cn && Cn.close(),
            (Cn = new WebSocket(`ws://127.0.0.1:${Ht.store.webSocketPort ?? 42070}/?client=Vencord`)),
            new Promise((e, t) => {
                (Cn.onopen = e), (Cn.onerror = t), setTimeout(t, 3e3);
            })
        );
    }
    var jRe = VencordNative.pluginHelpers.XSOverlay,
        xg = v({
            name: "XSOverlay",
            description: "Forwards discord notifications to XSOverlay, for easy viewing in VR",
            authors: [d.Nyako],
            tags: ["vr", "notify"],
            reporterTestable: 2,
            settings: Ht,
            flux: {
                CALL_UPDATE({ call: e }) {
                    if (e?.ringing?.includes(R.getCurrentUser().id) && Ht.store.callNotifications) {
                        let t = Z.getChannel(e.channel_id);
                        rT("Incoming call", `${t.name} is calling you...`);
                    }
                },
                MESSAGE_CREATE({ message: e, optimistic: t }) {
                    if (t) return;
                    let o = Z.getChannel(e.channel_id);
                    if (!SR(e, e.channel_id)) return;
                    let n = Ht.store.pingColor.replaceAll("#", "").trim(),
                        i = Ht.store.channelPingColor.replaceAll("#", "").trim(),
                        s = e.content,
                        c = "";
                    if (o.guild_id) {
                        let h = Ce.getGuild(o.guild_id);
                        c = `${e.author.username} (${h.name}, #${o.name})`;
                    }
                    switch (o.type) {
                        case Sg.DM:
                            c = e.author.username.trim();
                            break;
                        case Sg.GROUP_DM:
                            let h = o.name.trim() ?? o.rawRecipients.map((y) => y.username).join(", ");
                            c = `${e.author.username} (${h})`;
                            break;
                    }
                    if (
                        (e.referenced_message && (c += " (reply)"),
                        e.embeds.length > 0 && ((s += " [embed] "), e.content === "" && (s = "sent message embed(s)")),
                        e.sticker_items && ((s += " [sticker] "), e.content === "" && (s = "sent a sticker")),
                        e.attachments
                            .filter((h) => typeof h?.content_type == "string" && h?.content_type.startsWith("image"))
                            .forEach((h) => {
                                s += ` [image: ${h.filename}] `;
                            }),
                        e.attachments
                            .filter((h) => h && !h.content_type?.startsWith("image"))
                            .forEach((h) => {
                                s += ` [attachment: ${h.filename}] `;
                            }),
                        e.mentions.length > 0 &&
                            (s = s.replace(
                                /<@!?(\d{17,20})>/g,
                                (h, y) => `<color=#${n}><b>@${R.getUser(y)?.username || "unknown-user"}</color></b>`
                            )),
                        e.mention_roles.length > 0)
                    )
                        for (let h of e.mention_roles) {
                            let y = yt.getRole(o.guild_id, h);
                            if (!y) continue;
                            let b = y.colorString ?? `#${n}`;
                            s = s.replace(`<@&${h}>`, `<b><color=${b}>@${y.name}</color></b>`);
                        }
                    let p = s.match(new RegExp("(<a?:\\w+:\\d+>)", "g")),
                        m = s.match(new RegExp("<(#\\d+)>", "g"));
                    if (p) for (let h of p) s = s.replace(new RegExp(`${h}`, "g"), `:${h.split(":")[1]}:`);
                    if (m)
                        for (let h of m) {
                            let y = h.split("<#")[1];
                            (y = y.substring(0, y.length - 1)),
                                (s = s.replace(
                                    new RegExp(`${h}`, "g"),
                                    `<b><color=#${i}>#${Z.getChannel(y).name}</color></b>`
                                ));
                        }
                    vR(o) || bR(c, s, e);
                },
            },
            start: xv,
            stop() {
                Cn.close();
            },
            settingsAboutComponent: () =>
                r(
                    f,
                    null,
                    r(
                        F,
                        { onClick: () => rT("This is a test notification! explode", "Hello from Vendor!") },
                        "Send test notification"
                    )
                ),
        });
    function vR(e) {
        return (e.type === Sg.DM && Ht.store.dmNotifications) ||
            (e.type === Sg.GROUP_DM && Ht.store.groupDmNotifications)
            ? !1
            : !Ht.store.serverNotifications;
    }
    function bR(e, t, o) {
        g(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`)
            .then((n) => n.blob())
            .then(
                (n) =>
                    new Promise((i) => {
                        let s = new FileReader();
                        (s.onload = () => i(s.result.split(",")[1])), s.readAsDataURL(n);
                    })
            )
            .then((n) => {
                let i = {
                    type: 1,
                    timeout: Ht.store.lengthBasedTimeout ? sT(t) : Ht.store.timeout,
                    height: iT(t),
                    opacity: Ht.store.opacity,
                    volume: Ht.store.volume,
                    audioPath: Ht.store.soundPath,
                    title: e,
                    content: t,
                    useBase64Icon: !0,
                    icon: n,
                    sourceApp: "Vencord",
                };
                nT(i);
            });
    }
    function rT(e, t) {
        let o = {
            type: 1,
            timeout: Ht.store.lengthBasedTimeout ? sT(e) : Ht.store.timeout,
            height: iT(e),
            opacity: Ht.store.opacity,
            volume: Ht.store.volume,
            audioPath: Ht.store.soundPath,
            title: t,
            content: e,
            useBase64Icon: !1,
            icon: "default",
            sourceApp: "Vencord",
        };
        nT(o);
    }
    async function nT(e) {
        let t = {
            sender: "Vencord",
            target: "xsoverlay",
            command: "SendNotification",
            jsonData: JSON.stringify(e),
            rawData: null,
        };
        Cn.readyState !== Cn.OPEN && (await xv()), Cn.send(JSON.stringify(t));
    }
    function SR(e, t) {
        let o = R.getCurrentUser();
        return e.author.id === o.id || (e.author.bot && !Ht.store.botNotifications) ? !1 : yR(e, t);
    }
    function iT(e) {
        return e.length <= 100 ? 100 : e.length <= 200 ? 150 : e.length <= 300 ? 200 : 250;
    }
    function sT(e) {
        return e.length <= 100 ? 3 : e.length <= 200 ? 4 : e.length <= 300 ? 5 : 6;
    }
    var $e = {
            [zn.name]: zn,
            [rp.name]: rp,
            [np.name]: np,
            [ip.name]: ip,
            [sp.name]: sp,
            [ap.name]: ap,
            [lp.name]: lp,
            [cp.name]: cp,
            [up.name]: up,
            [pp.name]: pp,
            [dp.name]: dp,
            [mp.name]: mp,
            [fp.name]: fp,
            [gp.name]: gp,
            [hp.name]: hp,
            [yp.name]: yp,
            [Cr.name]: Cr,
            [vp.name]: vp,
            [Sp.name]: Sp,
            [xp.name]: xp,
            [Tp.name]: Tp,
            [wp.name]: wp,
            [Ip.name]: Ip,
            [Pp.name]: Pp,
            [Cp.name]: Cp,
            [Np.name]: Np,
            [Ap.name]: Ap,
            [Rp.name]: Rp,
            [kp.name]: kp,
            [Dp.name]: Dp,
            [Lp.name]: Lp,
            [Op.name]: Op,
            [_p.name]: _p,
            [Ep.name]: Ep,
            [Bp.name]: Bp,
            [Up.name]: Up,
            [Fp.name]: Fp,
            [ic.name]: ic,
            [$p.name]: $p,
            [Gp.name]: Gp,
            [zp.name]: zp,
            [Wp.name]: Wp,
            [jp.name]: jp,
            [Kp.name]: Kp,
            [Yp.name]: Yp,
            [Zp.name]: Zp,
            [Qp.name]: Qp,
            [Xp.name]: Xp,
            [oa.name]: oa,
            [rd.name]: rd,
            [aa.name]: aa,
            [ld.name]: ld,
            [cd.name]: cd,
            [pd.name]: pd,
            [ea.name]: ea,
            [dd.name]: dd,
            [xd.name]: xd,
            [Td.name]: Td,
            [wd.name]: wd,
            [Id.name]: Id,
            [Pd.name]: Pd,
            [Md.name]: Md,
            [Cd.name]: Cd,
            [Nd.name]: Nd,
            [Ad.name]: Ad,
            [Rd.name]: Rd,
            [kd.name]: kd,
            [Ld.name]: Ld,
            [Od.name]: Od,
            [Ed.name]: Ed,
            [Bd.name]: Bd,
            [Ud.name]: Ud,
            [Fd.name]: Fd,
            [$d.name]: $d,
            [Gd.name]: Gd,
            [Hd.name]: Hd,
            [zd.name]: zd,
            [Wd.name]: Wd,
            [qd.name]: qd,
            [Yd.name]: Yd,
            [Zd.name]: Zd,
            [Xd.name]: Xd,
            [Jd.name]: Jd,
            [em.name]: em,
            [tm.name]: tm,
            [rm.name]: rm,
            [im.name]: im,
            [am.name]: am,
            [lm.name]: lm,
            [pm.name]: pm,
            [dm.name]: dm,
            [ns.name]: ns,
            [fm.name]: fm,
            [gm.name]: gm,
            [hm.name]: hm,
            [ym.name]: ym,
            [vm.name]: vm,
            [bm.name]: bm,
            [Sm.name]: Sm,
            [xm.name]: xm,
            [Tm.name]: Tm,
            [Qr.name]: Qr,
            [wm.name]: wm,
            [Im.name]: Im,
            [Pm.name]: Pm,
            [Mm.name]: Mm,
            [Cm.name]: Cm,
            [Nm.name]: Nm,
            [Tn.name]: Tn,
            [Rm.name]: Rm,
            [km.name]: km,
            [Dm.name]: Dm,
            [da.name]: da,
            [Um.name]: Um,
            [Fm.name]: Fm,
            [Hm.name]: Hm,
            [zm.name]: zm,
            [Wm.name]: Wm,
            [jm.name]: jm,
            [qm.name]: qm,
            [Km.name]: Km,
            [Ym.name]: Ym,
            [Qm.name]: Qm,
            [Vm.name]: Vm,
            [ef.name]: ef,
            [tf.name]: tf,
            [of.name]: of,
            [nf.name]: nf,
            [df.name]: df,
            [mf.name]: mf,
            [ff.name]: ff,
            [gf.name]: gf,
            [hf.name]: hf,
            [yf.name]: yf,
            [vf.name]: vf,
            [bf.name]: bf,
            [xf.name]: xf,
            [va.name]: va,
            [Tf.name]: Tf,
            [wf.name]: wf,
            [If.name]: If,
            [Pf.name]: Pf,
            [Mf.name]: Mf,
            [Cf.name]: Cf,
            [Nf.name]: Nf,
            [Af.name]: Af,
            [Rf.name]: Rf,
            [kf.name]: kf,
            [Df.name]: Df,
            [Lf.name]: Lf,
            [_f.name]: _f,
            [Bf.name]: Bf,
            [Uf.name]: Uf,
            [Ff.name]: Ff,
            [Hf.name]: Hf,
            [Gf.name]: Gf,
            [zf.name]: zf,
            [Wf.name]: Wf,
            [jf.name]: jf,
            [qf.name]: qf,
            [Qf.name]: Qf,
            [Jf.name]: Jf,
            [Vf.name]: Vf,
            [tg.name]: tg,
            [og.name]: og,
            [ag.name]: ag,
            [Qi.name]: Qi,
            [lg.name]: lg,
            [pg.name]: pg,
            [dg.name]: dg,
            [mg.name]: mg,
            [fg.name]: fg,
            [hg.name]: hg,
            [yg.name]: yg,
            [vg.name]: vg,
            [bg.name]: bg,
            [xg.name]: xg,
        },
        Zn = {
            [zn.name]: { folderName: "_api/badges", userPlugin: !1 },
            [rp.name]: { folderName: "_api/chatButtons.ts", userPlugin: !1 },
            [np.name]: { folderName: "_api/commands.ts", userPlugin: !1 },
            [ip.name]: { folderName: "_api/contextMenu.ts", userPlugin: !1 },
            [sp.name]: { folderName: "_api/dynamicImageModalApi.ts", userPlugin: !1 },
            [ap.name]: { folderName: "_api/memberListDecorators", userPlugin: !1 },
            [lp.name]: { folderName: "_api/menuItemDemangler.ts", userPlugin: !1 },
            [cp.name]: { folderName: "_api/messageAccessories.ts", userPlugin: !1 },
            [up.name]: { folderName: "_api/messageDecorations", userPlugin: !1 },
            [pp.name]: { folderName: "_api/messageEvents.ts", userPlugin: !1 },
            [dp.name]: { folderName: "_api/messagePopover.ts", userPlugin: !1 },
            [mp.name]: { folderName: "_api/messageUpdater.ts", userPlugin: !1 },
            [fp.name]: { folderName: "_api/notices.ts", userPlugin: !1 },
            [gp.name]: { folderName: "_api/serverList.ts", userPlugin: !1 },
            [hp.name]: { folderName: "_api/userSettings.ts", userPlugin: !1 },
            [yp.name]: { folderName: "_core/noTrack.ts", userPlugin: !1 },
            [Cr.name]: { folderName: "_core/settings.tsx", userPlugin: !1 },
            [vp.name]: { folderName: "_core/supportHelper.tsx", userPlugin: !1 },
            [Sp.name]: { folderName: "accountPanelServerProfile", userPlugin: !1 },
            [xp.name]: { folderName: "alwaysAnimate", userPlugin: !1 },
            [Tp.name]: { folderName: "alwaysExpandRoles", userPlugin: !1 },
            [wp.name]: { folderName: "alwaysTrust", userPlugin: !1 },
            [Ip.name]: { folderName: "anonymiseFileNames", userPlugin: !1 },
            [Pp.name]: { folderName: "arRPC.web", userPlugin: !1 },
            [Cp.name]: { folderName: "betterFolders", userPlugin: !1 },
            [Np.name]: { folderName: "betterGifAltText", userPlugin: !1 },
            [Ap.name]: { folderName: "betterGifPicker", userPlugin: !1 },
            [Rp.name]: { folderName: "betterNotes", userPlugin: !1 },
            [kp.name]: { folderName: "betterRoleContext", userPlugin: !1 },
            [Dp.name]: { folderName: "betterRoleDot", userPlugin: !1 },
            [Lp.name]: { folderName: "betterSessions", userPlugin: !1 },
            [Op.name]: { folderName: "betterSettings", userPlugin: !1 },
            [_p.name]: { folderName: "betterUploadButton", userPlugin: !1 },
            [Ep.name]: { folderName: "biggerStreamPreview", userPlugin: !1 },
            [Bp.name]: { folderName: "blurNsfw", userPlugin: !1 },
            [Up.name]: { folderName: "callTimer", userPlugin: !1 },
            [Fp.name]: { folderName: "clearURLs", userPlugin: !1 },
            [ic.name]: { folderName: "clientTheme", userPlugin: !1 },
            [$p.name]: { folderName: "colorSighted", userPlugin: !1 },
            [Gp.name]: { folderName: "consoleJanitor", userPlugin: !1 },
            [zp.name]: { folderName: "consoleShortcuts", userPlugin: !1 },
            [Wp.name]: { folderName: "copyEmojiMarkdown", userPlugin: !1 },
            [jp.name]: { folderName: "copyFileContents", userPlugin: !1 },
            [Kp.name]: { folderName: "copyStickerLinks", userPlugin: !1 },
            [Yp.name]: { folderName: "copyUserURLs", userPlugin: !1 },
            [Zp.name]: { folderName: "crashHandler", userPlugin: !1 },
            [Qp.name]: { folderName: "ctrlEnterSend", userPlugin: !1 },
            [Xp.name]: { folderName: "customIdle", userPlugin: !1 },
            [oa.name]: { folderName: "customRPC", userPlugin: !1 },
            [rd.name]: { folderName: "dearrow", userPlugin: !1 },
            [aa.name]: { folderName: "decor", userPlugin: !1 },
            [ld.name]: { folderName: "disableCallIdle", userPlugin: !1 },
            [cd.name]: { folderName: "dontRoundMyTimestamps", userPlugin: !1 },
            [pd.name]: { folderName: "experiments", userPlugin: !1 },
            [ea.name]: { folderName: "expressionCloner", userPlugin: !1 },
            [dd.name]: { folderName: "f8break", userPlugin: !1 },
            [xd.name]: { folderName: "fakeNitro", userPlugin: !1 },
            [Td.name]: { folderName: "fakeProfileThemes", userPlugin: !1 },
            [wd.name]: { folderName: "favEmojiFirst", userPlugin: !1 },
            [Id.name]: { folderName: "favGifSearch", userPlugin: !1 },
            [Pd.name]: { folderName: "fixCodeblockGap", userPlugin: !1 },
            [Md.name]: { folderName: "fixImagesQuality", userPlugin: !1 },
            [Cd.name]: { folderName: "forceOwnerCrown", userPlugin: !1 },
            [Nd.name]: { folderName: "friendInvites", userPlugin: !1 },
            [Ad.name]: { folderName: "friendsSince", userPlugin: !1 },
            [Rd.name]: { folderName: "fullSearchContext", userPlugin: !1 },
            [kd.name]: { folderName: "fullUserInChatbox", userPlugin: !1 },
            [Ld.name]: { folderName: "gameActivityToggle", userPlugin: !1 },
            [Od.name]: { folderName: "gifPaste", userPlugin: !1 },
            [Ed.name]: { folderName: "greetStickerPicker", userPlugin: !1 },
            [Bd.name]: { folderName: "hideAttachments", userPlugin: !1 },
            [Ud.name]: { folderName: "iLoveSpam", userPlugin: !1 },
            [Fd.name]: { folderName: "ignoreActivities", userPlugin: !1 },
            [$d.name]: { folderName: "imageFilename", userPlugin: !1 },
            [Gd.name]: { folderName: "imageLink", userPlugin: !1 },
            [Hd.name]: { folderName: "imageZoom", userPlugin: !1 },
            [zd.name]: { folderName: "implicitRelationships", userPlugin: !1 },
            [Wd.name]: { folderName: "ircColors", userPlugin: !1 },
            [qd.name]: { folderName: "keepCurrentChannel", userPlugin: !1 },
            [Yd.name]: { folderName: "lastfmRichPresence", userPlugin: !1 },
            [Zd.name]: { folderName: "loadingQuotes", userPlugin: !1 },
            [Xd.name]: { folderName: "memberCount", userPlugin: !1 },
            [Jd.name]: { folderName: "mentionAvatars", userPlugin: !1 },
            [em.name]: { folderName: "messageClickActions", userPlugin: !1 },
            [tm.name]: { folderName: "messageLatency", userPlugin: !1 },
            [rm.name]: { folderName: "messageLinkEmbeds", userPlugin: !1 },
            [im.name]: { folderName: "messageLogger", userPlugin: !1 },
            [am.name]: { folderName: "messageTags", userPlugin: !1 },
            [lm.name]: { folderName: "moreQuickReactions", userPlugin: !1 },
            [pm.name]: { folderName: "mutualGroupDMs", userPlugin: !1 },
            [dm.name]: { folderName: "newGuildSettings", userPlugin: !1 },
            [ns.name]: { folderName: "noBlockedMessages", userPlugin: !1 },
            [fm.name]: { folderName: "noDeepLinks.web", userPlugin: !1 },
            [gm.name]: { folderName: "noDefaultHangStatus", userPlugin: !1 },
            [hm.name]: { folderName: "noDevtoolsWarning", userPlugin: !1 },
            [ym.name]: { folderName: "noF1", userPlugin: !1 },
            [vm.name]: { folderName: "noMaskedUrlPaste", userPlugin: !1 },
            [bm.name]: { folderName: "noMosaic", userPlugin: !1 },
            [Sm.name]: { folderName: "noOnboardingDelay", userPlugin: !1 },
            [xm.name]: { folderName: "noPendingCount", userPlugin: !1 },
            [Tm.name]: { folderName: "noProfileThemes", userPlugin: !1 },
            [Qr.name]: { folderName: "noReplyMention", userPlugin: !1 },
            [wm.name]: { folderName: "noServerEmojis", userPlugin: !1 },
            [Im.name]: { folderName: "noTypingAnimation", userPlugin: !1 },
            [Pm.name]: { folderName: "noUnblockToJump", userPlugin: !1 },
            [Mm.name]: { folderName: "notificationVolume", userPlugin: !1 },
            [Cm.name]: { folderName: "onePingPerDM", userPlugin: !1 },
            [Nm.name]: { folderName: "oneko", userPlugin: !1 },
            [Tn.name]: { folderName: "openInApp", userPlugin: !1 },
            [Rm.name]: { folderName: "overrideForumDefaults", userPlugin: !1 },
            [km.name]: { folderName: "pauseInvitesForever", userPlugin: !1 },
            [Dm.name]: { folderName: "permissionFreeWill", userPlugin: !1 },
            [da.name]: { folderName: "permissionsViewer", userPlugin: !1 },
            [Um.name]: { folderName: "petpet", userPlugin: !1 },
            [Fm.name]: { folderName: "pictureInPicture", userPlugin: !1 },
            [Hm.name]: { folderName: "pinDms", userPlugin: !1 },
            [zm.name]: { folderName: "plainFolderIcon", userPlugin: !1 },
            [Wm.name]: { folderName: "platformIndicators", userPlugin: !1 },
            [jm.name]: { folderName: "previewMessage", userPlugin: !1 },
            [qm.name]: { folderName: "quickMention", userPlugin: !1 },
            [Km.name]: { folderName: "quickReply", userPlugin: !1 },
            [Ym.name]: { folderName: "reactErrorDecoder", userPlugin: !1 },
            [Qm.name]: { folderName: "readAllNotificationsButton", userPlugin: !1 },
            [Vm.name]: { folderName: "relationshipNotifier", userPlugin: !1 },
            [ef.name]: { folderName: "replaceGoogleSearch", userPlugin: !1 },
            [tf.name]: { folderName: "replyTimestamp", userPlugin: !1 },
            [of.name]: { folderName: "revealAllSpoilers", userPlugin: !1 },
            [nf.name]: { folderName: "reverseImageSearch", userPlugin: !1 },
            [df.name]: { folderName: "reviewDB", userPlugin: !1 },
            [mf.name]: { folderName: "roleColorEverywhere", userPlugin: !1 },
            [ff.name]: { folderName: "secretRingTone", userPlugin: !1 },
            [gf.name]: { folderName: "seeSummaries", userPlugin: !1 },
            [hf.name]: { folderName: "sendTimestamps", userPlugin: !1 },
            [yf.name]: { folderName: "serverInfo", userPlugin: !1 },
            [vf.name]: { folderName: "serverListIndicators", userPlugin: !1 },
            [bf.name]: { folderName: "showAllMessageButtons", userPlugin: !1 },
            [xf.name]: { folderName: "showConnections", userPlugin: !1 },
            [va.name]: { folderName: "showHiddenChannels", userPlugin: !1 },
            [Tf.name]: { folderName: "showHiddenThings", userPlugin: !1 },
            [wf.name]: { folderName: "showMeYourName", userPlugin: !1 },
            [If.name]: { folderName: "showTimeoutDuration", userPlugin: !1 },
            [Pf.name]: { folderName: "silentMessageToggle", userPlugin: !1 },
            [Mf.name]: { folderName: "silentTyping", userPlugin: !1 },
            [Cf.name]: { folderName: "sortFriendRequests", userPlugin: !1 },
            [Nf.name]: { folderName: "spotifyControls", userPlugin: !1 },
            [Af.name]: { folderName: "spotifyCrack", userPlugin: !1 },
            [Rf.name]: { folderName: "spotifyShareCommands", userPlugin: !1 },
            [kf.name]: { folderName: "startupTimings", userPlugin: !1 },
            [Df.name]: { folderName: "stickerPaste", userPlugin: !1 },
            [Lf.name]: { folderName: "streamerModeOnStream", userPlugin: !1 },
            [_f.name]: { folderName: "superReactionTweaks", userPlugin: !1 },
            [Bf.name]: { folderName: "textReplace", userPlugin: !1 },
            [Uf.name]: { folderName: "themeAttributes", userPlugin: !1 },
            [Ff.name]: { folderName: "translate", userPlugin: !1 },
            [Hf.name]: { folderName: "typingIndicator", userPlugin: !1 },
            [Gf.name]: { folderName: "typingTweaks", userPlugin: !1 },
            [zf.name]: { folderName: "unindent", userPlugin: !1 },
            [Wf.name]: { folderName: "unlockedAvatarZoom", userPlugin: !1 },
            [jf.name]: { folderName: "unsuppressEmbeds", userPlugin: !1 },
            [qf.name]: { folderName: "userMessagesPronouns", userPlugin: !1 },
            [Qf.name]: { folderName: "userVoiceShow", userPlugin: !1 },
            [Jf.name]: { folderName: "usrbg", userPlugin: !1 },
            [Vf.name]: { folderName: "validReply", userPlugin: !1 },
            [tg.name]: { folderName: "validUser", userPlugin: !1 },
            [og.name]: { folderName: "vcDoubleClick", userPlugin: !1 },
            [ag.name]: { folderName: "vcNarrator", userPlugin: !1 },
            [Qi.name]: { folderName: "vencordToolbox", userPlugin: !1 },
            [lg.name]: { folderName: "viewIcons", userPlugin: !1 },
            [pg.name]: { folderName: "viewRaw", userPlugin: !1 },
            [dg.name]: { folderName: "voiceDownload", userPlugin: !1 },
            [mg.name]: { folderName: "voiceMessages", userPlugin: !1 },
            [fg.name]: { folderName: "volumeBooster", userPlugin: !1 },
            [hg.name]: { folderName: "webContextMenus.web", userPlugin: !1 },
            [yg.name]: { folderName: "webKeybinds.web", userPlugin: !1 },
            [vg.name]: { folderName: "webScreenShareFixes.web", userPlugin: !1 },
            [bg.name]: { folderName: "whoReacted", userPlugin: !1 },
            [xg.name]: { folderName: "xsOverlay", userPlugin: !1 },
        },
        V2 = {
            AppleMusicRichPresence: "desktop",
            AutoDNDWhilePlaying: "discordDesktop",
            DevCompanion: "dev",
            FixSpotifyEmbeds: "desktop",
            FixYoutubeEmbeds: "desktop",
            NoSystemBadge: "discordDesktop",
            ShikiCodeblocks: "desktop",
            YoutubeAdblock: "desktop",
        };
    var wv = {};
    Ke(wv, {
        Badges: () => NR,
        ChatButtons: () => ER,
        Commands: () => IR,
        ContextMenu: () => _R,
        DataStore: () => PR,
        MemberListDecorators: () => kR,
        MessageAccessories: () => MR,
        MessageDecorations: () => RR,
        MessageEvents: () => TR,
        MessagePopover: () => CR,
        MessageUpdater: () => BR,
        Notices: () => wR,
        Notifications: () => OR,
        PluginManager: () => Wl,
        ServerList: () => AR,
        Settings: () => DR,
        Styles: () => LR,
        Themes: () => FR,
        UserSettings: () => UR,
    });
    a();
    l();
    var Tv = {};
    Ke(Tv, { initQuickCssThemeStore: () => xR });
    a();
    l();
    Pe();
    S();
    var Na, aT;
    async function lT(e) {
        Na
            ? (Na.disabled = !e)
            : e &&
              ((Na = Eo("vencord-custom-css", $l)),
              VencordNative.quickCss.addChangeListener((t) => {
                  (Na.textContent = t), (Na.disabled = !W.useQuickCss), uT();
              }),
              (Na.textContent = await VencordNative.quickCss.get()));
    }
    async function Yc() {
        aT ??= Eo("vencord-themes", $l);
        let { themeLinks: e, enabledThemes: t } = W,
            { ThemeStore: o } = (Oh(), ka(u2)),
            n = o == null ? void 0 : o.theme === "light" ? "light" : "dark",
            i = e
                .map((s) => {
                    let c = /^@(light|dark) (.*)/.exec(s);
                    if (!c) return s;
                    let [, u, p] = c;
                    return u === n ? p : null;
                })
                .filter((s) => s !== null);
        for (let s of t) {
            let c = await VencordNative.themes.getThemeData(s);
            if (!c) continue;
            let u = new Blob([c], { type: "text/css" });
            i.push(URL.createObjectURL(u));
        }
        (aT.textContent = i.map((s) => `@import url("${s.trim()}");`).join(`
`)),
            uT();
    }
    function cT(e, t) {
        if (!e?.document || t === "DISCORD_OutOfProcessOverlay") return;
        let o = e.document;
        o.querySelector("vencord-root")?.remove(), o.documentElement.appendChild(Ws.cloneNode(!0));
    }
    function uT() {
        if (Un) for (let e of Un.getWindowKeys()) cT(Un.getWindow(e), e);
    }
    document.addEventListener("DOMContentLoaded", () => {}, { once: !0 });
    function xR(e) {}
    var TR = y1,
        wR = L1,
        IR = a1,
        PR = _o,
        MR = c1,
        CR = b1,
        NR = Wh,
        AR = Ly,
        RR = u1,
        kR = l1,
        DR = t1,
        LR = w1,
        OR = H1,
        _R = Xh,
        ER = r1,
        BR = ty,
        UR = d0,
        FR = Tv;
    var Iv = {};
    Ke(Iv, {
        AddonBadge: () => O1,
        AddonCard: () => Hu,
        BackupAndRestoreTab: () => ju,
        BackupRestoreIcon: () => Xg,
        BaseText: () => qo,
        Button: () => jt,
        ButtonCompat: () => gs,
        Card: () => mt,
        CheckedTextInput: () => oc,
        ClockIcon: () => th,
        CloudDownloadIcon: () => Vg,
        CloudIcon: () => Qg,
        CloudTab: () => Ju,
        CloudUploadIcon: () => eh,
        CodeBlock: () => Rl,
        CogWheel: () => Fa,
        CopyIcon: () => en,
        DeleteIcon: () => ar,
        Divider: () => Fe,
        ErrorBoundary: () => C,
        ErrorCard: () => eo,
        Flex: () => oe,
        FolderIcon: () => _T,
        FormSwitch: () => cr,
        FormSwitchCompat: () => rh,
        GithubIcon: () => Ga,
        Grid: () => rc,
        Heading: () => Xt,
        HeadingPrimary: () => GT,
        HeadingSecondary: () => HT,
        HeadingTertiary: () => Br,
        Heart: () => Pl,
        ImageIcon: () => sr,
        ImageInvisible: () => ms,
        ImageVisible: () => Ua,
        InfoIcon: () => Ba,
        InlineCode: () => Ow,
        Link: () => Ve,
        LinkButton: () => za,
        LinkIcon: () => mi,
        LogIcon: () => qg,
        MainSettingsIcon: () => Yg,
        Margins: () => O,
        Microphone: () => ru,
        NoEntrySignIcon: () => $a,
        NotesIcon: () => jg,
        OpenExternalIcon: () => Ko,
        OwnerCrownIcon: () => Hg,
        PaintbrushIcon: () => fs,
        Paragraph: () => Me,
        PatchHelperIcon: () => BT,
        PatchHelperTab: () => T2,
        PencilIcon: () => Bv,
        PlaceholderIcon: () => Ha,
        PluginsIcon: () => Zg,
        PluginsTab: () => qs,
        PlusIcon: () => nu,
        QuickAction: () => Zs,
        QuickActionCard: () => ep,
        ReplyIcon: () => OT,
        RestartIcon: () => iu,
        SafetyIcon: () => Wg,
        ScreenshareIcon: () => zg,
        SettingsTab: () => $o,
        Span: () => fi,
        SpecialCard: () => sc,
        Switch: () => tn,
        TextButton: () => au,
        TextCompat: () => Gg,
        ThemesTab: () => Zi,
        UpdaterIcon: () => ET,
        UpdaterTab: () => s0,
        VencordTab: () => op,
        VesktopSettingsIcon: () => Jg,
        WebsiteIcon: () => Kg,
        generateMarginCss: () => $h,
        generateTextCss: () => $g,
        handleSettingsTabError: () => Yh,
        openContributorModal: () => Yn,
        openPluginModal: () => wr,
        openSettingsTabModal: () => Fs,
        wrapTab: () => Vo,
    });
    a();
    l();
    Vr();
    lr();
    Qt();
    Nn();
    Ur();
    Ue();
    Wt();
    Yo();
    lu();
    gi();
    var Pv = {};
    Ke(Pv, {
        CONTRIB_ROLE_ID: () => kg,
        ChangeList: () => jl,
        CspBlockedUrls: () => Vu,
        DONOR_ROLE_ID: () => _a,
        Devs: () => d,
        DevsById: () => pi,
        IS_LINUX: () => Og,
        IS_MAC: () => Bo,
        IS_MOBILE: () => AT,
        IS_WINDOWS: () => NT,
        KNOWN_ISSUES_CHANNEL_ID: () => CT,
        LazyComponent: () => lt,
        Logger: () => U,
        Margins: () => O,
        ModalAPI: () => Sl,
        ModalCloseButton: () => et,
        ModalContent: () => Ie,
        ModalFooter: () => St,
        ModalHeader: () => Re,
        ModalRoot: () => ve,
        ModalSize: () => So,
        Modals: () => _s,
        NoopComponent: () => dh,
        Queue: () => xo,
        REACT_GLOBAL: () => MT,
        REGULAR_ROLE_ID: () => Dg,
        SUPPORT_CATEGORY_ID: () => ui,
        SUPPORT_CHANNEL_ID: () => ou,
        SYM_LAZY_CACHED: () => on,
        SYM_LAZY_GET: () => ur,
        Theme: () => Tl,
        VENBOT_USER_ID: () => La,
        VENCORD_GUILD_ID: () => Oa,
        ZWSP: () => Ka,
        canonicalizeDescriptor: () => pu,
        canonicalizeFind: () => ah,
        canonicalizeMatch: () => Lt,
        canonicalizeReplace: () => ja,
        canonicalizeReplacement: () => qa,
        checkIntersecting: () => _g,
        classNameFactory: () => Y,
        classNameToSelector: () => Rg,
        classes: () => L,
        closeAllModals: () => Wr,
        closeModal: () => un,
        copyToClipboard: () => Po,
        copyWithToast: () => tt,
        createAndAppendStyle: () => Eo,
        debounce: () => kt,
        escapeRegExp: () => lh,
        fetchUserProfile: () => Es,
        formatDuration: () => Za,
        getCurrentChannel: () => Mo,
        getCurrentGuild: () => jr,
        getGuildAcronym: () => ki,
        getIntlMessage: () => Ae,
        getIntlMessageFromHash: () => Fh,
        getTheme: () => Ai,
        getUniqueUsername: () => qr,
        hasGuildFeature: () => Bs,
        humanFriendlyJoin: () => rw,
        identity: () => ds,
        insertTextIntoChatInputBox: () => Hn,
        interpolateIfDefined: () => Ea,
        isNonNullish: () => Tr,
        isObject: () => RT,
        isObjectEmpty: () => di,
        isPluginDev: () => Er,
        isPrimitiveReactNode: () => mh,
        isTruthy: () => qn,
        localStorage: () => Zt,
        makeCodeblock: () => bi,
        makeLazy: () => rn,
        mergeDefaults: () => $s,
        onceDefined: () => $R,
        onlyOnce: () => dn,
        openImageModal: () => Co,
        openInviteModal: () => pn,
        openMediaModal: () => Uh,
        openModal: () => fe,
        openModalLazy: () => xl,
        openPrivateChannel: () => f2,
        openUserProfile: () => No,
        parseUrl: () => kT,
        pluralise: () => Bg,
        proxyLazy: () => Pt,
        runtimeHashMessageKey: () => sn,
        sendMessage: () => Ri,
        shouldShowContributorBadge: () => Eg,
        sleep: () => ir,
        stripIndent: () => Xv,
        toInlineCode: () => nw,
        tryOrElse: () => Ug,
        useAwaiter: () => _t,
        useCleanupEffect: () => fh,
        useCspErrors: () => Mb,
        useForceUpdater: () => Qo,
        useIntersection: () => uw,
        useTimer: () => il,
        wordsFromCamel: () => Ya,
        wordsFromKebab: () => ZT,
        wordsFromPascal: () => QT,
        wordsFromSnake: () => YT,
        wordsFromTitle: () => XT,
        wordsToCamel: () => JT,
        wordsToKebab: () => ew,
        wordsToPascal: () => tw,
        wordsToSnake: () => VT,
        wordsToTitle: () => vi,
    });
    a();
    l();
    a();
    l();
    function $R(e, t, o) {
        let n = t;
        if (t in e) return void o(e[n]);
        Object.defineProperty(e, t, {
            set(i) {
                delete e[n], (e[n] = i), o(i);
            },
            configurable: !0,
            enumerable: !1,
        });
    }
    Gn();
    T();
    Pe();
    se();
    vs();
    Fo();
    yi();
    le();
    re();
    Oe();
    pr();
    pt();
    dr();
    var Mv = {};
    Ke(Mv, {
        ChunkIdsRegex: () => vu,
        Common: () => An,
        DefaultExtractAndLoadChunksRegex: () => yu,
        LazyComponentWebpack: () => r2,
        _blacklistBadModules: () => gu,
        _initWebpack: () => Va,
        _resolveReady: () => Qa,
        cache: () => Zo,
        extract: () => nl,
        extractAndLoadChunks: () => ph,
        extractAndLoadChunksLazy: () => xi,
        factoryListeners: () => Ja,
        filters: () => _,
        find: () => ho,
        findAll: () => Rn,
        findBulk: () => hu,
        findByCode: () => Ss,
        findByCodeLazy: () => de,
        findByProps: () => tl,
        findByPropsLazy: () => X,
        findComponentByCode: () => n2,
        findComponentByCodeLazy: () => ge,
        findComponentLazy: () => xs,
        findCssClasses: () => ch,
        findCssClassesLazy: () => ee,
        findExportedComponentLazy: () => i2,
        findLazy: () => Ot,
        findModuleFactory: () => el,
        findModuleId: () => kn,
        findStore: () => ol,
        findStoreLazy: () => it,
        fluxStores: () => Fr,
        handleModuleNotFound: () => mr,
        lazyWebpackSearchHistory: () => o2,
        makeClassNameRegex: () => mu,
        mapMangledCssClasses: () => rl,
        mapMangledModule: () => uh,
        mapMangledModuleLazy: () => Ye,
        moduleListeners: () => fu,
        onceReady: () => bs,
        proxyLazyWebpack: () => wo,
        search: () => Ts,
        stringMatches: () => Xa,
        waitFor: () => Ze,
        waitForSubscriptions: () => Si,
        wreq: () => ct,
    });
    a();
    l();
    S();
    a();
    l();
    G();
    T();
    Pe();
    S();
    async function GR() {
        if (
            (Zt.Vencord_cloudSyncDirection === void 0 && (Zt.Vencord_cloudSyncDirection = "both"),
            W.cloud.authenticated && !(await wt("Vencord_cloudSecret")))
        ) {
            He({
                title: "Cloud Integrations",
                body: "We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",
                color: "var(--yellow-360)",
                onClick: () => Fn.openUserSettings("vencord_cloud_panel"),
            });
            return;
        }
        W.cloud.settingsSync &&
            W.cloud.authenticated &&
            Zt.Vencord_cloudSyncDirection !== "manual" &&
            (Zt.Vencord_settingsDirty && Qu("push")
                ? await tc()
                : Qu("pull") &&
                  (await Xu(!1)) &&
                  He({
                      title: "Cloud Settings",
                      body: "Your settings have been updated! Click here to restart to fully apply changes!",
                      color: "var(--green-360)",
                      onClick: hr,
                  }));
        let e = kt(async () => {
            W.cloud.settingsSync && W.cloud.authenticated && Qu("push") && (await tc());
        }, 6e4);
        dt.addGlobalChangeListener(() => {
            (Zt.Vencord_settingsDirty = !0), e();
        });
    }
    async function HR() {
        await bs, Hl("WebpackReady"), GR();
    }
    k1();
    S1();
    Hl("Init");
    HR();
    document.addEventListener(
        "DOMContentLoaded",
        () => {
            Hl("DOMContentLoaded");
        },
        { once: !0 }
    );
    return ka(zR);
})();
Object.defineProperty(unsafeWindow, "Vencord", { get: () => Vencord });
/*! For license information please see Vencord.user.js.LEGAL.txt */
unsafeWindow._vcUserScriptRendererCss = `.vc-text-base{font-family:var(--font-primary);color:var(--text-default);line-height:normal;margin:0}.vc-btn-base{position:relative;display:flex;justify-content:center;align-items:center;max-width:100%;border:1px solid transparent;border-radius:var(--radius-sm, 8px);font-family:var(--font-primary);text-align:start;transition:50ms ease-in;transition-property:background-color,color,border-color,opacity;background:var(--control-secondary-background-default);color:var(--text-default);white-space:nowrap;&:hover{transition:.15s ease-out}&:disabled{opacity:.5;pointer-events:none;cursor:not-allowed}&:focus-visible{box-shadow:0 0 0 4px var(--__adaptive-focus-ring-color, var(--border-focus, #00b0f4))}}.vc-btn-min,.vc-btn-xs{padding:3px 7px;min-height:22px;min-width:unset;font-size:12px;font-weight:400;line-height:1.3333}.vc-btn-xs{min-width:60px}.vc-btn-small{padding:3px 11px;min-height:30px;min-width:60px;font-size:14px;font-weight:500;line-height:1.2857}.vc-btn-medium{padding:7px 15px;min-height:38px;min-width:100px;font-size:16px;font-weight:500;line-height:1.25}.vc-btn-iconOnly{width:32px;height:32px;min-width:unset;min-height:unset;padding:0;background-color:transparent;border-color:transparent;&:hover{background-color:var(--control-icon-only-background-hover);border-color:var(--control-icon-only-border-hover)}&:active{background-color:var(--control-icon-only-background-active);border-color:var(--control-icon-only-border-active)}}.vc-btn-primary{background-color:var(--control-primary-background-default);border-color:var(--control-primary-border-default);color:var(--control-primary-text-default);&:hover{background-color:var(--control-primary-background-hover);border-color:var(--control-primary-border-hover);color:var(--control-primary-text-hover)}}.vc-btn-secondary,.vc-btn-link{background-color:var(--control-secondary-background-default);border-color:var(--control-secondary-border-default);color:var(--control-secondary-text-default);&:hover{background-color:var(--control-secondary-background-hover);border-color:var(--control-secondary-border-hover);color:var(--control-secondary-text-hover)}}.vc-btn-dangerPrimary{background-color:var(--control-critical-primary-background-default);border-color:var(--control-critical-primary-border-default);color:var(--control-critical-primary-text-default);&:hover{background-color:var(--control-critical-primary-background-hover);border-color:var(--control-critical-primary-border-hover);color:var(--control-critical-primary-text-hover)}}.vc-btn-dangerSecondary{background-color:var(--control-critical-secondary-background-default);border-color:var(--control-critical-secondary-border-default);color:var(--control-critical-secondary-text-default);&:hover{background-color:var(--control-critical-secondary-background-hover);border-color:var(--control-critical-secondary-border-hover);color:var(--control-critical-secondary-text-hover)}}.vc-btn-overlayPrimary{background-color:var(--control-overlay-primary-background-default);border-color:var(--control-overlay-primary-border-default);color:var(--control-overlay-primary-text-default);&:hover{background-color:var(--control-overlay-primary-background-hover);border-color:var(--control-overlay-primary-border-hover);color:var(--control-overlay-primary-text-hover)}}.vc-btn-positive{background-color:var(--control-connected-background-default, var(--green-430));color:var(--white);&:hover{background-color:var(--control-connected-background-hover, var(--green-460))}}.vc-btn-none{background-color:transparent;border-color:transparent;color:var(--control-icon-only-icon-default);&:hover{background-color:var(--control-icon-only-background-hover);border-color:var(--control-icon-only-border-hover);color:var(--control-icon-only-icon-hover)}}.vc-btn-link-icon{width:.875em;height:.875em;margin-left:8px;flex-shrink:0}.vc-text-btn-base{display:inline-flex;justify-content:center;align-items:center;gap:var(--space-4, 4px);background:initial;color:var(--text-default);font-size:medium;font-weight:400;margin:0;padding:0;text-align:start;text-decoration:none;max-width:100%;white-space:nowrap;&:disabled{opacity:.5}&:hover{text-decoration:underline}&:focus-visible{box-shadow:0 0 0 4px var(--__adaptive-focus-ring-color, var(--border-focus, #00b0f4))}}.vc-text-btn-primary{color:var(--text-brand)}.vc-text-btn-secondary{color:var(--text-strong, var(--text-default))}.vc-text-btn-danger{color:var(--text-feedback-critical)}.vc-text-btn-link{color:var(--text-link)}.vc-owner-crown-icon{color:var(--status-warning)}.vc-divider{height:1px;width:100%;border:none;border-top:1px solid var(--border-subtle)}.vc-form-switch-wrapper{margin-bottom:20px;cursor:pointer}.vc-form-switch{display:flex;width:100%;>:last-child{margin-left:auto}}.vc-form-switch-disabled{opacity:.5;pointer-events:none;cursor:not-allowed}.vc-form-switch-text{display:flex;flex-direction:column;justify-content:center;gap:8px}.vc-form-switch-border{margin-top:20px}.vc-switch-container{background:var(--primary-400);border:1px solid transparent;border-radius:16px;box-sizing:border-box;cursor:pointer;height:28px;position:relative;width:44px;.high-contrast-mode &{border-color:var(--border-strong)}}.vc-switch-checked{background:var(--brand-500);border-color:var(--control-primary-border-default)}.vc-switch-disabled{cursor:not-allowed;opacity:.3}.vc-switch-focusVisible{box-shadow:0 0 0 4px var(--__adaptive-focus-ring-color, var(--border-focus, #00b0f4))}.vc-switch-slider{display:block;height:20px;left:0;margin:3px;position:absolute;width:28px;transition:.1s transform ease-in-out;overflow:visible}.vc-switch-input{border-radius:14px;cursor:pointer;height:100%;left:0;margin:0;opacity:0;position:absolute;top:0;width:100%;&:disabled{pointer-events:none;cursor:not-allowed}}.vc-h1,.vc-h2{color:var(--text-strong);font-weight:600}.vc-h3,.vc-h4,.vc-h5{color:var(--text-strong)}.vc-h1{font-size:20px;line-height:24px}.vc-h2{font-size:16px;line-height:20px}.vc-h3{font-weight:500;line-height:24px}.vc-h3,.vc-h4{font-size:16px}.vc-h4{font-weight:600;letter-spacing:.3px}.vc-h4,.vc-h5{line-height:20px}.vc-h5{color:var(--text-strong);font-size:16px;font-weight:500;margin-bottom:8px;text-transform:unset}.vc-h1-defaultMargin,.vc-h2-defaultMargin{margin-bottom:20px}.vc-h4-defaultMargin{margin-bottom:0;margin-top:0}.vc-h3-defaultMargin,.vc-h5-defaultMargin{margin-bottom:8px}[class*=profile] [class*=tags] [class*=container]{gap:1px}.vc-error-card{padding:2em;background-color:#e7828430;border:1px solid #e78284;border-radius:5px;color:var(--text-default, white);& a:hover{text-decoration:underline}}.vc-settings-tab-bar{margin-top:20px;margin-bottom:10px;border-bottom:1px solid var(--border-subtle)}.vc-settings-tab-bar-item{margin-right:32px;padding-bottom:16px;margin-bottom:-2px}.vc-settings-donate{display:flex;flex-direction:row}.vc-settings-theme-links{display:inline-block!important;color:var(--text-default)!important;padding:.5em 1em;border:1px solid var(--input-border-default);max-height:unset;background-color:transparent;box-sizing:border-box;resize:none;width:100%;font-size:1em;line-height:2em;white-space:nowrap}.vc-settings-theme-links::placeholder{color:var(--text-muted)!important}.vc-settings-theme-links:focus{background-color:var(--background-base-lowest)}.vc-cloud-settings-sync-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1em;margin-top:16px}.vc-cloud-erase-data-danger-btn{color:var(--control-critical-primary-text-default);background-color:var(--control-critical-primary-background-default)}.vc-cloud-icon-with-button{display:flex;gap:.5em;padding-inline:.5em 1em}.vc-cloud-button-icon{height:1.25em}.vc-settings-modal{padding:1.5em!important}.vc-settings-modal-close{float:right}.vc-plugins-grid{margin-top:16px;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-plugins-info-button{height:24px;width:24px;padding:0;background:transparent;margin-right:8px;color:var(--icon-muted);transition:background-color .2s ease;&:hover{color:var(--interactive-icon-hover)}}.vc-plugins-settings-button:hover{color:var(--interactive-icon-hover)}.vc-plugins-filter-controls{display:grid;height:40px;gap:10px;grid-template-columns:1fr 150px}.vc-addon-badge{padding:0 6px;font-family:var(--font-display);font-weight:500;border-radius:8px;height:16px;font-size:12px;line-height:16px;color:var(--white-500);text-align:center}.vc-plugins-dep-name{margin:0 auto}.vc-plugins-info-card{padding:1em;height:8em;display:flex;flex-direction:column;gap:.25em}.vc-plugins-restart-button{margin-top:.5em;background:var(--icon-status-idle)!important}.vc-plugins-info-icon:not(:hover,:focus){color:var(--text-muted)}.vc-plugins-settings{display:flex;flex-direction:column;gap:1.25em}.vc-chatbar-button{display:flex;align-items:center}.vc-card-base{background:var(--card-background-default);border-radius:var(--radius-sm, 8px)}.vc-card-normal{border:1px solid var(--border-subtle)}.vc-card-warning{border:1px solid var(--icon-status-idle)}.vc-card-danger{border:1px solid var(--icon-status-dnd)}.vc-card-defaultPadding{padding:1em}.vc-addon-card{background-color:var(--card-background-default);color:var(--interactive-icon-active);border:1px solid var(--border-subtle);border-radius:8px;display:block;height:100%;padding:12px;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity;box-sizing:border-box}.vc-addon-card-disabled{opacity:.6}.vc-addon-card:hover{transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-addon-header{margin-top:auto;display:flex;width:100%;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:.5em}.vc-addon-note{height:36px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical}.vc-addon-name-author{width:100%}.vc-addon-name{display:flex;width:100%;align-items:center;flex-grow:1;gap:8px}.vc-addon-author{font-size:.8em}.vc-addon-author:before{content:"by "}.vc-addon-title-container{width:100%;overflow:hidden;height:1.25em;position:relative}.vc-addon-title{position:absolute;inset:0;overflow:hidden;text-overflow:ellipsis}@keyframes vc-addon-title{0%{transform:translate(0)}50%{transform:translate(var(--offset))}to{transform:translate(0)}}.vc-addon-title:hover{overflow:visible;animation:vc-addon-title var(--duration) linear infinite}.vc-settings-modal-content{padding-bottom:24px}.vc-plugin-modal-info{align-items:center}.vc-plugin-modal-description{flex-grow:1}.vc-plugins-setting-section,.vc-plugins-setting-content{display:flex;flex-direction:column;gap:.5em}.vc-plugins-setting-inline{flex-direction:row;align-items:center;justify-content:space-between}.vc-plugins-setting-label{display:flex;flex-direction:column;gap:.25em}.vc-plugins-setting-title{color:var(--text-strong)}.vc-plugins-setting-description{color:var(--text-default)}.vc-plugins-setting-error{color:var(--text-feedback-critical, #FF5C5C)}.vc-author-modal-root{padding:1em}.vc-author-modal-header{display:flex;align-items:center;margin-bottom:1em}.vc-author-modal-name{text-transform:none;flex-grow:0;background:var(--background-base-lowest);border-radius:0 9999px 9999px 0;padding:6px .8em 6px .5em;font-size:20px;height:20px;position:relative;text-wrap:nowrap}.vc-author-modal-name:before{content:"";display:block;position:absolute;height:100%;width:32px;background:var(--background-base-lowest);z-index:-1;left:-32px;top:0;border-top-left-radius:9999px;border-bottom-left-radius:9999px}.vc-author-modal-avatar{height:32px;width:32px;border-radius:50%}.vc-author-modal-links{margin-left:auto}.vc-author-modal-plugins{display:grid;gap:.5em;margin-top:.75em}.vc-settings-modal-link-icon{height:32px;width:32px;border-radius:50%;border:4px solid var(--background-base-lowest);box-sizing:border-box}.vc-settings-modal-links{display:flex;gap:.2em}.vc-plugin-ui-elements-button{display:flex;align-items:center;color:var(--interactive-icon-default);margin-top:.5em;cursor:pointer;&:hover{background-color:var(--background-mod-subtle);color:var(--interactive-icon-hover)}}.vc-plugin-ui-elements-button-arrow{margin-left:auto;width:24px;height:24px}.vc-plugin-ui-elements-modal-content{padding:1em;display:flex;flex-direction:column;gap:1.5em}.vc-plugin-ui-elements-switches{display:flex;flex-direction:column;gap:1em}.vc-plugin-ui-elements-switches-row{display:flex;gap:1em;width:100%;align-items:center;:last-child{margin-left:auto}}.vc-notification-root{all:unset;display:flex;flex-direction:column;color:var(--text-default);background-color:var(--background-base-low);border-radius:6px;overflow:hidden;cursor:pointer;width:100%}.vc-notification-root:not(.vc-notification-log-wrapper>.vc-notification-root){position:absolute;z-index:2147483647;right:1rem;width:25vw;min-height:10vh}.vc-notification{display:flex;flex-direction:row;padding:1.25rem;gap:1.25rem}.vc-notification-content{width:100%;overflow:hidden}.vc-notification-header{display:flex;justify-content:space-between}.vc-notification-title{color:var(--text-strong);font-size:1rem;font-weight:600;line-height:1.25rem;text-transform:uppercase}.vc-notification-close-btn{all:unset;cursor:pointer;color:var(--interactive-icon-default);opacity:.5;transition:opacity .2s ease-in-out,color .2s ease-in-out}.vc-notification-close-btn:hover{color:var(--interactive-icon-hover);opacity:1}.vc-notification-icon{height:4rem;width:4rem;border-radius:6px}.vc-notification-progressbar{height:.25rem;border-radius:5px;margin-top:auto}.vc-notification-p{margin:.5rem 0 0;line-height:140%}.vc-notification-img{width:100%}.vc-notification-log-modal{max-width:962px;width:clamp(var(--modal-width-large, 800px),962px,85vw)}.vc-notification-log-empty{height:218px;background:url(/assets/b36de980b174d7b798c89f35c116e5c6.svg) center no-repeat;margin-bottom:40px}.vc-notification-log-container{padding:1em;max-height:min(750px,75vh);width:100%}.vc-notification-log-wrapper{height:120px;width:100%;padding-bottom:16px;box-sizing:border-box;transition:.2s ease;transition-property:height,opacity;.vc-notification-root{height:104px}}.vc-notification-log-removing{height:0!important;opacity:0;margin-bottom:1em}.vc-notification-log-body-wrapper{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.vc-notification-log-body{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.2em}.vc-notification-log-timestamp{margin-left:auto;font-size:.8em;font-weight:lighter}.vc-notification-log-danger-btn{color:var(--control-critical-primary-text-default);background-color:var(--control-critical-primary-background-default)}.vc-settings-theme-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-settings-csp-list{display:flex;flex-direction:column;gap:8px}.vc-settings-csp-row{display:flex;justify-content:space-between;align-items:center;gap:8px;& a{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:1.2em}--custom-button-button-md-height: 26px}.vc-settings-quickActions-card{display:grid;grid-template-columns:repeat(3,1fr);gap:.5em;padding:.5em;margin-bottom:1em}@media(width<=1040px){.vc-settings-quickActions-card{grid-template-columns:repeat(2,1fr)}}.vc-settings-quickActions-pill{all:unset;cursor:pointer;background:var(--control-secondary-background-default);color:var(--control-secondary-text-default, var(--text-default));display:flex;align-items:center;gap:.5em;padding:8px 9px;border-radius:8px;transition:.1s ease-out;box-sizing:border-box}.vc-settings-quickActions-pill:hover{background:var(--control-secondary-background-hover);transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-settings-quickActions-pill:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px}.vc-settings-quickActions-img{width:24px;height:24px}.vc-clientTheme-settings{display:flex;flex-direction:column}.vc-clientTheme-container{display:flex;flex-direction:row;justify-content:space-between}.vc-clientTheme-labels{display:flex;flex-direction:column;justify-content:flex-start}.vc-clientTheme-container [class*=swatch]{border:thin solid var(--input-border-default)!important}.vc-clientTheme-buttons-container{margin-top:16px;display:flex;gap:4px}.vc-donate-button{overflow:visible!important}.vc-donate-button .vc-heart-icon{transition:transform .3s;margin-right:.5em}.vc-donate-button:hover .vc-heart-icon{transform:scale(1.1);z-index:10;position:relative}.vc-special-card-special{padding:1em 1.5em;margin-bottom:1em;background-size:cover;background-position:center}.vc-special-card-flex{display:flex;flex-direction:row}.vc-special-card-flex-main{width:100%}.vc-special-title{color:#000}.vc-special-subtitle{color:#000;font-size:1.2em;font-weight:700;margin-top:.5em}.vc-special-text{color:#000;font-size:1em;margin-top:.75em;white-space:pre-line}.vc-special-seperator{margin-top:.75em;border-top:1px solid white;opacity:.4}.vc-special-hyperlink{margin-top:1em;cursor:pointer;.vc-special-hyperlink-text{color:#000;font-size:1em;font-weight:700;text-align:center;transition:text-decoration .5s;cursor:pointer}&:hover .vc-special-hyperlink-text{text-decoration:underline}}.vc-special-image-container{display:flex;justify-content:center;align-items:center;margin-left:1em;flex-shrink:0;width:100px;height:100px;border-radius:50%;background-color:#fff}.vc-special-image{width:65%}.vc-betterFolders-sidebar{grid-area:betterFoldersSidebar}.vc-betterFolders-sidebar-grid{grid-template-columns:[start] min-content [guildsEnd] min-content [sidebarEnd] min-content [channelsEnd] 1fr [end];grid-template-areas:"titleBar titleBar titleBar titleBar" "guildsList betterFoldersSidebar notice notice" "guildsList betterFoldersSidebar channelsList page"}.vc-betterSessions-footer-buttons{display:flex;gap:.5em;align-items:center}.vc-betterSessions-rename-btn{margin-left:4px;translate:0 -2px}.vc-toolbox-btn,.vc-toolbox-icon{-webkit-app-region:no-drag}.vc-toolbox-icon{color:var(--interactive-icon-default)}.vc-toolbox-btn[class*=selected] .vc-toolbox-icon{color:var(--interactive-icon-active)}.vc-toolbox-btn:hover .vc-toolbox-icon{color:var(--interactive-icon-hover)}.vc-cfc-button{color:var(--interactive-icon-default);cursor:pointer;padding-left:4px}.vc-cfc-button:hover{color:var(--interactive-icon-hover)}.vc-customRPC-settings-root{display:flex;flex-direction:column;gap:.5em;& h5{margin:0}}.vc-customRPC-settings-pair{display:grid;grid-template-columns:repeat(2,1fr);align-items:start;gap:.5em;width:100%}.vc-customRPC-settings-single{display:grid;gap:.5em}.vc-customRPC-settings-disabled{opacity:.5;cursor:not-allowed}.vc-customRPC-settings-error{color:var(--text-feedback-critical)}.vc-dearrow-toggle-off .vc-dearrow-icon{filter:grayscale(1)}.vc-dearrow-toggle-on,.vc-dearrow-toggle-off{all:unset;display:inline;cursor:pointer;position:absolute;top:.75rem;right:.75rem}.vc-decor-danger-btn{color:var(--control-critical-primary-text-default);background-color:var(--control-critical-primary-background-default)}.vc-decor-change-decoration-modal-content{position:relative;display:flex;border-radius:5px 5px 0 0;padding:0 16px;gap:4px}.vc-decor-change-decoration-modal-preview{display:flex;flex-direction:column;margin-top:24px;gap:8px;max-width:280px}.vc-decor-change-decoration-modal-decoration{width:80px;height:80px}.vc-decor-change-decoration-modal-footer{justify-content:space-between}.vc-decor-create-decoration-modal-content{display:flex;flex-direction:column;gap:20px;padding:0 16px}.vc-decor-create-decoration-modal-form-preview-container{display:flex;gap:16px}.vc-decor-modal-header,.vc-decor-modal-footer{padding:16px}.vc-decor-modal-footer-btn-container{display:flex;flex-direction:row;gap:.5em}.vc-decor-create-decoration-modal-form{display:flex;flex-direction:column;flex-grow:1;gap:16px}.vc-decor-sectioned-grid-list-container{display:flex;flex-direction:column;overflow:hidden scroll;max-height:512px;gap:12px;width:352px}.vc-decor-sectioned-grid-list-grid{display:flex;flex-wrap:wrap;gap:8px}.vc-decor-section-remove-margin{margin-bottom:0}.vc-fpt-preview *{pointer-events:none}.vc-friendsSince-profile-section{gap:4px}.vc-hideAttachments-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400}.vc-hideAttachments-no-content{margin-top:0}.vc-membercount-widget{gap:.85em;display:flex;align-content:center;--color-online: var(--green-360);--color-total: var(--primary-400);--color-voice: var(--primary-400)}.vc-membercount-tooltip{margin-top:.25em;margin-left:2px}.vc-membercount-member-list{justify-content:center;flex-wrap:wrap;margin-top:1em;padding-inline:1em;line-height:1.2em}.vc-membercount-container{display:flex;align-items:center;gap:.5em}.vc-membercount-online{color:var(--color-online)}.vc-membercount-total{color:var(--color-total)}.vc-membercount-voice{color:var(--color-voice)}.vc-membercount-online-count{fill:var(--status-online);width:18px;height:18px}.vc-membercount-total-count{fill:none;stroke:var(--icon-status-offline);stroke-width:4px;width:15px;height:15px}.vc-membercount-voice-icon{color:var(--color-voice);width:15px;height:15px}.vc-mentionAvatars-icon{vertical-align:middle;width:1em!important;height:1em;margin:0 4px .2rem 2px;box-sizing:border-box}.vc-mentionAvatars-role-icon{margin:0 2px .2rem 4px}.vc-gp-owner .vc-mentionAvatars-icon{display:none}.messagelogger-deleted [class*=buttons]{display:none}.messagelogger-deleted :is(.messagelogger-deleted-attachment,.emoji,[data-type=sticker],[class*=embedIframe],[class*=embedSpotify],[class*=imageContainer]){filter:grayscale(1)!important;transition:.15s filter ease-in-out;&[class*=hiddenMosaicItem]{filter:grayscale(1) blur(var(--custom-message-attachment-spoiler-blur-radius, 44px))!important}&:hover{filter:grayscale(0)!important}}.messagelogger-deleted [class*=spoilerWarning]{color:var(--status-danger)}.theme-dark .messagelogger-edited{filter:brightness(80%)}.theme-light .messagelogger-edited{opacity:.5}.messagelogger-edit-marker{cursor:pointer}.vc-ml-modal-timestamp{cursor:unset;height:unset}.vc-ml-modal-tab-bar{flex-wrap:wrap;gap:16px}.vc-mutual-gdms-modal-tab-bar{gap:0}.vc-mutual-gdms-modal-v2-tab-bar{--space-xl: 16px}.vc-permviewer-user-header-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.vc-permviewer-user-header-btns{display:flex;gap:8px}.vc-permviewer-user-header-btn{cursor:pointer;display:flex;align-items:center;justify-content:center}.vc-permviewer-modal-content{padding:16px 4px 16px 16px}.vc-permviewer-modal-title{flex-grow:1}.vc-permviewer-modal-no-perms{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.vc-permviewer-modal-container{width:100%;height:100%;display:flex;gap:8px}.vc-permviewer-modal-list{display:flex;flex-direction:column;gap:2px;padding-right:8px;width:200px}.vc-permviewer-modal-list-item-btn{cursor:pointer}.vc-permviewer-modal-list-item{display:flex;align-items:center;gap:8px;padding:8px;border-radius:5px}.vc-permviewer-modal-list-item:hover{background-color:var(--background-mod-subtle)}.vc-permviewer-modal-list-item-active{background-color:var(--background-mod-strong)}.vc-permviewer-modal-list-item-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.vc-permviewer-modal-role-circle{border-radius:50%;width:12px;height:12px;flex-shrink:0}.vc-permviewer-modal-role-image{width:20px;height:20px;object-fit:contain}.vc-permviewer-modal-user-img{border-radius:50%;width:20px;height:20px}.vc-permviewer-modal-divider{width:2px;background-color:var(--background-mod-normal)}.vc-permviewer-modal-perms{display:flex;flex-direction:column;padding-right:8px}.vc-permviewer-modal-perms-item{display:flex;align-items:center;gap:5px;padding:10px 2px 10px 10px;border-bottom:2px solid var(--background-mod-normal)}.vc-permviewer-modal-perms-item:last-child{border:0}.vc-permviewer-modal-perms-item-icon{border:1px solid var(--background-mod-strong);width:24px;height:24px}.vc-permviewer-modal-perms-item .vc-info-icon{color:var(--interactive-muted);margin-left:auto;cursor:pointer;transition:color ease-in .1s}.vc-permviewer-modal-perms-item .vc-info-icon:hover{color:var(--interactive-icon-active)}.vc-permviewer-role-button{border-radius:var(--radius-sm);color:var(--interactive-icon-default);border:1px solid var(--user-profile-border);width:-moz-fit-content;width:fit-content;height:24px;padding:4px}.vc-permviewer-role-button:hover{background-color:var(--user-profile-background-hover)}.vc-permviewer-granted-by-container{max-width:300px;width:auto}.vc-permviewer-granted-by-content{display:flex;align-items:center;gap:4px}.vc-pip-button{color:var(--interactive-icon-default)}.vc-pip-button:hover{background-color:var(--background-mod-subtle);color:var(--interactive-icon-hover)}.vc-pindms-section-container{box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-transform:uppercase;font-size:12px;line-height:16px;letter-spacing:.02em;font-family:var(--font-display);font-weight:600;flex:1 1 auto;color:var(--channels-default);cursor:pointer}.vc-pindms-modal-content{display:grid;justify-content:center;padding:1rem;gap:1.5rem}.vc-pindms-modal-content [class*=defaultContainer]{display:none}.vc-pindms-collapse-icon{width:16px;height:16px;color:var(--interactive-icon-default);transform:rotate(90deg)}.vc-pindms-collapsed .vc-pindms-collapse-icon{transform:rotate(0)}.vc-plainFolderIcon-plain{transition:none!important;transform:translateZ(0);background-color:color-mix(in oklab,var(--custom-folder-color, var(--badge-background-default)) 40%,transparent)}.vc-platform-indicator{display:inline-flex;justify-content:center;align-items:center;vertical-align:top;position:relative}.vc-ranb-button{color:var(--interactive-icon-default);padding:0 .5em;width:100%;font-size:14px;white-space:nowrap;box-sizing:border-box}.vc-ranb-button:hover{color:var(--interactive-icon-active)}.vc-reply-timestamp{margin-right:.25em}.vc-rdb-badge{vertical-align:middle;margin-left:4px}.vc-rdb-input{padding-inline:12px;margin-top:6px;margin-bottom:12px;resize:none;overflow:hidden;background:transparent;border:1px solid var(--input-border-default, var(--border-muted));box-sizing:border-box}.vc-rdb-modal-footer-wrapper{width:100%;margin:6px 16px}.vc-rdb-placeholder{margin-bottom:4px;font-weight:700;font-style:italic;color:var(--text-muted)}.vc-rdb-input *{font-size:14px}.vc-rdb-modal-footer{padding:0}.vc-rdb-modal-footer .vc-rdb-input{margin-bottom:0;background:var(--input-background-default)}.vc-rdb-modal-footer [class*=pageControlContainer]{margin-top:0}.vc-rdb-modal-header{flex-grow:1}.vc-rdb-modal-reviews{margin-top:16px}.vc-rdb-review{padding-top:8px!important;padding-bottom:8px!important;padding-right:32px!important}.vc-rdb-review:hover{background:var(--message-background-hover)!important;border-radius:8px}.vc-rdb-review-comment [class*=avatar]{vertical-align:text-top}.vc-rdb-review-comment{overflow-y:hidden;margin-top:1px;margin-bottom:8px;color:var(--text-default);font-size:15px}.vc-rdb-blocked-badge{cursor:pointer}.vc-rdb-block-modal-header{display:flex;justify-content:space-between;align-items:center}.vc-rdb-block-modal{padding:1em;display:grid;gap:.75em}.vc-rdb-button-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:600px){.vc-rdb-button-grid{grid-template-columns:1fr}}.vc-rdb-block-modal-row{display:flex;height:2em;gap:.5em;align-items:center}.vc-rdb-block-modal-avatar{border-radius:50%;height:2em;width:2em}.vc-rdb-block-modal-avatar:before{content:"";display:block;width:100%;height:100%;background-color:var(--border-subtle)}.vc-rdb-block-modal-username{flex-grow:1}.vc-rdb-block-modal-unblock{cursor:pointer}.vc-st-date-picker{background-color:var(--input-background-default);color:var(--text-default);width:95%;padding:8px 8px 8px 12px;margin:1em 0;outline:none;border:1px solid var(--input-background-default);border-radius:4px;font-weight:500;font-style:inherit;font-size:100%}.vc-st-format-select{margin-bottom:1em;--border-subtle: transparent}.vc-st-format-label{--border-subtle: transparent}.vc-st-modal-header{place-content:center space-between}.vc-st-modal-title{margin:0}.vc-st-modal-close-button{padding:0}.vc-st-preview-text{margin-bottom:1em}.vc-gp-root{height:100%;user-select:text}.vc-gp-banner{cursor:pointer;aspect-ratio:auto 240 / 135;height:334px;width:100%;object-fit:cover;overflow:clip;overflow-clip-margin:content-box}.vc-gp-header{display:flex;flex-direction:row;align-items:center;gap:.5em;margin:.5em}.vc-gp-icon{width:48px;height:48px;cursor:pointer}.vc-gp-name-and-description{display:flex;flex-direction:column;gap:.2em}.vc-gp-name{margin:0}.vc-gp-tab-bar{border-bottom:1px solid var(--border-subtle);margin:20px 12px 0;display:flex;gap:40px;align-items:stretch;flex-direction:row}.vc-gp-tab{border-bottom:2px solid transparent;color:var(--interactive-icon-default);cursor:pointer;line-height:14px}.vc-gp-tab-content{margin:1em}.vc-gp-tab:where(.vc-gp-selected,:hover,:focus){border-bottom-color:var(--interactive-icon-active)}.vc-gp-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1em}.vc-gp-server-info-pair{color:var(--text-default)}.vc-gp-server-info-pair [class*=timestamp]{margin-left:0}.vc-gp-owner{display:flex;align-items:center;gap:.2em}.vc-gp-owner-avatar{height:20px;border-radius:50%;cursor:pointer}.vc-gp-scroller{width:100%;max-height:500px}.vc-gp-scroller [class*=listRow]{margin:1px 0}.vc-gp-scroller [class*=listRow]:hover{background-color:var(--background-mod-subtle)}.vc-user-connection{all:unset;display:inline-block;cursor:pointer}.vc-sc-tooltip{display:inline-flex;gap:.25em;align-items:center}.vc-sc-connection-name{word-break:break-all}.vc-sc-tooltip-icon{min-width:16px}.vc-shc-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.65em;margin:.5em 0;min-height:100%}.vc-shc-logo{width:12em;height:12em}.vc-shc-heading-container{display:flex;flex-direction:row;align-items:center;gap:.5em}.vc-shc-heading-nsfw-icon{color:var(--text-default)}.vc-shc-topic-container{color:var(--text-default);background:var(--background-base-lower);border-radius:5px;padding:10px;max-width:70vw}.vc-shc-default-emoji-container{display:flex;flex-direction:row;align-items:center;background:var(--background-base-lower);border-radius:8px;padding:.75em;margin-left:.75em}.vc-shc-tags-container{display:flex;flex-direction:column;background:var(--background-base-lower);border-radius:5px;padding:.75em;gap:.75em;max-width:70vw}.vc-shc-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.35em}.vc-shc-allowed-users-and-roles-container{display:flex;flex-direction:column;align-items:center;background:var(--background-base-lower);border-radius:5px;padding:.75em;max-width:70vw}.vc-shc-allowed-users-and-roles-container-title{display:flex;flex-direction:row;align-items:center;gap:.5em}.vc-shc-allowed-users-and-roles-container-toggle-btn,.vc-shc-allowed-users-and-roles-container-permdetails-btn{all:unset;cursor:pointer;display:flex;align-items:center;color:var(--text-default)}.vc-shc-allowed-users-and-roles-container>[class*=members]{margin-left:12px;flex-wrap:wrap;justify-content:center}.vc-shc-hidden-channel-icon{cursor:not-allowed;margin-left:6px;z-index:0}.vc-smyn-suffix{color:var(--text-muted);-webkit-text-fill-color:initial;isolation:isolate}.vc-smyn-suffix:before{content:"("}.vc-smyn-suffix:after{content:")"}.vc-std-wrapper{display:flex;align-items:center}.vc-std-wrapper [class*=communicationDisabled]{margin-right:0}.vc-sortFriendRequests-wrapper{display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;margin-right:.5em}.vc-sortFriendRequests-tooltip{max-width:none;white-space:nowrap}.vc-sortFriendRequests-date{color:var(--text-muted);font-family:var(--font-code)}#vc-spotify-player{padding:12px;background:var(--background-base-low);margin:0;border-top-left-radius:10px;border-top-right-radius:10px;border-bottom:1px solid var(--border-subtle);--vc-spotify-green: var(--spotify, #1db954);--vc-spotify-green-90: color-mix(in hsl, var(--vc-spotify-green), transparent 90%);--vc-spotify-green-80: color-mix(in hsl, var(--vc-spotify-green), transparent 80%)}.vc-spotify-button{margin:0 2px;border-radius:var(--radius-sm);background:none;color:var(--interactive-icon-default);padding:0;width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vc-spotify-button:hover{color:var(--interactive-icon-hover);background-color:var(--background-mod-strong)}.vc-spotify-button-icon{height:24px;width:24px}.vc-spotify-shuffle .vc-spotify-button-icon,.vc-spotify-repeat .vc-spotify-button-icon{width:22px;height:22px}.vc-spotify-repeat-context,.vc-spotify-repeat-track,.vc-spotify-shuffle-on{background-color:var(--vc-spotify-green-90)}.vc-spotify-repeat-context:hover,.vc-spotify-repeat-track:hover,.vc-spotify-shuffle-on:hover{background-color:var(--vc-spotify-green-80)}.vc-spotify-tooltip-text{overflow:hidden;white-space:nowrap;padding-right:.2em;max-width:100%;margin:unset}.vc-spotify-repeat-1{font-size:70%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vc-spotify-button-row{justify-content:center;margin-top:14px}.vc-spotify-secondary-song-info{font-size:12px}.vc-spotify-song-info-prefix{display:none}#vc-spotify-info-wrapper{display:flex;flex-direction:row;align-items:center;height:3em;gap:.5em}#vc-spotify-album-image{height:90%;object-fit:contain;border-radius:3px;transition:filter .2s}#vc-spotify-album-image:hover{filter:brightness(1.2);cursor:pointer}#vc-spotify-album-expanded-wrapper #vc-spotify-album-image{width:100%;object-fit:contain}#vc-spotify-titles{display:flex;flex-direction:column;padding:.2rem;align-items:flex-start;place-content:flex-start center;overflow:hidden}#vc-spotify-song-title{color:var(--text-strong);font-size:14px;font-weight:600}.vc-spotify-ellipoverflow{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.vc-spotify-artist,.vc-spotify-album{font-size:12px;text-decoration:none;color:var(--text-strong)}.vc-spotify-comma{color:var(--text-default)}.vc-spotify-artist[role=link]:hover,#vc-spotify-album-title[role=link]:hover,#vc-spotify-song-title[role=link]:hover{text-decoration:underline;cursor:pointer}#vc-spotify-progress-bar{position:relative;color:var(--text-default);width:100%;margin:.5em 0 5px}#vc-spotify-progress-bar>[class*=slider]{flex-grow:1;width:100%;padding:0!important}#vc-spotify-progress-bar>[class*=slider] [class*=bar]{height:3px!important;top:calc(12px - 4px / 2 + var(--bar-offset))}#vc-spotify-progress-bar>[class*=slider] [class*=barFill]{background-color:var(--interactive-icon-active)}#vc-spotify-progress-bar>[class*=slider]:hover [class*=barFill]{background-color:var(--vc-spotify-green)}#vc-spotify-progress-bar>[class*=slider] [class*=grabber]{height:16px!important;width:16px!important;margin-top:calc(17px/-2 + var(--bar-offset)/2);margin-left:-.5px;background-color:var(--interactive-icon-active);border-color:var(--interactive-icon-default);color:var(--interactive-icon-default);opacity:0;transition:opacity .1s}#vc-spotify-progress-bar:hover>[class*=slider] [class*=grabber]{opacity:1}#vc-spotify-progress-text{margin:0}.vc-spotify-progress-time{font-size:12px;top:10px;position:absolute;margin-top:8px;font-family:var(--font-code)}.vc-spotify-time-left{left:0}.vc-spotify-time-right{right:0}.vc-spotify-fallback{padding:.5em;color:var(--text-default)}.vc-trans-modal-content{padding:1em}.vc-trans-modal-header{place-content:center space-between}.vc-trans-modal-title{margin:0}.vc-trans-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400;line-height:1.2rem;white-space:break-spaces}.vc-trans-accessory-icon{margin-right:.25em}.vc-trans-dismiss{all:unset;cursor:pointer;color:var(--text-link)}.vc-trans-dismiss:is(:hover,:focus){text-decoration:underline}.vc-trans-auto-translate{color:var(--green-360)}.vc-trans-chat-button{scale:1.085}.vc-typing-indicator{display:flex;align-items:center;height:20px}.vc-typing-indicator-avatars{margin-left:6px}.vc-typing-indicator-dots{margin-left:6px;height:16px;display:flex;align-items:center;z-index:0;cursor:pointer}.vc-uvs-speaker{color:var(--interactive-icon-default);display:flex;align-items:center;justify-content:center}.vc-uvs-clickable{cursor:pointer}.vc-uvs-clickable:hover{color:var(--interactive-icon-hover)}.vc-uvs-profile-speaker{width:var(--custom-nickname-icon-size);height:var(--custom-nickname-icon-size)}.vc-uvs-tooltip-container{max-width:50vw}.vc-uvs-tooltip-content{display:flex;flex-direction:column;gap:6px}.vc-uvs-name{display:flex;align-items:center;gap:8px}.vc-uvs-guild-icon{border-radius:100%;align-self:center}.vc-uvs-vc-members{display:flex;gap:6px}.vc-voice-download{width:24px;height:24px;color:var(--interactive-icon-default);cursor:pointer;position:relative}.vc-voice-download:hover{color:var(--interactive-icon-active)}.vc-vmsg-modal{padding:1em}.vc-vmsg-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5em;margin-bottom:1em}.vc-vmsg-preview{color:var(--text-default);border-radius:24px;background-color:var(--background-base-lower);position:relative;display:flex;align-items:center;padding:0 16px;height:48px}.vc-vmsg-preview-indicator{background:var(--control-secondary-background-default);width:16px;height:16px;border-radius:50%;transition:background .2s ease-in-out}.vc-vmsg-preview-recording .vc-vmsg-preview-indicator{background:var(--status-danger)}.vc-vmsg-preview-time{opacity:.8;margin:0 .5em;font-size:80%;font-family:var(--font-code)}.vc-vmsg-preview-label{opacity:.5;letter-spacing:.125em;font-weight:600;flex:1;text-align:center}.vc-vmsg-error{color:var(--text-feedback-critical, #FF5C5C)}
`;