(async () => { const out = { hasLib: typeof lib !== 'undefined', libKeys: typeof lib !== 'undefined' ? Object.keys(lib) : null }; out.hasMtop = !!(typeof lib !== 'undefined' && lib.mtop && typeof lib.mtop.request === 'function'); if (!out.hasMtop) return out; try { const r = await lib.mtop.request({ api: 'mtop.alibaba.idle.seller.pc.datacompass.item.list', v: '1.0', type: 'POST', dataType: 'json', data: { tabType: 'all', dateRange: '', ms: '', dateType: 'recent7d', categoryInfoStr: '[]', itmName: '', itmId: '', isDpStk: '', mktActId: '', page: 1, pageSize: 3, }, }); out.ret = r && r.ret; const d = r && r.data && r.data.data; out.total = d && d.total; out.listLen = d && d.list && d.list.length; out.firstItem = d && d.list && d.list[0]; out.topKeys = d ? Object.keys(d) : null; } catch (e) { out.error = String((e && e.message) || e); } return out; })()