(window=>{var helper={temp_seqNo:"",submit:!1,timer:null,prevTime:0,currentTime:0,stopFn:null,startsWith:function(str,prefix){return"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(prefix){return str.slice(0,prefix.length)===prefix}),str.startsWith(prefix)},isReport:function(map,link,path_correct,hash_correct){var i,result=[],paths=[],hashs=[],num=0;for(i in map){var data=map[i].data,pathname=map[i].pathname,hash=map[i].hash;data&&Array.isArray(data)&&data.length&&(result=result.concat(data)),pathname&&Array.isArray(pathname)&&pathname.length&&(paths=paths.concat(pathname)),hash&&Array.isArray(hash)&&hash.length&&(hashs=hashs.concat(hash))}if(paths=helper.unique(paths),hashs=helper.unique(hashs),result=helper.unique(result),paths&&paths.length)for(var n=0;n=control.count&&!helper.submit||helper.isTimely()&&!helper.submit)&&(helper.submit=!0,hdata=JSON.parse(helper.getSessionStorageItem("reqData")),helper.removeSessionStorageItem("reqData"),helper.getSeq(51)||"manualcall"==ismancall&&acNo&&acNo.split("@")[0])&&(reqData=helper.randomString(16),helper.send({headerSecretKey:"manualcall"==ismancall?helper.getEncryptAESKey(acNo.split("@")[1]):helper.getEncryptAESKey(reqData),data:helper.encrypt(btoa(window.pako.gzip(JSON.stringify(hdata),{to:"string"})),"manualcall"==ismancall?acNo.split("@")[1]:reqData),url:uploadLink+("manualcall"==ismancall?acNo.split("@")[0]:helper.getSeq(8)),succ:function(res){helper.submit=!1,helper.prevTime=+new Date;try{res&&JSON.parse(res)&&"0000"!==JSON.parse(res).code&&helper.reStart()}catch(e){console.log(e)}},fail:function(res){if(helper.submit=!1,10options.control.maxNum&&window.track_sdk.destory(),!helper.isReport(map,window.location.href,window.location.pathname,window.location.hash))return!1;event=helper.showNames(event,map),helper.sendData(event,options.uploadLink,options.control,ismancall,seqNo)}})}catch(e){console.log(e)}},encrypt:function(word,keyc){keyc=keyc||helper.getCookie("secretKey"),keyc=CryptoJS.enc.Utf8.parse(keyc);return CryptoJS.AES.encrypt(word,keyc,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString()},clearAll:function(){helper.clearCookie("seqNo"),helper.clearCookie("secretKey"),helper.removeSessionStorageItem("seqNo"),helper.removeSessionStorageItem("secretKey")},randomString:function(len){for(var $chars="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",maxPos=$chars.length,pwd="",i=0;iinstance=instance||new TraceSdk(map,options)},window.TraceSdk=TraceSdk,window.helper=helper;var ticker={tid:0,lastTime:0,funcs:[],start:function(){0