@conecli/cone-render 0.8.15-alpha.25 → 0.8.15-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/wxappApi.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/interface/common.ts +1 -1
- package/dist/libs/taroAppReport.js +4 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -0
- package/dist/utils/draExceptionHandle.ts +1 -0
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/jm-js-agent.js +1 -0
- package/dist/wxapp/common/JD.js +1 -0
- package/dist/wxapp/common/finger-report/index.js +1 -0
- package/dist/wxapp/common/request/params-sign.js +1 -0
- package/dist/wxapp/libs/sha256.js +191 -0
- package/package.json +1 -1
- package/dist/utils/draExceptionAndProfile.ts +0 -1
- package/dist/utils/jm-js-agent-jd-profile.js +0 -1
package/dist/common/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
public config: object | null
|
|
3
2
|
this.config = {}
|
|
4
3
|
console.log('=================>', 'updateBusinessDomainAndApi')
|
|
4
|
+
import Taro from '@tarojs/taro'
|
|
5
5
|
public config: object | null
|
|
6
6
|
this.config = {}
|
|
7
7
|
console.log('=================>', 'updateBusinessDomainAndApi')
|
package/dist/common/wxappApi.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
|
|
1
|
+
import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { Suspense, lazy } from 'react'
|
|
1
|
+
import React, { Suspense, lazy } from 'react'
|
package/dist/interface/common.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
1
|
+
import Taro from '@tarojs/taro'
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* 2023-02-14 16:43:37 @issue to huangzhihua@jd.com Thanks */
|
|
3
|
+
var Taro=require("@tarojs/taro");!function(t){var e={};"weapp"===process.env.TARO_ENV&&(e={1e3:["direct","t_1000578828_xcx_1000_wxtd","xcx",""],1001:["direct","t_1000578828_xcx_1001_fxrk","xcx",""],1005:["weixin","t_1000578826_xcx_1005_fxss","xcx",""],1006:["weixin","t_1000578826_xcx_1006_fxss","xcx",""],1007:["weixin","t_1000578832_xcx_1007_drxxkp","xcx",""],1008:["weixin","t_1000578832_xcx_1008_qlxxkp","xcx",""],1010:["direct","t_1000578828_xcx_1010_scj","xcx",""],1011:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1012:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1013:["weixin","t_1000578833_xcx_1011_smewm","xcx",""],1014:["weixin","t_1000578827_xcx_1014_xcxmbxx","xcx",""],1017:["weixin","t_1000578829_xcx_1017_tyb","xcx",""],1019:["direct","t_1000578830_xcx_1019_qb","xcx",""],1020:["weixin","t_1000072662_xcx_1020_gzhjs","xcx",""],1022:["direct","t_1000578828_xcx_1022_zdrk","xcx",""],1023:["direct","t_1000578828_xcx_1023_zmtb","xcx",""],1024:["direct","t_1000578828_xcx_1024_xcxjs","xcx",""],1025:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1026:["weixin","t_1000578829_xcx_1026_fjxcx","xcx",""],1027:["weixin","t_1000578826_xcx_1027_dbss","xcx",""],1028:["direct","t_1000578836_xcx_1028_kqkb","xcx",""],1029:["direct","t_1000578836_xcx_1029_kqxq","xcx",""],1030:["weixin","t_1000578829_xcx_1030_zdhcs","xcx",""],1031:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1032:["weixin","t_1000578833_xcx_1025_smywm","xcx",""],1034:["weixin","t_1000578827_xcx_1034_zfwcxx","xcx",""],1035:["weixin","t_1000072662_xcx_1035_cdl","xcx",""],1036:["weixin","t_335139774_xcx_1036_appfxxx","xcx",""],1037:["weixin","t_1000578834_xcx_1037_xcxtz","xcx",""],1038:["weixin","t_1000578834_xcx_1038_xcxtz","xcx",""],1039:["weixin","t_1000578829_xcx_1039_yds","xcx",""],1042:["weixin","t_1000578826_xcx_1042_tjss","xcx",""],1043:["weixin","t_1000072662_xcx_1043_gzhxx","xcx",""],1044:["weixin","t_1000578832_xcx_1044_fxxxkp","xcx",""],1045:["weixin","t_1000578835_xcx_1045_pyq","xcx",""],1046:["weixin","t_1000578835_xcx_1046_xqy","xcx",""],1047:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1048:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1049:["weixin","t_1000578833_xcx_1047_smxcxm","xcx",""],1052:["direct","t_1000578836_xcx_1052_kqmdlb","xcx",""],1053:["weixin","t_1000578826_xcx_1053_sys","xcx",""],1054:["direct","t_1000578828_xcx_1054_dbss","xcx",""],1055:["weixin","t_1000578829_xcx_1055_h5hq","xcx",""],1056:["weixin","t_1000578829_xcx_1056_ylbf","xcx",""],1057:["direct","t_1000578830_xcx_1057_yxkxqy","xcx",""],1058:["weixin","t_1000072663_xcx_1058_gzhwz","xcx",""],1059:["weixin","t_1000578829_xcx_1059_yqy","xcx",""],1064:["weixin","t_1000578829_xcx_1064_wifilj","xcx",""],1067:["weixin","t_1000578835_xcx_1067_gzh","xcx",""],1068:["weixin","t_1000578835_xcx_1068_fjxcx","xcx",""],1069:["weixin","t_1000578829_xcx_1069_ydyy","xcx",""],1071:["direct","t_1000578830_xcx_1071_yxklby","xcx",""],1072:["weixin","t_1000578833_xcx_1072_ewmsk","xcx",""],1073:["weixin","t_1000578829_xcx_1073_kfxx","xcx",""],1074:["weixin","t_1000072663_xcx_1074_gzhxx","xcx",""],1077:["weixin","t_1000578829_xcx_1077_yzb","xcx",""],1078:["weixin","t_1000578829_xcx_1078_wifilj","xcx",""],1079:["weixin","t_1000578829_xcx_1079_yxzx","xcx",""],1081:["weixin","t_1000578829_xcx_1081_kfwzl","xcx",""],1082:["weixin","t_1000072663_xcx_1082_hhwzl","xcx",""],1084:["weixin","t_1000578835_xcx_1084_ysy","xcx",""],1088:["direct","t_1000578828_xcx_1088_hhxx","xcx",""],1089:["direct","t_1000578828_xcx_1089_ltkxl","xcx",""],1090:["direct","t_1000578828_xcx_1090_xcxcd","xcx",""],1091:["weixin","t_1000072663_xcx_1091_wzspkp","xcx",""],1092:["direct","t_1000578829_xcx_1092_csfwrk","xcx",""],1095:["weixin","t_1000578835_xcx_1095_xcxzj","xcx",""],1096:["direct","t_1000578828_xcx_1096_ltjl","xcx",""],1097:["weixin","t_1000578829_xcx_1097_zfqy","xcx",""],1099:["direct","t_1000578829_xcx_1099_cj","xcx",""],1100:["direct","t_1000578828_xcx_1100_hbfmxqy","xcx",""],1102:["weixin","t_1000072663_xcx_1102_fwyl","xcx",""],1103:["direct","t_1000578829_xcx_1103_fxwd","xcx",""],1104:["direct","t_1000578829_xcx_1104_xlwd","xcx",""],1106:["direct","t_1000578828_xcx_1106_xlss","xcx",""],1107:["direct","t_1000578828_xcx_1107_dyxx","xcx",""],1112:["direct","t_1000072660_17008_79","xcx",""],1113:["direct","t_1000578828_xcx_1113_azfyp","xcx",""],1114:["direct","t_1000578828_xcx_1114_azcbl","xcx",""],1119:["direct","t_1000578828_xcx_1119_qywxgzt","xcx",""],1120:["direct","t_1000578828_xcx_1120_qywxgrzl","xcx",""],1121:["weixin","t_1000578832_xcx_1121_qywxltjhk","xcx",""],1124:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1125:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1126:["weixin","t_1000578833_xcx_1124_smywym","xcx",""],1129:["weixin","t_1000578829_xcx_1129_pc","xcx",""],1131:["direct","t_1000578828_xcx_1131_fcdk","xcx",""],1133:["direct","t_1000578828_xcx_1133_yjsb","xcx",""],1135:["weixin","t_1000578829_xcx_1135_zcxtz","xcx",""],1150:["weixin","t_1000578833_xcx_1150_sspm","xcx",""],1152:["weixin","t_1000072663_xcx_1152_dyhspdkxcx","xcx",""],1153:["weixin","t_1000578833_xcx_1253_swjgy","xcx",""],1154:["weixin","t_1000578832_xcx_1154_pyqdy","xcx",""],1155:["weixin","t_1000578832_xcx_1155_pyqdytz","xcx",""],1157:["weixin","t_1000578832_xcx_1157_fqhhhk","xcx",""],1158:["weixin","t_1000578832_xcx_1158_qgjdkxcx","xcx",""],1167:["direct","t_1000578828_xcx_1167_bqtz","xcx",""],1168:["weixin","t_1000578828_xcx_1168_qqllq","xcx",""]});var x=function(e){var x="";try{x=t.getStorageSync(e)}catch(t){}return x},n=function(e,x){try{t.setStorageSync(e,x)}catch(t){}},i=t.request,c=t.getSystemInfo,r=t.getNetworkType,_="";"weapp"===process.env.TARO_ENV?_="wx-app":"swan"===process.env.TARO_ENV?_="baidu-app":"tt"===process.env.TARO_ENV?_="toutiao-app":"alipay"===process.env.TARO_ENV?_="alipay-app":"rn"===process.env.TARO_ENV?_="rn-app":"h5"===process.env.TARO_ENV&&(_="h5-app");var a="__jda",s="__jdd",p="__jdv",o="__debugId__",d="__sysExtKey__",u="union_customerinfo",v=864e5,h=86400,l=1800,f="__refer",g="5YT%aC89$22OI@pQ",m=function(t){var e="https://neptune.jd.com/log/m";try{var x=getApp({allowDefault:!0});x&&x.globalRequestUrl&&(e=x.globalRequestUrl.replace(/\/*$/,"/neptune/log/m"))}catch(t){}return t?"https://luna.jd.com/debuglog/xapp":e},w=0;function y(t){t=t||"tr-"+w++,this.name=t,this.logCache=[],this.env=[],this.ext={},this.isReady=y.isWxDataReady,y.loggerList&&y.loggerList instanceof Array&&y.loggerList.push(this),y.isInitJda||(y.initJda(),y.isInitJda=!0)}y.loggerList=[],y.dependList={sysinfo:0,netType:0},y.isWxDataReady=!1,y.instance=!1,y.getInstance=function(){return y.instance||(y.instance=new y)},y.dataReady=function(t){if(!y.isWxDataReady){y.dependList[t]=1;for(var e in y.dependList)if(!y.dependList[e])return;y.isWxDataReady=!0;e=0;for(var x=y.loggerList.length;e<x;e++)y.loggerList[e].ready();delete y.loggerList}},y.pr=y.prototype,y.pr.ready=function(){this.isReady=!0;for(var t=this.logCache.length,e=0;e<t;e++)this.sendData.apply(this,this.logCache[e])},y.pr.sendData=function(t,e,x){var n;(n="pv"==e?this.initPvData(x):"cl"==e?this.initClickData(x):"cd"==e?this.initShoppingData(x):"od"==e?this.initOrderData(x):"sr"==e?this.initPageUnloadData(x):"ep"==e?this.initExposureData(x):x).tpc=t,n.report_ts=D()/1e3,n.token=y.md5(n.report_ts+g),n.data[0].typ=e,n.data[0].debugId=this.env[it]||"",this.request(n,"sr"==e||"cl"==e)},y.pr.send=function(t,e,x){this.isReady?this.sendData.apply(this,arguments):this.logCache.push(arguments)},y.pr.request=function(t,e){var x=!1,n=!!this.env[it];if(i({url:m(n)+"?std="+t.std,data:t,method:"POST",header:{"content-type":"application/json"},success:function(t){x=!0}}),e)for(var c=D()+100;D()<c||x;);},y.pr.exports=function(){var t=this;return{set:function(e){t.setData(e)},pv:function(e){t.lastPvTime&&D()-t.lastPvTime<100||(t.lastPvTime=D(),t.setData(e),t.env[L]||(t.setupPageview(),t.env[L]=!0),t.send("wx_app.000000","pv",e),t.env[L]=!1)},click:function(e){t.send("wx_app.000001","cl",e)},exposure:function(e){t.send("wx_app.000005","ep",e)},autoClick:function(e){var x,n=e.target.dataset,i=e.currentTarget.dataset;if(n&&n.eid?x=n:i&&i.eid&&(x=i),x){var c={eid:x.eid,elevel:x.elevel,eparam:x.eparam,pname:x.pname,pparam:x.pparam,target:x.target,event:e};t.send("wx_app.000001","cl",c)}},addToCart:function(e){t.send("wx_app.000002","cd",e)},order:function(e){t.send("wx_app.000003","od",e)},pageUnload:function(e){t.send("wx_app.000004","sr",e)},getSeries:function(){return t.env[L]||(t.setupPageview(),t.env[L]=!0),JSON.stringify(t.getSeriesData())},urlAddSeries:function(t){var e=(t||"").indexOf("#"),x="wxappSeries="+encodeURIComponent(this.getSeries());return e>-1?e===t.length-1?t+x:t+"&"+x:t+"#"+x},setMParam:function(e){return t.setMParam(e)},getJda:function(){return x(a)},getJdv:function(){return x(p)},getStorage:function(t){return x(t)},setStorage:function(t,e){return n(t,e)},setJdv:function(t){return t&&5===t.split("|").length&&n(p,t+"|"+D())}}},function(t){var e=0;function x(t){return i(n(c(t)))}function n(t){return _(a(r(t),8*t.length))}function i(t){for(var x,n=e?"0123456789ABCDEF":"0123456789abcdef",i="",c=0;c<t.length;c++)x=t.charCodeAt(c),i+=n.charAt(x>>>4&15)+n.charAt(15&x);return i}function c(t){for(var e,x,n="",i=-1;++i<t.length;)e=t.charCodeAt(i),x=i+1<t.length?t.charCodeAt(i+1):0,55296<=e&&e<=56319&&56320<=x&&x<=57343&&(e=65536+((1023&e)<<10)+(1023&x),i++),e<=127?n+=String.fromCharCode(e):e<=2047?n+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}function r(t){var e,x=Array(t.length>>2);for(e=0;e<x.length;e++)x[e]=0;for(e=0;e<8*t.length;e+=8)x[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return x}function _(t){for(var e="",x=0;x<32*t.length;x+=8)e+=String.fromCharCode(t[x>>5]>>>x%32&255);return e}function a(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var x=1732584193,n=-271733879,i=-1732584194,c=271733878,r=0;r<t.length;r+=16){var _=x,a=n,s=i,h=c;n=u(n=u(n=u(n=u(n=d(n=d(n=d(n=d(n=o(n=o(n=o(n=o(n=p(n=p(n=p(n=p(n,i=p(i,c=p(c,x=p(x,n,i,c,t[r+0],7,-680876936),n,i,t[r+1],12,-389564586),x,n,t[r+2],17,606105819),c,x,t[r+3],22,-1044525330),i=p(i,c=p(c,x=p(x,n,i,c,t[r+4],7,-176418897),n,i,t[r+5],12,1200080426),x,n,t[r+6],17,-1473231341),c,x,t[r+7],22,-45705983),i=p(i,c=p(c,x=p(x,n,i,c,t[r+8],7,1770035416),n,i,t[r+9],12,-1958414417),x,n,t[r+10],17,-42063),c,x,t[r+11],22,-1990404162),i=p(i,c=p(c,x=p(x,n,i,c,t[r+12],7,1804603682),n,i,t[r+13],12,-40341101),x,n,t[r+14],17,-1502002290),c,x,t[r+15],22,1236535329),i=o(i,c=o(c,x=o(x,n,i,c,t[r+1],5,-165796510),n,i,t[r+6],9,-1069501632),x,n,t[r+11],14,643717713),c,x,t[r+0],20,-373897302),i=o(i,c=o(c,x=o(x,n,i,c,t[r+5],5,-701558691),n,i,t[r+10],9,38016083),x,n,t[r+15],14,-660478335),c,x,t[r+4],20,-405537848),i=o(i,c=o(c,x=o(x,n,i,c,t[r+9],5,568446438),n,i,t[r+14],9,-1019803690),x,n,t[r+3],14,-187363961),c,x,t[r+8],20,1163531501),i=o(i,c=o(c,x=o(x,n,i,c,t[r+13],5,-1444681467),n,i,t[r+2],9,-51403784),x,n,t[r+7],14,1735328473),c,x,t[r+12],20,-1926607734),i=d(i,c=d(c,x=d(x,n,i,c,t[r+5],4,-378558),n,i,t[r+8],11,-2022574463),x,n,t[r+11],16,1839030562),c,x,t[r+14],23,-35309556),i=d(i,c=d(c,x=d(x,n,i,c,t[r+1],4,-1530992060),n,i,t[r+4],11,1272893353),x,n,t[r+7],16,-155497632),c,x,t[r+10],23,-1094730640),i=d(i,c=d(c,x=d(x,n,i,c,t[r+13],4,681279174),n,i,t[r+0],11,-358537222),x,n,t[r+3],16,-722521979),c,x,t[r+6],23,76029189),i=d(i,c=d(c,x=d(x,n,i,c,t[r+9],4,-640364487),n,i,t[r+12],11,-421815835),x,n,t[r+15],16,530742520),c,x,t[r+2],23,-995338651),i=u(i,c=u(c,x=u(x,n,i,c,t[r+0],6,-198630844),n,i,t[r+7],10,1126891415),x,n,t[r+14],15,-1416354905),c,x,t[r+5],21,-57434055),i=u(i,c=u(c,x=u(x,n,i,c,t[r+12],6,1700485571),n,i,t[r+3],10,-1894986606),x,n,t[r+10],15,-1051523),c,x,t[r+1],21,-2054922799),i=u(i,c=u(c,x=u(x,n,i,c,t[r+8],6,1873313359),n,i,t[r+15],10,-30611744),x,n,t[r+6],15,-1560198380),c,x,t[r+13],21,1309151649),i=u(i,c=u(c,x=u(x,n,i,c,t[r+4],6,-145523070),n,i,t[r+11],10,-1120210379),x,n,t[r+2],15,718787259),c,x,t[r+9],21,-343485551),x=v(x,_),n=v(n,a),i=v(i,s),c=v(c,h)}return Array(x,n,i,c)}function s(t,e,x,n,i,c){return v((r=v(v(e,t),v(n,c)))<<(_=i)|r>>>32-_,x);var r,_}function p(t,e,x,n,i,c,r){return s(e&x|~e&n,t,e,i,c,r)}function o(t,e,x,n,i,c,r){return s(e&n|x&~n,t,e,i,c,r)}function d(t,e,x,n,i,c,r){return s(e^x^n,t,e,i,c,r)}function u(t,e,x,n,i,c,r){return s(x^(e|~n),t,e,i,c,r)}function v(t,e){var x=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(x>>16)<<16|65535&x}y.md5=x}();var D=function(){return(new Date).getTime()},k=function(){return D()+""+parseInt(2147483647*Math.random())},C=function(t){return"[object Object]"=={}.toString.call(t)},j=function(t,e){if(C(t)&&C(e))for(var x in e)t[x]=e[x]},q=function(t){var e=[];if(C(t))for(var x in t)"m_param"!==x&&e.push(x+"="+t[x]);return e.join("&")},R=0,b=R++,S=R++,A=R++,I=R++,z=R++,P=R++,T=R++,E=R++,O=R++,L=R++,U=R++,J=R++,N=R++,V=R++,W=R++,M=R++,X=R++,$=R++,B=R++,F=R++,K=R++,Y=R++,G=R++,H=R++,Q=R++,Z=R++,tt=R++,et=R++,xt=R++,nt=R++,it=R++;y.pr.getData=function(t){for(var e={},x=0,n=t.length;x<n;x++){var i=t[x];e[i[0]]=this.env[i[1]]||""}return e};var ct=null;y.pr.setupPageview=function(){var t,i,c,r=this.env,_=D(),d=parseInt(_/1e3),g=function(t){if(C(t))for(var e in t)return!1;return!0}(r[V]),m=x(a),w=x(s),j=x(p),R=x(o);if(!r[J]||g)try{var b=(ht=getCurrentPages())[ht.length-1];if(r[J]=r[J]||b.route||b.__route__||"",g){var L=C(b.options)?b.options:{};r[N]=q(L),r[V]=L,this.setMParam(L.m_param)}}catch(t){}y.setAppData(),r[O]=!1,t=d,i=r,(c=(w||"").split(".")).length>1?i[O]=i[O]||1*c[1]+l<t:i[O]=!0;var U,W,M,X,F,K,Y,Z,tt,et,rt,_t,at,st=function(t,x,n){var i=(t||"").split("|"),c="",r="",_="",a="",s=!0;i.length>=6&&x-i[5]<=v&&(c=i[1],r=i[2],_=i[3],a=i[4],s=!1);var p=n[V],o=[];if(ct&&e[ct]){var d=e[ct];o[0]=d[0],o[1]=encodeURIComponent(d[1]),o[2]=encodeURIComponent(d[2])||"none",o[3]=encodeURIComponent(d[3])||"-",ct=null}p&&p.utm_source&&(o[0]=encodeURIComponent(p.utm_source),o[1]=encodeURIComponent(p.utm_campaign||"")||r,o[2]=encodeURIComponent(p.utm_medium||"")||_,o[3]=encodeURIComponent(p.utm_term||"")||a,a=o[3],s=!0);var u=!1;o.length>0&&"direct"!=o[0]?u=(o[0]!==c||o[1]!==r||o[2]!==_)&&"referral"!==o[2]:o.length>0&&"direct"==o[0]&&("direct"===c||!c)&&(u=o[1]!==r||o[2]!==_||o[3]!==a);var h="";return u&&(c=o[0]||c,r=o[1]||r,_=o[2]||_,a=o[3]||a),(s||u)&&(h=[1,c||"direct",r||"-",_||"none",a||"-",x].join("|")),n[O]=n[O]||u,h}(j,_,r),pt=(et=d,rt=r,_t=(w||"").split("."),at=1,_t.length>1?(rt[O]=rt[O]||1*_t[1]+l<et,at=(rt[O]?1:1*_t[0]+1)||1):rt[O]=!0,rt[P]=at),ot=(U=d,W=r,Y=(m||"").split("."),Z=1,tt=1,Y.length>5?(Z=Y[0]||Z,M=Y[1]||k(),X=Y[2]||U,W[O]?(F=Y[4]||U,K=U,tt=1*Y[5]+1||1):(F=Y[3]||U,K=Y[4]||U,tt=1*Y[5]||1)):(M=k(),X=F=K=U,tt=1),W[xt]=Z,W[S]=M,W[A]=X,W[I]=F,W[z]=K,W[T]=tt,[Z,M,X,F,K,tt].join("."));!function(t){if(t[nt]&&t[nt].pv_sid&&t[nt].pv_seq){var e=1*t[nt].pv_sid,x=1*t[nt].pv_seq;e>99999999||(e>t[T]||e==t[T]&&x>=t[P])&&(t[T]=e,t[P]=x+1)}}(r),st&&n(p,st),pt=[r[P],d].join("."),ot=[r[xt],r[S],r[A],r[I],r[z],r[T]].join("."),n(s,pt),n(a,ot);var dt,ut,vt=function(t,e,x){var n=x[V],i="",c="";if(n&&n.customerinfo)i=n.customerinfo,c=e;else{var r=t instanceof Array?t:[];2==r.length&&e-r[1]<h&&(i=r[0],c=r[1])}return x[Q]=i,i?[i,c]:[]}(x(u),d,r);n(u,vt),r[E]=st||j,dt=this.env,(ut=x("jdwcx")||x("jdzdm"))&&(ut.unionid&&(dt[G]=ut.unionid),ut.wxversion&&(dt[H]=ut.wxversion));try{b=(ht=getCurrentPages())[ht.length-1],L=C(b.options)?b.options:{};var ht,lt,ft=decodeURIComponent(L.scene),gt=new RegExp("(^|&)"+o+"=([^&]*)(&|$)"),mt=ft.match(gt);null!=mt&&(lt=mt[2]),lt&&"DBG"===lt.substring(0,3)?(n(o,lt),R=lt):r[O]&&(n(o,""),R=""),r[it]=R}catch(t){}if(r[O])r[$]="",r[B]="";else{var wt=x(f);r[$]=wt[0],r[B]=wt[1]}n(f,[r[J],r[N]])},y.pr.initPvData=function(t){this.pageLoadTime=D(),this.maxClickDeep=0,t=t||{};var e=this.baseEnv(),x=e.data[0];return x.page_id=this.env[W]||"",x.pname=this.env[M]||this.env[J]||"",x.pparam=this.env[X]||this.env[N]||"",x.sku=this.env[Z]||"",x.shp=this.env[tt]||"",x.tit=this.env[U]||"",x.ldt=this.env[et]||"",j(x.ext,t.ext),e},y.pr.initClickData=function(t){var e,x=this.baseEnv(),n=x.data[0];if(n.eid=t.eid||"",n.eparam=t.eparam||"",n.elevel=t.elevel||"",n.page_id=t.pageId||this.env[W]||"",n.pname=t.pname||this.env[M]||this.env[J]||"",n.pparam=t.pparam||this.env[X]||this.env[N]||"",n.tar=t.target||"",n.x=0,n.y=0,e=t.event,C(e)&&e.type&&e.target){var i=t.event,c=i.touches;if((!c||c.length<1)&&(c=i.changedTouches),c&&c.length>0){n.x=parseInt(c[0].pageX);var r=parseInt(c[0].pageY);n.y=r,r>this.maxClickDeep&&(this.maxClickDeep=r)}}return j(n.ext,t.ext),x},y.pr.initExposureData=y.pr.initClickData,y.pr.initShoppingData=function(t){var e=this.baseEnv(),x=e.data[0];return x.eid=t.eid||"",x.eparam=t.eparam||"",x.elevel=t.elevel||"",x.page_id=t.pageId||this.env[W]||"",x.pname=t.pname||this.env[M]||this.env[J]||"",x.pparam=t.pparam||this.env[X]||this.env[N]||"",x.sku_list=t.shoppingList?JSON.stringify(t.shoppingList):"",j(x.ext,t.ext),e},y.pr.initOrderData=function(t){var e=this.baseEnv(),x=e.data[0];return x.eid=t.eid||"",x.eparam=t.eparam||"",x.elevel=t.elevel||"",x.page_id=t.pageId||this.env[W]||"",x.pname=t.pname||this.env[M]||this.env[J]||"",x.pparam=t.pparam||this.env[X]||this.env[N]||"",x.sku_list=t.orderList?JSON.stringify(t.orderList):"",x.order_total_fee=t.total||0,x.sale_ord_id=t.orderid||"",j(x.ext,t.ext),e},y.pr.initPageUnloadData=function(t){var e=((D()-this.pageLoadTime)/1e3).toFixed(3),x=this.baseEnv(),n=x.data[0];return t=t||{},n.page_id=t.pageId||this.env[W]||"",n.pname=t.pname||this.env[M]||this.env[J]||"",n.pparam=t.pparam||this.env[X]||this.env[N]||"",n.alive_seconds=e,n.click_deep=this.maxClickDeep,j(n.ext,t.ext),x},function(){y.wxDat={};var t=y.wxDat;c({success:function(e){e&&(t.dvc=e.model,t.pixelRatio=(e.pixelRatio||"")+"",t.scr=parseInt(e.windowWidth)+"x"+parseInt(e.windowHeight),t.lang=e.language,t.wxver=e.version,t.sdkver=e.SDKVersion||"")},complete:function(){y.dataReady("sysinfo")}}),r({success:function(e){e&&(t.net=e.networkType)},complete:function(){y.dataReady("netType")}})}(),y.pr.setData=function(t){var e={skuid:[Z],shopid:[tt],title:[U],loadtime:[et],url:[J],urlParam:[N,q],pageId:[W],pname:[M],pparam:[X]},n={account:[F],siteId:[b],appid:[K],openid:[Y],unionid:[G]},i=(t=C(t)?t:{},C(t.urlParam)?t.urlParam:{});this.ext={},this.env[V]=i,this.setMParam(i.m_param);for(var c in e){var r=e[c];this.env[r[0]]=t[c]?r[1]?r[1](t[c]):t[c]:"",delete t[c]}for(var c in n){r=n[c];this.env[r[0]]=t[c]?r[1]?r[1](t[c]):t[c]:this.env[r[0]]||"",delete t[c]}for(var c in t)"ext"!==c&&(this.ext[c]=t[c]);this.env[K]||(this.env[K]=x("appid"))},y.appDat={},y.setAppData=function(t){var e={},i=x(d);j(e,i),j(e,t);for(var c in e)y.appDat[c]=e[c];n(d,e)},y.clearAppData=function(){y.appDat={},function(e){try{t.removeStorageSync(e)}catch(t){}}(d)},y.scene=null,y.setScene=function(t){y.scene=t,ct=t},y.pr.setMParam=function(t){try{var e=JSON.parse(t);this.env[nt]=C(e)?e:{}}catch(t){this.env[nt]={}}},y.pr.baseEnv=function(){var t=this.env,e=y.wxDat,n={cli:_,std:t[b]||"WXAPP-JA2016-1",uuid:t[S]||"",scr:e.scr||"",dvc:e.dvc||"",lang:e.lang||"",appkey:t[H]||"",appid:t[K]||"",openid:t[Y]||"",unionid:t[G]||"",gender:e.gender||"",city:e.city||"",province:e.province||"",country:e.country||"",wxver:e.wxver||"",data:[]},i=[["ctp",J],["par",N],["ref",$],["rpr",B],["seq",P],["vts",T],["pin",F],["fst",A],["pst",I],["vct",z]],c=this.getData(i);return c.jsver="TR1.0.0",c.net=e.net||"",c.lat=e.lat||"",c.lon=e.lon||"",c.speed=e.speed||"",c.accuracy=e.accuracy||"",c.pixelRatio=e.pixelRatio||"",c.jdv=t[E]||"",c.customerInfo=t[Q]||"",c.unpl=x("unpl")||"",c.scene=y.scene||"",c.sdkver=e.sdkver||"",c.ext={},j(c.ext,this.ext),j(c.ext,y.appDat),n.data.push(c),n},y.pr.getSeriesData=function(){var t=this.env,e={uuid:t[S]||"",std:t[b]||"WXAPP-JA2016-1",seq:t[P],vts:t[T]};return t[H]&&(e.appkey=t[H]),t[K]&&(e.appid=t[K]),t[it]&&(e.debugId=t[it]),e},y.initJda=function(){var t=x(a);if(!t){var e=D();t=[1,k(),e,e,e,0].join("."),n(a,t)}return t},module.exports={init:function(t){return y.getInstance().exports()},usePlugin:function(t){if(t)try{pluginObj=requirePlugin(t)}catch(t){}},setAppData:function(t){y.setAppData(t)},clearAppData:function(){y.clearAppData()},setScene:function(t){y.setScene(t)}}}(Taro);
|
|
4
|
+
/* eslint-disable no-new */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Taro from "@tarojs/taro";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import DraException from "../utils/jm-js-agent";
|
package/dist/utils/index.h5.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
nativePageShowToast, ToastAndroidType,
|
|
3
2
|
ToastIosType
|
|
4
3
|
getAppChannelType, isAndroidDevice, isH5AndJdShopView,
|
|
5
4
|
isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
|
|
6
5
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie
|
|
7
6
|
addHttps, clearTaroStorageKey, countStringify, dateFormat, dealAddress, dealShopContentData as originDealShopContentData, debounce, filterUrlQueryData, formatTabActiveMenuType, getQualityImage, getTaroStorageKeyValue,
|
|
8
7
|
getWxAppCookieStr, isH5, isJdMin, isWxMin,
|
|
9
8
|
isWxMinAndWxapp, lodashThrottle, objectToUrlEncode, parseQueryUrlString, removeTaroStorageKey, setLowSmallPicUrl,
|
|
10
9
|
setTaroStorage, showFailToast,
|
|
11
10
|
showNormalToast, showSuccessToast, sliceArrToChunkList, throttle
|
|
12
11
|
<span class="d-shop-loading-icon"></span>
|
|
13
12
|
<p class="d-shop-text">${text}</p>
|
|
14
13
|
</div>`
|
|
15
14
|
return originDealShopContentData(pageData, DraJSAgentReport)
|
|
16
15
|
isJdApp,
|
|
17
16
|
isWxApp,
|
|
18
17
|
isIosDevice,
|
|
19
18
|
isAndroidDevice,
|
|
20
19
|
isJdAndIosDevice,
|
|
21
20
|
isJdAndAndroidDevice,
|
|
22
21
|
isWxMin,
|
|
23
22
|
isWxMinAndWxapp,
|
|
24
23
|
isJdMin,
|
|
25
24
|
isH5,
|
|
26
25
|
isH5AndJdShopView,
|
|
27
26
|
isH5AndJdShopViewNativeScroll,
|
|
28
27
|
isH5AndJingGouMini,
|
|
29
28
|
isWxMiniH5View,
|
|
30
29
|
urlCookie,
|
|
31
30
|
sliceArrToChunkList,
|
|
32
31
|
dealAddress,
|
|
33
32
|
objectToUrlEncode,
|
|
34
33
|
parseQueryUrlString,
|
|
35
34
|
setLowSmallPicUrl,
|
|
36
35
|
setTaroStorage,
|
|
37
36
|
getTaroStorageKeyValue,
|
|
38
37
|
removeTaroStorageKey,
|
|
39
38
|
clearTaroStorageKey,
|
|
40
39
|
getQualityImage,
|
|
41
40
|
countStringify,
|
|
42
41
|
getWxAppCookieStr,
|
|
43
42
|
getSystemInfos,
|
|
44
43
|
pxTransformFromData,
|
|
45
44
|
dateFormat,
|
|
46
45
|
throttle,
|
|
47
46
|
lodashThrottle,
|
|
48
47
|
debounce,
|
|
49
48
|
addHttps,
|
|
50
49
|
commonShowSuccessToast as showSuccessToast,
|
|
51
50
|
commonShowFailToast as showFailToast,
|
|
52
51
|
commonShowNormalToast as showNormalToast,
|
|
53
52
|
showShopLoading,
|
|
54
53
|
hideShopLoading,
|
|
55
54
|
getAppChannelType,
|
|
56
55
|
formatTabActiveMenuType,
|
|
57
56
|
filterUrlQueryData,
|
|
57
|
+
import Taro from '@tarojs/taro'
|
|
58
58
|
nativePageShowToast, ToastAndroidType,
|
|
59
59
|
ToastIosType
|
|
60
60
|
getAppChannelType, isAndroidDevice, isH5AndJdShopView,
|
|
61
61
|
isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
|
|
62
62
|
isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie
|
|
63
63
|
addHttps, clearTaroStorageKey, countStringify, dateFormat, dealAddress, dealShopContentData as originDealShopContentData, debounce, filterUrlQueryData, formatTabActiveMenuType, getQualityImage, getTaroStorageKeyValue,
|
|
64
64
|
getWxAppCookieStr, isH5, isJdMin, isWxMin,
|
|
65
65
|
isWxMinAndWxapp, lodashThrottle, objectToUrlEncode, parseQueryUrlString, removeTaroStorageKey, setLowSmallPicUrl,
|
|
66
66
|
setTaroStorage, showFailToast,
|
|
67
67
|
showNormalToast, showSuccessToast, sliceArrToChunkList, throttle
|
|
68
68
|
<span class="d-shop-loading-icon"></span>
|
|
69
69
|
<p class="d-shop-text">${text}</p>
|
|
70
70
|
</div>`
|
|
71
71
|
return originDealShopContentData(pageData, DraJSAgentReport)
|
|
72
72
|
isJdApp,
|
|
73
73
|
isWxApp,
|
|
74
74
|
isIosDevice,
|
|
75
75
|
isAndroidDevice,
|
|
76
76
|
isJdAndIosDevice,
|
|
77
77
|
isJdAndAndroidDevice,
|
|
78
78
|
isWxMin,
|
|
79
79
|
isWxMinAndWxapp,
|
|
80
80
|
isJdMin,
|
|
81
81
|
isH5,
|
|
82
82
|
isH5AndJdShopView,
|
|
83
83
|
isH5AndJdShopViewNativeScroll,
|
|
84
84
|
isH5AndJingGouMini,
|
|
85
85
|
isWxMiniH5View,
|
|
86
86
|
urlCookie,
|
|
87
87
|
sliceArrToChunkList,
|
|
88
88
|
dealAddress,
|
|
89
89
|
objectToUrlEncode,
|
|
90
90
|
parseQueryUrlString,
|
|
91
91
|
setLowSmallPicUrl,
|
|
92
92
|
setTaroStorage,
|
|
93
93
|
getTaroStorageKeyValue,
|
|
94
94
|
removeTaroStorageKey,
|
|
95
95
|
clearTaroStorageKey,
|
|
96
96
|
getQualityImage,
|
|
97
97
|
countStringify,
|
|
98
98
|
getWxAppCookieStr,
|
|
99
99
|
getSystemInfos,
|
|
100
100
|
pxTransformFromData,
|
|
101
101
|
dateFormat,
|
|
102
102
|
throttle,
|
|
103
103
|
lodashThrottle,
|
|
104
104
|
debounce,
|
|
105
105
|
addHttps,
|
|
106
106
|
commonShowSuccessToast as showSuccessToast,
|
|
107
107
|
commonShowFailToast as showFailToast,
|
|
108
108
|
commonShowNormalToast as showNormalToast,
|
|
109
109
|
showShopLoading,
|
|
110
110
|
hideShopLoading,
|
|
111
111
|
getAppChannelType,
|
|
112
112
|
formatTabActiveMenuType,
|
|
113
113
|
filterUrlQueryData,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.DraException=t():e.DraException=t()}(self,(function(){return function(){var e={223:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 a,s=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}var s=Object.prototype.toString;function c(){var e,r,n,o,i,a,s=arguments.length<=0?void 0:arguments[0],l=1,p=arguments.length,h=!1;for("boolean"===typeof s?(h=s,s=(arguments.length<=1?void 0:arguments[1])||{},l=2):("object"!==t(s)&&"function"!==typeof s||null==s)&&(s={});l<p;++l)if(null!=(e=l<0||arguments.length<=l?void 0:arguments[l]))for(r in e)n=s[r],s!==(o=e[r])&&(h&&o&&(f(o)||(i=u(o)))?(i?(i=!1,a=n&&u(n)?n:[]):a=n&&f(n)?n:{},s[r]=c(h,a,o)):"undefined"!==typeof o&&(s[r]=o));return s}function u(e){return"[object Array]"===s.call(e)}function f(e){if(!e||"[object Object]"!==s.call(e))return!1;var t,r=Object.prototype.hasOwnProperty,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return"undefined"===typeof t||r.call(e,t)}function l(e,r,n){if(n>=3)return encodeURIComponent(r)+"=[RECURSIVE]";n=n+1||1;var o=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=i&&null!=e[i]){var a=r?"".concat(r,"[").concat(i,"]"):i,s=e[i],c="object"===t(s)?l(s,a,n):encodeURIComponent(a)+"="+encodeURIComponent(s);o.push(c)}return o.sort().join("&")}function p(e){var t,r,n=[],o=a(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;r=i,"[object String]"===s.call(r)?n.push(i.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):i&&i.source&&n.push(i.source)}}catch(c){o.e(c)}finally{o.f()}return n.length?new RegExp(n.join("|"),"i"):null}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/(^\s*)|(\s*$)/g,"")}var d=new function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(t){var r,n,o,i,a,s,c,u="",f=0;for(t=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(t);f<t.length;)i=(r=t.charCodeAt(f++))>>2,a=(3&r)<<4|(n=t.charCodeAt(f++))>>4,s=(15&n)<<2|(o=t.charCodeAt(f++))>>6,c=63&o,isNaN(n)?s=c=64:isNaN(o)&&(c=64),u=u+e.charAt(i)+e.charAt(a)+e.charAt(s)+e.charAt(c);return u},this.decode=function(t){var r,n,o,i,a,s,c="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<t.length;)r=e.indexOf(t.charAt(u++))<<2|(i=e.indexOf(t.charAt(u++)))>>4,n=(15&i)<<4|(a=e.indexOf(t.charAt(u++)))>>2,o=(3&a)<<6|(s=e.indexOf(t.charAt(u++))),c+=String.fromCharCode(r),64!=a&&(c+=String.fromCharCode(n)),64!=s&&(c+=String.fromCharCode(o));return c=function(e){var t,r,n,o="",i=0;t=r=0;for(;i<e.length;)(t=e.charCodeAt(i))<128?(o+=String.fromCharCode(t),i++):t>191&&t<224?(r=e.charCodeAt(i+1),o+=String.fromCharCode((31&t)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),n=e.charCodeAt(i+2),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),i+=3);return o}(c),c}};function g(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.unshift("<JS Agent>:"),console.warn.apply(console,t)}function y(e,t){g("\u53d1\u9001\u670d\u52a1\u8bf7\u6c42\uff1a",e+="?"+l(t));var r=new Image;return r.src=e,r}function v(e){var t,r=[],n=/^\s*at((?:\s\S+)+) \(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,o=/^\s*(.+)@\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a(e.stack.split("\n"));try{for(i.s();!(t=i.n()).done;){var s=t.value,c=n.exec(s)||o.exec(s);if(c){var u={url:c[2],func:h(c[1]),line:Number(c[3]),column:Number(c[4])};r.push(u)}}}catch(e){i.e(e)}finally{i.f()}return r}var w=function(){function e(){r(this,e),this.init(),this.limit=5,this.actionInfo={userTraceDom:[],userTraceEvent:[],userTraceTs:[]}}return o(e,[{key:"pushLimit",value:function(e,t){e.push(t),e.length>this.limit&&e.shift()}},{key:"addItem",value:function(e,t){this.pushLimit(this.actionInfo.userTraceDom,encodeURIComponent(e)),this.pushLimit(this.actionInfo.userTraceEvent,t),this.pushLimit(this.actionInfo.userTraceTs,(new Date).getTime())}},{key:"init",value:function(){var e=this;window.addEventListener("click",(function(t){e.addItem(function(e){if(e instanceof Element)try{for(var r=[];e&&e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n+="#"+e.id,r.unshift(n);break}for(var o=e,i=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&i++;if(1!=i&&(n+=":nth-of-type("+i+")"),r.unshift(n),!(e=e.parentNode))break}return r.join(">").replace(/div/g,"d").replace(/span/g,"s").replace(/header/g,"h").replace(/footer/g,"f").replace(/nth-of-type/g,"nth")}catch(t){return""}}(t.target),"click")}),!1)}},{key:"getActionInfo",value:function(){return this.actionInfo}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}]),e}(),m=navigator.userAgent.toLowerCase(),_=m.split(";"),b=-1!=m.indexOf("jdapp"),T="jdlog"===_[1]?"android"===_[2]:"android"===_[1],E="jdlog"===_[1]?"iphone"===_[2]:"iphone"===_[1],C=-1!=m.indexOf("ipad");var k={id:null,endpoint:"//h5speed.m.jd.com/v3/exception",rate:1,ignoreErrors:[],ignoreUrls:[],stackLimit:10,flag:10,autoReport:!0},S={net:1,busniess:2,business:2,others:3,code:4,resource:5,unhandlerejection:6,fetcherror:7,ajaxerror:8,ajaxtimeout:9},x=1,A=2,O=function(){function e(){var t=this;r(this,e),this.VERSION="3.0.3-alpha.0",this._config=null,this._installed=!1,this._ignoreOnError=!1,this._lastException=null,this._needReport=!1,this._plugins={},this._ignoreErrors=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/(\w*\s*)missing \) after argument list(\w*\s*)/,/(\w*\s*)\'offsetWidth\'(\s*)of(\s*)null(\s*\w*)/],this._ignoreUrls=[/.jd-jssdk.min.js$/],this._interceptors=[],this._action=w.getInstance(),this._autoReport=!0,function(){var e=window&&window.navigator?navigator.userAgent:"",t=/^jdapp/i.test(e),r=/ip(hone|od)|ipad/i.test(e),n=/android/i.test(e)&&!r;return new Promise((function(e){if(t){var o="getNetWorkType";window[o]||(window[o]=function(t){e({status:"0",msg:"success",data:t})});try{r&&window.webkit?window.webkit.messageHandlers.JDAppUnite.postMessage({method:"getNetWorkType",params:o}):n&&window.JDAppUnite&&window.JDAppUnite.getNetWorkType(o)}catch(s){e({msg:"fail",data:"error"})}}else{if(window&&window.navigator){var i=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{},a=i.type||i.effectiveType||"unknown";e({msg:"success",data:a})}e({msg:"fail",data:"error"})}}))}().then((function(e){"success"===e.msg&&(t.network=e.data)})).catch((function(e){}))}return o(e,[{key:"init",value:function(e){if(this._config=c({},k,e),this._needReport=Math.random()<this._config.rate,this._config.flag){if(this._installed)return;this._autoReport=!!this._config.autoReport,this._ignoreErrors=this._ignoreErrors.concat(this._config.ignoreErrors),this._ignoreErrors=p(this._ignoreErrors),this._ignoreUrls=this._ignoreUrls.concat(this._config.ignoreUrls),this._ignoreUrls=p(this._ignoreUrls),this._wrapBuiltIns(),this._installPlugins(),this._installed=!0}else g("config.flag \u6ca1\u6709\u914d\u7f6e\uff0c\u5fc5\u987b\u914d\u7f6eflag.");return this}},{key:"addPlugin",value:function(e){if("function"===typeof e&&e.name&&!this._plugins[e.name]){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this._plugins[e.name]={args:r,fn:e,installed:!1},this._installed&&this._installPlugins()}return this}},{key:"addInterceptor",value:function(e){"function"===typeof e&&(this._interceptors||(this._interceptors=[]),this._interceptors.push(e))}},{key:"removeInterceptor",value:function(e){if("function"===typeof e&&this._interceptors){var t=this._interceptors.indexOf(e);t>-1&&this._interceptors.splice(t,1)}}},{key:"_installPlugins",value:function(){for(var e in this._plugins){var t=this._plugins[e];t.installed||(t.fn.apply(this,[this].concat(t.args)),t.installed=!0)}}},{key:"reportException",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this,i={type:e.name,stack:v(e).slice(0,o._config.stackLimit)};if(i.stack.length){var a=i.stack[0];i.row=a.line,i.col=a.column,i.file=a.url}var s={errType:S.code,errCode:750,errMsg:e.message,exceptionInfo:i};t&&(s.extraData=t),s.errLevel="number"===typeof r?r:4,s.reType=n?x:A,this._ignoreErrors&&this._ignoreErrors.test(e.message)||this._ignoreUrls&&this._ignoreUrls.test(e.file)||this._send(s)}},{key:"report",value:function(e,r,n,o,i){var a;if(1===arguments.length&&"object"===t(arguments[0])){var s=arguments[0];a={errType:s.errType,errCode:s.errCode,errMsg:s.errMsg,errLevel:4,reType:x}}else a={errType:e,errCode:r,errMsg:n,reType:A},o&&(a.extraData=o),a.errLevel="number"===typeof i?i:4;this._send(a)}},{key:"reportByJSbridge",value:function(e,t,r,n){var o={errType:e,errCode:t,errMsg:r};n&&(o.extraData=n),b?this._sendByJSbridge(o):this._send(o)}},{key:"wrap",value:function(e){if(e){if(e._wrapped)return e._wrapped;var t=this;if("function"!==typeof e&&"function"===typeof e.handleEvent){var r=e.handleEvent;return e.handleEvent=function(){try{for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r.apply(e,o)}catch(a){throw t.reportException(a,null,4,!0),t._ignoreNextOnError(),a}},e._wrapped=e,e}var n=function(){try{for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}catch(i){throw t.reportException(i,null,4,!0),t._ignoreNextOnError(),i}};return"function"!==typeof e?e:(e._wrapped=n,n)}}},{key:"_wrapBuiltIns",value:function(){if(this._autoReport){for(var e=this,t=0,r=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];t<r.length;t++){o(r[t])}n(window,"setTimeout",a),n(window,"setInterval",a),window.requestAnimationFrame&&n(window,"requestAnimationFrame",i),window.$&&window.$.fn&&window.$.fn.ready&&n($.fn,"ready",i),n(window,"onerror",(function(t){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e._ignoreOnError||e._ignoreErrors&&e._ignoreErrors.test(n[0])||e._ignoreUrls&&e._ignoreUrls.test(n[1])||e.reportException(n[4]||new Error("window.onerror"),null,4,!0),t&&t.apply(this,n)}})),window.addEventListener("error",(function(t){var r=t.target;if("SCRIPT"===r.tagName||"LINK"===r.tagName){var n=r.src||r.href;e.report({errType:S.resource,errCode:0,errMsg:"".concat(n," \u6ca1\u6709\u52a0\u8f7d\u6210\u529f.")})}}),!0)}function n(e,t,r){var n=e[t];e[t]=r(n)}function o(t){var r=window[t]&&window[t].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(n(r,"addEventListener",(function(t){return function(r,n,o,i){return t.call(this,r,e.wrap(n),o,i)}})),n(r,"removeEventListener",(function(e){return function(t,r,n){return e.call(this,t,r&&r._wrapped||r,n)}})))}function i(t){return function(r){return t.call(this,e.wrap(r))}}function a(t){return function(r,n){return t.call(this,e.wrap(r),n)}}}},{key:"_send",value:function(e){if(this._interceptors&&this._interceptors.length>0){var t,r=a(this._interceptors);try{for(r.s();!(t=r.n()).done;){if(!(e=(0,t.value)(e)))return}}catch(p){r.e(p)}finally{r.f()}}var n=JSON.stringify(e);if(n!==this._lastException&&(this._lastException=n,this._needReport)){var o=this._action.getActionInfo(),i=o.userTraceDom,s=o.userTraceEvent,u=o.userTraceTs,f=document.getElementsByTagName("title")[0]&&document.getElementsByTagName("title")[0].innerText||"",l={flag:this._config.flag,rts:Date.now(),libVer:this.VERSION,url:window.location.href.split("?")[0]||"",title:f,userTraceDom:i,userTraceEvent:s,userTraceTs:u,network:this.network||"unknown"};c(l,e),g(l),y(this._config.endpoint,{data:d.encode(JSON.stringify(l))})}}},{key:"_sendByJSbridge",value:function(e){if(this._interceptors&&this._interceptors.length>0){var t,r=a(this._interceptors);try{for(r.s();!(t=r.n()).done;){if(!(e=(0,t.value)(e)))return}}catch(w){r.e(w)}finally{r.f()}}var n=e,o=n.errType,i=n.errCode,s=n.errMsg,c=n.extraData,u=void 0===c?{}:c,f=this._action.getActionInfo(),l=f.userTraceDom,p=f.userTraceEvent,h=f.userTraceTs,d=document.getElementsByTagName("title")[0]&&document.getElementsByTagName("title")[0].innerText||"",y={errCode:i,flag:this._config.flag,rts:Date.now(),libVer:this.VERSION,title:d,userTraceDom:l,userTraceEvent:p,userTraceTs:h,network:this.network||"unknown"},v={businessType:"exceptionReport",params:{functionInfo:"".concat(o),errMsg:s,exceptionInfo:JSON.stringify(y),url:window.location.href.split("?")[0]||"",extra:JSON.stringify(u)}};g(v);try{!function(e){if(E||C)try{window.webkit&&window.webkit.messageHandlers.JDAppUnite.postMessage({method:"notifyMessageToNative",params:e})}catch(t){console.log("jsbridge \u4e0a\u62a5\u5f02\u5e38",t)}else if(T)try{window.JDAppUnite&&window.JDAppUnite.notifyMessageToNative(e)}catch(t){console.log("jsbridge \u4e0a\u62a5\u5f02\u5e38",t)}}(JSON.stringify(v))}catch(m){console.warn("report by bridge error...",m)}}},{key:"_ignoreNextOnError",value:function(){var e=this;this._ignoreOnError=!0,setTimeout((function(){return e._ignoreOnError=!1}))}}]),e}(),I=window.JSAgent,N=new O;N.noConflict=function(){return window.JSAgent=I,N},N.EXCEPTION_TYPE=S,e.exports=N}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n);var e=r(223),t=r.n(e);n.default={JSAgent:t()}}(),n}()}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ParamsSign from "@legos/js-security-jdxcx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class FingerReport {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const paramsSign = ({data}) => {
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Secure Hash Algorithm (SHA256)
|
|
4
|
+
* http://www.webtoolkit.info/
|
|
5
|
+
*
|
|
6
|
+
* Original code by Angel Marin, Paul Johnston.
|
|
7
|
+
*
|
|
8
|
+
**/
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
function SHA256(s) {
|
|
11
|
+
var chrsz = 8
|
|
12
|
+
var hexcase = 0
|
|
13
|
+
function safe_add(x, y) {
|
|
14
|
+
var lsw = (x & 0xffff) + (y & 0xffff)
|
|
15
|
+
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
|
|
16
|
+
return (msw << 16) | (lsw & 0xffff)
|
|
17
|
+
}
|
|
18
|
+
function S(X, n) {
|
|
19
|
+
return (X >>> n) | (X << (32 - n))
|
|
20
|
+
}
|
|
21
|
+
function R(X, n) {
|
|
22
|
+
return X >>> n
|
|
23
|
+
}
|
|
24
|
+
function Ch(x, y, z) {
|
|
25
|
+
return (x & y) ^ (~x & z)
|
|
26
|
+
}
|
|
27
|
+
function Maj(x, y, z) {
|
|
28
|
+
return (x & y) ^ (x & z) ^ (y & z)
|
|
29
|
+
}
|
|
30
|
+
function Sigma0256(x) {
|
|
31
|
+
return S(x, 2) ^ S(x, 13) ^ S(x, 22)
|
|
32
|
+
}
|
|
33
|
+
function Sigma1256(x) {
|
|
34
|
+
return S(x, 6) ^ S(x, 11) ^ S(x, 25)
|
|
35
|
+
}
|
|
36
|
+
function Gamma0256(x) {
|
|
37
|
+
return S(x, 7) ^ S(x, 18) ^ R(x, 3)
|
|
38
|
+
}
|
|
39
|
+
function Gamma1256(x) {
|
|
40
|
+
return S(x, 17) ^ S(x, 19) ^ R(x, 10)
|
|
41
|
+
}
|
|
42
|
+
function core_sha256(m, l) {
|
|
43
|
+
var K = new Array(
|
|
44
|
+
0x428a2f98,
|
|
45
|
+
0x71374491,
|
|
46
|
+
0xb5c0fbcf,
|
|
47
|
+
0xe9b5dba5,
|
|
48
|
+
0x3956c25b,
|
|
49
|
+
0x59f111f1,
|
|
50
|
+
0x923f82a4,
|
|
51
|
+
0xab1c5ed5,
|
|
52
|
+
0xd807aa98,
|
|
53
|
+
0x12835b01,
|
|
54
|
+
0x243185be,
|
|
55
|
+
0x550c7dc3,
|
|
56
|
+
0x72be5d74,
|
|
57
|
+
0x80deb1fe,
|
|
58
|
+
0x9bdc06a7,
|
|
59
|
+
0xc19bf174,
|
|
60
|
+
0xe49b69c1,
|
|
61
|
+
0xefbe4786,
|
|
62
|
+
0xfc19dc6,
|
|
63
|
+
0x240ca1cc,
|
|
64
|
+
0x2de92c6f,
|
|
65
|
+
0x4a7484aa,
|
|
66
|
+
0x5cb0a9dc,
|
|
67
|
+
0x76f988da,
|
|
68
|
+
0x983e5152,
|
|
69
|
+
0xa831c66d,
|
|
70
|
+
0xb00327c8,
|
|
71
|
+
0xbf597fc7,
|
|
72
|
+
0xc6e00bf3,
|
|
73
|
+
0xd5a79147,
|
|
74
|
+
0x6ca6351,
|
|
75
|
+
0x14292967,
|
|
76
|
+
0x27b70a85,
|
|
77
|
+
0x2e1b2138,
|
|
78
|
+
0x4d2c6dfc,
|
|
79
|
+
0x53380d13,
|
|
80
|
+
0x650a7354,
|
|
81
|
+
0x766a0abb,
|
|
82
|
+
0x81c2c92e,
|
|
83
|
+
0x92722c85,
|
|
84
|
+
0xa2bfe8a1,
|
|
85
|
+
0xa81a664b,
|
|
86
|
+
0xc24b8b70,
|
|
87
|
+
0xc76c51a3,
|
|
88
|
+
0xd192e819,
|
|
89
|
+
0xd6990624,
|
|
90
|
+
0xf40e3585,
|
|
91
|
+
0x106aa070,
|
|
92
|
+
0x19a4c116,
|
|
93
|
+
0x1e376c08,
|
|
94
|
+
0x2748774c,
|
|
95
|
+
0x34b0bcb5,
|
|
96
|
+
0x391c0cb3,
|
|
97
|
+
0x4ed8aa4a,
|
|
98
|
+
0x5b9cca4f,
|
|
99
|
+
0x682e6ff3,
|
|
100
|
+
0x748f82ee,
|
|
101
|
+
0x78a5636f,
|
|
102
|
+
0x84c87814,
|
|
103
|
+
0x8cc70208,
|
|
104
|
+
0x90befffa,
|
|
105
|
+
0xa4506ceb,
|
|
106
|
+
0xbef9a3f7,
|
|
107
|
+
0xc67178f2
|
|
108
|
+
)
|
|
109
|
+
var HASH = new Array(0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19)
|
|
110
|
+
var W = new Array(64)
|
|
111
|
+
var a, b, c, d, e, f, g, h, i, j
|
|
112
|
+
var T1, T2
|
|
113
|
+
m[l >> 5] |= 0x80 << (24 - (l % 32))
|
|
114
|
+
m[(((l + 64) >> 9) << 4) + 15] = l
|
|
115
|
+
for (var i = 0; i < m.length; i += 16) {
|
|
116
|
+
a = HASH[0]
|
|
117
|
+
b = HASH[1]
|
|
118
|
+
c = HASH[2]
|
|
119
|
+
d = HASH[3]
|
|
120
|
+
e = HASH[4]
|
|
121
|
+
f = HASH[5]
|
|
122
|
+
g = HASH[6]
|
|
123
|
+
h = HASH[7]
|
|
124
|
+
for (var j = 0; j < 64; j++) {
|
|
125
|
+
if (j < 16) W[j] = m[j + i]
|
|
126
|
+
else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16])
|
|
127
|
+
T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j])
|
|
128
|
+
T2 = safe_add(Sigma0256(a), Maj(a, b, c))
|
|
129
|
+
h = g
|
|
130
|
+
g = f
|
|
131
|
+
f = e
|
|
132
|
+
e = safe_add(d, T1)
|
|
133
|
+
d = c
|
|
134
|
+
c = b
|
|
135
|
+
b = a
|
|
136
|
+
a = safe_add(T1, T2)
|
|
137
|
+
}
|
|
138
|
+
HASH[0] = safe_add(a, HASH[0])
|
|
139
|
+
HASH[1] = safe_add(b, HASH[1])
|
|
140
|
+
HASH[2] = safe_add(c, HASH[2])
|
|
141
|
+
HASH[3] = safe_add(d, HASH[3])
|
|
142
|
+
HASH[4] = safe_add(e, HASH[4])
|
|
143
|
+
HASH[5] = safe_add(f, HASH[5])
|
|
144
|
+
HASH[6] = safe_add(g, HASH[6])
|
|
145
|
+
HASH[7] = safe_add(h, HASH[7])
|
|
146
|
+
}
|
|
147
|
+
return HASH
|
|
148
|
+
}
|
|
149
|
+
function str2binb(str) {
|
|
150
|
+
var bin = Array()
|
|
151
|
+
var mask = (1 << chrsz) - 1
|
|
152
|
+
for (var i = 0; i < str.length * chrsz; i += chrsz) {
|
|
153
|
+
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - (i % 32))
|
|
154
|
+
}
|
|
155
|
+
return bin
|
|
156
|
+
}
|
|
157
|
+
function Utf8Encode(string) {
|
|
158
|
+
string = string.replace(/\r\n/g, '\n')
|
|
159
|
+
var utftext = ''
|
|
160
|
+
for (var n = 0; n < string.length; n++) {
|
|
161
|
+
var c = string.charCodeAt(n)
|
|
162
|
+
if (c < 128) {
|
|
163
|
+
utftext += String.fromCharCode(c)
|
|
164
|
+
} else if (c > 127 && c < 2048) {
|
|
165
|
+
utftext += String.fromCharCode((c >> 6) | 192)
|
|
166
|
+
utftext += String.fromCharCode((c & 63) | 128)
|
|
167
|
+
} else {
|
|
168
|
+
utftext += String.fromCharCode((c >> 12) | 224)
|
|
169
|
+
utftext += String.fromCharCode(((c >> 6) & 63) | 128)
|
|
170
|
+
utftext += String.fromCharCode((c & 63) | 128)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return utftext
|
|
174
|
+
}
|
|
175
|
+
function binb2hex(binarray) {
|
|
176
|
+
var hex_tab = hexcase ? '0123456789ABCDEF' : '0123456789abcdef'
|
|
177
|
+
var str = ''
|
|
178
|
+
for (var i = 0; i < binarray.length * 4; i++) {
|
|
179
|
+
str +=
|
|
180
|
+
hex_tab.charAt((binarray[i >> 2] >> ((3 - (i % 4)) * 8 + 4)) & 0xf) +
|
|
181
|
+
hex_tab.charAt((binarray[i >> 2] >> ((3 - (i % 4)) * 8)) & 0xf)
|
|
182
|
+
}
|
|
183
|
+
return str
|
|
184
|
+
}
|
|
185
|
+
s = Utf8Encode(s)
|
|
186
|
+
return binb2hex(core_sha256(str2binb(s), s.length * chrsz))
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
module.exports = {
|
|
190
|
+
sha256_digest: SHA256,
|
|
191
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import JdDraProfileAndException from "./jm-js-agent-jd-profile";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports.JdDraProfileAndException=e():t.JdDraProfileAndException=e()}(self,(function(){return function(){var t={223:function(t){function e(t){return e="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},e(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"===typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 a,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}var s=Object.prototype.toString;function c(){var t,n,r,i,o,a,s=arguments.length<=0?void 0:arguments[0],l=1,p=arguments.length,d=!1;for("boolean"===typeof s?(d=s,s=(arguments.length<=1?void 0:arguments[1])||{},l=2):("object"!==e(s)&&"function"!==typeof s||null==s)&&(s={});l<p;++l)if(null!=(t=l<0||arguments.length<=l?void 0:arguments[l]))for(n in t)r=s[n],s!==(i=t[n])&&(d&&i&&(f(i)||(o=u(i)))?(o?(o=!1,a=r&&u(r)?r:[]):a=r&&f(r)?r:{},s[n]=c(d,a,i)):"undefined"!==typeof i&&(s[n]=i));return s}function u(t){return"[object Array]"===s.call(t)}function f(t){if(!t||"[object Object]"!==s.call(t))return!1;var e,n=Object.prototype.hasOwnProperty,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return"undefined"===typeof e||n.call(t,e)}function l(t,n,r){if(r>=3)return encodeURIComponent(n)+"=[RECURSIVE]";r=r+1||1;var i=[];for(var o in t)if(t.hasOwnProperty(o)&&null!=o&&null!=t[o]){var a=n?"".concat(n,"[").concat(o,"]"):o,s=t[o],c="object"===e(s)?l(s,a,r):encodeURIComponent(a)+"="+encodeURIComponent(s);i.push(c)}return i.sort().join("&")}function p(t){var e,n,r=[],i=a(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;n=o,"[object String]"===s.call(n)?r.push(o.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):o&&o.source&&r.push(o.source)}}catch(c){i.e(c)}finally{i.f()}return r.length?new RegExp(r.join("|"),"i"):null}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.replace(/(^\s*)|(\s*$)/g,"")}var h=new function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(e){var n,r,i,o,a,s,c,u="",f=0;for(e=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):r>127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(e);f<e.length;)o=(n=e.charCodeAt(f++))>>2,a=(3&n)<<4|(r=e.charCodeAt(f++))>>4,s=(15&r)<<2|(i=e.charCodeAt(f++))>>6,c=63&i,isNaN(r)?s=c=64:isNaN(i)&&(c=64),u=u+t.charAt(o)+t.charAt(a)+t.charAt(s)+t.charAt(c);return u},this.decode=function(e){var n,r,i,o,a,s,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)n=t.indexOf(e.charAt(u++))<<2|(o=t.indexOf(e.charAt(u++)))>>4,r=(15&o)<<4|(a=t.indexOf(e.charAt(u++)))>>2,i=(3&a)<<6|(s=t.indexOf(e.charAt(u++))),c+=String.fromCharCode(n),64!=a&&(c+=String.fromCharCode(r)),64!=s&&(c+=String.fromCharCode(i));return c=function(t){var e,n,r,i="",o=0;e=n=0;for(;o<t.length;)(e=t.charCodeAt(o))<128?(i+=String.fromCharCode(e),o++):e>191&&e<224?(n=t.charCodeAt(o+1),i+=String.fromCharCode((31&e)<<6|63&n),o+=2):(n=t.charCodeAt(o+1),r=t.charCodeAt(o+2),i+=String.fromCharCode((15&e)<<12|(63&n)<<6|63&r),o+=3);return i}(c),c}};function g(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.unshift("<JS Agent>:"),console.warn.apply(console,e)}function m(t,e){g("\u53d1\u9001\u670d\u52a1\u8bf7\u6c42\uff1a",t+="?"+l(e));var n=new Image;return n.src=t,n}function v(t){var e,n=[],r=/^\s*at((?:\s\S+)+) \(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=/^\s*(.+)@\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,o=a(t.stack.split("\n"));try{for(o.s();!(e=o.n()).done;){var s=e.value,c=r.exec(s)||i.exec(s);if(c){var u={url:c[2],func:d(c[1]),line:Number(c[3]),column:Number(c[4])};n.push(u)}}}catch(t){o.e(t)}finally{o.f()}return n}var y=function(){function t(){n(this,t),this.init(),this.limit=5,this.actionInfo={userTraceDom:[],userTraceEvent:[],userTraceTs:[]}}return i(t,[{key:"pushLimit",value:function(t,e){t.push(e),t.length>this.limit&&t.shift()}},{key:"addItem",value:function(t,e){this.pushLimit(this.actionInfo.userTraceDom,encodeURIComponent(t)),this.pushLimit(this.actionInfo.userTraceEvent,e),this.pushLimit(this.actionInfo.userTraceTs,(new Date).getTime())}},{key:"init",value:function(){var t=this;window.addEventListener("click",(function(e){t.addItem(function(t){if(t instanceof Element)try{for(var n=[];t&&t.nodeType===Node.ELEMENT_NODE;){var r=t.nodeName.toLowerCase();if(t.id){r+="#"+t.id,n.unshift(r);break}for(var i=t,o=1;i=i.previousElementSibling;)i.nodeName.toLowerCase()==r&&o++;if(1!=o&&(r+=":nth-of-type("+o+")"),n.unshift(r),!(t=t.parentNode))break}return n.join(">").replace(/div/g,"d").replace(/span/g,"s").replace(/header/g,"h").replace(/footer/g,"f").replace(/nth-of-type/g,"nth")}catch(e){return""}}(e.target),"click")}),!1)}},{key:"getActionInfo",value:function(){return this.actionInfo}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}}]),t}(),w=navigator.userAgent.toLowerCase(),b=w.split(";"),T=-1!=w.indexOf("jdapp"),S="jdlog"===b[1]?"android"===b[2]:"android"===b[1],E="jdlog"===b[1]?"iphone"===b[2]:"iphone"===b[1],A=-1!=w.indexOf("ipad");var _={id:null,endpoint:"//h5speed.m.jd.com/v3/exception",rate:1,ignoreErrors:[],ignoreUrls:[],stackLimit:10,flag:10,autoReport:!0},k={net:1,busniess:2,business:2,others:3,code:4,resource:5,unhandlerejection:6,fetcherror:7,ajaxerror:8,ajaxtimeout:9},C=1,j=2,I=function(){function t(){var e=this;n(this,t),this.VERSION="3.0.3-alpha.0",this._config=null,this._installed=!1,this._ignoreOnError=!1,this._lastException=null,this._needReport=!1,this._plugins={},this._ignoreErrors=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/(\w*\s*)missing \) after argument list(\w*\s*)/,/(\w*\s*)\'offsetWidth\'(\s*)of(\s*)null(\s*\w*)/],this._ignoreUrls=[/.jd-jssdk.min.js$/],this._interceptors=[],this._action=y.getInstance(),this._autoReport=!0,function(){var t=window&&window.navigator?navigator.userAgent:"",e=/^jdapp/i.test(t),n=/ip(hone|od)|ipad/i.test(t),r=/android/i.test(t)&&!n;return new Promise((function(t){if(e){var i="getNetWorkType";window[i]||(window[i]=function(e){t({status:"0",msg:"success",data:e})});try{n&&window.webkit?window.webkit.messageHandlers.JDAppUnite.postMessage({method:"getNetWorkType",params:i}):r&&window.JDAppUnite&&window.JDAppUnite.getNetWorkType(i)}catch(s){t({msg:"fail",data:"error"})}}else{if(window&&window.navigator){var o=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{},a=o.type||o.effectiveType||"unknown";t({msg:"success",data:a})}t({msg:"fail",data:"error"})}}))}().then((function(t){"success"===t.msg&&(e.network=t.data)})).catch((function(t){}))}return i(t,[{key:"init",value:function(t){if(this._config=c({},_,t),this._needReport=Math.random()<this._config.rate,this._config.flag){if(this._installed)return;this._autoReport=!!this._config.autoReport,this._ignoreErrors=this._ignoreErrors.concat(this._config.ignoreErrors),this._ignoreErrors=p(this._ignoreErrors),this._ignoreUrls=this._ignoreUrls.concat(this._config.ignoreUrls),this._ignoreUrls=p(this._ignoreUrls),this._wrapBuiltIns(),this._installPlugins(),this._installed=!0}else g("config.flag \u6ca1\u6709\u914d\u7f6e\uff0c\u5fc5\u987b\u914d\u7f6eflag.");return this}},{key:"addPlugin",value:function(t){if("function"===typeof t&&t.name&&!this._plugins[t.name]){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this._plugins[t.name]={args:n,fn:t,installed:!1},this._installed&&this._installPlugins()}return this}},{key:"addInterceptor",value:function(t){"function"===typeof t&&(this._interceptors||(this._interceptors=[]),this._interceptors.push(t))}},{key:"removeInterceptor",value:function(t){if("function"===typeof t&&this._interceptors){var e=this._interceptors.indexOf(t);e>-1&&this._interceptors.splice(e,1)}}},{key:"_installPlugins",value:function(){for(var t in this._plugins){var e=this._plugins[t];e.installed||(e.fn.apply(this,[this].concat(e.args)),e.installed=!0)}}},{key:"reportException",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this,o={type:t.name,stack:v(t).slice(0,i._config.stackLimit)};if(o.stack.length){var a=o.stack[0];o.row=a.line,o.col=a.column,o.file=a.url}var s={errType:k.code,errCode:750,errMsg:t.message,exceptionInfo:o};e&&(s.extraData=e),s.errLevel="number"===typeof n?n:4,s.reType=r?C:j,this._ignoreErrors&&this._ignoreErrors.test(t.message)||this._ignoreUrls&&this._ignoreUrls.test(t.file)||this._send(s)}},{key:"report",value:function(t,n,r,i,o){var a;if(1===arguments.length&&"object"===e(arguments[0])){var s=arguments[0];a={errType:s.errType,errCode:s.errCode,errMsg:s.errMsg,errLevel:4,reType:C}}else a={errType:t,errCode:n,errMsg:r,reType:j},i&&(a.extraData=i),a.errLevel="number"===typeof o?o:4;this._send(a)}},{key:"reportByJSbridge",value:function(t,e,n,r){var i={errType:t,errCode:e,errMsg:n};r&&(i.extraData=r),T?this._sendByJSbridge(i):this._send(i)}},{key:"wrap",value:function(t){if(t){if(t._wrapped)return t._wrapped;var e=this;if("function"!==typeof t&&"function"===typeof t.handleEvent){var n=t.handleEvent;return t.handleEvent=function(){try{for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.apply(t,i)}catch(a){throw e.reportException(a,null,4,!0),e._ignoreNextOnError(),a}},t._wrapped=t,t}var r=function(){try{for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}catch(o){throw e.reportException(o,null,4,!0),e._ignoreNextOnError(),o}};return"function"!==typeof t?t:(t._wrapped=r,r)}}},{key:"_wrapBuiltIns",value:function(){if(this._autoReport){for(var t=this,e=0,n=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e<n.length;e++){i(n[e])}r(window,"setTimeout",a),r(window,"setInterval",a),window.requestAnimationFrame&&r(window,"requestAnimationFrame",o),window.$&&window.$.fn&&window.$.fn.ready&&r($.fn,"ready",o),r(window,"onerror",(function(e){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t._ignoreOnError||t._ignoreErrors&&t._ignoreErrors.test(r[0])||t._ignoreUrls&&t._ignoreUrls.test(r[1])||t.reportException(r[4]||new Error("window.onerror"),null,4,!0),e&&e.apply(this,r)}})),window.addEventListener("error",(function(e){var n=e.target;if("SCRIPT"===n.tagName||"LINK"===n.tagName){var r=n.src||n.href;t.report({errType:k.resource,errCode:0,errMsg:"".concat(r," \u6ca1\u6709\u52a0\u8f7d\u6210\u529f.")})}}),!0)}function r(t,e,n){var r=t[e];t[e]=n(r)}function i(e){var n=window[e]&&window[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(r(n,"addEventListener",(function(e){return function(n,r,i,o){return e.call(this,n,t.wrap(r),i,o)}})),r(n,"removeEventListener",(function(t){return function(e,n,r){return t.call(this,e,n&&n._wrapped||n,r)}})))}function o(e){return function(n){return e.call(this,t.wrap(n))}}function a(e){return function(n,r){return e.call(this,t.wrap(n),r)}}}},{key:"_send",value:function(t){if(this._interceptors&&this._interceptors.length>0){var e,n=a(this._interceptors);try{for(n.s();!(e=n.n()).done;){if(!(t=(0,e.value)(t)))return}}catch(p){n.e(p)}finally{n.f()}}var r=JSON.stringify(t);if(r!==this._lastException&&(this._lastException=r,this._needReport)){var i=this._action.getActionInfo(),o=i.userTraceDom,s=i.userTraceEvent,u=i.userTraceTs,f=document.getElementsByTagName("title")[0]&&document.getElementsByTagName("title")[0].innerText||"",l={flag:this._config.flag,rts:Date.now(),libVer:this.VERSION,url:window.location.href.split("?")[0]||"",title:f,userTraceDom:o,userTraceEvent:s,userTraceTs:u,network:this.network||"unknown"};c(l,t),g(l),m(this._config.endpoint,{data:h.encode(JSON.stringify(l))})}}},{key:"_sendByJSbridge",value:function(t){if(this._interceptors&&this._interceptors.length>0){var e,n=a(this._interceptors);try{for(n.s();!(e=n.n()).done;){if(!(t=(0,e.value)(t)))return}}catch(y){n.e(y)}finally{n.f()}}var r=t,i=r.errType,o=r.errCode,s=r.errMsg,c=r.extraData,u=void 0===c?{}:c,f=this._action.getActionInfo(),l=f.userTraceDom,p=f.userTraceEvent,d=f.userTraceTs,h=document.getElementsByTagName("title")[0]&&document.getElementsByTagName("title")[0].innerText||"",m={errCode:o,flag:this._config.flag,rts:Date.now(),libVer:this.VERSION,title:h,userTraceDom:l,userTraceEvent:p,userTraceTs:d,network:this.network||"unknown"},v={businessType:"exceptionReport",params:{functionInfo:"".concat(i),errMsg:s,exceptionInfo:JSON.stringify(m),url:window.location.href.split("?")[0]||"",extra:JSON.stringify(u)}};g(v);try{!function(t){if(E||A)try{window.webkit&&window.webkit.messageHandlers.JDAppUnite.postMessage({method:"notifyMessageToNative",params:t})}catch(e){console.log("jsbridge \u4e0a\u62a5\u5f02\u5e38",e)}else if(S)try{window.JDAppUnite&&window.JDAppUnite.notifyMessageToNative(t)}catch(e){console.log("jsbridge \u4e0a\u62a5\u5f02\u5e38",e)}}(JSON.stringify(v))}catch(w){console.warn("report by bridge error...",w)}}},{key:"_ignoreNextOnError",value:function(){var t=this;this._ignoreOnError=!0,setTimeout((function(){return t._ignoreOnError=!1}))}}]),t}(),O=window.JSAgent,x=new I;x.noConflict=function(){return window.JSAgent=O,x},x.EXCEPTION_TYPE=k,t.exports=x},955:function(t,e,n){var r;!function(){var i="undefined"!=typeof window&&window===this?this:"undefined"!=typeof n.g&&null!=n.g?n.g:this,o="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};function a(){a=function(){},i.Symbol||(i.Symbol=c)}var s=0;function c(t){return"jscomp_symbol_"+(t||"")+s++}function u(){a();var t=i.Symbol.iterator;t||(t=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&o(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return f(this)}}),u=function(){}}function f(t){var e=0;return function(t){return u(),t={next:t},t[i.Symbol.iterator]=function(){return this},t}((function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}))}function l(t){u();var e=t[Symbol.iterator];return e?e.call(t):f(t)}function p(t){if(!(t instanceof Array)){t=l(t);for(var e,n=[];!(e=t.next()).done;)n.push(e.value);t=n}return t}var d=0;var h="img script iframe link audio video source".split(" ");function g(t,e){for(var n=(t=l(t)).next();!n.done;n=t.next())if(n=n.value,e.includes(n.nodeName.toLowerCase())||g(n.children,e))return!0;return!1}function m(t,e){if(2<t.length)return performance.now();for(var n=[],r=(e=l(e)).next();!r.done;r=e.next())r=r.value,n.push({timestamp:r.start,type:"requestStart"}),n.push({timestamp:r.end,type:"requestEnd"});for(r=(e=l(t)).next();!r.done;r=e.next())n.push({timestamp:r.value,type:"requestStart"});for(n.sort((function(t,e){return t.timestamp-e.timestamp})),t=t.length,e=n.length-1;0<=e;e--)switch((r=n[e]).type){case"requestStart":t--;break;case"requestEnd":if(2<++t)return r.timestamp;break;default:throw Error("Internal Error: This should never happen")}return 0}function v(t){t=t||{},this.w=!!t.useMutationObserver,this.u=t.minValue||null,t=window.__tti&&window.__tti.e;var e=window.__tti&&window.__tti.o;this.a=t?t.map((function(t){return{start:t.startTime,end:t.startTime+t.duration}})):[],e&&e.disconnect(),this.b=[],this.f=new Map,this.j=null,this.v=-1/0,this.i=!1,this.h=this.c=this.s=null,function(t,e){var n=XMLHttpRequest.prototype.send,r=d++;XMLHttpRequest.prototype.send=function(i){for(var o=[],a=0;a<arguments.length;++a)o[a-0]=arguments[a];var s=this;return t(r),this.addEventListener("readystatechange",(function(){4===s.readyState&&e(r)})),n.apply(this,o)}}(this.m.bind(this),this.l.bind(this)),function(t,e){var n=fetch;fetch=function(r){for(var i=[],o=0;o<arguments.length;++o)i[o-0]=arguments[o];return new Promise((function(r,o){var a=d++;t(a),n.apply(null,[].concat(p(i))).then((function(t){e(a),r(t)}),(function(t){e(t),o(t)}))}))}}(this.m.bind(this),this.l.bind(this)),function(t){t.c=new PerformanceObserver((function(e){for(var n=(e=l(e.getEntries())).next();!n.done;n=e.next())if("resource"===(n=n.value).entryType&&(t.b.push({start:n.fetchStart,end:n.responseEnd}),w(t,m(t.g,t.b)+5e3)),"longtask"===n.entryType){var r=n.startTime+n.duration;t.a.push({start:n.startTime,end:r}),w(t,r+5e3)}})),t.c.observe({entryTypes:["longtask","resource"]})}(this),this.w&&(this.h=function(t){var e=new MutationObserver((function(e){for(var n=(e=l(e)).next();!n.done;n=e.next())("childList"==(n=n.value).type&&g(n.addedNodes,h)||"attributes"==n.type&&h.includes(n.target.tagName.toLowerCase()))&&t(n)}));return e.observe(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]}),e}(this.B.bind(this)))}function y(t){t.i=!0;var e=0<t.a.length?t.a[t.a.length-1].end:0,n=m(t.g,t.b);w(t,Math.max(n+5e3,e))}function w(t,e){!t.i||t.v>e||(clearTimeout(t.j),t.j=setTimeout((function(){var e=performance.timing.navigationStart,n=m(t.g,t.b);e=(window.a&&window.a.A?1e3*window.a.A().C-e:0)||performance.timing.domContentLoadedEventEnd-e;if(t.u)var r=t.u;else performance.timing.domContentLoadedEventEnd?r=(r=performance.timing).domContentLoadedEventEnd-r.navigationStart:r=null;var i=performance.now();null===r&&w(t,Math.max(n+5e3,i+1e3));var o=t.a;5e3>i-n?n=null:n=5e3>i-(n=o.length?o[o.length-1].end:e)?null:Math.max(n,r),n&&(t.s(n),clearTimeout(t.j),t.i=!1,t.c&&t.c.disconnect(),t.h&&t.h.disconnect()),w(t,performance.now()+1e3)}),e-performance.now()),t.v=e)}v.prototype.getFirstConsistentlyInteractive=function(){var t=this;return new Promise((function(e){t.s=e,"complete"==document.readyState?y(t):window.addEventListener("load",(function(){y(t)}))}))},v.prototype.m=function(t){this.f.set(t,performance.now())},v.prototype.l=function(t){this.f.delete(t)},v.prototype.B=function(){w(this,performance.now()+5e3)},i.Object.defineProperties(v.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(p(this.f.values()))}}});var b={getFirstConsistentlyInteractive:function(t){return t=t||{},"PerformanceLongTaskTiming"in window?new v(t).getFirstConsistentlyInteractive():Promise.resolve(null)}};t.exports?t.exports=b:void 0===(r=function(){return b}.apply(e,[]))||(t.exports=r)}()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{default:function(){return G}});var t,e,i=n(223),o=n.n(i),a=n(955),s=n.n(a);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},c(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(){try{if(!(t="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))){for(var n=0;n<16;n++)e[n]=Math.floor(255*Math.random());return e}return t(e)}catch(i){for(var r=0;r<16;r++)e[r]=Math.floor(255*Math.random());return e}}e="function"===typeof Uint8Array?new Uint8Array(16):[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(var p=[],d=0;d<256;++d)p.push((d+256).toString(16).substr(1));var h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function g(t){return"string"===typeof t&&h.test(t)}function m(t,e,n){var r=(t=t||{}).random||(t.rng||l)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase();if(!g(n))throw TypeError("Stringified UUID is invalid");return n}(r)}function v(t){if(t instanceof Element)try{for(var e=[];t&&t.nodeType===Node.ELEMENT_NODE;){var n=t.nodeName.toLowerCase();if(t.id){n+="#"+t.id,e.unshift(n);break}for(var r=t,i=1;r=r.previousElementSibling;)r.nodeName.toLowerCase()==n&&i++;if(1!=i&&(n+=":nth-of-type("+i+")"),e.unshift(n),!(t=t.parentNode))break}return e.join(">").replace(/div/g,"d").replace(/span/g,"s").replace(/header/g,"h").replace(/footer/g,"f").replace(/nth-of-type/g,"nth")}catch(o){return""}}var y=function(t){var e=t;return"number"==typeof t&&(e=Number(t.toFixed(2))),e},w=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,"reportData",{fcp:null,fp:null,lcp:[],fid:null,cls:null,tbt:null,clsInfo:[],tti:null,longTask:[],fps:[]})}var e,n,r;return e=t,n=[{key:"setFPS",value:function(t){this.reportData.fps.push(t)}},{key:"setFP",value:function(t){this.reportData.fp=t}},{key:"setFCP",value:function(t){this.reportData.fcp=t}},{key:"setLCP",value:function(t){this.reportData.lcp=t}},{key:"setFID",value:function(t){this.reportData.fid=t}},{key:"setCLS",value:function(t){this.reportData.cls=t,this.reportData.clsInfo=[]}},{key:"setCLSInfo",value:function(t){var e;null===(e=this.reportData.clsInfo)||void 0===e||e.push(t)}},{key:"setTTI",value:function(t){this.reportData.tti=t}},{key:"setLongTask",value:function(t){this.reportData.longTask.push(t)}},{key:"setTBT",value:function(){var t=this.reportData,e=t.longTask,n=t.fcp,r=t.tti;if(e.length>0){var i=0;e.forEach((function(t){n&&t.startTime>=n&&(null==r||t.startTime<=r)&&(i+=t.duration-50)})),this.reportData.tbt=y(i)}}},{key:"buildServerInfoParam",value:function(t){var e=[];for(var n in t){var r;e.push(n+"="+encodeURIComponent(null!==(r=t[n])&&void 0!==r?r:""))}return e.join("&")}},{key:"buildPerformanceParam",value:function(){var t=[],e=this.reportData,n=e.fp,r=e.fcp,i=e.lcp,o=e.fid,a=e.cls,s=e.clsInfo,c=e.tti,u=e.longTask,f=e.tbt,l=e.fps;t.push("fp=".concat(null!==n&&void 0!==n?n:"")),t.push("fcp=".concat(null!==r&&void 0!==r?r:"")),t.push("lcp=".concat(encodeURIComponent(JSON.stringify(i)))),t.push("fid=".concat(null!==o&&void 0!==o?o:"")),t.push("cls=".concat(null!==a&&void 0!==a?a:"")),t.push("clsInfo=".concat(encodeURIComponent(JSON.stringify(s)))),t.push("tti=".concat(null!==c&&void 0!==c?c:"")),t.push("fps=".concat(encodeURIComponent(JSON.stringify(l))));for(var p=[],d=0;d<u.length&&(p.push(u[d].duration),9!=d);d++);return t.push("longTask=".concat(encodeURIComponent(JSON.stringify(p)))),t.push("tbt=".concat(null!==f&&void 0!==f?f:"")),t.join("&")}},{key:"report",value:function(t){if(t&&void 0!=t.options.flag){this.setTBT();var e,n=this.buildServerInfoParam(t.getServerInfo()),r=this.buildPerformanceParam();try{var i=new Image,o="//h5speed.m.jd.com",a=t.options.serverDomain.match(/.*\.com/);e=a,"[object Array]"===Object.prototype.toString.call(e)&&a.length>0&&(o=a[0]),i.src="".concat(o,"/v2/speed/event?").concat(n,"&").concat(r)}catch(s){}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}}],n&&u(e.prototype,n),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();f(w,"instance",void 0);var b,T=[],S=6e3,E=function(t){"function"==typeof t&&T.push(t)},A=function(t,e){try{if(-1!=PerformanceObserver.supportedEntryTypes.indexOf(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){for(var n=t.getEntries(),r=0;r<n.length;r++)e(n[r])}));return n.observe({type:t,buffered:!0}),E((function(){n.disconnect()})),n}}catch(r){}},_=0,k=[],C=0,j=[],I=0,O=function(){var t=w.getInstance();A("layout-shift",(function(e){if(!e.hadRecentInput){var n=j[0],r=j[j.length-1];C&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(C+=e.value,j.push(e)):(C=e.value,j=[e]),C>_&&(_=C,k=j,t.setCLS(function(t){var e=t;return"number"==typeof t&&(e=Number(t.toFixed(4))),e}(_)),k.forEach((function(e){if(++I<=10)if(t.setCLSInfo(Number(e.value.toFixed(4))),e.sources){for(var n=[],r=0;r<e.sources.length;r++)n.push(v(e.sources[r].node));t.setCLSInfo(n.join("|"))}else t.setCLSInfo("null")})))}}))},x=!1,P=function(){!function(){var t=performance.now(),e=0,n=performance.now(),r=function r(){var i=performance.now(),o=i-n;n=i;var a=Math.round(1e3/o);e++,i>1e3+t&&((a=Math.round(1e3*e/(i-t)))<=20&&R.setFPS(a),e=0,t=i),0==x&&window.requestAnimationFrame(r)};r(),E((function(){x=!0}))}()},R=w.getInstance();var N=!1;function L(t){var e,n;null!==t&&void 0!==t&&null!==(e=t.options)&&void 0!==e&&e.flag&&("number"==typeof(n=t.performanceReportTime)&&n>=3e3&&(S=n,clearTimeout(b),b=setTimeout((function(){T&&T.length>0&&T.forEach((function(t){t()}))}),S)),N||(N=!0,function(t){if("function"!==typeof PerformanceObserver)return void console.log("not support PerformanceObserver");try{A("paint",(function(t){"first-contentful-paint"==t.name?w.getInstance().setFCP(y(t.startTime)):"first-paint"==t.name&&w.getInstance().setFP(y(t.startTime))})),function(){var t=w.getInstance();A("largest-contentful-paint",(function(e){var n=e.startTime;t.setLCP([y(n)+"",v(null===e||void 0===e?void 0:e.element)])}))}(),function(){var t=w.getInstance();A("first-input",(function(e){var n=e.processingStart-e.startTime;t.setFID(y(n))}))}(),s().getFirstConsistentlyInteractive().then((function(t){t&&w.getInstance().setTTI(y(t))})),function(){var t=w.getInstance();A("longtask",(function(e){t.setLongTask({startTime:e.startTime,duration:y(e.duration)})}))}(),O(),P();var e=w.getInstance();E((function(){e.report(t)}))}catch(n){}}(t)))}var D=[/index\.bundle\..{20,32}\.css/gi,/app\..{20,32}\.css/gi,/index\.bundle\..{20}\.js/gi,/app\..{20}\.js/gi,"unify.min.js"],M=[-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function U(t){M[t]=1}function F(t,e){for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&(t[n]=e[n])}function J(t,e){var n=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/.exec(t)[9];if(n&&""!==n)for(var r=n.split("&"),i=0;i<r.length;i++){var o=r[i].split("=");if(o[0]===e)return decodeURIComponent(o[1])}return!1}function q(t,e){return""===e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function B(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)&&void 0!==t[n])try{e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]))}catch(r){}return e}function V(t){var e=this;if(!(this instanceof V))return new V(t);this._installed=!1,this._plugins=[],this.sid=m(),this.selected=!1,this.timing={},this.isReported=!1,this.performanceReportTime=8e3,this.options={serverUrl:"//h5speed.m.jd.com",serverDomain:"//h5speed.m.jd.com",flag:null,profilingRate:1,autoReport:!1,autoAddStaticReport:!1,autoAddApiReport:!1,autoAddImageReport:!1,plugins:[]},this.init(t),this.pitsData=[],this.staticFiles=[],this.staticFilesSpecialType=[],this.customKeyValueData={},this.CONST_CREATE_TIME_MS=1550731072251,this.CONST_REASONABLE_TIME_LIMIT=6e4,this.performance=window.performance,this.isPerformanceApiAvailable="undefined"!==typeof this.performance,this.isTimingApiAvailable=this.isPerformanceApiAvailable&&"undefined"!==typeof this.performance.timing,this.isGetEntriesApiAvailable=this.isPerformanceApiAvailable&&"function"===typeof this.performance.getEntries,function(){var t=window&&window.navigator?navigator.userAgent:"",e=/^jdapp/i.test(t),n=/ip(hone|od)|ipad/i.test(t),r=/android/i.test(t)&&!n;return new Promise((function(t){if(e){var i="getNetWorkType";window[i]||(window[i]=function(e){t({status:"0",msg:"success",data:e})});try{n&&window.webkit?window.webkit.messageHandlers.JDAppUnite.postMessage({method:"getNetWorkType",params:i}):r&&window.JDAppUnite.getNetWorkType(i)}catch(s){t({msg:"fail",data:"error"})}}else{if(window&&window.navigator){var o=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{},a=o.type||o.effectiveType||"unknown";t({msg:"success",data:a})}t({msg:"fail",data:"error"})}}))}().then((function(t){"success"===t.msg&&(e.network=t.data)})).catch((function(t){}))}var W={init:function(t){if("number"===typeof t.flag&&!this._installed)return"object"===c(t)&&F(this.options,t),t.performanceReportTime&&(this.performanceReportTime=t.performanceReportTime),t.plugins&&(this._plugins=t.plugins),this.options.autoAddStaticReport&&(this.staticFiles=D),this.options.serverUrl=this.options.serverDomain+(12==this.options.flag?"/v2/speed/ware":"/v2/speed/activity"),this.selected=Math.random()<this.options.profilingRate,!0===this.options.autoReport&&this.enableAutoReport(),L(this),this._installed=!0,this._loadPlugins(),this},_loadPlugins:function(){var t=this;if(this._installed&&Array.isArray(this._plugins))try{this._plugins.map((function(e){return e.handler(t)}))}catch(e){console.error("@jmfe/jd-profiler \u6267\u884c\u63d2\u4ef6\u5931\u8d25",e)}},getTimingData:function(){var t,e={},n=this;e.hasPerformanceApi=n.isPerformanceApiAvailable?1:0,e.hasTimingApi=n.isTimingApiAvailable?1:0,e.hasGetEntriesApi=n.isGetEntriesApiAvailable?1:0,t=function(){var t=0;return window.chrome&&"function"===typeof window.chrome.loadTimes?t=1e3*window.chrome.loadTimes().firstPaintTime:n.isTimingApiAvailable&&"number"===typeof n.performance.timing.msFirstPaint&&(t=n.performance.timing.msFirstPaint),Math.round(t)}(),e.hasFirstPaintApi=t>0?1:0;try{if(n.isTimingApiAvailable){n.performance.timing.firstPaint=t;var r=n.performance.timing;e.domainLookup=r.domainLookupEnd-r.domainLookupStart,e.redirection=r.fetchStart-r.navigationStart,e.serverConnection=r.requestStart-r.connectStart,e.request2ResponseStart=r.responseStart-r.requestStart,e.responseStart2responseEnd=r.responseEnd-r.responseStart,e.request2ResponseEnd=r.responseEnd-r.requestStart,e.domInteractive=r.domInteractive-r.navigationStart,e.domContentLoaded=r.domContentLoadedEventStart-r.navigationStart,e.firstPaint=r.firstPaint-r.navigationStart,e.pageLoad=r.loadEventStart-r.navigationStart,e.backEnd=r.responseEnd-r.navigationStart,e.frontEnd=r.loadEventStart-r.responseEnd,e.loadEvent=r.loadEventEnd-r.loadEventStart}}catch(i){}return e},traversalResources:function(t){try{var e=t.indexOf("img")>=0,n=t.indexOf("api")>=0,r=null,i={},o={};if(!this.isGetEntriesApiAvailable)return i;r=this.performance.getEntries();for(var a=0;a<r.length;a++){var s,c,u,f=r[a],l=f.name,p=f.initiatorType;if(e&&"img"==p&&l.indexOf("h5speed.m.jd.com/v1/exception")<0){var d=l.split("!")[0].split("/"),h=d[d.length-1];c=parseInt(f.duration),i[h]=c}!n||"script"!=p&&"xmlhttprequest"!=p||(s=J(l,"functionId"))&&(u=J(l,"nickName"),c=parseInt(f.duration),u?i["api-"+u]=c:o[s]?(o[s]+=1,i["api-"+s+o[s]]=c):(o[s]=1,i["api-"+s]=c))}return i}catch(g){}},report:function(){try{if(this.selected&&!this.isReported&&null!==this.options.flag){var t=new Image,e=[];this.options.autoAddApiReport&&e.push("api"),this.options.autoAddImageReport&&e.push("img");var n=e.length>0,r=this.buildUrl(this.getServerInfo(),this.getTimingData(),n?this.traversalResources(e):{});r&&(t.src=r),this.isReported=!0}}catch(i){}},getServerInfo:function(){var t=location.href.split("?")[0],e=document.getElementsByTagName("title")[0]&&document.getElementsByTagName("title")[0].innerText||"";return{flag:this.options.flag,sid:this.sid,libVer:"4.1.0-alpha.0",url:t,rts:(new Date).getTime(),title:e,network:this.network}},moduleReport:function(t,e){try{var n,r,i=[],o=new Image,a={},s="";if("string"===typeof e&&(a.moduleId=e),"[object Object]"===Object.prototype.toString.call(t)&&(t=[t]),"[object Array]"===Object.prototype.toString.call(t)&&(t.forEach((function(t){if(t.number&&t.key&&t.time){if(t.number>35)throw new Error("\u53ea\u63d0\u4f9b1-35\u5751\u4f4d\u4e0a\u62a5");var e={};U(t.number),e["k"+t.number]=t.key,e["v"+t.number]=t.time,t.desc&&(e["s"+t.number]=t.desc||""),i.push(e)}})),i.length>0)){i.forEach((function(t){F(a,t)})),r=this.getServerInfo(),F(a,r),n=B(a),"[object Array]"===Object.prototype.toString.call(n)&&n.length>0&&(s=n.join("&"));var c=q("//h5speed.m.jd.com/v2/speed/event",s);c&&(o.src=c)}}catch(u){throw u}},addPits:function(t){try{var e=this;"[object Object]"===Object.prototype.toString.call(t)&&(t=[t]),"[object Array]"===Object.prototype.toString.call(t)&&t.forEach((function(t){if(t.number&&t.key&&t.time){if(r=t.number,0!==M[r])throw new Error("JdProfiler.addPits\u4f7f\u7528\u7684\u56fa\u5b9a\u5751\u4f4d\u5df2\u7ecf\u88ab\u5360\u7528\uff0c\u8bf7\u66f4\u6362");var n={};U(t.number),n["k"+t.number]=t.key,n["v"+t.number]=t.time,t.desc&&(n["s"+t.number]=t.desc||""),e.pitsData.push(n)}var r}))}catch(n){throw n}},add:function(t){this.addKeyValues(t)},detectStaticFile:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&void 0!==t[n]&&e.push(t[n]);this.staticFiles=this.staticFiles.concat(e)},addStaticFile:function(t){try{"[object Array]"===Object.prototype.toString.call(t)&&(this.staticFiles=this.staticFiles.concat(t))}catch(e){}},addStaticFileByLimitedType:function(t){try{"[object Object]"===Object.prototype.toString.call(t)?this.staticFilesSpecialType=this.staticFilesSpecialType.concat([t]):"[object Array]"===Object.prototype.toString.call(t)&&(this.staticFilesSpecialType=this.staticFilesSpecialType.concat(t))}catch(e){}},addKeyValues:function(t){try{"[object Object]"===Object.prototype.toString.call(t)&&F(this.customKeyValueData,t)}catch(e){}},buildUrl:function(t,e,n){var r={},i={},o=[],a=[],s=[],c={},u="",f=this;F(r,t),(o=B(r)).length>0&&(u=o.join("&"));var l=0;for(var p in e)e.hasOwnProperty(p)&&void 0!==e[p]&&(l++,s.push("p"+l+"="+e[p]));return s.length>0&&(u=u+"&"+s.join("&")),f.isGetEntriesApiAvailable&&f.staticFiles.length>0&&(c=function(t){var e,n,r={},i=null;return f.isGetEntriesApiAvailable?(i=f.performance.getEntries(),t.forEach((function(t){try{if(e=t){var o=function(t,e){var n=[];if(t&&e.length>0)for(var r=0,i=e.length;r<i;r++){var o=e[r];if(t.test){var a=o.name.match(t);a&&a.length>0&&n.push({name:a,time:o.duration})}else-1!==o.name.indexOf(t)&&n.push({name:t,time:o.duration})}return n}(e,i);o.forEach((function(t){t&&(n=parseInt(t.time))>=0&&(r[encodeURIComponent(t.name)]=n)}))}}catch(a){}})),r):r}(f.staticFiles),F(c,n),F(c,f.customKeyValueData),"[object Object]"===Object.prototype.toString.call(c)&&Object.getOwnPropertyNames(c).length>0&&(u=u+"&resources="+JSON.stringify(c))),f.isGetEntriesApiAvailable&&f.staticFilesSpecialType.length>0&&function(t){var e=null;f.isGetEntriesApiAvailable&&(e=f.performance.getEntries()),t.forEach((function(t){try{t&&function(t,e){var n=t.name,r=t.type,i=t.number,o=t.key;if(!(n&&r&&i&&o&&e.length>0))throw new Error("\u6307\u5b9a\u9759\u6001\u8d44\u6e90\u4e0a\u62a5\u7c7b\u578b\u53c2\u6570\u5f02\u5e38\uff0c\u8bf7\u68c0\u67e5\u5165\u53c2");for(var a=0,s=e.length;a<s;a++){var c=e[a];if(n.test){c.name.match(n),f.addPits({number:i,key:o,time:parseInt(c[r]),desc:t.desc});break}if(-1!==c.name.indexOf(n)){f.addPits({number:i,key:o,time:parseInt(c[r]),desc:t.desc});break}}}(t,e)}catch(n){}}))}(f.staticFilesSpecialType),f.isTimingApiAvailable&&f.pitsData.length>0&&(f.pitsData.forEach((function(t){F(i,t)})),a=B(i),"[object Array]"===Object.prototype.toString.call(a)&&a.length>0&&(u=u+"&"+a.join("&"))),q(this.options.serverUrl,u)},enableAutoReport:function(){var t=this;window.addEventListener("pageshow",(function(){window.setTimeout((function(){t.report()}),3e3)}),!1)}};V.prototype=W;var $=V({serverUrl:"//h5speed.m.jd.com",flag:null,profilingRate:1,autoReport:!1,autoAddStaticReport:!1,autoAddApiReport:!1,autoAddImageReport:!1});!0===$.options.autoReport&&$.enableAutoReport();var G={JSAgent:o(),jdProfiler:$}}(),r}()}));
|