!function(e,t){void 0===e.csdn&&(e.csdn={}),e.csdn.reportCryptoJS=function(){var e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&"undefined"!=typeof global&&global.crypto&&(r=global.crypto),!r&&"function"==typeof require)try{r=require("crypto")}catch(e){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},c=a.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,o=this.sigBytes,n=e.sigBytes;if(this.clamp(),o%4)for(var i=0;i>>2]>>>24-i%4*8&255;t[o+i>>>2]|=a<<24-(o+i)%4*8}else for(var c=0;c>>2]=r[c>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;o.push((i>>>4).toString(16)),o.push((15&i).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new s.init(r,t/2)}},f=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,o=[],n=0;n>>2]>>>24-n%4*8&255;o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new s.init(r,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},l=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,o=this._data,n=o.words,i=o.sigBytes,a=this.blockSize,c=4*a,d=i/c;d=t?e.ceil(d):e.max((0|d)-this._minBufferSize,0);var u=d*a,f=e.min(4*u,i);if(u){for(var p=0;p>>32-i)+t}function o(e,t,r,o,n,i,a){var c=e+(t&o|r&~o)+n+a;return(c<>>32-i)+t}function n(e,t,r,o,n,i,a){var c=e+(t^r^o)+n+a;return(c<>>32-i)+t}function i(e,t,r,o,n,i,a){var c=e+(r^(t|~o))+n+a;return(c<>>32-i)+t}var a=e,c=a.lib,s=c.WordArray,d=c.Hasher,u=a.algo,f=[];!function(){for(var e=0;e<64;e++)f[e]=4294967296*t.abs(t.sin(e+1))|0}();var p=u.MD5=d.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var c=t+a,s=e[c];e[c]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var d=this._hash.words,u=e[t+0],p=e[t+1],l=e[t+2],g=e[t+3],h=e[t+4],m=e[t+5],w=e[t+6],v=e[t+7],_=e[t+8],x=e[t+9],C=e[t+10],y=e[t+11],k=e[t+12],S=e[t+13],T=e[t+14],E=e[t+15],I=d[0],O=d[1],D=d[2],b=d[3];I=r(I,O,D,b,u,7,f[0]),b=r(b,I,O,D,p,12,f[1]),D=r(D,b,I,O,l,17,f[2]),O=r(O,D,b,I,g,22,f[3]),I=r(I,O,D,b,h,7,f[4]),b=r(b,I,O,D,m,12,f[5]),D=r(D,b,I,O,w,17,f[6]),O=r(O,D,b,I,v,22,f[7]),I=r(I,O,D,b,_,7,f[8]),b=r(b,I,O,D,x,12,f[9]),D=r(D,b,I,O,C,17,f[10]),O=r(O,D,b,I,y,22,f[11]),I=r(I,O,D,b,k,7,f[12]),b=r(b,I,O,D,S,12,f[13]),D=r(D,b,I,O,T,17,f[14]),O=r(O,D,b,I,E,22,f[15]),I=o(I,O,D,b,p,5,f[16]),b=o(b,I,O,D,w,9,f[17]),D=o(D,b,I,O,y,14,f[18]),O=o(O,D,b,I,u,20,f[19]),I=o(I,O,D,b,m,5,f[20]),b=o(b,I,O,D,C,9,f[21]),D=o(D,b,I,O,E,14,f[22]),O=o(O,D,b,I,h,20,f[23]),I=o(I,O,D,b,x,5,f[24]),b=o(b,I,O,D,T,9,f[25]),D=o(D,b,I,O,g,14,f[26]),O=o(O,D,b,I,_,20,f[27]),I=o(I,O,D,b,S,5,f[28]),b=o(b,I,O,D,l,9,f[29]),D=o(D,b,I,O,v,14,f[30]),O=o(O,D,b,I,k,20,f[31]),I=n(I,O,D,b,m,4,f[32]),b=n(b,I,O,D,_,11,f[33]),D=n(D,b,I,O,y,16,f[34]),O=n(O,D,b,I,T,23,f[35]),I=n(I,O,D,b,p,4,f[36]),b=n(b,I,O,D,h,11,f[37]),D=n(D,b,I,O,v,16,f[38]),O=n(O,D,b,I,C,23,f[39]),I=n(I,O,D,b,S,4,f[40]),b=n(b,I,O,D,u,11,f[41]),D=n(D,b,I,O,g,16,f[42]),O=n(O,D,b,I,w,23,f[43]),I=n(I,O,D,b,x,4,f[44]),b=n(b,I,O,D,k,11,f[45]),D=n(D,b,I,O,E,16,f[46]),O=n(O,D,b,I,l,23,f[47]),I=i(I,O,D,b,u,6,f[48]),b=i(b,I,O,D,v,10,f[49]),D=i(D,b,I,O,T,15,f[50]),O=i(O,D,b,I,m,21,f[51]),I=i(I,O,D,b,k,6,f[52]),b=i(b,I,O,D,g,10,f[53]),D=i(D,b,I,O,C,15,f[54]),O=i(O,D,b,I,p,21,f[55]),I=i(I,O,D,b,_,6,f[56]),b=i(b,I,O,D,E,10,f[57]),D=i(D,b,I,O,w,15,f[58]),O=i(O,D,b,I,S,21,f[59]),I=i(I,O,D,b,h,6,f[60]),b=i(b,I,O,D,y,10,f[61]),D=i(D,b,I,O,l,15,f[62]),O=i(O,D,b,I,x,21,f[63]),d[0]=d[0]+I|0,d[1]=d[1]+O|0,d[2]=d[2]+D|0,d[3]=d[3]+b|0},_doFinalize:function(){var e=this._data,r=e.words,o=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var i=t.floor(o/4294967296),a=o;r[15+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,s=c.words,d=0;d<4;d++){var u=s[d];s[d]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return c},clone:function(){var e=d.clone.call(this);return e._hash=this._hash.clone(),e}});a.MD5=d._createHelper(p),a.HmacMD5=d._createHmacHelper(p)})(Math),e.MD5}(e.csdn.reportCryptoJS)}(window),function(e){var t,r,o,n,i,a,c,s,d,u,f,p,l,g,h;i=[],t={DELAY:500,API_VERSION:"0.6.0",SERVER_URL:"https://event.csdn.net/"},p=["utm_source"],s={scroll:t.SERVER_URL+"logstores/csdn-pc-sc/track_ua.gif?APIVersion="+t.API_VERSION,pv:t.SERVER_URL+"logstores/csdn-pc-tracking-pageview/track_ua.gif?APIVersion="+t.API_VERSION,click:t.SERVER_URL+"logstores/csdn-pc-tracking-page-click/track_ua.gif?APIVersion="+t.API_VERSION,view:t.SERVER_URL+"logstores/csdn-pc-tracking-page-exposure/track"},n={SCROLL:"scroll",PV:"pv",VIEW:"view",DELAY_VIEW:"delay_view",CLICK:"click"},c={SKIPPED_AND_VISIBLE:"0",VISIBLE:"1"};if(o={isCSDNApp:function(){var e=!!window.navigator.userAgent.toLowerCase().match(/(csdn)/i),t=o.getCookie("X-App-ID")||"";return e||"CSDN-APP"==t||"CSDN-EDU"==t},guid:function(){return+new Date+"-xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},setLogIdCookie:function(e){if(-1!==["pv","click","view"].indexOf(e)){var t="log_Id_"+e,r=o.getCookie(t)||0;try{r=parseInt(r),"number"==typeof r&&isNaN(r)?o.setCookie(t,1,31536e7):o.setCookie(t,++r,31536e7)}catch(e){void 0}}},getRequest:function(){for(var e=new Object,t=window.location.href.split("?")[1]||"",r=t.split("&"),o=0;o-1&&(o.setCookie("c_page_id","",-1),o.setCookie("c_mod","",-1))},preserveTraceInfo:function(e){e.mod&&o.setCookie("c_mod",e.mod,36e5),e.page_id?o.setCookie("c_page_id",e.page_id,36e5):o.setCookie("c_page_id","default",36e5)},getTimestamp:function(){return Math.round(new Date/1e3)},getXPath:function(e){if(""!==e.id)return'//*[@id="'+e.id+'"]';if(e==document.body)return"/html/"+e.tagName.toLowerCase();if(!e.parentNode)return"";for(var t=1,r=e.parentNode.childNodes,o=0,n=r.length;o-1)return void o.setCookie("c_first_ref","default");var e=new RegExp(/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/),t=window.document.referrer?window.document.referrer.match(e)[0]:"default";[".csdn.net","wx.tenpay.com","graph.qq.com","openapi.baidu.com","api.weibo.com","account.dcloud.net.cn/oauth","github.com/login/oauth","passport.gitcode.net"].some(function(e){return e.indexOf("/")>-1?(window.document.referrer||"default").indexOf(e)>-1:t.indexOf(e)>-1})&&(t="default");var r="11_"+(new Date).getTime()+"."+o.randomNum(6);return"default"!=t?(o.setCookie("c_first_ref",t),o.setCookie("c_first_page",window.location.href),void o.setCookie("c_dsid",r,18e5)):o.getCookie("c_first_ref")&&window.document.referrer?void 0:(o.setCookie("c_first_ref","default"),o.setCookie("c_first_page",window.location.href),void o.setCookie("c_dsid",r,18e5))},randomNum:function(e){for(var t=[],r=["0","1","2","3","4","5","6","7","8","9"],o=0;o-1?t:(t.con=t.con+",top_"+e(r).offset().top,t)},urlParamsToObj:function(e){var t={};return e.replace(/([^=&#]+)=([^&#]*)/g,function(){t[arguments[1]]=arguments[2]}),t},objToUrlParams:function(t){var r="";return e.each(t,function(e){r+="&"+e+"="+t[e]}),r.substr(1)},trackOrderSource:function(){var e=document.referrer;if(e){var t=document.createElement("a");t.href=e;var r=["passport","order.csdn.net","wx.tenpay.com","cart.csdn.net"],n=[/(^https:\/\/mall\.csdn\.net(:[0-9]{1,5})?\/cart$)/],i=!1;try{for(var a=0;a-1&&(i=!0);for(var a=0;a-1?(o.setCookie("c_pref",o.getCookie("c_ref")),o.setCookie("c_ref",e)):(o.setCookie("c_pref",o.getCookie("c_ref")),o.setCookie("c_ref",e.split("?")[0]))}}else window.navigator.userAgent.toLowerCase().indexOf("csdn")<0&&(o.setCookie("c_pref","default"),o.setCookie("c_ref","default"))},parseExtra:function(e){if(!Object.prototype.hasOwnProperty.call(e,"extra"))return"";var t=Object.prototype.toString.call(e.extra).slice(8,-1);if("Object"===t)return e.extra;if("String"!==t||!e.extra)return{};try{return JSON.parse(e.extra)}catch(t){void 0}},assignExtra:function(t){if(t&&(t.extra||a.extra)){var r=o.parseExtra(t);return r=e.extend(!0,{},a.extra||{},r||{}),JSON.stringify(r)}},getSortObjectMD5:function(e){var r=JSON.parse(JSON.stringify(e));if("Object"!==Object.prototype.toString.call(r).slice(8,-1))return"";try{r.APIVersion=t.API_VERSION;var o=[];for(var n in r)r.hasOwnProperty(n)&&o.push(n);o=o.sort();var i=o.reduce(function(e,t){return e+="&"+t+"="+r[t]},"").substring(1);return csdn.reportCryptoJS.MD5(i).toString()}catch(e){return void 0,""}},reportScroll:function(t){var r=e.extend(!0,{},a,t);try{var i=o.assignExtra(t||{});i&&(r.extra=i)}catch(e){t&&t.extra&&(r.extra=t.extra),void 0}r.tos=o.tos(),r.adb=o.getCookie("c_adb")||0,r.curl=window.location.href;var c=o.getFuzzyCookie("c_");c&&(r.cCookie=c),r.t=o.getTimestamp(),r.screen=o.getScreen(),r.un=o.getCookie("UN")||o.getCookie("UserName"),r.urn=l||o.guid(),r.vType=o.getCookie("p_uid")||"",delete r.cfg,delete r.dest,e.ajax({url:s[n.SCROLL],type:"get",crossDomain:!0,xhrFields:{withCredentials:!1},contentType:"text/plain;charset=UTF-8",data:r,success:function(){},error:function(){void 0}})},windowFocusChange:function(e){"loading"!==document.readyState?g=document.hasFocus():window.addEventListener("DOMContentLoaded",function(){g=document.hasFocus(),e()},!0);var t=function(r){r.target===window&&(g=!0,e()),window.removeEventListener("focus",t,!0)};return window.addEventListener("focus",t,!0),g&&e(),g}},r={timer:0,checkTimer:0,getFullSpm:function(e){var t=e.split(".").length;if(2===t||3===t){var r=document.querySelector('meta[name="report"]'),o=r&&r.getAttribute("content")||"{}",n=JSON.parse(o);return n.spm?n.spm+"."+e:e}return e},reportUserAction:function(t,r){var n=this;t=t||["1px"],h=!1,o.windowFocusChange(function(){g&&!h&&(o.reportScroll({eleTop:1}),h=!0)}),e(function(){setTimeout(function(){n.reportPercent(function(e){h||(o.reportScroll({eleTop:e}),h=!0)},{scrollBar:!0,range:t,el:r||"",scope:"tenPrecentScrollEvent"})},800)})},reportPercent:function(t,r){r=r||{};for(var n=r.range||[25,50,75,100],i={},a=0;a-1&&(p=+p.replace("px",""),l=a),l>=p){if(f===n.length-1){s=p;break}if(l<("string"==typeof n[f+1]&&n[f+1].indexOf("px")>-1?+n[f+1].replace("px",""):n[f+1])){s=p;break}}}if(s)for(var g=0;g-1?+h.replace("px",""):h;m<=s&&!i[h]&&(i[h]=!0,t&&t(m))}n.every(function(e){return i[e]})&&e(r.el||window).off("scroll",window[r.scope])&&delete window[r.scope]},window[r.scope](),e(r.el||window).on("scroll",window[r.scope])},reportServer:function(r,a){o.refreshDcSessionId(),void 0!==r&&void 0!==a&&i.push(a);var c=o.copyArr(i);if(0!=c.length){i=[];var d={__source__:"csdn",__logs__:c};if(o.setLogIdCookie(n.VIEW),r===n.VIEW||r===n.DELAY_VIEW){var u=window.navigator.userAgent,f="PC";u.toLowerCase().indexOf("csdnedu")>-1?f="CSDNEDU":u.toLowerCase().indexOf("csdnapp")>-1?f="CSDNApp":u.toLowerCase().indexOf("mobile")>-1&&(f="mobile"),d.__tags__={useragent:u,platform:f,log_id:o.getCookie("log_Id_"+n.VIEW)}}e.ajax({url:s[n.VIEW],type:"POST",crossDomain:!0,xhrFields:{withCredentials:!1},contentType:"text/plain;charset=UTF-8",headers:{"x-log-apiversion":t.API_VERSION,"x-log-bodyrawsize":"1234"},data:JSON.stringify(d),success:function(){},error:function(){void 0}})}},reportServerDelay:function(e,r){i.push(r);var o=this;o.timer&&clearTimeout(o.timer),o.timer=setTimeout(function(){o.reportServer(n.DELAY_VIEW)},t.DELAY)},reportView:function(t,r,i){if(!t)return void void 0;t.spm&&(t.spm=this.getFullSpm(t.spm));var c=e.extend(!0,{},a,t);try{var s=o.assignExtra(t);s&&(c.extra=s)}catch(e){t&&t.extra&&(c.extra=t.extra),void 0}var d=o.getFuzzyCookie("c_");c.t=o.getTimestamp()+"",c.eleTop=r?r.offset().top+"":"",delete c.cfg,d&&(c.cCookie=d),c.__time__=o.getTimestamp(),c.curl=window.location.href,void 0===i?this.reportServerDelay(n.VIEW,c):this.reportServer(n.VIEW,c),"function"==typeof csdn.afterReportView&&csdn.afterReportView(r,t)},reportClick:function(t,r){o.refreshDcSessionId();var i=e.extend(!0,{},a,t);t.spm||(i.spm="");try{var c=o.assignExtra(t);c&&(i.extra=c)}catch(e){t&&t.extra&&(i.extra=t.extra),void 0}i.spm=this.getFullSpm(i.spm),i.t=o.getTimestamp(),i.elePath=r?o.getXPath(r[0])+"":"",i.eleTop=void 0!==i.eleTop?i.eleTop:r?r.offset().top+"":"",i.trace&&o.preserveTraceInfo(i);var d=o.getFuzzyCookie("c_");d&&(i.cCookie=d),i.curl=window.location.href,delete i.cfg,o.setLogIdCookie(n.CLICK),i.log_id=o.getCookie("log_Id_"+n.CLICK),i.sign=o.getSortObjectMD5(i),e.ajax({url:s[n.CLICK],type:"get",crossDomain:!0,xhrFields:{withCredentials:!1},contentType:"text/plain;charset=UTF-8",data:i,success:function(){},error:function(){void 0}})},reportPageView:function(t){var r=e.extend(!0,{},a,t),i=this;try{var c=o.assignExtra(t||{});c&&(r.extra=c)}catch(e){t&&t.extra&&(r.extra=t.extra),void 0}d&&d.percent&&(u&&clearTimeout(u),u=setTimeout(function(){i.reportPercent(function(e){i.reportClick({spm:"3001.7333",eleTop:e})})},1e3)),this.reportUserAction(),l=o.guid(),r.tos=o.tos(),r.adb=o.getCookie("c_adb")||0,r.curl=window.location.href;var f=o.getFuzzyCookie("c_");f&&(r.cCookie=f),r.t=o.getTimestamp(),r.screen=o.getScreen(),r.un=o.getCookie("UN")||o.getCookie("UserName"),r.urn=l,r.vType=o.getCookie("p_uid")||"",delete r.cfg,delete r.dest,o.setLogIdCookie(n.PV),r.log_id=o.getCookie("log_Id_"+n.PV),r.sign=o.getSortObjectMD5(r),e.ajax({url:s[n.PV],type:"get",crossDomain:!0,xhrFields:{withCredentials:!1},contentType:"text/plain;charset=UTF-8",data:r,success:function(){},error:function(){void 0}})},viewCheck:function(){var t=this;clearTimeout(t.checkTimer),t.checkTimer=setTimeout(function(){o.refreshDcSessionId(),e("[data-report-view]").each(function(){var r=e(this),n=r.data("reportView"),i=e.extend({},a,n);n.spm||(i.spm=""),i.spm=t.getFullSpm(i.spm),i.curl=window.location.href,o.isView(r.get(0),i.cfg.viewStrategy)&&(csdn.report.reportView(i,r),r.removeData("reportView"),r.removeAttr("data-report-view"))})},200)},isView:function(e){return o.isView(e)},addSpmToHref:function(e){var t=e,r=this,n=t.data("reportQuery")||"",i=t.length&&t[0].hash?t[0].hash.split("#").map(function(e){return e.split("?")[0]}):[],a=i.length&&-1===i[i.length-1].indexOf("/");if(n){var c=t.attr("href"),s=c,d={};-1!==c.indexOf("?")&&(s=c.split("?")[0],d=o.urlParamsToObj(c.split("?")[1])),a&&(s=c.split("#")[0]);var u=o.urlParamsToObj(n);if((n.indexOf("spm")>-1||n.indexOf("SPM")>-1)&&(u.spm=u.spm||u.SPM,u.spm=r.getFullSpm(u.spm)),a){var f=i.pop();s+=i.join("#")+"?"+o.objToUrlParams(Object.assign(d,u))+"#"+f}else s+="?"+o.objToUrlParams(Object.assign(d,u));t.attr("href",s)}}},void 0===window.csdn&&(window.csdn={}),csdn.report)return void void 0;o.trackOrderSource(),window.csdn.report=r,a=o.initData(),a.disabled||csdn.report.reportPageView(),e(function(){var t=csdn.report;e(document).on("click","[data-report-click]",function(){var r=e(this).data("reportClick");t.reportClick(r,e(this))}),t.viewCheck(e("[data-report-view]")),e(window).on("scroll",function(){t.viewCheck(e("[data-report-view]"))}),e(document).on("contextmenu","a[data-report-query]",function(){t.addSpmToHref(e(this))}),e(document).on("click","a[data-report-query]",function(){t.addSpmToHref(e(this))}),e(document).on("click","a[href]",function(){var r=e(this),o=r.attr("href");if(function(e){return!(!/^https:\/\/|^http:\/\//gi.test(e)||"/"===e||e.indexOf(".csdn.net")>-1||e.indexOf(".iteye.com")>-1)}(o)){var n={mod:"1583921753_001",dest:o};t.reportClick(n,r)}})})}(jQuery);