;
! function() {
    try {
        var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof global ? global : "undefined" != typeof window ? window : "undefined" != typeof self ? self : {},
            n = (new e.Error).stack;
        n && ((e._debugIds || (e._debugIds = {}))[n] = "f0e73822-55ed-8f1e-f291-d13b31636721")
    } catch (e) {}
}();
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["object" == typeof document ? document.currentScript : void 0, 893788, (e, t, r) => {
    ! function(r, n) {
        "use strict";
        if ("function" == typeof define && define.amd) {
            let t;
            void 0 !== (t = n()) && e.v(t)
        } else t.exports = n()
    }(e.e, function() {
        "use strict";

        function e(e) {
            return e.charAt(0).toUpperCase() + e.substring(1)
        }

        function t(e) {
            return function() {
                return this[e]
            }
        }
        var r = ["isConstructor", "isEval", "isNative", "isToplevel"],
            n = ["columnNumber", "lineNumber"],
            i = ["fileName", "functionName", "source"],
            s = r.concat(n, i, ["args"], ["evalOrigin"]);

        function o(t) {
            if (t)
                for (var r = 0; r < s.length; r++) void 0 !== t[s[r]] && this["set" + e(s[r])](t[s[r]])
        }
        o.prototype = {
            getArgs: function() {
                return this.args
            },
            setArgs: function(e) {
                if ("[object Array]" !== Object.prototype.toString.call(e)) throw TypeError("Args must be an Array");
                this.args = e
            },
            getEvalOrigin: function() {
                return this.evalOrigin
            },
            setEvalOrigin: function(e) {
                if (e instanceof o) this.evalOrigin = e;
                else if (e instanceof Object) this.evalOrigin = new o(e);
                else throw TypeError("Eval Origin must be an Object or StackFrame")
            },
            toString: function() {
                var e = this.getFileName() || "",
                    t = this.getLineNumber() || "",
                    r = this.getColumnNumber() || "",
                    n = this.getFunctionName() || "";
                return this.getIsEval() ? e ? "[eval] (" + e + ":" + t + ":" + r + ")" : "[eval]:" + t + ":" + r : n ? n + " (" + e + ":" + t + ":" + r + ")" : e + ":" + t + ":" + r
            }
        }, o.fromString = function(e) {
            var t = e.indexOf("("),
                r = e.lastIndexOf(")"),
                n = e.substring(0, t),
                i = e.substring(t + 1, r).split(","),
                s = e.substring(r + 1);
            if (0 === s.indexOf("@")) var a = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s, ""),
                l = a[1],
                h = a[2],
                c = a[3];
            return new o({
                functionName: n,
                args: i || void 0,
                fileName: l,
                lineNumber: h || void 0,
                columnNumber: c || void 0
            })
        };
        for (var a = 0; a < r.length; a++) o.prototype["get" + e(r[a])] = t(r[a]), o.prototype["set" + e(r[a])] = function(e) {
            return function(t) {
                this[e] = !!t
            }
        }(r[a]);
        for (var l = 0; l < n.length; l++) o.prototype["get" + e(n[l])] = t(n[l]), o.prototype["set" + e(n[l])] = function(e) {
            return function(t) {
                if (!(!isNaN(parseFloat(t)) && isFinite(t))) throw TypeError(e + " must be a Number");
                this[e] = Number(t)
            }
        }(n[l]);
        for (var h = 0; h < i.length; h++) o.prototype["get" + e(i[h])] = t(i[h]), o.prototype["set" + e(i[h])] = function(e) {
            return function(t) {
                this[e] = String(t)
            }
        }(i[h]);
        return o
    })
}, 8864, (e, t, r) => {
    ! function(r, n) {
        "use strict";
        if ("function" == typeof define && define.amd) {
            let t;
            void 0 !== (t = n(e.r(893788))) && e.v(t)
        } else t.exports = n(e.r(893788))
    }(e.e, function(e) {
        "use strict";
        var t = /(^|@)\S+:\d+/,
            r = /^\s*at .*(\S+:\d+|\(native\))/m,
            n = /^(eval@)?(\[native code])?$/;
        return {
            parse: function(e) {
                if (void 0 !== e.stacktrace || void 0 !== e["opera#sourceloc"]) return this.parseOpera(e);
                if (e.stack && e.stack.match(r)) return this.parseV8OrIE(e);
                if (e.stack) return this.parseFFOrSafari(e);
                throw Error("Cannot parse given Error object")
            },
            extractLocation: function(e) {
                if (-1 === e.indexOf(":")) return [e];
                var t = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
                return [t[1], t[2] || void 0, t[3] || void 0]
            },
            parseV8OrIE: function(t) {
                return t.stack.split("\n").filter(function(e) {
                    return !!e.match(r)
                }, this).map(function(t) {
                    t.indexOf("(eval ") > -1 && (t = t.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
                    var r = t.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""),
                        n = r.match(/ (\(.+\)$)/);
                    r = n ? r.replace(n[0], "") : r;
                    var i = this.extractLocation(n ? n[1] : r);
                    return new e({
                        functionName: n && r || void 0,
                        fileName: ["eval", "<anonymous>"].indexOf(i[0]) > -1 ? void 0 : i[0],
                        lineNumber: i[1],
                        columnNumber: i[2],
                        source: t
                    })
                }, this)
            },
            parseFFOrSafari: function(t) {
                return t.stack.split("\n").filter(function(e) {
                    return !e.match(n)
                }, this).map(function(t) {
                    if (t.indexOf(" > eval") > -1 && (t = t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === t.indexOf("@") && -1 === t.indexOf(":")) return new e({
                        functionName: t
                    });
                    var r = /((.*".+"[^@]*)?[^@]*)(?:@)/,
                        n = t.match(r),
                        i = n && n[1] ? n[1] : void 0,
                        s = this.extractLocation(t.replace(r, ""));
                    return new e({
                        functionName: i,
                        fileName: s[0],
                        lineNumber: s[1],
                        columnNumber: s[2],
                        source: t
                    })
                }, this)
            },
            parseOpera: function(e) {
                return !e.stacktrace || e.message.indexOf("\n") > -1 && e.message.split("\n").length > e.stacktrace.split("\n").length ? this.parseOpera9(e) : e.stack ? this.parseOpera11(e) : this.parseOpera10(e)
            },
            parseOpera9: function(t) {
                for (var r = /Line (\d+).*script (?:in )?(\S+)/i, n = t.message.split("\n"), i = [], s = 2, o = n.length; s < o; s += 2) {
                    var a = r.exec(n[s]);
                    a && i.push(new e({
                        fileName: a[2],
                        lineNumber: a[1],
                        source: n[s]
                    }))
                }
                return i
            },
            parseOpera10: function(t) {
                for (var r = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n = t.stacktrace.split("\n"), i = [], s = 0, o = n.length; s < o; s += 2) {
                    var a = r.exec(n[s]);
                    a && i.push(new e({
                        functionName: a[3] || void 0,
                        fileName: a[2],
                        lineNumber: a[1],
                        source: n[s]
                    }))
                }
                return i
            },
            parseOpera11: function(r) {
                return r.stack.split("\n").filter(function(e) {
                    return !!e.match(t) && !e.match(/^Error created at/)
                }, this).map(function(t) {
                    var r, n = t.split("@"),
                        i = this.extractLocation(n.pop()),
                        s = n.shift() || "",
                        o = s.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
                    return s.match(/\(([^)]*)\)/) && (r = s.replace(/^[^(]+\(([^)]*)\)$/, "$1")), new e({
                        functionName: o,
                        args: void 0 === r || "[arguments not available]" === r ? void 0 : r.split(","),
                        fileName: i[0],
                        lineNumber: i[1],
                        columnNumber: i[2],
                        source: t
                    })
                }, this)
            }
        }
    })
}, 411099, e => {
    "use strict";
    let t, r, n, i, s, o, a, l, h, c, u, d, p, f, g, m, y, v, w, b, S, C;
    var I, E, x, k, O, M = e.i(583492),
        R = e.i(8864),
        T = -1,
        A = function(e) {
            addEventListener("pageshow", function(t) {
                t.persisted && (T = t.timeStamp, e(t))
            }, !0)
        },
        N = function() {
            var e = self.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0];
            if (e && e.responseStart > 0 && e.responseStart < performance.now()) return e
        },
        L = function() {
            var e = N();
            return e && e.activationStart || 0
        },
        D = function(e, t) {
            var r = N(),
                n = "navigate";
            return T >= 0 ? n = "back-forward-cache" : r && (document.prerendering || L() > 0 ? n = "prerender" : document.wasDiscarded ? n = "restore" : r.type && (n = r.type.replace(/_/g, "-"))), {
                name: e,
                value: void 0 === t ? -1 : t,
                rating: "good",
                delta: 0,
                entries: [],
                id: "v4-".concat(Date.now(), "-").concat(Math.floor(0x82f79cd8fff * Math.random()) + 1e12),
                navigationType: n
            }
        },
        P = function(e, t, r) {
            try {
                if (PerformanceObserver.supportedEntryTypes.includes(e)) {
                    var n = new PerformanceObserver(function(e) {
                        Promise.resolve().then(function() {
                            t(e.getEntries())
                        })
                    });
                    return n.observe(Object.assign({
                        type: e,
                        buffered: !0
                    }, r || {})), n
                }
            } catch (e) {}
        },
        _ = function(e, t, r, n) {
            var i, s;
            return function(o) {
                var a;
                t.value >= 0 && (o || n) && ((s = t.value - (i || 0)) || void 0 === i) && (i = t.value, t.delta = s, a = t.value, t.rating = a > r[1] ? "poor" : a > r[0] ? "needs-improvement" : "good", e(t))
            }
        },
        F = function(e) {
            requestAnimationFrame(function() {
                return requestAnimationFrame(function() {
                    return e()
                })
            })
        },
        z = function(e) {
            document.addEventListener("visibilitychange", function() {
                "hidden" === document.visibilityState && e()
            })
        },
        U = function(e) {
            var t = !1;
            return function() {
                t || (e(), t = !0)
            }
        },
        j = -1,
        B = function() {
            return "hidden" !== document.visibilityState || document.prerendering ? 1 / 0 : 0
        },
        H = function(e) {
            "hidden" === document.visibilityState && j > -1 && (j = "visibilitychange" === e.type ? e.timeStamp : 0, V())
        },
        W = function() {
            addEventListener("visibilitychange", H, !0), addEventListener("prerenderingchange", H, !0)
        },
        V = function() {
            removeEventListener("visibilitychange", H, !0), removeEventListener("prerenderingchange", H, !0)
        },
        G = function() {
            return j < 0 && (j = B(), W(), A(function() {
                setTimeout(function() {
                    j = B(), W()
                }, 0)
            })), {
                get firstHiddenTime() {
                    return j
                }
            }
        },
        Z = function(e) {
            document.prerendering ? addEventListener("prerenderingchange", function() {
                return e()
            }, !0) : e()
        },
        Y = [1800, 3e3],
        q = function(e, t) {
            t = t || {}, Z(function() {
                var r, n = G(),
                    i = D("FCP"),
                    s = P("paint", function(e) {
                        e.forEach(function(e) {
                            "first-contentful-paint" === e.name && (s.disconnect(), e.startTime < n.firstHiddenTime && (i.value = Math.max(e.startTime - L(), 0), i.entries.push(e), r(!0)))
                        })
                    });
                s && (r = _(e, i, Y, t.reportAllChanges), A(function(n) {
                    r = _(e, i = D("FCP"), Y, t.reportAllChanges), F(function() {
                        i.value = performance.now() - n.timeStamp, r(!0)
                    })
                }))
            })
        },
        X = [.1, .25],
        $ = function(e, t) {
            t = t || {}, q(U(function() {
                var r, n = D("CLS", 0),
                    i = 0,
                    s = [],
                    o = function(e) {
                        e.forEach(function(e) {
                            if (!e.hadRecentInput) {
                                var t = s[0],
                                    r = s[s.length - 1];
                                i && e.startTime - r.startTime < 1e3 && e.startTime - t.startTime < 5e3 ? (i += e.value, s.push(e)) : (i = e.value, s = [e])
                            }
                        }), i > n.value && (n.value = i, n.entries = s, r())
                    },
                    a = P("layout-shift", o);
                a && (r = _(e, n, X, t.reportAllChanges), z(function() {
                    o(a.takeRecords()), r(!0)
                }), A(function() {
                    i = 0, r = _(e, n = D("CLS", 0), X, t.reportAllChanges), F(function() {
                        return r()
                    })
                }), setTimeout(r, 0))
            }))
        },
        K = 0,
        J = 1 / 0,
        Q = 0,
        ee = function(e) {
            e.forEach(function(e) {
                e.interactionId && (J = Math.min(J, e.interactionId), K = (Q = Math.max(Q, e.interactionId)) ? (Q - J) / 7 + 1 : 0)
            })
        },
        et = function() {
            return I ? K : performance.interactionCount || 0
        },
        er = function() {
            "interactionCount" in performance || I || (I = P("event", ee, {
                type: "event",
                buffered: !0,
                durationThreshold: 0
            }))
        },
        en = [],
        ei = new Map,
        es = 0,
        eo = function() {
            var e = Math.min(en.length - 1, Math.floor((et() - es) / 50));
            return en[e]
        },
        ea = [],
        el = function(e) {
            if (ea.forEach(function(t) {
                    return t(e)
                }), e.interactionId || "first-input" === e.entryType) {
                var t = en[en.length - 1],
                    r = ei.get(e.interactionId);
                if (r || en.length < 10 || e.duration > t.latency) {
                    if (r) e.duration > r.latency ? (r.entries = [e], r.latency = e.duration) : e.duration === r.latency && e.startTime === r.entries[0].startTime && r.entries.push(e);
                    else {
                        var n = {
                            id: e.interactionId,
                            latency: e.duration,
                            entries: [e]
                        };
                        ei.set(n.id, n), en.push(n)
                    }
                    en.sort(function(e, t) {
                        return t.latency - e.latency
                    }), en.length > 10 && en.splice(10).forEach(function(e) {
                        return ei.delete(e.id)
                    })
                }
            }
        },
        eh = function(e) {
            var t = self.requestIdleCallback || self.setTimeout,
                r = -1;
            return e = U(e), "hidden" === document.visibilityState ? e() : (r = t(e), z(e)), r
        },
        ec = [200, 500],
        eu = function(e, t) {
            "PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (t = t || {}, Z(function() {
                er();
                var r, n, i = D("INP"),
                    s = function(e) {
                        eh(function() {
                            e.forEach(el);
                            var t = eo();
                            t && t.latency !== i.value && (i.value = t.latency, i.entries = t.entries, n())
                        })
                    },
                    o = P("event", s, {
                        durationThreshold: null != (r = t.durationThreshold) ? r : 40
                    });
                n = _(e, i, ec, t.reportAllChanges), o && (o.observe({
                    type: "first-input",
                    buffered: !0
                }), z(function() {
                    s(o.takeRecords()), n(!0)
                }), A(function() {
                    es = et(), en.length = 0, ei.clear(), n = _(e, i = D("INP"), ec, t.reportAllChanges)
                }))
            }))
        },
        ed = [2500, 4e3],
        ep = {},
        ef = function(e, t) {
            t = t || {}, Z(function() {
                var r, n = G(),
                    i = D("LCP"),
                    s = function(e) {
                        t.reportAllChanges || (e = e.slice(-1)), e.forEach(function(e) {
                            e.startTime < n.firstHiddenTime && (i.value = Math.max(e.startTime - L(), 0), i.entries = [e], r())
                        })
                    },
                    o = P("largest-contentful-paint", s);
                if (o) {
                    r = _(e, i, ed, t.reportAllChanges);
                    var a = U(function() {
                        ep[i.id] || (s(o.takeRecords()), o.disconnect(), ep[i.id] = !0, r(!0))
                    });
                    ["keydown", "click"].forEach(function(e) {
                        addEventListener(e, function() {
                            return eh(a)
                        }, {
                            once: !0,
                            capture: !0
                        })
                    }), z(a), A(function(n) {
                        r = _(e, i = D("LCP"), ed, t.reportAllChanges), F(function() {
                            i.value = performance.now() - n.timeStamp, ep[i.id] = !0, r(!0)
                        })
                    })
                }
            })
        },
        eg = [800, 1800],
        em = function e(t) {
            document.prerendering ? Z(function() {
                return e(t)
            }) : "complete" !== document.readyState ? addEventListener("load", function() {
                return e(t)
            }, !0) : setTimeout(t, 0)
        },
        ey = function(e, t) {
            t = t || {};
            var r = D("TTFB"),
                n = _(e, r, eg, t.reportAllChanges);
            em(function() {
                var i = N();
                i && (r.value = Math.max(i.responseStart - L(), 0), r.entries = [i], n(!0), A(function() {
                    (n = _(e, r = D("TTFB", 0), eg, t.reportAllChanges))(!0)
                }))
            })
        },
        ev = {
            passive: !0,
            capture: !0
        },
        ew = new Date,
        eb = function(e, t) {
            E || (E = t, x = e, k = new Date, eI(removeEventListener), eS())
        },
        eS = function() {
            if (x >= 0 && x < k - ew) {
                var e = {
                    entryType: "first-input",
                    name: E.type,
                    target: E.target,
                    cancelable: E.cancelable,
                    startTime: E.timeStamp,
                    processingStart: E.timeStamp + x
                };
                O.forEach(function(t) {
                    t(e)
                }), O = []
            }
        },
        eC = function(e) {
            if (e.cancelable) {
                var t, r, n, i = (e.timeStamp > 1e12 ? new Date : performance.now()) - e.timeStamp;
                "pointerdown" == e.type ? (t = function() {
                    eb(i, e), n()
                }, r = function() {
                    n()
                }, n = function() {
                    removeEventListener("pointerup", t, ev), removeEventListener("pointercancel", r, ev)
                }, addEventListener("pointerup", t, ev), addEventListener("pointercancel", r, ev)) : eb(i, e)
            }
        },
        eI = function(e) {
            ["mousedown", "keydown", "touchstart", "pointerdown"].forEach(function(t) {
                return e(t, eC, ev)
            })
        },
        eE = e.i(93257),
        ex = e.i(284553),
        ek = Object.defineProperty,
        eO = (e, t, r) => {
            let n;
            return (n = "symbol" != typeof t ? t + "" : t) in e ? ek(e, n, {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: r
            }) : e[n] = r
        },
        eM = Object.defineProperty,
        eR = (e, t, r) => {
            let n;
            return (n = "symbol" != typeof t ? t + "" : t) in e ? eM(e, n, {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: r
            }) : e[n] = r
        },
        eT = ((ob = eT || {})[ob.Document = 0] = "Document", ob[ob.DocumentType = 1] = "DocumentType", ob[ob.Element = 2] = "Element", ob[ob.Text = 3] = "Text", ob[ob.CDATA = 4] = "CDATA", ob[ob.Comment = 5] = "Comment", ob);
    let eA = {
            Node: ["childNodes", "parentNode", "parentElement", "textContent"],
            ShadowRoot: ["host", "styleSheets"],
            Element: ["shadowRoot", "querySelector", "querySelectorAll"],
            MutationObserver: []
        },
        eN = {
            Node: ["contains", "getRootNode"],
            ShadowRoot: ["getSelection"],
            Element: [],
            MutationObserver: ["constructor"]
        },
        eL = {};

    function eD(e) {
        if (eL[e]) return eL[e];
        let t = globalThis[e],
            r = t.prototype,
            n = e in eA ? eA[e] : void 0,
            i = !!(n && n.every(e => {
                var t, n;
                return !!(null == (n = null == (t = Object.getOwnPropertyDescriptor(r, e)) ? void 0 : t.get) ? void 0 : n.toString().includes("[native code]"))
            })),
            s = e in eN ? eN[e] : void 0,
            o = !!(s && s.every(e => {
                var t;
                return "function" == typeof r[e] && (null == (t = r[e]) ? void 0 : t.toString().includes("[native code]"))
            }));
        if (i && o && !globalThis.Zone) return eL[e] = t.prototype, t.prototype;
        try {
            let n = document.createElement("iframe");
            document.body.appendChild(n);
            let i = n.contentWindow;
            if (!i) return t.prototype;
            let s = i[e].prototype;
            if (document.body.removeChild(n), !s) return r;
            return eL[e] = s
        } catch {
            return r
        }
    }
    let eP = {};

    function e_(e, t, r) {
        var n;
        let i = `${e}.${String(r)}`;
        if (eP[i]) return eP[i].call(t);
        let s = null == (n = Object.getOwnPropertyDescriptor(eD(e), r)) ? void 0 : n.get;
        return s ? (eP[i] = s, s.call(t)) : t[r]
    }
    let eF = function(e) {
            return e_("Node", e, "childNodes")
        },
        ez = function(e) {
            return e_("Node", e, "parentNode")
        },
        eU = function(e) {
            return e_("Node", e, "parentElement")
        },
        ej = function(e) {
            return e_("Node", e, "textContent")
        },
        eB = function(e) {
            return e && "shadowRoot" in e ? e_("Element", e, "shadowRoot") : null
        };

    function eH(e) {
        return e.nodeType === e.ELEMENT_NODE
    }

    function eW(e) {
        var t;
        let r = e && "host" in e && "mode" in e && ((t = e) && "host" in t ? e_("ShadowRoot", t, "host") : null) || null;
        return !!(r && "shadowRoot" in r && eB(r) === e)
    }

    function eV(e) {
        return "[object ShadowRoot]" === Object.prototype.toString.call(e)
    }

    function eG(e) {
        try {
            var t;
            let r = e.rules || e.cssRules;
            if (!r) return null;
            let n = e.href;
            return !n && e.ownerNode && e.ownerNode.ownerDocument && (n = e.ownerNode.ownerDocument.location.href), (t = Array.from(r, e => eZ(e, n)).join("")).includes(" background-clip: text;") && !t.includes(" -webkit-background-clip: text;") && (t = t.replace(/\sbackground-clip:\s*text;/g, " -webkit-background-clip: text; background-clip: text;")), t
        } catch (e) {
            return null
        }
    }

    function eZ(e, t) {
        if ("styleSheet" in e) {
            let t;
            try {
                t = eG(e.styleSheet) || function(e) {
                    let {
                        cssText: t
                    } = e;
                    if (t.split('"').length < 3) return t;
                    let r = ["@import", `url(${JSON.stringify(e.href)})`];
                    return "" === e.layerName ? r.push("layer") : e.layerName && r.push(`layer(${e.layerName})`), e.supportsText && r.push(`supports(${e.supportsText})`), e.media.length && r.push(e.media.mediaText), r.join(" ") + ";"
                }(e)
            } catch (r) {
                t = e.cssText
            }
            return e.styleSheet.href ? e3(t, e.styleSheet.href) : t
        } {
            let r = e.cssText;
            return ("selectorText" in e && e.selectorText.includes(":") && (r = r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm, "$1\\$2")), t) ? e3(r, t) : r
        }
    }
    class eY {
        constructor() {
            eR(this, "idNodeMap", new Map), eR(this, "nodeMetaMap", new WeakMap)
        }
        getId(e) {
            var t;
            return e ? (null == (t = this.getMeta(e)) ? void 0 : t.id) ? ? -1 : -1
        }
        getNode(e) {
            return this.idNodeMap.get(e) || null
        }
        getIds() {
            return Array.from(this.idNodeMap.keys())
        }
        getMeta(e) {
            return this.nodeMetaMap.get(e) || null
        }
        removeNodeFromMap(e) {
            let t = this.getId(e);
            this.idNodeMap.delete(t), e.childNodes && e.childNodes.forEach(e => this.removeNodeFromMap(e))
        }
        has(e) {
            return this.idNodeMap.has(e)
        }
        hasNode(e) {
            return this.nodeMetaMap.has(e)
        }
        add(e, t) {
            let r = t.id;
            this.idNodeMap.set(r, e), this.nodeMetaMap.set(e, t)
        }
        replace(e, t) {
            let r = this.getNode(e);
            if (r) {
                let e = this.nodeMetaMap.get(r);
                e && this.nodeMetaMap.set(t, e)
            }
            this.idNodeMap.set(e, t)
        }
        reset() {
            this.idNodeMap = new Map, this.nodeMetaMap = new WeakMap
        }
    }

    function eq({
        element: e,
        maskInputOptions: t,
        tagName: r,
        type: n,
        value: i,
        maskInputFn: s
    }) {
        let o = i || "",
            a = n && eX(n);
        return (t[r.toLowerCase()] || a && t[a]) && (o = s ? s(o, e) : "*".repeat(o.length)), o
    }

    function eX(e) {
        return e.toLowerCase()
    }
    let e$ = "__rrweb_original__";

    function eK(e) {
        let t = e.type;
        return e.hasAttribute("data-rr-is-password") ? "password" : t ? eX(t) : null
    }

    function eJ(e, t) {
        let r;
        try {
            r = new URL(e, t ? ? window.location.href)
        } catch (e) {
            return null
        }
        let n = r.pathname.match(/\.([0-9a-z]+)(?:$)/i);
        return (null == n ? void 0 : n[1]) ? ? null
    }
    let eQ = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,
        e0 = /^(?:[a-z+]+:)?\/\//i,
        e1 = /^www\..*/i,
        e2 = /^(data:)([^,]*),(.*)/i;

    function e3(e, t) {
        return (e || "").replace(eQ, (e, r, n, i, s, o) => {
            let a = n || s || o,
                l = r || i || "";
            if (!a) return e;
            if (e0.test(a) || e1.test(a) || e2.test(a)) return `url(${l}${a}${l})`;
            if ("/" === a[0]) return `url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;
            let h = t.split("/"),
                c = a.split("/");
            for (let e of (h.pop(), c))
                if ("." === e) continue;
                else ".." === e ? h.pop() : h.push(e);
            return `url(${l}${h.join("/")}${l})`
        })
    }

    function e5(e) {
        return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "")
    }
    let e8 = 1,
        e4 = RegExp("[^a-z0-9-_:]");

    function e9() {
        return e8++
    }
    let e6 = /^[^ \t\n\r\u000c]+/,
        e7 = /^[, \t\n\r\u000c]+/,
        te = new WeakMap;

    function tt(e, t) {
        return t && "" !== t.trim() ? tr(e, t) : t
    }

    function tr(e, t) {
        let r = te.get(e);
        if (r || (r = e.createElement("a"), te.set(e, r)), t) {
            if (t.startsWith("blob:") || t.startsWith("data:")) return t
        } else t = "";
        return r.setAttribute("href", t), r.href
    }

    function tn(e, t, r, n) {
        if (!n) return n;
        if ("src" === r || "href" === r && ("use" !== t || "#" !== n[0]) || "xlink:href" === r && "#" !== n[0]) return tt(e, n);
        if ("background" === r && ("table" === t || "td" === t || "th" === t)) return tt(e, n);
        if ("srcset" === r) return function(e, t) {
            if ("" === t.trim()) return t;
            let r = 0;

            function n(e) {
                let n, i = e.exec(t.substring(r));
                return i ? (n = i[0], r += n.length, n) : ""
            }
            let i = [];
            for (; n(e7), !(r >= t.length);) {
                let s = n(e6);
                if ("," === s.slice(-1)) s = tt(e, s.substring(0, s.length - 1)), i.push(s);
                else {
                    let n = "";
                    s = tt(e, s);
                    let o = !1;
                    for (;;) {
                        let e = t.charAt(r);
                        if ("" === e) {
                            i.push((s + n).trim());
                            break
                        }
                        if (o) ")" === e && (o = !1);
                        else if ("," === e) {
                            r += 1, i.push((s + n).trim());
                            break
                        } else "(" === e && (o = !0);
                        n += e, r += 1
                    }
                }
            }
            return i.join(", ")
        }(e, n);
        if ("style" === r) return e3(n, tr(e));
        else if ("object" === t && "data" === r) return tt(e, n);
        return n
    }

    function ti(e, t, r) {
        return ("video" === e || "audio" === e) && "autoplay" === t
    }

    function ts(e, t, r) {
        if (!e) return !1;
        if (e.nodeType !== e.ELEMENT_NODE) return !!r && ts(ez(e), t, r);
        for (let r = e.classList.length; r--;) {
            let n = e.classList[r];
            if (t.test(n)) return !0
        }
        return !!r && ts(ez(e), t, r)
    }

    function to(e, t, r, n) {
        let i;
        if (eH(e)) {
            if (!eF(i = e).length) return !1
        } else {
            if (null === eU(e)) return !1;
            i = eU(e)
        }
        try {
            if ("string" == typeof t) {
                if (n) {
                    if (i.closest(`.${t}`)) return !0
                } else if (i.classList.contains(t)) return !0
            } else if (ts(i, t, n)) return !0;
            if (r) {
                if (n) {
                    if (i.closest(r)) return !0
                } else if (i.matches(r)) return !0
            }
        } catch (e) {}
        return !1
    }

    function ta(e) {
        return null == e ? "" : e.toLowerCase()
    }

    function tl(e, n) {
        let i, {
                doc: s,
                mirror: o,
                blockClass: a,
                blockSelector: l,
                maskTextClass: h,
                maskTextSelector: c,
                skipChild: u = !1,
                inlineStylesheet: d = !0,
                maskInputOptions: p = {},
                maskTextFn: f,
                maskInputFn: g,
                slimDOMOptions: m,
                dataURLOptions: y = {},
                inlineImages: v = !1,
                recordCanvas: w = !1,
                onSerialize: b,
                onIframeLoad: S,
                iframeLoadTimeout: C = 5e3,
                onStylesheetLoad: I,
                stylesheetLoadTimeout: E = 5e3,
                keepIframeSrcFn: x = () => !1,
                newlyAddedElement: k = !1,
                cssCaptured: O = !1
            } = n,
            {
                needsMask: M
            } = n,
            {
                preserveWhiteSpace: R = !0
            } = n;
        M || (M = to(e, h, c, void 0 === M));
        let T = function(e, n) {
            let {
                doc: i,
                mirror: s,
                blockClass: o,
                blockSelector: a,
                needsMask: l,
                inlineStylesheet: h,
                maskInputOptions: c = {},
                maskTextFn: u,
                maskInputFn: d,
                dataURLOptions: p = {},
                inlineImages: f,
                recordCanvas: g,
                keepIframeSrcFn: m,
                newlyAddedElement: y = !1,
                cssCaptured: v = !1
            } = n, w = function(e, t) {
                if (!t.hasNode(e)) return;
                let r = t.getId(e);
                return 1 === r ? void 0 : r
            }(i, s);
            switch (e.nodeType) {
                case e.DOCUMENT_NODE:
                    if ("CSS1Compat" !== e.compatMode) return {
                        type: eT.Document,
                        childNodes: [],
                        compatMode: e.compatMode
                    };
                    return {
                        type: eT.Document,
                        childNodes: []
                    };
                case e.DOCUMENT_TYPE_NODE:
                    return {
                        type: eT.DocumentType,
                        name: e.name,
                        publicId: e.publicId,
                        systemId: e.systemId,
                        rootId: w
                    };
                case e.ELEMENT_NODE:
                    return function(e, n) {
                        let i, {
                                doc: s,
                                blockClass: o,
                                blockSelector: a,
                                inlineStylesheet: l,
                                maskInputOptions: h = {},
                                maskInputFn: c,
                                dataURLOptions: u = {},
                                inlineImages: d,
                                recordCanvas: p,
                                keepIframeSrcFn: f,
                                newlyAddedElement: g = !1,
                                rootId: m
                            } = n,
                            y = function(e, t, r) {
                                try {
                                    if ("string" == typeof t) {
                                        if (e.classList.contains(t)) return !0
                                    } else
                                        for (let r = e.classList.length; r--;) {
                                            let n = e.classList[r];
                                            if (t.test(n)) return !0
                                        }
                                    if (r) return e.matches(r)
                                } catch (e) {}
                                return !1
                            }(e, o, a),
                            v = function(e) {
                                if (e instanceof HTMLFormElement) return "form";
                                let t = eX(e.tagName);
                                return e4.test(t) ? "div" : t
                            }(e),
                            w = {},
                            b = e.attributes.length;
                        for (let t = 0; t < b; t++) {
                            let r = e.attributes[t];
                            ti(v, r.name, r.value) || (w[r.name] = tn(s, v, eX(r.name), r.value))
                        }
                        if ("link" === v && l) {
                            let t = Array.from(s.styleSheets).find(t => t.href === e.href),
                                r = null;
                            t && (r = eG(t)), r && (delete w.rel, delete w.href, w._cssText = r)
                        }
                        if ("style" === v && e.sheet) {
                            let t = eG(e.sheet);
                            t && (e.childNodes.length > 1 && (t = (function(e, t) {
                                let r = Array.from(t.childNodes),
                                    n = [];
                                if (r.length > 1 && e && "string" == typeof e) {
                                    let t = e5(e);
                                    for (let i = 1; i < r.length; i++)
                                        if (r[i].textContent && "string" == typeof r[i].textContent) {
                                            let s = e5(r[i].textContent);
                                            for (let r = 3; r < s.length; r++) {
                                                let i = s.substring(0, r);
                                                if (2 === t.split(i).length) {
                                                    let r = t.indexOf(i);
                                                    for (let t = r; t < e.length; t++)
                                                        if (e5(e.substring(0, t)).length === r) {
                                                            n.push(e.substring(0, t)), e = e.substring(t);
                                                            break
                                                        }
                                                    break
                                                }
                                            }
                                        }
                                }
                                return n.push(e), n
                            })(t, e).join("/* rr_split */")), w._cssText = t)
                        }
                        if ("input" === v || "textarea" === v || "select" === v) {
                            let t = e.value,
                                r = e.checked;
                            "radio" !== w.type && "checkbox" !== w.type && "submit" !== w.type && "button" !== w.type && t ? w.value = eq({
                                element: e,
                                type: eK(e),
                                tagName: v,
                                value: t,
                                maskInputOptions: h,
                                maskInputFn: c
                            }) : r && (w.checked = r)
                        }
                        if ("option" === v && (e.selected && !h.select ? w.selected = !0 : delete w.selected), "dialog" === v && e.open && (w.rr_open_mode = e.matches("dialog:modal") ? "modal" : "non-modal"), "canvas" === v && p) {
                            if ("2d" === e.__context) ! function(e) {
                                let t = e.getContext("2d");
                                if (!t) return !0;
                                for (let r = 0; r < e.width; r += 50)
                                    for (let n = 0; n < e.height; n += 50) {
                                        let i = t.getImageData;
                                        if (new Uint32Array((e$ in i ? i[e$] : i).call(t, r, n, Math.min(50, e.width - r), Math.min(50, e.height - n)).data.buffer).some(e => 0 !== e)) return !1
                                    }
                                return !0
                            }(e) && (w.rr_dataURL = e.toDataURL(u.type, u.quality));
                            else if (!("__context" in e)) {
                                let t = e.toDataURL(u.type, u.quality),
                                    r = s.createElement("canvas");
                                r.width = e.width, r.height = e.height, t !== r.toDataURL(u.type, u.quality) && (w.rr_dataURL = t)
                            }
                        }
                        if ("img" === v && d) {
                            t || (r = (t = s.createElement("canvas")).getContext("2d"));
                            let n = e.currentSrc || e.getAttribute("src") || "<unknown-src>",
                                i = e.crossOrigin,
                                o = () => {
                                    e.removeEventListener("load", o);
                                    try {
                                        t.width = e.naturalWidth, t.height = e.naturalHeight, r.drawImage(e, 0, 0), w.rr_dataURL = t.toDataURL(u.type, u.quality)
                                    } catch (t) {
                                        if ("anonymous" !== e.crossOrigin) {
                                            e.crossOrigin = "anonymous", e.complete && 0 !== e.naturalWidth ? o() : e.addEventListener("load", o);
                                            return
                                        }
                                        console.warn(`Cannot inline img src=${n}! Error: ${t}`)
                                    }
                                    "anonymous" === e.crossOrigin && (i ? w.crossOrigin = i : e.removeAttribute("crossorigin"))
                                };
                            e.complete && 0 !== e.naturalWidth ? o() : e.addEventListener("load", o)
                        }
                        if ("audio" === v || "video" === v) {
                            let t = w;
                            t.rr_mediaState = e.paused ? "paused" : "played", t.rr_mediaCurrentTime = e.currentTime, t.rr_mediaPlaybackRate = e.playbackRate, t.rr_mediaMuted = e.muted, t.rr_mediaLoop = e.loop, t.rr_mediaVolume = e.volume
                        }
                        if (!g && (e.scrollLeft && (w.rr_scrollLeft = e.scrollLeft), e.scrollTop && (w.rr_scrollTop = e.scrollTop)), y) {
                            let {
                                width: t,
                                height: r
                            } = e.getBoundingClientRect();
                            w = {
                                class: w.class,
                                rr_width: `${t}px`,
                                rr_height: `${r}px`
                            }
                        }
                        "iframe" !== v || f(w.src) || (e.contentDocument || (w.rr_src = w.src), delete w.src);
                        try {
                            customElements.get(v) && (i = !0)
                        } catch (e) {}
                        return {
                            type: eT.Element,
                            tagName: v,
                            attributes: w,
                            childNodes: [],
                            isSVG: !!("svg" === e.tagName || e.ownerSVGElement) || void 0,
                            needBlock: y,
                            rootId: m,
                            isCustom: i
                        }
                    }(e, {
                        doc: i,
                        blockClass: o,
                        blockSelector: a,
                        inlineStylesheet: h,
                        maskInputOptions: c,
                        maskInputFn: d,
                        dataURLOptions: p,
                        inlineImages: f,
                        recordCanvas: g,
                        keepIframeSrcFn: m,
                        newlyAddedElement: y,
                        rootId: w
                    });
                case e.TEXT_NODE:
                    return function(e, t) {
                        let {
                            needsMask: r,
                            maskTextFn: n,
                            rootId: i,
                            cssCaptured: s
                        } = t, o = ez(e), a = o && o.tagName, l = "", h = "STYLE" === a || void 0, c = "SCRIPT" === a || void 0;
                        return c ? l = "SCRIPT_PLACEHOLDER" : !s && (l = ej(e), h && l && (l = e3(l, tr(t.doc)))), !h && !c && l && r && (l = n ? n(l, eU(e)) : l.replace(/[\S]/g, "*")), {
                            type: eT.Text,
                            textContent: l || "",
                            rootId: i
                        }
                    }(e, {
                        doc: i,
                        needsMask: l,
                        maskTextFn: u,
                        rootId: w,
                        cssCaptured: v
                    });
                case e.CDATA_SECTION_NODE:
                    return {
                        type: eT.CDATA,
                        textContent: "",
                        rootId: w
                    };
                case e.COMMENT_NODE:
                    return {
                        type: eT.Comment,
                        textContent: ej(e) || "",
                        rootId: w
                    };
                default:
                    return !1
            }
        }(e, {
            doc: s,
            mirror: o,
            blockClass: a,
            blockSelector: l,
            needsMask: M,
            inlineStylesheet: d,
            maskInputOptions: p,
            maskTextFn: f,
            maskInputFn: g,
            dataURLOptions: y,
            inlineImages: v,
            recordCanvas: w,
            keepIframeSrcFn: x,
            newlyAddedElement: k,
            cssCaptured: O
        });
        if (!T) return console.warn(e, "not serialized"), null;
        i = o.hasNode(e) ? o.getId(e) : ! function(e, t) {
            if (t.comment && e.type === eT.Comment) return !0;
            if (e.type === eT.Element) {
                if (t.script && ("script" === e.tagName || "link" === e.tagName && ("preload" === e.attributes.rel || "modulepreload" === e.attributes.rel) && "script" === e.attributes.as || "link" === e.tagName && "prefetch" === e.attributes.rel && "string" == typeof e.attributes.href && "js" === eJ(e.attributes.href))) return !0;
                else if (t.headFavicon && ("link" === e.tagName && "shortcut icon" === e.attributes.rel || "meta" === e.tagName && (ta(e.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === ta(e.attributes.name) || "icon" === ta(e.attributes.rel) || "apple-touch-icon" === ta(e.attributes.rel) || "shortcut icon" === ta(e.attributes.rel)))) return !0;
                else if ("meta" === e.tagName) {
                    if (t.headMetaDescKeywords && ta(e.attributes.name).match(/^description|keywords$/)) return !0;
                    else if (t.headMetaSocial && (ta(e.attributes.property).match(/^(og|twitter|fb):/) || ta(e.attributes.name).match(/^(og|twitter):/) || "pinterest" === ta(e.attributes.name))) return !0;
                    else if (t.headMetaRobots && ("robots" === ta(e.attributes.name) || "googlebot" === ta(e.attributes.name) || "bingbot" === ta(e.attributes.name))) return !0;
                    else if (t.headMetaHttpEquiv && void 0 !== e.attributes["http-equiv"]) return !0;
                    else if (t.headMetaAuthorship && ("author" === ta(e.attributes.name) || "generator" === ta(e.attributes.name) || "framework" === ta(e.attributes.name) || "publisher" === ta(e.attributes.name) || "progid" === ta(e.attributes.name) || ta(e.attributes.property).match(/^article:/) || ta(e.attributes.property).match(/^product:/))) return !0;
                    else if (t.headMetaVerification && ("google-site-verification" === ta(e.attributes.name) || "yandex-verification" === ta(e.attributes.name) || "csrf-token" === ta(e.attributes.name) || "p:domain_verify" === ta(e.attributes.name) || "verify-v1" === ta(e.attributes.name) || "verification" === ta(e.attributes.name) || "shopify-checkout-api-token" === ta(e.attributes.name))) return !0
                }
            }
            return !1
        }(T, m) && (R || T.type !== eT.Text || T.textContent.replace(/^\s+|\s+$/gm, "").length) ? e9() : -2;
        let A = Object.assign(T, {
            id: i
        });
        if (o.add(e, A), -2 === i) return null;
        b && b(e);
        let N = !u;
        if (A.type === eT.Element) {
            N = N && !A.needBlock, delete A.needBlock;
            let t = eB(e);
            t && eV(t) && (A.isShadowHost = !0)
        }
        if ((A.type === eT.Document || A.type === eT.Element) && N) {
            m.headWhitespace && A.type === eT.Element && "head" === A.tagName && (R = !1);
            let t = {
                doc: s,
                mirror: o,
                blockClass: a,
                blockSelector: l,
                needsMask: M,
                maskTextClass: h,
                maskTextSelector: c,
                skipChild: u,
                inlineStylesheet: d,
                maskInputOptions: p,
                maskTextFn: f,
                maskInputFn: g,
                slimDOMOptions: m,
                dataURLOptions: y,
                inlineImages: v,
                recordCanvas: w,
                preserveWhiteSpace: R,
                onSerialize: b,
                onIframeLoad: S,
                iframeLoadTimeout: C,
                onStylesheetLoad: I,
                stylesheetLoadTimeout: E,
                keepIframeSrcFn: x,
                cssCaptured: !1
            };
            if (A.type === eT.Element && "textarea" === A.tagName && void 0 !== A.attributes.value);
            else
                for (let r of (A.type === eT.Element && void 0 !== A.attributes._cssText && "string" == typeof A.attributes._cssText && (t.cssCaptured = !0), Array.from(eF(e)))) {
                    let e = tl(r, t);
                    e && A.childNodes.push(e)
                }
            let r = null;
            if (eH(e) && (r = eB(e)))
                for (let e of Array.from(eF(r))) {
                    let n = tl(e, t);
                    n && (eV(r) && (n.isShadow = !0), A.childNodes.push(n))
                }
        }
        let L = ez(e);
        return L && eW(L) && eV(L) && (A.isShadow = !0), A.type === eT.Element && "iframe" === A.tagName && function(e, t, r) {
            let n, i = e.contentWindow;
            if (!i) return;
            let s = !1;
            try {
                n = i.document.readyState
            } catch (e) {
                return
            }
            if ("complete" !== n) {
                let n = setTimeout(() => {
                    s || (t(), s = !0)
                }, r);
                e.addEventListener("load", () => {
                    clearTimeout(n), s = !0, t()
                });
                return
            }
            let o = "about:blank";
            if (i.location.href !== o || e.src === o || "" === e.src) return setTimeout(t, 0), e.addEventListener("load", t);
            e.addEventListener("load", t)
        }(e, () => {
            let t = e.contentDocument;
            if (t && S) {
                let r = tl(t, {
                    doc: t,
                    mirror: o,
                    blockClass: a,
                    blockSelector: l,
                    needsMask: M,
                    maskTextClass: h,
                    maskTextSelector: c,
                    skipChild: !1,
                    inlineStylesheet: d,
                    maskInputOptions: p,
                    maskTextFn: f,
                    maskInputFn: g,
                    slimDOMOptions: m,
                    dataURLOptions: y,
                    inlineImages: v,
                    recordCanvas: w,
                    preserveWhiteSpace: R,
                    onSerialize: b,
                    onIframeLoad: S,
                    iframeLoadTimeout: C,
                    onStylesheetLoad: I,
                    stylesheetLoadTimeout: E,
                    keepIframeSrcFn: x
                });
                r && S(e, r)
            }
        }, C), A.type === eT.Element && "link" === A.tagName && "string" == typeof A.attributes.rel && ("stylesheet" === A.attributes.rel || "preload" === A.attributes.rel && "string" == typeof A.attributes.href && "css" === eJ(A.attributes.href)) && function(e, t, r) {
            let n, i = !1;
            try {
                n = e.sheet
            } catch (e) {
                return
            }
            if (n) return;
            let s = setTimeout(() => {
                i || (t(), i = !0)
            }, r);
            e.addEventListener("load", () => {
                clearTimeout(s), i = !0, t()
            })
        }(e, () => {
            if (I) {
                let t = tl(e, {
                    doc: s,
                    mirror: o,
                    blockClass: a,
                    blockSelector: l,
                    needsMask: M,
                    maskTextClass: h,
                    maskTextSelector: c,
                    skipChild: !1,
                    inlineStylesheet: d,
                    maskInputOptions: p,
                    maskTextFn: f,
                    maskInputFn: g,
                    slimDOMOptions: m,
                    dataURLOptions: y,
                    inlineImages: v,
                    recordCanvas: w,
                    preserveWhiteSpace: R,
                    onSerialize: b,
                    onIframeLoad: S,
                    iframeLoadTimeout: C,
                    onStylesheetLoad: I,
                    stylesheetLoadTimeout: E,
                    keepIframeSrcFn: x
                });
                t && I(e, t)
            }
        }, E), A
    }
    RegExp(/(max|min)-device-(width|height)/.source, "g");
    var th = {
            exports: {}
        },
        tc = String,
        tu = function() {
            return {
                isColorSupported: !1,
                reset: tc,
                bold: tc,
                dim: tc,
                italic: tc,
                underline: tc,
                inverse: tc,
                hidden: tc,
                strikethrough: tc,
                black: tc,
                red: tc,
                green: tc,
                yellow: tc,
                blue: tc,
                magenta: tc,
                cyan: tc,
                white: tc,
                gray: tc,
                bgBlack: tc,
                bgRed: tc,
                bgGreen: tc,
                bgYellow: tc,
                bgBlue: tc,
                bgMagenta: tc,
                bgCyan: tc,
                bgWhite: tc
            }
        };
    th.exports = tu(), th.exports.createColors = tu;
    var td = th.exports;
    let tp = function(e) {
            if (e.__esModule) return e;
            var t = e.default;
            if ("function" == typeof t) {
                var r = function e() {
                    return this instanceof e ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments)
                };
                r.prototype = t.prototype
            } else r = {};
            return Object.defineProperty(r, "__esModule", {
                value: !0
            }), Object.keys(e).forEach(function(t) {
                var n = Object.getOwnPropertyDescriptor(e, t);
                Object.defineProperty(r, t, n.get ? n : {
                    enumerable: !0,
                    get: function() {
                        return e[t]
                    }
                })
            }), r
        }(Object.freeze(Object.defineProperty({
            __proto__: null,
            default: {}
        }, Symbol.toStringTag, {
            value: "Module"
        }))),
        tf = class e extends Error {
            constructor(t, r, n, i, s, o) {
                super(t), this.name = "CssSyntaxError", this.reason = t, s && (this.file = s), i && (this.source = i), o && (this.plugin = o), void 0 !== r && void 0 !== n && ("number" == typeof r ? (this.line = r, this.column = n) : (this.line = r.line, this.column = r.column, this.endLine = n.line, this.endColumn = n.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, e)
            }
            setMessage() {
                this.message = this.plugin ? this.plugin + ": " : "", this.message += this.file ? this.file : "<css input>", void 0 !== this.line && (this.message += ":" + this.line + ":" + this.column), this.message += ": " + this.reason
            }
            showSourceCode(e) {
                let t, r;
                if (!this.source) return "";
                let n = this.source;
                null == e && (e = td.isColorSupported), tp && e && (n = tp(n));
                let i = n.split(/\r?\n/),
                    s = Math.max(this.line - 3, 0),
                    o = Math.min(this.line + 2, i.length),
                    a = String(o).length;
                if (e) {
                    let {
                        bold: e,
                        gray: n,
                        red: i
                    } = td.createColors(!0);
                    t = t => e(i(t)), r = e => n(e)
                } else t = r = e => e;
                return i.slice(s, o).map((e, n) => {
                    let i = s + 1 + n,
                        o = " " + (" " + i).slice(-a) + " | ";
                    if (i === this.line) {
                        let n = r(o.replace(/\d/g, " ")) + e.slice(0, this.column - 1).replace(/[^\t]/g, " ");
                        return t(">") + r(o) + e + "\n " + n + t("^")
                    }
                    return " " + r(o) + e
                }).join("\n")
            }
            toString() {
                let e = this.showSourceCode();
                return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e
            }
        };
    tf.default = tf;
    var tg = {};
    tg.isClean = Symbol("isClean"), tg.my = Symbol("my");
    let tm = {
            after: "\n",
            beforeClose: "\n",
            beforeComment: "\n",
            beforeDecl: "\n",
            beforeOpen: " ",
            beforeRule: "\n",
            colon: ": ",
            commentLeft: " ",
            commentRight: " ",
            emptyBody: "",
            indent: "    ",
            semicolon: !1
        },
        ty = class {
            constructor(e) {
                this.builder = e
            }
            atrule(e, t) {
                let r = "@" + e.name,
                    n = e.params ? this.rawValue(e, "params") : "";
                if (void 0 !== e.raws.afterName ? r += e.raws.afterName : n && (r += " "), e.nodes) this.block(e, r + n);
                else {
                    let i = (e.raws.between || "") + (t ? ";" : "");
                    this.builder(r + n + i, e)
                }
            }
            beforeAfter(e, t) {
                let r;
                r = "decl" === e.type ? this.raw(e, null, "beforeDecl") : "comment" === e.type ? this.raw(e, null, "beforeComment") : "before" === t ? this.raw(e, null, "beforeRule") : this.raw(e, null, "beforeClose");
                let n = e.parent,
                    i = 0;
                for (; n && "root" !== n.type;) i += 1, n = n.parent;
                if (r.includes("\n")) {
                    let t = this.raw(e, null, "indent");
                    if (t.length)
                        for (let e = 0; e < i; e++) r += t
                }
                return r
            }
            block(e, t) {
                let r, n = this.raw(e, "between", "beforeOpen");
                this.builder(t + n + "{", e, "start"), e.nodes && e.nodes.length ? (this.body(e), r = this.raw(e, "after")) : r = this.raw(e, "after", "emptyBody"), r && this.builder(r), this.builder("}", e, "end")
            }
            body(e) {
                let t = e.nodes.length - 1;
                for (; t > 0 && "comment" === e.nodes[t].type;) t -= 1;
                let r = this.raw(e, "semicolon");
                for (let n = 0; n < e.nodes.length; n++) {
                    let i = e.nodes[n],
                        s = this.raw(i, "before");
                    s && this.builder(s), this.stringify(i, t !== n || r)
                }
            }
            comment(e) {
                let t = this.raw(e, "left", "commentLeft"),
                    r = this.raw(e, "right", "commentRight");
                this.builder("/*" + t + e.text + r + "*/", e)
            }
            decl(e, t) {
                let r = this.raw(e, "between", "colon"),
                    n = e.prop + r + this.rawValue(e, "value");
                e.important && (n += e.raws.important || " !important"), t && (n += ";"), this.builder(n, e)
            }
            document(e) {
                this.body(e)
            }
            raw(e, t, r) {
                let n;
                if (r || (r = t), t && void 0 !== (n = e.raws[t])) return n;
                let i = e.parent;
                if ("before" === r && (!i || "root" === i.type && i.first === e || i && "document" === i.type)) return "";
                if (!i) return tm[r];
                let s = e.root();
                if (s.rawCache || (s.rawCache = {}), void 0 !== s.rawCache[r]) return s.rawCache[r];
                if ("before" === r || "after" === r) return this.beforeAfter(e, r); {
                    var o;
                    let i = "raw" + ((o = r)[0].toUpperCase() + o.slice(1));
                    this[i] ? n = this[i](s, e) : s.walk(e => {
                        if (void 0 !== (n = e.raws[t])) return !1
                    })
                }
                return void 0 === n && (n = tm[r]), s.rawCache[r] = n, n
            }
            rawBeforeClose(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && e.nodes.length > 0 && void 0 !== e.raws.after) return (t = e.raws.after).includes("\n") && (t = t.replace(/[^\n]+$/, "")), !1
                }), t && (t = t.replace(/\S/g, "")), t
            }
            rawBeforeComment(e, t) {
                let r;
                return e.walkComments(e => {
                    if (void 0 !== e.raws.before) return (r = e.raws.before).includes("\n") && (r = r.replace(/[^\n]+$/, "")), !1
                }), void 0 === r ? r = this.raw(t, null, "beforeDecl") : r && (r = r.replace(/\S/g, "")), r
            }
            rawBeforeDecl(e, t) {
                let r;
                return e.walkDecls(e => {
                    if (void 0 !== e.raws.before) return (r = e.raws.before).includes("\n") && (r = r.replace(/[^\n]+$/, "")), !1
                }), void 0 === r ? r = this.raw(t, null, "beforeRule") : r && (r = r.replace(/\S/g, "")), r
            }
            rawBeforeOpen(e) {
                let t;
                return e.walk(e => {
                    if ("decl" !== e.type && void 0 !== (t = e.raws.between)) return !1
                }), t
            }
            rawBeforeRule(e) {
                let t;
                return e.walk(r => {
                    if (r.nodes && (r.parent !== e || e.first !== r) && void 0 !== r.raws.before) return (t = r.raws.before).includes("\n") && (t = t.replace(/[^\n]+$/, "")), !1
                }), t && (t = t.replace(/\S/g, "")), t
            }
            rawColon(e) {
                let t;
                return e.walkDecls(e => {
                    if (void 0 !== e.raws.between) return t = e.raws.between.replace(/[^\s:]/g, ""), !1
                }), t
            }
            rawEmptyBody(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && 0 === e.nodes.length && void 0 !== (t = e.raws.after)) return !1
                }), t
            }
            rawIndent(e) {
                let t;
                return e.raws.indent ? e.raws.indent : (e.walk(r => {
                    let n = r.parent;
                    if (n && n !== e && n.parent && n.parent === e && void 0 !== r.raws.before) {
                        let e = r.raws.before.split("\n");
                        return t = (t = e[e.length - 1]).replace(/\S/g, ""), !1
                    }
                }), t)
            }
            rawSemicolon(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && e.nodes.length && "decl" === e.last.type && void 0 !== (t = e.raws.semicolon)) return !1
                }), t
            }
            rawValue(e, t) {
                let r = e[t],
                    n = e.raws[t];
                return n && n.value === r ? n.raw : r
            }
            root(e) {
                this.body(e), e.raws.after && this.builder(e.raws.after)
            }
            rule(e) {
                this.block(e, this.rawValue(e, "selector")), e.raws.ownSemicolon && this.builder(e.raws.ownSemicolon, e, "end")
            }
            stringify(e, t) {
                if (!this[e.type]) throw Error("Unknown AST node type " + e.type + ". Maybe you need to change PostCSS stringifier.");
                this[e.type](e, t)
            }
        };

    function tv(e, t) {
        new ty(t).stringify(e)
    }
    ty.default = ty, tv.default = tv;
    let {
        isClean: tw,
        my: tb
    } = tg, tS = class {
        constructor(e = {}) {
            for (let t in this.raws = {}, this[tw] = !1, this[tb] = !0, e)
                if ("nodes" === t)
                    for (let r of (this.nodes = [], e[t])) "function" == typeof r.clone ? this.append(r.clone()) : this.append(r);
                else this[t] = e[t]
        }
        addToError(e) {
            if (e.postcssNode = this, e.stack && this.source && /\n\s{4}at /.test(e.stack)) {
                let t = this.source;
                e.stack = e.stack.replace(/\n\s{4}at /, `$&${t.input.from}:${t.start.line}:${t.start.column}$&`)
            }
            return e
        }
        after(e) {
            return this.parent.insertAfter(this, e), this
        }
        assign(e = {}) {
            for (let t in e) this[t] = e[t];
            return this
        }
        before(e) {
            return this.parent.insertBefore(this, e), this
        }
        cleanRaws(e) {
            delete this.raws.before, delete this.raws.after, e || delete this.raws.between
        }
        clone(e = {}) {
            let t = function e(t, r) {
                let n = new t.constructor;
                for (let i in t) {
                    if (!Object.prototype.hasOwnProperty.call(t, i) || "proxyCache" === i) continue;
                    let s = t[i],
                        o = typeof s;
                    "parent" === i && "object" === o ? r && (n[i] = r) : "source" === i ? n[i] = s : Array.isArray(s) ? n[i] = s.map(t => e(t, n)) : ("object" === o && null !== s && (s = e(s)), n[i] = s)
                }
                return n
            }(this);
            for (let r in e) t[r] = e[r];
            return t
        }
        cloneAfter(e = {}) {
            let t = this.clone(e);
            return this.parent.insertAfter(this, t), t
        }
        cloneBefore(e = {}) {
            let t = this.clone(e);
            return this.parent.insertBefore(this, t), t
        }
        error(e, t = {}) {
            if (this.source) {
                let {
                    end: r,
                    start: n
                } = this.rangeBy(t);
                return this.source.input.error(e, {
                    column: n.column,
                    line: n.line
                }, {
                    column: r.column,
                    line: r.line
                }, t)
            }
            return new tf(e)
        }
        getProxyProcessor() {
            return {
                get: (e, t) => "proxyOf" === t ? e : "root" === t ? () => e.root().toProxy() : e[t],
                set: (e, t, r) => e[t] === r || (e[t] = r, ("prop" === t || "value" === t || "name" === t || "params" === t || "important" === t || "text" === t) && e.markDirty(), !0)
            }
        }
        markDirty() {
            if (this[tw]) {
                this[tw] = !1;
                let e = this;
                for (; e = e.parent;) e[tw] = !1
            }
        }
        next() {
            if (!this.parent) return;
            let e = this.parent.index(this);
            return this.parent.nodes[e + 1]
        }
        positionBy(e, t) {
            let r = this.source.start;
            if (e.index) r = this.positionInside(e.index, t);
            else if (e.word) {
                let n = (t = this.toString()).indexOf(e.word); - 1 !== n && (r = this.positionInside(n, t))
            }
            return r
        }
        positionInside(e, t) {
            let r = t || this.toString(),
                n = this.source.start.column,
                i = this.source.start.line;
            for (let t = 0; t < e; t++) "\n" === r[t] ? (n = 1, i += 1) : n += 1;
            return {
                column: n,
                line: i
            }
        }
        prev() {
            if (!this.parent) return;
            let e = this.parent.index(this);
            return this.parent.nodes[e - 1]
        }
        rangeBy(e) {
            let t = {
                    column: this.source.start.column,
                    line: this.source.start.line
                },
                r = this.source.end ? {
                    column: this.source.end.column + 1,
                    line: this.source.end.line
                } : {
                    column: t.column + 1,
                    line: t.line
                };
            if (e.word) {
                let n = this.toString(),
                    i = n.indexOf(e.word); - 1 !== i && (t = this.positionInside(i, n), r = this.positionInside(i + e.word.length, n))
            } else e.start ? t = {
                column: e.start.column,
                line: e.start.line
            } : e.index && (t = this.positionInside(e.index)), e.end ? r = {
                column: e.end.column,
                line: e.end.line
            } : "number" == typeof e.endIndex ? r = this.positionInside(e.endIndex) : e.index && (r = this.positionInside(e.index + 1));
            return (r.line < t.line || r.line === t.line && r.column <= t.column) && (r = {
                column: t.column + 1,
                line: t.line
            }), {
                end: r,
                start: t
            }
        }
        raw(e, t) {
            return new ty().raw(this, e, t)
        }
        remove() {
            return this.parent && this.parent.removeChild(this), this.parent = void 0, this
        }
        replaceWith(...e) {
            if (this.parent) {
                let t = this,
                    r = !1;
                for (let n of e) n === this ? r = !0 : r ? (this.parent.insertAfter(t, n), t = n) : this.parent.insertBefore(t, n);
                r || this.remove()
            }
            return this
        }
        root() {
            let e = this;
            for (; e.parent && "document" !== e.parent.type;) e = e.parent;
            return e
        }
        toJSON(e, t) {
            let r = {},
                n = null == t;
            t = t || new Map;
            let i = 0;
            for (let e in this) {
                if (!Object.prototype.hasOwnProperty.call(this, e) || "parent" === e || "proxyCache" === e) continue;
                let n = this[e];
                if (Array.isArray(n)) r[e] = n.map(e => "object" == typeof e && e.toJSON ? e.toJSON(null, t) : e);
                else if ("object" == typeof n && n.toJSON) r[e] = n.toJSON(null, t);
                else if ("source" === e) {
                    let s = t.get(n.input);
                    null == s && (s = i, t.set(n.input, i), i++), r[e] = {
                        end: n.end,
                        inputId: s,
                        start: n.start
                    }
                } else r[e] = n
            }
            return n && (r.inputs = [...t.keys()].map(e => e.toJSON())), r
        }
        toProxy() {
            return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache
        }
        toString(e = tv) {
            e.stringify && (e = e.stringify);
            let t = "";
            return e(this, e => {
                t += e
            }), t
        }
        warn(e, t, r) {
            let n = {
                node: this
            };
            for (let e in r) n[e] = r[e];
            return e.warn(t, n)
        }
        get proxyOf() {
            return this
        }
    };
    tS.default = tS;
    let tC = tS,
        tI = class extends tC {
            constructor(e) {
                e && void 0 !== e.value && "string" != typeof e.value && (e = { ...e,
                    value: String(e.value)
                }), super(e), this.type = "decl"
            }
            get variable() {
                return this.prop.startsWith("--") || "$" === this.prop[0]
            }
        };
    tI.default = tI;
    let {
        SourceMapConsumer: tE,
        SourceMapGenerator: tx
    } = tp, {
        existsSync: tk,
        readFileSync: tO
    } = tp, {
        dirname: tM,
        join: tR
    } = tp, tT = class {
        constructor(e, t) {
            if (!1 === t.map) return;
            this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
            let r = t.map ? t.map.prev : void 0,
                n = this.loadMap(t.from, r);
            !this.mapFile && t.from && (this.mapFile = t.from), this.mapFile && (this.root = tM(this.mapFile)), n && (this.text = n)
        }
        consumer() {
            return this.consumerCache || (this.consumerCache = new tE(this.text)), this.consumerCache
        }
        decodeInline(e) {
            if (/^data:application\/json;charset=utf-?8,/.test(e) || /^data:application\/json,/.test(e)) return decodeURIComponent(e.substr(RegExp.lastMatch.length));
            if (/^data:application\/json;charset=utf-?8;base64,/.test(e) || /^data:application\/json;base64,/.test(e)) {
                var t;
                return t = e.substr(RegExp.lastMatch.length), eE.Buffer.from(t, "base64").toString()
            }
            throw Error("Unsupported source map encoding " + e.match(/data:application\/json;([^,]+),/)[1])
        }
        getAnnotationURL(e) {
            return e.replace(/^\/\*\s*# sourceMappingURL=/, "").trim()
        }
        isMap(e) {
            return "object" == typeof e && ("string" == typeof e.mappings || "string" == typeof e._mappings || Array.isArray(e.sections))
        }
        loadAnnotation(e) {
            let t = e.match(/\/\*\s*# sourceMappingURL=/gm);
            if (!t) return;
            let r = e.lastIndexOf(t.pop()),
                n = e.indexOf("*/", r);
            r > -1 && n > -1 && (this.annotation = this.getAnnotationURL(e.substring(r, n)))
        }
        loadFile(e) {
            if (this.root = tM(e), tk(e)) return this.mapFile = e, tO(e, "utf-8").toString().trim()
        }
        loadMap(e, t) {
            if (!1 === t) return !1;
            if (t)
                if ("string" == typeof t) return t;
                else if ("function" == typeof t) {
                let r = t(e);
                if (r) {
                    let e = this.loadFile(r);
                    if (!e) throw Error("Unable to load previous source map: " + r.toString());
                    return e
                }
            } else if (t instanceof tE) return tx.fromSourceMap(t).toString();
            else if (t instanceof tx) return t.toString();
            else if (this.isMap(t)) return JSON.stringify(t);
            else throw Error("Unsupported previous source map format: " + t.toString());
            else if (this.inline) return this.decodeInline(this.annotation);
            else if (this.annotation) {
                let t = this.annotation;
                return e && (t = tR(tM(e), t)), this.loadFile(t)
            }
        }
        startWith(e, t) {
            return !!e && e.substr(0, t.length) === t
        }
        withContent() {
            return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0)
        }
    };
    tT.default = tT;
    let {
        SourceMapConsumer: tA,
        SourceMapGenerator: tN
    } = tp, {
        fileURLToPath: tL,
        pathToFileURL: tD
    } = tp, {
        isAbsolute: tP,
        resolve: t_
    } = tp, {
        nanoid: tF
    } = {
        nanoid: (e = 21) => {
            let t = "",
                r = e;
            for (; r--;) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict" [64 * Math.random() | 0];
            return t
        },
        customAlphabet: (e, t = 21) => (r = t) => {
            let n = "",
                i = r;
            for (; i--;) n += e[Math.random() * e.length | 0];
            return n
        }
    }, tz = Symbol("fromOffsetCache"), tU = !!(tA && tN), tj = !!(t_ && tP), tB = class {
        constructor(e, t = {}) {
            if (null == e || "object" == typeof e && !e.toString) throw Error(`PostCSS received ${e} instead of CSS string`);
            if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!tj || /^\w+:\/\//.test(t.from) || tP(t.from) ? this.file = t.from : this.file = t_(t.from)), tj && tU) {
                let e = new tT(this.css, t);
                if (e.text) {
                    this.map = e;
                    let t = e.consumer().file;
                    !this.file && t && (this.file = this.mapResolve(t))
                }
            }
            this.file || (this.id = "<input css " + tF(6) + ">"), this.map && (this.map.file = this.from)
        }
        error(e, t, r, n = {}) {
            let i, s, o;
            if (t && "object" == typeof t) {
                let e = t,
                    n = r;
                if ("number" == typeof e.offset) {
                    let n = this.fromOffset(e.offset);
                    t = n.line, r = n.col
                } else t = e.line, r = e.column;
                if ("number" == typeof n.offset) {
                    let e = this.fromOffset(n.offset);
                    s = e.line, o = e.col
                } else s = n.line, o = n.column
            } else if (!r) {
                let e = this.fromOffset(t);
                t = e.line, r = e.col
            }
            let a = this.origin(t, r, s, o);
            return (i = a ? new tf(e, void 0 === a.endLine ? a.line : {
                column: a.column,
                line: a.line
            }, void 0 === a.endLine ? a.column : {
                column: a.endColumn,
                line: a.endLine
            }, a.source, a.file, n.plugin) : new tf(e, void 0 === s ? t : {
                column: r,
                line: t
            }, void 0 === s ? r : {
                column: o,
                line: s
            }, this.css, this.file, n.plugin)).input = {
                column: r,
                endColumn: o,
                endLine: s,
                line: t,
                source: this.css
            }, this.file && (tD && (i.input.url = tD(this.file).toString()), i.input.file = this.file), i
        }
        fromOffset(e) {
            let t, r;
            if (this[tz]) r = this[tz];
            else {
                let e = this.css.split("\n");
                r = Array(e.length);
                let t = 0;
                for (let n = 0, i = e.length; n < i; n++) r[n] = t, t += e[n].length + 1;
                this[tz] = r
            }
            t = r[r.length - 1];
            let n = 0;
            if (e >= t) n = r.length - 1;
            else {
                let t, i = r.length - 2;
                for (; n < i;)
                    if (e < r[t = n + (i - n >> 1)]) i = t - 1;
                    else if (e >= r[t + 1]) n = t + 1;
                else {
                    n = t;
                    break
                }
            }
            return {
                col: e - r[n] + 1,
                line: n + 1
            }
        }
        mapResolve(e) {
            return /^\w+:\/\//.test(e) ? e : t_(this.map.consumer().sourceRoot || this.map.root || ".", e)
        }
        origin(e, t, r, n) {
            let i, s;
            if (!this.map) return !1;
            let o = this.map.consumer(),
                a = o.originalPositionFor({
                    column: t,
                    line: e
                });
            if (!a.source) return !1;
            "number" == typeof r && (i = o.originalPositionFor({
                column: n,
                line: r
            })), s = tP(a.source) ? tD(a.source) : new URL(a.source, this.map.consumer().sourceRoot || tD(this.map.mapFile));
            let l = {
                column: a.column,
                endColumn: i && i.column,
                endLine: i && i.line,
                line: a.line,
                url: s.toString()
            };
            if ("file:" === s.protocol)
                if (tL) l.file = tL(s);
                else throw Error("file: protocol is not available in this PostCSS build");
            let h = o.sourceContentFor(a.source);
            return h && (l.source = h), l
        }
        toJSON() {
            let e = {};
            for (let t of ["hasBOM", "css", "file", "id"]) null != this[t] && (e[t] = this[t]);
            return this.map && (e.map = { ...this.map
            }, e.map.consumerCache && (e.map.consumerCache = void 0)), e
        }
        get from() {
            return this.file || this.id
        }
    };
    tB.default = tB, tp && tp.registerInput && tp.registerInput(tB);
    let {
        SourceMapConsumer: tH,
        SourceMapGenerator: tW
    } = tp, {
        dirname: tV,
        relative: tG,
        resolve: tZ,
        sep: tY
    } = tp, {
        pathToFileURL: tq
    } = tp, tX = !!(tH && tW), t$ = !!(tV && tZ && tG && tY), tK = class {
        constructor(e, t, r, n) {
            this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = n, this.originalCSS = n, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = new Map, this.memoizedPaths = new Map, this.memoizedURLs = new Map
        }
        addAnnotation() {
            let e;
            e = this.isInline() ? "data:application/json;base64," + this.toBase64(this.map.toString()) : "string" == typeof this.mapOpts.annotation ? this.mapOpts.annotation : "function" == typeof this.mapOpts.annotation ? this.mapOpts.annotation(this.opts.to, this.root) : this.outputFile() + ".map";
            let t = "\n";
            this.css.includes("\r\n") && (t = "\r\n"), this.css += t + "/*# sourceMappingURL=" + e + " */"
        }
        applyPrevMaps() {
            for (let e of this.previous()) {
                let t, r = this.toUrl(this.path(e.file)),
                    n = e.root || tV(e.file);
                !1 === this.mapOpts.sourcesContent ? (t = new tH(e.text)).sourcesContent && (t.sourcesContent = null) : t = e.consumer(), this.map.applySourceMap(t, r, this.toUrl(this.path(n)))
            }
        }
        clearAnnotation() {
            if (!1 !== this.mapOpts.annotation)
                if (this.root) {
                    let e;
                    for (let t = this.root.nodes.length - 1; t >= 0; t--) "comment" === (e = this.root.nodes[t]).type && 0 === e.text.indexOf("# sourceMappingURL=") && this.root.removeChild(t)
                } else this.css && (this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, ""))
        }
        generate() {
            if (this.clearAnnotation(), t$ && tX && this.isMap()) return this.generateMap(); {
                let e = "";
                return this.stringify(this.root, t => {
                    e += t
                }), [e]
            }
        }
        generateMap() {
            if (this.root) this.generateString();
            else if (1 === this.previous().length) {
                let e = this.previous()[0].consumer();
                e.file = this.outputFile(), this.map = tW.fromSourceMap(e, {
                    ignoreInvalidMapping: !0
                })
            } else this.map = new tW({
                file: this.outputFile(),
                ignoreInvalidMapping: !0
            }), this.map.addMapping({
                generated: {
                    column: 0,
                    line: 1
                },
                original: {
                    column: 0,
                    line: 1
                },
                source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
            });
            return (this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline()) ? [this.css] : [this.css, this.map]
        }
        generateString() {
            let e, t;
            this.css = "", this.map = new tW({
                file: this.outputFile(),
                ignoreInvalidMapping: !0
            });
            let r = 1,
                n = 1,
                i = "<no source>",
                s = {
                    generated: {
                        column: 0,
                        line: 0
                    },
                    original: {
                        column: 0,
                        line: 0
                    },
                    source: ""
                };
            this.stringify(this.root, (o, a, l) => {
                if (this.css += o, a && "end" !== l && (s.generated.line = r, s.generated.column = n - 1, a.source && a.source.start ? (s.source = this.sourcePath(a), s.original.line = a.source.start.line, s.original.column = a.source.start.column - 1) : (s.source = i, s.original.line = 1, s.original.column = 0), this.map.addMapping(s)), (e = o.match(/\n/g)) ? (r += e.length, t = o.lastIndexOf("\n"), n = o.length - t) : n += o.length, a && "start" !== l) {
                    let e = a.parent || {
                        raws: {}
                    };
                    (!("decl" === a.type || "atrule" === a.type && !a.nodes) || a !== e.last || e.raws.semicolon) && (a.source && a.source.end ? (s.source = this.sourcePath(a), s.original.line = a.source.end.line, s.original.column = a.source.end.column - 1, s.generated.line = r, s.generated.column = n - 2) : (s.source = i, s.original.line = 1, s.original.column = 0, s.generated.line = r, s.generated.column = n - 1), this.map.addMapping(s))
                }
            })
        }
        isAnnotation() {
            return !!this.isInline() || (void 0 !== this.mapOpts.annotation ? this.mapOpts.annotation : !this.previous().length || this.previous().some(e => e.annotation))
        }
        isInline() {
            if (void 0 !== this.mapOpts.inline) return this.mapOpts.inline;
            let e = this.mapOpts.annotation;
            return (void 0 === e || !0 === e) && (!this.previous().length || this.previous().some(e => e.inline))
        }
        isMap() {
            return void 0 !== this.opts.map ? !!this.opts.map : this.previous().length > 0
        }
        isSourcesContent() {
            return void 0 !== this.mapOpts.sourcesContent ? this.mapOpts.sourcesContent : !this.previous().length || this.previous().some(e => e.withContent())
        }
        outputFile() {
            return this.opts.to ? this.path(this.opts.to) : this.opts.from ? this.path(this.opts.from) : "to.css"
        }
        path(e) {
            if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
            let t = this.memoizedPaths.get(e);
            if (t) return t;
            let r = this.opts.to ? tV(this.opts.to) : ".";
            "string" == typeof this.mapOpts.annotation && (r = tV(tZ(r, this.mapOpts.annotation)));
            let n = tG(r, e);
            return this.memoizedPaths.set(e, n), n
        }
        previous() {
            if (!this.previousMaps)
                if (this.previousMaps = [], this.root) this.root.walk(e => {
                    if (e.source && e.source.input.map) {
                        let t = e.source.input.map;
                        this.previousMaps.includes(t) || this.previousMaps.push(t)
                    }
                });
                else {
                    let e = new tB(this.originalCSS, this.opts);
                    e.map && this.previousMaps.push(e.map)
                }
            return this.previousMaps
        }
        setSourcesContent() {
            let e = {};
            if (this.root) this.root.walk(t => {
                if (t.source) {
                    let r = t.source.input.from;
                    if (r && !e[r]) {
                        e[r] = !0;
                        let n = this.usesFileUrls ? this.toFileUrl(r) : this.toUrl(this.path(r));
                        this.map.setSourceContent(n, t.source.input.css)
                    }
                }
            });
            else if (this.css) {
                let e = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
                this.map.setSourceContent(e, this.css)
            }
        }
        sourcePath(e) {
            return this.mapOpts.from ? this.toUrl(this.mapOpts.from) : this.usesFileUrls ? this.toFileUrl(e.source.input.from) : this.toUrl(this.path(e.source.input.from))
        }
        toBase64(e) {
            return eE.Buffer.from(e).toString("base64")
        }
        toFileUrl(e) {
            let t = this.memoizedFileURLs.get(e);
            if (t) return t;
            if (tq) {
                let t = tq(e).toString();
                return this.memoizedFileURLs.set(e, t), t
            }
            throw Error("`map.absolute` option is not available in this PostCSS build")
        }
        toUrl(e) {
            let t = this.memoizedURLs.get(e);
            if (t) return t;
            "\\" === tY && (e = e.replace(/\\/g, "/"));
            let r = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
            return this.memoizedURLs.set(e, r), r
        }
    }, tJ = tS, tQ = class extends tJ {
        constructor(e) {
            super(e), this.type = "comment"
        }
    };
    tQ.default = tQ;
    let {
        isClean: t0,
        my: t1
    } = tg, t2 = tS, t3 = class e extends t2 {
        append(...e) {
            for (let t of e)
                for (let e of this.normalize(t, this.last)) this.proxyOf.nodes.push(e);
            return this.markDirty(), this
        }
        cleanRaws(e) {
            if (super.cleanRaws(e), this.nodes)
                for (let t of this.nodes) t.cleanRaws(e)
        }
        each(e) {
            let t, r;
            if (!this.proxyOf.nodes) return;
            let n = this.getIterator();
            for (; this.indexes[n] < this.proxyOf.nodes.length && (t = this.indexes[n], !1 !== (r = e(this.proxyOf.nodes[t], t)));) this.indexes[n] += 1;
            return delete this.indexes[n], r
        }
        every(e) {
            return this.nodes.every(e)
        }
        getIterator() {
            this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
            let e = this.lastEach;
            return this.indexes[e] = 0, e
        }
        getProxyProcessor() {
            return {
                get(e, t) {
                    if ("proxyOf" === t) return e;
                    if (!e[t]) return e[t];
                    if ("each" === t || "string" == typeof t && t.startsWith("walk")) return (...r) => e[t](...r.map(e => "function" == typeof e ? (t, r) => e(t.toProxy(), r) : e));
                    if ("every" === t || "some" === t) return r => e[t]((e, ...t) => r(e.toProxy(), ...t));
                    if ("root" === t) return () => e.root().toProxy();
                    else if ("nodes" === t) return e.nodes.map(e => e.toProxy());
                    else if ("first" === t || "last" === t) return e[t].toProxy();
                    else return e[t]
                },
                set: (e, t, r) => e[t] === r || (e[t] = r, ("name" === t || "params" === t || "selector" === t) && e.markDirty(), !0)
            }
        }
        index(e) {
            return "number" == typeof e ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e))
        }
        insertAfter(e, t) {
            let r, n = this.index(e),
                i = this.normalize(t, this.proxyOf.nodes[n]).reverse();
            for (let t of (n = this.index(e), i)) this.proxyOf.nodes.splice(n + 1, 0, t);
            for (let e in this.indexes) n < (r = this.indexes[e]) && (this.indexes[e] = r + i.length);
            return this.markDirty(), this
        }
        insertBefore(e, t) {
            let r, n = this.index(e),
                i = 0 === n && "prepend",
                s = this.normalize(t, this.proxyOf.nodes[n], i).reverse();
            for (let t of (n = this.index(e), s)) this.proxyOf.nodes.splice(n, 0, t);
            for (let e in this.indexes) n <= (r = this.indexes[e]) && (this.indexes[e] = r + s.length);
            return this.markDirty(), this
        }
        normalize(t, r) {
            if ("string" == typeof t) t = function e(t) {
                return t.map(t => (t.nodes && (t.nodes = e(t.nodes)), delete t.source, t))
            }(n(t).nodes);
            else if (void 0 === t) t = [];
            else if (Array.isArray(t))
                for (let e of t = t.slice(0)) e.parent && e.parent.removeChild(e, "ignore");
            else if ("root" === t.type && "document" !== this.type)
                for (let e of t = t.nodes.slice(0)) e.parent && e.parent.removeChild(e, "ignore");
            else if (t.type) t = [t];
            else if (t.prop) {
                if (void 0 === t.value) throw Error("Value field is missed in node creation");
                "string" != typeof t.value && (t.value = String(t.value)), t = [new tI(t)]
            } else if (t.selector) t = [new i(t)];
            else if (t.name) t = [new s(t)];
            else if (t.text) t = [new tQ(t)];
            else throw Error("Unknown node type in node creation");
            return t.map(t => (t[t1] || e.rebuild(t), (t = t.proxyOf).parent && t.parent.removeChild(t), t[t0] && function e(t) {
                if (t[t0] = !1, t.proxyOf.nodes)
                    for (let r of t.proxyOf.nodes) e(r)
            }(t), void 0 === t.raws.before && r && void 0 !== r.raws.before && (t.raws.before = r.raws.before.replace(/\S/g, "")), t.parent = this.proxyOf, t))
        }
        prepend(...e) {
            for (let t of e = e.reverse()) {
                let e = this.normalize(t, this.first, "prepend").reverse();
                for (let t of e) this.proxyOf.nodes.unshift(t);
                for (let t in this.indexes) this.indexes[t] = this.indexes[t] + e.length
            }
            return this.markDirty(), this
        }
        push(e) {
            return e.parent = this, this.proxyOf.nodes.push(e), this
        }
        removeAll() {
            for (let e of this.proxyOf.nodes) e.parent = void 0;
            return this.proxyOf.nodes = [], this.markDirty(), this
        }
        removeChild(e) {
            let t;
            for (let r in e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1), this.indexes)(t = this.indexes[r]) >= e && (this.indexes[r] = t - 1);
            return this.markDirty(), this
        }
        replaceValues(e, t, r) {
            return r || (r = t, t = {}), this.walkDecls(n => {
                t.props && !t.props.includes(n.prop) || (!t.fast || n.value.includes(t.fast)) && (n.value = n.value.replace(e, r))
            }), this.markDirty(), this
        }
        some(e) {
            return this.nodes.some(e)
        }
        walk(e) {
            return this.each((t, r) => {
                let n;
                try {
                    n = e(t, r)
                } catch (e) {
                    throw t.addToError(e)
                }
                return !1 !== n && t.walk && (n = t.walk(e)), n
            })
        }
        walkAtRules(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("atrule" === r.type && e.test(r.name)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("atrule" === r.type && r.name === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("atrule" === e.type) return t(e, r)
            }))
        }
        walkComments(e) {
            return this.walk((t, r) => {
                if ("comment" === t.type) return e(t, r)
            })
        }
        walkDecls(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("decl" === r.type && e.test(r.prop)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("decl" === r.type && r.prop === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("decl" === e.type) return t(e, r)
            }))
        }
        walkRules(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("rule" === r.type && e.test(r.selector)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("rule" === r.type && r.selector === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("rule" === e.type) return t(e, r)
            }))
        }
        get first() {
            if (this.proxyOf.nodes) return this.proxyOf.nodes[0]
        }
        get last() {
            if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
        }
    };
    t3.registerParse = e => {
        n = e
    }, t3.registerRule = e => {
        i = e
    }, t3.registerAtRule = e => {
        s = e
    }, t3.registerRoot = e => {
        o = e
    }, t3.default = t3, t3.rebuild = e => {
        "atrule" === e.type ? Object.setPrototypeOf(e, s.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, i.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, tI.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, tQ.prototype) : "root" === e.type && Object.setPrototypeOf(e, o.prototype), e[t1] = !0, e.nodes && e.nodes.forEach(e => {
            t3.rebuild(e)
        })
    };
    let t5 = t3,
        t8 = class extends t5 {
            constructor(e) {
                super({
                    type: "document",
                    ...e
                }), this.nodes || (this.nodes = [])
            }
            toResult(e = {}) {
                return new a(new l, this, e).stringify()
            }
        };
    t8.registerLazyResult = e => {
        a = e
    }, t8.registerProcessor = e => {
        l = e
    }, t8.default = t8;
    let t4 = class {
        constructor(e, t = {}) {
            if (this.type = "warning", this.text = e, t.node && t.node.source) {
                let e = t.node.rangeBy(t);
                this.line = e.start.line, this.column = e.start.column, this.endLine = e.end.line, this.endColumn = e.end.column
            }
            for (let e in t) this[e] = t[e]
        }
        toString() {
            return this.node ? this.node.error(this.text, {
                index: this.index,
                plugin: this.plugin,
                word: this.word
            }).message : this.plugin ? this.plugin + ": " + this.text : this.text
        }
    };
    t4.default = t4;
    let t9 = class {
        constructor(e, t, r) {
            this.processor = e, this.messages = [], this.root = t, this.opts = r, this.css = void 0, this.map = void 0
        }
        toString() {
            return this.css
        }
        warn(e, t = {}) {
            !t.plugin && this.lastPlugin && this.lastPlugin.postcssPlugin && (t.plugin = this.lastPlugin.postcssPlugin);
            let r = new t4(e, t);
            return this.messages.push(r), r
        }
        warnings() {
            return this.messages.filter(e => "warning" === e.type)
        }
        get content() {
            return this.css
        }
    };
    t9.default = t9;
    let t6 = /[\t\n\f\r "#'()/;[\\\]{}]/g,
        t7 = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,
        re = /.[\r\n"'(/\\]/,
        rt = /[\da-f]/i,
        rr = t3,
        rn = class extends rr {
            constructor(e) {
                super(e), this.type = "atrule"
            }
            append(...e) {
                return this.proxyOf.nodes || (this.nodes = []), super.append(...e)
            }
            prepend(...e) {
                return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e)
            }
        };
    rn.default = rn, rr.registerAtRule(rn);
    let ri = t3,
        rs = class extends ri {
            constructor(e) {
                super(e), this.type = "root", this.nodes || (this.nodes = [])
            }
            normalize(e, t, r) {
                let n = super.normalize(e);
                if (t) {
                    if ("prepend" === r) this.nodes.length > 1 ? t.raws.before = this.nodes[1].raws.before : delete t.raws.before;
                    else if (this.first !== t)
                        for (let e of n) e.raws.before = t.raws.before
                }
                return n
            }
            removeChild(e, t) {
                let r = this.index(e);
                return !t && 0 === r && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[r].raws.before), super.removeChild(e)
            }
            toResult(e = {}) {
                return new h(new c, this, e).stringify()
            }
        };
    rs.registerLazyResult = e => {
        h = e
    }, rs.registerProcessor = e => {
        c = e
    }, rs.default = rs, ri.registerRoot(rs);
    let ro = {
        comma: e => ro.split(e, [","], !0),
        space: e => ro.split(e, [" ", "\n", "	"]),
        split(e, t, r) {
            let n = [],
                i = "",
                s = !1,
                o = 0,
                a = !1,
                l = "",
                h = !1;
            for (let r of e) h ? h = !1 : "\\" === r ? h = !0 : a ? r === l && (a = !1) : '"' === r || "'" === r ? (a = !0, l = r) : "(" === r ? o += 1 : ")" === r ? o > 0 && (o -= 1) : 0 === o && t.includes(r) && (s = !0), s ? ("" !== i && n.push(i.trim()), i = "", s = !1) : i += r;
            return (r || "" !== i) && n.push(i.trim()), n
        }
    };
    ro.default = ro;
    let ra = t3,
        rl = class extends ra {
            constructor(e) {
                super(e), this.type = "rule", this.nodes || (this.nodes = [])
            }
            get selectors() {
                return ro.comma(this.selector)
            }
            set selectors(e) {
                let t = this.selector ? this.selector.match(/,\s*/) : null,
                    r = t ? t[0] : "," + this.raw("between", "beforeOpen");
                this.selector = e.join(r)
            }
        };
    rl.default = rl, ra.registerRule(rl);
    let rh = function(e, t = {}) {
            let r, n, i, s, o, a, l, h, c, u, d = e.css.valueOf(),
                p = t.ignoreErrors,
                f = d.length,
                g = 0,
                m = [],
                y = [];

            function v(t) {
                throw e.error("Unclosed " + t, g)
            }
            return {
                back: function(e) {
                    y.push(e)
                },
                endOfFile: function() {
                    return 0 === y.length && g >= f
                },
                nextToken: function(e) {
                    if (y.length) return y.pop();
                    if (g >= f) return;
                    let t = !!e && e.ignoreUnclosed;
                    switch (r = d.charCodeAt(g)) {
                        case 10:
                        case 32:
                        case 9:
                        case 13:
                        case 12:
                            n = g;
                            do n += 1, r = d.charCodeAt(n); while (32 === r || 10 === r || 9 === r || 13 === r || 12 === r) u = ["space", d.slice(g, n)], g = n - 1;
                            break;
                        case 91:
                        case 93:
                        case 123:
                        case 125:
                        case 58:
                        case 59:
                        case 41:
                            {
                                let e = String.fromCharCode(r);u = [e, e, g];
                                break
                            }
                        case 40:
                            if (h = m.length ? m.pop()[1] : "", c = d.charCodeAt(g + 1), "url" === h && 39 !== c && 34 !== c && 32 !== c && 10 !== c && 9 !== c && 12 !== c && 13 !== c) {
                                n = g;
                                do {
                                    if (a = !1, -1 === (n = d.indexOf(")", n + 1)))
                                        if (p || t) {
                                            n = g;
                                            break
                                        } else v("bracket");
                                    for (l = n; 92 === d.charCodeAt(l - 1);) l -= 1, a = !a
                                } while (a) u = ["brackets", d.slice(g, n + 1), g, n], g = n
                            } else n = d.indexOf(")", g + 1), s = d.slice(g, n + 1), -1 === n || re.test(s) ? u = ["(", "(", g] : (u = ["brackets", s, g, n], g = n);
                            break;
                        case 39:
                        case 34:
                            i = 39 === r ? "'" : '"', n = g;
                            do {
                                if (a = !1, -1 === (n = d.indexOf(i, n + 1)))
                                    if (p || t) {
                                        n = g + 1;
                                        break
                                    } else v("string");
                                for (l = n; 92 === d.charCodeAt(l - 1);) l -= 1, a = !a
                            } while (a) u = ["string", d.slice(g, n + 1), g, n], g = n;
                            break;
                        case 64:
                            t6.lastIndex = g + 1, t6.test(d), n = 0 === t6.lastIndex ? d.length - 1 : t6.lastIndex - 2, u = ["at-word", d.slice(g, n + 1), g, n], g = n;
                            break;
                        case 92:
                            for (n = g, o = !0; 92 === d.charCodeAt(n + 1);) n += 1, o = !o;
                            if (r = d.charCodeAt(n + 1), o && 47 !== r && 32 !== r && 10 !== r && 9 !== r && 13 !== r && 12 !== r && (n += 1, rt.test(d.charAt(n)))) {
                                for (; rt.test(d.charAt(n + 1));) n += 1;
                                32 === d.charCodeAt(n + 1) && (n += 1)
                            }
                            u = ["word", d.slice(g, n + 1), g, n], g = n;
                            break;
                        default:
                            47 === r && 42 === d.charCodeAt(g + 1) ? (0 === (n = d.indexOf("*/", g + 2) + 1) && (p || t ? n = d.length : v("comment")), u = ["comment", d.slice(g, n + 1), g, n]) : (t7.lastIndex = g + 1, t7.test(d), n = 0 === t7.lastIndex ? d.length - 1 : t7.lastIndex - 2, u = ["word", d.slice(g, n + 1), g, n], m.push(u)), g = n
                    }
                    return g++, u
                },
                position: function() {
                    return g
                }
            }
        },
        rc = {
            empty: !0,
            space: !0
        },
        ru = class {
            constructor(e) {
                this.input = e, this.root = new rs, this.current = this.root, this.spaces = "", this.semicolon = !1, this.createTokenizer(), this.root.source = {
                    input: e,
                    start: {
                        column: 1,
                        line: 1,
                        offset: 0
                    }
                }
            }
            atrule(e) {
                let t, r, n, i = new rn;
                i.name = e[1].slice(1), "" === i.name && this.unnamedAtrule(i, e), this.init(i, e[2]);
                let s = !1,
                    o = !1,
                    a = [],
                    l = [];
                for (; !this.tokenizer.endOfFile();) {
                    if ("(" === (t = (e = this.tokenizer.nextToken())[0]) || "[" === t ? l.push("(" === t ? ")" : "]") : "{" === t && l.length > 0 ? l.push("}") : t === l[l.length - 1] && l.pop(), 0 === l.length)
                        if (";" === t) {
                            i.source.end = this.getPosition(e[2]), i.source.end.offset++, this.semicolon = !0;
                            break
                        } else if ("{" === t) {
                        o = !0;
                        break
                    } else if ("}" === t) {
                        if (a.length > 0) {
                            for (n = a.length - 1, r = a[n]; r && "space" === r[0];) r = a[--n];
                            r && (i.source.end = this.getPosition(r[3] || r[2]), i.source.end.offset++)
                        }
                        this.end(e);
                        break
                    } else a.push(e);
                    else a.push(e);
                    if (this.tokenizer.endOfFile()) {
                        s = !0;
                        break
                    }
                }
                i.raws.between = this.spacesAndCommentsFromEnd(a), a.length ? (i.raws.afterName = this.spacesAndCommentsFromStart(a), this.raw(i, "params", a), s && (e = a[a.length - 1], i.source.end = this.getPosition(e[3] || e[2]), i.source.end.offset++, this.spaces = i.raws.between, i.raws.between = "")) : (i.raws.afterName = "", i.params = ""), o && (i.nodes = [], this.current = i)
            }
            checkMissedSemicolon(e) {
                let t, r = this.colon(e);
                if (!1 === r) return;
                let n = 0;
                for (let i = r - 1; i >= 0 && ("space" === (t = e[i])[0] || 2 !== (n += 1)); i--);
                throw this.input.error("Missed semicolon", "word" === t[0] ? t[3] + 1 : t[2])
            }
            colon(e) {
                let t, r, n = 0;
                for (let [i, s] of e.entries()) {
                    if ("(" === (t = s[0]) && (n += 1), ")" === t && (n -= 1), 0 === n && ":" === t)
                        if (r)
                            if ("word" === r[0] && "progid" === r[1]) continue;
                            else return i;
                    else this.doubleColon(s);
                    r = s
                }
                return !1
            }
            comment(e) {
                let t = new tQ;
                this.init(t, e[2]), t.source.end = this.getPosition(e[3] || e[2]), t.source.end.offset++;
                let r = e[1].slice(2, -2);
                if (/^\s*$/.test(r)) t.text = "", t.raws.left = r, t.raws.right = "";
                else {
                    let e = r.match(/^(\s*)([^]*\S)(\s*)$/);
                    t.text = e[2], t.raws.left = e[1], t.raws.right = e[3]
                }
            }
            createTokenizer() {
                this.tokenizer = rh(this.input)
            }
            decl(e, t) {
                let r, n, i = new tI;
                this.init(i, e[0][2]);
                let s = e[e.length - 1];
                for (";" === s[0] && (this.semicolon = !0, e.pop()), i.source.end = this.getPosition(s[3] || s[2] || function(e) {
                        for (let t = e.length - 1; t >= 0; t--) {
                            let r = e[t],
                                n = r[3] || r[2];
                            if (n) return n
                        }
                    }(e)), i.source.end.offset++;
                    "word" !== e[0][0];) 1 === e.length && this.unknownWord(e), i.raws.before += e.shift()[1];
                for (i.source.start = this.getPosition(e[0][2]), i.prop = ""; e.length;) {
                    let t = e[0][0];
                    if (":" === t || "space" === t || "comment" === t) break;
                    i.prop += e.shift()[1]
                }
                for (i.raws.between = ""; e.length;) {
                    if (":" === (r = e.shift())[0]) {
                        i.raws.between += r[1];
                        break
                    }
                    "word" === r[0] && /\w/.test(r[1]) && this.unknownWord([r]), i.raws.between += r[1]
                }("_" === i.prop[0] || "*" === i.prop[0]) && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1));
                let o = [];
                for (; e.length && ("space" === (n = e[0][0]) || "comment" === n);) o.push(e.shift());
                this.precheckMissedSemicolon(e);
                for (let t = e.length - 1; t >= 0; t--) {
                    if ("!important" === (r = e[t])[1].toLowerCase()) {
                        i.important = !0;
                        let r = this.stringFrom(e, t);
                        " !important" !== (r = this.spacesFromEnd(e) + r) && (i.raws.important = r);
                        break
                    }
                    if ("important" === r[1].toLowerCase()) {
                        let r = e.slice(0),
                            n = "";
                        for (let e = t; e > 0; e--) {
                            let t = r[e][0];
                            if (0 === n.trim().indexOf("!") && "space" !== t) break;
                            n = r.pop()[1] + n
                        }
                        0 === n.trim().indexOf("!") && (i.important = !0, i.raws.important = n, e = r)
                    }
                    if ("space" !== r[0] && "comment" !== r[0]) break
                }
                e.some(e => "space" !== e[0] && "comment" !== e[0]) && (i.raws.between += o.map(e => e[1]).join(""), o = []), this.raw(i, "value", o.concat(e), t), i.value.includes(":") && !t && this.checkMissedSemicolon(e)
            }
            doubleColon(e) {
                throw this.input.error("Double colon", {
                    offset: e[2]
                }, {
                    offset: e[2] + e[1].length
                })
            }
            emptyRule(e) {
                let t = new rl;
                this.init(t, e[2]), t.selector = "", t.raws.between = "", this.current = t
            }
            end(e) {
                this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.semicolon = !1, this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.spaces = "", this.current.parent ? (this.current.source.end = this.getPosition(e[2]), this.current.source.end.offset++, this.current = this.current.parent) : this.unexpectedClose(e)
            }
            endFile() {
                this.current.parent && this.unclosedBlock(), this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.root.source.end = this.getPosition(this.tokenizer.position())
            }
            freeSemicolon(e) {
                if (this.spaces += e[1], this.current.nodes) {
                    let e = this.current.nodes[this.current.nodes.length - 1];
                    e && "rule" === e.type && !e.raws.ownSemicolon && (e.raws.ownSemicolon = this.spaces, this.spaces = "")
                }
            }
            getPosition(e) {
                let t = this.input.fromOffset(e);
                return {
                    column: t.col,
                    line: t.line,
                    offset: e
                }
            }
            init(e, t) {
                this.current.push(e), e.source = {
                    input: this.input,
                    start: this.getPosition(t)
                }, e.raws.before = this.spaces, this.spaces = "", "comment" !== e.type && (this.semicolon = !1)
            }
            other(e) {
                let t = !1,
                    r = null,
                    n = !1,
                    i = null,
                    s = [],
                    o = e[1].startsWith("--"),
                    a = [],
                    l = e;
                for (; l;) {
                    if (r = l[0], a.push(l), "(" === r || "[" === r) i || (i = l), s.push("(" === r ? ")" : "]");
                    else if (o && n && "{" === r) i || (i = l), s.push("}");
                    else if (0 === s.length)
                        if (";" === r)
                            if (n) return void this.decl(a, o);
                            else break;
                    else if ("{" === r) return void this.rule(a);
                    else if ("}" === r) {
                        this.tokenizer.back(a.pop()), t = !0;
                        break
                    } else ":" === r && (n = !0);
                    else r === s[s.length - 1] && (s.pop(), 0 === s.length && (i = null));
                    l = this.tokenizer.nextToken()
                }
                if (this.tokenizer.endOfFile() && (t = !0), s.length > 0 && this.unclosedBracket(i), t && n) {
                    if (!o)
                        for (; a.length && ("space" === (l = a[a.length - 1][0]) || "comment" === l);) this.tokenizer.back(a.pop());
                    this.decl(a, o)
                } else this.unknownWord(a)
            }
            parse() {
                let e;
                for (; !this.tokenizer.endOfFile();) switch ((e = this.tokenizer.nextToken())[0]) {
                    case "space":
                        this.spaces += e[1];
                        break;
                    case ";":
                        this.freeSemicolon(e);
                        break;
                    case "}":
                        this.end(e);
                        break;
                    case "comment":
                        this.comment(e);
                        break;
                    case "at-word":
                        this.atrule(e);
                        break;
                    case "{":
                        this.emptyRule(e);
                        break;
                    default:
                        this.other(e)
                }
                this.endFile()
            }
            precheckMissedSemicolon() {}
            raw(e, t, r, n) {
                let i, s, o, a, l = r.length,
                    h = "",
                    c = !0;
                for (let e = 0; e < l; e += 1) "space" !== (s = (i = r[e])[0]) || e !== l - 1 || n ? "comment" === s ? (a = r[e - 1] ? r[e - 1][0] : "empty", o = r[e + 1] ? r[e + 1][0] : "empty", rc[a] || rc[o] || "," === h.slice(-1) ? c = !1 : h += i[1]) : h += i[1] : c = !1;
                if (!c) {
                    let n = r.reduce((e, t) => e + t[1], "");
                    e.raws[t] = {
                        raw: n,
                        value: h
                    }
                }
                e[t] = h
            }
            rule(e) {
                e.pop();
                let t = new rl;
                this.init(t, e[0][2]), t.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(t, "selector", e), this.current = t
            }
            spacesAndCommentsFromEnd(e) {
                let t, r = "";
                for (; e.length && ("space" === (t = e[e.length - 1][0]) || "comment" === t);) r = e.pop()[1] + r;
                return r
            }
            spacesAndCommentsFromStart(e) {
                let t, r = "";
                for (; e.length && ("space" === (t = e[0][0]) || "comment" === t);) r += e.shift()[1];
                return r
            }
            spacesFromEnd(e) {
                let t = "";
                for (; e.length && "space" === e[e.length - 1][0];) t = e.pop()[1] + t;
                return t
            }
            stringFrom(e, t) {
                let r = "";
                for (let n = t; n < e.length; n++) r += e[n][1];
                return e.splice(t, e.length - t), r
            }
            unclosedBlock() {
                let e = this.current.source.start;
                throw this.input.error("Unclosed block", e.line, e.column)
            }
            unclosedBracket(e) {
                throw this.input.error("Unclosed bracket", {
                    offset: e[2]
                }, {
                    offset: e[2] + 1
                })
            }
            unexpectedClose(e) {
                throw this.input.error("Unexpected }", {
                    offset: e[2]
                }, {
                    offset: e[2] + 1
                })
            }
            unknownWord(e) {
                throw this.input.error("Unknown word", {
                    offset: e[0][2]
                }, {
                    offset: e[0][2] + e[0][1].length
                })
            }
            unnamedAtrule(e, t) {
                throw this.input.error("At-rule without name", {
                    offset: t[2]
                }, {
                    offset: t[2] + t[1].length
                })
            }
        };

    function rd(e, t) {
        let r = new ru(new tB(e, t));
        try {
            r.parse()
        } catch (e) {
            throw e
        }
        return r.root
    }
    rd.default = rd, t3.registerParse(rd);
    let {
        isClean: rp,
        my: rf
    } = tg, rg = {
        atrule: "AtRule",
        comment: "Comment",
        decl: "Declaration",
        document: "Document",
        root: "Root",
        rule: "Rule"
    }, rm = {
        AtRule: !0,
        AtRuleExit: !0,
        Comment: !0,
        CommentExit: !0,
        Declaration: !0,
        DeclarationExit: !0,
        Document: !0,
        DocumentExit: !0,
        Once: !0,
        OnceExit: !0,
        postcssPlugin: !0,
        prepare: !0,
        Root: !0,
        RootExit: !0,
        Rule: !0,
        RuleExit: !0
    }, ry = {
        Once: !0,
        postcssPlugin: !0,
        prepare: !0
    };

    function rv(e) {
        return "object" == typeof e && "function" == typeof e.then
    }

    function rw(e) {
        let t = !1,
            r = rg[e.type];
        return ("decl" === e.type ? t = e.prop.toLowerCase() : "atrule" === e.type && (t = e.name.toLowerCase()), t && e.append) ? [r, r + "-" + t, 0, r + "Exit", r + "Exit-" + t] : t ? [r, r + "-" + t, r + "Exit", r + "Exit-" + t] : e.append ? [r, 0, r + "Exit"] : [r, r + "Exit"]
    }

    function rb(e) {
        return {
            eventIndex: 0,
            events: "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : rw(e),
            iterator: 0,
            node: e,
            visitorIndex: 0,
            visitors: []
        }
    }

    function rS(e) {
        return e[rp] = !1, e.nodes && e.nodes.forEach(e => rS(e)), e
    }
    let rC = {},
        rI = class e {
            constructor(t, r, n) {
                let i;
                if (this.stringified = !1, this.processed = !1, "object" == typeof r && null !== r && ("root" === r.type || "document" === r.type)) i = rS(r);
                else if (r instanceof e || r instanceof t9) i = rS(r.root), r.map && (void 0 === n.map && (n.map = {}), n.map.inline || (n.map.inline = !1), n.map.prev = r.map);
                else {
                    let e = rd;
                    n.syntax && (e = n.syntax.parse), n.parser && (e = n.parser), e.parse && (e = e.parse);
                    try {
                        i = e(r, n)
                    } catch (e) {
                        this.processed = !0, this.error = e
                    }
                    i && !i[rf] && t3.rebuild(i)
                }
                this.result = new t9(t, i, n), this.helpers = { ...rC,
                    postcss: rC,
                    result: this.result
                }, this.plugins = this.processor.plugins.map(e => "object" == typeof e && e.prepare ? { ...e,
                    ...e.prepare(this.result)
                } : e)
            }
            async () {
                return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing)
            } catch (e) {
                return this.async().catch(e)
            } finally(e) {
                return this.async().then(e, e)
            }
            getAsyncError() {
                throw Error("Use process(css).then(cb) to work with async plugins")
            }
            handleError(e, t) {
                let r = this.result.lastPlugin;
                try {
                    t && t.addToError(e), this.error = e, "CssSyntaxError" !== e.name || e.plugin ? r.postcssVersion : (e.plugin = r.postcssPlugin, e.setMessage())
                } catch (e) {
                    console && console.error && console.error(e)
                }
                return e
            }
            prepareVisitors() {
                this.listeners = {};
                let e = (e, t, r) => {
                    this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push([e, r])
                };
                for (let t of this.plugins)
                    if ("object" == typeof t)
                        for (let r in t) {
                            if (!rm[r] && /^[A-Z]/.test(r)) throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
                            if (!ry[r])
                                if ("object" == typeof t[r])
                                    for (let n in t[r]) e(t, "*" === n ? r : r + "-" + n.toLowerCase(), t[r][n]);
                                else "function" == typeof t[r] && e(t, r, t[r])
                        }
                this.hasListener = Object.keys(this.listeners).length > 0
            }
            async runAsync() {
                this.plugin = 0;
                for (let e = 0; e < this.plugins.length; e++) {
                    let t = this.plugins[e],
                        r = this.runOnRoot(t);
                    if (rv(r)) try {
                        await r
                    } catch (e) {
                        throw this.handleError(e)
                    }
                }
                if (this.prepareVisitors(), this.hasListener) {
                    let e = this.result.root;
                    for (; !e[rp];) {
                        e[rp] = !0;
                        let t = [rb(e)];
                        for (; t.length > 0;) {
                            let e = this.visitTick(t);
                            if (rv(e)) try {
                                await e
                            } catch (r) {
                                let e = t[t.length - 1].node;
                                throw this.handleError(r, e)
                            }
                        }
                    }
                    if (this.listeners.OnceExit)
                        for (let [t, r] of this.listeners.OnceExit) {
                            this.result.lastPlugin = t;
                            try {
                                if ("document" === e.type) {
                                    let t = e.nodes.map(e => r(e, this.helpers));
                                    await Promise.all(t)
                                } else await r(e, this.helpers)
                            } catch (e) {
                                throw this.handleError(e)
                            }
                        }
                }
                return this.processed = !0, this.stringify()
            }
            runOnRoot(e) {
                this.result.lastPlugin = e;
                try {
                    if ("object" == typeof e && e.Once) {
                        if ("document" === this.result.root.type) {
                            let t = this.result.root.nodes.map(t => e.Once(t, this.helpers));
                            if (rv(t[0])) return Promise.all(t);
                            return t
                        }
                        return e.Once(this.result.root, this.helpers)
                    }
                    if ("function" == typeof e) return e(this.result.root, this.result)
                } catch (e) {
                    throw this.handleError(e)
                }
            }
            stringify() {
                if (this.error) throw this.error;
                if (this.stringified) return this.result;
                this.stringified = !0, this.sync();
                let e = this.result.opts,
                    t = tv;
                e.syntax && (t = e.syntax.stringify), e.stringifier && (t = e.stringifier), t.stringify && (t = t.stringify);
                let r = new tK(t, this.result.root, this.result.opts).generate();
                return this.result.css = r[0], this.result.map = r[1], this.result
            }
            sync() {
                if (this.error) throw this.error;
                if (this.processed) return this.result;
                if (this.processed = !0, this.processing) throw this.getAsyncError();
                for (let e of this.plugins)
                    if (rv(this.runOnRoot(e))) throw this.getAsyncError();
                if (this.prepareVisitors(), this.hasListener) {
                    let e = this.result.root;
                    for (; !e[rp];) e[rp] = !0, this.walkSync(e);
                    if (this.listeners.OnceExit)
                        if ("document" === e.type)
                            for (let t of e.nodes) this.visitSync(this.listeners.OnceExit, t);
                        else this.visitSync(this.listeners.OnceExit, e)
                }
                return this.result
            }
            then(e, t) {
                return this.async().then(e, t)
            }
            toString() {
                return this.css
            }
            visitSync(e, t) {
                for (let [r, n] of e) {
                    let e;
                    this.result.lastPlugin = r;
                    try {
                        e = n(t, this.helpers)
                    } catch (e) {
                        throw this.handleError(e, t.proxyOf)
                    }
                    if ("root" !== t.type && "document" !== t.type && !t.parent) return !0;
                    if (rv(e)) throw this.getAsyncError()
                }
            }
            visitTick(e) {
                let t = e[e.length - 1],
                    {
                        node: r,
                        visitors: n
                    } = t;
                if ("root" !== r.type && "document" !== r.type && !r.parent) return void e.pop();
                if (n.length > 0 && t.visitorIndex < n.length) {
                    let [e, i] = n[t.visitorIndex];
                    t.visitorIndex += 1, t.visitorIndex === n.length && (t.visitors = [], t.visitorIndex = 0), this.result.lastPlugin = e;
                    try {
                        return i(r.toProxy(), this.helpers)
                    } catch (e) {
                        throw this.handleError(e, r)
                    }
                }
                if (0 !== t.iterator) {
                    let n, i = t.iterator;
                    for (; n = r.nodes[r.indexes[i]];)
                        if (r.indexes[i] += 1, !n[rp]) {
                            n[rp] = !0, e.push(rb(n));
                            return
                        }
                    t.iterator = 0, delete r.indexes[i]
                }
                let i = t.events;
                for (; t.eventIndex < i.length;) {
                    let e = i[t.eventIndex];
                    if (t.eventIndex += 1, 0 === e) {
                        r.nodes && r.nodes.length && (r[rp] = !0, t.iterator = r.getIterator());
                        return
                    }
                    if (this.listeners[e]) {
                        t.visitors = this.listeners[e];
                        return
                    }
                }
                e.pop()
            }
            walkSync(e) {
                for (let t of (e[rp] = !0, rw(e)))
                    if (0 === t) e.nodes && e.each(e => {
                        e[rp] || this.walkSync(e)
                    });
                    else {
                        let r = this.listeners[t];
                        if (r && this.visitSync(r, e.toProxy())) return
                    }
            }
            warnings() {
                return this.sync().warnings()
            }
            get content() {
                return this.stringify().content
            }
            get css() {
                return this.stringify().css
            }
            get map() {
                return this.stringify().map
            }
            get messages() {
                return this.sync().messages
            }
            get opts() {
                return this.result.opts
            }
            get processor() {
                return this.result.processor
            }
            get root() {
                return this.sync().root
            }
            get[Symbol.toStringTag]() {
                return "LazyResult"
            }
        };
    rI.registerPostcss = e => {
        rC = e
    }, rI.default = rI, rs.registerLazyResult(rI), t8.registerLazyResult(rI);
    let rE = class {
        constructor(e, t, r) {
            let n;
            t = t.toString(), this.stringified = !1, this._processor = e, this._css = t, this._opts = r, this._map = void 0, this.result = new t9(this._processor, n, this._opts), this.result.css = t;
            let i = this;
            Object.defineProperty(this.result, "root", {
                get: () => i.root
            });
            let s = new tK(tv, n, this._opts, t);
            if (s.isMap()) {
                let [e, t] = s.generate();
                e && (this.result.css = e), t && (this.result.map = t)
            } else s.clearAnnotation(), this.result.css = s.css
        }
        async () {
            return this.error ? Promise.reject(this.error) : Promise.resolve(this.result)
        } catch (e) {
            return this.async().catch(e)
        } finally(e) {
            return this.async().then(e, e)
        }
        sync() {
            if (this.error) throw this.error;
            return this.result
        }
        then(e, t) {
            return this.async().then(e, t)
        }
        toString() {
            return this._css
        }
        warnings() {
            return []
        }
        get content() {
            return this.result.css
        }
        get css() {
            return this.result.css
        }
        get map() {
            return this.result.map
        }
        get messages() {
            return []
        }
        get opts() {
            return this.result.opts
        }
        get processor() {
            return this.result.processor
        }
        get root() {
            let e;
            if (this._root) return this._root;
            try {
                e = rd(this._css, this._opts)
            } catch (e) {
                this.error = e
            }
            if (!this.error) return this._root = e, e;
            throw this.error
        }
        get[Symbol.toStringTag]() {
            return "NoWorkResult"
        }
    };
    rE.default = rE;
    let rx = class {
        constructor(e = []) {
            this.version = "8.4.38", this.plugins = this.normalize(e)
        }
        normalize(e) {
            let t = [];
            for (let r of e)
                if (!0 === r.postcss ? r = r() : r.postcss && (r = r.postcss), "object" == typeof r && Array.isArray(r.plugins)) t = t.concat(r.plugins);
                else if ("object" == typeof r && r.postcssPlugin) t.push(r);
            else if ("function" == typeof r) t.push(r);
            else if ("object" == typeof r && (r.parse || r.stringify));
            else throw Error(r + " is not a PostCSS plugin");
            return t
        }
        process(e, t = {}) {
            return this.plugins.length || t.parser || t.stringifier || t.syntax ? new rI(this, e, t) : new rE(this, e, t)
        }
        use(e) {
            return this.plugins = this.plugins.concat(this.normalize([e])), this
        }
    };

    function rk(e, t) {
        if (Array.isArray(e)) return e.map(e => rk(e));
        let {
            inputs: r,
            ...n
        } = e;
        if (r)
            for (let e of (t = [], r)) {
                let r = { ...e,
                    __proto__: tB.prototype
                };
                r.map && (r.map = { ...r.map,
                    __proto__: tT.prototype
                }), t.push(r)
            }
        if (n.nodes && (n.nodes = e.nodes.map(e => rk(e, t))), n.source) {
            let {
                inputId: e,
                ...r
            } = n.source;
            n.source = r, null != e && (n.source.input = t[e])
        }
        if ("root" === n.type) return new rs(n);
        if ("decl" === n.type) return new tI(n);
        if ("rule" === n.type) return new rl(n);
        if ("comment" === n.type) return new tQ(n);
        if ("atrule" === n.type) return new rn(n);
        else throw Error("Unknown node type: " + e.type)
    }

    function rO(...e) {
        return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new rx(e)
    }
    rx.default = rx, rs.registerProcessor(rx), t8.registerProcessor(rx), rk.default = rk, rO.plugin = function(e, t) {
        let r, n = !1;

        function i(...r) {
            console && console.warn && !n && (n = !0, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), ex.default.env.LANG && ex.default.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
            let s = t(...r);
            return s.postcssPlugin = e, s.postcssVersion = new rx().version, s
        }
        return Object.defineProperty(i, "postcss", {
            get: () => (r || (r = i()), r)
        }), i.process = function(e, t, r) {
            return rO([i(r)]).process(e, t)
        }, i
    }, rO.stringify = tv, rO.parse = rd, rO.fromJSON = rk, rO.list = ro, rO.comment = e => new tQ(e), rO.atRule = e => new rn(e), rO.decl = e => new tI(e), rO.rule = e => new rl(e), rO.root = e => new rs(e), rO.document = e => new t8(e), rO.CssSyntaxError = tf, rO.Declaration = tI, rO.Container = t3, rO.Processor = rx, rO.Document = t8, rO.Comment = tQ, rO.Warning = t4, rO.AtRule = rn, rO.Result = t9, rO.Input = tB, rO.Rule = rl, rO.Root = rs, rO.Node = tS, rI.registerPostcss(rO), rO.default = rO;
    let rM = rO && rO.__esModule && Object.prototype.hasOwnProperty.call(rO, "default") ? rO.default : rO;
    rM.stringify, rM.fromJSON, rM.plugin, rM.parse, rM.list, rM.document, rM.comment, rM.atRule, rM.rule, rM.decl, rM.root, rM.CssSyntaxError, rM.Declaration, rM.Container, rM.Processor, rM.Document, rM.Comment, rM.Warning, rM.AtRule, rM.Result, rM.Input, rM.Rule, rM.Root, rM.Node;
    var rR = Object.defineProperty,
        rT = (e, t, r) => {
            let n;
            return (n = "symbol" != typeof t ? t + "" : t) in e ? rR(e, n, {
                enumerable: !0,
                configurable: !0,
                writable: !0,
                value: r
            }) : e[n] = r
        },
        rA = {
            exports: {}
        },
        rN = String,
        rL = function() {
            return {
                isColorSupported: !1,
                reset: rN,
                bold: rN,
                dim: rN,
                italic: rN,
                underline: rN,
                inverse: rN,
                hidden: rN,
                strikethrough: rN,
                black: rN,
                red: rN,
                green: rN,
                yellow: rN,
                blue: rN,
                magenta: rN,
                cyan: rN,
                white: rN,
                gray: rN,
                bgBlack: rN,
                bgRed: rN,
                bgGreen: rN,
                bgYellow: rN,
                bgBlue: rN,
                bgMagenta: rN,
                bgCyan: rN,
                bgWhite: rN
            }
        };
    rA.exports = rL(), rA.exports.createColors = rL;
    var rD = rA.exports;
    let rP = function(e) {
            if (e.__esModule) return e;
            var t = e.default;
            if ("function" == typeof t) {
                var r = function e() {
                    return this instanceof e ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments)
                };
                r.prototype = t.prototype
            } else r = {};
            return Object.defineProperty(r, "__esModule", {
                value: !0
            }), Object.keys(e).forEach(function(t) {
                var n = Object.getOwnPropertyDescriptor(e, t);
                Object.defineProperty(r, t, n.get ? n : {
                    enumerable: !0,
                    get: function() {
                        return e[t]
                    }
                })
            }), r
        }(Object.freeze(Object.defineProperty({
            __proto__: null,
            default: {}
        }, Symbol.toStringTag, {
            value: "Module"
        }))),
        r_ = class e extends Error {
            constructor(t, r, n, i, s, o) {
                super(t), this.name = "CssSyntaxError", this.reason = t, s && (this.file = s), i && (this.source = i), o && (this.plugin = o), void 0 !== r && void 0 !== n && ("number" == typeof r ? (this.line = r, this.column = n) : (this.line = r.line, this.column = r.column, this.endLine = n.line, this.endColumn = n.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, e)
            }
            setMessage() {
                this.message = this.plugin ? this.plugin + ": " : "", this.message += this.file ? this.file : "<css input>", void 0 !== this.line && (this.message += ":" + this.line + ":" + this.column), this.message += ": " + this.reason
            }
            showSourceCode(e) {
                let t, r;
                if (!this.source) return "";
                let n = this.source;
                null == e && (e = rD.isColorSupported), rP && e && (n = rP(n));
                let i = n.split(/\r?\n/),
                    s = Math.max(this.line - 3, 0),
                    o = Math.min(this.line + 2, i.length),
                    a = String(o).length;
                if (e) {
                    let {
                        bold: e,
                        gray: n,
                        red: i
                    } = rD.createColors(!0);
                    t = t => e(i(t)), r = e => n(e)
                } else t = r = e => e;
                return i.slice(s, o).map((e, n) => {
                    let i = s + 1 + n,
                        o = " " + (" " + i).slice(-a) + " | ";
                    if (i === this.line) {
                        let n = r(o.replace(/\d/g, " ")) + e.slice(0, this.column - 1).replace(/[^\t]/g, " ");
                        return t(">") + r(o) + e + "\n " + n + t("^")
                    }
                    return " " + r(o) + e
                }).join("\n")
            }
            toString() {
                let e = this.showSourceCode();
                return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e
            }
        };
    r_.default = r_;
    var rF = {};
    rF.isClean = Symbol("isClean"), rF.my = Symbol("my");
    let rz = {
            after: "\n",
            beforeClose: "\n",
            beforeComment: "\n",
            beforeDecl: "\n",
            beforeOpen: " ",
            beforeRule: "\n",
            colon: ": ",
            commentLeft: " ",
            commentRight: " ",
            emptyBody: "",
            indent: "    ",
            semicolon: !1
        },
        rU = class {
            constructor(e) {
                this.builder = e
            }
            atrule(e, t) {
                let r = "@" + e.name,
                    n = e.params ? this.rawValue(e, "params") : "";
                if (void 0 !== e.raws.afterName ? r += e.raws.afterName : n && (r += " "), e.nodes) this.block(e, r + n);
                else {
                    let i = (e.raws.between || "") + (t ? ";" : "");
                    this.builder(r + n + i, e)
                }
            }
            beforeAfter(e, t) {
                let r;
                r = "decl" === e.type ? this.raw(e, null, "beforeDecl") : "comment" === e.type ? this.raw(e, null, "beforeComment") : "before" === t ? this.raw(e, null, "beforeRule") : this.raw(e, null, "beforeClose");
                let n = e.parent,
                    i = 0;
                for (; n && "root" !== n.type;) i += 1, n = n.parent;
                if (r.includes("\n")) {
                    let t = this.raw(e, null, "indent");
                    if (t.length)
                        for (let e = 0; e < i; e++) r += t
                }
                return r
            }
            block(e, t) {
                let r, n = this.raw(e, "between", "beforeOpen");
                this.builder(t + n + "{", e, "start"), e.nodes && e.nodes.length ? (this.body(e), r = this.raw(e, "after")) : r = this.raw(e, "after", "emptyBody"), r && this.builder(r), this.builder("}", e, "end")
            }
            body(e) {
                let t = e.nodes.length - 1;
                for (; t > 0 && "comment" === e.nodes[t].type;) t -= 1;
                let r = this.raw(e, "semicolon");
                for (let n = 0; n < e.nodes.length; n++) {
                    let i = e.nodes[n],
                        s = this.raw(i, "before");
                    s && this.builder(s), this.stringify(i, t !== n || r)
                }
            }
            comment(e) {
                let t = this.raw(e, "left", "commentLeft"),
                    r = this.raw(e, "right", "commentRight");
                this.builder("/*" + t + e.text + r + "*/", e)
            }
            decl(e, t) {
                let r = this.raw(e, "between", "colon"),
                    n = e.prop + r + this.rawValue(e, "value");
                e.important && (n += e.raws.important || " !important"), t && (n += ";"), this.builder(n, e)
            }
            document(e) {
                this.body(e)
            }
            raw(e, t, r) {
                let n;
                if (r || (r = t), t && void 0 !== (n = e.raws[t])) return n;
                let i = e.parent;
                if ("before" === r && (!i || "root" === i.type && i.first === e || i && "document" === i.type)) return "";
                if (!i) return rz[r];
                let s = e.root();
                if (s.rawCache || (s.rawCache = {}), void 0 !== s.rawCache[r]) return s.rawCache[r];
                if ("before" === r || "after" === r) return this.beforeAfter(e, r); {
                    var o;
                    let i = "raw" + ((o = r)[0].toUpperCase() + o.slice(1));
                    this[i] ? n = this[i](s, e) : s.walk(e => {
                        if (void 0 !== (n = e.raws[t])) return !1
                    })
                }
                return void 0 === n && (n = rz[r]), s.rawCache[r] = n, n
            }
            rawBeforeClose(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && e.nodes.length > 0 && void 0 !== e.raws.after) return (t = e.raws.after).includes("\n") && (t = t.replace(/[^\n]+$/, "")), !1
                }), t && (t = t.replace(/\S/g, "")), t
            }
            rawBeforeComment(e, t) {
                let r;
                return e.walkComments(e => {
                    if (void 0 !== e.raws.before) return (r = e.raws.before).includes("\n") && (r = r.replace(/[^\n]+$/, "")), !1
                }), void 0 === r ? r = this.raw(t, null, "beforeDecl") : r && (r = r.replace(/\S/g, "")), r
            }
            rawBeforeDecl(e, t) {
                let r;
                return e.walkDecls(e => {
                    if (void 0 !== e.raws.before) return (r = e.raws.before).includes("\n") && (r = r.replace(/[^\n]+$/, "")), !1
                }), void 0 === r ? r = this.raw(t, null, "beforeRule") : r && (r = r.replace(/\S/g, "")), r
            }
            rawBeforeOpen(e) {
                let t;
                return e.walk(e => {
                    if ("decl" !== e.type && void 0 !== (t = e.raws.between)) return !1
                }), t
            }
            rawBeforeRule(e) {
                let t;
                return e.walk(r => {
                    if (r.nodes && (r.parent !== e || e.first !== r) && void 0 !== r.raws.before) return (t = r.raws.before).includes("\n") && (t = t.replace(/[^\n]+$/, "")), !1
                }), t && (t = t.replace(/\S/g, "")), t
            }
            rawColon(e) {
                let t;
                return e.walkDecls(e => {
                    if (void 0 !== e.raws.between) return t = e.raws.between.replace(/[^\s:]/g, ""), !1
                }), t
            }
            rawEmptyBody(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && 0 === e.nodes.length && void 0 !== (t = e.raws.after)) return !1
                }), t
            }
            rawIndent(e) {
                let t;
                return e.raws.indent ? e.raws.indent : (e.walk(r => {
                    let n = r.parent;
                    if (n && n !== e && n.parent && n.parent === e && void 0 !== r.raws.before) {
                        let e = r.raws.before.split("\n");
                        return t = (t = e[e.length - 1]).replace(/\S/g, ""), !1
                    }
                }), t)
            }
            rawSemicolon(e) {
                let t;
                return e.walk(e => {
                    if (e.nodes && e.nodes.length && "decl" === e.last.type && void 0 !== (t = e.raws.semicolon)) return !1
                }), t
            }
            rawValue(e, t) {
                let r = e[t],
                    n = e.raws[t];
                return n && n.value === r ? n.raw : r
            }
            root(e) {
                this.body(e), e.raws.after && this.builder(e.raws.after)
            }
            rule(e) {
                this.block(e, this.rawValue(e, "selector")), e.raws.ownSemicolon && this.builder(e.raws.ownSemicolon, e, "end")
            }
            stringify(e, t) {
                if (!this[e.type]) throw Error("Unknown AST node type " + e.type + ". Maybe you need to change PostCSS stringifier.");
                this[e.type](e, t)
            }
        };

    function rj(e, t) {
        new rU(t).stringify(e)
    }
    rU.default = rU, rj.default = rj;
    let {
        isClean: rB,
        my: rH
    } = rF, rW = class {
        constructor(e = {}) {
            for (let t in this.raws = {}, this[rB] = !1, this[rH] = !0, e)
                if ("nodes" === t)
                    for (let r of (this.nodes = [], e[t])) "function" == typeof r.clone ? this.append(r.clone()) : this.append(r);
                else this[t] = e[t]
        }
        addToError(e) {
            if (e.postcssNode = this, e.stack && this.source && /\n\s{4}at /.test(e.stack)) {
                let t = this.source;
                e.stack = e.stack.replace(/\n\s{4}at /, `$&${t.input.from}:${t.start.line}:${t.start.column}$&`)
            }
            return e
        }
        after(e) {
            return this.parent.insertAfter(this, e), this
        }
        assign(e = {}) {
            for (let t in e) this[t] = e[t];
            return this
        }
        before(e) {
            return this.parent.insertBefore(this, e), this
        }
        cleanRaws(e) {
            delete this.raws.before, delete this.raws.after, e || delete this.raws.between
        }
        clone(e = {}) {
            let t = function e(t, r) {
                let n = new t.constructor;
                for (let i in t) {
                    if (!Object.prototype.hasOwnProperty.call(t, i) || "proxyCache" === i) continue;
                    let s = t[i],
                        o = typeof s;
                    "parent" === i && "object" === o ? r && (n[i] = r) : "source" === i ? n[i] = s : Array.isArray(s) ? n[i] = s.map(t => e(t, n)) : ("object" === o && null !== s && (s = e(s)), n[i] = s)
                }
                return n
            }(this);
            for (let r in e) t[r] = e[r];
            return t
        }
        cloneAfter(e = {}) {
            let t = this.clone(e);
            return this.parent.insertAfter(this, t), t
        }
        cloneBefore(e = {}) {
            let t = this.clone(e);
            return this.parent.insertBefore(this, t), t
        }
        error(e, t = {}) {
            if (this.source) {
                let {
                    end: r,
                    start: n
                } = this.rangeBy(t);
                return this.source.input.error(e, {
                    column: n.column,
                    line: n.line
                }, {
                    column: r.column,
                    line: r.line
                }, t)
            }
            return new r_(e)
        }
        getProxyProcessor() {
            return {
                get: (e, t) => "proxyOf" === t ? e : "root" === t ? () => e.root().toProxy() : e[t],
                set: (e, t, r) => e[t] === r || (e[t] = r, ("prop" === t || "value" === t || "name" === t || "params" === t || "important" === t || "text" === t) && e.markDirty(), !0)
            }
        }
        markDirty() {
            if (this[rB]) {
                this[rB] = !1;
                let e = this;
                for (; e = e.parent;) e[rB] = !1
            }
        }
        next() {
            if (!this.parent) return;
            let e = this.parent.index(this);
            return this.parent.nodes[e + 1]
        }
        positionBy(e, t) {
            let r = this.source.start;
            if (e.index) r = this.positionInside(e.index, t);
            else if (e.word) {
                let n = (t = this.toString()).indexOf(e.word); - 1 !== n && (r = this.positionInside(n, t))
            }
            return r
        }
        positionInside(e, t) {
            let r = t || this.toString(),
                n = this.source.start.column,
                i = this.source.start.line;
            for (let t = 0; t < e; t++) "\n" === r[t] ? (n = 1, i += 1) : n += 1;
            return {
                column: n,
                line: i
            }
        }
        prev() {
            if (!this.parent) return;
            let e = this.parent.index(this);
            return this.parent.nodes[e - 1]
        }
        rangeBy(e) {
            let t = {
                    column: this.source.start.column,
                    line: this.source.start.line
                },
                r = this.source.end ? {
                    column: this.source.end.column + 1,
                    line: this.source.end.line
                } : {
                    column: t.column + 1,
                    line: t.line
                };
            if (e.word) {
                let n = this.toString(),
                    i = n.indexOf(e.word); - 1 !== i && (t = this.positionInside(i, n), r = this.positionInside(i + e.word.length, n))
            } else e.start ? t = {
                column: e.start.column,
                line: e.start.line
            } : e.index && (t = this.positionInside(e.index)), e.end ? r = {
                column: e.end.column,
                line: e.end.line
            } : "number" == typeof e.endIndex ? r = this.positionInside(e.endIndex) : e.index && (r = this.positionInside(e.index + 1));
            return (r.line < t.line || r.line === t.line && r.column <= t.column) && (r = {
                column: t.column + 1,
                line: t.line
            }), {
                end: r,
                start: t
            }
        }
        raw(e, t) {
            return new rU().raw(this, e, t)
        }
        remove() {
            return this.parent && this.parent.removeChild(this), this.parent = void 0, this
        }
        replaceWith(...e) {
            if (this.parent) {
                let t = this,
                    r = !1;
                for (let n of e) n === this ? r = !0 : r ? (this.parent.insertAfter(t, n), t = n) : this.parent.insertBefore(t, n);
                r || this.remove()
            }
            return this
        }
        root() {
            let e = this;
            for (; e.parent && "document" !== e.parent.type;) e = e.parent;
            return e
        }
        toJSON(e, t) {
            let r = {},
                n = null == t;
            t = t || new Map;
            let i = 0;
            for (let e in this) {
                if (!Object.prototype.hasOwnProperty.call(this, e) || "parent" === e || "proxyCache" === e) continue;
                let n = this[e];
                if (Array.isArray(n)) r[e] = n.map(e => "object" == typeof e && e.toJSON ? e.toJSON(null, t) : e);
                else if ("object" == typeof n && n.toJSON) r[e] = n.toJSON(null, t);
                else if ("source" === e) {
                    let s = t.get(n.input);
                    null == s && (s = i, t.set(n.input, i), i++), r[e] = {
                        end: n.end,
                        inputId: s,
                        start: n.start
                    }
                } else r[e] = n
            }
            return n && (r.inputs = [...t.keys()].map(e => e.toJSON())), r
        }
        toProxy() {
            return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache
        }
        toString(e = rj) {
            e.stringify && (e = e.stringify);
            let t = "";
            return e(this, e => {
                t += e
            }), t
        }
        warn(e, t, r) {
            let n = {
                node: this
            };
            for (let e in r) n[e] = r[e];
            return e.warn(t, n)
        }
        get proxyOf() {
            return this
        }
    };
    rW.default = rW;
    let rV = rW,
        rG = class extends rV {
            constructor(e) {
                e && void 0 !== e.value && "string" != typeof e.value && (e = { ...e,
                    value: String(e.value)
                }), super(e), this.type = "decl"
            }
            get variable() {
                return this.prop.startsWith("--") || "$" === this.prop[0]
            }
        };
    rG.default = rG;
    let {
        SourceMapConsumer: rZ,
        SourceMapGenerator: rY
    } = rP, {
        existsSync: rq,
        readFileSync: rX
    } = rP, {
        dirname: r$,
        join: rK
    } = rP, rJ = class {
        constructor(e, t) {
            if (!1 === t.map) return;
            this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
            let r = t.map ? t.map.prev : void 0,
                n = this.loadMap(t.from, r);
            !this.mapFile && t.from && (this.mapFile = t.from), this.mapFile && (this.root = r$(this.mapFile)), n && (this.text = n)
        }
        consumer() {
            return this.consumerCache || (this.consumerCache = new rZ(this.text)), this.consumerCache
        }
        decodeInline(e) {
            if (/^data:application\/json;charset=utf-?8,/.test(e) || /^data:application\/json,/.test(e)) return decodeURIComponent(e.substr(RegExp.lastMatch.length));
            if (/^data:application\/json;charset=utf-?8;base64,/.test(e) || /^data:application\/json;base64,/.test(e)) {
                var t;
                return t = e.substr(RegExp.lastMatch.length), eE.Buffer.from(t, "base64").toString()
            }
            throw Error("Unsupported source map encoding " + e.match(/data:application\/json;([^,]+),/)[1])
        }
        getAnnotationURL(e) {
            return e.replace(/^\/\*\s*# sourceMappingURL=/, "").trim()
        }
        isMap(e) {
            return "object" == typeof e && ("string" == typeof e.mappings || "string" == typeof e._mappings || Array.isArray(e.sections))
        }
        loadAnnotation(e) {
            let t = e.match(/\/\*\s*# sourceMappingURL=/gm);
            if (!t) return;
            let r = e.lastIndexOf(t.pop()),
                n = e.indexOf("*/", r);
            r > -1 && n > -1 && (this.annotation = this.getAnnotationURL(e.substring(r, n)))
        }
        loadFile(e) {
            if (this.root = r$(e), rq(e)) return this.mapFile = e, rX(e, "utf-8").toString().trim()
        }
        loadMap(e, t) {
            if (!1 === t) return !1;
            if (t)
                if ("string" == typeof t) return t;
                else if ("function" == typeof t) {
                let r = t(e);
                if (r) {
                    let e = this.loadFile(r);
                    if (!e) throw Error("Unable to load previous source map: " + r.toString());
                    return e
                }
            } else if (t instanceof rZ) return rY.fromSourceMap(t).toString();
            else if (t instanceof rY) return t.toString();
            else if (this.isMap(t)) return JSON.stringify(t);
            else throw Error("Unsupported previous source map format: " + t.toString());
            else if (this.inline) return this.decodeInline(this.annotation);
            else if (this.annotation) {
                let t = this.annotation;
                return e && (t = rK(r$(e), t)), this.loadFile(t)
            }
        }
        startWith(e, t) {
            return !!e && e.substr(0, t.length) === t
        }
        withContent() {
            return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0)
        }
    };
    rJ.default = rJ;
    let {
        SourceMapConsumer: rQ,
        SourceMapGenerator: r0
    } = rP, {
        fileURLToPath: r1,
        pathToFileURL: r2
    } = rP, {
        isAbsolute: r3,
        resolve: r5
    } = rP, {
        nanoid: r8
    } = {
        nanoid: (e = 21) => {
            let t = "",
                r = e;
            for (; r--;) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict" [64 * Math.random() | 0];
            return t
        },
        customAlphabet: (e, t = 21) => (r = t) => {
            let n = "",
                i = r;
            for (; i--;) n += e[Math.random() * e.length | 0];
            return n
        }
    }, r4 = Symbol("fromOffsetCache"), r9 = !!(rQ && r0), r6 = !!(r5 && r3), r7 = class {
        constructor(e, t = {}) {
            if (null == e || "object" == typeof e && !e.toString) throw Error(`PostCSS received ${e} instead of CSS string`);
            if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!r6 || /^\w+:\/\//.test(t.from) || r3(t.from) ? this.file = t.from : this.file = r5(t.from)), r6 && r9) {
                let e = new rJ(this.css, t);
                if (e.text) {
                    this.map = e;
                    let t = e.consumer().file;
                    !this.file && t && (this.file = this.mapResolve(t))
                }
            }
            this.file || (this.id = "<input css " + r8(6) + ">"), this.map && (this.map.file = this.from)
        }
        error(e, t, r, n = {}) {
            let i, s, o;
            if (t && "object" == typeof t) {
                let e = t,
                    n = r;
                if ("number" == typeof e.offset) {
                    let n = this.fromOffset(e.offset);
                    t = n.line, r = n.col
                } else t = e.line, r = e.column;
                if ("number" == typeof n.offset) {
                    let e = this.fromOffset(n.offset);
                    s = e.line, o = e.col
                } else s = n.line, o = n.column
            } else if (!r) {
                let e = this.fromOffset(t);
                t = e.line, r = e.col
            }
            let a = this.origin(t, r, s, o);
            return (i = a ? new r_(e, void 0 === a.endLine ? a.line : {
                column: a.column,
                line: a.line
            }, void 0 === a.endLine ? a.column : {
                column: a.endColumn,
                line: a.endLine
            }, a.source, a.file, n.plugin) : new r_(e, void 0 === s ? t : {
                column: r,
                line: t
            }, void 0 === s ? r : {
                column: o,
                line: s
            }, this.css, this.file, n.plugin)).input = {
                column: r,
                endColumn: o,
                endLine: s,
                line: t,
                source: this.css
            }, this.file && (r2 && (i.input.url = r2(this.file).toString()), i.input.file = this.file), i
        }
        fromOffset(e) {
            let t, r;
            if (this[r4]) r = this[r4];
            else {
                let e = this.css.split("\n");
                r = Array(e.length);
                let t = 0;
                for (let n = 0, i = e.length; n < i; n++) r[n] = t, t += e[n].length + 1;
                this[r4] = r
            }
            t = r[r.length - 1];
            let n = 0;
            if (e >= t) n = r.length - 1;
            else {
                let t, i = r.length - 2;
                for (; n < i;)
                    if (e < r[t = n + (i - n >> 1)]) i = t - 1;
                    else if (e >= r[t + 1]) n = t + 1;
                else {
                    n = t;
                    break
                }
            }
            return {
                col: e - r[n] + 1,
                line: n + 1
            }
        }
        mapResolve(e) {
            return /^\w+:\/\//.test(e) ? e : r5(this.map.consumer().sourceRoot || this.map.root || ".", e)
        }
        origin(e, t, r, n) {
            let i, s;
            if (!this.map) return !1;
            let o = this.map.consumer(),
                a = o.originalPositionFor({
                    column: t,
                    line: e
                });
            if (!a.source) return !1;
            "number" == typeof r && (i = o.originalPositionFor({
                column: n,
                line: r
            })), s = r3(a.source) ? r2(a.source) : new URL(a.source, this.map.consumer().sourceRoot || r2(this.map.mapFile));
            let l = {
                column: a.column,
                endColumn: i && i.column,
                endLine: i && i.line,
                line: a.line,
                url: s.toString()
            };
            if ("file:" === s.protocol)
                if (r1) l.file = r1(s);
                else throw Error("file: protocol is not available in this PostCSS build");
            let h = o.sourceContentFor(a.source);
            return h && (l.source = h), l
        }
        toJSON() {
            let e = {};
            for (let t of ["hasBOM", "css", "file", "id"]) null != this[t] && (e[t] = this[t]);
            return this.map && (e.map = { ...this.map
            }, e.map.consumerCache && (e.map.consumerCache = void 0)), e
        }
        get from() {
            return this.file || this.id
        }
    };
    r7.default = r7, rP && rP.registerInput && rP.registerInput(r7);
    let {
        SourceMapConsumer: ne,
        SourceMapGenerator: nt
    } = rP, {
        dirname: nr,
        relative: nn,
        resolve: ni,
        sep: ns
    } = rP, {
        pathToFileURL: no
    } = rP, na = !!(ne && nt), nl = !!(nr && ni && nn && ns), nh = class {
        constructor(e, t, r, n) {
            this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = n, this.originalCSS = n, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = new Map, this.memoizedPaths = new Map, this.memoizedURLs = new Map
        }
        addAnnotation() {
            let e;
            e = this.isInline() ? "data:application/json;base64," + this.toBase64(this.map.toString()) : "string" == typeof this.mapOpts.annotation ? this.mapOpts.annotation : "function" == typeof this.mapOpts.annotation ? this.mapOpts.annotation(this.opts.to, this.root) : this.outputFile() + ".map";
            let t = "\n";
            this.css.includes("\r\n") && (t = "\r\n"), this.css += t + "/*# sourceMappingURL=" + e + " */"
        }
        applyPrevMaps() {
            for (let e of this.previous()) {
                let t, r = this.toUrl(this.path(e.file)),
                    n = e.root || nr(e.file);
                !1 === this.mapOpts.sourcesContent ? (t = new ne(e.text)).sourcesContent && (t.sourcesContent = null) : t = e.consumer(), this.map.applySourceMap(t, r, this.toUrl(this.path(n)))
            }
        }
        clearAnnotation() {
            if (!1 !== this.mapOpts.annotation)
                if (this.root) {
                    let e;
                    for (let t = this.root.nodes.length - 1; t >= 0; t--) "comment" === (e = this.root.nodes[t]).type && 0 === e.text.indexOf("# sourceMappingURL=") && this.root.removeChild(t)
                } else this.css && (this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, ""))
        }
        generate() {
            if (this.clearAnnotation(), nl && na && this.isMap()) return this.generateMap(); {
                let e = "";
                return this.stringify(this.root, t => {
                    e += t
                }), [e]
            }
        }
        generateMap() {
            if (this.root) this.generateString();
            else if (1 === this.previous().length) {
                let e = this.previous()[0].consumer();
                e.file = this.outputFile(), this.map = nt.fromSourceMap(e, {
                    ignoreInvalidMapping: !0
                })
            } else this.map = new nt({
                file: this.outputFile(),
                ignoreInvalidMapping: !0
            }), this.map.addMapping({
                generated: {
                    column: 0,
                    line: 1
                },
                original: {
                    column: 0,
                    line: 1
                },
                source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
            });
            return (this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline()) ? [this.css] : [this.css, this.map]
        }
        generateString() {
            let e, t;
            this.css = "", this.map = new nt({
                file: this.outputFile(),
                ignoreInvalidMapping: !0
            });
            let r = 1,
                n = 1,
                i = "<no source>",
                s = {
                    generated: {
                        column: 0,
                        line: 0
                    },
                    original: {
                        column: 0,
                        line: 0
                    },
                    source: ""
                };
            this.stringify(this.root, (o, a, l) => {
                if (this.css += o, a && "end" !== l && (s.generated.line = r, s.generated.column = n - 1, a.source && a.source.start ? (s.source = this.sourcePath(a), s.original.line = a.source.start.line, s.original.column = a.source.start.column - 1) : (s.source = i, s.original.line = 1, s.original.column = 0), this.map.addMapping(s)), (e = o.match(/\n/g)) ? (r += e.length, t = o.lastIndexOf("\n"), n = o.length - t) : n += o.length, a && "start" !== l) {
                    let e = a.parent || {
                        raws: {}
                    };
                    (!("decl" === a.type || "atrule" === a.type && !a.nodes) || a !== e.last || e.raws.semicolon) && (a.source && a.source.end ? (s.source = this.sourcePath(a), s.original.line = a.source.end.line, s.original.column = a.source.end.column - 1, s.generated.line = r, s.generated.column = n - 2) : (s.source = i, s.original.line = 1, s.original.column = 0, s.generated.line = r, s.generated.column = n - 1), this.map.addMapping(s))
                }
            })
        }
        isAnnotation() {
            return !!this.isInline() || (void 0 !== this.mapOpts.annotation ? this.mapOpts.annotation : !this.previous().length || this.previous().some(e => e.annotation))
        }
        isInline() {
            if (void 0 !== this.mapOpts.inline) return this.mapOpts.inline;
            let e = this.mapOpts.annotation;
            return (void 0 === e || !0 === e) && (!this.previous().length || this.previous().some(e => e.inline))
        }
        isMap() {
            return void 0 !== this.opts.map ? !!this.opts.map : this.previous().length > 0
        }
        isSourcesContent() {
            return void 0 !== this.mapOpts.sourcesContent ? this.mapOpts.sourcesContent : !this.previous().length || this.previous().some(e => e.withContent())
        }
        outputFile() {
            return this.opts.to ? this.path(this.opts.to) : this.opts.from ? this.path(this.opts.from) : "to.css"
        }
        path(e) {
            if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
            let t = this.memoizedPaths.get(e);
            if (t) return t;
            let r = this.opts.to ? nr(this.opts.to) : ".";
            "string" == typeof this.mapOpts.annotation && (r = nr(ni(r, this.mapOpts.annotation)));
            let n = nn(r, e);
            return this.memoizedPaths.set(e, n), n
        }
        previous() {
            if (!this.previousMaps)
                if (this.previousMaps = [], this.root) this.root.walk(e => {
                    if (e.source && e.source.input.map) {
                        let t = e.source.input.map;
                        this.previousMaps.includes(t) || this.previousMaps.push(t)
                    }
                });
                else {
                    let e = new r7(this.originalCSS, this.opts);
                    e.map && this.previousMaps.push(e.map)
                }
            return this.previousMaps
        }
        setSourcesContent() {
            let e = {};
            if (this.root) this.root.walk(t => {
                if (t.source) {
                    let r = t.source.input.from;
                    if (r && !e[r]) {
                        e[r] = !0;
                        let n = this.usesFileUrls ? this.toFileUrl(r) : this.toUrl(this.path(r));
                        this.map.setSourceContent(n, t.source.input.css)
                    }
                }
            });
            else if (this.css) {
                let e = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
                this.map.setSourceContent(e, this.css)
            }
        }
        sourcePath(e) {
            return this.mapOpts.from ? this.toUrl(this.mapOpts.from) : this.usesFileUrls ? this.toFileUrl(e.source.input.from) : this.toUrl(this.path(e.source.input.from))
        }
        toBase64(e) {
            return eE.Buffer.from(e).toString("base64")
        }
        toFileUrl(e) {
            let t = this.memoizedFileURLs.get(e);
            if (t) return t;
            if (no) {
                let t = no(e).toString();
                return this.memoizedFileURLs.set(e, t), t
            }
            throw Error("`map.absolute` option is not available in this PostCSS build")
        }
        toUrl(e) {
            let t = this.memoizedURLs.get(e);
            if (t) return t;
            "\\" === ns && (e = e.replace(/\\/g, "/"));
            let r = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
            return this.memoizedURLs.set(e, r), r
        }
    }, nc = rW, nu = class extends nc {
        constructor(e) {
            super(e), this.type = "comment"
        }
    };
    nu.default = nu;
    let {
        isClean: nd,
        my: np
    } = rF, nf = rW, ng = class e extends nf {
        append(...e) {
            for (let t of e)
                for (let e of this.normalize(t, this.last)) this.proxyOf.nodes.push(e);
            return this.markDirty(), this
        }
        cleanRaws(e) {
            if (super.cleanRaws(e), this.nodes)
                for (let t of this.nodes) t.cleanRaws(e)
        }
        each(e) {
            let t, r;
            if (!this.proxyOf.nodes) return;
            let n = this.getIterator();
            for (; this.indexes[n] < this.proxyOf.nodes.length && (t = this.indexes[n], !1 !== (r = e(this.proxyOf.nodes[t], t)));) this.indexes[n] += 1;
            return delete this.indexes[n], r
        }
        every(e) {
            return this.nodes.every(e)
        }
        getIterator() {
            this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
            let e = this.lastEach;
            return this.indexes[e] = 0, e
        }
        getProxyProcessor() {
            return {
                get(e, t) {
                    if ("proxyOf" === t) return e;
                    if (!e[t]) return e[t];
                    if ("each" === t || "string" == typeof t && t.startsWith("walk")) return (...r) => e[t](...r.map(e => "function" == typeof e ? (t, r) => e(t.toProxy(), r) : e));
                    if ("every" === t || "some" === t) return r => e[t]((e, ...t) => r(e.toProxy(), ...t));
                    if ("root" === t) return () => e.root().toProxy();
                    else if ("nodes" === t) return e.nodes.map(e => e.toProxy());
                    else if ("first" === t || "last" === t) return e[t].toProxy();
                    else return e[t]
                },
                set: (e, t, r) => e[t] === r || (e[t] = r, ("name" === t || "params" === t || "selector" === t) && e.markDirty(), !0)
            }
        }
        index(e) {
            return "number" == typeof e ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e))
        }
        insertAfter(e, t) {
            let r, n = this.index(e),
                i = this.normalize(t, this.proxyOf.nodes[n]).reverse();
            for (let t of (n = this.index(e), i)) this.proxyOf.nodes.splice(n + 1, 0, t);
            for (let e in this.indexes) n < (r = this.indexes[e]) && (this.indexes[e] = r + i.length);
            return this.markDirty(), this
        }
        insertBefore(e, t) {
            let r, n = this.index(e),
                i = 0 === n && "prepend",
                s = this.normalize(t, this.proxyOf.nodes[n], i).reverse();
            for (let t of (n = this.index(e), s)) this.proxyOf.nodes.splice(n, 0, t);
            for (let e in this.indexes) n <= (r = this.indexes[e]) && (this.indexes[e] = r + s.length);
            return this.markDirty(), this
        }
        normalize(t, r) {
            if ("string" == typeof t) t = function e(t) {
                return t.map(t => (t.nodes && (t.nodes = e(t.nodes)), delete t.source, t))
            }(u(t).nodes);
            else if (void 0 === t) t = [];
            else if (Array.isArray(t))
                for (let e of t = t.slice(0)) e.parent && e.parent.removeChild(e, "ignore");
            else if ("root" === t.type && "document" !== this.type)
                for (let e of t = t.nodes.slice(0)) e.parent && e.parent.removeChild(e, "ignore");
            else if (t.type) t = [t];
            else if (t.prop) {
                if (void 0 === t.value) throw Error("Value field is missed in node creation");
                "string" != typeof t.value && (t.value = String(t.value)), t = [new rG(t)]
            } else if (t.selector) t = [new d(t)];
            else if (t.name) t = [new p(t)];
            else if (t.text) t = [new nu(t)];
            else throw Error("Unknown node type in node creation");
            return t.map(t => (t[np] || e.rebuild(t), (t = t.proxyOf).parent && t.parent.removeChild(t), t[nd] && function e(t) {
                if (t[nd] = !1, t.proxyOf.nodes)
                    for (let r of t.proxyOf.nodes) e(r)
            }(t), void 0 === t.raws.before && r && void 0 !== r.raws.before && (t.raws.before = r.raws.before.replace(/\S/g, "")), t.parent = this.proxyOf, t))
        }
        prepend(...e) {
            for (let t of e = e.reverse()) {
                let e = this.normalize(t, this.first, "prepend").reverse();
                for (let t of e) this.proxyOf.nodes.unshift(t);
                for (let t in this.indexes) this.indexes[t] = this.indexes[t] + e.length
            }
            return this.markDirty(), this
        }
        push(e) {
            return e.parent = this, this.proxyOf.nodes.push(e), this
        }
        removeAll() {
            for (let e of this.proxyOf.nodes) e.parent = void 0;
            return this.proxyOf.nodes = [], this.markDirty(), this
        }
        removeChild(e) {
            let t;
            for (let r in e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1), this.indexes)(t = this.indexes[r]) >= e && (this.indexes[r] = t - 1);
            return this.markDirty(), this
        }
        replaceValues(e, t, r) {
            return r || (r = t, t = {}), this.walkDecls(n => {
                t.props && !t.props.includes(n.prop) || (!t.fast || n.value.includes(t.fast)) && (n.value = n.value.replace(e, r))
            }), this.markDirty(), this
        }
        some(e) {
            return this.nodes.some(e)
        }
        walk(e) {
            return this.each((t, r) => {
                let n;
                try {
                    n = e(t, r)
                } catch (e) {
                    throw t.addToError(e)
                }
                return !1 !== n && t.walk && (n = t.walk(e)), n
            })
        }
        walkAtRules(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("atrule" === r.type && e.test(r.name)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("atrule" === r.type && r.name === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("atrule" === e.type) return t(e, r)
            }))
        }
        walkComments(e) {
            return this.walk((t, r) => {
                if ("comment" === t.type) return e(t, r)
            })
        }
        walkDecls(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("decl" === r.type && e.test(r.prop)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("decl" === r.type && r.prop === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("decl" === e.type) return t(e, r)
            }))
        }
        walkRules(e, t) {
            return t ? e instanceof RegExp ? this.walk((r, n) => {
                if ("rule" === r.type && e.test(r.selector)) return t(r, n)
            }) : this.walk((r, n) => {
                if ("rule" === r.type && r.selector === e) return t(r, n)
            }) : (t = e, this.walk((e, r) => {
                if ("rule" === e.type) return t(e, r)
            }))
        }
        get first() {
            if (this.proxyOf.nodes) return this.proxyOf.nodes[0]
        }
        get last() {
            if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
        }
    };
    ng.registerParse = e => {
        u = e
    }, ng.registerRule = e => {
        d = e
    }, ng.registerAtRule = e => {
        p = e
    }, ng.registerRoot = e => {
        f = e
    }, ng.default = ng, ng.rebuild = e => {
        "atrule" === e.type ? Object.setPrototypeOf(e, p.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, d.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, rG.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, nu.prototype) : "root" === e.type && Object.setPrototypeOf(e, f.prototype), e[np] = !0, e.nodes && e.nodes.forEach(e => {
            ng.rebuild(e)
        })
    };
    let nm = ng,
        ny = class extends nm {
            constructor(e) {
                super({
                    type: "document",
                    ...e
                }), this.nodes || (this.nodes = [])
            }
            toResult(e = {}) {
                return new g(new m, this, e).stringify()
            }
        };
    ny.registerLazyResult = e => {
        g = e
    }, ny.registerProcessor = e => {
        m = e
    }, ny.default = ny;
    let nv = class {
        constructor(e, t = {}) {
            if (this.type = "warning", this.text = e, t.node && t.node.source) {
                let e = t.node.rangeBy(t);
                this.line = e.start.line, this.column = e.start.column, this.endLine = e.end.line, this.endColumn = e.end.column
            }
            for (let e in t) this[e] = t[e]
        }
        toString() {
            return this.node ? this.node.error(this.text, {
                index: this.index,
                plugin: this.plugin,
                word: this.word
            }).message : this.plugin ? this.plugin + ": " + this.text : this.text
        }
    };
    nv.default = nv;
    let nw = class {
        constructor(e, t, r) {
            this.processor = e, this.messages = [], this.root = t, this.opts = r, this.css = void 0, this.map = void 0
        }
        toString() {
            return this.css
        }
        warn(e, t = {}) {
            !t.plugin && this.lastPlugin && this.lastPlugin.postcssPlugin && (t.plugin = this.lastPlugin.postcssPlugin);
            let r = new nv(e, t);
            return this.messages.push(r), r
        }
        warnings() {
            return this.messages.filter(e => "warning" === e.type)
        }
        get content() {
            return this.css
        }
    };
    nw.default = nw;
    let nb = /[\t\n\f\r "#'()/;[\\\]{}]/g,
        nS = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,
        nC = /.[\r\n"'(/\\]/,
        nI = /[\da-f]/i,
        nE = ng,
        nx = class extends nE {
            constructor(e) {
                super(e), this.type = "atrule"
            }
            append(...e) {
                return this.proxyOf.nodes || (this.nodes = []), super.append(...e)
            }
            prepend(...e) {
                return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e)
            }
        };
    nx.default = nx, nE.registerAtRule(nx);
    let nk = ng,
        nO = class extends nk {
            constructor(e) {
                super(e), this.type = "root", this.nodes || (this.nodes = [])
            }
            normalize(e, t, r) {
                let n = super.normalize(e);
                if (t) {
                    if ("prepend" === r) this.nodes.length > 1 ? t.raws.before = this.nodes[1].raws.before : delete t.raws.before;
                    else if (this.first !== t)
                        for (let e of n) e.raws.before = t.raws.before
                }
                return n
            }
            removeChild(e, t) {
                let r = this.index(e);
                return !t && 0 === r && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[r].raws.before), super.removeChild(e)
            }
            toResult(e = {}) {
                return new y(new v, this, e).stringify()
            }
        };
    nO.registerLazyResult = e => {
        y = e
    }, nO.registerProcessor = e => {
        v = e
    }, nO.default = nO, nk.registerRoot(nO);
    let nM = {
        comma: e => nM.split(e, [","], !0),
        space: e => nM.split(e, [" ", "\n", "	"]),
        split(e, t, r) {
            let n = [],
                i = "",
                s = !1,
                o = 0,
                a = !1,
                l = "",
                h = !1;
            for (let r of e) h ? h = !1 : "\\" === r ? h = !0 : a ? r === l && (a = !1) : '"' === r || "'" === r ? (a = !0, l = r) : "(" === r ? o += 1 : ")" === r ? o > 0 && (o -= 1) : 0 === o && t.includes(r) && (s = !0), s ? ("" !== i && n.push(i.trim()), i = "", s = !1) : i += r;
            return (r || "" !== i) && n.push(i.trim()), n
        }
    };
    nM.default = nM;
    let nR = ng,
        nT = class extends nR {
            constructor(e) {
                super(e), this.type = "rule", this.nodes || (this.nodes = [])
            }
            get selectors() {
                return nM.comma(this.selector)
            }
            set selectors(e) {
                let t = this.selector ? this.selector.match(/,\s*/) : null,
                    r = t ? t[0] : "," + this.raw("between", "beforeOpen");
                this.selector = e.join(r)
            }
        };
    nT.default = nT, nR.registerRule(nT);
    let nA = function(e, t = {}) {
            let r, n, i, s, o, a, l, h, c, u, d = e.css.valueOf(),
                p = t.ignoreErrors,
                f = d.length,
                g = 0,
                m = [],
                y = [];

            function v(t) {
                throw e.error("Unclosed " + t, g)
            }
            return {
                back: function(e) {
                    y.push(e)
                },
                endOfFile: function() {
                    return 0 === y.length && g >= f
                },
                nextToken: function(e) {
                    if (y.length) return y.pop();
                    if (g >= f) return;
                    let t = !!e && e.ignoreUnclosed;
                    switch (r = d.charCodeAt(g)) {
                        case 10:
                        case 32:
                        case 9:
                        case 13:
                        case 12:
                            n = g;
                            do n += 1, r = d.charCodeAt(n); while (32 === r || 10 === r || 9 === r || 13 === r || 12 === r) u = ["space", d.slice(g, n)], g = n - 1;
                            break;
                        case 91:
                        case 93:
                        case 123:
                        case 125:
                        case 58:
                        case 59:
                        case 41:
                            {
                                let e = String.fromCharCode(r);u = [e, e, g];
                                break
                            }
                        case 40:
                            if (h = m.length ? m.pop()[1] : "", c = d.charCodeAt(g + 1), "url" === h && 39 !== c && 34 !== c && 32 !== c && 10 !== c && 9 !== c && 12 !== c && 13 !== c) {
                                n = g;
                                do {
                                    if (a = !1, -1 === (n = d.indexOf(")", n + 1)))
                                        if (p || t) {
                                            n = g;
                                            break
                                        } else v("bracket");
                                    for (l = n; 92 === d.charCodeAt(l - 1);) l -= 1, a = !a
                                } while (a) u = ["brackets", d.slice(g, n + 1), g, n], g = n
                            } else n = d.indexOf(")", g + 1), s = d.slice(g, n + 1), -1 === n || nC.test(s) ? u = ["(", "(", g] : (u = ["brackets", s, g, n], g = n);
                            break;
                        case 39:
                        case 34:
                            i = 39 === r ? "'" : '"', n = g;
                            do {
                                if (a = !1, -1 === (n = d.indexOf(i, n + 1)))
                                    if (p || t) {
                                        n = g + 1;
                                        break
                                    } else v("string");
                                for (l = n; 92 === d.charCodeAt(l - 1);) l -= 1, a = !a
                            } while (a) u = ["string", d.slice(g, n + 1), g, n], g = n;
                            break;
                        case 64:
                            nb.lastIndex = g + 1, nb.test(d), n = 0 === nb.lastIndex ? d.length - 1 : nb.lastIndex - 2, u = ["at-word", d.slice(g, n + 1), g, n], g = n;
                            break;
                        case 92:
                            for (n = g, o = !0; 92 === d.charCodeAt(n + 1);) n += 1, o = !o;
                            if (r = d.charCodeAt(n + 1), o && 47 !== r && 32 !== r && 10 !== r && 9 !== r && 13 !== r && 12 !== r && (n += 1, nI.test(d.charAt(n)))) {
                                for (; nI.test(d.charAt(n + 1));) n += 1;
                                32 === d.charCodeAt(n + 1) && (n += 1)
                            }
                            u = ["word", d.slice(g, n + 1), g, n], g = n;
                            break;
                        default:
                            47 === r && 42 === d.charCodeAt(g + 1) ? (0 === (n = d.indexOf("*/", g + 2) + 1) && (p || t ? n = d.length : v("comment")), u = ["comment", d.slice(g, n + 1), g, n]) : (nS.lastIndex = g + 1, nS.test(d), n = 0 === nS.lastIndex ? d.length - 1 : nS.lastIndex - 2, u = ["word", d.slice(g, n + 1), g, n], m.push(u)), g = n
                    }
                    return g++, u
                },
                position: function() {
                    return g
                }
            }
        },
        nN = {
            empty: !0,
            space: !0
        },
        nL = class {
            constructor(e) {
                this.input = e, this.root = new nO, this.current = this.root, this.spaces = "", this.semicolon = !1, this.createTokenizer(), this.root.source = {
                    input: e,
                    start: {
                        column: 1,
                        line: 1,
                        offset: 0
                    }
                }
            }
            atrule(e) {
                let t, r, n, i = new nx;
                i.name = e[1].slice(1), "" === i.name && this.unnamedAtrule(i, e), this.init(i, e[2]);
                let s = !1,
                    o = !1,
                    a = [],
                    l = [];
                for (; !this.tokenizer.endOfFile();) {
                    if ("(" === (t = (e = this.tokenizer.nextToken())[0]) || "[" === t ? l.push("(" === t ? ")" : "]") : "{" === t && l.length > 0 ? l.push("}") : t === l[l.length - 1] && l.pop(), 0 === l.length)
                        if (";" === t) {
                            i.source.end = this.getPosition(e[2]), i.source.end.offset++, this.semicolon = !0;
                            break
                        } else if ("{" === t) {
                        o = !0;
                        break
                    } else if ("}" === t) {
                        if (a.length > 0) {
                            for (n = a.length - 1, r = a[n]; r && "space" === r[0];) r = a[--n];
                            r && (i.source.end = this.getPosition(r[3] || r[2]), i.source.end.offset++)
                        }
                        this.end(e);
                        break
                    } else a.push(e);
                    else a.push(e);
                    if (this.tokenizer.endOfFile()) {
                        s = !0;
                        break
                    }
                }
                i.raws.between = this.spacesAndCommentsFromEnd(a), a.length ? (i.raws.afterName = this.spacesAndCommentsFromStart(a), this.raw(i, "params", a), s && (e = a[a.length - 1], i.source.end = this.getPosition(e[3] || e[2]), i.source.end.offset++, this.spaces = i.raws.between, i.raws.between = "")) : (i.raws.afterName = "", i.params = ""), o && (i.nodes = [], this.current = i)
            }
            checkMissedSemicolon(e) {
                let t, r = this.colon(e);
                if (!1 === r) return;
                let n = 0;
                for (let i = r - 1; i >= 0 && ("space" === (t = e[i])[0] || 2 !== (n += 1)); i--);
                throw this.input.error("Missed semicolon", "word" === t[0] ? t[3] + 1 : t[2])
            }
            colon(e) {
                let t, r, n = 0;
                for (let [i, s] of e.entries()) {
                    if ("(" === (t = s[0]) && (n += 1), ")" === t && (n -= 1), 0 === n && ":" === t)
                        if (r)
                            if ("word" === r[0] && "progid" === r[1]) continue;
                            else return i;
                    else this.doubleColon(s);
                    r = s
                }
                return !1
            }
            comment(e) {
                let t = new nu;
                this.init(t, e[2]), t.source.end = this.getPosition(e[3] || e[2]), t.source.end.offset++;
                let r = e[1].slice(2, -2);
                if (/^\s*$/.test(r)) t.text = "", t.raws.left = r, t.raws.right = "";
                else {
                    let e = r.match(/^(\s*)([^]*\S)(\s*)$/);
                    t.text = e[2], t.raws.left = e[1], t.raws.right = e[3]
                }
            }
            createTokenizer() {
                this.tokenizer = nA(this.input)
            }
            decl(e, t) {
                let r, n, i = new rG;
                this.init(i, e[0][2]);
                let s = e[e.length - 1];
                for (";" === s[0] && (this.semicolon = !0, e.pop()), i.source.end = this.getPosition(s[3] || s[2] || function(e) {
                        for (let t = e.length - 1; t >= 0; t--) {
                            let r = e[t],
                                n = r[3] || r[2];
                            if (n) return n
                        }
                    }(e)), i.source.end.offset++;
                    "word" !== e[0][0];) 1 === e.length && this.unknownWord(e), i.raws.before += e.shift()[1];
                for (i.source.start = this.getPosition(e[0][2]), i.prop = ""; e.length;) {
                    let t = e[0][0];
                    if (":" === t || "space" === t || "comment" === t) break;
                    i.prop += e.shift()[1]
                }
                for (i.raws.between = ""; e.length;) {
                    if (":" === (r = e.shift())[0]) {
                        i.raws.between += r[1];
                        break
                    }
                    "word" === r[0] && /\w/.test(r[1]) && this.unknownWord([r]), i.raws.between += r[1]
                }("_" === i.prop[0] || "*" === i.prop[0]) && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1));
                let o = [];
                for (; e.length && ("space" === (n = e[0][0]) || "comment" === n);) o.push(e.shift());
                this.precheckMissedSemicolon(e);
                for (let t = e.length - 1; t >= 0; t--) {
                    if ("!important" === (r = e[t])[1].toLowerCase()) {
                        i.important = !0;
                        let r = this.stringFrom(e, t);
                        " !important" !== (r = this.spacesFromEnd(e) + r) && (i.raws.important = r);
                        break
                    }
                    if ("important" === r[1].toLowerCase()) {
                        let r = e.slice(0),
                            n = "";
                        for (let e = t; e > 0; e--) {
                            let t = r[e][0];
                            if (0 === n.trim().indexOf("!") && "space" !== t) break;
                            n = r.pop()[1] + n
                        }
                        0 === n.trim().indexOf("!") && (i.important = !0, i.raws.important = n, e = r)
                    }
                    if ("space" !== r[0] && "comment" !== r[0]) break
                }
                e.some(e => "space" !== e[0] && "comment" !== e[0]) && (i.raws.between += o.map(e => e[1]).join(""), o = []), this.raw(i, "value", o.concat(e), t), i.value.includes(":") && !t && this.checkMissedSemicolon(e)
            }
            doubleColon(e) {
                throw this.input.error("Double colon", {
                    offset: e[2]
                }, {
                    offset: e[2] + e[1].length
                })
            }
            emptyRule(e) {
                let t = new nT;
                this.init(t, e[2]), t.selector = "", t.raws.between = "", this.current = t
            }
            end(e) {
                this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.semicolon = !1, this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.spaces = "", this.current.parent ? (this.current.source.end = this.getPosition(e[2]), this.current.source.end.offset++, this.current = this.current.parent) : this.unexpectedClose(e)
            }
            endFile() {
                this.current.parent && this.unclosedBlock(), this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.root.source.end = this.getPosition(this.tokenizer.position())
            }
            freeSemicolon(e) {
                if (this.spaces += e[1], this.current.nodes) {
                    let e = this.current.nodes[this.current.nodes.length - 1];
                    e && "rule" === e.type && !e.raws.ownSemicolon && (e.raws.ownSemicolon = this.spaces, this.spaces = "")
                }
            }
            getPosition(e) {
                let t = this.input.fromOffset(e);
                return {
                    column: t.col,
                    line: t.line,
                    offset: e
                }
            }
            init(e, t) {
                this.current.push(e), e.source = {
                    input: this.input,
                    start: this.getPosition(t)
                }, e.raws.before = this.spaces, this.spaces = "", "comment" !== e.type && (this.semicolon = !1)
            }
            other(e) {
                let t = !1,
                    r = null,
                    n = !1,
                    i = null,
                    s = [],
                    o = e[1].startsWith("--"),
                    a = [],
                    l = e;
                for (; l;) {
                    if (r = l[0], a.push(l), "(" === r || "[" === r) i || (i = l), s.push("(" === r ? ")" : "]");
                    else if (o && n && "{" === r) i || (i = l), s.push("}");
                    else if (0 === s.length)
                        if (";" === r)
                            if (n) return void this.decl(a, o);
                            else break;
                    else if ("{" === r) return void this.rule(a);
                    else if ("}" === r) {
                        this.tokenizer.back(a.pop()), t = !0;
                        break
                    } else ":" === r && (n = !0);
                    else r === s[s.length - 1] && (s.pop(), 0 === s.length && (i = null));
                    l = this.tokenizer.nextToken()
                }
                if (this.tokenizer.endOfFile() && (t = !0), s.length > 0 && this.unclosedBracket(i), t && n) {
                    if (!o)
                        for (; a.length && ("space" === (l = a[a.length - 1][0]) || "comment" === l);) this.tokenizer.back(a.pop());
                    this.decl(a, o)
                } else this.unknownWord(a)
            }
            parse() {
                let e;
                for (; !this.tokenizer.endOfFile();) switch ((e = this.tokenizer.nextToken())[0]) {
                    case "space":
                        this.spaces += e[1];
                        break;
                    case ";":
                        this.freeSemicolon(e);
                        break;
                    case "}":
                        this.end(e);
                        break;
                    case "comment":
                        this.comment(e);
                        break;
                    case "at-word":
                        this.atrule(e);
                        break;
                    case "{":
                        this.emptyRule(e);
                        break;
                    default:
                        this.other(e)
                }
                this.endFile()
            }
            precheckMissedSemicolon() {}
            raw(e, t, r, n) {
                let i, s, o, a, l = r.length,
                    h = "",
                    c = !0;
                for (let e = 0; e < l; e += 1) "space" !== (s = (i = r[e])[0]) || e !== l - 1 || n ? "comment" === s ? (a = r[e - 1] ? r[e - 1][0] : "empty", o = r[e + 1] ? r[e + 1][0] : "empty", nN[a] || nN[o] || "," === h.slice(-1) ? c = !1 : h += i[1]) : h += i[1] : c = !1;
                if (!c) {
                    let n = r.reduce((e, t) => e + t[1], "");
                    e.raws[t] = {
                        raw: n,
                        value: h
                    }
                }
                e[t] = h
            }
            rule(e) {
                e.pop();
                let t = new nT;
                this.init(t, e[0][2]), t.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(t, "selector", e), this.current = t
            }
            spacesAndCommentsFromEnd(e) {
                let t, r = "";
                for (; e.length && ("space" === (t = e[e.length - 1][0]) || "comment" === t);) r = e.pop()[1] + r;
                return r
            }
            spacesAndCommentsFromStart(e) {
                let t, r = "";
                for (; e.length && ("space" === (t = e[0][0]) || "comment" === t);) r += e.shift()[1];
                return r
            }
            spacesFromEnd(e) {
                let t = "";
                for (; e.length && "space" === e[e.length - 1][0];) t = e.pop()[1] + t;
                return t
            }
            stringFrom(e, t) {
                let r = "";
                for (let n = t; n < e.length; n++) r += e[n][1];
                return e.splice(t, e.length - t), r
            }
            unclosedBlock() {
                let e = this.current.source.start;
                throw this.input.error("Unclosed block", e.line, e.column)
            }
            unclosedBracket(e) {
                throw this.input.error("Unclosed bracket", {
                    offset: e[2]
                }, {
                    offset: e[2] + 1
                })
            }
            unexpectedClose(e) {
                throw this.input.error("Unexpected }", {
                    offset: e[2]
                }, {
                    offset: e[2] + 1
                })
            }
            unknownWord(e) {
                throw this.input.error("Unknown word", {
                    offset: e[0][2]
                }, {
                    offset: e[0][2] + e[0][1].length
                })
            }
            unnamedAtrule(e, t) {
                throw this.input.error("At-rule without name", {
                    offset: t[2]
                }, {
                    offset: t[2] + t[1].length
                })
            }
        };

    function nD(e, t) {
        let r = new nL(new r7(e, t));
        try {
            r.parse()
        } catch (e) {
            throw e
        }
        return r.root
    }
    nD.default = nD, ng.registerParse(nD);
    let {
        isClean: nP,
        my: n_
    } = rF, nF = {
        atrule: "AtRule",
        comment: "Comment",
        decl: "Declaration",
        document: "Document",
        root: "Root",
        rule: "Rule"
    }, nz = {
        AtRule: !0,
        AtRuleExit: !0,
        Comment: !0,
        CommentExit: !0,
        Declaration: !0,
        DeclarationExit: !0,
        Document: !0,
        DocumentExit: !0,
        Once: !0,
        OnceExit: !0,
        postcssPlugin: !0,
        prepare: !0,
        Root: !0,
        RootExit: !0,
        Rule: !0,
        RuleExit: !0
    }, nU = {
        Once: !0,
        postcssPlugin: !0,
        prepare: !0
    };

    function nj(e) {
        return "object" == typeof e && "function" == typeof e.then
    }

    function nB(e) {
        let t = !1,
            r = nF[e.type];
        return ("decl" === e.type ? t = e.prop.toLowerCase() : "atrule" === e.type && (t = e.name.toLowerCase()), t && e.append) ? [r, r + "-" + t, 0, r + "Exit", r + "Exit-" + t] : t ? [r, r + "-" + t, r + "Exit", r + "Exit-" + t] : e.append ? [r, 0, r + "Exit"] : [r, r + "Exit"]
    }

    function nH(e) {
        return {
            eventIndex: 0,
            events: "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : nB(e),
            iterator: 0,
            node: e,
            visitorIndex: 0,
            visitors: []
        }
    }

    function nW(e) {
        return e[nP] = !1, e.nodes && e.nodes.forEach(e => nW(e)), e
    }
    let nV = {},
        nG = class e {
            constructor(t, r, n) {
                let i;
                if (this.stringified = !1, this.processed = !1, "object" == typeof r && null !== r && ("root" === r.type || "document" === r.type)) i = nW(r);
                else if (r instanceof e || r instanceof nw) i = nW(r.root), r.map && (void 0 === n.map && (n.map = {}), n.map.inline || (n.map.inline = !1), n.map.prev = r.map);
                else {
                    let e = nD;
                    n.syntax && (e = n.syntax.parse), n.parser && (e = n.parser), e.parse && (e = e.parse);
                    try {
                        i = e(r, n)
                    } catch (e) {
                        this.processed = !0, this.error = e
                    }
                    i && !i[n_] && ng.rebuild(i)
                }
                this.result = new nw(t, i, n), this.helpers = { ...nV,
                    postcss: nV,
                    result: this.result
                }, this.plugins = this.processor.plugins.map(e => "object" == typeof e && e.prepare ? { ...e,
                    ...e.prepare(this.result)
                } : e)
            }
            async () {
                return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing)
            } catch (e) {
                return this.async().catch(e)
            } finally(e) {
                return this.async().then(e, e)
            }
            getAsyncError() {
                throw Error("Use process(css).then(cb) to work with async plugins")
            }
            handleError(e, t) {
                let r = this.result.lastPlugin;
                try {
                    t && t.addToError(e), this.error = e, "CssSyntaxError" !== e.name || e.plugin ? r.postcssVersion : (e.plugin = r.postcssPlugin, e.setMessage())
                } catch (e) {
                    console && console.error && console.error(e)
                }
                return e
            }
            prepareVisitors() {
                this.listeners = {};
                let e = (e, t, r) => {
                    this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push([e, r])
                };
                for (let t of this.plugins)
                    if ("object" == typeof t)
                        for (let r in t) {
                            if (!nz[r] && /^[A-Z]/.test(r)) throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
                            if (!nU[r])
                                if ("object" == typeof t[r])
                                    for (let n in t[r]) e(t, "*" === n ? r : r + "-" + n.toLowerCase(), t[r][n]);
                                else "function" == typeof t[r] && e(t, r, t[r])
                        }
                this.hasListener = Object.keys(this.listeners).length > 0
            }
            async runAsync() {
                this.plugin = 0;
                for (let e = 0; e < this.plugins.length; e++) {
                    let t = this.plugins[e],
                        r = this.runOnRoot(t);
                    if (nj(r)) try {
                        await r
                    } catch (e) {
                        throw this.handleError(e)
                    }
                }
                if (this.prepareVisitors(), this.hasListener) {
                    let e = this.result.root;
                    for (; !e[nP];) {
                        e[nP] = !0;
                        let t = [nH(e)];
                        for (; t.length > 0;) {
                            let e = this.visitTick(t);
                            if (nj(e)) try {
                                await e
                            } catch (r) {
                                let e = t[t.length - 1].node;
                                throw this.handleError(r, e)
                            }
                        }
                    }
                    if (this.listeners.OnceExit)
                        for (let [t, r] of this.listeners.OnceExit) {
                            this.result.lastPlugin = t;
                            try {
                                if ("document" === e.type) {
                                    let t = e.nodes.map(e => r(e, this.helpers));
                                    await Promise.all(t)
                                } else await r(e, this.helpers)
                            } catch (e) {
                                throw this.handleError(e)
                            }
                        }
                }
                return this.processed = !0, this.stringify()
            }
            runOnRoot(e) {
                this.result.lastPlugin = e;
                try {
                    if ("object" == typeof e && e.Once) {
                        if ("document" === this.result.root.type) {
                            let t = this.result.root.nodes.map(t => e.Once(t, this.helpers));
                            if (nj(t[0])) return Promise.all(t);
                            return t
                        }
                        return e.Once(this.result.root, this.helpers)
                    }
                    if ("function" == typeof e) return e(this.result.root, this.result)
                } catch (e) {
                    throw this.handleError(e)
                }
            }
            stringify() {
                if (this.error) throw this.error;
                if (this.stringified) return this.result;
                this.stringified = !0, this.sync();
                let e = this.result.opts,
                    t = rj;
                e.syntax && (t = e.syntax.stringify), e.stringifier && (t = e.stringifier), t.stringify && (t = t.stringify);
                let r = new nh(t, this.result.root, this.result.opts).generate();
                return this.result.css = r[0], this.result.map = r[1], this.result
            }
            sync() {
                if (this.error) throw this.error;
                if (this.processed) return this.result;
                if (this.processed = !0, this.processing) throw this.getAsyncError();
                for (let e of this.plugins)
                    if (nj(this.runOnRoot(e))) throw this.getAsyncError();
                if (this.prepareVisitors(), this.hasListener) {
                    let e = this.result.root;
                    for (; !e[nP];) e[nP] = !0, this.walkSync(e);
                    if (this.listeners.OnceExit)
                        if ("document" === e.type)
                            for (let t of e.nodes) this.visitSync(this.listeners.OnceExit, t);
                        else this.visitSync(this.listeners.OnceExit, e)
                }
                return this.result
            }
            then(e, t) {
                return this.async().then(e, t)
            }
            toString() {
                return this.css
            }
            visitSync(e, t) {
                for (let [r, n] of e) {
                    let e;
                    this.result.lastPlugin = r;
                    try {
                        e = n(t, this.helpers)
                    } catch (e) {
                        throw this.handleError(e, t.proxyOf)
                    }
                    if ("root" !== t.type && "document" !== t.type && !t.parent) return !0;
                    if (nj(e)) throw this.getAsyncError()
                }
            }
            visitTick(e) {
                let t = e[e.length - 1],
                    {
                        node: r,
                        visitors: n
                    } = t;
                if ("root" !== r.type && "document" !== r.type && !r.parent) return void e.pop();
                if (n.length > 0 && t.visitorIndex < n.length) {
                    let [e, i] = n[t.visitorIndex];
                    t.visitorIndex += 1, t.visitorIndex === n.length && (t.visitors = [], t.visitorIndex = 0), this.result.lastPlugin = e;
                    try {
                        return i(r.toProxy(), this.helpers)
                    } catch (e) {
                        throw this.handleError(e, r)
                    }
                }
                if (0 !== t.iterator) {
                    let n, i = t.iterator;
                    for (; n = r.nodes[r.indexes[i]];)
                        if (r.indexes[i] += 1, !n[nP]) {
                            n[nP] = !0, e.push(nH(n));
                            return
                        }
                    t.iterator = 0, delete r.indexes[i]
                }
                let i = t.events;
                for (; t.eventIndex < i.length;) {
                    let e = i[t.eventIndex];
                    if (t.eventIndex += 1, 0 === e) {
                        r.nodes && r.nodes.length && (r[nP] = !0, t.iterator = r.getIterator());
                        return
                    }
                    if (this.listeners[e]) {
                        t.visitors = this.listeners[e];
                        return
                    }
                }
                e.pop()
            }
            walkSync(e) {
                for (let t of (e[nP] = !0, nB(e)))
                    if (0 === t) e.nodes && e.each(e => {
                        e[nP] || this.walkSync(e)
                    });
                    else {
                        let r = this.listeners[t];
                        if (r && this.visitSync(r, e.toProxy())) return
                    }
            }
            warnings() {
                return this.sync().warnings()
            }
            get content() {
                return this.stringify().content
            }
            get css() {
                return this.stringify().css
            }
            get map() {
                return this.stringify().map
            }
            get messages() {
                return this.sync().messages
            }
            get opts() {
                return this.result.opts
            }
            get processor() {
                return this.result.processor
            }
            get root() {
                return this.sync().root
            }
            get[Symbol.toStringTag]() {
                return "LazyResult"
            }
        };
    nG.registerPostcss = e => {
        nV = e
    }, nG.default = nG, nO.registerLazyResult(nG), ny.registerLazyResult(nG);
    let nZ = class {
        constructor(e, t, r) {
            let n;
            t = t.toString(), this.stringified = !1, this._processor = e, this._css = t, this._opts = r, this._map = void 0, this.result = new nw(this._processor, n, this._opts), this.result.css = t;
            let i = this;
            Object.defineProperty(this.result, "root", {
                get: () => i.root
            });
            let s = new nh(rj, n, this._opts, t);
            if (s.isMap()) {
                let [e, t] = s.generate();
                e && (this.result.css = e), t && (this.result.map = t)
            } else s.clearAnnotation(), this.result.css = s.css
        }
        async () {
            return this.error ? Promise.reject(this.error) : Promise.resolve(this.result)
        } catch (e) {
            return this.async().catch(e)
        } finally(e) {
            return this.async().then(e, e)
        }
        sync() {
            if (this.error) throw this.error;
            return this.result
        }
        then(e, t) {
            return this.async().then(e, t)
        }
        toString() {
            return this._css
        }
        warnings() {
            return []
        }
        get content() {
            return this.result.css
        }
        get css() {
            return this.result.css
        }
        get map() {
            return this.result.map
        }
        get messages() {
            return []
        }
        get opts() {
            return this.result.opts
        }
        get processor() {
            return this.result.processor
        }
        get root() {
            let e;
            if (this._root) return this._root;
            try {
                e = nD(this._css, this._opts)
            } catch (e) {
                this.error = e
            }
            if (!this.error) return this._root = e, e;
            throw this.error
        }
        get[Symbol.toStringTag]() {
            return "NoWorkResult"
        }
    };
    nZ.default = nZ;
    let nY = class {
        constructor(e = []) {
            this.version = "8.4.38", this.plugins = this.normalize(e)
        }
        normalize(e) {
            let t = [];
            for (let r of e)
                if (!0 === r.postcss ? r = r() : r.postcss && (r = r.postcss), "object" == typeof r && Array.isArray(r.plugins)) t = t.concat(r.plugins);
                else if ("object" == typeof r && r.postcssPlugin) t.push(r);
            else if ("function" == typeof r) t.push(r);
            else if ("object" == typeof r && (r.parse || r.stringify));
            else throw Error(r + " is not a PostCSS plugin");
            return t
        }
        process(e, t = {}) {
            return this.plugins.length || t.parser || t.stringifier || t.syntax ? new nG(this, e, t) : new nZ(this, e, t)
        }
        use(e) {
            return this.plugins = this.plugins.concat(this.normalize([e])), this
        }
    };

    function nq(e, t) {
        if (Array.isArray(e)) return e.map(e => nq(e));
        let {
            inputs: r,
            ...n
        } = e;
        if (r)
            for (let e of (t = [], r)) {
                let r = { ...e,
                    __proto__: r7.prototype
                };
                r.map && (r.map = { ...r.map,
                    __proto__: rJ.prototype
                }), t.push(r)
            }
        if (n.nodes && (n.nodes = e.nodes.map(e => nq(e, t))), n.source) {
            let {
                inputId: e,
                ...r
            } = n.source;
            n.source = r, null != e && (n.source.input = t[e])
        }
        if ("root" === n.type) return new nO(n);
        if ("decl" === n.type) return new rG(n);
        if ("rule" === n.type) return new nT(n);
        if ("comment" === n.type) return new nu(n);
        if ("atrule" === n.type) return new nx(n);
        else throw Error("Unknown node type: " + e.type)
    }

    function nX(...e) {
        return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new nY(e)
    }
    nY.default = nY, nO.registerProcessor(nY), ny.registerProcessor(nY), nq.default = nq, nX.plugin = function(e, t) {
        let r, n = !1;

        function i(...r) {
            console && console.warn && !n && (n = !0, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), ex.default.env.LANG && ex.default.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
            let s = t(...r);
            return s.postcssPlugin = e, s.postcssVersion = new nY().version, s
        }
        return Object.defineProperty(i, "postcss", {
            get: () => (r || (r = i()), r)
        }), i.process = function(e, t, r) {
            return nX([i(r)]).process(e, t)
        }, i
    }, nX.stringify = rj, nX.parse = nD, nX.fromJSON = nq, nX.list = nM, nX.comment = e => new nu(e), nX.atRule = e => new nx(e), nX.decl = e => new rG(e), nX.rule = e => new nT(e), nX.root = e => new nO(e), nX.document = e => new ny(e), nX.CssSyntaxError = r_, nX.Declaration = rG, nX.Container = ng, nX.Processor = nY, nX.Document = ny, nX.Comment = nu, nX.Warning = nv, nX.AtRule = nx, nX.Result = nw, nX.Input = r7, nX.Rule = nT, nX.Root = nO, nX.Node = rW, nG.registerPostcss(nX), nX.default = nX;
    let n$ = nX && nX.__esModule && Object.prototype.hasOwnProperty.call(nX, "default") ? nX.default : nX;
    n$.stringify, n$.fromJSON, n$.plugin, n$.parse, n$.list, n$.document, n$.comment, n$.atRule, n$.rule, n$.decl, n$.root, n$.CssSyntaxError, n$.Declaration, n$.Container, n$.Processor, n$.Document, n$.Comment, n$.Warning, n$.AtRule, n$.Result, n$.Input, n$.Rule, n$.Root, n$.Node;
    var nK = ((oS = nK || {})[oS.Document = 0] = "Document", oS[oS.DocumentType = 1] = "DocumentType", oS[oS.Element = 2] = "Element", oS[oS.Text = 3] = "Text", oS[oS.CDATA = 4] = "CDATA", oS[oS.Comment = 5] = "Comment", oS);
    class nJ {
        constructor(...e) {
            rT(this, "parentElement", null), rT(this, "parentNode", null), rT(this, "ownerDocument"), rT(this, "firstChild", null), rT(this, "lastChild", null), rT(this, "previousSibling", null), rT(this, "nextSibling", null), rT(this, "ELEMENT_NODE", 1), rT(this, "TEXT_NODE", 3), rT(this, "nodeType"), rT(this, "nodeName"), rT(this, "RRNodeType")
        }
        get childNodes() {
            let e = [],
                t = this.firstChild;
            for (; t;) e.push(t), t = t.nextSibling;
            return e
        }
        contains(e) {
            if (!(e instanceof nJ) || e.ownerDocument !== this.ownerDocument) return !1;
            if (e === this) return !0;
            for (; e.parentNode;) {
                if (e.parentNode === this) return !0;
                e = e.parentNode
            }
            return !1
        }
        appendChild(e) {
            throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")
        }
        insertBefore(e, t) {
            throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")
        }
        removeChild(e) {
            throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")
        }
        toString() {
            return "RRNode"
        }
    }
    var nQ = ((oC = nQ || {})[oC.PLACEHOLDER = 0] = "PLACEHOLDER", oC[oC.ELEMENT_NODE = 1] = "ELEMENT_NODE", oC[oC.ATTRIBUTE_NODE = 2] = "ATTRIBUTE_NODE", oC[oC.TEXT_NODE = 3] = "TEXT_NODE", oC[oC.CDATA_SECTION_NODE = 4] = "CDATA_SECTION_NODE", oC[oC.ENTITY_REFERENCE_NODE = 5] = "ENTITY_REFERENCE_NODE", oC[oC.ENTITY_NODE = 6] = "ENTITY_NODE", oC[oC.PROCESSING_INSTRUCTION_NODE = 7] = "PROCESSING_INSTRUCTION_NODE", oC[oC.COMMENT_NODE = 8] = "COMMENT_NODE", oC[oC.DOCUMENT_NODE = 9] = "DOCUMENT_NODE", oC[oC.DOCUMENT_TYPE_NODE = 10] = "DOCUMENT_TYPE_NODE", oC[oC.DOCUMENT_FRAGMENT_NODE = 11] = "DOCUMENT_FRAGMENT_NODE", oC);
    let n0 = {
            Node: ["childNodes", "parentNode", "parentElement", "textContent"],
            ShadowRoot: ["host", "styleSheets"],
            Element: ["shadowRoot", "querySelector", "querySelectorAll"],
            MutationObserver: []
        },
        n1 = {
            Node: ["contains", "getRootNode"],
            ShadowRoot: ["getSelection"],
            Element: [],
            MutationObserver: ["constructor"]
        },
        n2 = {};

    function n3(e) {
        if (n2[e]) return n2[e];
        let t = globalThis[e],
            r = t.prototype,
            n = e in n0 ? n0[e] : void 0,
            i = !!(n && n.every(e => {
                var t, n;
                return !!(null == (n = null == (t = Object.getOwnPropertyDescriptor(r, e)) ? void 0 : t.get) ? void 0 : n.toString().includes("[native code]"))
            })),
            s = e in n1 ? n1[e] : void 0,
            o = !!(s && s.every(e => {
                var t;
                return "function" == typeof r[e] && (null == (t = r[e]) ? void 0 : t.toString().includes("[native code]"))
            }));
        if (i && o && !globalThis.Zone) return n2[e] = t.prototype, t.prototype;
        try {
            let n = document.createElement("iframe");
            document.body.appendChild(n);
            let i = n.contentWindow;
            if (!i) return t.prototype;
            let s = i[e].prototype;
            if (document.body.removeChild(n), !s) return r;
            return n2[e] = s
        } catch {
            return r
        }
    }
    let n5 = {};

    function n8(e, t, r) {
        var n;
        let i = `${e}.${String(r)}`;
        if (n5[i]) return n5[i].call(t);
        let s = null == (n = Object.getOwnPropertyDescriptor(n3(e), r)) ? void 0 : n.get;
        return s ? (n5[i] = s, s.call(t)) : t[r]
    }
    let n4 = {};

    function n9(e, t, r) {
        let n = `${e}.${String(r)}`;
        if (n4[n]) return n4[n].bind(t);
        let i = n3(e)[r];
        return "function" != typeof i ? t[r] : (n4[n] = i, i.bind(t))
    }
    let n6 = function(e) {
            return n8("Node", e, "childNodes")
        },
        n7 = function(e) {
            return n8("Node", e, "parentNode")
        },
        ie = function(e) {
            return n8("Node", e, "parentElement")
        },
        it = function(e) {
            return n8("Node", e, "textContent")
        },
        ir = function(e, t) {
            return n9("Node", e, "contains")(t)
        },
        ii = function(e) {
            return n9("Node", e, "getRootNode")()
        },
        is = function(e) {
            return e && "host" in e ? n8("ShadowRoot", e, "host") : null
        },
        io = function(e) {
            return e && "shadowRoot" in e ? n8("Element", e, "shadowRoot") : null
        };

    function ia(e, t, r = document) {
        let n = {
            capture: !0,
            passive: !0
        };
        return r.addEventListener(e, t, n), () => r.removeEventListener(e, t, n)
    }
    let il = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",
        ih = {
            map: {},
            getId: () => (console.error(il), -1),
            getNode: () => (console.error(il), null),
            removeNodeFromMap() {
                console.error(il)
            },
            has: () => (console.error(il), !1),
            reset() {
                console.error(il)
            }
        };

    function ic(e, t, r = {}) {
        let n = null,
            i = 0;
        return function(...s) {
            let o = Date.now();
            i || !1 !== r.leading || (i = o);
            let a = t - (o - i),
                l = this;
            a <= 0 || a > t ? (n && (clearTimeout(n), n = null), i = o, e.apply(l, s)) : n || !1 === r.trailing || (n = setTimeout(() => {
                i = !1 === r.leading ? 0 : Date.now(), n = null, e.apply(l, s)
            }, a))
        }
    }

    function iu(e, t, r, n, i = window) {
        let s = i.Object.getOwnPropertyDescriptor(e, t);
        return i.Object.defineProperty(e, t, n ? r : {
            set(e) {
                setTimeout(() => {
                    r.set.call(this, e)
                }, 0), s && s.set && s.set.call(this, e)
            }
        }), () => iu(e, t, s || {}, !0)
    }

    function id(e, t, r) {
        try {
            if (!(t in e)) return () => {};
            let n = e[t],
                i = r(n);
            return "function" == typeof i && (i.prototype = i.prototype || {}, Object.defineProperties(i, {
                __rrweb_original__: {
                    enumerable: !1,
                    value: n
                }
            })), e[t] = i, () => {
                e[t] = n
            }
        } catch {
            return () => {}
        }
    }
    "u" > typeof window && window.Proxy && window.Reflect && (ih = new Proxy(ih, {
        get: (e, t, r) => ("map" === t && console.error(il), Reflect.get(e, t, r))
    }));
    let ip = Date.now;

    function ig(e) {
        var t, r, n, i;
        let s = e.document;
        return {
            left: s.scrollingElement ? s.scrollingElement.scrollLeft : void 0 !== e.pageXOffset ? e.pageXOffset : s.documentElement.scrollLeft || (null == s ? void 0 : s.body) && (null == (t = ie(s.body)) ? void 0 : t.scrollLeft) || (null == (r = null == s ? void 0 : s.body) ? void 0 : r.scrollLeft) || 0,
            top: s.scrollingElement ? s.scrollingElement.scrollTop : void 0 !== e.pageYOffset ? e.pageYOffset : (null == s ? void 0 : s.documentElement.scrollTop) || (null == s ? void 0 : s.body) && (null == (n = ie(s.body)) ? void 0 : n.scrollTop) || (null == (i = null == s ? void 0 : s.body) ? void 0 : i.scrollTop) || 0
        }
    }

    function im() {
        return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight
    }

    function iy() {
        return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth
    }

    function iv(e) {
        return e ? e.nodeType === e.ELEMENT_NODE ? e : ie(e) : null
    }

    function iw(e, t, r, n) {
        if (!e) return !1;
        let i = iv(e);
        if (!i) return !1;
        try {
            if ("string" == typeof t) {
                if (i.classList.contains(t) || n && null !== i.closest("." + t)) return !0
            } else if (ts(i, t, n)) return !0
        } catch (e) {}
        return !!(r && (i.matches(r) || n && null !== i.closest(r))) || !1
    }

    function ib(e, t, r) {
        return "TITLE" === e.tagName && !!r.headTitleMutations || -2 === t.getId(e)
    }

    function iS(e) {
        return !!e.changedTouches
    }

    function iC(e, t) {
        return !!("IFRAME" === e.nodeName && t.getMeta(e))
    }

    function iI(e, t) {
        return !!("LINK" === e.nodeName && e.nodeType === e.ELEMENT_NODE && e.getAttribute && "stylesheet" === e.getAttribute("rel") && t.getMeta(e))
    }

    function iE(e) {
        return !!e && (e instanceof nJ && "shadowRoot" in e ? !!e.shadowRoot : !!io(e))
    }
    /[1-9][0-9]{12}/.test(Date.now().toString()) || (ip = () => new Date().getTime());
    class ix {
        constructor() {
            eO(this, "id", 1), eO(this, "styleIDMap", new WeakMap), eO(this, "idStyleMap", new Map)
        }
        getId(e) {
            return this.styleIDMap.get(e) ? ? -1
        }
        has(e) {
            return this.styleIDMap.has(e)
        }
        add(e, t) {
            let r;
            return this.has(e) ? this.getId(e) : (r = void 0 === t ? this.id++ : t, this.styleIDMap.set(e, r), this.idStyleMap.set(r, e), r)
        }
        getStyle(e) {
            return this.idStyleMap.get(e) || null
        }
        reset() {
            this.styleIDMap = new WeakMap, this.idStyleMap = new Map, this.id = 1
        }
        generateId() {
            return this.id++
        }
    }

    function ik(e) {
        var t;
        let r = null;
        return "getRootNode" in e && (null == (t = ii(e)) ? void 0 : t.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && is(ii(e)) && (r = is(ii(e))), r
    }

    function iO(e) {
        var t;
        let r, n = e.ownerDocument;
        return !!n && (ir(n, e) || !!(r = (t = e).ownerDocument) && ir(r, function(e) {
            let t, r = e;
            for (; t = ik(r);) r = t;
            return r
        }(t)))
    }
    var iM = ((oI = iM || {})[oI.DomContentLoaded = 0] = "DomContentLoaded", oI[oI.Load = 1] = "Load", oI[oI.FullSnapshot = 2] = "FullSnapshot", oI[oI.IncrementalSnapshot = 3] = "IncrementalSnapshot", oI[oI.Meta = 4] = "Meta", oI[oI.Custom = 5] = "Custom", oI[oI.Plugin = 6] = "Plugin", oI),
        iR = ((oE = iR || {})[oE.Mutation = 0] = "Mutation", oE[oE.MouseMove = 1] = "MouseMove", oE[oE.MouseInteraction = 2] = "MouseInteraction", oE[oE.Scroll = 3] = "Scroll", oE[oE.ViewportResize = 4] = "ViewportResize", oE[oE.Input = 5] = "Input", oE[oE.TouchMove = 6] = "TouchMove", oE[oE.MediaInteraction = 7] = "MediaInteraction", oE[oE.StyleSheetRule = 8] = "StyleSheetRule", oE[oE.CanvasMutation = 9] = "CanvasMutation", oE[oE.Font = 10] = "Font", oE[oE.Log = 11] = "Log", oE[oE.Drag = 12] = "Drag", oE[oE.StyleDeclaration = 13] = "StyleDeclaration", oE[oE.Selection = 14] = "Selection", oE[oE.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", oE[oE.CustomElement = 16] = "CustomElement", oE),
        iT = ((ox = iT || {})[ox.MouseUp = 0] = "MouseUp", ox[ox.MouseDown = 1] = "MouseDown", ox[ox.Click = 2] = "Click", ox[ox.ContextMenu = 3] = "ContextMenu", ox[ox.DblClick = 4] = "DblClick", ox[ox.Focus = 5] = "Focus", ox[ox.Blur = 6] = "Blur", ox[ox.TouchStart = 7] = "TouchStart", ox[ox.TouchMove_Departed = 8] = "TouchMove_Departed", ox[ox.TouchEnd = 9] = "TouchEnd", ox[ox.TouchCancel = 10] = "TouchCancel", ox),
        iA = ((ok = iA || {})[ok.Mouse = 0] = "Mouse", ok[ok.Pen = 1] = "Pen", ok[ok.Touch = 2] = "Touch", ok),
        iN = ((oO = iN || {})[oO["2D"] = 0] = "2D", oO[oO.WebGL = 1] = "WebGL", oO[oO.WebGL2 = 2] = "WebGL2", oO),
        iL = ((oM = iL || {})[oM.Play = 0] = "Play", oM[oM.Pause = 1] = "Pause", oM[oM.Seeked = 2] = "Seeked", oM[oM.VolumeChange = 3] = "VolumeChange", oM[oM.RateChange = 4] = "RateChange", oM),
        iD = ((oR = iD || {}).Start = "start", oR.Pause = "pause", oR.Resume = "resume", oR.Resize = "resize", oR.Finish = "finish", oR.FullsnapshotRebuilded = "fullsnapshot-rebuilded", oR.LoadStylesheetStart = "load-stylesheet-start", oR.LoadStylesheetEnd = "load-stylesheet-end", oR.SkipStart = "skip-start", oR.SkipEnd = "skip-end", oR.MouseInteraction = "mouse-interaction", oR.EventCast = "event-cast", oR.CustomEvent = "custom-event", oR.Flush = "flush", oR.StateChange = "state-change", oR.PlayBack = "play-back", oR.Destroy = "destroy", oR),
        iP = ((oT = iP || {})[oT.Document = 0] = "Document", oT[oT.DocumentType = 1] = "DocumentType", oT[oT.Element = 2] = "Element", oT[oT.Text = 3] = "Text", oT[oT.CDATA = 4] = "CDATA", oT[oT.Comment = 5] = "Comment", oT);
    class i_ {
        constructor() {
            eO(this, "length", 0), eO(this, "head", null), eO(this, "tail", null)
        }
        get(e) {
            if (e >= this.length) throw Error("Position outside of list range");
            let t = this.head;
            for (let r = 0; r < e; r++) t = (null == t ? void 0 : t.next) || null;
            return t
        }
        addNode(e) {
            let t = {
                value: e,
                previous: null,
                next: null
            };
            if (e.__ln = t, e.previousSibling && "__ln" in e.previousSibling) {
                let r = e.previousSibling.__ln.next;
                t.next = r, t.previous = e.previousSibling.__ln, e.previousSibling.__ln.next = t, r && (r.previous = t)
            } else if (e.nextSibling && "__ln" in e.nextSibling && e.nextSibling.__ln.previous) {
                let r = e.nextSibling.__ln.previous;
                t.previous = r, t.next = e.nextSibling.__ln, e.nextSibling.__ln.previous = t, r && (r.next = t)
            } else this.head && (this.head.previous = t), t.next = this.head, this.head = t;
            null === t.next && (this.tail = t), this.length++
        }
        removeNode(e) {
            let t = e.__ln;
            this.head && (t.previous ? (t.previous.next = t.next, t.next ? t.next.previous = t.previous : this.tail = t.previous) : (this.head = t.next, this.head ? this.head.previous = null : this.tail = null), e.__ln && delete e.__ln, this.length--)
        }
    }
    let iF = (e, t) => `${e}@${t}`;
    class iz {
        constructor() {
            eO(this, "frozen", !1), eO(this, "locked", !1), eO(this, "texts", []), eO(this, "attributes", []), eO(this, "attributeMap", new WeakMap), eO(this, "removes", []), eO(this, "mapRemoves", []), eO(this, "movedMap", {}), eO(this, "addedSet", new Set), eO(this, "movedSet", new Set), eO(this, "droppedSet", new Set), eO(this, "removesSubTreeCache", new Set), eO(this, "mutationCb"), eO(this, "blockClass"), eO(this, "blockSelector"), eO(this, "maskTextClass"), eO(this, "maskTextSelector"), eO(this, "inlineStylesheet"), eO(this, "maskInputOptions"), eO(this, "maskTextFn"), eO(this, "maskInputFn"), eO(this, "keepIframeSrcFn"), eO(this, "recordCanvas"), eO(this, "inlineImages"), eO(this, "slimDOMOptions"), eO(this, "dataURLOptions"), eO(this, "doc"), eO(this, "mirror"), eO(this, "iframeManager"), eO(this, "stylesheetManager"), eO(this, "shadowDomManager"), eO(this, "canvasManager"), eO(this, "processedNodeManager"), eO(this, "unattachedDoc"), eO(this, "processMutations", e => {
                e.forEach(this.processMutation), this.emit()
            }), eO(this, "emit", () => {
                if (this.frozen || this.locked) return;
                let e = [],
                    t = new Set,
                    r = new i_,
                    n = e => {
                        let t = e,
                            r = -2;
                        for (; - 2 === r;) r = (t = t && t.nextSibling) && this.mirror.getId(t);
                        return r
                    },
                    i = i => {
                        let s = n7(i);
                        if (!s || !iO(i)) return;
                        let o = !1;
                        if (i.nodeType === Node.TEXT_NODE) {
                            let e = s.tagName;
                            if ("TEXTAREA" === e) return;
                            "STYLE" === e && this.addedSet.has(s) && (o = !0)
                        }
                        let a = eW(s) ? this.mirror.getId(ik(i)) : this.mirror.getId(s),
                            l = n(i);
                        if (-1 === a || -1 === l) return r.addNode(i);
                        let h = tl(i, {
                            doc: this.doc,
                            mirror: this.mirror,
                            blockClass: this.blockClass,
                            blockSelector: this.blockSelector,
                            maskTextClass: this.maskTextClass,
                            maskTextSelector: this.maskTextSelector,
                            skipChild: !0,
                            newlyAddedElement: !0,
                            inlineStylesheet: this.inlineStylesheet,
                            maskInputOptions: this.maskInputOptions,
                            maskTextFn: this.maskTextFn,
                            maskInputFn: this.maskInputFn,
                            slimDOMOptions: this.slimDOMOptions,
                            dataURLOptions: this.dataURLOptions,
                            recordCanvas: this.recordCanvas,
                            inlineImages: this.inlineImages,
                            onSerialize: e => {
                                iC(e, this.mirror) && this.iframeManager.addIframe(e), iI(e, this.mirror) && this.stylesheetManager.trackLinkElement(e), iE(i) && this.shadowDomManager.addShadowRoot(io(i), this.doc)
                            },
                            onIframeLoad: (e, t) => {
                                this.iframeManager.attachIframe(e, t), this.shadowDomManager.observeAttachShadow(e)
                            },
                            onStylesheetLoad: (e, t) => {
                                this.stylesheetManager.attachLinkElement(e, t)
                            },
                            cssCaptured: o
                        });
                        h && (e.push({
                            parentId: a,
                            nextId: l,
                            node: h
                        }), t.add(h.id))
                    };
                for (; this.mapRemoves.length;) this.mirror.removeNodeFromMap(this.mapRemoves.shift());
                for (let e of this.movedSet)(!ij(this.removesSubTreeCache, e, this.mirror) || this.movedSet.has(n7(e))) && i(e);
                for (let e of this.addedSet) iB(this.droppedSet, e) || ij(this.removesSubTreeCache, e, this.mirror) ? iB(this.movedSet, e) ? i(e) : this.droppedSet.add(e) : i(e);
                let s = null;
                for (; r.length;) {
                    let e = null;
                    if (s) {
                        let t = this.mirror.getId(n7(s.value)),
                            r = n(s.value); - 1 !== t && -1 !== r && (e = s)
                    }
                    if (!e) {
                        let t = r.tail;
                        for (; t;) {
                            let r = t;
                            if (t = t.previous, r) {
                                let t = this.mirror.getId(n7(r.value));
                                if (-1 === n(r.value)) continue;
                                if (-1 !== t) {
                                    e = r;
                                    break
                                } {
                                    let t = n7(r.value);
                                    if (t && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
                                        let n = is(t);
                                        if (-1 !== this.mirror.getId(n)) {
                                            e = r;
                                            break
                                        }
                                    }
                                }
                            }
                        }
                    }
                    if (!e) {
                        for (; r.head;) r.removeNode(r.head.value);
                        break
                    }
                    s = e.previous, r.removeNode(e.value), i(e.value)
                }
                let o = {
                    texts: this.texts.map(e => {
                        let t = e.node,
                            r = n7(t);
                        return r && "TEXTAREA" === r.tagName && this.genTextAreaValueMutation(r), {
                            id: this.mirror.getId(t),
                            value: e.value
                        }
                    }).filter(e => !t.has(e.id)).filter(e => this.mirror.has(e.id)),
                    attributes: this.attributes.map(e => {
                        let {
                            attributes: t
                        } = e;
                        if ("string" == typeof t.style) {
                            let r = JSON.stringify(e.styleDiff),
                                n = JSON.stringify(e._unchangedStyles);
                            r.length < t.style.length && (r + n).split("var(").length === t.style.split("var(").length && (t.style = e.styleDiff)
                        }
                        return {
                            id: this.mirror.getId(e.node),
                            attributes: t
                        }
                    }).filter(e => !t.has(e.id)).filter(e => this.mirror.has(e.id)),
                    removes: this.removes,
                    adds: e
                };
                (o.texts.length || o.attributes.length || o.removes.length || o.adds.length) && (this.texts = [], this.attributes = [], this.attributeMap = new WeakMap, this.removes = [], this.addedSet = new Set, this.movedSet = new Set, this.droppedSet = new Set, this.removesSubTreeCache = new Set, this.movedMap = {}, this.mutationCb(o))
            }), eO(this, "genTextAreaValueMutation", e => {
                let t = this.attributeMap.get(e);
                t || (t = {
                    node: e,
                    attributes: {},
                    styleDiff: {},
                    _unchangedStyles: {}
                }, this.attributes.push(t), this.attributeMap.set(e, t)), t.attributes.value = Array.from(n6(e), e => it(e) || "").join("")
            }), eO(this, "processMutation", e => {
                if (!ib(e.target, this.mirror, this.slimDOMOptions)) switch (e.type) {
                    case "characterData":
                        {
                            let t = it(e.target);iw(e.target, this.blockClass, this.blockSelector, !1) || t === e.oldValue || this.texts.push({
                                value: to(e.target, this.maskTextClass, this.maskTextSelector, !0) && t ? this.maskTextFn ? this.maskTextFn(t, iv(e.target)) : t.replace(/[\S]/g, "*") : t,
                                node: e.target
                            });
                            break
                        }
                    case "attributes":
                        {
                            let t = e.target,
                                r = e.attributeName,
                                n = e.target.getAttribute(r);
                            if ("value" === r) {
                                let e = eK(t);
                                n = eq({
                                    element: t,
                                    maskInputOptions: this.maskInputOptions,
                                    tagName: t.tagName,
                                    type: e,
                                    value: n,
                                    maskInputFn: this.maskInputFn
                                })
                            }
                            if (iw(e.target, this.blockClass, this.blockSelector, !1) || n === e.oldValue) return;
                            let i = this.attributeMap.get(e.target);
                            if ("IFRAME" === t.tagName && "src" === r && !this.keepIframeSrcFn(n))
                                if (t.contentDocument) return;
                                else r = "rr_src";
                            if (i || (i = {
                                    node: e.target,
                                    attributes: {},
                                    styleDiff: {},
                                    _unchangedStyles: {}
                                }, this.attributes.push(i), this.attributeMap.set(e.target, i)), "type" === r && "INPUT" === t.tagName && "password" === (e.oldValue || "").toLowerCase() && t.setAttribute("data-rr-is-password", "true"), !ti(t.tagName, r))
                                if (i.attributes[r] = tn(this.doc, eX(t.tagName), eX(r), n), "style" === r) {
                                    if (!this.unattachedDoc) try {
                                        this.unattachedDoc = document.implementation.createHTMLDocument()
                                    } catch (e) {
                                        this.unattachedDoc = this.doc
                                    }
                                    let r = this.unattachedDoc.createElement("span");
                                    for (let n of (e.oldValue && r.setAttribute("style", e.oldValue), Array.from(t.style))) {
                                        let e = t.style.getPropertyValue(n),
                                            s = t.style.getPropertyPriority(n);
                                        e !== r.style.getPropertyValue(n) || s !== r.style.getPropertyPriority(n) ? "" === s ? i.styleDiff[n] = e : i.styleDiff[n] = [e, s] : i._unchangedStyles[n] = [e, s]
                                    }
                                    for (let e of Array.from(r.style)) "" === t.style.getPropertyValue(e) && (i.styleDiff[e] = !1)
                                } else "open" === r && "DIALOG" === t.tagName && (t.matches("dialog:modal") ? i.attributes.rr_open_mode = "modal" : i.attributes.rr_open_mode = "non-modal");
                            break
                        }
                    case "childList":
                        if (iw(e.target, this.blockClass, this.blockSelector, !0)) return;
                        if ("TEXTAREA" === e.target.tagName) return void this.genTextAreaValueMutation(e.target);
                        e.addedNodes.forEach(t => this.genAdds(t, e.target)), e.removedNodes.forEach(t => {
                            let r = this.mirror.getId(t),
                                n = eW(e.target) ? this.mirror.getId(is(e.target)) : this.mirror.getId(e.target);
                            iw(e.target, this.blockClass, this.blockSelector, !1) || ib(t, this.mirror, this.slimDOMOptions) || -1 === this.mirror.getId(t) || (this.addedSet.has(t) ? (iU(this.addedSet, t), this.droppedSet.add(t)) : this.addedSet.has(e.target) && -1 === r || function e(t, r) {
                                if (eW(t)) return !1;
                                let n = r.getId(t);
                                if (!r.has(n)) return !0;
                                let i = n7(t);
                                return (!i || i.nodeType !== t.DOCUMENT_NODE) && (!i || e(i, r))
                            }(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[iF(r, n)] ? iU(this.movedSet, t) : (this.removes.push({
                                parentId: n,
                                id: r,
                                isShadow: !!(eW(e.target) && eV(e.target)) || void 0
                            }), function(e, t) {
                                let r = [e];
                                for (; r.length;) {
                                    let e = r.pop();
                                    t.has(e) || (t.add(e), n6(e).forEach(e => r.push(e)))
                                }
                            }(t, this.removesSubTreeCache))), this.mapRemoves.push(t))
                        })
                }
            }), eO(this, "genAdds", (e, t) => {
                if (!this.processedNodeManager.inOtherBuffer(e, this) && !(this.addedSet.has(e) || this.movedSet.has(e))) {
                    if (this.mirror.hasNode(e)) {
                        if (ib(e, this.mirror, this.slimDOMOptions)) return;
                        this.movedSet.add(e);
                        let r = null;
                        t && this.mirror.hasNode(t) && (r = this.mirror.getId(t)), r && -1 !== r && (this.movedMap[iF(this.mirror.getId(e), r)] = !0)
                    } else this.addedSet.add(e), this.droppedSet.delete(e);
                    !iw(e, this.blockClass, this.blockSelector, !1) && (n6(e).forEach(e => this.genAdds(e)), iE(e) && n6(io(e)).forEach(t => {
                        this.processedNodeManager.add(t, this), this.genAdds(t, e)
                    }))
                }
            })
        }
        init(e) {
            ["mutationCb", "blockClass", "blockSelector", "maskTextClass", "maskTextSelector", "inlineStylesheet", "maskInputOptions", "maskTextFn", "maskInputFn", "keepIframeSrcFn", "recordCanvas", "inlineImages", "slimDOMOptions", "dataURLOptions", "doc", "mirror", "iframeManager", "stylesheetManager", "shadowDomManager", "canvasManager", "processedNodeManager"].forEach(t => {
                this[t] = e[t]
            })
        }
        freeze() {
            this.frozen = !0, this.canvasManager.freeze()
        }
        unfreeze() {
            this.frozen = !1, this.canvasManager.unfreeze(), this.emit()
        }
        isFrozen() {
            return this.frozen
        }
        lock() {
            this.locked = !0, this.canvasManager.lock()
        }
        unlock() {
            this.locked = !1, this.canvasManager.unlock(), this.emit()
        }
        reset() {
            this.shadowDomManager.reset(), this.canvasManager.reset()
        }
    }

    function iU(e, t) {
        e.delete(t), n6(t).forEach(t => iU(e, t))
    }

    function ij(e, t, r) {
        var n;
        let i;
        return 0 !== e.size && (n = e, !!(i = n7(t)) && n.has(i))
    }

    function iB(e, t) {
        return 0 !== e.size && function e(t, r) {
            let n = n7(r);
            return !!n && (!!t.has(n) || e(t, n))
        }(e, t)
    }
    let iH = e => w ? (...t) => {
            try {
                return e(...t)
            } catch (e) {
                if (w && !0 === w(e)) return;
                throw e
            }
        } : e,
        iW = [];

    function iV(e) {
        try {
            if ("composedPath" in e) {
                let t = e.composedPath();
                if (t.length) return t[0]
            } else if ("path" in e && e.path.length) return e.path[0]
        } catch {}
        return e && e.target
    }

    function iG(e, t) {
        let r = new iz;
        iW.push(r), r.init(e);
        let n = new(n3("MutationObserver")).constructor(iH(r.processMutations.bind(r)));
        return n.observe(t, {
            attributes: !0,
            attributeOldValue: !0,
            characterData: !0,
            characterDataOldValue: !0,
            childList: !0,
            subtree: !0
        }), n
    }

    function iZ({
        scrollCb: e,
        doc: t,
        mirror: r,
        blockClass: n,
        blockSelector: i,
        sampling: s
    }) {
        return ia("scroll", iH(ic(iH(s => {
            let o = iV(s);
            if (!o || iw(o, n, i, !0)) return;
            let a = r.getId(o);
            if (o === t && t.defaultView) {
                let r = ig(t.defaultView);
                e({
                    id: a,
                    x: r.left,
                    y: r.top
                })
            } else e({
                id: a,
                x: o.scrollLeft,
                y: o.scrollTop
            })
        }), s.scroll || 100)), t)
    }
    let iY = ["INPUT", "TEXTAREA", "SELECT"],
        iq = new WeakMap;

    function iX(e) {
        var t = [];
        if (iQ("CSSGroupingRule") && e.parentRule instanceof CSSGroupingRule || iQ("CSSMediaRule") && e.parentRule instanceof CSSMediaRule || iQ("CSSSupportsRule") && e.parentRule instanceof CSSSupportsRule || iQ("CSSConditionRule") && e.parentRule instanceof CSSConditionRule) {
            let r = Array.from(e.parentRule.cssRules).indexOf(e);
            t.unshift(r)
        } else if (e.parentStyleSheet) {
            let r = Array.from(e.parentStyleSheet.cssRules).indexOf(e);
            t.unshift(r)
        }
        return t
    }

    function i$(e, t, r) {
        let n, i;
        return e ? (e.ownerNode ? n = t.getId(e.ownerNode) : i = r.getId(e), {
            styleId: i,
            id: n
        }) : {}
    }

    function iK({
        mirror: e,
        stylesheetManager: t
    }, r) {
        var n, i, s;
        let o = null;
        o = "#document" === r.nodeName ? e.getId(r) : e.getId(is(r));
        let a = "#document" === r.nodeName ? null == (n = r.defaultView) ? void 0 : n.Document : null == (s = null == (i = r.ownerDocument) ? void 0 : i.defaultView) ? void 0 : s.ShadowRoot,
            l = (null == a ? void 0 : a.prototype) ? Object.getOwnPropertyDescriptor(null == a ? void 0 : a.prototype, "adoptedStyleSheets") : void 0;
        return null !== o && -1 !== o && a && l ? (Object.defineProperty(r, "adoptedStyleSheets", {
            configurable: l.configurable,
            enumerable: l.enumerable,
            get() {
                var e;
                return null == (e = l.get) ? void 0 : e.call(this)
            },
            set(e) {
                var r;
                let n = null == (r = l.set) ? void 0 : r.call(this, e);
                if (null !== o && -1 !== o) try {
                    t.adoptStyleSheets(e, o)
                } catch (e) {}
                return n
            }
        }), iH(() => {
            Object.defineProperty(r, "adoptedStyleSheets", {
                configurable: l.configurable,
                enumerable: l.enumerable,
                get: l.get,
                set: l.set
            })
        })) : () => {}
    }

    function iJ(e, t = {}) {
        let r, n = e.doc.defaultView;
        if (!n) return () => {};
        ! function(e, t) {
            let {
                mutationCb: r,
                mousemoveCb: n,
                mouseInteractionCb: i,
                scrollCb: s,
                viewportResizeCb: o,
                inputCb: a,
                mediaInteractionCb: l,
                styleSheetRuleCb: h,
                styleDeclarationCb: c,
                canvasMutationCb: u,
                fontCb: d,
                selectionCb: p,
                customElementCb: f
            } = e;
            e.mutationCb = (...e) => {
                t.mutation && t.mutation(...e), r(...e)
            }, e.mousemoveCb = (...e) => {
                t.mousemove && t.mousemove(...e), n(...e)
            }, e.mouseInteractionCb = (...e) => {
                t.mouseInteraction && t.mouseInteraction(...e), i(...e)
            }, e.scrollCb = (...e) => {
                t.scroll && t.scroll(...e), s(...e)
            }, e.viewportResizeCb = (...e) => {
                t.viewportResize && t.viewportResize(...e), o(...e)
            }, e.inputCb = (...e) => {
                t.input && t.input(...e), a(...e)
            }, e.mediaInteractionCb = (...e) => {
                t.mediaInteaction && t.mediaInteaction(...e), l(...e)
            }, e.styleSheetRuleCb = (...e) => {
                t.styleSheetRule && t.styleSheetRule(...e), h(...e)
            }, e.styleDeclarationCb = (...e) => {
                t.styleDeclaration && t.styleDeclaration(...e), c(...e)
            }, e.canvasMutationCb = (...e) => {
                t.canvasMutation && t.canvasMutation(...e), u(...e)
            }, e.fontCb = (...e) => {
                t.font && t.font(...e), d(...e)
            }, e.selectionCb = (...e) => {
                t.selection && t.selection(...e), p(...e)
            }, e.customElementCb = (...e) => {
                t.customElement && t.customElement(...e), f(...e)
            }
        }(e, t), e.recordDOM && (r = iG(e, e.doc));
        let i = function({
                mousemoveCb: e,
                sampling: t,
                doc: r,
                mirror: n
            }) {
                let i;
                if (!1 === t.mousemove) return () => {};
                let s = "number" == typeof t.mousemove ? t.mousemove : 50,
                    o = "number" == typeof t.mousemoveCallback ? t.mousemoveCallback : 500,
                    a = [],
                    l = ic(iH(t => {
                        let r = Date.now() - i;
                        e(a.map(e => (e.timeOffset -= r, e)), t), a = [], i = null
                    }), o),
                    h = iH(ic(iH(e => {
                        let t = iV(e),
                            {
                                clientX: r,
                                clientY: s
                            } = iS(e) ? e.changedTouches[0] : e;
                        i || (i = ip()), a.push({
                            x: r,
                            y: s,
                            id: n.getId(t),
                            timeOffset: ip() - i
                        }), l("u" > typeof DragEvent && e instanceof DragEvent ? iR.Drag : e instanceof MouseEvent ? iR.MouseMove : iR.TouchMove)
                    }), s, {
                        trailing: !1
                    })),
                    c = [ia("mousemove", h, r), ia("touchmove", h, r), ia("drag", h, r)];
                return iH(() => {
                    c.forEach(e => e())
                })
            }(e),
            s = function({
                mouseInteractionCb: e,
                doc: t,
                mirror: r,
                blockClass: n,
                blockSelector: i,
                sampling: s
            }) {
                if (!1 === s.mouseInteraction) return () => {};
                let o = !0 === s.mouseInteraction || void 0 === s.mouseInteraction ? {} : s.mouseInteraction,
                    a = [],
                    l = null;
                return Object.keys(iT).filter(e => Number.isNaN(Number(e)) && !e.endsWith("_Departed") && !1 !== o[e]).forEach(s => {
                    let o = eX(s),
                        h = t => {
                            let o = iV(t);
                            if (iw(o, n, i, !0)) return;
                            let a = null,
                                h = s;
                            if ("pointerType" in t) {
                                switch (t.pointerType) {
                                    case "mouse":
                                        a = iA.Mouse;
                                        break;
                                    case "touch":
                                        a = iA.Touch;
                                        break;
                                    case "pen":
                                        a = iA.Pen
                                }
                                a === iA.Touch ? iT[s] === iT.MouseDown ? h = "TouchStart" : iT[s] === iT.MouseUp && (h = "TouchEnd") : iA.Pen
                            } else iS(t) && (a = iA.Touch);
                            null !== a ? (l = a, (h.startsWith("Touch") && a === iA.Touch || h.startsWith("Mouse") && a === iA.Mouse) && (a = null)) : iT[s] === iT.Click && (a = l, l = null);
                            let c = iS(t) ? t.changedTouches[0] : t;
                            if (!c) return;
                            let u = r.getId(o),
                                {
                                    clientX: d,
                                    clientY: p
                                } = c;
                            iH(e)({
                                type: iT[h],
                                id: u,
                                x: d,
                                y: p,
                                ...null !== a && {
                                    pointerType: a
                                }
                            })
                        };
                    if (window.PointerEvent) switch (iT[s]) {
                        case iT.MouseDown:
                        case iT.MouseUp:
                            o = o.replace("mouse", "pointer");
                            break;
                        case iT.TouchStart:
                        case iT.TouchEnd:
                            return
                    }
                    a.push(ia(o, h, t))
                }), iH(() => {
                    a.forEach(e => e())
                })
            }(e),
            o = iZ(e),
            a = function({
                viewportResizeCb: e
            }, {
                win: t
            }) {
                let r = -1,
                    n = -1;
                return ia("resize", iH(ic(iH(() => {
                    let t = im(),
                        i = iy();
                    (r !== t || n !== i) && (e({
                        width: Number(i),
                        height: Number(t)
                    }), r = t, n = i)
                }), 200)), t)
            }(e, {
                win: n
            }),
            l = function({
                inputCb: e,
                doc: t,
                mirror: r,
                blockClass: n,
                blockSelector: i,
                ignoreClass: s,
                ignoreSelector: o,
                maskInputOptions: a,
                maskInputFn: l,
                sampling: h,
                userTriggeredOnInput: c
            }) {
                function u(e) {
                    let r = iV(e),
                        h = e.isTrusted,
                        u = r && r.tagName;
                    if (r && "OPTION" === u && (r = ie(r)), !r || !u || 0 > iY.indexOf(u) || iw(r, n, i, !0) || r.classList.contains(s) || o && r.matches(o)) return;
                    let p = r.value,
                        f = !1,
                        g = eK(r) || "";
                    "radio" === g || "checkbox" === g ? f = r.checked : (a[u.toLowerCase()] || a[g]) && (p = eq({
                        element: r,
                        maskInputOptions: a,
                        tagName: u,
                        type: g,
                        value: p,
                        maskInputFn: l
                    })), d(r, c ? {
                        text: p,
                        isChecked: f,
                        userTriggered: h
                    } : {
                        text: p,
                        isChecked: f
                    });
                    let m = r.name;
                    "radio" === g && m && f && t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach(e => {
                        if (e !== r) {
                            let t = e.value;
                            d(e, c ? {
                                text: t,
                                isChecked: !f,
                                userTriggered: !1
                            } : {
                                text: t,
                                isChecked: !f
                            })
                        }
                    })
                }

                function d(t, n) {
                    let i = iq.get(t);
                    if (!i || i.text !== n.text || i.isChecked !== n.isChecked) {
                        iq.set(t, n);
                        let i = r.getId(t);
                        iH(e)({ ...n,
                            id: i
                        })
                    }
                }
                let p = ("last" === h.input ? ["change"] : ["input", "change"]).map(e => ia(e, iH(u), t)),
                    f = t.defaultView;
                if (!f) return () => {
                    p.forEach(e => e())
                };
                let g = f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype, "value"),
                    m = [
                        [f.HTMLInputElement.prototype, "value"],
                        [f.HTMLInputElement.prototype, "checked"],
                        [f.HTMLSelectElement.prototype, "value"],
                        [f.HTMLTextAreaElement.prototype, "value"],
                        [f.HTMLSelectElement.prototype, "selectedIndex"],
                        [f.HTMLOptionElement.prototype, "selected"]
                    ];
                return g && g.set && p.push(...m.map(e => iu(e[0], e[1], {
                    set() {
                        iH(u)({
                            target: this,
                            isTrusted: !1
                        })
                    }
                }, !1, f))), iH(() => {
                    p.forEach(e => e())
                })
            }(e),
            h = function({
                mediaInteractionCb: e,
                blockClass: t,
                blockSelector: r,
                mirror: n,
                sampling: i,
                doc: s
            }) {
                let o = iH(s => ic(iH(i => {
                        let o = iV(i);
                        if (!o || iw(o, t, r, !0)) return;
                        let {
                            currentTime: a,
                            volume: l,
                            muted: h,
                            playbackRate: c,
                            loop: u
                        } = o;
                        e({
                            type: s,
                            id: n.getId(o),
                            currentTime: a,
                            volume: l,
                            muted: h,
                            playbackRate: c,
                            loop: u
                        })
                    }), i.media || 500)),
                    a = [ia("play", o(iL.Play), s), ia("pause", o(iL.Pause), s), ia("seeked", o(iL.Seeked), s), ia("volumechange", o(iL.VolumeChange), s), ia("ratechange", o(iL.RateChange), s)];
                return iH(() => {
                    a.forEach(e => e())
                })
            }(e),
            c = () => {},
            u = () => {},
            d = () => {},
            p = () => {};
        e.recordDOM && (c = function({
            styleSheetRuleCb: e,
            mirror: t,
            stylesheetManager: r
        }, {
            win: n
        }) {
            let i, s;
            if (!n.CSSStyleSheet || !n.CSSStyleSheet.prototype) return () => {};
            let o = n.CSSStyleSheet.prototype.insertRule;
            n.CSSStyleSheet.prototype.insertRule = new Proxy(o, {
                apply: iH((n, i, s) => {
                    let [o, a] = s, {
                        id: l,
                        styleId: h
                    } = i$(i, t, r.styleMirror);
                    return (l && -1 !== l || h && -1 !== h) && e({
                        id: l,
                        styleId: h,
                        adds: [{
                            rule: o,
                            index: a
                        }]
                    }), n.apply(i, s)
                })
            }), n.CSSStyleSheet.prototype.addRule = function(e, t, r = this.cssRules.length) {
                let i = `${e} { ${t} }`;
                return n.CSSStyleSheet.prototype.insertRule.apply(this, [i, r])
            };
            let a = n.CSSStyleSheet.prototype.deleteRule;
            n.CSSStyleSheet.prototype.deleteRule = new Proxy(a, {
                apply: iH((n, i, s) => {
                    let [o] = s, {
                        id: a,
                        styleId: l
                    } = i$(i, t, r.styleMirror);
                    return (a && -1 !== a || l && -1 !== l) && e({
                        id: a,
                        styleId: l,
                        removes: [{
                            index: o
                        }]
                    }), n.apply(i, s)
                })
            }), n.CSSStyleSheet.prototype.removeRule = function(e) {
                return n.CSSStyleSheet.prototype.deleteRule.apply(this, [e])
            }, n.CSSStyleSheet.prototype.replace && (i = n.CSSStyleSheet.prototype.replace, n.CSSStyleSheet.prototype.replace = new Proxy(i, {
                apply: iH((n, i, s) => {
                    let [o] = s, {
                        id: a,
                        styleId: l
                    } = i$(i, t, r.styleMirror);
                    return (a && -1 !== a || l && -1 !== l) && e({
                        id: a,
                        styleId: l,
                        replace: o
                    }), n.apply(i, s)
                })
            })), n.CSSStyleSheet.prototype.replaceSync && (s = n.CSSStyleSheet.prototype.replaceSync, n.CSSStyleSheet.prototype.replaceSync = new Proxy(s, {
                apply: iH((n, i, s) => {
                    let [o] = s, {
                        id: a,
                        styleId: l
                    } = i$(i, t, r.styleMirror);
                    return (a && -1 !== a || l && -1 !== l) && e({
                        id: a,
                        styleId: l,
                        replaceSync: o
                    }), n.apply(i, s)
                })
            }));
            let l = {};
            i0("CSSGroupingRule") ? l.CSSGroupingRule = n.CSSGroupingRule : (i0("CSSMediaRule") && (l.CSSMediaRule = n.CSSMediaRule), i0("CSSConditionRule") && (l.CSSConditionRule = n.CSSConditionRule), i0("CSSSupportsRule") && (l.CSSSupportsRule = n.CSSSupportsRule));
            let h = {};
            return Object.entries(l).forEach(([n, i]) => {
                h[n] = {
                    insertRule: i.prototype.insertRule,
                    deleteRule: i.prototype.deleteRule
                }, i.prototype.insertRule = new Proxy(h[n].insertRule, {
                    apply: iH((n, i, s) => {
                        let [o, a] = s, {
                            id: l,
                            styleId: h
                        } = i$(i.parentStyleSheet, t, r.styleMirror);
                        return (l && -1 !== l || h && -1 !== h) && e({
                            id: l,
                            styleId: h,
                            adds: [{
                                rule: o,
                                index: [...iX(i), a || 0]
                            }]
                        }), n.apply(i, s)
                    })
                }), i.prototype.deleteRule = new Proxy(h[n].deleteRule, {
                    apply: iH((n, i, s) => {
                        let [o] = s, {
                            id: a,
                            styleId: l
                        } = i$(i.parentStyleSheet, t, r.styleMirror);
                        return (a && -1 !== a || l && -1 !== l) && e({
                            id: a,
                            styleId: l,
                            removes: [{
                                index: [...iX(i), o]
                            }]
                        }), n.apply(i, s)
                    })
                })
            }), iH(() => {
                n.CSSStyleSheet.prototype.insertRule = o, n.CSSStyleSheet.prototype.deleteRule = a, i && (n.CSSStyleSheet.prototype.replace = i), s && (n.CSSStyleSheet.prototype.replaceSync = s), Object.entries(l).forEach(([e, t]) => {
                    t.prototype.insertRule = h[e].insertRule, t.prototype.deleteRule = h[e].deleteRule
                })
            })
        }(e, {
            win: n
        }), u = iK(e, e.doc), d = function({
            styleDeclarationCb: e,
            mirror: t,
            ignoreCSSAttributes: r,
            stylesheetManager: n
        }, {
            win: i
        }) {
            let s = i.CSSStyleDeclaration.prototype.setProperty;
            i.CSSStyleDeclaration.prototype.setProperty = new Proxy(s, {
                apply: iH((i, o, a) => {
                    var l;
                    let [h, c, u] = a;
                    if (r.has(h)) return s.apply(o, [h, c, u]);
                    let {
                        id: d,
                        styleId: p
                    } = i$(null == (l = o.parentRule) ? void 0 : l.parentStyleSheet, t, n.styleMirror);
                    return (d && -1 !== d || p && -1 !== p) && e({
                        id: d,
                        styleId: p,
                        set: {
                            property: h,
                            value: c,
                            priority: u
                        },
                        index: iX(o.parentRule)
                    }), i.apply(o, a)
                })
            });
            let o = i.CSSStyleDeclaration.prototype.removeProperty;
            return i.CSSStyleDeclaration.prototype.removeProperty = new Proxy(o, {
                apply: iH((i, s, a) => {
                    var l;
                    let [h] = a;
                    if (r.has(h)) return o.apply(s, [h]);
                    let {
                        id: c,
                        styleId: u
                    } = i$(null == (l = s.parentRule) ? void 0 : l.parentStyleSheet, t, n.styleMirror);
                    return (c && -1 !== c || u && -1 !== u) && e({
                        id: c,
                        styleId: u,
                        remove: {
                            property: h
                        },
                        index: iX(s.parentRule)
                    }), i.apply(s, a)
                })
            }), iH(() => {
                i.CSSStyleDeclaration.prototype.setProperty = s, i.CSSStyleDeclaration.prototype.removeProperty = o
            })
        }(e, {
            win: n
        }), e.collectFonts && (p = function({
            fontCb: e,
            doc: t
        }) {
            let r = t.defaultView;
            if (!r) return () => {};
            let n = [],
                i = new WeakMap,
                s = r.FontFace;
            r.FontFace = function(e, t, r) {
                let n = new s(e, t, r);
                return i.set(n, {
                    family: e,
                    buffer: "string" != typeof t,
                    descriptors: r,
                    fontSource: "string" == typeof t ? t : JSON.stringify(Array.from(new Uint8Array(t)))
                }), n
            };
            let o = id(t.fonts, "add", function(t) {
                return function(r) {
                    return setTimeout(iH(() => {
                        let t = i.get(r);
                        t && (e(t), i.delete(r))
                    }), 0), t.apply(this, [r])
                }
            });
            return n.push(() => {
                r.FontFace = s
            }), n.push(o), iH(() => {
                n.forEach(e => e())
            })
        }(e)));
        let f = function(e) {
                let {
                    doc: t,
                    mirror: r,
                    blockClass: n,
                    blockSelector: i,
                    selectionCb: s
                } = e, o = !0, a = iH(() => {
                    let e = t.getSelection();
                    if (!e || o && (null == e ? void 0 : e.isCollapsed)) return;
                    o = e.isCollapsed || !1;
                    let a = [],
                        l = e.rangeCount || 0;
                    for (let t = 0; t < l; t++) {
                        let {
                            startContainer: s,
                            startOffset: o,
                            endContainer: l,
                            endOffset: h
                        } = e.getRangeAt(t);
                        iw(s, n, i, !0) || iw(l, n, i, !0) || a.push({
                            start: r.getId(s),
                            startOffset: o,
                            end: r.getId(l),
                            endOffset: h
                        })
                    }
                    s({
                        ranges: a
                    })
                });
                return a(), ia("selectionchange", a)
            }(e),
            g = function({
                doc: e,
                customElementCb: t
            }) {
                let r = e.defaultView;
                return r && r.customElements ? id(r.customElements, "define", function(e) {
                    return function(r, n, i) {
                        try {
                            t({
                                define: {
                                    name: r
                                }
                            })
                        } catch (e) {
                            console.warn(`Custom element callback failed for ${r}`)
                        }
                        return e.apply(this, [r, n, i])
                    }
                }) : () => {}
            }(e),
            m = [];
        for (let t of e.plugins) m.push(t.observer(t.callback, n, t.options));
        return iH(() => {
            iW.forEach(e => e.reset()), null == r || r.disconnect(), i(), s(), o(), a(), l(), h(), c(), u(), d(), p(), f(), g(), m.forEach(e => e())
        })
    }

    function iQ(e) {
        return void 0 !== window[e]
    }

    function i0(e) {
        return !!(void 0 !== window[e] && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype)
    }
    class i1 {
        constructor(e) {
            eO(this, "iframeIdToRemoteIdMap", new WeakMap), eO(this, "iframeRemoteIdToIdMap", new WeakMap), this.generateIdFn = e
        }
        getId(e, t, r, n) {
            let i = r || this.getIdToRemoteIdMap(e),
                s = n || this.getRemoteIdToIdMap(e),
                o = i.get(t);
            return o || (o = this.generateIdFn(), i.set(t, o), s.set(o, t)), o
        }
        getIds(e, t) {
            let r = this.getIdToRemoteIdMap(e),
                n = this.getRemoteIdToIdMap(e);
            return t.map(t => this.getId(e, t, r, n))
        }
        getRemoteId(e, t, r) {
            let n = r || this.getRemoteIdToIdMap(e);
            if ("number" != typeof t) return t;
            let i = n.get(t);
            return i || -1
        }
        getRemoteIds(e, t) {
            let r = this.getRemoteIdToIdMap(e);
            return t.map(t => this.getRemoteId(e, t, r))
        }
        reset(e) {
            if (!e) {
                this.iframeIdToRemoteIdMap = new WeakMap, this.iframeRemoteIdToIdMap = new WeakMap;
                return
            }
            this.iframeIdToRemoteIdMap.delete(e), this.iframeRemoteIdToIdMap.delete(e)
        }
        getIdToRemoteIdMap(e) {
            let t = this.iframeIdToRemoteIdMap.get(e);
            return t || (t = new Map, this.iframeIdToRemoteIdMap.set(e, t)), t
        }
        getRemoteIdToIdMap(e) {
            let t = this.iframeRemoteIdToIdMap.get(e);
            return t || (t = new Map, this.iframeRemoteIdToIdMap.set(e, t)), t
        }
    }
    class i2 {
        constructor(e) {
            eO(this, "iframes", new WeakMap), eO(this, "crossOriginIframeMap", new WeakMap), eO(this, "crossOriginIframeMirror", new i1(e9)), eO(this, "crossOriginIframeStyleMirror"), eO(this, "crossOriginIframeRootIdMap", new WeakMap), eO(this, "mirror"), eO(this, "mutationCb"), eO(this, "wrappedEmit"), eO(this, "loadListener"), eO(this, "stylesheetManager"), eO(this, "recordCrossOriginIframes"), this.mutationCb = e.mutationCb, this.wrappedEmit = e.wrappedEmit, this.stylesheetManager = e.stylesheetManager, this.recordCrossOriginIframes = e.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new i1(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = e.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this))
        }
        addIframe(e) {
            this.iframes.set(e, !0), e.contentWindow && this.crossOriginIframeMap.set(e.contentWindow, e)
        }
        addLoadListener(e) {
            this.loadListener = e
        }
        attachIframe(e, t) {
            var r, n;
            this.mutationCb({
                adds: [{
                    parentId: this.mirror.getId(e),
                    nextId: null,
                    node: t
                }],
                removes: [],
                texts: [],
                attributes: [],
                isAttachIframe: !0
            }), this.recordCrossOriginIframes && (null == (r = e.contentWindow) || r.addEventListener("message", this.handleMessage.bind(this))), null == (n = this.loadListener) || n.call(this, e), e.contentDocument && e.contentDocument.adoptedStyleSheets && e.contentDocument.adoptedStyleSheets.length > 0 && this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets, this.mirror.getId(e.contentDocument))
        }
        handleMessage(e) {
            if ("rrweb" !== e.data.type || e.origin !== e.data.origin || !e.source) return;
            let t = this.crossOriginIframeMap.get(e.source);
            if (!t) return;
            let r = this.transformCrossOriginEvent(t, e.data.event);
            r && this.wrappedEmit(r, e.data.isCheckout)
        }
        transformCrossOriginEvent(e, t) {
            var r;
            switch (t.type) {
                case iM.FullSnapshot:
                    {
                        this.crossOriginIframeMirror.reset(e),
                        this.crossOriginIframeStyleMirror.reset(e),
                        this.replaceIdOnNode(t.data.node, e);
                        let r = t.data.node.id;
                        return this.crossOriginIframeRootIdMap.set(e, r),
                        this.patchRootIdOnNode(t.data.node, r),
                        {
                            timestamp: t.timestamp,
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.Mutation,
                                adds: [{
                                    parentId: this.mirror.getId(e),
                                    nextId: null,
                                    node: t.data.node
                                }],
                                removes: [],
                                texts: [],
                                attributes: [],
                                isAttachIframe: !0
                            }
                        }
                    }
                case iM.Meta:
                case iM.Load:
                case iM.DomContentLoaded:
                    break;
                case iM.Plugin:
                    return t;
                case iM.Custom:
                    return this.replaceIds(t.data.payload, e, ["id", "parentId", "previousId", "nextId"]), t;
                case iM.IncrementalSnapshot:
                    switch (t.data.source) {
                        case iR.Mutation:
                            return t.data.adds.forEach(t => {
                                this.replaceIds(t, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(t.node, e);
                                let r = this.crossOriginIframeRootIdMap.get(e);
                                r && this.patchRootIdOnNode(t.node, r)
                            }), t.data.removes.forEach(t => {
                                this.replaceIds(t, e, ["parentId", "id"])
                            }), t.data.attributes.forEach(t => {
                                this.replaceIds(t, e, ["id"])
                            }), t.data.texts.forEach(t => {
                                this.replaceIds(t, e, ["id"])
                            }), t;
                        case iR.Drag:
                        case iR.TouchMove:
                        case iR.MouseMove:
                            return t.data.positions.forEach(t => {
                                this.replaceIds(t, e, ["id"])
                            }), t;
                        case iR.ViewportResize:
                            return !1;
                        case iR.MediaInteraction:
                        case iR.MouseInteraction:
                        case iR.Scroll:
                        case iR.CanvasMutation:
                        case iR.Input:
                            return this.replaceIds(t.data, e, ["id"]), t;
                        case iR.StyleSheetRule:
                        case iR.StyleDeclaration:
                            return this.replaceIds(t.data, e, ["id"]), this.replaceStyleIds(t.data, e, ["styleId"]), t;
                        case iR.Font:
                            return t;
                        case iR.Selection:
                            return t.data.ranges.forEach(t => {
                                this.replaceIds(t, e, ["start", "end"])
                            }), t;
                        case iR.AdoptedStyleSheet:
                            return this.replaceIds(t.data, e, ["id"]), this.replaceStyleIds(t.data, e, ["styleIds"]), null == (r = t.data.styles) || r.forEach(t => {
                                this.replaceStyleIds(t, e, ["styleId"])
                            }), t
                    }
            }
            return !1
        }
        replace(e, t, r, n) {
            for (let i of n)(Array.isArray(t[i]) || "number" == typeof t[i]) && (Array.isArray(t[i]) ? t[i] = e.getIds(r, t[i]) : t[i] = e.getId(r, t[i]));
            return t
        }
        replaceIds(e, t, r) {
            return this.replace(this.crossOriginIframeMirror, e, t, r)
        }
        replaceStyleIds(e, t, r) {
            return this.replace(this.crossOriginIframeStyleMirror, e, t, r)
        }
        replaceIdOnNode(e, t) {
            this.replaceIds(e, t, ["id", "rootId"]), "childNodes" in e && e.childNodes.forEach(e => {
                this.replaceIdOnNode(e, t)
            })
        }
        patchRootIdOnNode(e, t) {
            e.type === iP.Document || e.rootId || (e.rootId = t), "childNodes" in e && e.childNodes.forEach(e => {
                this.patchRootIdOnNode(e, t)
            })
        }
    }
    class i3 {
        constructor(e) {
            eO(this, "shadowDoms", new WeakSet), eO(this, "mutationCb"), eO(this, "scrollCb"), eO(this, "bypassOptions"), eO(this, "mirror"), eO(this, "restoreHandlers", []), this.mutationCb = e.mutationCb, this.scrollCb = e.scrollCb, this.bypassOptions = e.bypassOptions, this.mirror = e.mirror, this.init()
        }
        init() {
            this.reset(), this.patchAttachShadow(Element, document)
        }
        addShadowRoot(e, t) {
            if (!eV(e) || this.shadowDoms.has(e)) return;
            this.shadowDoms.add(e);
            let r = iG({ ...this.bypassOptions,
                doc: t,
                mutationCb: this.mutationCb,
                mirror: this.mirror,
                shadowDomManager: this
            }, e);
            this.restoreHandlers.push(() => r.disconnect()), this.restoreHandlers.push(iZ({ ...this.bypassOptions,
                scrollCb: this.scrollCb,
                doc: e,
                mirror: this.mirror
            })), setTimeout(() => {
                e.adoptedStyleSheets && e.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets, this.mirror.getId(is(e))), this.restoreHandlers.push(iK({
                    mirror: this.mirror,
                    stylesheetManager: this.bypassOptions.stylesheetManager
                }, e))
            }, 0)
        }
        observeAttachShadow(e) {
            e.contentWindow && e.contentDocument && this.patchAttachShadow(e.contentWindow.Element, e.contentDocument)
        }
        patchAttachShadow(e, t) {
            let r = this;
            this.restoreHandlers.push(id(e.prototype, "attachShadow", function(e) {
                return function(n) {
                    let i = e.call(this, n),
                        s = io(this);
                    return s && iO(this) && r.addShadowRoot(s, t), i
                }
            }))
        }
        reset() {
            this.restoreHandlers.forEach(e => {
                try {
                    e()
                } catch (e) {}
            }), this.restoreHandlers = [], this.shadowDoms = new WeakSet
        }
    }
    for (var i5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i8 = "u" < typeof Uint8Array ? [] : new Uint8Array(256), i4 = 0; i4 < i5.length; i4++) i8[i5.charCodeAt(i4)] = i4;
    var i9 = function(e) {
        var t, r = new Uint8Array(e),
            n = r.length,
            i = "";
        for (t = 0; t < n; t += 3) i += i5[r[t] >> 2], i += i5[(3 & r[t]) << 4 | r[t + 1] >> 4], i += i5[(15 & r[t + 1]) << 2 | r[t + 2] >> 6], i += i5[63 & r[t + 2]];
        return n % 3 == 2 ? i = i.substring(0, i.length - 1) + "=" : n % 3 == 1 && (i = i.substring(0, i.length - 2) + "=="), i
    };
    let i6 = new Map,
        i7 = (e, t, r) => {
            let n;
            if (!e || !(st(e, t) || "object" == typeof e)) return;
            let i = e.constructor.name,
                s = ((n = i6.get(r)) || (n = new Map, i6.set(r, n)), n.has(i) || n.set(i, []), n.get(i)),
                o = s.indexOf(e);
            return -1 === o && (o = s.length, s.push(e)), o
        },
        se = (e, t, r) => e.map(e => (function e(t, r, n) {
            if (t instanceof Array) return t.map(t => e(t, r, n));
            if (null === t);
            else if (t instanceof Float32Array || t instanceof Float64Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Uint8Array || t instanceof Uint16Array || t instanceof Int16Array || t instanceof Int8Array || t instanceof Uint8ClampedArray) return {
                rr_type: t.constructor.name,
                args: [Object.values(t)]
            };
            else if (t instanceof ArrayBuffer) return {
                rr_type: t.constructor.name,
                base64: i9(t)
            };
            else if (t instanceof DataView) return {
                rr_type: t.constructor.name,
                args: [e(t.buffer, r, n), t.byteOffset, t.byteLength]
            };
            else if (t instanceof HTMLImageElement) {
                let e = t.constructor.name,
                    {
                        src: r
                    } = t;
                return {
                    rr_type: e,
                    src: r
                }
            } else if (t instanceof HTMLCanvasElement) return {
                rr_type: "HTMLImageElement",
                src: t.toDataURL()
            };
            else if (t instanceof ImageData) return {
                rr_type: t.constructor.name,
                args: [e(t.data, r, n), t.width, t.height]
            };
            else if (st(t, r) || "object" == typeof t) return {
                rr_type: t.constructor.name,
                index: i7(t, r, n)
            };
            return t
        })(e, t, r)),
        st = (e, t) => !!["WebGLActiveInfo", "WebGLBuffer", "WebGLFramebuffer", "WebGLProgram", "WebGLRenderbuffer", "WebGLShader", "WebGLShaderPrecisionFormat", "WebGLTexture", "WebGLUniformLocation", "WebGLVertexArrayObject", "WebGLVertexArrayObjectOES"].filter(e => "function" == typeof t[e]).find(r => e instanceof t[r]);

    function sr(e, t, r, n) {
        let i = [];
        try {
            let s = id(e.HTMLCanvasElement.prototype, "getContext", function(e) {
                return function(i, ...s) {
                    if (!iw(this, t, r, !0)) {
                        let e = "experimental-webgl" === i ? "webgl" : i;
                        if ("__context" in this || (this.__context = e), n && ["webgl", "webgl2"].includes(e))
                            if (s[0] && "object" == typeof s[0]) {
                                let e = s[0];
                                e.preserveDrawingBuffer || (e.preserveDrawingBuffer = !0)
                            } else s.splice(0, 1, {
                                preserveDrawingBuffer: !0
                            })
                    }
                    return e.apply(this, [i, ...s])
                }
            });
            i.push(s)
        } catch {
            console.error("failed to patch HTMLCanvasElement.prototype.getContext")
        }
        return () => {
            i.forEach(e => e())
        }
    }

    function sn(e, t, r, n, i, s) {
        let o = [];
        for (let a of Object.getOwnPropertyNames(e))
            if (!["isContextLost", "canvas", "drawingBufferWidth", "drawingBufferHeight"].includes(a)) try {
                if ("function" != typeof e[a]) continue;
                let l = id(e, a, function(e) {
                    return function(...o) {
                        let l = e.apply(this, o);
                        if (i7(l, s, this), "tagName" in this.canvas && !iw(this.canvas, n, i, !0)) {
                            let e = se(o, s, this),
                                n = {
                                    type: t,
                                    property: a,
                                    args: e
                                };
                            r(this.canvas, n)
                        }
                        return l
                    }
                });
                o.push(l)
            } catch {
                let n = iu(e, a, {
                    set(e) {
                        r(this.canvas, {
                            type: t,
                            property: a,
                            args: [e],
                            setter: !0
                        })
                    }
                });
                o.push(n)
            }
        return o
    }
    let si = "KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",
        ss = "u" > typeof window && window.Blob && new Blob([Uint8Array.from(atob(si), e => e.charCodeAt(0))], {
            type: "text/javascript;charset=utf-8"
        });

    function so(e) {
        let t;
        try {
            if (!(t = ss && (window.URL || window.webkitURL).createObjectURL(ss))) throw "";
            let r = new Worker(t, {
                name: null == e ? void 0 : e.name
            });
            return r.addEventListener("error", () => {
                (window.URL || window.webkitURL).revokeObjectURL(t)
            }), r
        } catch (t) {
            return new Worker("data:text/javascript;base64," + si, {
                name: null == e ? void 0 : e.name
            })
        } finally {
            t && (window.URL || window.webkitURL).revokeObjectURL(t)
        }
    }
    class sa {
        constructor(e) {
            eO(this, "pendingCanvasMutations", new Map), eO(this, "rafStamps", {
                latestId: 0,
                invokeId: null
            }), eO(this, "mirror"), eO(this, "mutationCb"), eO(this, "resetObservers"), eO(this, "frozen", !1), eO(this, "locked", !1), eO(this, "processMutation", (e, t) => {
                (this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(e) || this.pendingCanvasMutations.set(e, []), this.pendingCanvasMutations.get(e).push(t)
            });
            const {
                sampling: t = "all",
                win: r,
                blockClass: n,
                blockSelector: i,
                recordCanvas: s,
                dataURLOptions: o
            } = e;
            this.mutationCb = e.mutationCb, this.mirror = e.mirror, s && "all" === t && this.initCanvasMutationObserver(r, n, i), s && "number" == typeof t && this.initCanvasFPSObserver(t, r, n, i, {
                dataURLOptions: o
            })
        }
        reset() {
            this.pendingCanvasMutations.clear(), this.resetObservers && this.resetObservers()
        }
        freeze() {
            this.frozen = !0
        }
        unfreeze() {
            this.frozen = !1
        }
        lock() {
            this.locked = !0
        }
        unlock() {
            this.locked = !1
        }
        initCanvasFPSObserver(e, t, r, n, i) {
            let s, o = sr(t, r, n, !0),
                a = new Map,
                l = new so;
            l.onmessage = e => {
                let {
                    id: t
                } = e.data;
                if (a.set(t, !1), !("base64" in e.data)) return;
                let {
                    base64: r,
                    type: n,
                    width: i,
                    height: s
                } = e.data;
                this.mutationCb({
                    id: t,
                    type: iN["2D"],
                    commands: [{
                        property: "clearRect",
                        args: [0, 0, i, s]
                    }, {
                        property: "drawImage",
                        args: [{
                            rr_type: "ImageBitmap",
                            args: [{
                                rr_type: "Blob",
                                data: [{
                                    rr_type: "ArrayBuffer",
                                    base64: r
                                }],
                                type: n
                            }]
                        }, 0, 0]
                    }]
                })
            };
            let h = 1e3 / e,
                c = 0,
                u = e => {
                    let o;
                    if (c && e - c < h) {
                        s = requestAnimationFrame(u);
                        return
                    }
                    c = e, (o = [], t.document.querySelectorAll("canvas").forEach(e => {
                        iw(e, r, n, !0) || o.push(e)
                    }), o).forEach(async e => {
                        var t;
                        let r = this.mirror.getId(e);
                        if (a.get(r) || 0 === e.width || 0 === e.height) return;
                        if (a.set(r, !0), ["webgl", "webgl2"].includes(e.__context)) {
                            let r = e.getContext(e.__context);
                            (null == (t = null == r ? void 0 : r.getContextAttributes()) ? void 0 : t.preserveDrawingBuffer) === !1 && r.clear(r.COLOR_BUFFER_BIT)
                        }
                        let n = await createImageBitmap(e);
                        l.postMessage({
                            id: r,
                            bitmap: n,
                            width: e.width,
                            height: e.height,
                            dataURLOptions: i.dataURLOptions
                        }, [n])
                    }), s = requestAnimationFrame(u)
                };
            s = requestAnimationFrame(u), this.resetObservers = () => {
                o(), cancelAnimationFrame(s)
            }
        }
        initCanvasMutationObserver(e, t, r) {
            var n;
            let i;
            this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher();
            let s = sr(e, t, r, !1),
                o = function(e, t, r, n) {
                    let i = [];
                    for (let s of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype)) try {
                        if ("function" != typeof t.CanvasRenderingContext2D.prototype[s]) continue;
                        let o = id(t.CanvasRenderingContext2D.prototype, s, function(i) {
                            return function(...o) {
                                return iw(this.canvas, r, n, !0) || setTimeout(() => {
                                    let r = se(o, t, this);
                                    e(this.canvas, {
                                        type: iN["2D"],
                                        property: s,
                                        args: r
                                    })
                                }, 0), i.apply(this, o)
                            }
                        });
                        i.push(o)
                    } catch {
                        let r = iu(t.CanvasRenderingContext2D.prototype, s, {
                            set(t) {
                                e(this.canvas, {
                                    type: iN["2D"],
                                    property: s,
                                    args: [t],
                                    setter: !0
                                })
                            }
                        });
                        i.push(r)
                    }
                    return () => {
                        i.forEach(e => e())
                    }
                }(this.processMutation.bind(this), e, t, r),
                a = (n = this.processMutation.bind(this), (i = []).push(...sn(e.WebGLRenderingContext.prototype, iN.WebGL, n, t, r, e)), void 0 !== e.WebGL2RenderingContext && i.push(...sn(e.WebGL2RenderingContext.prototype, iN.WebGL2, n, t, r, e)), () => {
                    i.forEach(e => e())
                });
            this.resetObservers = () => {
                s(), o(), a()
            }
        }
        startPendingCanvasMutationFlusher() {
            requestAnimationFrame(() => this.flushPendingCanvasMutations())
        }
        startRAFTimestamping() {
            let e = t => {
                this.rafStamps.latestId = t, requestAnimationFrame(e)
            };
            requestAnimationFrame(e)
        }
        flushPendingCanvasMutations() {
            this.pendingCanvasMutations.forEach((e, t) => {
                let r = this.mirror.getId(t);
                this.flushPendingCanvasMutationFor(t, r)
            }), requestAnimationFrame(() => this.flushPendingCanvasMutations())
        }
        flushPendingCanvasMutationFor(e, t) {
            if (this.frozen || this.locked) return;
            let r = this.pendingCanvasMutations.get(e);
            if (!r || -1 === t) return;
            let n = r.map(e => {
                    let {
                        type: t,
                        ...r
                    } = e;
                    return r
                }),
                {
                    type: i
                } = r[0];
            this.mutationCb({
                id: t,
                type: i,
                commands: n
            }), this.pendingCanvasMutations.delete(e)
        }
    }
    class sl {
        constructor(e) {
            eO(this, "trackedLinkElements", new WeakSet), eO(this, "mutationCb"), eO(this, "adoptedStyleSheetCb"), eO(this, "styleMirror", new ix), this.mutationCb = e.mutationCb, this.adoptedStyleSheetCb = e.adoptedStyleSheetCb
        }
        attachLinkElement(e, t) {
            "_cssText" in t.attributes && this.mutationCb({
                adds: [],
                removes: [],
                texts: [],
                attributes: [{
                    id: t.id,
                    attributes: t.attributes
                }]
            }), this.trackLinkElement(e)
        }
        trackLinkElement(e) {
            this.trackedLinkElements.has(e) || (this.trackedLinkElements.add(e), this.trackStylesheetInLinkElement(e))
        }
        adoptStyleSheets(e, t) {
            if (0 === e.length) return;
            let r = {
                    id: t,
                    styleIds: []
                },
                n = [];
            for (let t of e) {
                let e;
                this.styleMirror.has(t) ? e = this.styleMirror.getId(t) : (e = this.styleMirror.add(t), n.push({
                    styleId: e,
                    rules: Array.from(t.rules || CSSRule, (e, r) => ({
                        rule: eZ(e, t.href),
                        index: r
                    }))
                })), r.styleIds.push(e)
            }
            n.length > 0 && (r.styles = n), this.adoptedStyleSheetCb(r)
        }
        reset() {
            this.styleMirror.reset(), this.trackedLinkElements = new WeakSet
        }
        trackStylesheetInLinkElement(e) {}
    }
    class sh {
        constructor() {
            eO(this, "nodeMap", new WeakMap), eO(this, "active", !1)
        }
        inOtherBuffer(e, t) {
            let r = this.nodeMap.get(e);
            return r && Array.from(r).some(e => e !== t)
        }
        add(e, t) {
            this.active || (this.active = !0, requestAnimationFrame(() => {
                this.nodeMap = new WeakMap, this.active = !1
            })), this.nodeMap.set(e, (this.nodeMap.get(e) || new Set).add(t))
        }
        destroy() {}
    }
    let sc = !1;
    try {
        if (2 !== Array.from([1], e => 2 * e)[0]) {
            let e = document.createElement("iframe");
            document.body.appendChild(e), Array.from = (null == (oN = e.contentWindow) ? void 0 : oN.Array.from) || Array.from, document.body.removeChild(e)
        }
    } catch (e) {
        console.debug("Unable to override Array.from", e)
    }
    let su = new eY;

    function sd(e = {}) {
        let t, {
            emit: r,
            checkoutEveryNms: n,
            checkoutEveryNth: i,
            blockClass: s = "rr-block",
            blockSelector: o = null,
            ignoreClass: a = "rr-ignore",
            ignoreSelector: l = null,
            maskTextClass: h = "rr-mask",
            maskTextSelector: c = null,
            inlineStylesheet: u = !0,
            maskAllInputs: d,
            maskInputOptions: p,
            slimDOMOptions: f,
            maskInputFn: g,
            maskTextFn: m,
            hooks: y,
            packFn: v,
            sampling: I = {},
            dataURLOptions: E = {},
            mousemoveWait: x,
            recordDOM: k = !0,
            recordCanvas: O = !1,
            recordCrossOriginIframes: M = !1,
            recordAfter: R = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load",
            userTriggeredOnInput: T = !1,
            collectFonts: A = !1,
            inlineImages: N = !1,
            plugins: L,
            keepIframeSrcFn: D = () => !1,
            ignoreCSSAttributes: P = new Set([]),
            errorHandler: _
        } = e;
        w = _;
        let F = !M || window.parent === window,
            z = !1;
        if (!F) try {
            window.parent.document && (z = !1)
        } catch (e) {
            z = !0
        }
        if (F && !r) throw Error("emit function is required");
        if (!F && !z) return () => {};
        void 0 !== x && void 0 === I.mousemove && (I.mousemove = x), su.reset();
        let U = !0 === d ? {
                color: !0,
                date: !0,
                "datetime-local": !0,
                email: !0,
                month: !0,
                number: !0,
                range: !0,
                search: !0,
                tel: !0,
                text: !0,
                time: !0,
                url: !0,
                week: !0,
                textarea: !0,
                select: !0,
                password: !0
            } : void 0 !== p ? p : {
                password: !0
            },
            j = !0 === f || "all" === f ? {
                script: !0,
                comment: !0,
                headFavicon: !0,
                headWhitespace: !0,
                headMetaSocial: !0,
                headMetaRobots: !0,
                headMetaHttpEquiv: !0,
                headMetaVerification: !0,
                headMetaAuthorship: "all" === f,
                headMetaDescKeywords: "all" === f,
                headTitleMutations: "all" === f
            } : f || {};
        ! function(e = window) {
            "NodeList" in e && !e.NodeList.prototype.forEach && (e.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e && !e.DOMTokenList.prototype.forEach && (e.DOMTokenList.prototype.forEach = Array.prototype.forEach)
        }();
        let B = 0,
            H = e => {
                for (let t of L || []) t.eventProcessor && (e = t.eventProcessor(e));
                return v && !z && (e = v(e)), e
            };
        b = (e, s) => {
            var o;
            if (e.timestamp = ip(), (null == (o = iW[0]) ? void 0 : o.isFrozen()) && e.type !== iM.FullSnapshot && (e.type !== iM.IncrementalSnapshot || e.data.source !== iR.Mutation) && iW.forEach(e => e.unfreeze()), F) null == r || r(H(e), s);
            else if (z) {
                let t = {
                    type: "rrweb",
                    event: H(e),
                    origin: window.location.origin,
                    isCheckout: s
                };
                window.parent.postMessage(t, "*")
            }
            if (e.type === iM.FullSnapshot) t = e, B = 0;
            else if (e.type === iM.IncrementalSnapshot) {
                if (e.data.source === iR.Mutation && e.data.isAttachIframe) return;
                B++;
                let r = i && B >= i,
                    s = n && e.timestamp - t.timestamp > n;
                (r || s) && S(!0)
            }
        };
        let W = e => {
                b({
                    type: iM.IncrementalSnapshot,
                    data: {
                        source: iR.Mutation,
                        ...e
                    }
                })
            },
            V = e => b({
                type: iM.IncrementalSnapshot,
                data: {
                    source: iR.Scroll,
                    ...e
                }
            }),
            G = e => b({
                type: iM.IncrementalSnapshot,
                data: {
                    source: iR.CanvasMutation,
                    ...e
                }
            }),
            Z = new sl({
                mutationCb: W,
                adoptedStyleSheetCb: e => b({
                    type: iM.IncrementalSnapshot,
                    data: {
                        source: iR.AdoptedStyleSheet,
                        ...e
                    }
                })
            }),
            Y = new i2({
                mirror: su,
                mutationCb: W,
                stylesheetManager: Z,
                recordCrossOriginIframes: M,
                wrappedEmit: b
            });
        for (let e of L || []) e.getMirror && e.getMirror({
            nodeMirror: su,
            crossOriginIframeMirror: Y.crossOriginIframeMirror,
            crossOriginIframeStyleMirror: Y.crossOriginIframeStyleMirror
        });
        let q = new sh;
        C = new sa({
            recordCanvas: O,
            mutationCb: G,
            win: window,
            blockClass: s,
            blockSelector: o,
            mirror: su,
            sampling: I.canvas,
            dataURLOptions: E
        });
        let X = new i3({
            mutationCb: W,
            scrollCb: V,
            bypassOptions: {
                blockClass: s,
                blockSelector: o,
                maskTextClass: h,
                maskTextSelector: c,
                inlineStylesheet: u,
                maskInputOptions: U,
                dataURLOptions: E,
                maskTextFn: m,
                maskInputFn: g,
                recordCanvas: O,
                inlineImages: N,
                sampling: I,
                slimDOMOptions: j,
                iframeManager: Y,
                stylesheetManager: Z,
                canvasManager: C,
                keepIframeSrcFn: D,
                processedNodeManager: q
            },
            mirror: su
        });
        S = (e = !1) => {
            if (!k) return;
            b({
                type: iM.Meta,
                data: {
                    href: window.location.href,
                    width: iy(),
                    height: im()
                }
            }, e), Z.reset(), X.init(), iW.forEach(e => e.lock());
            let t = function(e, t) {
                let {
                    mirror: r = new eY,
                    blockClass: n = "rr-block",
                    blockSelector: i = null,
                    maskTextClass: s = "rr-mask",
                    maskTextSelector: o = null,
                    inlineStylesheet: a = !0,
                    inlineImages: l = !1,
                    recordCanvas: h = !1,
                    maskAllInputs: c = !1,
                    maskTextFn: u,
                    maskInputFn: d,
                    slimDOM: p = !1,
                    dataURLOptions: f,
                    preserveWhiteSpace: g,
                    onSerialize: m,
                    onIframeLoad: y,
                    iframeLoadTimeout: v,
                    onStylesheetLoad: w,
                    stylesheetLoadTimeout: b,
                    keepIframeSrcFn: S = () => !1
                } = t || {};
                return tl(e, {
                    doc: e,
                    mirror: r,
                    blockClass: n,
                    blockSelector: i,
                    maskTextClass: s,
                    maskTextSelector: o,
                    skipChild: !1,
                    inlineStylesheet: a,
                    maskInputOptions: !0 === c ? {
                        color: !0,
                        date: !0,
                        "datetime-local": !0,
                        email: !0,
                        month: !0,
                        number: !0,
                        range: !0,
                        search: !0,
                        tel: !0,
                        text: !0,
                        time: !0,
                        url: !0,
                        week: !0,
                        textarea: !0,
                        select: !0,
                        password: !0
                    } : !1 === c ? {
                        password: !0
                    } : c,
                    maskTextFn: u,
                    maskInputFn: d,
                    slimDOMOptions: !0 === p || "all" === p ? {
                        script: !0,
                        comment: !0,
                        headFavicon: !0,
                        headWhitespace: !0,
                        headMetaDescKeywords: "all" === p,
                        headMetaSocial: !0,
                        headMetaRobots: !0,
                        headMetaHttpEquiv: !0,
                        headMetaAuthorship: !0,
                        headMetaVerification: !0
                    } : !1 === p ? {} : p,
                    dataURLOptions: f,
                    inlineImages: l,
                    recordCanvas: h,
                    preserveWhiteSpace: g,
                    onSerialize: m,
                    onIframeLoad: y,
                    iframeLoadTimeout: v,
                    onStylesheetLoad: w,
                    stylesheetLoadTimeout: b,
                    keepIframeSrcFn: S,
                    newlyAddedElement: !1
                })
            }(document, {
                mirror: su,
                blockClass: s,
                blockSelector: o,
                maskTextClass: h,
                maskTextSelector: c,
                inlineStylesheet: u,
                maskAllInputs: U,
                maskTextFn: m,
                maskInputFn: g,
                slimDOM: j,
                dataURLOptions: E,
                recordCanvas: O,
                inlineImages: N,
                onSerialize: e => {
                    iC(e, su) && Y.addIframe(e), iI(e, su) && Z.trackLinkElement(e), iE(e) && X.addShadowRoot(io(e), document)
                },
                onIframeLoad: (e, t) => {
                    Y.attachIframe(e, t), X.observeAttachShadow(e)
                },
                onStylesheetLoad: (e, t) => {
                    Z.attachLinkElement(e, t)
                },
                keepIframeSrcFn: D
            });
            if (!t) return console.warn("Failed to snapshot the document");
            b({
                type: iM.FullSnapshot,
                data: {
                    node: t,
                    initialOffset: ig(window)
                }
            }, e), iW.forEach(e => e.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && Z.adoptStyleSheets(document.adoptedStyleSheets, su.getId(document))
        };
        try {
            let e = [],
                t = e => {
                    var t;
                    return iH(iJ)({
                        mutationCb: W,
                        mousemoveCb: (e, t) => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: t,
                                positions: e
                            }
                        }),
                        mouseInteractionCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.MouseInteraction,
                                ...e
                            }
                        }),
                        scrollCb: V,
                        viewportResizeCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.ViewportResize,
                                ...e
                            }
                        }),
                        inputCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.Input,
                                ...e
                            }
                        }),
                        mediaInteractionCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.MediaInteraction,
                                ...e
                            }
                        }),
                        styleSheetRuleCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.StyleSheetRule,
                                ...e
                            }
                        }),
                        styleDeclarationCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.StyleDeclaration,
                                ...e
                            }
                        }),
                        canvasMutationCb: G,
                        fontCb: e => b({
                            type: iM.IncrementalSnapshot,
                            data: {
                                source: iR.Font,
                                ...e
                            }
                        }),
                        selectionCb: e => {
                            b({
                                type: iM.IncrementalSnapshot,
                                data: {
                                    source: iR.Selection,
                                    ...e
                                }
                            })
                        },
                        customElementCb: e => {
                            b({
                                type: iM.IncrementalSnapshot,
                                data: {
                                    source: iR.CustomElement,
                                    ...e
                                }
                            })
                        },
                        blockClass: s,
                        ignoreClass: a,
                        ignoreSelector: l,
                        maskTextClass: h,
                        maskTextSelector: c,
                        maskInputOptions: U,
                        inlineStylesheet: u,
                        sampling: I,
                        recordDOM: k,
                        recordCanvas: O,
                        inlineImages: N,
                        userTriggeredOnInput: T,
                        collectFonts: A,
                        doc: e,
                        maskInputFn: g,
                        maskTextFn: m,
                        keepIframeSrcFn: D,
                        blockSelector: o,
                        slimDOMOptions: j,
                        dataURLOptions: E,
                        mirror: su,
                        iframeManager: Y,
                        stylesheetManager: Z,
                        shadowDomManager: X,
                        processedNodeManager: q,
                        canvasManager: C,
                        ignoreCSSAttributes: P,
                        plugins: (null == (t = null == L ? void 0 : L.filter(e => e.observer)) ? void 0 : t.map(e => ({
                            observer: e.observer,
                            options: e.options,
                            callback: t => b({
                                type: iM.Plugin,
                                data: {
                                    plugin: e.name,
                                    payload: t
                                }
                            })
                        }))) || []
                    }, y)
                };
            Y.addLoadListener(r => {
                try {
                    e.push(t(r.contentDocument))
                } catch (e) {
                    console.warn(e)
                }
            });
            let r = () => {
                S(), e.push(t(document)), sc = !0
            };
            return "interactive" === document.readyState || "complete" === document.readyState ? r() : (e.push(ia("DOMContentLoaded", () => {
                b({
                    type: iM.DomContentLoaded,
                    data: {}
                }), "DOMContentLoaded" === R && r()
            })), e.push(ia("load", () => {
                b({
                    type: iM.Load,
                    data: {}
                }), "load" === R && r()
            }, window))), () => {
                e.forEach(e => e()), q.destroy(), sc = !1, w = void 0
            }
        } catch (e) {
            console.warn(e)
        }
    }
    sd.addCustomEvent = (e, t) => {
        if (!sc) throw Error("please add custom event after start recording");
        b({
            type: iM.Custom,
            data: {
                tag: e,
                payload: t
            }
        })
    }, sd.freezePage = () => {
        iW.forEach(e => e.freeze())
    }, sd.takeFullSnapshot = e => {
        if (!sc) throw Error("please take full snapshot after start recording");
        S(e)
    }, sd.mirror = su, (oA = oL || (oL = {}))[oA.NotStarted = 0] = "NotStarted", oA[oA.Running = 1] = "Running", oA[oA.Stopped = 2] = "Stopped";
    let {
        addCustomEvent: sp
    } = sd, {
        freezePage: sf
    } = sd, {
        takeFullSnapshot: sg
    } = sd;
    var sm = Uint8Array,
        sy = Uint16Array,
        sv = Uint32Array,
        sw = new sm([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]),
        sb = new sm([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]),
        sS = new sm([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
        sC = function(e, t) {
            for (var r = new sy(31), n = 0; n < 31; ++n) r[n] = t += 1 << e[n - 1];
            for (var i = new sv(r[30]), n = 1; n < 30; ++n)
                for (var s = r[n]; s < r[n + 1]; ++s) i[s] = s - r[n] << 5 | n;
            return [r, i]
        },
        sI = sC(sw, 2),
        sE = sI[0],
        sx = sI[1];
    sE[28] = 258, sx[258] = 28;
    for (var sk = sC(sb, 0), sO = (sk[0], sk[1]), sM = new sy(32768), sR = 0; sR < 32768; ++sR) {
        var sT = (43690 & sR) >>> 1 | (21845 & sR) << 1;
        sT = (61680 & (sT = (52428 & sT) >>> 2 | (13107 & sT) << 2)) >>> 4 | (3855 & sT) << 4, sM[sR] = ((65280 & sT) >>> 8 | (255 & sT) << 8) >>> 1
    }
    for (var sA = function(e, t, r) {
            for (var n, i = e.length, s = 0, o = new sy(t); s < i; ++s) ++o[e[s] - 1];
            var a = new sy(t);
            for (s = 0; s < t; ++s) a[s] = a[s - 1] + o[s - 1] << 1;
            if (r) {
                n = new sy(1 << t);
                var l = 15 - t;
                for (s = 0; s < i; ++s)
                    if (e[s])
                        for (var h = s << 4 | e[s], c = t - e[s], u = a[e[s] - 1]++ << c, d = u | (1 << c) - 1; u <= d; ++u) n[sM[u] >>> l] = h
            } else
                for (s = 0, n = new sy(i); s < i; ++s) n[s] = sM[a[e[s] - 1]++] >>> 15 - e[s];
            return n
        }, sN = new sm(288), sR = 0; sR < 144; ++sR) sN[sR] = 8;
    for (var sR = 144; sR < 256; ++sR) sN[sR] = 9;
    for (var sR = 256; sR < 280; ++sR) sN[sR] = 7;
    for (var sR = 280; sR < 288; ++sR) sN[sR] = 8;
    for (var sL = new sm(32), sR = 0; sR < 32; ++sR) sL[sR] = 5;
    var sD = sA(sN, 9, 0),
        sP = sA(sL, 5, 0),
        s_ = function(e) {
            return (e / 8 | 0) + (7 & e && 1)
        },
        sF = function(e, t, r) {
            (null == r || r > e.length) && (r = e.length);
            var n = new(e instanceof sy ? sy : e instanceof sv ? sv : sm)(r - t);
            return n.set(e.subarray(t, r)), n
        },
        sz = function(e, t, r) {
            r <<= 7 & t;
            var n = t / 8 | 0;
            e[n] |= r, e[n + 1] |= r >>> 8
        },
        sU = function(e, t, r) {
            r <<= 7 & t;
            var n = t / 8 | 0;
            e[n] |= r, e[n + 1] |= r >>> 8, e[n + 2] |= r >>> 16
        },
        sj = function(e, t) {
            for (var r = [], n = 0; n < e.length; ++n) e[n] && r.push({
                s: n,
                f: e[n]
            });
            var i = r.length,
                s = r.slice();
            if (!i) return [new sm(0), 0];
            if (1 == i) {
                var o = new sm(r[0].s + 1);
                return o[r[0].s] = 1, [o, 1]
            }
            r.sort(function(e, t) {
                return e.f - t.f
            }), r.push({
                s: -1,
                f: 25001
            });
            var a = r[0],
                l = r[1],
                h = 0,
                c = 1,
                u = 2;
            for (r[0] = {
                    s: -1,
                    f: a.f + l.f,
                    l: a,
                    r: l
                }; c != i - 1;) a = r[r[h].f < r[u].f ? h++ : u++], l = r[h != c && r[h].f < r[u].f ? h++ : u++], r[c++] = {
                s: -1,
                f: a.f + l.f,
                l: a,
                r: l
            };
            for (var d = s[0].s, n = 1; n < i; ++n) s[n].s > d && (d = s[n].s);
            var p = new sy(d + 1),
                f = sB(r[c - 1], p, 0);
            if (f > t) {
                var n = 0,
                    g = 0,
                    m = f - t,
                    y = 1 << m;
                for (s.sort(function(e, t) {
                        return p[t.s] - p[e.s] || e.f - t.f
                    }); n < i; ++n) {
                    var v = s[n].s;
                    if (p[v] > t) g += y - (1 << f - p[v]), p[v] = t;
                    else break
                }
                for (g >>>= m; g > 0;) {
                    var w = s[n].s;
                    p[w] < t ? g -= 1 << t - p[w]++ - 1 : ++n
                }
                for (; n >= 0 && g; --n) {
                    var b = s[n].s;
                    p[b] == t && (--p[b], ++g)
                }
                f = t
            }
            return [new sm(p), f]
        },
        sB = function(e, t, r) {
            return -1 == e.s ? Math.max(sB(e.l, t, r + 1), sB(e.r, t, r + 1)) : t[e.s] = r
        },
        sH = function(e) {
            for (var t = e.length; t && !e[--t];);
            for (var r = new sy(++t), n = 0, i = e[0], s = 1, o = function(e) {
                    r[n++] = e
                }, a = 1; a <= t; ++a)
                if (e[a] == i && a != t) ++s;
                else {
                    if (!i && s > 2) {
                        for (; s > 138; s -= 138) o(32754);
                        s > 2 && (o(s > 10 ? s - 11 << 5 | 28690 : s - 3 << 5 | 12305), s = 0)
                    } else if (s > 3) {
                        for (o(i), --s; s > 6; s -= 6) o(8304);
                        s > 2 && (o(s - 3 << 5 | 8208), s = 0)
                    }
                    for (; s--;) o(i);
                    s = 1, i = e[a]
                }
            return [r.subarray(0, n), t]
        },
        sW = function(e, t) {
            for (var r = 0, n = 0; n < t.length; ++n) r += e[n] * t[n];
            return r
        },
        sV = function(e, t, r) {
            var n = r.length,
                i = s_(t + 2);
            e[i] = 255 & n, e[i + 1] = n >>> 8, e[i + 2] = 255 ^ e[i], e[i + 3] = 255 ^ e[i + 1];
            for (var s = 0; s < n; ++s) e[i + s + 4] = r[s];
            return (i + 4 + n) * 8
        },
        sG = function(e, t, r, n, i, s, o, a, l, h, c) {
            sz(t, c++, r), ++i[256];
            for (var u, d, p, f, g = sj(i, 15), m = g[0], y = g[1], v = sj(s, 15), w = v[0], b = v[1], S = sH(m), C = S[0], I = S[1], E = sH(w), x = E[0], k = E[1], O = new sy(19), M = 0; M < C.length; ++M) O[31 & C[M]]++;
            for (var M = 0; M < x.length; ++M) O[31 & x[M]]++;
            for (var R = sj(O, 7), T = R[0], A = R[1], N = 19; N > 4 && !T[sS[N - 1]]; --N);
            var L = h + 5 << 3,
                D = sW(i, sN) + sW(s, sL) + o,
                P = sW(i, m) + sW(s, w) + o + 14 + 3 * N + sW(O, T) + (2 * O[16] + 3 * O[17] + 7 * O[18]);
            if (L <= D && L <= P) return sV(t, c, e.subarray(l, l + h));
            if (sz(t, c, 1 + (P < D)), c += 2, P < D) {
                u = sA(m, y, 0), d = m, p = sA(w, b, 0), f = w;
                var _ = sA(T, A, 0);
                sz(t, c, I - 257), sz(t, c + 5, k - 1), sz(t, c + 10, N - 4), c += 14;
                for (var M = 0; M < N; ++M) sz(t, c + 3 * M, T[sS[M]]);
                c += 3 * N;
                for (var F = [C, x], z = 0; z < 2; ++z)
                    for (var U = F[z], M = 0; M < U.length; ++M) {
                        var j = 31 & U[M];
                        sz(t, c, _[j]), c += T[j], j > 15 && (sz(t, c, U[M] >>> 5 & 127), c += U[M] >>> 12)
                    }
            } else u = sD, d = sN, p = sP, f = sL;
            for (var M = 0; M < a; ++M)
                if (n[M] > 255) {
                    var j = n[M] >>> 18 & 31;
                    sU(t, c, u[j + 257]), c += d[j + 257], j > 7 && (sz(t, c, n[M] >>> 23 & 31), c += sw[j]);
                    var B = 31 & n[M];
                    sU(t, c, p[B]), c += f[B], B > 3 && (sU(t, c, n[M] >>> 5 & 8191), c += sb[B])
                } else sU(t, c, u[n[M]]), c += d[n[M]];
            return sU(t, c, u[256]), c + d[256]
        },
        sZ = new sv([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]),
        sY = function(e, t, r, n, i, s) {
            var o = e.length,
                a = new sm(n + o + 5 * (1 + Math.floor(o / 7e3)) + i),
                l = a.subarray(n, a.length - i),
                h = 0;
            if (!t || o < 8)
                for (var c = 0; c <= o; c += 65535) {
                    var u = c + 65535;
                    u < o ? h = sV(l, h, e.subarray(c, u)) : (l[c] = s, h = sV(l, h, e.subarray(c, o)))
                } else {
                    for (var d = sZ[t - 1], p = d >>> 13, f = 8191 & d, g = (1 << r) - 1, m = new sy(32768), y = new sy(g + 1), v = Math.ceil(r / 3), w = 2 * v, b = function(t) {
                            return (e[t] ^ e[t + 1] << v ^ e[t + 2] << w) & g
                        }, S = new sv(25e3), C = new sy(288), I = new sy(32), E = 0, x = 0, c = 0, k = 0, O = 0, M = 0; c < o; ++c) {
                        var R = b(c),
                            T = 32767 & c,
                            A = y[R];
                        if (m[T] = A, y[R] = T, O <= c) {
                            var N = o - c;
                            if ((E > 7e3 || k > 24576) && N > 423) {
                                h = sG(e, l, 0, S, C, I, x, k, M, c - M, h), k = E = x = 0, M = c;
                                for (var L = 0; L < 286; ++L) C[L] = 0;
                                for (var L = 0; L < 30; ++L) I[L] = 0
                            }
                            var D = 2,
                                P = 0,
                                _ = f,
                                F = T - A & 32767;
                            if (N > 2 && R == b(c - F))
                                for (var z = Math.min(p, N) - 1, U = Math.min(32767, c), j = Math.min(258, N); F <= U && --_ && T != A;) {
                                    if (e[c + D] == e[c + D - F]) {
                                        for (var B = 0; B < j && e[c + B] == e[c + B - F]; ++B);
                                        if (B > D) {
                                            if (D = B, P = F, B > z) break;
                                            for (var H = Math.min(F, B - 2), W = 0, L = 0; L < H; ++L) {
                                                var V = c - F + L + 32768 & 32767,
                                                    G = m[V],
                                                    Z = V - G + 32768 & 32767;
                                                Z > W && (W = Z, A = V)
                                            }
                                        }
                                    }
                                    A = m[T = A], F += T - A + 32768 & 32767
                                }
                            if (P) {
                                S[k++] = 0x10000000 | sx[D] << 18 | sO[P];
                                var Y = 31 & sx[D],
                                    q = 31 & sO[P];
                                x += sw[Y] + sb[q], ++C[257 + Y], ++I[q], O = c + D, ++E
                            } else S[k++] = e[c], ++C[e[c]]
                        }
                    }
                    h = sG(e, l, s, S, C, I, x, k, M, c - M, h)
                }
            return sF(a, 0, n + s_(h) + i)
        },
        sq = function() {
            var e = 1,
                t = 0;
            return {
                p: function(r) {
                    for (var n = e, i = t, s = r.length, o = 0; o != s;) {
                        for (var a = Math.min(o + 5552, s); o < a; ++o) n += r[o], i += n;
                        n %= 65521, i %= 65521
                    }
                    e = n, t = i
                },
                d: function() {
                    return (e >>> 8 << 16 | (255 & t) << 8 | t >>> 8) + ((255 & e) << 23) * 2
                }
            }
        },
        sX = function(e, t, r) {
            for (; r; ++t) e[t] = r, r >>>= 8
        },
        s$ = function(e, t) {
            var r = t.level,
                n = 0 == r ? 0 : r < 6 ? 1 : 9 == r ? 3 : 2;
            e[0] = 120, e[1] = n << 6 | (n ? 32 - 2 * n : 1)
        };
    let sK = e => {
        var t, r, n, i, s;
        return function(e, t) {
            var r = "";
            if (!t && "u" > typeof TextDecoder) return new TextDecoder().decode(e);
            for (var n = 0; n < e.length;) {
                var i = e[n++];
                i < 128 || t ? r += String.fromCharCode(i) : i < 224 ? r += String.fromCharCode((31 & i) << 6 | 63 & e[n++]) : i < 240 ? r += String.fromCharCode((15 & i) << 12 | (63 & e[n++]) << 6 | 63 & e[n++]) : r += String.fromCharCode(55296 | (i = ((15 & i) << 18 | (63 & e[n++]) << 12 | (63 & e[n++]) << 6 | 63 & e[n++]) - 65536) >> 10, 56320 | 1023 & i)
            }
            return r
        }((t = function(e) {
            var t = e.length;
            if ("u" > typeof TextEncoder) return new TextEncoder().encode(e);
            for (var r = new sm(e.length + (e.length >>> 1)), n = 0, i = function(e) {
                    r[n++] = e
                }, s = 0; s < t; ++s) {
                if (n + 5 > r.length) {
                    var o = new sm(n + 8 + (t - s << 1));
                    o.set(r), r = o
                }
                var a = e.charCodeAt(s);
                a < 128 ? i(a) : (a < 2048 ? i(192 | a >>> 6) : (a > 55295 && a < 57344 ? (i(240 | (a = 65536 + (1047552 & a) | 1023 & e.charCodeAt(++s)) >>> 18), i(128 | a >>> 12 & 63)) : i(224 | a >>> 12), i(128 | a >>> 6 & 63)), i(128 | 63 & a))
            }
            return sF(r, 0, n)
        }(JSON.stringify({ ...e,
            v: "v1"
        })), void 0 === r && (r = {}), (n = sq()).p(t), s$(s = sY(t, null == (i = r).level ? 6 : i.level, null == i.mem ? Math.ceil(1.5 * Math.max(8, Math.min(13, Math.log(t.length)))) : 12 + i.mem, 2, 4, !0), r), sX(s, s.length - 4, n.d()), s), !0)
    };
    var sJ = console.log.bind(console),
        sQ = class e {
            constructor() {
                this.isDebugEnabled = !1, this.prefix = ""
            }
            static initialize(t) {
                return e.instance || (e.instance = new e), t && (e.instance.isDebugEnabled = t.debug ? ? !1, e.instance.prefix = t.prefix ? ? ""), e.instance
            }
            static getInstance(t) {
                return e ? .instance || e.initialize(t)
            }
            formatMessage(e) {
                return `[${(new Date).toISOString()}] ${this.prefix} ${e}`
            }
            log(e, ...t) {
                this.isDebugEnabled && sJ(this.formatMessage(e), ...t)
            }
            updateConfig(e) {
                this.isDebugEnabled = e.debug ? ? this.isDebugEnabled, this.prefix = e.prefix ? ? this.prefix
            }
        },
        s0 = sQ.getInstance();

    function s1(e) {
        s0.log("[error-handler.handleError] called", e, {
            groundcoverIgnore: !0
        })
    }
    var s2 = "object" == typeof globalThis ? globalThis : "object" == typeof self ? self : "object" == typeof window ? window : e.g,
        s3 = class {
            constructor() {
                this.generateTraceId = function() {
                    for (let e = 0; e < 16; e++) s5[e] = Math.floor(16 * Math.random()) + 48, s5[e] >= 58 && (s5[e] += 39);
                    return s4 + String.fromCharCode.apply(null, s5.slice(0, 16))
                }, this.generateSpanId = s8(8), this.generateId = s8(16)
            }
        },
        s5 = Array(32);

    function s8(e) {
        return function() {
            for (let t = 0; t < 2 * e; t++) s5[t] = Math.floor(16 * Math.random()) + 48, s5[t] >= 58 && (s5[t] += 39);
            return String.fromCharCode.apply(null, s5.slice(0, 2 * e))
        }
    }
    var s4 = "0000000000000000",
        s9 = {
            batchSize: 10,
            batchTimeout: 1e4,
            eventSampleRate: 1,
            sessionSampleRate: 1,
            environment: "development",
            debug: !1,
            enableCompression: !0,
            maskFields: [],
            enableMasking: !1,
            enabledEvents: [],
            tracePropagationUrls: [],
            tracePropagationHeaders: [],
            tracePropagationTraceIdHeaderName: "",
            tracePropagationSpanIdHeaderName: "",
            traceOrigin: {
                name: "",
                value: ""
            }
        },
        s6 = class {
            constructor(e) {
                this.dsn = e ? .dsn || "", this.appId = e ? .appId || "", this.cluster = e ? .cluster || "", this.apiKey = e ? .apiKey || "", this.environment = e ? .environment || "", this.namespace = e ? .namespace || "", this.releaseId = e ? .releaseId, this.userIdentifier = e ? .userIdentifier || null, this.options = { ...s9,
                    ...e ? .options || {}
                }
            }
            getEndpoint() {
                return this.dsn ? .startsWith("http") ? this.dsn : `https://${this.dsn}`
            }
            updateConfig(e) {
                e.options && (this.options = { ...this.options,
                    ...e.options
                }), e.userIdentifier && (this.userIdentifier = { ...this.userIdentifier,
                    ...e.userIdentifier
                }), e.appId && (this.appId = e.appId), e.dsn && (this.dsn = e.dsn), e.apiKey && (this.apiKey = e.apiKey), e.cluster && (this.cluster = e.cluster), e.environment && (this.environment = e.environment), e.namespace && (this.namespace = e.namespace), e.releaseId && (this.releaseId = e.releaseId)
            }
        };

    function s7(e) {
        try {
            return globalThis ? .sessionStorage ? .getItem(e) ? ? null
        } catch (e) {
            return s1(e), null
        }
    }

    function oe(e, t) {
        try {
            globalThis ? .sessionStorage ? .setItem(e, t)
        } catch (e) {
            s1(e)
        }
    }

    function ot(e) {
        try {
            globalThis ? .sessionStorage ? .removeItem(e)
        } catch (e) {
            s1(e)
        }
    }
    var or = class e {
            constructor() {
                this.config = null, this.logger = sQ.getInstance(), this.sessionId = null, this.sessionStartTime = null
            }
            static getInstance() {
                return e.instance || (e.instance = new e), e.instance
            }
            initialize(e) {
                this.config || (this.config = new s6(e))
            }
            getConfig() {
                return this.config ? this.config : (this.logger.log("[config-manager] configuration not initialized"), null)
            }
            getSessionId() {
                return this.sessionId ? this.sessionId : s7("gcId") || ""
            }
            setSessionId(e) {
                this.sessionId = e, oe("gcId", e)
            }
            getSessionStartTime() {
                return this.sessionStartTime ? this.sessionStartTime : function(e, t = 0) {
                    let r = s7(e);
                    if (null === r) return t;
                    let n = Number(r);
                    return Number.isFinite(n) ? n : t
                }("gcStartTime", 0)
            }
            setSessionStartTime(e) {
                this.sessionStartTime = e, oe("gcStartTime", String(e))
            }
            updateConfig(e) {
                this.logger.log("[config-manager] updateConfig called"), this.config ? (e && (this.logger.log("[config-manager] updating options"), this.config.updateConfig(e)), e ? .userIdentifier && (this.logger.log("[config-manager] updating user identifier"), this.config.userIdentifier = { ...this.config.userIdentifier,
                    ...e.userIdentifier
                })) : this.logger.log("[config-manager] configuration not initialized")
            }
        },
        on = or.getInstance(),
        oi = new s3,
        os = sQ.getInstance();

    function oo() {
        let e = on ? .getConfig() ? .options ? .eventSampleRate;
        return !(void 0 !== e && !Number.isNaN(e)) || Math.random() <= e
    }

    function oa(e) {
        let t, r = 1e6 * Date.now(),
            n = oi.generateId(),
            i = e.spanId || oi.generateSpanId(),
            s = e.traceId || oi.generateTraceId(),
            o = e.parentSpanId || "",
            a = function e(t, r = "", n = new WeakSet, i = 0) {
                try {
                    return i >= 10 ? {
                        [r || "depth_limit"]: "[Depth Limit]"
                    } : null != t && "number" == typeof t.nodeType && "string" == typeof t.nodeName ? {
                        [r || "dom_node"]: `[${t?.constructor?.name||"DomNode"}]`
                    } : n.has(t) ? {
                        [r || "circular_reference"]: "[Circular]"
                    } : (n.add(t), Object.entries(t).reduce((t, [s, o]) => {
                        let a = r ? `${r}.${s}` : s;
                        return "object" == typeof o && null !== o ? Array.isArray(o) ? t[a] = o.map((t, r) => "object" == typeof t && null !== t ? e(t, `${a}[${r}]`, n, i + 1) : t) : Object.assign(t, e(o, a, n, i + 1)) : t[a] = o, t
                    }, {}))
                } catch (e) {
                    return os.log("[events-processors.formatEventObject] Error formatting event object", e), {
                        [r || "format_error"]: "[Error formatting object]"
                    }
                } finally {
                    n.delete(t)
                }
            }(e.attributes || {}),
            l = (t = s2 ? .location) ? {
                path: t.hash && !t.hash.match(/^#[a-z0-9-]+$/i) && t.hash.startsWith("#/") ? t.hash : t.pathname,
                url: t.href,
                title: s2 ? .document ? .title || ""
            } : {
                path: "",
                url: "",
                title: s2 ? .document ? .title || ""
            },
            h = {
                type: e.type,
                id: n,
                spanId: i,
                parentSpanId: o,
                traceId: s,
                attributes: { ...a,
                    location: l
                }
            };
        return e.span_name && (h.span_name = e.span_name), "network" === e.type ? (h.start_timestamp = e.timestamp || r, h.end_timestamp = e ? .end_timestamp) : h.timestamp = r, h
    }
    var ol = class {
            constructor() {
                this.logger = sQ.getInstance(), this.config = or.getInstance()
            }
            compress(e) {
                let t = this.config.getConfig();
                if (!t ? .options ? .enableCompression) return {
                    data: (new TextEncoder).encode(e),
                    isCompressed: !1
                };
                try {
                    let t = (0, M.strToU8)(e);
                    return {
                        data: (0, M.gzipSync)(t),
                        isCompressed: !0
                    }
                } catch (t) {
                    return {
                        data: (new TextEncoder).encode(e),
                        isCompressed: !1
                    }
                }
            }
            async send(e) {
                let t = this.config.getConfig();
                if (t) try {
                    t ? .options ? .debug && this.logger.log("Sending batch:", e, {
                        groundcoverIgnore: !0
                    });
                    let r = t.apiKey,
                        n = this.buildEndpoint();
                    if (!r) return void this.logger.log("No API key found");
                    let i = JSON.stringify(e),
                        {
                            data: s,
                            isCompressed: o
                        } = this.compress(i);
                    fetch(n, {
                        method: "POST",
                        headers: {
                            "Content-Type": "application/json",
                            apikey: r,
                            "Content-Encoding": o ? "gzip" : ""
                        },
                        body: s
                    }).catch(e => {
                        this.logger.log("Network error while sending batch:", e, {
                            groundcoverIgnore: !0
                        })
                    })
                } catch (e) {
                    t.options.debug && this.logger.log("Failed to send batch:", e, {
                        groundcoverIgnore: !0
                    })
                }
            }
            buildEndpoint() {
                let e = this.config.getConfig();
                if (!e) return "";
                let {
                    dsn: t
                } = e;
                return `${t}/json/rum`
            }
        },
        oh = ["navigation", "dom.event"],
        oc = class e {
            constructor() {
                this.events = [], this.timeoutId = null, this.config = or.getInstance(), this.logger = sQ.getInstance(), this.initialized = !1, this.transporter = new ol
            }
            static getInstance() {
                return e.instance || (e.instance = new e), e.instance
            }
            initialize() {
                try {
                    if (this.initialized) return;
                    this.scheduleFlush(), globalThis.addEventListener("unload", () => {
                        this.flush()
                    }), this.initialized = !0
                } catch (e) {
                    s1(e)
                }
            }
            addEvent(e) {
                if (e && this.initialized) try {
                    let t = this.config.getConfig() ? .options ? .beforeSend,
                        r = this.config.getConfig() ? .options ? .enrichEvent;
                    if (t && !t(e)) return;
                    r && (e = r(e)), this.events.push(e);
                    let n = this.config.getConfig() ? .options ? .batchSize || 100;
                    this.events.length >= n && !oh.includes(e.type) && this.flush()
                } catch (e) {
                    s1(e)
                }
            }
            flush() {
                try {
                    if (!this.events ? .length || !this.initialized) return;
                    if (!this.config.getConfig() ? .cluster) return void this.logger.log("[events-pool.flush] skipping flush: no cluster");
                    this.transporter.send({
                        sessionAttributes: this.getSessionAttributes(),
                        events: this.events
                    }), this.events = [], this.scheduleFlush()
                } catch (e) {
                    s1(e)
                }
            }
            async flushSync() {
                try {
                    if (!this.events ? .length || !this.initialized) return;
                    if (!this.config.getConfig() ? .cluster) return void this.logger.log("[events-pool.flush] skipping flush: no cluster");
                    await this.transporter.send({
                        sessionAttributes: this.getSessionAttributes(),
                        events: this.events
                    }), this.events = []
                } catch (e) {
                    s1(e)
                }
            }
            scheduleFlush() {
                try {
                    null !== this.timeoutId && (s2.clearTimeout(this.timeoutId), this.timeoutId = null);
                    let e = this.config.getConfig() ? .options ? .batchTimeout;
                    if (!e) return;
                    this.timeoutId = s2.setTimeout(() => {
                        this.timeoutId = null, this.flush()
                    }, e)
                } catch (e) {
                    s1(e)
                }
            }
            detectBrowser() {
                let e = navigator.userAgent,
                    t = "unknown",
                    r = "unknown",
                    n = navigator.platform || "unknown",
                    i = /Mobile|Android|iPhone|iPad|iPod/i.test(e);
                return /Edg/.test(e) ? (t = "Edge", r = e.match(/Edg\/([\d.]+)/) ? .[1] || r) : /Chrome/.test(e) && !/Chromium/.test(e) ? (t = "Chrome", r = e.match(/Chrome\/([\d.]+)/) ? .[1] || r) : /Firefox/.test(e) ? (t = "Firefox", r = e.match(/Firefox\/([\d.]+)/) ? .[1] || r) : /Safari/.test(e) && !/Chrome/.test(e) ? (t = "Safari", r = e.match(/Version\/([\d.]+)/) ? .[1] || r) : /Trident/.test(e) ? (t = "Internet Explorer", r = /rv:([^)]+)\)/i.test(e) ? e.match(/rv:([^)]+)\)/i) ? .[1] || r : e.match(/MSIE ([^;]+)/) ? .[1] || r) : /OPR/.test(e) && (t = "Opera", r = e.match(/OPR\/([\d.]+)/) ? .[1] || r), {
                    name: t,
                    version: r,
                    platform: n,
                    language: navigator.language,
                    mobile: i
                }
            }
            getSessionAttributes() {
                let e = this.detectBrowser(),
                    t = this.config.getConfig();
                return {
                    cluster: t ? .cluster || "",
                    env: t ? .environment || "",
                    namespace: t ? .namespace || "",
                    releaseId: t ? .releaseId || "",
                    session_id: this.config.getSessionId(),
                    session_start_time: this.config.getSessionStartTime(),
                    user: t ? .userIdentifier || {},
                    "service.name": t ? .appId,
                    userAgent: navigator.userAgent,
                    browser: e
                }
            }
        };
    oc.instance = null;
    var ou = class {
        constructor() {
            this.logger = sQ.getInstance(), this.eventsPool = oc.getInstance()
        }
    };

    function od({
        text: e,
        maxLength: t = 1e4
    }) {
        return e ? e.length <= t || "string" != typeof e ? e : e.substring(0, t) : ""
    }
    var op = "u" > typeof Element ? Object.getOwnPropertyDescriptor(Element.prototype, "tagName") ? .get : void 0;

    function of (e, t) {
        try {
            return e.getAttribute(t) || ""
        } catch {
            return ""
        }
    }

    function og(e) {
        try {
            let t = op ? .call(e);
            return "string" == typeof t ? t : ""
        } catch {
            return ""
        }
    }
    var om = class extends ou {
            constructor() {
                super(...arguments), this.eventHandlers = [], this.capturedEvents = ["click", "change", "keydown", "select", "submit"], this.config = or.getInstance(), this.getShouldMaskText = e => {
                    let t = this.config.getConfig(),
                        r = t ? .options ? .maskFields || [],
                        n = t ? .options ? .enableMasking || !1;
                    return (["password" === e.target ? .type, e.target ? .id ? .toLowerCase().includes("password"), e.target ? .id ? .toLowerCase().includes("credit-card"), e.target ? .id ? .toLowerCase().includes("cc"), e.target ? .className ? .toLowerCase().includes("cc"), e.target ? .className ? .toLowerCase().includes("credit-card"), e.target ? .className ? .toLowerCase().includes("credit-card"), e.target ? .hasAttribute("data-private")].some(e => e) || r.some(t => e.target ? .id ? .toLowerCase().includes(t))) && n
                }, this.getKeyCode = e => {
                    if (e instanceof KeyboardEvent && e.code && "Dead" !== e.key) {
                        let t = this.getShouldMaskText({
                            target: e.target
                        });
                        return t || t ? "*" : e.key
                    }
                    return ""
                }, this.getText = e => {
                    let t = e.target,
                        r = this.config.getConfig();
                    return r ? .options ? .enableMasking ? "*" : od({
                        text: t.innerText || ""
                    })
                }, this.getSelector = e => e.target instanceof Element && this.generateSelector(e.target) || "", this.getCoordinates = e => {
                    if (({
                            mouseup: !0,
                            mousedown: !0,
                            mousemove: !0,
                            mouseover: !0
                        })[e.type]) {
                        let {
                            clientX: t,
                            clientY: r
                        } = e || {};
                        return {
                            clientX: t,
                            clientY: r
                        }
                    }
                    return null
                }
            }
            initialize() {
                try {
                    this.logger.log("[dom-events-listener.initialize] called"), this.capturedEvents ? .forEach(e => {
                        let t = e => {
                            try {
                                this.handleEvent(e)
                            } catch (e) {
                                s1(e)
                            }
                        };
                        this.eventHandlers.push({
                            type: e,
                            handler: t
                        }), s2 ? .addEventListener(e, t)
                    })
                } catch (e) {
                    s1(e)
                }
            }
            destroy() {
                this.eventHandlers.forEach(({
                    type: t,
                    handler: r
                }) => {
                    e.g ? .removeEventListener ? .(t, r)
                }), this.eventHandlers = []
            }
            handleEvent(e) {
                try {
                    if (!oo()) return;
                    let t = this.buildEvent(e);
                    this.queueEvent(t)
                } catch (e) {
                    s1(e)
                }
            }
            buildEvent(e) {
                let t = this.getSelector(e),
                    r = this.getCoordinates(e),
                    n = e.target,
                    i = this.getKeyCode(e),
                    s = this.getText(e);
                return this.logger.log("[dom-events-listener.buildEvent] called"), oa({
                    type: "dom.event",
                    attributes: {
                        dom_event_selector: t,
                        dom_event_key_code: i,
                        dom_event_type: e.type,
                        dom_event_coordinates: r || {
                            clientX: 0,
                            clientY: 0
                        },
                        dom_event_target: {
                            id: of (n, "id"),
                            tagName: og(n),
                            className: of (n, "class"),
                            text: s
                        }
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[dom-events-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            generateSelector(e, t = {}) {
                if (!e || !e.nodeType || e.nodeType !== Node.ELEMENT_NODE) return "";
                let r = t.root || document.body || document.documentElement,
                    n = t.maxAttempts || 10,
                    i = t.priorityAttributes || ["id", "class", "name", "aria-label", "type", "title", "alt"];
                if ("html" === og(e).toLowerCase()) return "html";
                let s = "",
                    o = 0,
                    a = e,
                    l = [];
                for (; a && a !== r && a !== document.documentElement && o < n;) {
                    let e = og(a).toLowerCase();
                    try {
                        let t = a.getAttribute("id");
                        if (t && /^[a-zA-Z][\w-]*$/.test(t)) return `#${t}`;
                        if (a.classList ? .length) {
                            let t = Array.from(a.classList).filter(e => e && "string" == typeof e).map(e => `.${e}`);
                            t.length && (e += t.join(""))
                        }
                        for (let t of i)
                            if ("id" !== t && "class" !== t) try {
                                let r = a.getAttribute(t);
                                r && (e += `[${t}="${r.replace(/"/g,'\\"')}"]`)
                            } catch (e) {}
                    } catch (t) {
                        e = og(a).toLowerCase() || "*"
                    }
                    l.unshift(e || "*"), s = l.join(" > ");
                    try {
                        if (1 === r.querySelectorAll(s).length) return s
                    } catch (e) {
                        l.shift(), s = l.join(" > ")
                    }
                    try {
                        a = a.parentElement
                    } catch (e) {
                        break
                    }
                    o++
                }
                return s || "*"
            }
        },
        oy = ["log", "info", "warn", "error", "assert", "trace"],
        ov = class extends ou {
            constructor() {
                super(...arguments), this.originalConsole = null, this.isInitialized = !1
            }
            initialize() {
                if (!this.isInitialized) try {
                    this.originalConsole = this.captureConsoleMethods(), oy.forEach(e => {
                        e in console && (console[e] = (...t) => {
                            try {
                                this.handleEvent(t, e)
                            } catch (e) {
                                s1(e)
                            } finally {
                                this.originalConsole ? .[e] && this.originalConsole[e](...t)
                            }
                        })
                    }), this.isInitialized = !0
                } catch (e) {
                    s1(e)
                }
            }
            destroy() {
                try {
                    if (!this.isInitialized) return;
                    oy.forEach(e => {
                        this.originalConsole && this.originalConsole[e] && (console[e] = this.originalConsole[e])
                    }), this.isInitialized = !1
                } catch (e) {
                    s1(e)
                }
            }
            handleEvent(e, t) {
                try {
                    if (!oo()) return;
                    let r = this.formatMessage(Array.isArray(e) ? e : [e], t);
                    if (!r || r ? .includes("groundcoverIgnore")) return;
                    let n = this.buildEvent({
                        message: r,
                        level: t
                    });
                    this.queueEvent(n)
                } catch (e) {
                    s1(e)
                }
            }
            buildEvent({
                message: e,
                level: t
            }) {
                return oa({
                    type: "log",
                    attributes: {
                        message: od({
                            text: e
                        }),
                        level: t
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[logs-events-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            formatMessage(e, t) {
                if (!Array.isArray(e)) return String(e);
                try {
                    return e.map(e => {
                        if (void 0 === e) return "undefined";
                        if (null === e) return "null";
                        if ("object" == typeof e) {
                            if (e instanceof Error) try {
                                return "error" === t && e.stack || e.toString()
                            } catch {
                                try {
                                    let t = {
                                        name: e.name,
                                        message: e.message,
                                        stack: e.stack
                                    };
                                    return JSON.stringify(t)
                                } catch {
                                    return Object.prototype.toString.call(e)
                                }
                            }
                            try {
                                return JSON.stringify(e)
                            } catch {
                                return Object.prototype.toString.call(e)
                            }
                        }
                        return String(e)
                    }).join(" ")
                } catch (e) {
                    return s1(e), "[Error formatting console message]"
                }
            }
            captureConsoleMethods() {
                let e = {};
                try {
                    oy.forEach(t => {
                        console && "function" == typeof console[t] && (e[t] = console[t].bind(console))
                    })
                } catch (e) {
                    s1(e)
                }
                return e
            }
        };

    function ow(e) {
        try {
            if (null == e) return "";
            if ("string" == typeof e) return e;
            if (e instanceof FormData) return "[form data]";
            if (e instanceof Blob) return "[blob data]";
            if (e instanceof ArrayBuffer) return "[arraybuffer data]";
            if ("u" > typeof Document && (e instanceof Document || 9 === e ? .nodeType)) return "[document data]";
            if (e instanceof URLSearchParams) try {
                return e.toString()
            } catch {
                return "[unreadable body]"
            }
            return Array.isArray(e) || "object" == typeof e ? JSON.stringify(e) : String(e)
        } catch (e) {
            return s1(`Failed to format body: ${e}`), "[unreadable body]"
        }
    }
    var ob, oS, oC, oI, oE, ox, ok, oO, oM, oR, oT, oA, oN, oL, oD, oP = class extends ou {
            constructor() {
                super(...arguments), this.maxBodyLength = 5e3, this.config = or.getInstance(), this.idGenerator = new s3, this.handleEvent = e => {
                    try {
                        if (this.shouldIgnoreRequest(e.url) || !oo()) return;
                        let t = this.buildEvent(e);
                        this.queueEvent(t)
                    } catch (e) {
                        s1(e)
                    }
                }, this.buildEvent = e => {
                    let t = e.url,
                        r = e.url;
                    this.logger.log("[network-events-listener.buildEvent] called", {
                        event: e
                    });
                    try {
                        t = new URL(e.url).pathname
                    } catch (t) {
                        r = new URL(e.url, globalThis.location.href).href
                    }
                    this.logger.log("[network-events-listener.buildEvent] fullUrl", {
                        fullUrl: r
                    });
                    let n = this.formatHeaders(e.request.headers),
                        i = this.formatHeaders(e.response.headers),
                        s = e.method ? .toUpperCase() || "UNKNOWN",
                        {
                            traceId: o,
                            spanId: a
                        } = this.extractTraceIds(e.request.headers),
                        l = od({
                            text: e.request.body,
                            maxLength: this.maxBodyLength
                        }),
                        h = od({
                            text: e.response.body,
                            maxLength: this.maxBodyLength
                        }),
                        c = {
                            type: "HTTP",
                            operation: {
                                name: s
                            },
                            resource_name: t,
                            status: e.status ? .toString(),
                            subType: s,
                            url: {
                                full: r
                            },
                            http: {
                                route: t,
                                path: t,
                                method: e.method,
                                status: e.status ? .toString(),
                                request: {
                                    headers: n,
                                    method: e.method
                                },
                                response: {
                                    headers: i,
                                    status_code: e.status ? .toString()
                                }
                            },
                            error: e ? .error ? .type ? {
                                type: e.error ? .type || "Unknown error"
                            } : void 0,
                            gc: {
                                request: {
                                    body: l
                                },
                                response: {
                                    body: h
                                }
                            }
                        },
                        u = {
                            type: "network",
                            timestamp: e ? .timestamp && !Number.isNaN(e.timestamp) ? 1e6 * e.timestamp : void 0,
                            end_timestamp: e ? .end_time && !Number.isNaN(e.end_time) ? 1e6 * e.end_time : void 0,
                            span_name: `${e.method} ${t}`,
                            attributes: c
                        };
                    return o && (u.traceId = o), a && (u.spanId = a), oa(u)
                }
            }
            async getResponseBody(e) {
                let t;
                try {
                    let r = e.clone().body;
                    if (r) {
                        let e, n = r.getReader(),
                            i = new TextDecoder,
                            s = "";
                        for (; !(e = await n.read()).done;) {
                            let t = e.value;
                            s += i.decode(t)
                        }
                        t = s
                    } else t = ""
                } catch (e) {
                    t = `Unable to clone response: ${e}`
                }
                return t
            }
            initialize() {
                this.logger.log("[network-events-listener.initialize] called"), this.patchXHR(), this.patchFetch()
            }
            destroy() {
                globalThis.XMLHttpRequest.prototype.open = globalThis.XMLHttpRequest.prototype.open, globalThis.XMLHttpRequest.prototype.send = globalThis.XMLHttpRequest.prototype.send, globalThis.fetch = globalThis.fetch
            }
            shouldIgnoreRequest(e) {
                try {
                    let t = this.config.getConfig() ? .getEndpoint();
                    if (t && e.includes(t) || [".tsx", ".jsx", ".css"].some(t => e.toLowerCase().endsWith(t))) return !0;
                    return (this.config.getConfig() ? .options ? .excludedUrls || []).some(t => {
                        if (t instanceof RegExp) return t.test(e);
                        if ("string" == typeof t && (t.includes("*") || t.includes("?"))) {
                            let r = t.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
                            return new RegExp(r).test(e)
                        }
                        return e === t
                    })
                } catch (e) {
                    return s1(e), !1
                }
            }
            queueEvent(e) {
                try {
                    this.logger.log("[network-events-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            patchXHR() {
                let e, t = this,
                    r = globalThis.XMLHttpRequest.prototype.open,
                    n = globalThis.XMLHttpRequest.prototype.send,
                    i = globalThis.XMLHttpRequest.prototype.setRequestHeader;
                globalThis.XMLHttpRequest.prototype.open = function(n, i, s = !0, o, a) {
                    if (e = Date.now(), t.shouldIgnoreRequest(i.toString())) return r.apply(this, [n, i, s, o, a]);
                    let l = new URL(i.toString(), globalThis.location.href).href;
                    return this._requestMethod = n, this._requestUrl = l, this._requestHeaders = {}, r.apply(this, [n, i, s, o, a])
                }, globalThis.XMLHttpRequest.prototype.setRequestHeader = function(e, t) {
                    return this._requestHeaders && (this._requestHeaders[e] = t), i.apply(this, [e, t])
                }, globalThis.XMLHttpRequest.prototype.send = function(...r) {
                    let i = this._requestUrl ? .toString();
                    if (!i || t.shouldIgnoreRequest(i)) return n.apply(this, r);
                    if (t.shouldAddTraceHeader(i)) {
                        let e = t.config.getConfig(),
                            r = t.getTraceIds();
                        e ? .options ? .traceOrigin ? .name && t.addHeaderToXhrRequest({
                            request: this,
                            headerName: e.options.traceOrigin.name,
                            headerValue: e.options.traceOrigin.value
                        }), r && (e ? .options ? .tracePropagationTraceIdHeaderName && t.addHeaderToXhrRequest({
                            request: this,
                            headerName: e.options.tracePropagationTraceIdHeaderName,
                            headerValue: r.decimalTraceId
                        }), e ? .options ? .tracePropagationSpanIdHeaderName && t.addHeaderToXhrRequest({
                            request: this,
                            headerName: e.options.tracePropagationSpanIdHeaderName,
                            headerValue: r.decimalSpanId
                        }), e ? .options ? .tracePropagationHeaders && e ? .options ? .tracePropagationHeaders ? .forEach(e => {
                            t.addHeaderToXhrRequest({
                                request: this,
                                headerName: e,
                                headerValue: r.traceparent
                            })
                        }), e ? .options ? .tracePropagationHeaders ? .length || t.addHeaderToXhrRequest({
                            request: this,
                            headerName: "traceparent",
                            headerValue: r.traceparent
                        }))
                    }
                    return this._requestBody = r[0] || "", this.addEventListener("load", () => {
                        let r = Date.now(),
                            n = {};
                        this.getAllResponseHeaders().split(/\r?\n/).forEach(e => {
                            let [t, r] = e.split(": ");
                            t && r && (n[t.trim()] = r.trim())
                        });
                        let i = ow(this._requestBody),
                            s = ow("" === this.responseType || "text" === this.responseType ? this.responseText : this.response),
                            o = {
                                timestamp: e,
                                end_time: r,
                                method: this._requestMethod,
                                url: this._requestUrl,
                                body: i,
                                status: this.status,
                                request: {
                                    headers: this._requestHeaders || {},
                                    body: i
                                },
                                response: {
                                    headers: n,
                                    body: s
                                }
                            };
                        t.handleEvent(o)
                    }), n.apply(this, r)
                }
            }
            normalizeHeaders(e, t) {
                try {
                    let r = e ? new Headers(e) : new Headers;
                    return t && (t instanceof Headers ? t.forEach((e, t) => r.set(t, e)) : Array.isArray(t) ? new Headers(t).forEach((e, t) => r.set(t, e)) : "object" == typeof t && Object.entries(t).forEach(([e, t]) => r.set(e, t))), r
                } catch {
                    return new Headers
                }
            }
            addTraceHeaders(e) {
                let t = this.config.getConfig(),
                    r = this.getTraceIds();
                if (t ? .options ? .traceOrigin ? .name && this.addHeaderToFetchRequest({
                        init: e,
                        headerName: t.options.traceOrigin.name,
                        headerValue: t.options.traceOrigin.value
                    }), !r) return;
                t ? .options ? .tracePropagationTraceIdHeaderName && this.addHeaderToFetchRequest({
                    init: e,
                    headerName: t.options.tracePropagationTraceIdHeaderName,
                    headerValue: r.decimalTraceId
                }), t ? .options ? .tracePropagationSpanIdHeaderName && this.addHeaderToFetchRequest({
                    init: e,
                    headerName: t.options.tracePropagationSpanIdHeaderName,
                    headerValue: r.decimalSpanId
                });
                let n = t ? .options ? .tracePropagationHeaders;
                (n ? .length ? n : ["traceparent"]).forEach(t => {
                    this.addHeaderToFetchRequest({
                        init: e,
                        headerName: t,
                        headerValue: r.traceparent
                    })
                })
            }
            extractHeadersRecord(e) {
                let t = {};
                return e instanceof Headers && e.forEach((e, r) => {
                    t[r] = e
                }), t
            }
            patchFetch() {
                let e = globalThis.fetch;
                globalThis.fetch = (...t) => {
                    let r = Date.now(),
                        [n, i] = t;
                    i = { ...i || {}
                    }, t[1] = i;
                    let s = n instanceof Request,
                        o = i ? .method || "GET",
                        a = i ? .body || "",
                        l = n instanceof Request ? n.url : n.toString();
                    if (this.shouldIgnoreRequest(l)) return e.apply(globalThis, t);
                    let h = this.shouldAddTraceHeader(l);
                    i || (t[1] = {}, i = t[1]), i.headers = this.normalizeHeaders(s ? n.headers : void 0, i.headers), h && this.addTraceHeaders(i);
                    let c = this.extractHeadersRecord(i.headers),
                        u = ow(a);
                    return e.apply(globalThis, t).then(e => {
                        let t = Date.now(),
                            n = e.clone(),
                            i = {};
                        n.headers.forEach((e, t) => {
                            i[t] = e
                        });
                        let s = {
                            method: o,
                            url: l,
                            timestamp: r,
                            body: u,
                            status: n.status,
                            end_time: t,
                            request: {
                                headers: c,
                                body: u
                            },
                            response: {
                                headers: i,
                                body: ""
                            }
                        };
                        try {
                            i["content-type"] ? .includes("text/event-stream") ? (s.response.body = "[unreadable response body]", this.handleEvent(s)) : this.getResponseBody(n).then(e => {
                                s.response.body = e, this.handleEvent(s)
                            }).catch(e => {
                                s.response.body = "[unreadable response body]", this.handleEvent(s), this.logger.log("[network-events-listener.patchFetch] error", {
                                    error: e
                                })
                            })
                        } catch (e) {
                            s.response.body = "[unreadable response body]", this.handleEvent(s), this.logger.log("[network-events-listener.patchFetch] error", {
                                error: e
                            })
                        }
                        return e
                    }).catch(e => {
                        let t = Date.now(),
                            r = "NetworkError",
                            n = e.message || "Unknown network error";
                        e instanceof TypeError && n.includes("Failed to fetch") ? r = "ERR_NETWORK_FAILURE" : n.includes("Name not resolved") ? r = "ERR_NAME_NOT_RESOLVED" : n.includes("Connection refused") && (r = "ERR_CONNECTION_REFUSED");
                        let i = {
                            method: o,
                            url: l,
                            body: u,
                            status: 0,
                            end_time: t,
                            request: {
                                headers: c,
                                body: u
                            },
                            response: {
                                headers: {},
                                body: ""
                            },
                            error: {
                                type: r
                            }
                        };
                        throw this.handleEvent(i), e
                    })
                }
            }
            formatHeaders(e) {
                let t = ["authorization", "cookie", "set-cookie"];
                return Object.entries(e) ? .reduce((e, [r, n]) => {
                    let i = r.toLowerCase();
                    return t.includes(i) || /(token|key|secret|password)/i.test(i) ? e[r] = "[REDACTED]" : e[r] = od({
                        text: n
                    }), e
                }, {})
            }
            extractTraceIds(e) {
                let t = this.config.getConfig(),
                    r = "",
                    n = "";
                if (t ? .options ? .tracePropagationTraceIdHeaderName) {
                    let n = e[t.options.tracePropagationTraceIdHeaderName];
                    n && "string" == typeof n && (r = n)
                }
                if (t ? .options ? .tracePropagationSpanIdHeaderName) {
                    let r = e[t.options.tracePropagationSpanIdHeaderName];
                    r && "string" == typeof r && (n = r)
                }
                if (!r || !n) {
                    let t = this.extractTraceparentHeader(e);
                    if (t) {
                        let e = t.split("-");
                        4 === e.length && "00" === e[0] && (!r && e[1] && 32 === e[1].length && (r = e[1]), !n && e[2] && 16 === e[2].length && (n = e[2]))
                    }
                }
                return {
                    traceId: r,
                    spanId: n
                }
            }
            extractTraceparentHeader(e) {
                let t = this.config.getConfig();
                if (t ? .options ? .tracePropagationHeaders ? .length)
                    for (let r of t.options.tracePropagationHeaders) {
                        let t = e[r];
                        if (t && "string" == typeof t) return t
                    }
                let r = e.traceparent;
                return r && "string" == typeof r ? r : ""
            }
            getTraceIds() {
                let e, t, r = this.idGenerator.generateSpanId(),
                    n = this.idGenerator.generateTraceId();
                try {
                    e = BigInt("0x" + n).toString(10), t = BigInt("0x" + r).toString(10)
                } catch (i) {
                    this.logger.log("[network-events-listener.getTraceIds] error", {
                        error: i
                    }), e = n, t = r
                }
                return {
                    traceparent: `00-${n}-${r}-01`,
                    traceId: n,
                    spanId: r,
                    decimalTraceId: e,
                    decimalSpanId: t
                }
            }
            addHeaderToXhrRequest({
                request: e,
                headerName: t,
                headerValue: r
            }) {
                if (this.logger.log("[network-events-listener.addHeaderToXhrRequest] called", {
                        request: e,
                        headerName: t,
                        headerValue: r
                    }), this.isValidHeaderName(t)) try {
                    e.setRequestHeader(t, r), e._requestHeaders[t] = r
                } catch (e) {
                    this.logger.log("[network-events-listener.addHeaderToXhrRequest] Error setting header", {
                        error: e,
                        headerName: t,
                        headerValue: r
                    })
                } else this.logger.log("[network-events-listener.addHeaderToXhrRequest] Invalid header name", {
                    headerName: t
                })
            }
            addHeaderToFetchRequest({
                init: e,
                headerName: t,
                headerValue: r
            }) {
                if (this.logger.log("[network-events-listener.addHeaderToFetchRequest] called", {
                        init: e,
                        headerName: t,
                        headerValue: r
                    }), this.isValidHeaderName(t)) try {
                    e.headers instanceof Headers ? e.headers.set(t, r) : e.headers = { ...e.headers,
                        [t]: r
                    }
                } catch (e) {
                    this.logger.log("[network-events-listener.addHeaderToFetchRequest] Error setting header", {
                        error: e,
                        headerName: t,
                        headerValue: r
                    })
                } else this.logger.log("[network-events-listener.addHeaderToFetchRequest] Invalid header name", {
                    headerName: t
                })
            }
            isValidHeaderName(e) {
                return !!e && "string" == typeof e && /^[a-zA-Z0-9!#$&'*+\-.^_`|~]+$/.test(e)
            }
            shouldAddTraceHeader(e) {
                let t = this.config.getConfig();
                if (this.logger.log("[network-events-listener.shouldAddTraceHeader] called", {
                        url: e,
                        config: t
                    }), !t ? .options ? .tracePropagationUrls ? .length) return !1;
                let r = t.options.tracePropagationUrls ? .some(t => {
                    let r = t.replace(/\*/g, ".*"),
                        n = RegExp(`^${r}$`),
                        i = e.startsWith("/") ? new URL(e, globalThis.location.href).pathname : e;
                    return n.test(i)
                });
                return this.logger.log("[network-events-listener.shouldAddTraceHeader] result", {
                    url: e,
                    result: r
                }), r
            }
        },
        o_ = class extends ou {
            constructor() {
                super(...arguments), this.handleEvent = (e, t) => {
                    this.logger.log("[errors-events-listener.handleEvent] called");
                    try {
                        let r;
                        if (e instanceof Error) r = e, this.enhanceError(r);
                        else if (e instanceof ErrorEvent) {
                            if (r = e.error || Error(e.message || "Unknown error"), /Script error\.?/.test(r.message)) return;
                            this.enhanceError(r, e)
                        } else {
                            if (!(e instanceof PromiseRejectionEvent)) return;
                            r = this.createUnhandledRejectionError(e)
                        }
                        let n = this.buildEvent(r, t);
                        this.queueEvent(n)
                    } catch (e) {
                        s1(e)
                    }
                }
            }
            initialize() {
                s2 ? .addEventListener("error", this.handleEvent), s2 ? .addEventListener("unhandledrejection", this.handleEvent)
            }
            destroy() {
                s2 ? .removeEventListener("error", this.handleEvent), s2 ? .removeEventListener("unhandledrejection", this.handleEvent)
            }
            buildEvent(e, t) {
                return oa({
                    type: "exception",
                    attributes: {
                        error_type: e.name || "Error",
                        error_message: e.message || "Unknown error",
                        error_stacktrace: this.buildStackTrace(e),
                        error_fingerprint: `${e.name}:${od({text:e.message,maxLength:400})}`,
                        error_handled: t ? .handled || !1,
                        error_metadata: t ? .metadata
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[errors-events-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            enhanceError(e, t) {
                let {
                    filename: r,
                    lineno: n,
                    colno: i
                } = t || {};
                r && !e.fileName && Object.defineProperty(e, "fileName", {
                    value: r
                }), n && !e.lineNumber && Object.defineProperty(e, "lineNumber", {
                    value: n
                }), i && !e.columnNumber && Object.defineProperty(e, "columnNumber", {
                    value: i
                })
            }
            createUnhandledRejectionError(e) {
                let t;
                return e.reason instanceof Error ? t = e.reason : ((t = Error("object" == typeof e.reason ? JSON.stringify(e.reason, null, 2) : String(e.reason))).name = "UnhandledRejection", Object.defineProperty(t, "originalReason", {
                    value: e.reason,
                    enumerable: !1
                })), t
            }
            buildStackTrace(e) {
                if (!e) return [];
                try {
                    return R.default.parse(e).map(e => ({
                        filename: e.fileName || "unknown",
                        function: e.functionName || "anonymous",
                        lineno: e.lineNumber || 0,
                        colno: e.columnNumber || 0
                    }))
                } catch (e) {
                    return []
                }
            }
        },
        oF = class extends ou {
            constructor({
                isEnabled: e
            }) {
                if (super(), this.currentUrl = "", this.originalPushState = null, this.originalReplaceState = null, this.isInitialized = !1, this.isAutomaticNavigationEnabled = !1, this.activeNavigation = null, this.popStateHandler = () => {
                        this.handleLocationChange()
                    }, this.hashChangeHandler = () => {
                        this.handleLocationChange()
                    }, this.isInBrowserEnvironment() && e) try {
                    this.isAutomaticNavigationEnabled = e, this.currentUrl = s2.location.href, this.originalPushState = history.pushState, this.originalReplaceState = history.replaceState
                } catch (e) {
                    s1(e)
                }
            }
            isInBrowserEnvironment() {
                try {
                    return void 0 !== s2 && void 0 !== s2.location && void 0 !== s2.history && "function" == typeof s2.addEventListener
                } catch (e) {
                    return s1(e), !1
                }
            }
            initialize() {
                try {
                    if (this.logger.log("[navigation-listener.initialize] called"), !this.isInBrowserEnvironment() || !this.originalPushState || !this.originalReplaceState) return void this.logger.log("[navigation-listener.initialize] Browser environment not available, skipping initialization");
                    if (!this.isAutomaticNavigationEnabled) return void this.logger.log("[navigation-listener.initialize] Automatic navigation is disabled, skipping initialization");
                    let e = this.originalPushState,
                        t = this.originalReplaceState;
                    history.pushState = (...t) => {
                        let r = e.apply(history, t);
                        return this.handleLocationChange(), r
                    }, history.replaceState = (...e) => {
                        let r = t.apply(history, e);
                        return this.handleLocationChange(), r
                    }, s2 && "function" == typeof s2.addEventListener && (s2.addEventListener("popstate", this.popStateHandler), s2.addEventListener("hashchange", this.hashChangeHandler)), this.isInitialized = !0
                } catch (e) {
                    s1(e)
                }
            }
            destroy() {
                try {
                    this.logger.log("[navigation-listener.destroy] called"), this.isInitialized && this.originalPushState && this.originalReplaceState && (history.pushState = this.originalPushState, history.replaceState = this.originalReplaceState), s2 && "function" == typeof s2.removeEventListener && (s2.removeEventListener("popstate", this.popStateHandler), s2.removeEventListener("hashchange", this.hashChangeHandler)), this.isInitialized = !1
                } catch (e) {
                    s1(e)
                }
            }
            handleEvent() {
                try {
                    this.logger.log("[navigation-listener.handleEvent] called");
                    let e = this.buildEvent();
                    this.queueEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            buildEvent() {
                return this.logger.log("[navigation-listener.buildEvent] called", s2.location.href), oa({
                    type: "navigation",
                    attributes: {
                        page_url: s2.location.href,
                        metadata: this.activeNavigation ? .metadata,
                        duration_ms: this.activeNavigation ? .duration_ms || 0,
                        start_timestamp: this.activeNavigation ? .startTime || 0,
                        end_timestamp: this.activeNavigation ? .endTime || 0
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[navigation-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            startNavigation(e) {
                this.logger.log("[navigation-listener.startNavigation] called", e), this.activeNavigation = {
                    page_url: s2.location.href,
                    metadata: e,
                    startTime: Date.now(),
                    endTime: 0,
                    duration_ms: 0
                }
            }
            endNavigation(e) {
                this.logger.log("[navigation-listener.endNavigation] called", e), this.activeNavigation ? (this.logger.log("[navigation-listener.endNavigation] active navigation", this.activeNavigation), this.activeNavigation.endTime = Date.now(), this.activeNavigation.duration_ms = this.activeNavigation.endTime - this.activeNavigation.startTime, this.handleEvent()) : this.logger.log("[navigation-listener.endNavigation] no active navigation found")
            }
            handleLocationChange() {
                try {
                    let e, t;
                    if (!this.isInitialized || (this.logger.log("[navigation-listener.handleLocationChange] called"), this.currentUrl === s2.location.href)) return;
                    try {
                        e = new URL(s2.location.href), t = new URL(this.currentUrl)
                    } catch (e) {
                        return void s1(e)
                    }
                    let r = e.hash.startsWith("#/") || t.hash.startsWith("#/");
                    (e.pathname !== t.pathname || r && e.hash !== t.hash) && (this.currentUrl = s2.location.href, this.handleEvent())
                } catch (e) {
                    s1(e)
                }
            }
        },
        oz = class extends ou {
            constructor() {
                super(), this.loadEventHandler = () => {
                    this.logger.log("load event"), this.handleEvent()
                }
            }
            initialize() {
                try {
                    this.logger.log("[page-load-listener.initialize] called"), this.logger.log("globalThis", s2), "complete" === s2 ? .document ? .readyState ? (this.logger.log("Page already loaded, triggering event immediately"), this.handleEvent()) : s2 ? .addEventListener("load", this.loadEventHandler)
                } catch (e) {
                    this.logger.log("[page-load-listener.initialize] error", e), s1(e)
                }
            }
            destroy() {
                s2 ? .removeEventListener("load", this.loadEventHandler)
            }
            handleEvent() {
                try {
                    this.logger.log("[page-load-listener.handleEvent] called");
                    let e = this.buildEvent();
                    this.queueEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
            buildEvent() {
                let e = performance.getEntriesByType("navigation")[0],
                    t = e ? e.loadEventEnd - e.startTime : 0,
                    r = performance.getEntriesByType("resource"),
                    n = {
                        count: r.length,
                        totalSize: 0,
                        totalDuration: 0,
                        byType: {}
                    };
                return r.forEach(e => {
                    let t = e.transferSize || 0,
                        r = e.duration,
                        i = e.initiatorType;
                    n.totalSize += t, n.totalDuration += r, n.byType[i] || (n.byType[i] = {
                        count: 0,
                        size: 0,
                        duration: 0
                    }), n.byType[i].count++, n.byType[i].size += t, n.byType[i].duration += r
                }), oa({
                    type: "pageload",
                    attributes: {
                        page_url: s2 ? .location ? .href || "",
                        page_load_time: t,
                        page_referrer: s2 ? .document ? .referrer || "",
                        page_resources: n
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[page-load-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
        },
        oU = class extends ou {
            constructor() {
                super(...arguments), this.handleEvent = e => {
                    try {
                        if (!oo()) return;
                        let t = this.buildEvent(e);
                        this.queueEvent(t)
                    } catch (e) {
                        s1(e)
                    }
                }
            }
            initialize() {
                $(this.handleEvent), ef(this.handleEvent), q(this.handleEvent), ey(this.handleEvent), eu(this.handleEvent)
            }
            destroy() {}
            buildEvent(e) {
                return oa({
                    type: "performance",
                    attributes: {
                        performance_metric_name: e.name,
                        performance_metric_value: e.value,
                        performance_metric_id: e.id,
                        performance_metric_navigation_type: e.navigationType || ""
                    }
                })
            }
            queueEvent(e) {
                try {
                    this.logger.log("[performance-listener.queueEvent] called"), e && this.eventsPool.addEvent(e)
                } catch (e) {
                    s1(e)
                }
            }
        },
        oj = class {
            constructor(e) {
                this.logger = sQ.getInstance(), this.eventsPool = oc.getInstance(), this.stopFn = null, this.isRecording = !1, this.events = [], this.startTime = 0, this.batchSize = 3, this.batchContainsFullSnapshot = !1, this.fullSnapshotTimestamp = void 0, this.inactivityTimer = null, this.onInactivityStop = e ? ? null
            }
            initialize() {
                this.logger.log("[session-replay-listener] initialize called"), this.isRecording ? this.logger.log("[session-replay-listener] already recording") : this.startRecording()
            }
            startRecording() {
                try {
                    this.startTime = Date.now(), this.events = [], this.isRecording = !0, this.batchContainsFullSnapshot = !1, this.fullSnapshotTimestamp = void 0, this.stopFn = sd({
                        slimDOMOptions: {
                            script: !1,
                            comment: !1,
                            headWhitespace: !1
                        },
                        sampling: {
                            mousemove: 100,
                            input: "last",
                            scroll: 150
                        },
                        packFn: sK,
                        checkoutEveryNms: 3e4,
                        emit: (e, t) => {
                            if (this.isRecording) try {
                                if (t || this.resetInactivityTimer(), this.events.push(e), t && (this.batchContainsFullSnapshot = !0, this.fullSnapshotTimestamp = Date.now(), this.logger.log("[session-replay-listener] full snapshot captured at", this.fullSnapshotTimestamp)), this.events.length >= this.batchSize) try {
                                    this.sendBatch()
                                } catch (e) {
                                    s1(e), this.logger.log("[session-replay-listener] failed to send batch in emit callback:", e)
                                }
                            } catch (e) {
                                s1(e), this.logger.log("[session-replay-listener] failed to process event in emit callback:", e)
                            }
                        }
                    }) || null, this.resetInactivityTimer(), this.logger.log("[session-replay-listener] started recording with full snapshot interval:", 3e4, "ms")
                } catch (e) {
                    s1(e), this.logger.log("[session-replay-listener] failed to start recording:", e), this.isRecording = !1
                }
            }
            resetInactivityTimer() {
                this.inactivityTimer && clearTimeout(this.inactivityTimer), this.inactivityTimer = setTimeout(() => {
                    this.logger.log("[session-replay-listener] stopping recording due to inactivity"), this.stopRecording();
                    try {
                        this.onInactivityStop ? .()
                    } catch (e) {
                        s1(e), this.logger.log("[session-replay-listener] onInactivityStop error:", e)
                    }
                }, 18e5)
            }
            clearInactivityTimer() {
                this.inactivityTimer && (clearTimeout(this.inactivityTimer), this.inactivityTimer = null)
            }
            sendBatch() {
                if (0 !== this.events.length) try {
                    let e = [...this.events],
                        t = this.batchContainsFullSnapshot,
                        r = this.fullSnapshotTimestamp,
                        n = {
                            _gc_replay_data: {
                                events: e
                            }
                        };
                    t && (n.replay_is_full_snapshot = !0, n.replay_full_snapshot_timestamp = r);
                    let i = oa({
                        type: "replay",
                        attributes: n
                    });
                    this.eventsPool.addEvent(i), this.events = [], this.batchContainsFullSnapshot = !1, this.fullSnapshotTimestamp = void 0, this.logger.log("[session-replay-listener] sent batch with", e.length, "events", t ? "(includes full snapshot)" : "")
                } catch (e) {
                    s1(e), this.logger.log("[session-replay-listener] failed to send batch:", e)
                }
            }
            stopRecording() {
                if (this.isRecording && this.stopFn) try {
                    this.clearInactivityTimer(), this.stopFn(), this.isRecording = !1;
                    let e = this.events.length;
                    if (e > 0) try {
                        let t = {
                            _gc_replay_data: {
                                events: [...this.events]
                            }
                        };
                        this.batchContainsFullSnapshot && (t.replay_is_full_snapshot = !0, t.replay_full_snapshot_timestamp = this.fullSnapshotTimestamp);
                        let r = oa({
                            type: "replay",
                            attributes: t
                        });
                        this.eventsPool.addEvent(r), this.logger.log("[session-replay-listener] sent final replay event with", e, "events")
                    } catch (e) {
                        s1(e), this.logger.log("[session-replay-listener] failed to encode and send final replay event:", e)
                    }
                    this.stopFn = null, this.batchContainsFullSnapshot = !1, this.fullSnapshotTimestamp = void 0
                } catch (e) {
                    s1(e), this.logger.log("[session-replay-listener] failed to stop recording:", e)
                }
            }
            destroy() {
                this.stopRecording()
            }
        },
        oB = class {
            constructor() {
                this.logger = sQ.getInstance(), this.eventsPool = oc.getInstance(), this.configManager = or.getInstance(), this.idGenerator = new s3, this.logEventsListener = null, this.domEventsListener = null, this.errorsEventsListener = null, this.networkEventsListener = null, this.navigationListener = null, this.performanceListener = null, this.pageLoadListener = null, this.sessionReplayListener = null
            }
            instrument() {
                this.logger.log("[instrumentation-manager.instrument] called");
                let e = this.configManager.getConfig(),
                    t = e ? .options ? .enabledEvents,
                    r = !t || 0 === t.length,
                    n = [];
                (r || t ? .includes("pageload")) && (this.pageLoadListener = new oz, this.pageLoadListener.initialize(), n.push("pageload")), (r || t ? .includes("dom")) && (this.domEventsListener = new om, this.domEventsListener.initialize(), n.push("dom")), (r || t ? .includes("logs")) && (this.logEventsListener = new ov, this.logEventsListener.initialize(), n.push("logs")), (r || t ? .includes("exceptions")) && (this.errorsEventsListener = new o_, this.errorsEventsListener.initialize(), n.push("exceptions")), (r || t ? .includes("network")) && (this.networkEventsListener = new oP, this.networkEventsListener.initialize(), n.push("network")), (r || t ? .includes("performance")) && (this.performanceListener = new oU, this.performanceListener.initialize(), n.push("performance")), this.navigationListener = new oF({
                    isEnabled: r || t ? .includes("navigation")
                }), this.navigationListener.initialize(), n.push("navigation"), this.logger.log("[instrumentation-manager.instrument] initialized listeners based on config:", n)
            }
            sendCustomEvent(e) {
                this.logger.log("[instrumentation-manager.sendCustomEvent] called", e);
                try {
                    let t = oa({
                        type: "custom",
                        attributes: {
                            custom_event_name: e ? .event,
                            custom_event_attributes: e ? .attributes
                        }
                    });
                    this.eventsPool.addEvent(t)
                } catch (e) {
                    s1(e)
                }
            }
            captureException(e, t) {
                try {
                    this.logger.log("[instrumentation-manager.captureException] called", e), this.errorsEventsListener ? .handleEvent(e, {
                        handled: !0,
                        metadata: t
                    })
                } catch (e) {
                    s1(e)
                }
            }
            isNavigationTrackingEnabled() {
                let e = this.configManager.getConfig();
                return e ? .options ? .enabledEvents ? .includes("navigation") || 0 === e ? .options ? .enabledEvents ? .length
            }
            startNavigation(e) {
                this.logger.log("[instrumentation-manager.startNavigation] called", e), this.isNavigationTrackingEnabled() ? this.logger.log("[instrumentation-manager.startNavigation] startNavigation called while navigation tracking is enabled. Ignoring. If you wish to track navigations manually, please disable navigation tracking via the enabledEvents array in the config.") : this.navigationListener ? .startNavigation(e)
            }
            endNavigation(e) {
                this.logger.log("[instrumentation-manager.endNavigation] called", e), this.isNavigationTrackingEnabled() ? this.logger.log("[instrumentation-manager.endNavigation] endNavigation called while navigation tracking is enabled. Ignoring. If you wish to track navigations manually, please disable navigation tracking via the enabledEvents array in the config.") : this.navigationListener ? .endNavigation(e)
            }
            startReplayRecording() {
                if (this.sessionReplayListener) this.logger.log("[instrumentation-manager] replay recording already started");
                else try {
                    let e = new oj(() => {
                        this.handleReplayInactivityStop()
                    });
                    e.initialize(), this.sessionReplayListener = e, this.logger.log("[instrumentation-manager] started replay recording")
                } catch (e) {
                    s1(e), this.logger.log("[instrumentation-manager] failed to start replay recording:", e)
                }
            }
            handleReplayInactivityStop() {
                this.logger.log("[instrumentation-manager] replay stopped due to inactivity, rotating session");
                try {
                    this.eventsPool.flush()
                } catch (e) {
                    s1(e), this.logger.log("[instrumentation-manager] failed to flush events before session rotation:", e)
                }
                try {
                    let e = this.idGenerator.generateId(),
                        t = 1e6 * Date.now();
                    this.configManager.setSessionId(e), this.configManager.setSessionStartTime(t)
                } catch (e) {
                    s1(e), this.logger.log("[instrumentation-manager] failed to rotate session after inactivity:", e)
                } finally {
                    this.sessionReplayListener = null
                }
            }
            stopReplayRecording() {
                this.sessionReplayListener ? (this.sessionReplayListener.stopRecording(), this.sessionReplayListener = null) : this.logger.log("[instrumentation-manager] cannot stop replay recording: replay listener not initialized")
            }
            uninstrument() {
                this.domEventsListener ? .destroy(), this.logEventsListener ? .destroy(), this.errorsEventsListener ? .destroy(), this.networkEventsListener ? .destroy(), this.navigationListener ? .destroy(), this.performanceListener ? .destroy(), this.pageLoadListener ? .destroy(), this.sessionReplayListener ? .destroy()
            }
        },
        oH = "gcSample",
        oW = class {
            constructor(e) {
                if (this.initialized = !1, this.logger = sQ.initialize({
                        debug: e.options ? .debug || !1,
                        prefix: "[groundcover]"
                    }), this.logger.log("[session-manager] initialize called"), this.instrumentationManager = new oB, this.idGenerator = new s3, !this.getSamplingDecision(e.options ? .sessionSampleRate)) return void this.logger.log("[session-manager] session is not sampled");
                if (this.initialized) return void this.logger.log("[session-manager] SDK already initialized");
                const t = or.getInstance();
                t.initialize(e), oc.getInstance().initialize();
                const r = e.sessionId,
                    n = t.getSessionId();
                r ? (t.setSessionId(r), this.logger.log("[session-manager] using provided sessionId:", r)) : n || t.setSessionId(this.idGenerator.generateId()), t.getSessionStartTime() || t.setSessionStartTime(1e6 * Date.now()), this.instrumentationManager.instrument(), this.initialized = !0
            }
            getSamplingDecision(e) {
                try {
                    if (!e || 1 === e) return !0;
                    let t = s7(oH);
                    if (t) {
                        let e = "1" === t;
                        return this.logger.log("[session-manager] using stored sampling decision:", e), e
                    }
                    let r = !e || Math.random() < e;
                    return oe(oH, r ? "1" : "0"), this.logger.log("[session-manager] stored new sampling decision:", r), r
                } catch (r) {
                    this.logger.log("[session-manager] session storage access failed:", r);
                    let t = !e || Math.random() < e;
                    return this.logger.log("[session-manager] using fallback sampling decision:", t), t
                }
            }
            identifyUser(e) {
                (this.logger.log("[session-manager] identifyUser called"), this.initialized) ? or.getInstance().updateConfig({
                    userIdentifier: e
                }): this.logger.log("[session-manager] cannot identify user: SDK not initialized")
            }
            updateConfig(e) {
                this.initialized ? or.getInstance().updateConfig(e) : this.logger.log("[session-manager] cannot update config: SDK not initialized")
            }
            sendCustomEvent(e) {
                this.initialized ? this.instrumentationManager.sendCustomEvent(e) : this.logger.log("[session-manager] cannot send custom event: SDK not initialized")
            }
            startNavigation(e) {
                this.initialized ? this.instrumentationManager.startNavigation(e) : this.logger.log("[session-manager] cannot start navigation: SDK not initialized")
            }
            endNavigation(e) {
                this.initialized ? this.instrumentationManager.endNavigation(e) : this.logger.log("[session-manager] cannot end navigation: SDK not initialized")
            }
            captureException(e, t) {
                this.initialized ? this.instrumentationManager.captureException(e, t) : this.logger.log("[session-manager] Cannot capture exception: SDK not initialized")
            }
            getSessionId() {
                return this.initialized ? or.getInstance().getSessionId() : (this.logger.log("[session-manager] cannot get session ID: SDK not initialized"), "")
            }
            async setSessionId(e) {
                if (this.logger.log("[session-manager] setSessionId called"), this.initialized) try {
                    let t = oc.getInstance();
                    await t.flushSync();
                    let r = e || this.idGenerator.generateId(),
                        n = or.getInstance();
                    n.setSessionId(r), n.setSessionStartTime(1e6 * Date.now()), this.logger.log("[session-manager] session ID set successfully:", r)
                } catch (e) {
                    this.logger.log("[session-manager] failed to set session ID:", e)
                } else this.logger.log("[session-manager] cannot set session ID: SDK not initialized")
            }
            startReplayRecording() {
                this.initialized ? this.instrumentationManager.startReplayRecording() : this.logger.log("[session-manager] cannot start replay recording: SDK not initialized")
            }
            stopReplayRecording() {
                this.initialized ? this.instrumentationManager.stopReplayRecording() : this.logger.log("[session-manager] cannot stop replay recording: SDK not initialized")
            }
            destroy() {
                this.initialized && (this.instrumentationManager.uninstrument(), ot("gcId"), ot("gcStartTime"), this.initialized = !1)
            }
        },
        oV = {
            init: function(e) {
                try {
                    oD = new oW({
                        cluster: e ? .cluster || "",
                        environment: e ? .environment || "",
                        namespace: e ? .namespace,
                        releaseId: e ? .releaseId,
                        dsn: e ? .dsn || "",
                        appId: e ? .appId || "",
                        userIdentifier: e ? .userIdentifier,
                        apiKey: e ? .apiKey || "",
                        options: e ? .options,
                        sessionId: e ? .sessionId
                    })
                } catch (e) {
                    s1(e)
                }
            },
            identifyUser: function(e) {
                oD ? oD.identifyUser(e) : console.warn("[groundcover] identifyUser: groundcover is not initialized. please call init() first")
            },
            sendCustomEvent: function(e) {
                oD && oD.sendCustomEvent(e)
            },
            captureException: function(e, t) {
                oD && oD.captureException(e, t)
            },
            updateConfig: function(e) {
                oD && oD.updateConfig(e)
            },
            startNavigation: function(e) {
                oD ? oD.startNavigation(e) : console.warn("[groundcover] startNavigation: groundcover is not initialized. please call init() first")
            },
            endNavigation: function(e) {
                oD ? oD.endNavigation(e) : console.warn("[groundcover] endNavigation: groundcover is not initialized. please call init() first")
            },
            getSessionId: function() {
                return oD ? oD.getSessionId() : (console.warn("[groundcover] getSessionId: groundcover is not initialized. please call init() first"), "")
            },
            setSessionId: async function(e) {
                if (oD) try {
                    await oD.setSessionId(e)
                } catch (e) {
                    console.error("[groundcover] setSessionId: failed to set session ID:", e)
                } else console.warn("[groundcover] setSessionId: groundcover is not initialized. please call init() first")
            },
            startReplayRecording: function() {
                oD ? oD.startReplayRecording() : console.warn("[groundcover] startReplayRecording: groundcover is not initialized. please call init() first")
            },
            stopReplayRecording: function() {
                oD ? oD.stopReplayRecording() : console.warn("[groundcover] stopReplayRecording: groundcover is not initialized. please call init() first")
            }
        };
    if ("u" > typeof window && !window.groundcover) try {
        window.groundcover = oV
    } catch (e) {
        console.warn("[groundcover] Failed to expose groundcover on window:", e)
    }
    e.s(["default", 0, oV], 411099)
}]);

//# debugId=f0e73822-55ed-8f1e-f291-d13b31636721