;
(self.AMP = self.AMP || []).push({
    m: 0,
    v: "2305252018001",
    n: "amp-analytics",
    ev: "0.1",
    l: !0,
    f: function(t, n) {
        ! function() {
            function n(t, n) {
                (null == n || n > t.length) && (n = t.length);
                for (var i = 0, r = new Array(n); i < n; i++) r[i] = t[i];
                return r
            }

            function i(t, i) {
                var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
                if (r) return (r = r.call(t)).next.bind(r);
                if (Array.isArray(t) || (r = function(t, i) {
                        if (t) {
                            if ("string" == typeof t) return n(t, i);
                            var r = Object.prototype.toString.call(t).slice(8, -1);
                            return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? n(t, i) : void 0
                        }
                    }(t)) || i && t && "number" == typeof t.length) {
                    r && (t = r);
                    var e = 0;
                    return function() {
                        return e >= t.length ? {
                            done: !0
                        } : {
                            done: !1,
                            value: t[e++]
                        }
                    }
                }
                throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
            }
            var r;

            function e() {
                return r || (r = Promise.resolve(void 0))
            }
            var u = function() {
                var t = this;
                this.promise = new Promise((function(n, i) {
                    t.resolve = n, t.reject = i
                }))
            };

            function s(t) {
                return new Promise((function(n) {
                    n(t())
                }))
            }

            function o(t, n) {
                return (o = Object.setPrototypeOf || function(t, n) {
                    return t.__proto__ = n, t
                })(t, n)
            }

            function a(t, n) {
                if ("function" != typeof n && null !== n) throw new TypeError("Super expression must either be null or a function");
                t.prototype = Object.create(n && n.prototype, {
                    constructor: {
                        value: t,
                        writable: !0,
                        configurable: !0
                    }
                }), n && o(t, n)
            }

            function h(t) {
                return (h = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
                    return t.__proto__ || Object.getPrototypeOf(t)
                })(t)
            }

            function c(t) {
                return (c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
                    return typeof t
                } : function(t) {
                    return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
                })(t)
            }

            function f(t) {
                if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                return t
            }

            function l(t, n) {
                if (n && ("object" === c(n) || "function" == typeof n)) return n;
                if (void 0 !== n) throw new TypeError("Derived constructors may only return object or undefined");
                return f(t)
            }

            function v(t) {
                var n = function() {
                    if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
                    if (Reflect.construct.sham) return !1;
                    if ("function" == typeof Proxy) return !0;
                    try {
                        return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
                    } catch (t) {
                        return !1
                    }
                }();
                return function() {
                    var i, r = h(t);
                    if (n) {
                        var e = h(this).constructor;
                        i = Reflect.construct(r, arguments, e)
                    } else i = r.apply(this, arguments);
                    return l(this, i)
                }
            }
            var d = Array.isArray;

            function m(t, n) {
                for (var i = 0; i < t.length; i++)
                    if (n(t[i], i, t)) return i;
                return -1
            }

            function p(t, n) {
                var i = t.length - n.length;
                return i >= 0 && t.indexOf(n, i) == i
            }

            function b(t, n, i) {
                for (var r = i || 1, e = function(i) {
                        var r = 0;
                        if (t = t.replace(/\${([^{}]*)}/g, (function(t, i) {
                                return r++, n(i)
                            })), !r) return "break"
                    }, u = 0; u < r && "break" !== e(); u++);
                return t
            }
            var E, g = Object.prototype,
                T = g.hasOwnProperty,
                y = g.toString;

            function w(t) {
                return "[object Object]" === y.call(t)
            }

            function S(t) {
                var n = Object.create(null);
                return t && Object.assign(n, t), n
            }

            function A(t, n) {
                return T.call(t, n)
            }

            function O(t, n) {
                var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 10,
                    r = [],
                    e = [];
                for (e.push({
                        t: t,
                        s: n,
                        d: 0
                    }); e.length > 0;) {
                    var u = e.shift(),
                        s = u.d,
                        o = u.s,
                        a = u.t;
                    if (r.includes(o)) throw new Error("Source object has a circular reference.");
                    if (r.push(o), a !== o)
                        if (s > i) Object.assign(a, o);
                        else
                            for (var h = 0, c = Object.keys(o); h < c.length; h++) {
                                var f = c[h],
                                    l = o[f];
                                if (A(a, f)) {
                                    var v = a[f];
                                    if (w(l) && w(v)) {
                                        e.push({
                                            t: v,
                                            s: l,
                                            d: s + 1
                                        });
                                        continue
                                    }
                                }
                                a[f] = l
                            }
                }
                return t
            }

            function N(t) {
                return "number" == typeof t && isFinite(t)
            }

            function I(t, n, i, r, e, u, s, o, a, h, c) {
                return t
            }

            function _(t) {
                return JSON.parse(t)
            }

            function R(t, n) {
                try {
                    return _(t)
                } catch (t) {
                    return null == n || n(t), null
                }
            }

            function P(t) {
                return (t.ownerDocument || t).defaultView
            }

            function C(t) {
                return void 0 !== E ? E : E = function(t) {
                    try {
                        var n = t.ownerDocument,
                            i = n.createElement("div"),
                            r = n.createElement("div");
                        return i.appendChild(r), i.querySelector(":scope div") === r
                    } catch (t) {
                        return !1
                    }
                }(t)
            }

            function M(t, n) {
                return t.replace(/^|,/g, "$&".concat(n, " "))
            }

            function D(t, n) {
                var i = t.classList,
                    r = "i-amphtml-scoped";
                i.add(r);
                var e = M(n, ".".concat(r)),
                    u = t.querySelectorAll(e);
                return i.remove(r), u
            }

            function L(t, n) {
                if (C(t)) return t.querySelector(M(n, ":scope"));
                var i = D(t, n)[0];
                return void 0 === i ? null : i
            }

            function k(t, n) {
                var i = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector;
                return !!i && i.call(t, n)
            }

            function x(t, n) {
                return t.closest ? t.closest(n) : function(t, n, i) {
                    var r;
                    for (r = t; r && void 0 !== r; r = r.parentElement)
                        if (n(r)) return r;
                    return null
                }(t, (function(t) {
                    return k(t, n)
                }))
            }

            function U(t, n, i) {
                return function(t, n) {
                    for (var i in n) t.setAttribute(i, n[i]);
                    return t
                }(t.createElement(n), i)
            }

            function j(t, n, i) {
                var r = n || function(t) {
                        return t
                    },
                    e = t.dataset,
                    u = {},
                    s = i || /^param(.+)/;
                for (var o in e) {
                    var a = o.match(s);
                    a && (u[r(a[1][0].toLowerCase() + a[1].substr(1))] = e[o])
                }
                return u
            }

            function H(t) {
                return t.parent && t.parent != t
            }

            function F(t) {
                var n = Object.getOwnPropertyDescriptor(t, "message");
                if (null != n && n.writable) return t;
                var i = t.message,
                    r = t.stack,
                    e = new Error(i);
                for (var u in t) e[u] = t[u];
                return e.stack = r, e
            }

            function V(t) {
                for (var n, r = null, e = "", u = i(arguments, !0); !(n = u()).done;) {
                    var s = n.value;
                    s instanceof Error && !r ? r = F(s) : (e && (e += " "), e += s)
                }
                return r ? e && (r.message = e + ": " + r.message) : r = new Error(e), r
            }

            function q(t) {
                var n, i;
                null === (n = (i = self).__AMP_REPORT_ERROR) || void 0 === n || n.call(i, t)
            }

            function G(t) {
                var n = V.apply(null, arguments);
                setTimeout((function() {
                    throw q(n), n
                }))
            }
            var B = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;

            function W(t) {
                var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
                try {
                    return decodeURIComponent(t)
                } catch (t) {
                    return n
                }
            }

            function $(t) {
                var n, i = S();
                if (!t) return i;
                for (; n = B.exec(t);) {
                    var r = W(n[1], n[1]),
                        e = n[2] ? W(n[2].replace(/\+/g, " "), n[2]) : "";
                    i[r] = e
                }
                return i
            }

            function Y(t) {
                var n = (t || self).location;
                return $(n.originalHash || n.hash)
            }
            var z = "";

            function K(t) {
                var n = t || self;
                return n.__AMP_MODE ? n.__AMP_MODE : n.__AMP_MODE = function(t) {
                    return {
                        localDev: !1,
                        development: X(t, Y(t)),
                        esm: !1,
                        test: !1,
                        rtvVersion: J(t),
                        ssrReady: !1
                    }
                }(n)
            }

            function J(t) {
                var n;
                return z || (z = (null === (n = t.AMP_CONFIG) || void 0 === n ? void 0 : n.v) || "01".concat("2305252018001")), z
            }

            function X(t, n) {
                var i = n || Y(t);
                return ["1", "actions", "amp", "amp4ads", "amp4email"].includes(i.development) || !!t.AMP_DEV_MODE
            }
            var Z = function() {
                return self.AMP.config.urls
            }();

            function Q(t, n, i) {
                return n in t ? Object.defineProperty(t, n, {
                    value: i,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[n] = i, t
            }
            self.__AMP_LOG = self.__AMP_LOG || {
                user: null,
                dev: null,
                userForEmbed: null
            };
            var tt = self.__AMP_LOG;

            function nt(t, n) {
                throw new Error("failed to call initLogConstructor")
            }

            function it(t) {
                return tt.user || (tt.user = rt()),
                    function(t, n) {
                        return n && n.ownerDocument.defaultView != t
                    }(tt.user.win, t) ? tt.userForEmbed || (tt.userForEmbed = rt()) : tt.user
            }

            function rt(t) {
                return nt()
            }

            function et() {
                return tt.dev || (tt.dev = nt())
            }

            function ut(t, n, i, r, e, u, s, o, a, h, c) {
                return t
            }

            function st(t, n, i, r, e, u, s, o, a, h, c) {
                return it().assert(t, n, i, r, e, u, s, o, a, h, c)
            }

            function ot(t, n) {
                return pt(t = lt(t), n)
            }

            function at(t, n) {
                return pt(mt(dt(t)), n)
            }

            function ht(t, n) {
                var i = mt(dt(t));
                return Tt(i, n) ? pt(i, n) : null
            }

            function ct(t, n) {
                return function(t, n) {
                    var i = Et(t, n);
                    if (i) return i;
                    var r, e, s, o, a = gt(t);
                    return a[n] = (e = (r = new u).promise, s = r.reject, o = r.resolve, e.catch((function() {})), {
                        obj: null,
                        promise: e,
                        resolve: o,
                        reject: s,
                        context: null,
                        ctor: null
                    }), a[n].promise
                }(mt(t), n)
            }

            function ft(t, n) {
                return Et(mt(t), n)
            }

            function lt(t) {
                return t.__AMP_TOP || (t.__AMP_TOP = t)
            }

            function vt(t, n) {
                var i = (t.ownerDocument || t).defaultView,
                    r = n || lt(i);
                if (i && i != r && lt(i) == r) try {
                    return i.frameElement
                } catch (t) {}
                return null
            }

            function dt(t) {
                return t.nodeType ? (n = P(t), ot(n, "ampdoc")).getAmpDoc(t) : t;
                var n
            }

            function mt(t) {
                var n = dt(t);
                return n.isSingleDoc() ? n.win : n
            }

            function pt(t, n) {
                ut(Tt(t, n));
                var i = gt(t)[n];
                return i.obj || (ut(i.ctor), ut(i.context), i.obj = new i.ctor(i.context), ut(i.obj), i.context = null, i.resolve && i.resolve(i.obj)), i.obj
            }

            function bt(t, n, i, r, e, u) {
                var s = gt(t),
                    o = s[i];
                o || (o = s[i] = {
                    obj: null,
                    promise: null,
                    resolve: null,
                    reject: null,
                    context: null,
                    ctor: null,
                    sharedInstance: u || !1
                }), !e && o.ctor || (o.ctor = r, o.context = n, o.sharedInstance = u || !1, o.resolve && pt(t, i))
            }

            function Et(t, n) {
                var i = gt(t)[n];
                return i ? i.promise ? i.promise : (pt(t, n), i.promise = Promise.resolve(i.obj)) : null
            }

            function gt(t) {
                var n = t.__AMP_SERVICES;
                return n || (n = t.__AMP_SERVICES = {}), n
            }

            function Tt(t, n) {
                var i = t.__AMP_SERVICES && t.__AMP_SERVICES[n];
                return !(!i || !i.ctor)
            }

            function yt(t, n, i, r) {
                var e = ft(t, n);
                if (e) return e;
                var u = dt(t);
                return u.whenExtensionsKnown().then((function() {
                    var t = u.getExtensionVersion(i);
                    return t ? ot(u.win, "extensions").waitForExtension(i, t) : null
                })).then((function(i) {
                    return i ? r ? ft(t, n) : ct(t, n) : null
                }))
            }
            var wt, St = function(t) {
                    return dt(t)
                },
                At = function(t) {
                    return ot(t, "crypto")
                },
                Ot = function(t) {
                    return ot(t, "performance")
                },
                Nt = function(t) {
                    return ot(t, "preconnect")
                },
                It = function(t) {
                    return pt(t, "timer")
                },
                _t = function(t) {
                    return ht(t, "url-replace")
                },
                Rt = function(t) {
                    return yt(t, "consentPolicyManager", "amp-consent")
                },
                Pt = function(t) {
                    return ht(t, "url")
                },
                Ct = function(t) {
                    return at(t, "viewport")
                },
                Mt = function(t) {
                    return ot(t, "xhr")
                };

            function Dt(t, n, i, r) {
                var e = t,
                    u = i,
                    s = function(t) {
                        try {
                            return u(t)
                        } catch (t) {
                            var n, i;
                            throw null === (n = (i = self).__AMP_REPORT_ERROR) || void 0 === n || n.call(i, t), t
                        }
                    },
                    o = function() {
                        if (void 0 !== wt) return wt;
                        wt = !1;
                        try {
                            var t = {
                                get capture() {
                                    return wt = !0, !1
                                }
                            };
                            self.addEventListener("test-options", null, t), self.removeEventListener("test-options", null, t)
                        } catch (t) {}
                        return wt
                    }(),
                    a = !(null == r || !r.capture);
                return e.addEventListener(n, s, o ? r : a),
                    function() {
                        null == e || e.removeEventListener(n, s, o ? r : a), u = null, e = null, s = null
                    }
            }

            function Lt(t, n, i, r) {
                return Dt(t, n, i, r)
            }

            function kt(t) {
                return t.data
            }

            function xt(t, n, i, r) {
                var e = i,
                    u = Dt(t, n, (function(t) {
                        try {
                            e(t)
                        } finally {
                            e = null, u()
                        }
                    }), r);
                return u
            }

            function Ut(t) {
                return "AUDIO" === t.tagName || "VIDEO" === t.tagName
            }
            var jt = "active";

            function Ht(t, n) {
                var i = 0;
                return t.type === jt && (i = 5), Math.min(n - t.time, i)
            }
            var Ft = function() {
                    function t() {
                        this.NEt = 0, this.CEt = void 0
                    }
                    var n = t.prototype;
                    return n.push = function(t) {
                        this.CEt && this.CEt.time < t.time && (this.NEt += Ht(this.CEt, t.time)), this.CEt = t
                    }, n.getTotalEngagedTime = function(t) {
                        var n = 0;
                        return void 0 !== this.CEt && (n = this.NEt + Ht(this.CEt, t)), n
                    }, t
                }(),
                Vt = ["mousedown", "mouseup", "mousemove", "keydown", "keyup"],
                qt = ["mouseleave"],
                Gt = function() {
                    function t(t) {
                        this.ampdoc = t, this.MEt = this.DEt.bind(this), this.LEt = this.HEt.bind(this), this.FEt = this.VEt.bind(this), this.qEt = this.GEt.bind(this), this.BEt = {}, this.WEt = [], this.$Et = !1, this.YEt = !1, this.zEt = new Ft, this.ws = Ct(this.ampdoc), this.ampdoc.whenFirstVisible().then(this.Du.bind(this))
                    }
                    var n = t.prototype;
                    return n.Du = function() {
                        this.ih = Date.now(), this.HEt(), this.KEt()
                    }, n.JEt = function() {
                        var t = Date.now() - this.ih;
                        return t > 0 ? t : 0
                    }, n.DEt = function() {
                        this.$Et = !1, this.YEt = !1
                    }, n.KEt = function() {
                        this.XEt(this.ampdoc.getRootNode(), Vt, this.LEt), this.XEt(this.ampdoc.getRootNode(), qt, this.FEt), this.WEt.push(this.ampdoc.onVisibilityChanged(this.qEt)), this.ws.onScroll(this.LEt)
                    }, n.XEt = function(t, n, i) {
                        for (var r = 0; r < n.length; r++) this.WEt.push(Lt(t, n[r], i))
                    }, n.HEt = function() {
                        this.$Et || (this.$Et = !0, this.YEt = !1, this.ZEt(jt))
                    }, n.VEt = function() {
                        this.YEt || (this.YEt = !0, this.$Et = !1, this.ZEt("inactive"))
                    }, n.ZEt = function(t) {
                        var n = this.JEt(),
                            i = Math.floor(n / 1e3),
                            r = 1e3 - n % 1e3;
                        setTimeout(this.MEt, r), this.zEt.push({
                            type: t,
                            time: i
                        })
                    }, n.GEt = function() {
                        this.ampdoc.isVisible() ? this.HEt() : this.VEt()
                    }, n.Vg = function() {
                        for (var t = 0; t < this.WEt.length; t++) {
                            var n = this.WEt[t];
                            "function" == typeof n && n()
                        }
                        this.WEt = []
                    }, n.fs = function() {
                        this.Vg()
                    }, n.getTotalEngagedTime = function() {
                        var t = Math.floor(this.JEt() / 1e3);
                        return this.zEt.getTotalEngagedTime(t)
                    }, n.getIncrementalEngagedTime = function(t) {
                        var n = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
                        if (!A(this.BEt, t)) return n && (this.BEt[t] = this.getTotalEngagedTime()), this.getTotalEngagedTime();
                        var i = this.BEt[t];
                        return !1 === n ? this.getTotalEngagedTime() - i : (this.BEt[t] = this.getTotalEngagedTime(), this.BEt[t] - i)
                    }, t
                }();

            function Bt(t, n) {
                var i = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var r = Object.getOwnPropertySymbols(t);
                    n && (r = r.filter((function(n) {
                        return Object.getOwnPropertyDescriptor(t, n).enumerable
                    }))), i.push.apply(i, r)
                }
                return i
            }

            function Wt(t) {
                for (var n = 1; n < arguments.length; n++) {
                    var i = null != arguments[n] ? arguments[n] : {};
                    n % 2 ? Bt(Object(i), !0).forEach((function(n) {
                        Q(t, n, i[n])
                    })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Bt(Object(i)).forEach((function(n) {
                        Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(i, n))
                    }))
                }
                return t
            }
            var $t = "__AMP__EXPERIMENT_TOGGLES",
                Yt = JSON.parse('{"transport":{"beacon":true,"xhrpost":true,"image":true},"vars":{"accessReaderId":"ACCESS_READER_ID","ampGeo":"AMP_GEO","ampState":"AMP_STATE","ampVersion":"AMP_VERSION","ampdocHost":"AMPDOC_HOST","ampdocHostname":"AMPDOC_HOSTNAME","ampdocMeta":"AMPDOC_META","ampdocUrl":"AMPDOC_URL","authdata":"AUTHDATA","availableScreenHeight":"AVAILABLE_SCREEN_HEIGHT","availableScreenWidth":"AVAILABLE_SCREEN_WIDTH","backgroundState":"BACKGROUND_STATE","browserLanguage":"BROWSER_LANGUAGE","canonicalHost":"CANONICAL_HOST","canonicalHostname":"CANONICAL_HOSTNAME","canonicalPath":"CANONICAL_PATH","canonicalUrl":"CANONICAL_URL","clientId":"CLIENT_ID","consentState":"CONSENT_STATE","consentString":"CONSENT_STRING","contentLoadTime":"CONTENT_LOAD_TIME","cookie":"COOKIE","counter":"COUNTER","cumulativeLayoutShift":"CUMULATIVE_LAYOUT_SHIFT","documentCharset":"DOCUMENT_CHARSET","documentReferrer":"DOCUMENT_REFERRER","domInteractiveTime":"DOM_INTERACTIVE_TIME","domainLookupTime":"DOMAIN_LOOKUP_TIME","experimentBranches":"EXPERIMENT_BRANCHES","externalReferrer":"EXTERNAL_REFERRER","firstContentfulPaint":"FIRST_CONTENTFUL_PAINT","firstInputDelay":"FIRST_INPUT_DELAY","firstViewportReady":"FIRST_VIEWPORT_READY","fragmentParam":"FRAGMENT_PARAM","htmlAttr":"HTML_ATTR","incrementalEngagedTime":"INCREMENTAL_ENGAGED_TIME","largestContentfulPaint":"LARGEST_CONTENTFUL_PAINT","makeBodyVisible":"MAKE_BODY_VISIBLE","navRedirectCount":"NAV_REDIRECT_COUNT","navTiming":"NAV_TIMING","navType":"NAV_TYPE","pageDownloadTime":"PAGE_DOWNLOAD_TIME","pageLoadTime":"PAGE_LOAD_TIME","pageViewId":"PAGE_VIEW_ID","pageViewId64":"PAGE_VIEW_ID_64","queryParam":"QUERY_PARAM","random":"RANDOM","redirectTime":"REDIRECT_TIME","resourceTiming":"RESOURCE_TIMING","screenColorDepth":"SCREEN_COLOR_DEPTH","screenHeight":"SCREEN_HEIGHT","screenWidth":"SCREEN_WIDTH","scrollHeight":"SCROLL_HEIGHT","scrollLeft":"SCROLL_LEFT","scrollTop":"SCROLL_TOP","scrollWidth":"SCROLL_WIDTH","sessionId":"SESSION_ID","sessionCount":"SESSION_COUNT","sessionEngaged":"SESSION_ENGAGED","sessionEventTimestamp":"SESSION_EVENT_TIMESTAMP","sessionTimestamp":"SESSION_TIMESTAMP","serverResponseTime":"SERVER_RESPONSE_TIME","sourceHost":"SOURCE_HOST","sourceHostname":"SOURCE_HOSTNAME","sourcePath":"SOURCE_PATH","sourceUrl":"SOURCE_URL","tcpConnectTime":"TCP_CONNECT_TIME","timestamp":"TIMESTAMP","timezone":"TIMEZONE","timezoneCode":"TIMEZONE_CODE","title":"TITLE","totalEngagedTime":"TOTAL_ENGAGED_TIME","uach":"UACH","userAgent":"USER_AGENT","viewer":"VIEWER","viewportHeight":"VIEWPORT_HEIGHT","viewportWidth":"VIEWPORT_WIDTH"}}');

            function zt(t) {
                return "undefined" != typeof TextEncoder ? (new TextEncoder).encode(t) : Kt(unescape(encodeURIComponent(t)))
            }

            function Kt(t) {
                for (var n = new Uint8Array(t.length), i = 0; i < t.length; i++) {
                    var r = t.charCodeAt(i);
                    I(r <= 255), n[i] = r
                }
                return n
            }

            function Jt(t) {
                for (var n = new Array(t.length), i = 0; i < t.length; i++) n[i] = String.fromCharCode(t[i]);
                return n.join("")
            }
            var Xt = {
                    "-": "+",
                    "_": "/",
                    ".": "="
                },
                Zt = {
                    "+": "-",
                    "/": "_",
                    "=": "."
                };

            function Qt(t) {
                return function(t) {
                    var n = Jt(t);
                    return btoa(n).replace(/[+/=]/g, (function(t) {
                        return Zt[t]
                    }))
                }(zt(t))
            }
            var tn, nn, rn = function() {
                    function t(t) {
                        this.dr = t, this.pr = 0, this.mr = 0, this.yr = S()
                    }
                    var n = t.prototype;
                    return n.has = function(t) {
                        return !!this.yr[t]
                    }, n.get = function(t) {
                        var n = this.yr[t];
                        if (n) return n.access = ++this.mr, n.payload
                    }, n.put = function(t, n) {
                        this.has(t) || this.pr++, this.yr[t] = {
                            payload: n,
                            access: this.mr
                        }, this.wr()
                    }, n.wr = function() {
                        if (!(this.pr <= this.dr)) {
                            var t, n = this.yr,
                                i = this.mr + 1;
                            for (var r in n) {
                                var e = n[r].access;
                                e < i && (i = e, t = r)
                            }
                            void 0 !== t && (delete n[t], this.pr--)
                        }
                    }, t
                }(),
                en = function() {
                    return self.AMP.config.urls
                }(),
                un = new Set(["c", "v", "a", "ad"]),
                sn = function(t) {
                    return "string" == typeof t ? on(t) : t
                };

            function on(t, n) {
                return tn || (tn = self.document.createElement("a"), nn = self.__AMP_URL_CACHE || (self.__AMP_URL_CACHE = new rn(100))),
                    function(t, n, i) {
                        if (i && i.has(n)) return i.get(n);
                        t.href = n, t.protocol || (t.href = t.href);
                        var r, e = {
                            href: t.href,
                            protocol: t.protocol,
                            host: t.host,
                            hostname: t.hostname,
                            port: "0" == t.port ? "" : t.port,
                            pathname: t.pathname,
                            search: t.search,
                            hash: t.hash,
                            origin: null
                        };
                        "/" !== e.pathname[0] && (e.pathname = "/" + e.pathname), ("http:" == e.protocol && 80 == e.port || "https:" == e.protocol && 443 == e.port) && (e.port = "", e.host = e.hostname), r = t.origin && "null" != t.origin ? t.origin : "data:" != e.protocol && e.host ? e.protocol + "//" + e.host : e.href, e.origin = r;
                        var u = e;
                        return i && i.put(n, u), u
                    }(tn, t, n ? null : nn)
            }

            function an(t, n, i) {
                if (!n) return t;
                var r = t.split("#", 2),
                    e = r[0].split("?", 2);
                return e[0] + (e[1] ? i ? "?".concat(n, "&").concat(e[1]) : "?".concat(e[1], "&").concat(n) : "?".concat(n)) + (r[1] ? "#".concat(r[1]) : "")
            }

            function hn(t, n) {
                return "".concat(encodeURIComponent(t), "=").concat(encodeURIComponent(n))
            }

            function cn(t) {
                var n, i = [];
                for (var r in t) {
                    var e = t[r];
                    if (null != e) {
                        e = d(n = e) ? n : [n];
                        for (var u = 0; u < e.length; u++) i.push(hn(r, e[u]))
                    }
                }
                return i.join("&")
            }

            function fn(t) {
                return "https:" == (t = sn(t)).protocol || "localhost" == t.hostname || "127.0.0.1" == t.hostname || p(t.hostname, ".localhost")
            }

            function ln(t, n) {
                var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "source";
                return st(null != t, "%s %s must be available", n, i), st(fn(t) || /^\/\//.test(t), '%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s', n, i, t), t
            }

            function vn(t) {
                return en.cdnProxyRegex.test(sn(t).origin)
            }

            function dn(t, n) {
                if (!t || "?" == t) return "";
                var i = new RegExp("[?&]".concat(n, "\\b[^&]*"), "g"),
                    r = t.replace(i, "").replace(/^[?&]/, "");
                return r ? "?" + r : ""
            }
            var mn, pn = function() {
                    return self.AMP.config.urls
                }(),
                bn = "-test-amp-cookie-tmp",
                En = "None";

            function gn(t, n) {
                var i = function(t) {
                    try {
                        return t.document.cookie
                    } catch (t) {
                        return ""
                    }
                }(t);
                if (!i) return null;
                for (var r = i.split(";"), e = 0; e < r.length; e++) {
                    var u = r[e].trim(),
                        s = u.indexOf("=");
                    if (-1 != s && W(u.substring(0, s).trim()) == n) {
                        var o = u.substring(s + 1).trim();
                        return W(o, o)
                    }
                }
                return null
            }

            function Tn(t) {
                var n = t.document.head && t.document.head.querySelector("meta[name='amp-cookie-scope']");
                if (n) {
                    var i = n.getAttribute("content") || "",
                        r = on(function(t) {
                            if (!vn(t = sn(t))) return t.href;
                            var n = t.pathname.split("/"),
                                i = n[1];
                            st(un.has(i), "Unknown path prefix in url %s", t.href);
                            var r = n[2],
                                e = "s" == r ? "https://" + decodeURIComponent(n[3]) : "http://" + decodeURIComponent(r);
                            return st(e.indexOf(".") > 0, "Expected a . in origin %s", e), n.splice(1, "s" == r ? 3 : 2), e + n.join("/") + dn(t.search, "(amp_(js[^&=]*|gsa|r|kit)|usqp)") + (t.hash || "")
                        }(t.location.href)).origin;
                    return p(r, "." + i) ? i : r.split("://")[1]
                }
                if (!vn(t.location.href))
                    for (var e = t.location.hostname.split("."), u = e[e.length - 1], s = function(t) {
                            for (var n = bn; gn(t, n);) n = bn + 0;
                            return n
                        }(t), o = e.length - 2; o >= 0; o--)
                        if (u = e[o] + "." + u, yn(t, s, "delete", Date.now() + 1e3, u), "delete" == gn(t, s)) return yn(t, s, "delete", Date.now() - 1e3, u), u;
                return null
            }

            function yn(t, n, i, r, e, u, s) {
                "ampproject.org" == e && (i = "delete", r = 0);
                var o = encodeURIComponent(n) + "=" + encodeURIComponent(i) + "; path=/" + (e ? "; domain=" + e : "") + "; expires=" + new Date(r).toUTCString() + function(t, n) {
                    return n ? "; SameSite=".concat(n) : ""
                }(0, u) + (s ? "; Secure" : "");
                try {
                    t.document.cookie = o
                } catch (t) {}
            }

            function wn(t, n, i) {
                if (n.allowOnProxyOrigin) st(!n.highestAvailableDomain, "Could not support highestAvailable Domain on proxy origin, specify domain explicitly");
                else {
                    st(!vn(t.location.href), "Should never attempt to set cookie on proxy origin: ".concat(i));
                    var r = on(t.location.href).hostname.toLowerCase(),
                        e = on(pn.cdn).hostname.toLowerCase();
                    st(!(r == e || p(r, "." + e)), "Should never attempt to set cookie on proxy origin. (in depth check): " + i)
                }
            }

            function Sn(t) {
                return "string" == typeof t && t.startsWith("amp-") && -1 != t.indexOf("{")
            }
            var An = ["Webkit", "webkit", "Moz", "moz", "ms", "O", "o"],
                On = {
                    "getPropertyPriority": function() {
                        return ""
                    },
                    "getPropertyValue": function() {
                        return ""
                    }
                };

            function Nn(t, n, i) {
                if (n.startsWith("--")) return n;
                mn || (mn = S());
                var r = mn[n];
                if (!r || i) {
                    if (r = n, void 0 === t[n]) {
                        var e = function(t) {
                                return t.charAt(0).toUpperCase() + t.slice(1)
                            }(n),
                            u = function(t, n) {
                                for (var i = 0; i < An.length; i++) {
                                    var r = An[i] + n;
                                    if (void 0 !== t[r]) return r
                                }
                                return ""
                            }(t, e);
                        void 0 !== t[u] && (r = u)
                    }
                    i || (mn[n] = r)
                }
                return r
            }

            function In(t, n, i, r, e) {
                var u = Nn(t.style, n, e);
                if (u) {
                    var s, o = r ? i + r : i;
                    t.style.setProperty((s = u.replace(/[A-Z]/g, (function(t) {
                        return "-" + t.toLowerCase()
                    })), An.some((function(t) {
                        return s.startsWith(t + "-")
                    })) ? "-".concat(s) : s), o)
                }
            }

            function _n(t, n) {
                void 0 === n && (n = t.hasAttribute("hidden")), n ? t.removeAttribute("hidden") : t.setAttribute("hidden", "")
            }
            var Rn = "unlisten";

            function Pn(t, n, i) {
                var r = function(t, n) {
                    var i = t.listeningFors;
                    return !i && n && (i = t.listeningFors = Object.create(null)), i || null
                }(t, i);
                if (!r) return r;
                var e = r[n];
                return !e && i && (e = r[n] = []), e || null
            }

            function Cn(t, n) {
                for (var i = n; i && i != i.parent; i = i.parent)
                    if (i == t) return !0;
                return !1
            }

            function Mn(t) {
                for (var n = {
                        "sentinel": Rn
                    }, i = t.length - 1; i >= 0; i--) {
                    var r = t[i];
                    if (!r.frame.contentWindow) {
                        t.splice(i, 1);
                        var e = r.events;
                        for (var u in e) e[u].splice(0, 1 / 0).forEach((function(t) {
                            t(n)
                        }))
                    }
                }
            }

            function Dn(t, n) {
                return n ? t.getAttribute("data-amp-3p-sentinel") : "amp"
            }
            var Ln = function() {
                function t(t, n, i, r) {
                    var e = this;
                    this.wb = t, this.Hg = i, this.Wg = [], this.Vg = function(t, n, i, r, e, u) {
                        ut(t.src), ut(!t.parentNode), ut(i);
                        var s = t.ownerDocument.defaultView;
                        ! function(t) {
                            t.listeningFors || t.addEventListener("message", (function(n) {
                                if (kt(n)) {
                                    var i = function(t) {
                                        return "string" == typeof t && (t = "{" == t.charAt(0) ? R(t, (function(t) {
                                            et().warn("IFRAME-HELPER", "Postmessage could not be parsed. Is it in a valid JSON format?", t)
                                        })) || null : Sn(t) ? function(t) {
                                            if (!Sn(t)) return null;
                                            var n = t.indexOf("{");
                                            return I(-1 != n), R(t.substr(n), (function(n) {
                                                G(new Error("MESSAGING: Failed to parse message: ".concat(t, "\n").concat(n.message)))
                                            }))
                                        }(t) : null), t
                                    }(kt(n));
                                    if (i && i.sentinel) {
                                        var r = function(t, n, i, r) {
                                            var e, u = Pn(t, n);
                                            if (!u) return u;
                                            for (var s = 0; s < u.length; s++) {
                                                var o = u[s],
                                                    a = o.frame.contentWindow;
                                                if (a) {
                                                    if (r == a || Cn(a, r)) {
                                                        e = o;
                                                        break
                                                    }
                                                } else setTimeout(Mn, 0, u)
                                            }
                                            return e ? e.events : null
                                        }(t, i.sentinel, n.origin, n.source);
                                        if (r) {
                                            var e = r[i.type];
                                            if (e) {
                                                e = e.slice();
                                                for (var u = 0; u < e.length; u++)(0, e[u])(i, n.source, n.origin, n)
                                            }
                                        }
                                    }
                                }
                            }))
                        }(s);
                        var o, a = function(t, n, i) {
                                for (var r, e = Pn(t, Dn(n, i), !0), u = 0; u < e.length; u++) {
                                    var s = e[u];
                                    if (s.frame === n) {
                                        r = s;
                                        break
                                    }
                                }
                                return r || (r = {
                                    frame: n,
                                    events: Object.create(null)
                                }, e.push(r)), r.events
                            }(s, t, r),
                            h = on(t.src).origin,
                            c = a[n] || (a[n] = []),
                            f = function(n, r, s, a) {
                                if ("amp" == n.sentinel) {
                                    if (r != t.contentWindow) return;
                                    if (h != s && ("null" != s || !u)) return
                                }(e || r == t.contentWindow) && (n.sentinel != Rn ? i(n, r, s, a) : o())
                            };
                        return c.push(f), o = function() {
                            if (f) {
                                var t = c.indexOf(f);
                                t > -1 && c.splice(t, 1), f = null, c = null, i = null
                            }
                        }
                    }(this.wb, n, (function(t, n, i) {
                        e.Wg.some((function(t) {
                            return t.win == n
                        })) || e.Wg.push({
                            win: n,
                            origin: i
                        }), r(t, n, i)
                    }), this.Hg, this.Hg)
                }
                var n = t.prototype;
                return n.send = function(t, n) {
                    (function(t, n) {
                        for (var i = [], r = 0, e = 0; e < t.length; e++) {
                            var u = t[e];
                            u.win.parent ? (r < e && (t[r] = u), r++) : i.push(u)
                        }
                        r < t.length && (t.length = r)
                    })(this.Wg),
                    function(t, n, i, r, e) {
                        if (t.contentWindow) {
                            r.type = i, r.sentinel = Dn(t, e);
                            var u = r;
                            e && (u = "amp-" + JSON.stringify(r));
                            for (var s = 0; s < n.length; s++) {
                                var o = n[s];
                                o.win.postMessage(u, o.origin)
                            }
                        }
                    }(this.wb, this.Wg, t, n, this.Hg)
                }, n.destroy = function() {
                    this.Vg(), this.Wg.length = 0
                }, t
            }();

            function kn(t) {
                return t.__AMP_EMBED__
            }

            function xn(t) {
                return t.classList.contains("i-amphtml-fie") || !!x(t, ".i-amphtml-fie")
            }

            function Un(t, n) {
                return !(xn(n) || vn(t.location) || "inabox" == K(t).runtime)
            }
            var jn = function() {
                    function t() {}
                    return t.getTop = function(t) {
                        return t.top
                    }, t.getLocation = function(t) {
                        return t.location
                    }, t.getDocumentReferrer = function(t) {
                        return t.document.referrer
                    }, t.getHostname = function(t) {
                        return t.location.hostname
                    }, t.getUserAgent = function(t) {
                        return t.navigator.userAgent
                    }, t.getUserLanguage = function(t) {
                        return t.navigator.userLanguage || t.navigator.language
                    }, t.getDevicePixelRatio = function() {
                        return self.devicePixelRatio || 1
                    }, t.getSendBeacon = function(t) {
                        if (t.navigator.sendBeacon) return t.navigator.sendBeacon.bind(t.navigator)
                    }, t.getXMLHttpRequest = function(t) {
                        return t.XMLHttpRequest
                    }, t.getImage = function(t) {
                        return t.Image
                    }, t
                }(),
                Hn = null,
                Fn = "*",
                Vn = /^[a-zA-Z0-9\-_.]+$/,
                qn = "amp-analytics/linker";

            function Gn(t, n) {
                var i, r = (i = n) ? Object.keys(i).filter((function(t) {
                    var n = Vn.test(t);
                    return n || it().error(qn, "Invalid linker key: " + t), n
                })).map((function(t) {
                    return t + Fn + (n = i[t], Qt(String(n)));
                    var n
                })).join(Fn) : "";
                return "" === r ? "" : [t, Bn(r), r].join(Fn)
            }

            function Bn(t, n) {
                var i, r, e = n || 0;
                return function(t) {
                    Hn || (Hn = function() {
                        for (var t = new Array(256), n = 0; n < 256; n++) {
                            for (var i = n, r = 0; r < 8; r++) 1 & i ? i = i >>> 1 ^ 3988292384 : i >>>= 1;
                            t[n] = i
                        }
                        return t
                    }());
                    for (var n = zt(t), i = -1 >>> 0, r = 0; r < n.length; r++) {
                        var e = 255 & (i ^ n[r]);
                        i = i >>> 8 ^ Hn[e]
                    }
                    return (-1 ^ i) >>> 0
                }([(i = (new Date).getTimezoneOffset(), r = jn.getUserLanguage(window), [jn.getUserAgent(window), i, r].join(Fn)), Math.floor(Date.now() / 6e4) - e, t].join(Fn)).toString(36)
            }

            function Wn(t) {
                return function(t) {
                    if ("undefined" != typeof TextDecoder) return new TextDecoder("utf-8").decode(t);
                    var n = Jt(new Uint8Array(t.buffer || t));
                    return decodeURIComponent(escape(n))
                }(function(t) {
                    return Kt(atob(t.replace(/[-_.]/g, (function(t) {
                        return Xt[t]
                    }))))
                }(String(t)))
            }
            var $n = function() {
                    function t(t) {
                        this.t = t, this.f6 = {}
                    }
                    var n = t.prototype;
                    return n.get = function(t, n) {
                        return t && n ? (A(this.f6, t) || (this.f6[t] = this.QEt(t)), this.f6[t] && this.f6[t][n] ? this.f6[t][n] : null) : (it().error("amp-analytics/linker-reader", "LINKER_PARAM requires two params, name and id"), null)
                    }, n.QEt = function(t) {
                        var n = $(this.t.location.search);
                        if (!A(n, t)) return null;
                        var i = n[t];
                        return this.tTt(this.t.location, t),
                            function(t) {
                                var n = function(t) {
                                    var n = t.split(Fn),
                                        i = n.length % 2 == 0;
                                    if (n.length < 4 || !i) return it().error(qn, "Invalid linker_param value ".concat(t)), null;
                                    var r = Number(n.shift());
                                    return 1 !== r ? (it().error(qn, "Invalid version number ".concat(r)), null) : {
                                        checksum: n.shift(),
                                        serializedIds: n.join(Fn)
                                    }
                                }(t);
                                if (!n) return null;
                                var i = n.checksum,
                                    r = n.serializedIds;
                                return function(t, n) {
                                    for (var i = 0; i <= 1; i++)
                                        if (Bn(t, i) == n) return !0;
                                    return !1
                                }(r, i) ? function(t) {
                                    for (var n = {}, i = t.split(Fn), r = 0; r < i.length; r += 2) {
                                        var e = i[r];
                                        if (Vn.test(e)) {
                                            var u = Wn(i[r + 1]);
                                            n[e] = u
                                        } else it().error(qn, "Invalid linker key ".concat(e, ", value ignored"))
                                    }
                                    return n
                                }(r) : (it().error(qn, "LINKER_PARAM value checksum not valid"), null)
                            }(i)
                    }, n.tTt = function(t, n) {
                        if (this.t.history.replaceState) {
                            var i = dn(t.search, n),
                                r = t.origin + t.pathname + i + (t.hash || "");
                            this.t.history.replaceState(null, "", r)
                        }
                    }, t
                }(),
                Yn = "visible",
                zn = "amp-analytics/session-manager",
                Kn = "sessionId",
                Jn = "creationTimestamp",
                Xn = "accessTimestamp",
                Zn = "engaged",
                Qn = "eventTimestamp",
                ti = "count",
                ni = function() {
                    function t(t) {
                        this.T4 = ct(t, "storage"), this.nTt = S(), this.xi = t, this.t = t.win, this.Qb = [], this.iTt = null, this.qi = null, this.rTt = !0, this.Me()
                    }
                    var n = t.prototype;
                    return n.Me = function() {
                        var t = this;
                        this.eTt(), this.Qb.push(Lt(this.t, "focus", (function() {
                            t.iTt = !0, t.uTt()
                        })), Lt(this.t, "blur", (function() {
                            t.iTt = !1, t.uTt()
                        })), Lt(this.t, "pageshow", (function() {
                            t.rTt = !0, t.uTt()
                        })), Lt(this.t, "pagehide", (function() {
                            t.rTt = !1, t.uTt()
                        })), this.xi.onVisibilityChanged((function() {
                            t.qi = t.xi.isVisible(), t.uTt()
                        })))
                    }, n.eTt = function() {
                        this.iTt = this.t.document.hasFocus(), this.qi = !(function(t) {
                            var n = t[Nn(t, "visibilityState", !0)];
                            if (n) return n;
                            var i = Nn(t, "hidden", !0);
                            return i in t && t[i] ? "hidden" : Yn
                        }(this.t.document) != Yn)
                    }, n.uTt = function() {
                        var t = this;
                        Object.keys(this.nTt).forEach((function(n) {
                            var i = t.nTt[n];
                            i.engaged = t.sTt(), t.oTt(n, i)
                        }))
                    }, n.dispose = function() {
                        this.Qb.forEach((function(t) {
                            t()
                        })), this.Qb.length = 0
                    }, n.getSessionValue = function(t, n) {
                        return this.get(t).then((function(t) {
                            return null == t ? void 0 : t[n]
                        }))
                    }, n.updateEvent = function(t) {
                        return this.get(t, (function(t) {
                            t.eventTimestamp = Date.now()
                        }))
                    }, n.get = function(t, n) {
                        return t ? A(this.nTt, t) && !ii(this.nTt[t]) ? (this.nTt[t] = this.aTt(this.nTt[t]), null == n || n(this.nTt[t]), this.oTt(t, this.nTt[t]), Promise.resolve(this.nTt[t])) : this.hTt(t, n) : (it().error(zn, "Sessions can only be accessed with a vendor type."), Promise.resolve(null))
                    }, n.hTt = function(t, n) {
                        var i = this;
                        return this.T4.then((function(n) {
                            var i = ei(t);
                            return n.get(i)
                        })).then((function(t) {
                            return t ? i.aTt(w(n = t) ? (Q(e = {}, Kn, n.sessionId), Q(e, Jn, n.creationTimestamp), Q(e, ti, n.count), Q(e, Xn, n.accessTimestamp), Q(e, Qn, n.eventTimestamp), Q(e, Zn, null === (r = n.engaged) || void 0 === r || r), e) : (et().error(zn, "Invalid stored session value"), ui()), !0) : ui(i.sTt());
                            var n, r, e
                        })).then((function(r) {
                            return t in i.nTt && !ii(i.nTt[t]) || (null == n || n(r), i.oTt(t, r), i.nTt[t] = r), i.nTt[t]
                        }))
                    }, n.aTt = function(t, n) {
                        var i = t.count,
                            r = Date.now();
                        if (ii(t)) {
                            var e = (null != i ? i : 0) + 1;
                            t = ui(this.sTt(), e)
                        } else {
                            var u = n && t.engaged;
                            t.engaged = u || this.sTt(), u && (this.iTt = !0, this.rTt = !0, this.qi = !0)
                        }
                        return t.accessTimestamp = r, t
                    }, n.sTt = function() {
                        return this.rTt && this.qi && this.iTt
                    }, n.oTt = function(t, n) {
                        return this.T4.then((function(i) {
                            var r = ei(t);
                            i.setNonBoolean(r, n)
                        }))
                    }, t
                }();

            function ii(t) {
                return t.accessTimestamp + 18e5 < Date.now()
            }

            function ri() {
                return Math.round(1e4 * Math.random())
            }

            function ei(t) {
                return "amp-session:" + t
            }

            function ui(t) {
                var n, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;
                return Q(n = {}, Kn, ri()), Q(n, Jn, Date.now()), Q(n, Xn, Date.now()), Q(n, ti, i), Q(n, Qn, void 0), Q(n, Zn, t), n
            }

            function si(t) {
                return ct(t, "amp-analytics-session")
            }

            function oi(t) {
                var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "default";
                return Rt(t).then((function(t) {
                    return t ? t.getConsentStringInfo(n) : null
                }))
            }
            var ai = "amp-analytics/variables",
                hi = /^(?:([^\s]*)(\([^)]*\))|[^]+)$/,
                ci = {
                    1: "sufficient",
                    2: "insufficient",
                    3: "not_required",
                    4: "unknown"
                },
                fi = function() {
                    function t(t, n, i) {
                        this.vars = t, this.iterations = void 0 === n ? 2 : n, this.noEncode = !!i, this.freezeVars = {}
                    }
                    var n = t.prototype;
                    return n.freezeVar = function(t) {
                        this.freezeVars[t] = !0
                    }, n.getVar = function(t) {
                        var n = this.vars[t];
                        return null == n && (n = ""), n
                    }, t
                }();

            function li(t, n, i) {
                var r = Number(n),
                    e = t.length;
                return st(N(r), "Start index " + r + "in substr macro should be a number"), i && st(N(e = Number(i)), "Length " + e + " in substr macro should be a number"), t.substr(r, e)
            }

            function vi(t, n) {
                return t && t.length ? t : n
            }

            function di(t, n, i) {
                n || it().warn(ai, "REPLACE macro must have two or more arguments"), i || (i = "");
                var r = new RegExp(n, "g");
                return t.replace(r, i)
            }

            function mi(t, n, i) {
                n || it().warn(ai, "MATCH macro must have two or more arguments");
                var r = 0;
                i && (0 != (r = parseInt(i, 10)) && !r || r < 0) && (it().error(ai, "Third argument in MATCH macro must be a number >= 0"), r = 0);
                var e = new RegExp(n),
                    u = t.match(e);
                return u && u[r] ? u[r] : ""
            }

            function pi(t, n, i, r) {
                var e = Number(t),
                    u = Number(n);
                st(!isNaN(e), "CALC macro - left operand must be a number"), st(!isNaN(u), "CALC macro - right operand must be a number");
                var s = 0;
                switch (i) {
                    case "add":
                        s = e + u;
                        break;
                    case "subtract":
                        s = e - u;
                        break;
                    case "multiply":
                        s = e * u;
                        break;
                    case "divide":
                        st(u, "CALC macro - cannot divide by 0"), s = e / u;
                        break;
                    default:
                        it().error(ai, "CALC macro - Invalid operation")
                }
                return Si(r) ? Math.round(s) : s
            }
            var bi = function() {
                function t(t) {
                    var n = this;
                    this.xi = t, this.iB = {}, this.m6 = ot(this.xi.win, "amp-analytics-linker-reader"), this.cTt = si(this.xi), this.PF("$DEFAULT", vi), this.PF("$SUBSTR", li), this.PF("$TRIM", (function(t) {
                        return t.trim()
                    })), this.PF("$TOLOWERCASE", (function(t) {
                        return t.toLowerCase()
                    })), this.PF("$TOUPPERCASE", (function(t) {
                        return t.toUpperCase()
                    })), this.PF("$NOT", (function(t) {
                        return String(!t)
                    })), this.PF("$BASE64", (function(t) {
                        return Qt(t)
                    })), this.PF("$HASH", this.fTt.bind(this)), this.PF("$IF", (function(t, n, i) {
                        return Si(t) ? n : i
                    })), this.PF("$REPLACE", di), this.PF("$MATCH", mi), this.PF("$CALC", pi), this.PF("$EQUALS", (function(t, n) {
                        return t === n
                    })), this.PF("LINKER_PARAM", (function(t, i) {
                        return n.m6.get(t, i)
                    })), this.PF("TIMEZONE_CODE", (function() {
                        var t = "";
                        return "Intl" in n.xi.win && "DateTimeFormat" in n.xi.win.Intl && (t = (new n.xi.win.Intl.DateTimeFormat).resolvedOptions().timeZone), t
                    })), this.PF("SCROLL_TOP", (function() {
                        return Math.round(Ct(n.xi).getScrollTop())
                    })), this.PF("SCROLL_LEFT", (function() {
                        return Math.round(Ct(n.xi).getScrollLeft())
                    })), this.PF("EXPERIMENT_BRANCHES", (function(t) {
                        return function(t, n) {
                            if (n) return function(t, n) {
                                return t.__AMP_EXPERIMENT_BRANCHES ? t.__AMP_EXPERIMENT_BRANCHES[n] : null
                            }(t, n) || "";
                            var i = function(t) {
                                var n = lt(t);
                                return n.__AMP_EXPERIMENT_BRANCHES || (n.__AMP_EXPERIMENT_BRANCHES = {}), Wt({}, n.__AMP_EXPERIMENT_BRANCHES)
                            }(t);
                            return Object.keys(i).map((function(t) {
                                return "".concat(t, ":").concat(i[t])
                            })).join(",")
                        }(n.xi.win, t)
                    })), this.PF("AMPDOC_META", (function(t) {
                        var i, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
                        return null !== (i = n.xi.getMetaByName(t)) && void 0 !== i ? i : r
                    }))
                }
                var n = t.prototype;
                return n.getMacros = function(t) {
                    var n = this,
                        i = t.getAttribute("type"),
                        r = {
                            "COOKIE": function(i) {
                                return function(t, n, i) {
                                    return Un(t, n) ? gn(t, i) : null
                                }(n.xi.win, t, i)
                            },
                            "CONSENT_STATE": wi(t),
                            "CONSENT_STRING": oi(t),
                            "CONSENT_METADATA": function(n) {
                                return function(t, n) {
                                    return function(t) {
                                        var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "default";
                                        return Rt(t).then((function(t) {
                                            return t ? t.getConsentMetadataInfo(n) : null
                                        }))
                                    }(t).then((function(t) {
                                        return t ? t[n] : null
                                    }))
                                }(t, st(n, "CONSENT_METADATA macro must contain a key"))
                            },
                            "SESSION_ID": function() {
                                return n.lTt(i, Kn)
                            },
                            "SESSION_TIMESTAMP": function() {
                                return n.lTt(i, Jn)
                            },
                            "SESSION_COUNT": function() {
                                return n.lTt(i, ti)
                            },
                            "SESSION_EVENT_TIMESTAMP": function() {
                                return n.lTt(i, Qn)
                            },
                            "SESSION_ENGAGED": function() {
                                return n.lTt(i, Zn)
                            }
                        },
                        e = xn(t) ? {} : {
                            "FIRST_CONTENTFUL_PAINT": function() {
                                return Ot(n.xi.win).getMetric("fcpv")
                            },
                            "FIRST_VIEWPORT_READY": function() {
                                return Ot(n.xi.win).getMetric("pc")
                            },
                            "MAKE_BODY_VISIBLE": function() {
                                return Ot(n.xi.win).getMetric("mbv")
                            },
                            "LARGEST_CONTENTFUL_PAINT": function() {
                                return Ot(n.xi.win).getMetric("lcpv")
                            },
                            "FIRST_INPUT_DELAY": function() {
                                return Ot(n.xi.win).getMetric("fid")
                            },
                            "CUMULATIVE_LAYOUT_SHIFT": function() {
                                return Ot(n.xi.win).getMetric("cls")
                            }
                        };
                    return Wt(Wt(Wt({}, this.iB), r), e)
                }, n.lTt = function(t, n) {
                    return this.cTt.then((function(i) {
                        return i.getSessionValue(t, n)
                    }))
                }, n.PF = function(t, n) {
                    ut(!this.iB[t]), this.iB[t] = n
                }, n.expandTemplate = function(t, n, i, r, e) {
                    var u, s, o, a, h, c = this;
                    return s = /\${([^{}]*)}/g, o = function(t, u) {
                        if (n.iterations < 0) return it().error(ai, "Maximum depth reached while expanding variables. Please ensure that the variables are not recursive."), t;
                        if (!u) return "";
                        var s = gi(u),
                            o = s.argList,
                            a = s.name;
                        if (n.freezeVars[a]) return t;
                        var h = n.getVar(a),
                            f = _t(i);
                        if ("string" == typeof h) h = c.vTt(h, n, i, f, r, e, o);
                        else if (d(h)) {
                            for (var l = 0; l < h.length; l++) h[l] = "string" == typeof h[l] ? c.vTt(h[l], n, i, f, r, e) : h[l];
                            h = Promise.all(h)
                        }
                        return Promise.resolve(h).then((function(t) {
                            return n.noEncode ? t : Ei(t)
                        }))
                    }, a = [], h = 0, (u = t).replace(s, (function(t) {
                        var n = arguments[arguments.length - 2];
                        a.push(u.slice(h, n)), h = n + t.length;
                        var i = o.apply(null, arguments);
                        return a.push(i), ""
                    })), a.push(u.slice(h)), Promise.all(a).then((function(t) {
                        return t.join("")
                    }))
                }, n.vTt = function(t, n, i, r, e, u, s) {
                    var o = this;
                    return this.expandTemplate(t, new fi(n.vars, n.iterations - 1, !0), i, e, u).then((function(t) {
                        return r.expandStringAsync(s ? t + s : t, e || o.getMacros(i), u)
                    }))
                }, n.fTt = function(t) {
                    return At(this.xi.win).sha384Base64(t)
                }, t
            }();

            function Ei(t) {
                if (null == t) return "";
                if (d(t)) return t.map(Ei).join(",");
                var n = gi(String(t)),
                    i = n.argList,
                    r = n.name;
                return encodeURIComponent(r) + i
            }

            function gi(t) {
                if (!t) return {
                    name: "",
                    argList: ""
                };
                var n = t.match(hi);
                return st(n, "Variable with invalid format found: " + t), {
                    name: n[1] || n[0],
                    argList: n[2] || ""
                }
            }

            function Ti(t) {
                return at(t, "amp-analytics-variables")
            }

            function yi(t) {
                return ct(t, "amp-analytics-variables")
            }

            function wi(t) {
                return function(t) {
                    var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "default";
                    return Rt(t).then((function(t) {
                        return t ? t.whenPolicyResolved(n) : null
                    }))
                }(t).then((function(t) {
                    return t ? ci[t] : null
                }))
            }

            function Si(t) {
                return "false" !== t && "" !== t && "0" !== t && "null" !== t && "NaN" !== t && "undefined" !== t
            }
            var Ai = "amp-analytics/config",
                Oi = function() {
                    function t(t) {
                        this.zl = t, this.t = null, this.dTt = Yt || {}, this.Yyt = {}, this._U = {}, this.mTt = {}, this.pTt = !1, this.cA = Ti(t)
                    }
                    var n = t.prototype;
                    return n.loadConfig = function() {
                        var t = this;
                        return this.t = this.zl.ownerDocument.defaultView, this.pTt = this.zl.hasAttribute("sandbox"), Promise.all([this.bTt(), this.ETt()]).then(this.gTt.bind(this)).then(this.TTt.bind(this)).then((function() {
                            return t._U
                        }))
                    }, n.yTt = function(t) {
                        var n, i = (this.t.location, Z.cdn),
                            r = "bg" === t && null !== (n = self.AMP_CONFIG) && void 0 !== n && n.canary ? ".canary" : "";
                        return "".concat(i, "/rtv/").concat(K().rtvVersion, "/v0/analytics-vendors/").concat(t).concat(r, ".json")
                    }, n.ETt = function() {
                        var t = this,
                            n = this.zl.getAttribute("type");
                        if (!n) return e();
                        var i = this.yTt(n),
                            r = this.Gi();
                        return et().fine(r, "Fetching vendor config", i), Mt(this.t).fetchJson(i, {
                            ampCors: !1
                        }).then((function(t) {
                            return t.json()
                        })).then((function(i) {
                            t.Yyt = i || {}, et().fine(r, "Vendor config loaded for " + n, i)
                        }), (function(t) {
                            it().error(r, "Error loading vendor config: ", i, t)
                        }))
                    }, n.bTt = function() {
                        var t = this,
                            n = this.zl.getAttribute("config");
                        if (!n || this.pTt) return e();
                        ln(n, this.zl);
                        var i = this.Gi();
                        et().fine(i, "Fetching remote config", n);
                        var r = {};
                        return this.zl.hasAttribute("data-credentials") && (r.credentials = this.zl.getAttribute("data-credentials")), _t(this.zl).expandUrlAsync(n, this.cA.getMacros(this.zl)).then((function(i) {
                            return n = i, Mt(t.t).fetchJson(n, r)
                        })).then((function(t) {
                            return t.json()
                        })).then((function(r) {
                            t.mTt = r, et().fine(i, "Remote config loaded", n)
                        }), (function(t) {
                            it().error(i, "Error loading remote config: ", n, t)
                        }))
                    }, n.gTt = function() {
                        var t = this.wTt().url,
                            n = {},
                            i = this.K4();
                        return this.STt(i), Ni(i, n), Ni(this.mTt, n), !t || this.pTt ? (this._U = this.ATt(n), e()) : this.OTt(n, t)
                    }, n.OTt = function(t, n) {
                        var i = this;
                        ln(n, this.zl);
                        var r = this.Gi();
                        return et().fine(r, "Rewriting config", n), this.NTt(t).then((function() {
                            var e = {
                                method: "POST",
                                body: t
                            };
                            return i.zl.hasAttribute("data-credentials") && (e.credentials = i.zl.getAttribute("data-credentials")), _t(i.zl).expandUrlAsync(n).then((function(t) {
                                return Mt(i.t).fetchJson(t, e)
                            })).then((function(t) {
                                return t.json()
                            })).then((function(t) {
                                i._U = i.ATt(t), et().fine(r, "Configuration re-written", n)
                            }), (function(t) {
                                it().error(r, "Error rewriting configuration: ", n, t)
                            }))
                        }))
                    }, n.TTt = function() {
                        if (this._U.warningMessage) {
                            var t = this.Gi(),
                                n = this.zl.getAttribute("type"),
                                i = this.zl.getAttribute("config");
                            it().warn(t, "Warning from analytics vendor%s%s: %s", n ? " " + n : "", i ? " with remote config url " + i : "", String(this._U.warningMessage)), delete this._U.warningMessage
                        }
                    }, n.NTt = function(t) {
                        var n = this,
                            i = t.configRewriter,
                            r = i && i.varGroups,
                            u = this.wTt().varGroups;
                        if (!r && !u) return e();
                        if (r && !u) {
                            var s = this.Gi();
                            return it().warn(s, "This analytics provider does not currently support varGroups"), e()
                        }
                        t.configRewriter = t.configRewriter || {};
                        var o = t.configRewriter;
                        o.vars = {};
                        var a = [],
                            h = r || {};
                        return O(h, u), Object.keys(h).forEach((function(t) {
                            var i = h[t];
                            if (i.enabled) {
                                var r = n.shallowExpandObject(n.zl, i).then((function(t) {
                                    delete t.enabled, Object.assign(o.vars, t)
                                }));
                                a.push(r)
                            }
                        })), Promise.all(a).then((function() {
                            if (!Object.keys(o.vars).length) return delete t.configRewriter;
                            r && delete o.varGroups
                        }))
                    }, n.ATt = function(t) {
                        var n = {
                            "vars": {
                                "requestCount": 0
                            }
                        };
                        return Ni(Ii(this.dTt), n), Ni(Ii(this.Yyt), n, !0), Ni(Ii(t), n, !0), n
                    }, n.wTt = function() {
                        return this.Yyt.configRewriter || {}
                    }, n.K4 = function() {
                        if (this.zl.CONFIG) return this.zl.CONFIG;
                        var t = {},
                            n = this.Gi();
                        try {
                            var i = this.zl.children;
                            1 == i.length ? t = function(t) {
                                var n, i, r, e = (n = t, I(/^[\w-]+$/.test("script")), i = n, r = "> ".concat("script"), C(i) ? i.querySelectorAll(M(r, ":scope")) : D(i, r)),
                                    u = e.length;
                                if (1 !== u) throw new Error("Found ".concat(u, " <script> children. Expected 1."));
                                var s = e[0];
                                if (! function(t) {
                                        var n;
                                        return "SCRIPT" == t.tagName && "APPLICATION/JSON" == (null === (n = t.getAttribute("type")) || void 0 === n ? void 0 : n.toUpperCase())
                                    }(s)) throw new Error('<script> child must have type="application/json"');
                                try {
                                    var o;
                                    return _(null !== (o = s.textContent) && void 0 !== o ? o : "")
                                } catch (t) {
                                    throw new Error("Failed to parse <script> contents. Is it valid JSON?")
                                }
                            }(this.zl) : i.length > 1 && it().error(n, "The tag should contain only one <script> child.")
                        } catch (t) {
                            it().error(n, t.message)
                        }
                        return t
                    }, n.STt = function(t) {
                        if (this.zl.getAttribute("type") && (t.transport || this.mTt.transport)) {
                            var n = this.Gi();
                            it().error(n, "Inline or remote config should not overwrite vendor transport settings")
                        }
                        t.transport && t.transport.iframe && (it().error(Ai, "Inline configs are not allowed to specify transport iframe"), t.transport.iframe = void 0), this.mTt.transport && this.mTt.transport.iframe && (it().error(Ai, "Remote configs are not allowed to specify transport iframe"), this.mTt.transport.iframe = void 0)
                    }, n.Gi = function() {
                        return "AmpAnalytics " + (this.zl.getAttribute("id") || "<unknown id>")
                    }, n.shallowExpandObject = function(t, n) {
                        var i = {},
                            r = [],
                            e = [],
                            u = _t(t),
                            s = Ti(t).getMacros(t);
                        return Object.keys(n).forEach((function(t) {
                            r.push(t);
                            var i = u.expandStringAsync(n[t], s);
                            e.push(i)
                        })), Promise.all(e).then((function(t) {
                            return r.forEach((function(n, r) {
                                return i[n] = t[r]
                            })), i
                        }))
                    }, t
                }();

            function Ni(t, n, i) {
                for (var r in null == n && (n = {}), st(i || !t || !t.optout || "_gaUserPrefs.ioo" == t.optout || "__gaOptOutExtension" == t.optoutElementId, "optout property is only available to vendor config."), t) st(i || "iframePing" != r, "iframePing config is only available to vendor config."), A(t, r) && (d(t[r]) ? (d(n[r]) || (n[r] = []), n[r] = Ni(t[r], n[r], i)) : w(t[r]) ? (w(n[r]) || (n[r] = {}), n[r] = Ni(t[r], n[r], i)) : n[r] = t[r]);
                return n
            }

            function Ii(t) {
                if (!t.requests) return t;
                for (var n in t.requests) A(t.requests, n) && (t.requests[n] = w(i = t.requests[n]) ? i : {
                    "baseUrl": i
                });
                var i;
                return function(t) {
                    if (A(t, "requests") && A(t, "requestOrigin")) {
                        var n = t.requestOrigin;
                        for (var i in t.requests) A(t.requests[i], "origin") || (t.requests[i].origin = n)
                    }
                    return t
                }(t)
            }
            var _i = 31536e6;
            var Ri = function() {
                    function t() {
                        this.Di = []
                    }
                    var n, i = t.prototype;
                    return i.peek = function() {
                        var t = this.length;
                        return t ? this.Di[t - 1].item : null
                    }, i.enqueue = function(t, n) {
                        if (isNaN(n)) throw new Error("Priority must not be NaN.");
                        var i = this.ji(n);
                        this.Di.splice(i, 0, {
                            item: t,
                            priority: n
                        })
                    }, i.ji = function(t) {
                        for (var n = -1, i = 0, r = this.length; i <= r && (n = Math.floor((i + r) / 2)) !== this.length;)
                            if (this.Di[n].priority < t) i = n + 1;
                            else {
                                if (!(n > 0 && this.Di[n - 1].priority >= t)) break;
                                r = n - 1
                            }
                        return n
                    }, i.forEach = function(t) {
                        for (var n = this.length; n--;) t(this.Di[n].item)
                    }, i.dequeue = function() {
                        var t = this.Di.pop();
                        return t ? t.item : null
                    }, (n = [{
                        key: "length",
                        get: function() {
                            return this.Di.length
                        }
                    }]) && function(t, n) {
                        for (var i = 0; i < n.length; i++) {
                            var r = n[i];
                            r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r)
                        }
                    }(t.prototype, n), t
                }(),
                Pi = !1,
                Ci = "CHUNK",
                Mi = /nochunking=1/.test(self.location.hash),
                Di = e();

            function Li(t, n, i) {
                Mi ? Di.then(n) : function(t) {
                    var n, i;
                    return "chunk", n = Hi, bt(mt(i = dt(t)), i, "chunk", n), at(t, "chunk")
                }(t).run(n, i)
            }
            var ki, xi = "not_run",
                Ui = function() {
                    function t(t) {
                        this.state = xi, this.Ui = t
                    }
                    var n = t.prototype;
                    return n.Li = function(t) {
                        if ("run" != this.state) {
                            this.state = "run";
                            try {
                                this.Ui(t)
                            } catch (t) {
                                throw this.Hi(t), t
                            }
                        }
                    }, n.Gi = function() {
                        return this.Ui.displayName || this.Ui.name
                    }, n.Hi = function(t) {}, n.Vi = function() {
                        return !1
                    }, n.Fi = function() {
                        return !1
                    }, t
                }(),
                ji = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t, i, r) {
                        var e;
                        return (e = n.call(this, t)).Bi = r, e
                    }
                    var r = i.prototype;
                    return r.Hi = function(t) {
                        var n;
                        ut((n = self.document).defaultView), Pi || (Pi = !0, function(t) {
                            ! function(t, n) {
                                for (var i in n) In(t, i, n[i])
                            }(t.body, {
                                opacity: 1,
                                visibility: "visible",
                                "animation": "none"
                            })
                        }(n))
                    }, r.Vi = function() {
                        return this.qi()
                    }, r.Fi = function() {
                        return this.Bi.Wi
                    }, r.qi = function() {
                        return this.Bi.ampdoc.isVisible()
                    }, i
                }(Ui),
                Hi = function() {
                    function t(t) {
                        var n, i = this;
                        this.ampdoc = t, this.t = t.win, this.$i = new Ri, this.Ki = this.Yi.bind(this), this.Ji = 0, this.Xi = !(!this.t.navigator.scheduling || !this.t.navigator.scheduling.isInputPending), this.Qi = !1, this.zi = this.t.document.documentElement.hasAttribute("i-amphtml-no-boilerplate"), this.t.addEventListener("message", (function(t) {
                            "amp-macro-task" == kt(t) && i.Yi(null)
                        })), this.Wi = !1, (n = t, ct(n, "viewer")).then((function() {
                            i.Wi = !0
                        })), t.onVisibilityChanged((function() {
                            t.isVisible() && i.Zi()
                        }))
                    }
                    var n = t.prototype;
                    return n.run = function(t, n) {
                        var i = new Ui(t);
                        this.rn(i, n)
                    }, n.runForStartup = function(t) {
                        var n = new ji(t, this.t, this);
                        this.rn(n, Number.POSITIVE_INFINITY)
                    }, n.rn = function(t, n) {
                        this.$i.enqueue(t, n), this.Zi()
                    }, n.en = function(t) {
                        for (var n = this.$i.peek(); n && n.state !== xi;) this.$i.dequeue(), n = this.$i.peek();
                        return n && t && this.$i.dequeue(), n
                    }, n.Yi = function(t) {
                        var n, i = this,
                            r = this.en(!0);
                        if (!r) return this.Qi = !1, this.Ji = 0, !1;
                        try {
                            n = Date.now(), r.Li(t)
                        } finally {
                            Di.then().then().then().then().then().then().then().then().then((function() {
                                i.Qi = !1, i.Ji += Date.now() - n, et().fine(Ci, r.Gi(), "Chunk duration", Date.now() - n, i.Ji), i.Zi()
                            }))
                        }
                        return !0
                    }, n.sn = function(t) {
                        var n = this;
                        if (this.zi && (this.Xi ? this.t.navigator.scheduling.isInputPending() : this.Ji > 5)) return this.Ji = 0, void this.on();
                        Di.then((function() {
                            n.Ki(t)
                        }))
                    }, n.Zi = function() {
                        if (!this.Qi) {
                            var t = this.en();
                            if (t) return t.Vi() ? (this.Qi = !0, void this.sn(null)) : void(t.Fi() && this.t.requestIdleCallback ? (n = this.t, i = 2e3, r = this.Ki, e = Date.now(), n.requestIdleCallback((function t(u) {
                                if (u.timeRemaining() < 15) {
                                    var s = i - (Date.now() - e);
                                    s <= 0 || u.didTimeout ? (et().fine(Ci, "Timed out", i, u.didTimeout), r(u)) : (et().fine(Ci, "Rescheduling with", s, u.timeRemaining()), n.requestIdleCallback(t, {
                                        timeout: s
                                    }))
                                } else et().fine(Ci, "Running idle callback with ", 15), r(u)
                            }), {
                                timeout: i
                            })) : this.on())
                        }
                        var n, i, r, e
                    }, n.on = function() {
                        this.t.postMessage("amp-macro-task", "*")
                    }, t
                }(),
                Fi = "amp-analytics/cookie-writer",
                Vi = {
                    "referrerDomains": !0,
                    "enabled": !0,
                    "cookiePath": !0,
                    "cookieMaxAge": !0,
                    "cookieSecure": !0,
                    "cookieDomain": !0,
                    "sameSite": !0,
                    "SameSite": !0,
                    "secure": !0
                },
                qi = function() {
                    function t(t, n, i) {
                        this.t = t, this.zl = n, this.oU = _t(n), this.ITt = null, this._U = i, this.sh = Ti(n).getMacros(n)
                    }
                    var n = t.prototype;
                    return n.write = function() {
                        var t = this;
                        return this.ITt || (this.ITt = new u, Li(this.zl, (function() {
                            t.ITt.resolve(t.Me())
                        }), 10)), this.ITt.promise
                    }, n.Me = function() {
                        if (!Un(this.t, this.zl)) return e();
                        if (!A(this._U, "cookies")) return e();
                        if (!w(this._U.cookies)) return it().error(Fi, "cookies config must be an object"), e();
                        var t = this._U.cookies;
                        if (!1 === t.enabled) return e();
                        for (var n = this.g6(t), i = Object.keys(t), r = [], u = 0; u < i.length; u++) {
                            var s = i[u],
                                o = t[s],
                                a = this._Tt(o.sameSite || o.SameSite || t.sameSite || t.SameSite);
                            this.b6(s, o) && r.push(this.y6(s, o.value, n, a))
                        }
                        return Promise.all(r)
                    }, n.g6 = function(t) {
                        if (!A(t, "cookieMaxAge")) return _i;
                        var n = Number(t.cookieMaxAge);
                        return n || 0 === n ? (n <= 0 && it().warn(Fi, "cookieMaxAge %s less than or equal to 0, cookie will immediately expire", t.cookieMaxAge), 1e3 * n) : (it().error(Fi, "invalid cookieMaxAge %s, falling back to default value (1 year)", t.cookieMaxAge), _i)
                    }, n.b6 = function(t, n) {
                        return !(Vi[t] || (w(n) ? !A(n, "value") && (it().error(Fi, "value is required in the cookieValue object"), 1) : (it().error(Fi, "cookieValue must be configured in an object"), 1)))
                    }, n.y6 = function(t, n, i, r) {
                        var e = this;
                        return this.oU.expandStringAsync(n, this.sh).then((function(n) {
                            if (n) {
                                var u = Date.now() + i,
                                    s = r === En;
                                ! function(t, n, i, r) {
                                    var e = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {};
                                    wn(t, e, n);
                                    var u = void 0;
                                    e.domain ? u = e.domain : e.highestAvailableDomain && (u = Tn(t)), yn(t, n, i, r, u, e.sameSite, e.secure)
                                }(e.t, t, n, u, {
                                    highestAvailableDomain: !0,
                                    sameSite: r,
                                    secure: s
                                })
                            }
                        })).catch((function(t) {
                            it().error(Fi, "Error expanding cookie string", t)
                        }))
                    }, n._Tt = function(t) {
                        switch (t) {
                            case "Strict":
                                return "Strict";
                            case "Lax":
                                return "Lax";
                            case "None":
                                return En;
                            default:
                                return
                        }
                    }, t
                }(),
                Gi = function() {
                    function t() {
                        this.Tt = null
                    }
                    var n = t.prototype;
                    return n.add = function(t) {
                        var n = this;
                        return this.Tt || (this.Tt = []), this.Tt.push(t),
                            function() {
                                n.remove(t)
                            }
                    }, n.remove = function(t) {
                        var n, i, r;
                        this.Tt && (i = t, -1 != (r = (n = this.Tt).indexOf(i)) && n.splice(r, 1))
                    }, n.removeAll = function() {
                        this.Tt && (this.Tt.length = 0)
                    }, n.fire = function(t) {
                        if (this.Tt)
                            for (var n, r = i(this.Tt.slice(), !0); !(n = r()).done;)(0, n.value)(t)
                    }, n.getHandlerCount = function() {
                        var t, n;
                        return null !== (t = null === (n = this.Tt) || void 0 === n ? void 0 : n.length) && void 0 !== t ? t : 0
                    }, t
                }(),
                Bi = "video-session-visible",
                Wi = "video-seconds-played",
                $i = ["video-ended", "video-pause", "video-play", "video-session", "video-session-visible", "video-seconds-played", "video-hosted-custom", "video-percentage-played", "video-ad-start", "video-ad-end"],
                Yi = /^vars(.+)/,
                zi = function() {},
                Ki = "amp-analytics/events",
                Ji = "click",
                Xi = "browser-event",
                Zi = "custom",
                Qi = "hidden",
                tr = "ini-load",
                nr = "render-start",
                ir = "scroll",
                rr = "story",
                er = "timer",
                ur = "video",
                sr = "visible",
                or = ["ampdoc", "embed"],
                ar = Object.freeze((Q(ki = {}, Ji, {
                    name: Ji,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new Er(t)
                    }
                }), Q(ki, Xi, {
                    name: Xi,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new mr(t)
                    }
                }), Q(ki, Zi, {
                    name: Zi,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new pr(t)
                    }
                }), Q(ki, Qi, {
                    name: sr,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new Or(t)
                    }
                }), Q(ki, tr, {
                    name: tr,
                    allowedFor: or.concat(["timer", "visible"]),
                    klass: function(t) {
                        return new yr(t)
                    }
                }), Q(ki, nr, {
                    name: nr,
                    allowedFor: or.concat(["timer", "visible"]),
                    klass: function(t) {
                        return new Tr(t)
                    }
                }), Q(ki, ir, {
                    name: ir,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new gr(t)
                    }
                }), Q(ki, rr, {
                    name: rr,
                    allowedFor: or,
                    klass: function(t) {
                        return new br(t)
                    }
                }), Q(ki, er, {
                    name: er,
                    allowedFor: or,
                    klass: function(t) {
                        return new Sr(t)
                    }
                }), Q(ki, ur, {
                    name: ur,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new Ar(t)
                    }
                }), Q(ki, sr, {
                    name: sr,
                    allowedFor: or.concat(["timer"]),
                    klass: function(t) {
                        return new Or(t)
                    }
                }), ki));

            function hr(t) {
                st(!d(t) || new Set(t).size === t.length, "Cannot have duplicate selectors in selectors list: %s", t)
            }

            function cr(t) {
                return t.startsWith("video") ? ur : "blur" === (n = t) || "change" === n ? Xi : t.startsWith("story") ? rr : function(t) {
                    return "click" === (n = t) || "browser-event" === n || "custom" === n || "hidden" === n || "ini-load" === n || "render-start" === n || "scroll" === n || "story" === n || "timer" === n || "video" === n || "visible" === n;
                    var n
                }(t) ? A(ar, t) ? ar[t].name : t : Zi;
                var n
            }

            function fr(t) {
                var n = {};
                return Object.keys(ar).forEach((function(i) {
                    A(ar, i) && -1 != ar[i].allowedFor.indexOf(t) && (n[i] = ar[i].klass)
                })), n
            }

            function lr(t, n) {
                var i = j(t, void 0, Yi);
                return O(i, n, 0), i
            }
            var vr = function(t, n) {
                    var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
                        r = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
                    this.target = t, this.type = n, this.vars = r ? lr(t, i) : i
                },
                dr = function() {
                    function t(t) {
                        this.root = t
                    }
                    var n = t.prototype;
                    return n.dispose = function() {}, n.add = function(t, n, i, r) {}, t
                }(),
                mr = function(t) {
                    a(r, t);
                    var n = v(r);

                    function r(t) {
                        var i;
                        return (i = n.call(this, t)).RTt = new Gi, i.PTt = {}, i.CTt = i.RTt.fire.bind(i.RTt), i.MTt = function(t, n, i) {
                            var r = 0,
                                e = 0,
                                u = null;

                            function s() {
                                r = 0;
                                var i, o = 500 - (t.Date.now() - e);
                                o > 0 ? r = t.setTimeout(s, o) : (i = u, u = null, n.apply(null, i))
                            }
                            return function() {
                                e = t.Date.now();
                                for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
                                u = i, r || (r = t.setTimeout(s, 500))
                            }
                        }(i.root.ampdoc.win, i.CTt), i
                    }
                    var e = r.prototype;
                    return e.dispose = function() {
                        var t = this,
                            n = this.root.getRoot();
                        Object.keys(this.PTt).forEach((function(i) {
                            n.removeEventListener(i, t.MTt)
                        })), this.CTt = null, this.RTt = null
                    }, e.add = function(t, n, r, e) {
                        var u;
                        st(("analytics-browser-events", u = function(t) {
                            var n, r, e, u, s;
                            if (t[$t]) return t[$t];
                            t[$t] = S();
                            var o = t[$t];
                            I(o);
                            var a = Wt(Wt({}, null !== (n = t.AMP_CONFIG) && void 0 !== n ? n : {}), null !== (r = t.AMP_EXP) && void 0 !== r ? r : _((null === (e = t.__AMP_EXP) || void 0 === e ? void 0 : e.textContent) || "{}"));
                            for (var h in a) {
                                var c = a[h];
                                "number" == typeof c && c >= 0 && c <= 1 && (o[h] = Math.random() < c)
                            }
                            var f = null === (u = t.AMP_CONFIG) || void 0 === u ? void 0 : u["allow-doc-opt-in"];
                            if (d(f) && f.length) {
                                var l = t.document.head.querySelector('meta[name="amp-experiments-opt-in"]');
                                if (l)
                                    for (var v, m, p = i((null === (v = l.getAttribute("content")) || void 0 === v ? void 0 : v.split(",")) || [], !0); !(m = p()).done;) {
                                        var b = m.value;
                                        f.includes(b) && (o[b] = !0)
                                    }
                            }
                            Object.assign(o, function(t) {
                                var n, r = "";
                                try {
                                    var e;
                                    "localStorage" in t && (r = null !== (e = t.localStorage.getItem("amp-experiment-toggles")) && void 0 !== e ? e : "")
                                } catch (t) {
                                    et().warn("EXPERIMENTS", "Failed to retrieve experiments from localStorage.")
                                }
                                for (var u, s = (null === (n = r) || void 0 === n ? void 0 : n.split(/\s*,\s*/g)) || [], o = S(), a = i(s, !0); !(u = a()).done;) {
                                    var h = u.value;
                                    h && ("-" == h[0] ? o[h.substr(1)] = !1 : o[h] = !0)
                                }
                                return o
                            }(t));
                            var E = null === (s = t.AMP_CONFIG) || void 0 === s ? void 0 : s["allow-url-opt-in"];
                            if (d(E) && E.length)
                                for (var g, T = $(t.location.originalHash || t.location.hash), y = i(E, !0); !(g = y()).done;) {
                                    var w = g.value,
                                        A = T["e-".concat(w)];
                                    "1" == A && (o[w] = !0), "0" == A && (o[w] = !1)
                                }
                            return o
                        }(this.root.ampdoc.win), !!u["analytics-browser-events"]), 'expected global "analytics-browser-events" experiment to be enabled');
                        var s = r.on,
                            o = r.selectionMethod,
                            a = void 0 === o ? null : o,
                            h = r.selector;
                        st(null == h ? void 0 : h.length, "Missing required selector on browser event trigger"), hr(h);
                        var c = this.root.getElements(t, h, a, !1);
                        return this.PTt[s] || (this.root.getRootElement().addEventListener(s, this.MTt, !0), this.PTt[s] = !0), this.RTt.add((function(t) {
                            t.type === s && c.then((function(n) {
                                n.forEach((function(n) {
                                    var i = t.target;
                                    n.contains(i) && e(new vr(n, s, {}))
                                }))
                            }))
                        }))
                    }, r
                }(dr),
                pr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).RTt = {}, i.DTt = {}, i.LTt = {}, setTimeout((function() {
                            i.DTt = void 0
                        }), 1e4), i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {
                        for (var t in this.DTt = void 0, this.LTt = void 0, this.RTt) this.RTt[t].removeAll()
                    }, r.add = function(t, n, i, r) {
                        var e = this,
                            u = i.selector;
                        u || (u = ":root");
                        var s = i.selectionMethod || null,
                            o = this.root.getElement(t, u, s),
                            a = n.startsWith("sandbox-"),
                            h = a ? this.LTt && this.LTt[n] : this.DTt && this.DTt[n];
                        if (h) {
                            var c = h.length;
                            o.then((function(t) {
                                setTimeout((function() {
                                    for (var i = 0; i < c; i++) {
                                        var u = h[i];
                                        t.contains(u.target) && r(u)
                                    }
                                    a && (e.LTt[n] = void 0)
                                }), 1)
                            }))
                        }
                        var f = this.RTt[n];
                        return f || (f = new Gi, this.RTt[n] = f), this.RTt[n].add((function(t) {
                            o.then((function(n) {
                                n.contains(t.target) && r(t)
                            }))
                        }))
                    }, r.trigger = function(t) {
                        var n = t.type,
                            i = n.startsWith("sandbox-"),
                            r = this.RTt[n];
                        r && (r.fire(t), i) || (i ? (this.LTt[n] = this.LTt[n] || [], this.LTt[n].push(t)) : this.DTt && (this.DTt[n] = this.DTt[n] || [], this.DTt[n].push(t)))
                    }, i
                }(dr),
                br = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        return n.call(this, t)
                    }
                    var r = i.prototype;
                    return r.add = function(t, n, i, r) {
                        var e = this,
                            u = this.root.getRootElement(),
                            s = this.DTt && this.DTt[n];
                        if (s)
                            for (var o = s.length, a = 0; a < o; a++) {
                                var h = s[a];
                                this.kTt(h, u, i, r)
                            }
                        var c = this.RTt[n];
                        return c || (c = new Gi, this.RTt[n] = c), this.RTt[n].add((function(t) {
                            e.kTt(t, u, i, r)
                        }))
                    }, r.kTt = function(t, n, i, r) {
                        var e = t.type,
                            u = t.vars,
                            s = i.storySpec || {},
                            o = void 0 === s.repeat || s.repeat,
                            a = u.eventDetails,
                            h = i.tagName;
                        h && a.tagName && h.toLowerCase() !== a.tagName || !1 === o && a.repeated || r(new vr(n, e, u))
                    }, r.trigger = function(t) {
                        var n = t.type,
                            i = this.RTt[n];
                        i && i.fire(t), this.DTt && (this.DTt[n] = this.DTt[n] || [], this.DTt[n].push(t))
                    }, i
                }(pr),
                Er = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).xTt = new Gi, i.UTt = i.xTt.fire.bind(i.xTt), i.root.getRoot().addEventListener("click", i.UTt), i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {
                        this.root.getRoot().removeEventListener("click", this.UTt), this.xTt.removeAll()
                    }, r.add = function(t, n, i, r) {
                        var e = st(i.selector, "Missing required selector on click trigger"),
                            u = i.selectionMethod || null;
                        return this.xTt.add(this.root.createSelectiveListener(this.qs.bind(this, r), t.parentElement || t, e, u))
                    }, r.qs = function(t, n, i) {
                        t(new vr(n, "click"))
                    }, i
                }(dr),
                gr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).Dr = t, i.jTt = null, i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {
                        null !== this.jTt && (this.Dr.getScrollManager().removeScrollHandler(this.jTt), this.jTt = null)
                    }, r.add = function(t, n, i, r) {
                        if (!i.scrollSpec) return it().error(Ki, "Missing scrollSpec on scroll trigger."), zi;
                        if (!Array.isArray(i.scrollSpec.verticalBoundaries) && !Array.isArray(i.scrollSpec.horizontalBoundaries)) return it().error(Ki, "Boundaries are required for the scroll trigger to work."), zi;
                        var e = this.HTt(i.scrollSpec.verticalBoundaries),
                            u = this.HTt(i.scrollSpec.horizontalBoundaries),
                            s = !!i.scrollSpec.useInitialPageSize;
                        return this.jTt = this.Hl.bind(this, u, e, s, r), this.Dr.getScrollManager().addScrollHandler(this.jTt)
                    }, r.Hl = function(t, n, i, r, e) {
                        var u = i ? e.initialSize : e,
                            s = u.scrollHeight,
                            o = u.scrollWidth;
                        this.FTt(n, 100 * (e.top + e.height) / s, "verticalScrollBoundary", r), this.FTt(t, 100 * (e.left + e.width) / o, "horizontalScrollBoundary", r)
                    }, r.HTt = function(t) {
                        var n = {};
                        if (!t || !Array.isArray(t)) return n;
                        for (var i = 0; i < t.length; i++) {
                            var r = t[i];
                            if ("number" != typeof r || !isFinite(r)) return it().error(Ki, "Scroll trigger boundaries must be finite."), n;
                            n[r = Math.min(5 * Math.round(r / 5), 100)] = !1
                        }
                        return n
                    }, r.FTt = function(t, n, i, r) {
                        if (n)
                            for (var e in t)
                                if (A(t, e)) {
                                    var u = parseInt(e, 10);
                                    if (!(u > n || t[u])) {
                                        t[u] = !0;
                                        var s = {};
                                        s[i] = e, r(new vr(this.Dr.getRootElement(), ir, s, !1))
                                    }
                                }
                    }, i
                }(dr),
                Tr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        return n.call(this, t)
                    }
                    var r = i.prototype;
                    return r.dispose = function() {}, r.add = function(t, n, i, r) {
                        var e, u, s = this,
                            o = i.selector || ":root";
                        if (":root" == o || ":host" == o) e = this.root.getRootElement(), u = this.getRootSignal(n);
                        else {
                            var a = i.selectionMethod;
                            u = this.root.getAmpElement(t.parentElement || t, o, a).then((function(t) {
                                return e = t, s.getElementSignal(n, e)
                            }))
                        }
                        return u.then((function() {
                            r(new vr(e, n))
                        })), zi
                    }, r.getRootSignal = function(t) {
                        return this.root.signals().whenSignal(t)
                    }, r.getElementSignal = function(t, n) {
                        return "function" != typeof n.signals ? e() : n.signals().whenSignal(t)
                    }, i
                }(dr),
                yr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        return n.call(this, t)
                    }
                    var r = i.prototype;
                    return r.dispose = function() {}, r.add = function(t, n, i, r) {
                        var e, u, s = this,
                            o = i.selector || ":root";
                        if (":root" == o || ":host" == o) e = this.root.getRootElement(), u = this.getRootSignal();
                        else {
                            var a = i.selectionMethod;
                            u = this.root.getAmpElement(t.parentElement || t, o, a).then((function(t) {
                                return e = t, s.getElementSignal("ini-load", e)
                            }))
                        }
                        return u.then((function() {
                            r(new vr(e, n))
                        })), zi
                    }, r.getRootSignal = function() {
                        return this.root.whenIniLoaded()
                    }, r.getElementSignal = function(t, n) {
                        if ("function" != typeof n.signals) return e();
                        var i = n.signals();
                        return Promise.race([i.whenSignal("ini-load"), i.whenSignal("load-end")])
                    }, i
                }(dr),
                wr = function() {
                    function t(t, n, i) {
                        this.VTt = void 0, st("interval" in t, "Timer interval specification required"), this.qTt = Number(t.interval) || 0, st(this.qTt >= .5, "Bad timer interval specification"), this.GTt = "maxTimerLength" in t ? Number(t.maxTimerLength) : 7200, st(this.GTt > 0, "Bad maxTimerLength specification"), this.BTt = "maxTimerLength" in t, this.WTt = !("immediate" in t) || Boolean(t.immediate), this.$Tt = null, this.YTt = null, this.zTt = null, this.KTt = n || null, this.JTt = i || null, this.ih = void 0, this.XTt = void 0
                    }
                    var n = t.prototype;
                    return n.init = function(t) {
                        this.KTt ? this.ZTt() : t()
                    }, n.dispose = function() {
                        this.QTt(), this.tSt()
                    }, n.ZTt = function() {
                        this.KTt && (this.YTt = this.KTt())
                    }, n.tSt = function() {
                        this.YTt && (this.YTt(), this.YTt = null)
                    }, n.nSt = function() {
                        if (this.JTt) try {
                            this.zTt = this.JTt()
                        } catch (t) {
                            throw this.dispose(), t
                        }
                    }, n.QTt = function() {
                        this.zTt && (this.zTt(), this.zTt = null)
                    }, n.isRunning = function() {
                        return !!this.VTt
                    }, n.startIntervalInWindow = function(t, n, i) {
                        this.isRunning() || (this.ih = Date.now(), this.XTt = void 0, this.$Tt = n, this.VTt = t.setInterval((function() {
                            n()
                        }), 1e3 * this.qTt), (!this.JTt || this.JTt && this.BTt) && t.setTimeout((function() {
                            i()
                        }), 1e3 * this.GTt), this.tSt(), this.WTt && n(), this.nSt())
                    }, n.iSt = function(t) {
                        this.isRunning() && (this.$Tt(), this.$Tt = null, t.clearInterval(this.VTt), this.VTt = void 0, this.XTt = void 0, this.QTt(), this.ZTt())
                    }, n.rSt = function() {
                        return this.ih ? Date.now() - (this.XTt || this.ih) : 0
                    }, n.getTimerVars = function() {
                        var t = 0;
                        return this.isRunning() && (t = this.rSt(), this.XTt = Date.now()), {
                            "timerDuration": t,
                            "timerStart": this.ih || 0
                        }
                    }, t
                }(),
                Sr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).eSt = {}, i.uSt = 1, i
                    }
                    var r = i.prototype;
                    return r.getTrackedTimerKeys = function() {
                        return Object.keys(this.eSt)
                    }, r.dispose = function() {
                        var t = this;
                        this.getTrackedTimerKeys().forEach((function(n) {
                            t.sSt(n)
                        }))
                    }, r.add = function(t, n, i, r) {
                        var e = this,
                            u = i.timerSpec;
                        st(u && "object" == c(u), "Bad timer specification");
                        var s = "startSpec" in u ? u.startSpec : null;
                        st(!s || "object" == c(s), "Bad timer start specification");
                        var o = "stopSpec" in u ? u.stopSpec : null;
                        st(!s && !o || "object" == c(o), "Bad timer stop specification");
                        var a, h, f = this.oSt();
                        if (s) {
                            var l = this.aSt(s);
                            st(l, "Cannot track timer start"), a = l.add.bind(l, t, s.on, s, this.hSt.bind(this, f, n, r))
                        }
                        if (o) {
                            var v = this.aSt(o);
                            st(v, "Cannot track timer stop"), h = v.add.bind(v, t, o.on, o, this.hSt.bind(this, f, n, r))
                        }
                        var d = new wr(u, a, h);
                        return this.eSt[f] = d, d.init(this.cSt.bind(this, f, n, r)),
                            function() {
                                e.sSt(f)
                            }
                    }, r.oSt = function() {
                        return ++this.uSt
                    }, r.aSt = function(t) {
                        var n = cr(it().assertString(t.on));
                        return this.root.getTrackerForAllowlist(n, fr("timer"))
                    }, r.hSt = function(t, n, i) {
                        var r = this.eSt[t];
                        r && (r.isRunning() ? this.iSt(t) : this.cSt(t, n, i))
                    }, r.cSt = function(t, n, i) {
                        var r = this;
                        this.eSt[t].startIntervalInWindow(this.root.ampdoc.win, (function() {
                            i(r.fSt(t, n))
                        }), this.sSt.bind(this, t))
                    }, r.iSt = function(t) {
                        this.eSt[t].iSt(this.root.ampdoc.win)
                    }, r.fSt = function(t, n) {
                        return new vr(this.root.getRootElement(), n, this.eSt[t].getTimerVars(), !1)
                    }, r.sSt = function(t) {
                        this.eSt[t] && (this.iSt(t), this.eSt[t].dispose(), delete this.eSt[t])
                    }, i
                }(dr),
                Ar = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).lSt = new Gi, i.CTt = i.lSt.fire.bind(i.lSt), $i.forEach((function(t) {
                            i.root.getRoot().addEventListener(t, i.CTt)
                        })), i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {
                        var t = this,
                            n = this.root.getRoot();
                        $i.forEach((function(i) {
                            n.removeEventListener(i, t.CTt)
                        })), this.CTt = null, this.lSt = null
                    }, r.add = function(t, n, i, r) {
                        var e = i.videoSpec || {},
                            u = st(i.selector || e.selector, "Missing required selector on video trigger");
                        st(u.length, "Missing required selector on video trigger"), hr(u);
                        var s = i.selectionMethod || null,
                            o = this.root.getElements(t, u, s, !1),
                            a = e["end-session-when-invisible"],
                            h = e["exclude-autoplay"],
                            c = e.interval,
                            f = e.percentages,
                            l = i.on,
                            v = 0,
                            d = 0;
                        return this.lSt.add((function(t) {
                            var n = t.type,
                                i = kt(t),
                                e = function(t, n) {
                                    return t == Bi ? "video-session" : "video-hosted-custom" == t ? n["__amp:eventType"] : t
                                }(n, i);
                            if (e === l)
                                if (e !== Wi || c) {
                                    if (e !== Wi || ++v % c == 0) {
                                        if ("video-percentage-played" === e) {
                                            if (!f) return void it().error(Ki, "video-percentage-played requires percentages spec.");
                                            for (var u = 0; u < f.length; u++) {
                                                var s = f[u];
                                                if (s <= 0 || s % 5 != 0) return void it().error(Ki, "Percentages must be set in increments of %s with non-zero values", 5)
                                            }
                                            var m = i.normalizedPercentage,
                                                p = parseInt(m, 10);
                                            if (ut(N(p)), ut(p % 5 == 0), d == p && f.length > 1) return;
                                            if (f.indexOf(p) < 0) return;
                                            d = p
                                        }
                                        if ((n !== Bi || a) && (!h || "playing_auto" !== i.state)) {
                                            var b = t.target;
                                            o.then((function(t) {
                                                t.forEach((function(t) {
                                                    if (t.contains(b)) {
                                                        var n = function(t) {
                                                            if (!t) return {};
                                                            var n = Wt({}, t);
                                                            return delete n["__amp:eventType"], n
                                                        }(i);
                                                        r(new vr(t, e, n))
                                                    }
                                                }))
                                            }))
                                        }
                                    }
                                } else it().error(Ki, "video-seconds-played requires interval spec with non-zero value")
                        }))
                    }, i
                }(dr),
                Or = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).vSt = {}, i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {}, r.add = function(t, n, i, r) {
                        var e = this,
                            u = i.visibilitySpec || {},
                            s = i.selector || u.selector,
                            o = u.waitFor,
                            a = u.reportWhen,
                            h = null;
                        a && st(!u.repeat, "reportWhen and repeat are mutually exclusive."), n === Qi && (a && it().error(Ki, 'ReportWhen should not be defined when eventType is "hidden"'), a = "documentHidden");
                        var c = this.root.getVisibilityManager();
                        if ("documentHidden" == a ? h = this.dSt.bind(this) : "documentExit" == a ? h = this.mSt.bind(this) : st(!a, 'reportWhen value "%s" not supported.', a), !s || ":root" == s || ":host" == s) {
                            var f = o || (s ? "ini-load" : "none");
                            return c.listenRoot(u, this.getReadyPromise(f), h, this.pSt.bind(this, n, r, this.root.getRootElement()))
                        }
                        var l = i.selectionMethod || u.selectionMethod;
                        hr(s);
                        var v = this.root.getElements(t.parentElement || t, s, l).then((function(t) {
                            for (var i = [], s = 0; s < t.length; s++) i.push(c.listenElement(t[s], u, e.getReadyPromise(o, t[s]), h, e.pSt.bind(e, n, r, t[s])));
                            return i
                        }));
                        return function() {
                            v.then((function(t) {
                                for (var n = 0; n < t.length; n++) t[n]()
                            }))
                        }
                    }, r.dSt = function() {
                        var t = this.root.ampdoc;
                        return t.isVisible() ? new Promise((function(n) {
                            t.onVisibilityChanged((function() {
                                t.isVisible() || n()
                            }))
                        })) : e()
                    }, r.mSt = function() {
                        var t, n, i = new u,
                            r = this.root.ampdoc.win;
                        return this.bSt() || r.addEventListener("unload", t = function() {
                            r.removeEventListener("unload", t), i.resolve()
                        }), r.addEventListener("pagehide", n = function() {
                            r.removeEventListener("pagehide", n), i.resolve()
                        }), i.promise
                    }, r.bSt = function() {
                        return "onpagehide" in this.root.ampdoc.win
                    }, r.getReadyPromise = function(t, n) {
                        var i;
                        if (n && ((i = n.tagName).startsWith("AMP-") && "AMP-STICKY-AD-TOP-PADDING" != i && "AMP-BODY" != i ? t = t || "ini-load" : st(!t || "none" == t, "waitFor for non-AMP elements must be none or null. Found %s", t)), !t || "none" == t) return null;
                        var r = fr("visible");
                        st(void 0 !== r[t], "waitFor value %s not supported", t);
                        var e = this.vSt[t] || this.root.getTrackerForAllowlist(t, r);
                        return e ? (this.vSt[t] = e, n ? e.getElementSignal(t, n) : e.getRootSignal(t)) : null
                    }, r.pSt = function(t, n, i, r) {
                        var e = j(i, void 0, Yi);
                        for (var u in e) r[u] = e[u];
                        n(new vr(i, t, r, !1))
                    }, i
                }(dr),
                Nr = function() {
                    function t(t, n) {
                        this.Dr = t, this.ESt = n, this.ll = [], this.gSt = 0, this.t = P(n)
                    }
                    var n = t.prototype;
                    return n.dispose = function() {
                        this.ll.forEach((function(t) {
                            t()
                        }))
                    }, n.addTrigger = function(t, n) {
                        var i, r = this,
                            e = t.on,
                            s = cr(e),
                            o = fr(this.Dr.getType()),
                            a = this.Dr.getTrackerForAllowlist(s, o);
                        st(!!a, 'Trigger type "%s" is not allowed in the %s', e, this.Dr.getType());
                        var h = new u,
                            c = function() {
                                i = a.add(r.ESt, e, t, n), r.ll.push(i), h.resolve()
                            };
                        if (this.gSt < 1 || "inabox" == K(this.t).runtime) c();
                        else {
                            var f = this.gSt < 3 ? 20 : 10;
                            Li(this.ESt, c, f)
                        }
                        return this.gSt++, h.promise
                    }, t
                }(),
                Ir = "inside";

            function _r(t, n, i, r) {
                return {
                    left: t,
                    top: n,
                    width: i,
                    height: r,
                    bottom: n + r,
                    right: t + i,
                    x: t,
                    y: n
                }
            }

            function Rr(t, n, i) {
                var r, e, u, s = (r = {
                    top: i,
                    bottom: i + n.getHeight(),
                    left: 0,
                    right: n.getWidth()
                }, _r(Number(r.left), Number(r.top), Number(r.width), Number(r.height)));
                return u = s, (e = t).top <= u.bottom && u.top <= e.bottom && e.left <= u.right && u.left <= e.right ? Ir : function(t, n) {
                    return t.top < n.top ? "top" : t.bottom > n.bottom ? "bottom" : Ir
                }(t, s)
            }
            var Pr = function() {
                function t(t) {
                    this.ws = Ct(t.ampdoc), this.pu = at(t.ampdoc, "mutator"), this.TSt = null, this.Ia = new Gi, this.Dr = t.getRootElement(), this.ySt = null
                }
                var n = t.prototype;
                return n.dispose = function() {
                    this.Ia.removeAll(), this.wSt()
                }, n.removeScrollHandler = function(t) {
                    this.Ia.remove(t), this.Ia.getHandlerCount() <= 0 && this.wSt()
                }, n.addScrollHandler = function(t) {
                    var n = this,
                        i = this.ws.getSize();
                    return this.SSt().then((function(r) {
                        var e = r.height,
                            u = r.left,
                            s = r.top,
                            o = r.width,
                            a = {
                                top: n.ws.getScrollTop() - s,
                                left: n.ws.getScrollLeft() - u,
                                width: i.width,
                                height: i.height,
                                scrollHeight: e,
                                scrollWidth: o,
                                initialSize: {
                                    scrollHeight: e,
                                    scrollWidth: o
                                }
                            };
                        t(a)
                    })), 0 === this.Ia.getHandlerCount() && this.ASt(), this.Ia.add(t)
                }, n.IF = function(t) {
                    var n = this;
                    return Promise.all([this.SSt(), this.OSt()]).then((function(i) {
                        var r = i[0],
                            e = r.height,
                            u = r.width,
                            s = i[1],
                            o = s.height,
                            a = s.left,
                            h = s.top,
                            c = s.width,
                            f = {
                                top: t.top - h,
                                left: t.left - a,
                                width: t.width,
                                height: t.height,
                                scrollWidth: c,
                                scrollHeight: o,
                                initialSize: {
                                    scrollHeight: e,
                                    scrollWidth: u
                                }
                            };
                        n.Ia.fire(f)
                    }))
                }, n.wSt = function() {
                    this.TSt && (this.TSt(), this.TSt = null)
                }, n.ASt = function() {
                    this.TSt = this.ws.onChanged(this.IF.bind(this))
                }, n.SSt = function() {
                    return ut(this.ySt || this.OSt())
                }, n.OSt = function() {
                    var t = this,
                        n = this.pu.measureElement((function() {
                            return t.ws.getLayoutRect(t.Dr)
                        }));
                    return this.ySt = this.ySt || n, n
                }, t
            }();

            function Cr(t) {
                var n = function(t) {
                    var n = [];
                    if (!t) return n;
                    var i, r = t;
                    n.push(r);
                    for (var e = 0; e < 50; e++)
                        if ((i = r.parentNode || r.parentElement) && 1 == i.nodeType) r = i, n.push(r);
                        else {
                            if (!i || 9 != i.nodeType) break;
                            if (!(i = r.ownerDocument.defaultView.frameElement) || 1 != i.nodeType) break;
                            r = i, n.push(r)
                        }
                    return n
                }(t.parentElement);
                n.push(t);
                for (var i, r = 1, e = 0; e < n.length; e++)
                    if ((i = Mr(n[e])) < r && (r = i), 0 === r) return r;
                return r
            }

            function Mr(t) {
                var n = window;
                if (!t) return 1;
                var i = function(t, n) {
                        return t.getComputedStyle(n) || On
                    }(n, t),
                    r = i.opacity;
                if ("hidden" === i.visibility) return 0;
                var e = "" === r ? 1 : parseFloat(r);
                return isNaN(e) ? 1 : e
            }
            var Dr = function() {
                function t(t, n) {
                    var i = this;
                    this.NSt = n, this.ISt = {
                        "visiblePercentageMin": Number(t.visiblePercentageMin) / 100 || 0,
                        "visiblePercentageMax": Number(t.visiblePercentageMax) / 100 || 1,
                        "totalTimeMin": Number(t.totalTimeMin) || 0,
                        "totalTimeMax": Number(t.totalTimeMax) || 1 / 0,
                        "continuousTimeMin": Number(t.continuousTimeMin) || 0,
                        "continuousTimeMax": Number(t.continuousTimeMax) || 1 / 0
                    }, "0" === String(t.visiblePercentageMax).trim() && (this.ISt.visiblePercentageMax = 0), this._St = void 0 !== t.reportWhen, this.RSt = !0 === t.repeat, this.PSt = new Gi;
                    var r = new u;
                    this.CSt = r.promise, this.MSt = r.resolve, this.CSt.then((function() {
                        i.PSt.fire()
                    })), this.DSt = [], this.LSt = Date.now(), this.Kt = !0, this.kSt = !0, this.xSt = null, this.USt = null, this.jSt = !1, this.HSt = !1, this.FSt = 0, this.VSt = 0, this.qSt = 0, this.GSt = 0, this.BSt = 0, this.Po = 0, this.Lt = 0, this.WSt = 0, this.$St = 0, this.YSt = 0, this.zSt = 0, this.KSt = 0, this.JSt = !1, this.XSt = !1, this.ZSt = null
                }
                var n = t.prototype;
                return n.Cn = function() {
                    var t = this;
                    ut(!this.MSt);
                    var n = new u;
                    this.CSt = n.promise, this.MSt = n.resolve, this.CSt.then((function() {
                        t.PSt.fire()
                    })), this.ZSt = null, this.HSt = !1, this.jSt = !1, this.FSt = 0, this.VSt = 0, this.qSt = 0, this.Po = 0, this.GSt = 0, this.BSt = 0, this.Lt = 0, this.$St = 0, this.YSt = 0, this.zSt = 0, this.XSt = !1
                }, n.maybeDispose = function() {
                    this.RSt || this.dispose()
                }, n.dispose = function() {
                    this.USt && (clearTimeout(this.USt), this.USt = null), this.ZSt && (clearTimeout(this.ZSt), this.ZSt = null), this.DSt.forEach((function(t) {
                        t()
                    })), this.DSt.length = 0, this.MSt = null, this.PSt && (this.PSt.removeAll(), this.PSt = null)
                }, n.unsubscribe = function(t) {
                    this.DSt.push(t)
                }, n.onTriggerEvent = function(t) {
                    this.PSt && this.PSt.add(t), this.CSt && !this.MSt && t()
                }, n.setReady = function(t) {
                    this.Kt = t, this.update()
                }, n.setReportReady = function(t) {
                    this.kSt = !1, this.xSt = t
                }, n.QSt = function() {
                    return this.Kt ? this.NSt() : 0
                }, n.update = function() {
                    this.Jf(this.QSt())
                }, n.getState = function(t) {
                    return {
                        "firstSeenTime": Lr(this.GSt, t),
                        "lastSeenTime": Lr(this.BSt, t),
                        "lastVisibleTime": Lr(this.Lt, t),
                        "firstVisibleTime": Lr(this.Po, t),
                        "maxContinuousVisibleTime": this.VSt,
                        "totalVisibleTime": this.qSt,
                        "loadTimeVisibility": 100 * this.WSt || 0,
                        "minVisiblePercentage": 100 * this.$St,
                        "maxVisiblePercentage": 100 * this.YSt
                    }
                }, n.Jf = function(t) {
                    var n = this;
                    if (this.XSt) this.iAt(t) || this.Cn();
                    else if (this.MSt)
                        if (this.rAt(t) || this._St) {
                            if (this.USt && (clearTimeout(this.USt), this.USt = null), this.kSt) this.MSt(), this.MSt = null, this.RSt && (this.XSt = !0, this.FSt = 0);
                            else if (this.xSt) {
                                var i = this.xSt();
                                this.xSt = null, i.then((function() {
                                    n.kSt = !0, n.update()
                                }))
                            }
                        } else if (this.jSt && !this.USt) {
                        var r = this.eAt();
                        r > 0 && (this.USt = setTimeout((function() {
                            n.USt = null, n.update()
                        }), r))
                    } else !this.jSt && this.USt && (clearTimeout(this.USt), this.USt = null)
                }, n.iAt = function(t) {
                    return ut(t >= 0 && t <= 1), 1 == this.ISt.visiblePercentageMin ? 1 == t : 0 == this.ISt.visiblePercentageMax ? 0 == t : t > this.ISt.visiblePercentageMin && t <= this.ISt.visiblePercentageMax
                }, n.rAt = function(t) {
                    ut(t >= 0 && t <= 1);
                    var n = Date.now();
                    t > 0 && (this.GSt = this.GSt || n, this.BSt = n, !this.WSt && n - this.LSt < 300 && (this.WSt = t));
                    var i = this.jSt,
                        r = this.zSt ? n - this.zSt : 0;
                    return this.jSt = this.iAt(t), this.jSt ? (this.HSt = !0, i ? (this.qSt += r, this.FSt += r, this.VSt = Math.max(this.VSt, this.FSt)) : (ut(!this.zSt), this.Po = this.Po || n), this.zSt = n, this.$St = this.$St > 0 ? Math.min(this.$St, t) : t, this.YSt = Math.max(this.YSt, t), this.Lt = n) : i && (ut(this.zSt > 0), this.VSt = Math.max(this.VSt, this.FSt + r), this.zSt = 0, this.qSt += r, this.FSt = 0, this.Lt = n), this.HSt && this.qSt >= this.ISt.totalTimeMin && this.qSt <= this.ISt.totalTimeMax && this.VSt >= this.ISt.continuousTimeMin && this.VSt <= this.ISt.continuousTimeMax
                }, n.maybeSetInitialScrollDepth = function(t) {
                    this.JSt || (this.KSt = t, this.JSt = !0)
                }, n.getInitialScrollDepth = function() {
                    return this.KSt
                }, n.eAt = function() {
                    var t = Math.max(this.ISt.continuousTimeMin - this.FSt, 0),
                        n = Math.max(this.ISt.totalTimeMin - this.qSt, 0),
                        i = Math.max(t, n);
                    return Math.min(i, t || 1 / 0, n || 1 / 0)
                }, t
            }();

            function Lr(t, n) {
                return t >= n ? t - n : 0
            }
            var kr = "amp-analytics/visibility-manager",
                xr = "__AMP_VIS",
                Ur = [0, .05, .1, .15, .2, .25, .3, .35, .4, .45, .5, .55, .6, .65, .7, .75, .8, .85, .9, .95, 1],
                jr = 1;

            function Hr(t) {
                var n = t.__AMP_VIS_ID;
                return n || (n = ++jr, t.__AMP_VIS_ID = n), n
            }

            function Fr(t) {
                return t[xr] || (t[xr] = function(t) {
                    var n = St(t),
                        i = vt(t),
                        r = i && kn(i),
                        e = i && function(t) {
                            if (Node.prototype.getRootNode) return t.getRootNode();
                            var n, i;
                            for (n = t; n.parentNode && (!(i = n) || "I-AMPHTML-SHADOW-ROOT" != i.tagName && (11 != i.nodeType || "[object ShadowRoot]" !== Object.prototype.toString.call(i))); n = n.parentNode);
                            return n
                        }(i);
                    return r && e ? new Gr(Fr(e), r) : new qr(n)
                }(t)), t[xr]
            }
            var Vr = function() {
                    function t(t, n) {
                        var i = this;
                        this.parent = t, this.ampdoc = n, this.uAt = 0, this.sAt = [], this.tZ = null, this.DSt = [], this.oAt = 0, this.parent && this.parent.aAt(this);
                        var r = Ct(this.ampdoc);
                        r.onChanged((function() {
                            i.maybeUpdateMaxScrollDepth(r.getScrollTop())
                        }))
                    }
                    var n = t.prototype;
                    return n.aAt = function(t) {
                        this.tZ || (this.tZ = []), this.tZ.push(t)
                    }, n.hAt = function(t) {
                        if (this.tZ) {
                            var n = this.tZ.indexOf(t); - 1 != n && this.tZ.splice(n, 1)
                        }
                    }, n.dispose = function() {
                        this.setRootVisibility(0);
                        for (var t = this.sAt.length - 1; t >= 0; t--) this.sAt[t].dispose();
                        if (this.DSt.forEach((function(t) {
                                t()
                            })), this.DSt.length = 0, this.parent && this.parent.hAt(this), this.tZ)
                            for (var n = 0; n < this.tZ.length; n++) this.tZ[n].dispose()
                    }, n.unsubscribe = function(t) {
                        this.DSt.push(t)
                    }, n.getStartTime = function() {}, n.isBackgrounded = function() {}, n.isBackgroundedAtStart = function() {}, n.getRootMinOpacity = function() {}, n.getRootLayoutBox = function() {}, n.getRootVisibility = function() {
                        return this.parent ? this.parent.getRootVisibility() > 0 ? this.uAt : 0 : this.uAt
                    }, n.setRootVisibility = function(t) {
                        if (this.uAt = t, this.cAt(), this.tZ)
                            for (var n = 0; n < this.tZ.length; n++) this.tZ[n].cAt()
                    }, n.maybeUpdateMaxScrollDepth = function(t) {
                        t > this.oAt && (this.oAt = t)
                    }, n.getMaxScrollDepth = function() {
                        return this.oAt
                    }, n.cAt = function() {
                        for (var t = 0; t < this.sAt.length; t++) this.sAt[t].update()
                    }, n.listenRoot = function(t, n, i, r) {
                        var e = this.getRootVisibility.bind(this);
                        return this.fAt(e, t, n, i, r)
                    }, n.listenElement = function(t, n, i, r, e) {
                        var u = this.getElementVisibility.bind(this, t);
                        return this.fAt(u, n, i, r, e, t)
                    }, n.fAt = function(t, n, i, r, e, u) {
                        if (n.visiblePercentageThresholds && null == n.visiblePercentageMin && null == n.visiblePercentageMax) {
                            var s = [],
                                o = n.visiblePercentageThresholds;
                            if (!o || !d(o)) return it().error(kr, "invalid visiblePercentageThresholds"),
                                function() {};
                            for (var a = 0; a < o.length; a++) {
                                var h = o[a];
                                if (d(h) && 2 == h.length)
                                    if (N(h[0]) && N(h[1])) {
                                        var c = Number(h[0]),
                                            f = Number(h[1]);
                                        if (c < 0 || f > 100 || c > f || c == f && 100 != c && 0 != f) it().error(kr, "visiblePercentageThresholds entry invalid min/max value");
                                        else {
                                            var l = n;
                                            l.visiblePercentageMin = c, l.visiblePercentageMax = f;
                                            var v = new Dr(l, t, Ct(this.ampdoc));
                                            s.push(this.NT(v, n, i, r, e, u))
                                        }
                                    } else it().error(kr, "visiblePercentageThresholds entry is not valid number");
                                else it().error(kr, "visiblePercentageThresholds entry length is not 2")
                            }
                            return function() {
                                s.forEach((function(t) {
                                    return t()
                                }))
                            }
                        }
                        var m = new Dr(n, t, Ct(this.ampdoc));
                        return this.NT(m, n, i, r, e, u)
                    }, n.NT = function(t, n, i, r, e, u) {
                        var s = this;
                        r && t.setReportReady(r);
                        var o = Ct(this.ampdoc),
                            a = o.getScrollTop();
                        return this.maybeUpdateMaxScrollDepth(a), i ? (t.setReady(!1), i.then((function() {
                                t.setReady(!0), t.maybeSetInitialScrollDepth(a)
                            }))) : t.maybeSetInitialScrollDepth(a), t.onTriggerEvent((function() {
                                var n, i = s.getStartTime(),
                                    r = t.getState(i);
                                if (r.backgrounded = s.isBackgrounded() ? 1 : 0, r.backgroundedAtStart = s.isBackgroundedAtStart() ? 1 : 0, r.totalTime = Date.now() - i, u) {
                                    r.elementId = u.id, r.opacity = Cr(u), n = o.getLayoutRect(u);
                                    var a = s.getElementVisibility(u),
                                        h = s.getElementIntersectionRect(u);
                                    Object.assign(r, {
                                        "intersectionRatio": a,
                                        "intersectionRect": JSON.stringify(h)
                                    })
                                } else r.opacity = s.getRootMinOpacity(), r.intersectionRatio = s.getRootVisibility(), n = s.getRootLayoutBox();
                                t.maybeDispose(), n && (Object.assign(r, {
                                    "elementX": n.left,
                                    "elementY": n.top,
                                    "elementWidth": n.width,
                                    "elementHeight": n.height
                                }), r.initialScrollDepth = Rr(n, o, t.getInitialScrollDepth()), r.maxScrollDepth = Rr(n, o, s.getMaxScrollDepth())), e(r)
                            })), this.sAt.push(t), t.unsubscribe((function() {
                                var n = s.sAt.indexOf(t); - 1 != n && s.sAt.splice(n, 1)
                            })), u && t.unsubscribe(this.observe(u, (function() {
                                return t.update()
                            }))), t.update(),
                            function() {
                                t.dispose()
                            }
                    }, n.observe = function(t, n) {}, n.getElementVisibility = function(t) {}, n.getElementIntersectionRect = function(t) {}, t
                }(),
                qr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        if ((i = n.call(this, null, t)).ws = Ct(t), i.lAt = !t.isVisible(), i.vAt = i.isBackgrounded(), i.dAt = S(), i.Qg = null, "inabox" == K(i.ampdoc.win).runtime) {
                            var r = i.ampdoc.getRootNode(),
                                e = r.documentElement || r.body || r;
                            i.unsubscribe(i.observe(e, i.setRootVisibility.bind(f(i))));
                            var u = function() {
                                var t = Hr(e),
                                    n = i.dAt[t];
                                n && (i.ampdoc.win.innerHeight < 1 || i.ampdoc.win.innerWidth < 1 ? n.isVisible = !1 : n.isVisible = !0, i.setRootVisibility(n.isVisible ? n.intersectionRatio : 0))
                            };
                            i.ampdoc.win.addEventListener("resize", u), i.unsubscribe((function() {
                                i.ampdoc.win.removeEventListener("resize", u)
                            }))
                        } else i.setRootVisibility(i.ampdoc.isVisible() ? 1 : 0), i.unsubscribe(i.ampdoc.onVisibilityChanged((function() {
                            var t = i.ampdoc.isVisible();
                            t || (i.lAt = !0), i.setRootVisibility(t ? 1 : 0)
                        })));
                        return i
                    }
                    var r = i.prototype;
                    return r.dispose = function() {
                        t.prototype.dispose.call(this), this.Qg && (this.Qg.disconnect(), this.Qg = null)
                    }, r.getStartTime = function() {
                        return this.ampdoc.getFirstVisibleTime()
                    }, r.isBackgrounded = function() {
                        return this.lAt
                    }, r.isBackgroundedAtStart = function() {
                        return this.vAt
                    }, r.getRootMinOpacity = function() {
                        var t = this.ampdoc.getRootNode();
                        return Cr(t.documentElement || t.body || t)
                    }, r.getRootLayoutBox = function() {
                        var t = this.ampdoc.getRootNode(),
                            n = t.documentElement || t.body || t;
                        return this.ws.getLayoutRect(n)
                    }, r.observe = function(t, n) {
                        var i = this,
                            r = Hr(t),
                            e = this.dAt[r];
                        return e ? e.intersectionRatio > 0 && e.isVisible && n(e.intersectionRatio) : (e = {
                                element: t,
                                intersectionRatio: 0,
                                intersectionRect: null,
                                isVisible: !1,
                                boundingClientRect: null,
                                listeners: []
                            }, this.dAt[r] = e), e.listeners.push(n), this.mAt().observe(t),
                            function() {
                                var e = i.dAt[r];
                                if (e) {
                                    var u = e.listeners.indexOf(n); - 1 != u && e.listeners.splice(u, 1), 0 == e.listeners.length && (i.Qg.unobserve(t), delete i.dAt[r])
                                }
                            }
                    }, r.getElementVisibility = function(t) {
                        if (0 == this.getRootVisibility()) return 0;
                        var n = Hr(t),
                            i = this.dAt[n];
                        return i && i.isVisible && i.intersectionRatio || 0
                    }, r.getElementIntersectionRect = function(t) {
                        if (this.getElementVisibility(t) <= 0) return null;
                        var n = Hr(t),
                            i = this.dAt[n];
                        return i ? i.intersectionRect : null
                    }, r.mAt = function() {
                        if (!this.Qg) {
                            var t = this.ampdoc.win;
                            this.Qg = new t.IntersectionObserver(this.pAt.bind(this), {
                                threshold: Ur
                            })
                        }
                        return this.Qg
                    }, r.pAt = function(t) {
                        var n = this;
                        t.forEach((function(t) {
                            var i = t.intersectionRect;
                            i = _r(Number(i.left), Number(i.top), Number(i.width), Number(i.height));
                            var r = t.boundingClientRect;
                            r = r && _r(Number(r.left), Number(r.top), Number(r.width), Number(r.height)), n.bAt(t.target, t.intersectionRatio, i, r)
                        }))
                    }, r.bAt = function(t, n, i, r) {
                        n = Math.min(Math.max(n, 0), 1);
                        var e = Hr(t),
                            u = this.dAt[e],
                            s = !0;
                        if ((r.width < 1 || r.height < 1) && (s = !1), u) {
                            u.isVisible = s, u.intersectionRatio = n, u.intersectionRect = i, u.boundingClientRect = r;
                            for (var o = 0; o < u.listeners.length; o++) u.listeners[o](u.isVisible ? n : 0)
                        }
                    }, i
                }(Vr),
                Gr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t, i) {
                        var r;
                        return (r = n.call(this, t, t.ampdoc)).embed = i, r.vAt = r.parent.isBackgrounded(), r.unsubscribe(r.parent.observe(i.host, r.setRootVisibility.bind(f(r)))), r
                    }
                    var r = i.prototype;
                    return r.getStartTime = function() {
                        return this.embed.getStartTime()
                    }, r.isBackgrounded = function() {
                        return this.parent.isBackgrounded()
                    }, r.isBackgroundedAtStart = function() {
                        return this.vAt
                    }, r.getRootMinOpacity = function() {
                        return Cr(this.embed.iframe)
                    }, r.getRootLayoutBox = function() {
                        var t = this.embed.iframe;
                        return Ct(this.ampdoc).getLayoutRect(t)
                    }, r.observe = function(t, n) {
                        return this.parent.observe(t, n)
                    }, r.getElementVisibility = function(t) {
                        return 0 == this.getRootVisibility() ? 0 : this.parent.getElementVisibility(t)
                    }, r.getElementIntersectionRect = function(t) {
                        return 0 == this.getRootVisibility() ? null : this.parent.getElementIntersectionRect(t)
                    }, i
                }(Vr),
                Br = ["AMP-AD", "AMP-ANALYTICS", "AMP-PIXEL", "AMP-AD-EXIT"];
            var Wr = "amp-analytics/analytics-root",
                $r = /^vars(.+)/,
                Yr = function() {
                    function t(t) {
                        this.ampdoc = t, this.eSt = S(), this.EAt = null, this.gAt = null
                    }
                    var n = t.prototype;
                    return n.dispose = function() {
                        for (var t in this.eSt) this.eSt[t].dispose(), delete this.eSt[t];
                        this.EAt && this.EAt.dispose(), this.gAt && this.gAt.dispose()
                    }, n.getType = function() {}, n.getRoot = function() {}, n.getRootElement = function() {
                        var t = this.getRoot();
                        return t.host || t.documentElement || t.body || t
                    }, n.getHostElement = function() {}, n.signals = function() {}, n.contains = function(t) {
                        return this.getRoot().contains(t)
                    }, n.getElementById = function(t) {}, n.getTrackerForAllowlist = function(t, n) {
                        var i = n[t];
                        return i ? this.getTracker(t, i) : null
                    }, n.getTracker = function(t, n) {
                        var i = this.eSt[t];
                        return i || (i = new n(this), this.eSt[t] = i), i
                    }, n.getTrackerOptional = function(t) {
                        return this.eSt[t] || null
                    }, n.getElement = function(t, n) {
                        var i = this,
                            r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
                        return ":root" == n ? s((function() {
                            return i.getRootElement()
                        })) : ":host" == n ? new Promise((function(t) {
                            t(it().assertElement(i.getHostElement(), 'Element "'.concat(n, '" not found')))
                        })) : this.ampdoc.whenReady().then((function() {
                            var e, u = null;
                            try {
                                e = "scope" == r ? L(t, n) : "closest" == r ? x(t, n) : i.getRoot().querySelector(n)
                            } catch (t) {
                                st(!1, "Invalid query selector ".concat(n))
                            }
                            return e && i.contains(e) && (u = e), it().assertElement(u, 'Element "'.concat(n, '" not found'))
                        }))
                    }, n.TAt = function(t) {
                        var n = this,
                            i = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
                        return this.ampdoc.whenReady().then((function() {
                            for (var r = [], e = 0; e < t.length; e++) {
                                var u = void 0,
                                    s = [],
                                    o = t[e];
                                try {
                                    u = n.getRoot().querySelectorAll(o)
                                } catch (t) {
                                    st(!1, "Invalid query selector ".concat(o))
                                }
                                for (var a = 0; a < u.length; a++) n.contains(u[a]) && s.push(u[a]);
                                st((s = i ? n.yAt(s, o) : s).length, 'Element "'.concat(o, '" not found')), r = r.concat(s)
                            }
                            return r.filter((function(t, n) {
                                return r.indexOf(t) === n
                            }))
                        }))
                    }, n.yAt = function(t, n) {
                        for (var i = 0, r = [], e = 0; e < t.length; e++) Object.keys(j(t[e], void 0, $r)).length ? r.push(t[e]) : i++;
                        return i && it().warn(Wr, '%s element(s) ommited from selector "%s" because no data-vars-* attribute was found.', i, n), r
                    }, n.getAmpElement = function(t, n, i) {
                        var r = this;
                        return this.getElement(t, n, i).then((function(t) {
                            return r.wAt([t], n), t
                        }))
                    }, n.getElements = function(t, n, i) {
                        var r = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
                        return d(n) ? (st(!i, "Cannot have selectionMethod %s defined with an array selector.", i), this.TAt(n, r)) : this.getElement(t, n, i).then((function(t) {
                            return [t]
                        }))
                    }, n.wAt = function(t, n) {
                        for (var i = 0; i < t.length; i++) st(t[i].classList.contains("i-amphtml-element"), 'Element "%s" is required to be an AMP element', n)
                    }, n.createSelectiveListener = function(t, n, i) {
                        var r = this,
                            e = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null;
                        return function(u) {
                            if (":host" != i)
                                for (var s = r.getRootElement(), o = "*" == i, a = ":root" == i, h = u.target; h && r.contains(h) && ("scope" != e || a || n.contains(h));)
                                    if ("closest" != e || h.contains(n)) {
                                        if (o || a && h == s || Jr(h, i)) {
                                            t(h, u);
                                            break
                                        }
                                        h = h.parentElement
                                    } else h = h.parentElement
                        }
                    }, n.whenIniLoaded = function() {}, n.getVisibilityManager = function() {
                        return this.EAt || (this.EAt = Fr(this.getRoot())), this.EAt
                    }, n.getScrollManager = function() {
                        return this.gAt || (this.gAt = new Pr(this)), this.gAt
                    }, t
                }(),
                zr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        return n.call(this, t)
                    }
                    var r = i.prototype;
                    return r.getType = function() {
                        return "ampdoc"
                    }, r.getRoot = function() {
                        return this.ampdoc.getRootNode()
                    }, r.getHostElement = function() {
                        return null
                    }, r.signals = function() {
                        return this.ampdoc.signals()
                    }, r.getElementById = function(t) {
                        return this.ampdoc.getElementById(t)
                    }, r.whenIniLoaded = function() {
                        var t, n, i = Ct(this.ampdoc);
                        if ("inabox" == K(this.ampdoc.win).runtime) i.getLayoutRect(this.getRootElement());
                        else {
                            var r = i.getSize();
                            _r(0, 0, r.width, r.height)
                        }
                        return t = this.ampdoc, this.ampdoc.win,
                            function(t, n) {
                                var i = St(t);
                                return i.signals().whenSignal("ready-scan").then((function() {
                                    var t = function(t) {
                                        return at(t, "resources")
                                    }(i).get().filter((function(t) {
                                        return !(n && !t.prerenderAllowed() || Br.includes(t.element.tagName))
                                    })).map((function(t) {
                                        return t.element
                                    }));
                                    return 0 === t.length ? Promise.resolve([]) : new Promise((function(n) {
                                        for (var r = i.win, e = new r.IntersectionObserver((function(t) {
                                                e.disconnect();
                                                for (var i = [], r = 0; r < t.length; r++) {
                                                    var u = t[r],
                                                        s = u.isIntersecting,
                                                        o = u.target;
                                                    s && i.push(o)
                                                }
                                                n(i)
                                            }), {
                                                root: H(r) ? r.document : null,
                                                threshold: .01
                                            }), u = 0; u < Math.min(t.length, 100); u++) e.observe(t[u])
                                    })).then((function(t) {
                                        return Promise.all(t.map((function(t) {
                                            return t.whenLoaded()
                                        })))
                                    }))
                                }))
                            }(t, n)
                    }, i
                }(Yr),
                Kr = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t, i) {
                        var r;
                        return (r = n.call(this, t)).embed = i, r
                    }
                    var r = i.prototype;
                    return r.getType = function() {
                        return "embed"
                    }, r.getRoot = function() {
                        return this.embed.win.document
                    }, r.getHostElement = function() {
                        return this.embed.iframe
                    }, r.signals = function() {
                        return this.embed.signals()
                    }, r.getElementById = function(t) {
                        return this.embed.win.document.getElementById(t)
                    }, r.whenIniLoaded = function() {
                        return this.embed.whenIniLoaded()
                    }, i
                }(Yr);

            function Jr(t, n) {
                try {
                    return k(t, n)
                } catch (t) {
                    return it().error(Wr, "Bad query selector.", n, t), !1
                }
            }
            var Xr = "__AMP_AN_ROOT",
                Zr = function() {
                    function t(t) {
                        this.ampdoc = t, this.Dr = this.SAt(t.getRootNode())
                    }
                    var n = t.prototype;
                    return n.dispose = function() {
                        this.Dr.dispose()
                    }, n.getAnalyticsRoot = function(t) {
                        return this.SAt(t)
                    }, n.createAnalyticsGroup = function(t) {
                        var n = this.SAt(t);
                        return new Nr(n, t)
                    }, n.AAt = function(t) {
                        return t === rr ? br : pr
                    }, n.triggerEventForTarget = function(t, n) {
                        var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
                            r = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3],
                            e = new vr(t, n, i, r),
                            u = this.SAt(t),
                            s = cr(n),
                            o = u.getTracker(s, this.AAt(s));
                        o.trigger(e)
                    }, n.SAt = function(t) {
                        var n = St(t),
                            i = vt(t),
                            r = i && kn(i);
                        return n == this.ampdoc && !r && this.Dr ? this.Dr : this.OAt(r || n, (function() {
                            return r ? new Kr(n, r) : new zr(n)
                        }))
                    }, n.OAt = function(t, n) {
                        var i = t[Xr];
                        return i || (i = n(), t[Xr] = i), i
                    }, t
                }(),
                Qr = "amp-analytics/linker-manager",
                te = function() {
                    function t(t, n, i, r) {
                        this.xi = t, this._U = n.linkers, this._G = n.vars || {}, this.uI = i, this.zl = r, this.NAt = {}, this.pA = Pt(this.zl), this.EQ = ct(t, "form-submit-service"), this.IAt = null, this.cA = Ti(this.xi), this._At = null
                    }
                    var n = t.prototype;
                    return n.init = function() {
                        var t = this;
                        if (!w(this._U)) return e();
                        this._At = Tn(this.xi.win), this._U = this.RAt(this._U);
                        var n = Object.keys(this._U).map((function(n) {
                            var i = t._U[n].ids,
                                r = Object.keys(i),
                                e = r.map((function(n) {
                                    var r = new fi(t._G, void 0, !0);
                                    return t.PAt(i[n], r)
                                }));
                            return Promise.all(e).then((function(i) {
                                var e = {};
                                return i.forEach((function(t, n) {
                                    t && (e[r[n]] = t)
                                })), t.NAt[n] = e, e
                            }))
                        }));
                        if (n.length) {
                            var i = at(this.xi, "navigation");
                            i.registerAnchorMutator((function(n, i) {
                                n.href && "click" === i.type && (n.href = t.CAt(n.href))
                            }), 2), i.registerNavigateToMutator((function(n) {
                                return t.CAt(n)
                            }), 2)
                        }
                        return this.MAt(), Promise.all(n)
                    }, n.dispose = function() {
                        this.IAt && this.IAt()
                    }, n.RAt = function(t) {
                        var n = {},
                            i = {
                                enabled: this.DAt() && this.LAt()
                            },
                            r = Object.keys(t).filter((function(n) {
                                var r = t[n],
                                    e = w(r);
                                return e || (i[n] = r), e
                            })),
                            e = jn.getLocation(this.xi.win),
                            u = this.pA.isProxyOrigin(e);
                        return r.forEach((function(r) {
                            var e = Wt(Wt({}, i), t[r]);
                            !0 === e.enabled ? (u || !1 === e.proxyOnly) && (e.ids ? n[r] = e : it().error(Qr, '"ids" is a required field for use of "linkers".')) : it().info(Qr, "linker config for %s is not enabled and will be ignored.", r)
                        })), n
                    }, n.PAt = function(t, n) {
                        var i = this,
                            r = this.cA.getMacros(this.zl);
                        return this.cA.expandTemplate(t, n, this.zl).then((function(t) {
                            return _t(i.zl).expandUrlAsync(t, r)
                        }))
                    }, n.DAt = function() {
                        return "googleanalytics" === this.uI && "googleanalytics" === this.xi.getMetaByName("amp-google-client-id-api") && this.xi.registerSingleton(2)
                    }, n.LAt = function() {
                        var t = ot(this.xi.win, "platform");
                        return t.isSafari() && t.getMajorVersion() >= 12
                    }, n.CAt = function(t) {
                        var n = this._U;
                        for (var i in n) this.NAt[i] && (t = this.kAt(t, i, n[i]));
                        return t
                    }, n.kAt = function(t, n, i) {
                        var r = this.pA.parse(t);
                        if (this.xAt(r, n, i) && this.UAt(r)) {
                            var e = Gn("1", this.NAt[n]);
                            if (e) {
                                var u = {};
                                return u[n] = e,
                                    function(t, n) {
                                        for (var i = $(on(t).search), r = {}, e = Object.keys(n), u = 0; u < e.length; u++) A(i, e[u]) || (r[e[u]] = n[e[u]]);
                                        return function(t, n) {
                                            return an(t, cn(n))
                                        }(t, r)
                                    }(t, u)
                            }
                        }
                        return t
                    }, n.xAt = function(t, n, i) {
                        var r = i.destinationDomains,
                            e = t.hostname,
                            u = jn.getHostname(this.xi.win),
                            s = i.sameDomainEnabled;
                        if (!Boolean(s) && u === e) return !1;
                        if (r && !Array.isArray(r)) return it().warn(Qr, "%s destinationDomains must be an array.", n), !1;
                        if (r) return this.jAt(r, e);
                        var o = at(this.xi, "documentInfo").get(),
                            a = o.canonicalUrl,
                            h = o.sourceUrl,
                            c = ne(this.pA.parse(a).hostname, e);
                        if (this._At) {
                            var f = [this._At, "*" + this._At];
                            return this.jAt(f, e) || c
                        }
                        return ne(this.pA.parse(h).hostname, e) || c
                    }, n.UAt = function(t) {
                        return "https:" === t.protocol || "http:" === t.protocol
                    }, n.jAt = function(t, n) {
                        for (var i = 0; i < t.length; i++) {
                            var r = t[i];
                            if (r === n) return !0;
                            if (-1 !== r.indexOf("*") && re(n, r)) return !0
                        }
                        return !1
                    }, n.MAt = function() {
                        var t = this;
                        this.IAt || this.EQ.then((function(n) {
                            t.IAt = n.beforeSubmit(t.HAt.bind(t))
                        }))
                    }, n.HAt = function(t) {
                        var n = t.actionXhrMutator,
                            i = t.form;
                        for (var r in this._U) {
                            var e = this._U[r],
                                u = i.getAttribute("action-xhr") || i.getAttribute("action"),
                                s = this.pA.parse(u);
                            this.xAt(s, r, e) && this.FAt(i, n, r)
                        }
                    }, n.FAt = function(t, n, i) {
                        var r = this.NAt[i];
                        if (r) {
                            var e = Gn("1", r),
                                u = t.getAttribute("action-xhr");
                            if (u) return n(an(u, hn(i, e), void 0));
                            this.VAt(t, i, e)
                        }
                    }, n.VAt = function(t, n, i) {
                        var r = {
                                "type": "hidden",
                                "name": n,
                                "value": i
                            },
                            e = U(t.ownerDocument, "input", r);
                        t.appendChild(e)
                    }, t
                }();

            function ne(t, n) {
                return ie(t) === ie(n)
            }

            function ie(t) {
                return t.replace(/^(?:www\.|m\.|amp\.)+/, "")
            }

            function re(t, n) {
                var i = n.replace(/[-\/\\^$+?.()|[\]{}]/g, "\\$&").replace(/\*/g, ".*");
                return new RegExp("^" + i + "$").test(t)
            }
            var ee = {
                    "AMPDOC_HOST": !0,
                    "AMPDOC_HOSTNAME": !0,
                    "AMPDOC_URL": !0,
                    "AMP_VERSION": !0,
                    "AVAILABLE_SCREEN_HEIGHT": !0,
                    "AVAILABLE_SCREEN_WIDTH": !0,
                    "BACKGROUND_STATE": !0,
                    "BROWSER_LANGUAGE": !0,
                    "CANONICAL_HOST": !0,
                    "CANONICAL_HOSTNAME": !0,
                    "CANONICAL_PATH": !0,
                    "CANONICAL_URL": !0,
                    "DOCUMENT_CHARSET": !0,
                    "FIRST_CONTENTFUL_PAINT": !0,
                    "FIRST_VIEWPORT_READY": !0,
                    "MAKE_BODY_VISIBLE": !0,
                    "RANDOM": !0,
                    "SCREEN_COLOR_DEPTH": !0,
                    "SCREEN_HEIGHT": !0,
                    "SCREEN_WIDTH": !0,
                    "SOURCE_HOST": !0,
                    "SOURCE_HOSTNAME": !0,
                    "SOURCE_PATH": !0,
                    "SOURCE_URL": !0,
                    "TIMESTAMP": !0,
                    "TIMEZONE": !0,
                    "TIMEZONE_CODE": !0,
                    "USER_AGENT": !0,
                    "VIEWPORT_HEIGHT": !0,
                    "VIEWPORT_WIDTH": !0
                },
                ue = "${extraUrlParams}",
                se = function() {
                    function t() {}
                    var n = t.prototype;
                    return n.generateRequest = function(t, n) {
                        var i = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
                        return i ? {
                            url: t.replace(ue, ""),
                            payload: JSON.stringify(n.extraUrlParams)
                        } : {
                            url: ae(t, [n])
                        }
                    }, n.generateBatchRequest = function(t, n) {
                        var i = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
                        return i ? {
                            url: t.replace(ue, ""),
                            payload: JSON.stringify(n.map((function(t) {
                                return t.extraUrlParams
                            })))
                        } : {
                            url: ae(t, n)
                        }
                    }, t
                }(),
                oe = {
                    "default": new se
                };

            function ae(t, n) {
                var i = n.map((function(t) {
                    return cn(t.extraUrlParams)
                })).filter(Boolean).join("&");
                return t.indexOf(ue) >= 0 ? t.replace(ue, i) : an(t, i)
            }
            var he = function() {
                function t(t, n, i, r, e) {
                    this.zl = t, this.xi = t.getAmpDoc(), this.win = this.xi.win, this.qAt = n.origin, this.baseUrl = ut(n.baseUrl), this.GAt = n.batchInterval, this.BAt = Number(n.reportWindow) || null, this.WAt = null, this.cA = Ti(t), this.oU = _t(t), this.pA = Pt(t), this.$At = null, this.YAt = null, this.zAt = [], this.KAt = i, this.mN = r, this.zr = e ? ee : void 0, this.JAt = null, this.XAt = null, this.ZAt = !0, this.QAt = null, this.K5 = 0, this.ih = Date.now(), this.tOt(), this.nOt()
                }
                var n = t.prototype;
                return n.send = function(t, n, i) {
                    var r = !0 === n.important;
                    if (this.ZAt || r) {
                        this.K5++, this.QAt = n;
                        var e, u, s, o = this.cA.getMacros(this.zl);
                        if (o.RESOURCE_TIMING = (e = this.zl, u = n.resourceTimingSpec, s = this.ih, u && Date.now() < s + 6e4 ? function(t, n) {
                                var i, r = t.getAmpDoc().win;
                                if (n.done || !r.performance || !r.performance.now || !r.performance.getEntriesByType || !(w((i = n).resources) ? i.encoding && i.encoding.entry && i.encoding.delim ? i.encoding.base < 2 || i.encoding.base > 36 ? (it().warn("ANALYTICS", "resource timing variables only supports bases between 2 and 36"), 0) : null == i.responseAfter || "number" == typeof i.responseAfter || (it().warn("ANALYTICS", 'resourceTimingSpec["responseAfter"] must be a number'), 0) : (it().warn("ANALYTICS", "resourceTimingSpec is missing or has incomplete encoding options"), 0) : (it().warn("ANALYTICS", 'resourceTimingSpec missing "resources" field'), 0))) return n.done = !0, Promise.resolve("");
                                var e = function(t) {
                                    return t.performance.getEntriesByType("resource")
                                }(r);
                                e.length >= 150 && (n.done = !0);
                                var u, s = n.responseAfter || 0;
                                return n.responseAfter = Math.max(s, r.performance.now()), (e = e.filter((function(t) {
                                    return t.startTime + t.duration >= s
                                }))).length ? (u = function() {
                                    return function(t, n, i) {
                                        var r = n.resources,
                                            e = n.encoding,
                                            u = Ti(i),
                                            s = function(t) {
                                                var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
                                                return Math.round(t - n).toString(e.base || 10)
                                            },
                                            o = function(t, n) {
                                                var i = function(t) {
                                                        var n = {};
                                                        for (var i in t) {
                                                            var r = t[i].host || "",
                                                                e = t[i].path || "",
                                                                u = t[i].query || "",
                                                                s = {
                                                                    name: i,
                                                                    pathPattern: new RegExp(e),
                                                                    queryPattern: new RegExp(u)
                                                                };
                                                            n[r] ? n[r].resources.push(s) : n[r] = {
                                                                hostPattern: new RegExp(r),
                                                                resources: [s]
                                                            }
                                                        }
                                                        var o = [];
                                                        for (var a in n) o.push(n[a]);
                                                        return o
                                                    }(n),
                                                    r = [];
                                                return t.forEach((function(t) {
                                                    var n = function(t, n) {
                                                        for (var i = t.name, r = 0; r < n.length; ++r) {
                                                            var e = n[r],
                                                                u = e.hostPattern,
                                                                s = e.resources;
                                                            if (u.test(i.host)) {
                                                                var o = m(s, (function(t) {
                                                                    return t.pathPattern.test(i.pathname) && t.queryPattern.test(i.search)
                                                                }));
                                                                if (-1 != o) return s[o].name
                                                            }
                                                        }
                                                        return null
                                                    }(t, i);
                                                    n && r.push({
                                                        entry: t,
                                                        name: n
                                                    })
                                                })), r
                                            }(t, r).map((function(t) {
                                                return function(t, n, i) {
                                                    var r = {
                                                        "key": n,
                                                        "startTime": i(t.startTime),
                                                        "redirectTime": i(t.redirectEnd, t.redirectStart),
                                                        "domainLookupTime": i(t.domainLookupEnd, t.domainLookupStart),
                                                        "tcpConnectTime": i(t.connectEnd, t.connectStart),
                                                        "serverResponseTime": i(t.responseStart, t.requestStart),
                                                        "networkTransferTime": i(t.responseEnd, t.responseStart),
                                                        "transferSize": i(t.transferSize || 0),
                                                        "encodedBodySize": i(t.encodedBodySize || 0),
                                                        "decodedBodySize": i(t.decodedBodySize || 0),
                                                        "duration": i(t.duration),
                                                        "initiatorType": t.initiatorType
                                                    };
                                                    return new fi(r, 1)
                                                }(t.entry, t.name, s)
                                            })).map((function(t) {
                                                return u.expandTemplate(e.entry, t, i)
                                            }));
                                        return Promise.all(o).then((function(t) {
                                            return t.join(e.delim)
                                        }))
                                    }(e, n, t)
                                }, new Promise((function(t) {
                                    setTimeout((function() {
                                        return t(u())
                                    }))
                                }))) : Promise.resolve("")
                            }(e, u) : Promise.resolve("")), this.$At || (i.freezeVar("extraUrlParams"), this.$At = this.iOt(this.baseUrl, i, o)), !this.YAt && this.qAt) {
                            var a = new fi(i.vars, i.iterations, !0);
                            this.YAt = this.iOt(this.qAt, a, o)
                        }
                        var h = Wt(Wt({}, t), n.extraUrlParams),
                            c = this.win.Date.now(),
                            f = ce(this.cA, this.oU, h, i, o, this.zl, this.zr).then((function(t) {
                                return {
                                    "trigger": n.on,
                                    "timestamp": c,
                                    "extraUrlParams": t
                                }
                            }));
                        this.zAt.push(f), this.Pr(r || !this.GAt)
                    }
                }, n.dispose = function() {
                    this.Cn(), this.JAt && (this.win.clearTimeout(this.JAt), this.JAt = null), this.XAt && (this.win.clearTimeout(this.XAt), this.XAt = null)
                }, n.iOt = function(t, n, i) {
                    var r = this;
                    return this.cA.expandTemplate(t, n, this.zl, i, this.zr).then((function(t) {
                        return r.oU.expandUrlAsync(t, i, r.zr).catch((function(n) {
                            return st(!1, 'Could not expand URL "'.concat(t, '": ').concat(n.message))
                        }))
                    }))
                }, n.Pr = function(t) {
                    0 != this.K5 && t && this.rOt()
                }, n.rOt = function() {
                    var t = this,
                        n = this.$At,
                        i = this.zAt,
                        r = this.YAt,
                        e = this.QAt;
                    this.Cn(), (r || n).then((function(n) {
                        t.KAt.url(t.xi, n, !0)
                    })), Promise.all([n, Promise.all(i), r]).then((function(n) {
                        var i = t.eOt(n[0], n[2]),
                            r = n[1];
                        0 !== r.length && (e.iframePing ? (st(e.on == sr, "iframePing is only available on page view requests."), t.mN.sendRequestUsingIframe(i, r[0])) : t.mN.sendRequest(i, r, !!t.GAt))
                    }))
                }, n.Cn = function() {
                    this.K5 = 0, this.$At = null, this.zAt = [], this.QAt = null
                }, n.nOt = function() {
                    if (this.GAt) {
                        this.GAt = d(this.GAt) ? this.GAt : [this.GAt];
                        for (var t = 0; t < this.GAt.length; t++) {
                            var n = this.GAt[t];
                            st(N(n), "Invalid batchInterval value: %s", this.GAt), st((n = 1e3 * Number(n)) >= 200, "Invalid batchInterval value: %s, interval value must be greater than %s ms.", this.GAt, 200), this.GAt[t] = n
                        }
                        this.WAt = 0, this.uOt()
                    }
                }, n.tOt = function() {
                    var t = this;
                    this.BAt && (this.XAt = this.win.setTimeout((function() {
                        t.Pr(!0), t.ZAt = !1, t.JAt && (t.win.clearTimeout(t.JAt), t.JAt = null)
                    }), 1e3 * this.BAt))
                }, n.uOt = function() {
                    var t = this;
                    ut(null != this.WAt);
                    var n = this.WAt < this.GAt.length ? this.GAt[this.WAt++] : this.GAt[this.GAt.length - 1];
                    this.JAt = this.win.setTimeout((function() {
                        t.Pr(!0), t.uOt()
                    }), n)
                }, n.eOt = function(t, n) {
                    return n ? this.pA.parse(n).origin + t : t
                }, t
            }();

            function ce(t, n, i, r, e, u, s) {
                for (var o = {}, a = [], h = new fi(r.vars, r.iterations, !0), c = function i(r, o, c) {
                        var f = r[o];
                        if ("string" == typeof f) {
                            c[o] = void 0;
                            var l = t.expandTemplate(f, h, u).then((function(t) {
                                return n.expandStringAsync(t, e, s)
                            })).then((function(t) {
                                c[o] = t
                            }));
                            a.push(l)
                        } else if (d(f)) {
                            c[o] = [];
                            for (var v = 0; v < f.length; v++) i(f, v, c[o])
                        } else if (w(f) && null !== f) {
                            c[o] = {};
                            for (var m = Object.keys(f), p = 0; p < m.length; p++) i(f, m[p], c[o])
                        } else c[o] = f
                    }, f = Object.keys(i), l = 0; l < f.length; l++) c(i, f[l], o);
                return Promise.all(a).then((function() {
                    return o
                }))
            }
            var fe = function() {
                    function t(t, n) {
                        var i = this;
                        this.svt = n, this.wV = !1, this.sOt = [], this.ugt = new Ln(this.svt, "send-iframe-transport-events", !0, (function() {
                            i.setIsReady()
                        }))
                    }
                    var n = t.prototype;
                    return n.isReady = function() {
                        return this.wV
                    }, n.setIsReady = function() {
                        this.wV = !0, this.oOt()
                    }, n.queueSize = function() {
                        return this.sOt.length
                    }, n.enqueue = function(t) {
                        ut(t && t.creativeId && t.message), this.sOt.push(t), this.queueSize() >= 100 && (et().warn("amp-analytics/iframe-transport-message-queue", "Exceeded maximum size of queue for: " + t.creativeId), this.sOt.shift()), this.oOt()
                    }, n.oOt = function() {
                        this.isReady() && this.queueSize() && (this.ugt.send("iframe-transport-events", {
                            events: this.sOt
                        }), this.sOt = [])
                    }, t
                }(),
                le = function() {
                    return self.AMP.config.urls
                }(),
                ve = function() {
                    function t(t, n, i, r) {
                        this.aOt = t, this.uI = n, this.hOt = r, ut(i && i.iframe), this.cOt = i.iframe, this.fOt = 0, this.processCrossDomainIframe()
                    }
                    var n = t.prototype;
                    return n.detach = function() {
                        t.markCrossDomainIframeAsDone(this.aOt.document, this.uI)
                    }, n.processCrossDomainIframe = function() {
                        var n;
                        t.hasCrossDomainIframe(this.uI) ? ++(n = t.getFrameData(this.uI)).usageCount : (n = this.createCrossDomainIframe(), this.aOt.document.body.appendChild(n.frame), this.Zm()), ut(n)
                    }, n.createCrossDomainIframe = function() {
                        var n = t.lOt(),
                            i = JSON.stringify({
                                scriptSrc: (this.aOt, le.thirdParty + "/".concat("2305252018001", "/iframe-transport-client-v0.js")),
                                sentinel: n,
                                type: this.uI
                            }),
                            r = U(this.aOt.document, "iframe", {
                                sandbox: "allow-scripts allow-same-origin",
                                name: i,
                                "data-amp-3p-sentinel": n
                            });
                        r.sentinel = n, _n(r, !1), r.src = this.cOt;
                        var e = {
                            frame: r,
                            usageCount: 1,
                            queue: new fe(this.aOt, r)
                        };
                        return t.vOt[this.uI] = e, e
                    }, n.Zm = function() {
                        var n, i = this;
                        (n = this.aOt).PerformanceObserver && n.TaskAttributionTiming && "containerName" in n.TaskAttributionTiming.prototype && (t.dOt[this.uI] = new this.aOt.PerformanceObserver((function(t) {
                            t && t.getEntries().forEach((function(t) {
                                t && "longtask" == t.entryType && "cross-origin-descendant" == t.name && t.attribution && t.attribution.forEach((function(t) {
                                    i.cOt == t.containerSrc && ++i.fOt % 5 == 0 && it().error("amp-analytics/iframe-transport", 'Long Task: Vendor: "'.concat(i.uI, '"'))
                                }))
                            }))
                        })), t.dOt[this.uI].observe({
                            entryTypes: ["longtask"]
                        }))
                    }, t.markCrossDomainIframeAsDone = function(n, i) {
                        var r = t.getFrameData(i);
                        ut(r && r.frame && r.usageCount), --r.usageCount || (n.body.removeChild(r.frame), delete t.vOt[i], t.dOt[i] && (t.dOt[i].disconnect(), t.dOt[i] = null))
                    }, t.hasCrossDomainIframe = function(n) {
                        return A(t.vOt, n)
                    }, t.lOt = function() {
                        return String(++t.mOt)
                    }, n.sendRequest = function(n) {
                        var i = t.getFrameData(this.uI);
                        ut(i), ut(i.queue), i.queue.enqueue({
                            creativeId: this.hOt,
                            message: n
                        })
                    }, t.getFrameData = function(n) {
                        return t.vOt[n]
                    }, t.resetCrossDomainIframes = function() {
                        t.vOt = {}
                    }, n.getCreativeId = function() {
                        return this.hOt
                    }, n.getType = function() {
                        return this.uI
                    }, t
                }();

            function de(t) {
                var n;
                return null === (n = t.featurePolicy) || void 0 === n ? void 0 : n.allowedFeatures().includes("attribution-reporting")
            }

            function me(t, n) {
                var i = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
                    r = arguments.length > 3 ? arguments[3] : void 0,
                    e = jn.getImage(t),
                    u = new e;
                return i && (u.referrerPolicy = "no-referrer"), u.src = n, de(t.document) && (u.attributionsrc = r), u
            }
            ve.vOt = {}, ve.mOt = 0, ve.dOt = {};
            var pe, be, Ee = "amp-analytics/transport",
                ge = function() {
                    function t(t) {
                        var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                        this.xi = t, this.t = t.win, this.xt = n, this.Or = this.xt.referrerPolicy, "no-referrer" === this.Or && (this.xt.beacon = !1, this.xt.xhrpost = !1), this.pOt = !!this.xt.useBody, this.bOt = null, this.EOt = "inabox" == K(this.t).runtime, this.gOt = this.xt.attributionsrc
                    }
                    var n = t.prototype;
                    return n.sendRequest = function(n, i, r) {
                        if (n && 0 !== i.length) {
                            var e, u, s = this.TOt(),
                                o = (e = function(t) {
                                    var e = r ? s.generateBatchRequest(n, i, t) : s.generateRequest(n, i[0], t);
                                    return e.url.startsWith("amp-script:") || (ln(e.url, "amp-analytics request"), function(t) {
                                        st(!("__amp_source_origin" in $(on(t).search)), "Source origin is not allowed in %s", t)
                                    }(e.url)), e
                                }, u = {}, function(t) {
                                    var n = String(t);
                                    return void 0 === u[n] && (u[n] = e(t)), u[n]
                                });
                            if (this.xt.iframe) return this.bOt ? void this.bOt.sendRequest(o(!1).url) : void et().error(Ee, "iframe transport was inadvertently deleted");
                            if (this.xt["amp-script"]) t.forwardRequestToAmpScript(this.xi, {
                                url: n,
                                payload: o(!0).payload
                            });
                            else if (!(this.xt.beacon && t.sendRequestUsingBeacon(this.t, o(this.pOt)) || this.xt.xhrpost && t.sendRequestUsingXhr(this.t, o(this.pOt)))) {
                                var a = this.xt.image;
                                if (a) {
                                    var h = "object" == c(a) && a.suppressWarnings;
                                    t.sendRequestUsingImage(this.t, o(!1), h, this.Or, this.gOt)
                                } else it().warn(Ee, "Failed to send request", n, this.xt)
                            }
                        } else et().info(Ee, "Empty request not sent: ", n)
                    }, n.maybeInitIframeTransport = function(t) {
                        if (this.xt.iframe && !this.bOt) {
                            var n = lt(P(t)),
                                i = t.getAttribute("type"),
                                r = this.EOt ? "1" : it().assertString(function(t, n) {
                                    try {
                                        var i = vt(t, n).parentElement;
                                        if ("AMP-AD" == i.nodeName) return String(i.getResourceId())
                                    } catch (t) {}
                                    return null
                                }(t, n), "No friendly amp-ad ancestor element was found for amp-analytics tag with iframe transport.");
                            this.bOt = new ve(n, i, this.xt, r)
                        }
                    }, n.deleteIframeTransport = function() {
                        this.bOt && (this.bOt.detach(), this.bOt = null)
                    }, n.sendRequestUsingIframe = function(t, n) {
                        var i = this,
                            r = ae(t, [n]);
                        if (r) {
                            ln(r, "amp-analytics request"), st(on(r).origin != on(this.t.location.href).origin, "Origin of iframe request must not be equal to the document origin. See https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-iframe-origin-policy.md for details.");
                            var e = this.t.document.createElement("iframe");
                            _n(e, !1), e.onload = e.onerror = function() {
                                It(i.t).delay((function() {
                                    var t, n;
                                    null === (n = (t = e).parentElement) || void 0 === n || n.removeChild(t)
                                }), 5e3)
                            }, e.setAttribute("amp-analytics", ""), e.setAttribute("sandbox", "allow-scripts allow-same-origin"), e.src = r, this.t.document.body.appendChild(e)
                        } else it().error(Ee, "Request not sent. Contents empty.")
                    }, n.TOt = function() {
                        return oe.default
                    }, t.sendRequestUsingImage = function(t, n, i, r, e) {
                        t && function(t) {
                            var n, i;
                            if (function(t) {
                                    return !!(t.complete || "complete" == t.readyState || Ut(t) && t.readyState > 0 || t.document && "complete" == t.document.readyState)
                                }(t)) return Promise.resolve(t);
                            var r = Ut(t);
                            return r && t.__AMP_MEDIA_LOAD_FAILURE_SRC === t.currentSrc ? Promise.reject(t) : new Promise((function(e, u) {
                                if (n = r ? xt(t, "loadedmetadata", e, {
                                        capture: !0
                                    }) : xt(t, "load", e), t.tagName) {
                                    var s = t;
                                    if (r && !t.hasAttribute("src") && !(s = function(t, n) {
                                            for (var i = t.lastElementChild; i; i = i.previousElementSibling)
                                                if (n(i)) return i;
                                            return null
                                        }(t, (function(t) {
                                            return "SOURCE" === t.tagName
                                        })))) return u(new Error("Media has no source."));
                                    i = xt(s, "error", u)
                                }
                            })).then((function() {
                                return i && i(), t
                            }), (function() {
                                n && n(),
                                    function(t) {
                                        Ut(t) && (t.__AMP_MEDIA_LOAD_FAILURE_SRC = t.currentSrc || !0);
                                        var n = t;
                                        throw n && n.src && (n = n.src), it().createError("Failed to load:", n)
                                    }(t)
                            }))
                        }(function(t, n, i, r) {
                            return i && "no-referrer" !== i && it().error("pixel", "Unsupported referrerPolicy: %s", i), "no-referrer" === i ? function(t, n, i) {
                                if ("referrerPolicy" in Image.prototype) return me(t, n, !0, i);
                                var r = U(t.document, "iframe", {
                                    "src": "about:blank",
                                    "style": "display:none"
                                });
                                return r.onload = function() {
                                    me(r.contentWindow, n)
                                }, t.document.body.appendChild(r), r
                            }(t, n, r) : me(t, n, !1, r)
                        }(t, n.url, r, e)).then((function() {
                            et().fine(Ee, "Sent image request", n.url)
                        })).catch((function() {
                            i || it().warn(Ee, "Response unparseable or failed to send image request", n.url)
                        }))
                    }, t.sendRequestUsingBeacon = function(t, n) {
                        var i = jn.getSendBeacon(t);
                        if (!i) return !1;
                        var r = i(n.url, n.payload || "");
                        return r && et().fine(Ee, "Sent beacon request", n), r
                    }, t.sendRequestUsingXhr = function(t, n) {
                        var i = jn.getXMLHttpRequest(t);
                        if (!i) return !1;
                        var r = new i;
                        return "withCredentials" in r && (r.open("POST", n.url, !0), r.withCredentials = !0, r.setRequestHeader("Content-Type", "text/plain"), r.onreadystatechange = function() {
                            4 == r.readyState && et().fine(Ee, "Sent XHR request", n.url)
                        }, r.send(n.payload || ""), !0)
                    }, t.forwardRequestToAmpScript = function(t, n) {
                        return (i = t, function(t, n, i) {
                            var r = ht(t, n);
                            return r ? Promise.resolve(r) : yt(t, n, "amp-script")
                        }(i, "amp-script")).then((function(t) {
                            st(t, "AMP-SCRIPT is not installed"), t.fetch(n.url, JSON.parse(n.payload))
                        }));
                        var i
                    }, t
                }(),
                Te = "amp-analytics",
                ye = [sr, Qi, tr, nr],
                we = function(t) {
                    a(i, t);
                    var n = v(i);

                    function i(t) {
                        var i;
                        return (i = n.call(this, t)).yOt = e(), i.wOt = null, i.pTt = !1, i.uG = {}, i._U = {}, i.SOt = null, i.AOt = null, i.cA = null, i.OOt = At(i.win), i.NOt = null, i.mN = null, i.uI = i.element.getAttribute("type"), i.EOt = "inabox" == K(i.win).runtime, i.IOt = null, i._Ot = null, i.ROt = null, i
                    }
                    var r = i.prototype;
                    return r.getLayoutPriority = function() {
                        return this.EOt ? 0 : 1
                    }, r.isAlwaysFixed = function() {
                        return !xn(this.element)
                    }, r.isLayoutSupported = function(t) {
                        return !0
                    }, r.buildCallback = function() {
                        var t, n = this;
                        this.pTt = this.element.hasAttribute("sandbox"), this.element.setAttribute("aria-hidden", "true"), this.wOt = this.element.getAttribute("data-consent-notification-id"), null != this.wOt && (this.yOt = (t = this.element, function(t, n, i, r) {
                            return yt(t, "userNotificationManager", i, void 0).then((function(t) {
                                return function(t, n, i) {
                                    return st(t, "Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.", "userNotificationManager", i, i, i)
                                }(t, 0, i)
                            }))
                        }(t, 0, "amp-user-notification")).then((function(t) {
                            return t.get(n.wOt)
                        }))), "immediate" == this.element.getAttribute("trigger") && this.POt()
                    }, r.layoutCallback = function() {
                        return this.POt()
                    }, r.detachedCallback = function() {
                        for (var t in this.AOt && (this.AOt.dispose(), this.AOt = null), this.IOt && (this.IOt.dispose(), this.IOt = null), this.uG) this.uG[t].dispose(), delete this.uG[t]
                    }, r.resumeCallback = function() {
                        var t = this;
                        this.NOt && this.NOt.then((function() {
                            t.mN.maybeInitIframeTransport(t.element)
                        }))
                    }, r.unlayoutCallback = function() {
                        var n = this;
                        return !this.getAmpDoc().isVisible() && (this.NOt && this.NOt.then((function() {
                            n.mN.deleteIframeTransport()
                        })), t.prototype.unlayoutCallback.call(this))
                    }, r.POt = function() {
                        var t = this;
                        if (this.NOt) return this.NOt;
                        var n = this.getAmpDoc();
                        return this.NOt = n.whenFirstVisible().then((function() {
                            return It(t.win).promise(1)
                        })).then((function() {
                            return t.yOt
                        })).then((function() {
                            return Promise.all([(t = n, ct(t, "amp-analytics-instrumentation")), yi(n)]);
                            var t
                        })).then((function(n) {
                            t.SOt = n[0], t.cA = n[1];
                            var i = new u,
                                r = function() {
                                    var n = new Oi(t.element).loadConfig();
                                    i.resolve(n)
                                };
                            return t.EOt ? r() : Li(t.element, r, 20), i.promise
                        })).then((function(n) {
                            return t._U = n, new qi(t.win, t.element, t._U).write()
                        })).then((function() {
                            t.mN = new ge(t.getAmpDoc(), t._U.transport || {})
                        })).then(this.COt.bind(this)).then(this.MOt.bind(this)).then(this.DOt.bind(this)), this.NOt.then((function() {
                            t.collapse()
                        })), this.NOt
                    }, r.LOt = function() {
                        return !!this.EOt || (null == this.ROt && (this.ROt = xn(this.element)), this.ROt)
                    }, r.COt = function() {
                        var t = this;
                        return this._U.triggers && Object.values(this._U.triggers).some((function(t) {
                            var n;
                            return null == t || null === (n = t.session) || void 0 === n ? void 0 : n.persistEvent
                        })) && this.uI ? si(this.getAmpDoc()).then((function(n) {
                            t._Ot = n
                        })) : e()
                    }, r.MOt = function() {
                        var t = this;
                        if (this.kOt()) {
                            var n = this.Gi();
                            return it().fine(n, "User has opted out. No hits will be sent."), e()
                        }
                        if (this.xOt(), !this._U.triggers) {
                            var i = this.Gi();
                            return this.user().warn(i, "No triggers were found in the config. No analytics data will be sent."), e()
                        }
                        this.UOt(this._U.extraUrlParams, this._U.extraUrlParamsReplaceMap), this.AOt = this.SOt.createAnalyticsGroup(this.element), this.mN.maybeInitIframeTransport(this.element);
                        var r = [];
                        for (var u in this._U.triggers) !A(this._U.triggers, u) || function() {
                            var n = t._U.triggers[u],
                                i = t.jOt({}, n, void 0, !0),
                                e = t.Gi();
                            if (!n) return t.user().error(e, "Trigger should be an object: ", u), "continue";
                            var s, o = n.request || n.parentPostMessage && t.LOt();
                            if (!n.on || !o) {
                                var a = t.LOt() ? '/"parentPostMessage"' : "";
                                return t.user().error(e, '"on" and "request"' + a + " attributes are required for data to be collected."), "continue"
                            }
                            if (t.pTt) {
                                var h = n.on;
                                if (!("click" !== (s = h) && "browser-event" !== s && "custom" !== s && "hidden" !== s && "ini-load" !== s && "render-start" !== s && "scroll" !== s && "story" !== s && "timer" !== s && "video" !== s && "visible" !== s || ye.includes(h))) return t.user().error(e, h + " is not supported for amp-analytics in scope"), "continue"
                            }
                            t.UOt(n.extraUrlParams, t._U.extraUrlParamsReplaceMap), r.push(t.HOt(n).then((function(r) {
                                if (r) {
                                    if (t.pTt) {
                                        if (!t.element.parentElement) return;
                                        return n.selector = t.element.parentElement.tagName, n.selectionMethod = "closest", t.FOt(n)
                                    }
                                    return n.selector && !d(n.selector) ? t.cA.expandTemplate(n.selector, i, t.element).then((function(i) {
                                        return n.selector = i, t.FOt(n)
                                    })) : t.FOt(n)
                                }
                            })))
                        }();
                        return Promise.all(r)
                    }, r.preload = function(t, n) {
                        Nt(this.win).preload(this.getAmpDoc(), t, n)
                    }, r.FOt = function(t) {
                        if (!this.AOt) return e();
                        try {
                            return this.AOt.addTrigger(t, this.ik.bind(this, t))
                        } catch (n) {
                            return G(this.Gi(), 'Failed to process trigger "' + t.on + '"', n), e()
                        }
                    }, r.UOt = function(t, n) {
                        if (t && n) {
                            var i = 0;
                            for (var r in n) {
                                if (++i > 16) {
                                    var e = this.Gi();
                                    this.user().error(e, "More than 16 extraUrlParamsReplaceMap rules aren't allowed; Skipping the rest");
                                    break
                                }
                                for (var u in t) {
                                    var s = u.replace(r, n[r]);
                                    if (u != s) {
                                        var o = t[u];
                                        delete t[u], t[s] = o
                                    }
                                }
                            }
                        }
                    }, r.kOt = function() {
                        var t = this._U.optoutElementId;
                        if (t && this.win.document.getElementById(t)) return !0;
                        if (!this._U.optout) return !1;
                        for (var n = this._U.optout.split("."), i = this.win, r = 0; r < n.length; r++) {
                            if (!i) return !1;
                            i = i[n[r]]
                        }
                        return i()
                    }, r.xOt = function() {
                        var t = this;
                        if (this._U.requests) {
                            if (this._U.requests) {
                                for (var n in this._U.requests) A(this._U.requests, n) && (this._U.requests[n].baseUrl || (this.user().error(Te, "request must have a baseUrl"), delete this._U.requests[n]));
                                for (var i in this._U.requests) this._U.requests[i].baseUrl = b(this._U.requests[i].baseUrl, (function(n) {
                                    var i = t._U.requests[n];
                                    return i && i.baseUrl || "${" + n + "}"
                                }), 5);
                                var r = {};
                                for (var e in this._U.requests)
                                    if (A(this._U.requests, e)) {
                                        var u = this._U.requests[e];
                                        r[e] = new he(this.element, u, Nt(this.win), this.mN, this.pTt)
                                    }
                                this.uG = r
                            }
                        } else if (!this.LOt()) {
                            var s = this.Gi();
                            this.user().warn(s, "No request strings defined. Analytics data will not be sent from this page.")
                        }
                    }, r.DOt = function() {
                        var t = this;
                        this.IOt = new te(this.getAmpDoc(), this._U, this.uI, this.element);
                        var n = function() {
                            t.IOt.init()
                        };
                        this.EOt ? n() : Li(this.element, n, 10)
                    }, r.ik = function(t, n) {
                        var i, r;
                        null === (i = t.session) || void 0 === i || !i.persistEvent || null === (r = this._Ot) || void 0 === r || r.updateEvent(this.uI);
                        for (var e = d(t.request) ? t.request : [t.request], u = 0; u < e.length; u++) {
                            var s = e[u];
                            this.VOt(s, t, n)
                        }
                    }, r.VOt = function(t, n, i) {
                        var r = this;
                        if (!this.element.ownerDocument.defaultView) {
                            var e = this.Gi();
                            et().warn(e, "request against destroyed embed: ", n.on)
                        }
                        var u = this.uG[t],
                            s = this.LOt() && n.parentPostMessage;
                        if (null != t && !u) {
                            var o = this.Gi();
                            if (this.user().error(o, "Ignoring request for event. Request string not found: ", n.request), !s) return
                        }
                        this.qOt(n, i).then((function(t) {
                            var e = r.element.ownerDocument && r.element.ownerDocument.defaultView;
                            t && e && (r.GOt(u, n, i), n.parentPostMessage && r.LOt() && H(r.win) && r.BOt(n, i))
                        }))
                    }, r.GOt = function(t, n, i) {
                        if (t) {
                            this._U.vars.requestCount++;
                            var r = this.jOt(i, n);
                            t.send(this._U.extraUrlParams, n, r)
                        }
                    }, r.BOt = function(t, n) {
                        var i = this,
                            r = t.parentPostMessage,
                            e = this.jOt(n, t);
                        (function(t, n, i, r, e, u) {
                            var s = Ti(t),
                                o = _t(u),
                                a = s.getMacros(u);
                            e.freezeVar("extraUrlParams");
                            var h = s.expandTemplate(n, e, u).then((function(t) {
                                return o.expandStringAsync(t, a)
                            }));
                            return n.indexOf("${extraUrlParams}") < 0 ? h : h.then((function(t) {
                                var n = Wt(Wt({}, i), r.extraUrlParams);
                                return ce(s, o, n, e, a, u).then((function(n) {
                                    return ae(t, [{
                                        "extraUrlParams": n
                                    }])
                                }))
                            }))
                        })(this.getAmpDoc(), r, this._U.extraUrlParams, t, e, this.element).then((function(t) {
                            i.win.parent.postMessage(t, "*")
                        }))
                    }, r.HOt = function(t) {
                        var n = this,
                            i = t.sampleSpec,
                            r = this.Gi();
                        if (!i) return Promise.resolve(!0);
                        var e = i.sampleOn;
                        if (!e) return this.user().error(r, "Invalid sampleOn value."), Promise.resolve(!0);
                        var s = parseFloat(i.threshold);
                        if (s >= 0 && s <= 100) {
                            var o = new u,
                                a = function() {
                                    var i = n.jOt({}, t),
                                        r = n.PAt(e, i).then((function(t) {
                                            return n.OOt.uniform(t)
                                        })).then((function(t) {
                                            return 100 * t < s
                                        }));
                                    o.resolve(r)
                                };
                            return this.EOt ? a() : Li(this.element, a, 10), o.promise
                        }
                        return it().error(r, "Invalid threshold for sampling."), Promise.resolve(!0)
                    }, r.qOt = function(t, n) {
                        var i = this.jOt(n, t),
                            r = this.WOt(this._U.enabled, i),
                            e = this.WOt(t.enabled, i);
                        return Promise.all([r, e]).then((function(t) {
                            return ut(2 === t.length), t[0] && t[1]
                        }))
                    }, r.WOt = function(t, n) {
                        return void 0 === t ? Promise.resolve(!0) : "boolean" == typeof t ? Promise.resolve(t) : this.PAt(t, n).then((function(t) {
                            return Si(t)
                        }))
                    }, r.PAt = function(t, n) {
                        var i = this;
                        return this.cA.expandTemplate(t, n, this.element).then((function(t) {
                            return _t(i.element).expandUrlAsync(t, i.cA.getMacros(i.element))
                        }))
                    }, r.Gi = function() {
                        return "AmpAnalytics " + (this.element.getAttribute("id") || "<unknown id>")
                    }, r.jOt = function(t, n, i, r) {
                        var e = {};
                        return Ni(this._U.vars, e), Ni(n.vars, e), Ni(t.vars, e), new fi(e, i, r)
                    }, i
                }(t.BaseElement);
            t.registerServiceForDoc("amp-analytics-instrumentation", Zr), t.registerServiceForDoc("activity", Gt), be = $n, bt(pe = lt(pe = t.win), pe, "amp-analytics-linker-reader", be), t.registerServiceForDoc("amp-analytics-session", ni), t.registerServiceForDoc("amp-analytics-variables", bi), t.registerElement(Te, we)
        }();
        /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
    }
});
//# sourceMappingURL=amp-analytics-0.1.js.map