function()

in static/js/tracker.js [80:386]


    function (e, n, t) {
      'use strict';
      t.r(n);
      var o = t(0),
        r = t.n(o),
        i =
          'undefined' != typeof my && !!my && 'function' == typeof my.showToast,
        a =
          'undefined' != typeof wx &&
          !!wx &&
          (void 0 !== wx.login || void 0 !== wx.miniProgram);
      function c(e, n) {
        'function' == typeof requestIdleCallback
          ? requestIdleCallback(e, { timeout: n || 1e3 })
          : setTimeout(e, 0);
      }
      function u(e) {
        return 'undefined' != typeof Promise && e instanceof Promise;
      }
      var f = {},
        d = (function () {
          if (!i || !a) return !1;
          try {
            var e = '';
            try {
              e = navigator ? navigator.userAgent || navigator.swuserAgent : '';
            } catch (e) {}
            if (!e)
              try {
                e = clientInformation ? clientInformation.appVersion : '';
              } catch (e) {}
            var n = !1;
            try {
              n = !!dd;
            } catch (e) {}
            return (
              n ||
              /AliApp\(AP/.test(e) ||
              /AliApp\(DingTalk/.test(e) ||
              /micromessenger/.test(e)
            );
          } catch (e) {
            return !1;
          }
        })()
          ? 5e3
          : 35e3,
        l = [],
        s = [],
        p = function e() {
          var n =
              arguments.length > 0 && void 0 !== arguments[0]
                ? arguments[0]
                : 20,
            t = arguments.length > 1 ? arguments[1] : void 0;
          return (
            (t = t || ''),
            n
              ? e(
                  --n,
                  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.charAt(
                    Math.floor(60 * Math.random())
                  ) + t
                )
              : t
          );
        },
        g = { sdk_version: '1.0.34', pv_id: p() };
      function v() {
        if (l.length) {
          var e = l.join('|');
          if (((d = g.maxUrlLength || d), e.length < d))
            return (l = []), void f.send(m(e));
          for (var n = ''; l.length; ) {
            var t = l[0];
            if (n && (n + '|' + t).length > d) break;
            l.shift(), (n += n ? '|' + t : t);
          }
          f.send(m(n)), l.length && v();
        }
      }
      function y(e, n) {
        !1 === n
          ? c(function () {
              f.send(m(e));
            })
          : (l.push(e), c(v));
      }
      function m(e) {
        var n = ['msg=' + e];
        for (var t in g)
          -1 === t.indexOf('plugin_') &&
            'requiredFields' !== t &&
            'maxUrlLength' !== t &&
            g.hasOwnProperty(t) &&
            (g[t] || 0 === g[t]) &&
            n.push(t + '=' + encodeURIComponent(g[t]));
        return n.join('&');
      }
      function h() {
        return (g.requiredFields || []).concat(['pid']).some(function (e) {
          return void 0 === g[e];
        });
      }
      (f.setConfig = function (e, n) {
        var t = function () {
          if (void 0 !== n) g[e] = n;
          else for (var t in e) g[t] = e[t];
        };
        s.length
          ? (t(),
            h() ||
              (s.forEach(function (e) {
                y.apply(null, e);
              }),
              (s = [])))
          : ((function () {
              if (void 0 !== n) return n !== g[e];
              for (var t in e) if (e[t] !== g[t]) return !0;
              return !1;
            })() && v(),
            t());
      }),
        (f.getConfig = function (e) {
          return e ? g[e] : g;
        }),
        (f.updatePVID = function () {
          f.setConfig('pv_id', p());
        }),
        (f.log = function (e) {
          var n =
              arguments.length > 1 && void 0 !== arguments[1]
                ? arguments[1]
                : {},
            t =
              arguments.length > 2 && void 0 !== arguments[2]
                ? arguments[2]
                : {};
          if (e) {
            (n.ts = n.ts || new Date().getTime()), (n.type = e);
            var o = [];
            for (var i in n) {
              var a = n[i],
                c = Object.prototype.toString.call(a);
              ('[object String]' !== c &&
                '[object Number]' !== c &&
                '[object Boolean]' !== c &&
                '[object Object]' !== c &&
                '[object Array]' !== c) ||
                (('[object Object]' !== c && '[object Array]' !== c) ||
                  (a = r()(a)),
                o.push(''.concat(i, '=').concat(encodeURIComponent(a))));
            }
            (n = encodeURIComponent(o.join('&'))),
              h() ? s.push([n, t.combo]) : y(n, t.combo);
          }
        }),
        (f.before = function (e, n) {
          return function () {
            var t = arguments,
              o = n.apply(f, t);
            u(o)
              ? o.then(function (n) {
                  e.apply(f, n || t);
                })
              : e.apply(f, o || t);
          };
        }),
        (f.after = function (e, n) {
          return function () {
            var t = arguments;
            e.apply(f, t), n.apply(f, t);
          };
        });
      var b = f,
        w = -1 !== navigator.userAgent.indexOf('WindVane'),
        _ = [];
      b.setConfig(
        (function () {
          var e = (function () {
              if (window.goldlog && goldlog.spm_ab) return goldlog.spm_ab;
              var e,
                n =
                  document.querySelector('meta[name="spm-id"]') ||
                  document.querySelector('meta[name="data-spm"]');
              if (n && (e = n.content) && -1 !== e.indexOf('.'))
                return e.split('.');
              var t = document.body && document.body.getAttribute('data-spm');
              return e && t ? [e, t] : [];
            })(),
            n = {
              title: document.title,
              spm_a: e[0],
              spm_b: e[1],
              hash: location.hash,
              dpi: window.devicePixelRatio,
              sr: ''
                .concat(window.screen.width, 'x')
                .concat(window.screen.height),
            },
            t = document.querySelector('meta[name="aes-config"]');
          if (t)
            try {
              var o = t.getAttribute('content');
              o &&
                o.split('&').forEach(function (e) {
                  var t = e.split('='),
                    o = t[0],
                    r = decodeURIComponent(t[1]);
                  if (-1 !== o.indexOf('.')) {
                    var i = o.split('.')[0],
                      a = o.split('.')[1];
                    n[i] || (n[i] = {}), (n[i][a] = r);
                  } else n[o] = r;
                });
            } catch (e) {}
          for (var r in window.AES_CONFIG) n[r] = AES_CONFIG[r];
          return n;
        })()
      ),
        window.addEventListener('hashchange', function () {
          b.setConfig('hash', location.hash);
        });
      var x =
        navigator.connection ||
        navigator.mozConnection ||
        navigator.webkitConnection;
      if (x) {
        var S = function () {
          b.setConfig({ downlink: x.downlink, net_type: x.effectiveType }),
            navigator.onLine &&
              _.length &&
              (_.forEach(function (e) {
                c(function () {
                  b.send(e);
                });
              }),
              (_ = []));
        };
        S(), x.addEventListener('change', S);
      }
      try {
        var O = function () {
          var e = document.querySelector('title');
          e &&
            new MutationObserver(function () {
              b.setConfig('title', document.title);
            }).observe(e, { childList: !0, characterData: !0, subtree: !0 });
        };
        document.querySelector('title')
          ? O()
          : document.addEventListener('DOMContentLoaded', O);
      } catch (e) {}
      (b.log = b.before(b.log, function () {
        var e;
        if (window.goldlog) {
          var n = goldlog.spm_ab;
          n &&
            (b.getConfig('spm_a') !== n[0] && ((e || (e = {})).spm_a = n[0]),
            b.getConfig('spm_b') !== n[1] && ((e || (e = {})).spm_b = n[1]));
        }
        var t = (function () {
          try {
            if (window.xr) {
              var e = Array.from(xr.global.recordingContexts.keys());
              if (e.length > 0) {
                var n = xr.global.recordingContexts.get(e[0]);
                if (n.appKey && n.recordingId && n.isRecording)
                  return { appKey: n.appKey, recordingId: n.recordingId };
              }
            }
          } catch (e) {}
        })();
        if (t) {
          var o = t.appKey + ',' + t.recordingId;
          b.getConfig('xreplay_id') !== o && ((e || (e = {})).xreplay_id = o);
        }
        e && b.setConfig(e);
      })),
        (b.send = function (e) {
          var n = window.goldlog && 'function' == typeof goldlog.record;
          if (navigator.onLine || (w && n)) {
            var t,
              o = [
                '/aes.1.1',
                'EXP',
                e,
                window.AES_DISABLE_POST ? 'GET' : 'POST',
              ];
            if (n) (t = goldlog).record.apply(t, o);
            else
              window.goldlog_queue || (window.goldlog_queue = []),
                goldlog_queue.push({ action: 'goldlog.record', arguments: o });
          } else _.length > 500 && _.shift(), _.push(e);
        });
      ['AES_QUEUE', 'AES_QUENE'].forEach(function (e) {
        '[object Array]' === Object.prototype.toString.call(window[e])
          ? window[e].forEach(function (e) {
              'function' == typeof e ? e(b) : b[e.action].apply(b, e.arguments);
            })
          : (window[e] = []),
          (window[e].push = function (e) {
            'function' == typeof e ? e(b) : b[e.action].apply(b, e.arguments);
          });
      });
      n.default = b;
    },