'use strict'
!(function(require, directRequire) {
  'use strict'
  function a() {
    ;(n = 0), (j = []), (k = []), (m = Date.now())
  }
  function b() {
    if ('undefined' != typeof navigator && navigator) {
      const a = navigator,
        b = ((a.connection || {}).type || '').toLowerCase(),
        c = g.DevtoolNetworkType[b]
      if ('number' == typeof c) return c
    }
    return g.DevtoolNetworkType.unknown
  }
  function c(a) {
    const c = b(),
      d = j.slice(0, a),
      e = d.map(a => {
        return {
          time_cost: a.cost_time,
          size_a: a.data_size,
          size_b: a.ret_data_size,
          scene_type: 2,
          method: 'invokeHandler',
          js_api_name: a.sdk_name,
          network_type: c
        }
      })
    return e
  }
  function d(a) {
    const c = b(),
      d = k.slice(0, a),
      e = d.map(a => {
        return {
          time_cost: a.cost_time,
          size_a: a.data_size,
          scene_type: 0,
          network_type: c
        }
      })
    return e
  }
  function e(a) {
    const b = c(300),
      e = d(300),
      g = [...b, ...e]
    if (!(1 > g.length)) {
      i.i('report data of length', g.length),
        i.i('dataSendReports', e.length, 'sdkApiReports', b.length)
      try {
        f('remote_debug_report', a, JSON.stringify({ reports: g }))
      } catch (a) {
        i.w('report failed', a)
      }
    }
  }
  Object.defineProperty(exports, '__esModule', { value: !0 })
  const f = require('./da7c31daaf542cf1796023d8e344b98a.js'),
    g = require('./a148d3a11fd5268109e21fb40c9d527b.js'),
    h = require('./56a764ae9cb4336bf6babe1c1da0275b.js'),
    i = h.default('[reporter]')
  let j = [],
    k = []
  var l
  ;(function(a) {
    ;(a[(a.SDKAPI = 0)] = 'SDKAPI'), (a[(a.DataSend = 1)] = 'DataSend')
  })((l = exports.ReportType || (exports.ReportType = {})))
  let m = 0
  let n = 0
  exports.reportData = function(b, c, d) {
    if (c === l.SDKAPI) j.push(...d)
    else if (c === l.DataSend) k.push(...d)
    else return void i.w('invalid report type')
    ;(n += d.length), (!m || (Date.now() - m > 30000 && 30 <= n)) && (e(b), a())
  }
})(require('lazyload'), require)
