(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0IRE":function(e,t,r){"use strict";var n=r("LX0d"),a=r("/HRN"),s=r("WaGi");r("hfKm")(t,"__esModule",{value:!0});var o=function(){function e(t){a(this,e),this.data=new n(t)}return s(e,[{key:"getData",value:function(){return this.data}},{key:"get",value:function(e){return this.data.get(e)}},{key:"set",value:function(e,t){this.data.set(e,t)}},{key:"overwrite",value:function(e){this.data=new n(e)}}]),e}();t.DataManager=o},5:function(e,t,r){r("blG5"),e.exports=r("BMP1")},BMP1:function(e,t,r){"use strict";var n=r("5Uuq")(r("IKlv"));window.next=n,(0,n.default)().catch(function(e){console.error(e.message+"\n"+e.stack)})},DpIS:function(e,t,r){r("xEkU").polyfill()},DqTX:function(e,t,r){"use strict";var n=r("/HRN"),a=r("WaGi"),s=r("KI45");t.__esModule=!0,t.default=void 0;var o=s(r("eVuF")),i={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},c=function(){function e(){var t=this;n(this,e),this.updateHead=function(e){var r=t.updatePromise=o.default.resolve().then(function(){r===t.updatePromise&&(t.updatePromise=null,t.doUpdateHead(e))})},this.updatePromise=null}return a(e,[{key:"doUpdateHead",value:function(e){var t=this,r={};e.forEach(function(e){var t=r[e.type]||[];t.push(e),r[e.type]=t}),this.updateTitle(r.title?r.title[0]:null);["meta","base","link","style","script"].forEach(function(e){t.updateElements(e,r[e]||[])})}},{key:"updateTitle",value:function(e){var t="";if(e){var r=e.props.children;t="string"===typeof r?r:r.join("")}t!==document.title&&(document.title=t)}},{key:"updateElements",value:function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");for(var a=Number(n.content),s=[],o=0,i=n.previousElementSibling;o0}});else{var e=window.document,t=[];n.prototype.THROTTLE_TIMEOUT=100,n.prototype.POLL_INTERVAL=null,n.prototype.USE_MUTATION_OBSERVER=!0,n.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},n.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},n.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},n.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},n.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,r){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==r[t-1]})},n.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},n.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(a(window,"resize",this._checkForIntersections,!0),a(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},n.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,s(window,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},n.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(n){var a=n.element,s=i(a),o=this._rootContainsTarget(a),c=n.entry,u=e&&o&&this._computeTargetAndRootIntersection(a,t),d=n.entry=new r({time:window.performance&&performance.now&&performance.now(),target:a,boundingClientRect:s,rootBounds:t,intersectionRect:u});c?e&&o?this._hasCrossedThreshold(c,d)&&this._queuedEntries.push(d):c&&c.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},n.prototype._computeTargetAndRootIntersection=function(t,r){if("none"!=window.getComputedStyle(t).display){for(var n=i(t),a=u(t),s=!1;!s;){var c=null,d=1==a.nodeType?window.getComputedStyle(a):{};if("none"==d.display)return;if(a==this.root||a==e?(s=!0,c=r):a!=e.body&&a!=e.documentElement&&"visible"!=d.overflow&&(c=i(a)),c&&!(n=o(c,n)))break;a=u(a)}return n}},n.prototype._getRootRect=function(){var t;if(this.root)t=i(this.root);else{var r=e.documentElement,n=e.body;t={top:0,left:0,right:r.clientWidth||n.clientWidth,width:r.clientWidth||n.clientWidth,bottom:r.clientHeight||n.clientHeight,height:r.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(t)},n.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,r){return"px"==t.unit?t.value:t.value*(r%2?e.width:e.height)/100}),r={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},n.prototype._hasCrossedThreshold=function(e,t){var r=e&&e.isIntersecting?e.intersectionRatio||0:-1,n=t.isIntersecting?t.intersectionRatio||0:-1;if(r!==n)for(var a=0;a=0&&i>=0&&{top:r,bottom:n,left:a,right:s,width:o,height:i}}function i(e){var t;try{t=e.getBoundingClientRect()}catch(r){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(e,t){for(var r=t;r;){if(r==e)return!0;r=u(r)}return!1}function u(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t&&t.assignedSlot?t.assignedSlot.parentNode:t}}()},blG5:function(e,t,r){"use strict";r.r(t);r("DpIS"),r("Wr5T"),r("KKXr");var n=r("vN+2"),a=r.n(n),s=r("vDqi"),o=r.n(s);window.addEventListener("load",function(){setTimeout(function(){var e=window.performance;if(e){var t=e.getEntriesByType("navigation")[0],r=0;t||(r=(t=e.timing).navigationStart);var n=[{key:"Redirect",desc:"\u7f51\u9875\u91cd\u5b9a\u5411\u7684\u8017\u65f6",value:t.redirectEnd-t.redirectStart},{key:"AppCache",desc:"\u68c0\u67e5\u672c\u5730\u7f13\u5b58\u7684\u8017\u65f6",value:t.domainLookupStart-t.fetchStart},{key:"DNS",desc:"DNS\u67e5\u8be2\u7684\u8017\u65f6",value:t.domainLookupEnd-t.domainLookupStart},{key:"TCP",desc:"TCP\u8fde\u63a5\u7684\u8017\u65f6",value:t.connectEnd-t.connectStart},{key:"Waiting(TTFB)",desc:"\u4ece\u5ba2\u6237\u7aef\u53d1\u8d77\u8bf7\u6c42\u5230\u63a5\u6536\u5230\u54cd\u5e94\u7684\u65f6\u95f4 / Time To First Byte",value:t.responseStart-t.requestStart},{key:"Content Download",desc:"\u4e0b\u8f7d\u670d\u52a1\u7aef\u8fd4\u56de\u6570\u636e\u7684\u65f6\u95f4",value:t.responseEnd-t.responseStart},{key:"HTTP Total Time",desc:"http\u8bf7\u6c42\u603b\u8017\u65f6",value:t.responseEnd-t.requestStart},{key:"DOMContentLoaded",desc:"dom\u52a0\u8f7d\u5b8c\u6210\u7684\u65f6\u95f4",value:t.domContentLoadedEventEnd-r},{key:"Loaded",desc:"\u9875\u9762load\u7684\u603b\u8017\u65f6",value:t.loadEventEnd-r}];if(Math.random()>.75){var s=window.location,i=s.href,c=s.pathname,u=navigator.userAgent,d=i.split("?")[0];o.a.post("https://tr.jianshu.com/fe/1/mon/atf",{app:"shakespeare-performance",url:d,ua:u,path:c,stats_ttfb:t.responseStart-t.requestStart,stats_domLoaded:t.domContentLoadedEventEnd-r,stats_loaded:t.loadEventEnd-r}).then(a.a).catch(a.a)}console&&console.log&&console.log(n)}},0)});var i="#1475b2",c="#42c02e",u=function(e){var t=e.title,r=e.content,n=e.backgroundColor,a=["%c ".concat(t," %c ").concat(r," "),"padding: 1px; border-radius: 3px 0 0 3px; color: #fff; background: ".concat("#606060",";"),"padding: 1px; border-radius: 0 3px 3px 0; color: #fff; background: ".concat(n,";")];return function(){var e;window.console&&"function"===typeof window.console.log&&(e=console).log.apply(e,arguments)}.apply(void 0,a),a};function d(e){var t=e.title,r=e.content;return u({title:t,content:r,backgroundColor:i})}r("jm62"),r("ioFf"),r("RW0V"),r("91GP"),r("Z2Ku"),r("L9s1");var p=r("rePB"),l=r("1OyB"),_=r("vuIU"),f=(r("rGqo"),r("yt8O"),r("Btvt"),r("hhXQ"),r("k+uP")),h=r.n(f),g={PC_NOTE_RIGHT_REC_AUTHOR_NOTE_IMPRESSION:"pc_note_right_rec_author_note_impression",PC_NOTE_PAGE_RIGHT_AUTHOR_NOTE_CLICK:"pc_note_right_rec_author_note",PC_NOTE_REC_NOTES_STATUS:"pc_note_rec_notes_status",PC_NOTE_PAGE_RIGHT_RECOMMEND_NOTE_IMPRESSION:"pc_note_click_right_rec_note_impression",PC_NOTE_PAGE_RIGHT_RECOMMEND_NOTE_CLICK:"pc_note_click_right_rec_note",PC_COMMON_AD_EXPOSURE:"pc_common_ad_exposure",PC_COMMON_AD_CLICK:"pc_common_ad_click",PC_FOLLOW_USER:"pc_follow_user",PC_COMMENT_NOTE:"pc_comment_note",PC_LIKE_NOTE:"pc_like_note",PC_ACTIVE_COLLECTION_NOTE:"activity_collection_note",PC_DISLIKE_NOTE:"pc_dislike_note",PC_REWARD_NOTE:"pc_reward_note",PC_NOTE_BOTTOM_RECOMMENDED_NOTE_IMPRESSION:"pc_note_bottom_recommended_note_impression",PC_NOTE_BOTTOM_RECOMMENDED_NOTE_CLICK:"pc_note_bottom_recommended_note_click",PC_YOUDAO_AD_FETCH:"pc_youdao_ad_fetch",PC_YOUDAO_AD_RESPONSE:"pc_youdao_ad_response",PC_BAIDU_AD_FETCH:"pc_baidu_ad_fetch",PC_NOTE_WINDOW_IMPRESSION:"pc_note_window_impression",PC_NOTE_SECOND_WINDOW_IMPRESSION:"pc_note_second_window_impression",PC_NOTE_FOLLOW_USER_WINDOW_IMPRESSION:"pc_note_follow_user_window_impression",PC_LUCKYWHEEL_PAGE_IMPRESSION:"pc_luckywheel_page_impression",PC_NOTE_WINDOW_NOTE_CLICK:"pc_note_window_note_click",PC_NOTE_WINDOW_A_CLOSE_CLICK:"pc_note_window_a_close_click",PC_NOTE_WINDOW_B_CLOSE_CLICK:"pc_note_window_b_close_click",PC_NOTE_FOLLOW_USER_WINDOW_CLOSE_CLICK:"pc_note_follow_user_window_close_click",PC_NOTE_BOTTOM_DOWNLOAD_CLICK:"pc_note_bottom_download_click",PC_NOTE_BOTTOM_WINDOW_CLOSE_CLICK:"pc_note_bottom_window_close_click",PC_NOTE_LEFT_CODE_IMPRESSION:"pc_note_left_code_impression",PC_NOTE_XINGCHEN_AD_IMPRESSION:"pc_note_xingchen_ad_impression",PC_NOTE_IMPRESSION:"pc_note_impression",PC_LUCKWHEEL_RIGHT_CLICK:"pc_luckwheel_right_click",PC_LUCKWHEEL_RIGHT_IMPRESSION:"pc_luckwheel_right_impression",PC_LUCKWHEEL_RIGHT_CLOSE:"pc_luckwheel_right_close",PC_AD_SHOW:"pc_ad_show",PC_AD_CLICK:"pc_ad_click",PC_HEADER_TAB_CLICK:"pc_header_tab_click",PC_NOTE_COLLAPSE_BUTTON:"pc_note_collapse_button",PC_NOTE_RIGHT_STORY_CLICK:"pc_note_right_story_click",PC_READ_NOTE:"pc_read_note",TO_BUY_VIPPAGE_BTN_CLICK:"to_buy_vippage_btn_click"};function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var v=!0,y=Object.values(g),b=v?"https://sensors.ibreader.com/sa?project=jianshu":"https://sensors.ibreader.com/sa?project=jianshu_test",w=new(function(){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.showLog,a=void 0!==n&&n,s=r.user,o=void 0===s?null:s;Object(l.a)(this,e),this.events=g,t=!!/sensor_log=true/.test(window.location.href)||!v&&!!a,h.a.init({server_url:b,show_log:t}),o?h.a.login(o.is):h.a.logout(),h.a.registerPage({platform:"web",site:"shakespeare"}),this.autoTrack=function(e){h.a.quick("autoTrack",function(e){for(var t=1;t-1?"landscape":"portrait";else if(_.mediaQueriesSupported()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t},_.now=Date.now||function(){return(new Date).getTime()},_.throttle=function(e,t,r){var n,a,s,o=null,i=0;r||(r={});var c=function(){i=!1===r.leading?0:_.now(),o=null,s=e.apply(n,a),o||(n=a=null)};return function(){var u=_.now();i||!1!==r.leading||(i=u);var d=t-(u-i);return n=this,a=arguments,d<=0||d>t?(o&&(clearTimeout(o),o=null),i=u,s=e.apply(n,a),o||(n=a=null)):o||!1===r.trailing||(o=setTimeout(c,d)),s}},_.hashCode=function(e){if("string"!=typeof e)return 0;var t=0;if(0==e.length)return t;for(var r=0;rsd.para.max_string_length?(sd.log("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,sd.para.max_string_length)):e},_.searchObjString=function(e){_.isObject(e)&&_.each(e,function(t,r){_.isObject(t)?_.searchObjString(e[r]):_.isString(t)&&(e[r]=_.formatString(t))})},_.searchConfigData=function(e){if("object"==typeof e&&e.$option){var t=e.$option;return delete e.$option,t}return{}},_.unique=function(e){for(var t,r=[],n={},a=0;a127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==i&&(r>t&&(s+=e.substring(t,r)),s+=i,t=r=n+1)}return r>t&&(s+=e.substring(t,e.length)),s},_.base64Encode=function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));var t,r,n,a,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=0,c=0,u="",d=[];if(!(e=String(e)))return e;e=_.utf8Encode(e);do{t=(s=e.charCodeAt(i++)<<16|e.charCodeAt(i++)<<8|e.charCodeAt(i++))>>18&63,r=s>>12&63,n=s>>6&63,a=63&s,d[c++]=o.charAt(t)+o.charAt(r)+o.charAt(n)+o.charAt(a)}while(i=4&&(o=t(o,s),s=[]);return s.length>0&&(o=t(o,s)),o.toString(16)}()+"-"+t+"-"+e();return r||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}}(),_.getQueryParam=function(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),e=_.decodeURIComponent(e);var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_.decodeURIComponent(r[1])},_.urlParse=function(e){var t=function(e){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,"undefined"!=typeof e&&this._parse(e)};return t.prototype.setUrl=function(e){this._parse(e)},t.prototype._initValues=function(){for(var e in this._fields)this._values[e]=""},t.prototype.addQueryString=function(e){if("object"!=typeof e)return!1;var t=this._values.QueryString||"";for(var r in e)t=new RegExp(r+"[^&]+").test(t)?t.replace(new RegExp(r+"[^&]+"),r+"="+e[r]):"&"===t.slice(-1)?t+r+"="+e[r]:""===t?r+"="+e[r]:t+"&"+r+"="+e[r];this._values.QueryString=t},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Port?":"+this._values.Port:"",e+=this._values.Path,(e+=this._values.QueryString?"?"+this._values.QueryString:"")+(this._values.Fragment?"#"+this._values.Fragment:"")},t.prototype.getUrl=function(){var e="";return e+=this._values.Origin,e+=this._values.Port?":"+this._values.Port:"",(e+=this._values.Path)+(this._values.QueryString?"?"+this._values.QueryString:"")},t.prototype._parse=function(e){this._initValues();var t=this._regex.exec(e);if(!t)throw"DPURLParser::_parse -> Invalid URL";for(var r in this._fields)"undefined"!=typeof t[this._fields[r]]&&(this._values[r]=t[this._fields[r]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname},new t(e)},_.addEvent=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation,t._getPath=e._getPath),t}e._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||function(){try{var t=e.target,r=[t];if(null===t||null===t.parentElement)return[];for(;null!==t.parentElement;)t=t.parentElement,r.unshift(t);return r}catch(n){return[]}}()},e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0};(function(t,r,n){var a=!(!_.isObject(sd.para.heatmap)||!sd.para.heatmap.useCapture);if(t&&t.addEventListener)t.addEventListener(r,function(t){t._getPath=e._getPath,n.call(this,t)},a);else{var s="on"+r,o=t[s];t[s]=function(t,r,n){return function(a){if(a=a||e(window.event)){a.target=a.srcElement;var s,o,i=!0;return"function"==typeof n&&(s=n(a)),o=r.call(t,a),!1!==s&&!1!==o||(i=!1),i}}}(t,n,o)}}).apply(null,arguments)},_.addHashEvent=function(e){var t="pushState"in window.history?"popstate":"hashchange";_.addEvent(window,t,e)},_.addSinglePageEvent=function(e){var t=location.href,r=window.history.pushState,n=window.history.replaceState;window.history.pushState=function(){r.apply(window.history,arguments),e(t),t=location.href},window.history.replaceState=function(){n.apply(window.history,arguments),e(t),t=location.href};var a=r?"popstate":"hashchange";_.addEvent(window,a,function(){e(t),t=location.href})},_.cookie={get:function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n=200&&r.status<300||304==r.status?e.success(t(r.responseText)):e.error(t(r.responseText),r.status),r.onreadystatechange=null,r.onload=null)}catch(n){r.onreadystatechange=null,r.onload=null}},r.open(e.type,e.url,!0);try{if(e.credentials&&(r.withCredentials=!0),_.isObject(e.header))for(var s in e.header)r.setRequestHeader(s,e.header[s]);e.data&&(e.cors||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?r.setRequestHeader("Content-type","application/json; charset=UTF-8"):r.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(n){}r.send(e.data||null)},_.loadScript=function(e){e=_.extend({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&((t=document.createElement("link")).rel="stylesheet",t.href=e.url),"js"===e.type&&((t=document.createElement("script")).async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)},_.getHostname=function(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=_.URL(e).hostname}catch(n){}return r||t},_.getQueryParamsFromUrl=function(e){var t={},r=e.split("?")[1]||"";return r&&(t=_.getURLSearchParams("?"+r)),t},_.getURLSearchParams=function(e){for(var t=function(e){return decodeURIComponent(e)},r={},n=(e=e||"").substring(1).split("&"),a=0;a=0;a--){var s=r[a];t[s]=n[s]}t.hostname&&"string"==typeof t.pathname&&0!==t.pathname.indexOf("/")&&(t.pathname="/"+t.pathname),t.searchParams=function(){var e=_.getURLSearchParams(t.search);return{get:function(t){return e[t]}}}()}return t},_.getCurrentDomain=function(e){var t=sd.para.current_domain;switch(typeof t){case"function":var r=t();return""===r||""===_.trim(r)?"url\u89e3\u6790\u5931\u8d25":-1!==r.indexOf(".")?r:"url\u89e3\u6790\u5931\u8d25";case"string":return""===t||""===_.trim(t)?"url\u89e3\u6790\u5931\u8d25":-1!==t.indexOf(".")?t:"url\u89e3\u6790\u5931\u8d25";default:var n=_.getCookieTopLevelDomain();return""===e?"url\u89e3\u6790\u5931\u8d25":""===n?"url\u89e3\u6790\u5931\u8d25":n}},_.getCookieTopLevelDomain=function(e){var t=(e=e||window.location.hostname).split(".");if(_.isArray(t)&&t.length>=2&&!/^(\d+\.)+\d+$/.test(e))for(var r="."+t.splice(t.length-1,1);t.length>0;)if(r="."+t.splice(t.length-1,1)+r,document.cookie="sensorsdata_domain_test=true; path=/; domain="+r,-1!==document.cookie.indexOf("sensorsdata_domain_test=true")){var n=new Date;return n.setTime(n.getTime()-1e3),document.cookie="sensorsdata_domain_test=true; expires="+n.toGMTString()+"; path=/; domain="+r,r}return""},_.isReferralTraffic=function(e){return""===(e=e||document.referrer)||_.getCookieTopLevelDomain(_.getHostname(e))!==_.getCookieTopLevelDomain()},_.ry=function(e){return new _.ry.init(e)},_.ry.init=function(e){this.ele=e},_.ry.init.prototype={addClass:function(e){return-1===(" "+this.ele.className+" ").indexOf(" "+e+" ")&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return-1!==t.indexOf(" "+e+" ")&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){return-1!==(" "+this.ele.className+" ").indexOf(" "+e+" ")},attr:function(e,t){return"string"==typeof e&&_.isUndefined(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){var e=this.ele.getBoundingClientRect();if(e.width||e.height){var t=this.ele.ownerDocument.documentElement;return{top:e.top+window.pageYOffset-t.clientTop,left:e.left+window.pageXOffset-t.clientLeft}}return{top:0,left:0}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),_.ry(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=getMatchedCSSRules(this.ele)),!r||!_.isArray(r))return null;for(var n=r.length-1;n>=0;n--){if(t=r[n].style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(e){return this.sibling(this.ele,"previousSibling")},siblings:function(e){return this.siblings((this.ele.parentNode||{}).firstChild,this.ele)},children:function(e){return this.siblings(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,_.ry(e)}},_.strToUnicode=function(e){if("string"!=typeof e)return sd.log("\u8f6c\u6362unicode\u9519\u8bef",e),e;for(var t="",r=0;r0&&(e=e.concat(sd.para.source_channel),e=_.unique(e)),_.each(e,function(e){(t=_.getQueryParam(location.href,e)).length&&(r[e]=t)}),r},campaignParamsStandard:function(e,t){e=e||"",t=t||"";var r=_.info.campaignParams(),n={},a={};for(var s in r)-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+s+" ")?n[e+s]=r[s]:a[t+s]=r[s];return{$utms:n,otherUtms:a}},properties:function(){return{$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$lib:"js",$lib_version:String(sd.lib_version)}},currentProps:{},register:function(e){_.extend(_.info.currentProps,e)}},_.autoExeQueue=function(){return{items:[],enqueue:function(e){this.items.push(e),this.start()},dequeue:function(){return this.items.shift()},getCurrentItem:function(){return this.items[0]},isRun:!1,start:function(){this.items.length>0&&!this.isRun&&(this.isRun=!0,this.getCurrentItem().start())},close:function(){this.dequeue(),this.isRun=!1,this.start()}}},_.trackLink=function(e,t,r){function n(e){function n(){s||(s=!0,location.href=a.href)}e.stopPropagation(),e.preventDefault();var s=!1;setTimeout(n,1e3),sd.track(t,r,n)}var a=null;return(e=e||{}).ele&&(a=e.ele),e.event&&(a=e.target?e.target:e.event.target),r=r||{},!(!a||"object"!=typeof a)&&(!a.href||/^javascript/.test(a.href)||a.target||a.download||a.onclick?(sd.track(t,r),!1):(e.event&&n(e.event),void(e.ele&&_.addEvent(e.ele,"click",function(e){n(e)}))))}}(),sd.para_default={preset_properties:{latest_utm:!0,latest_traffic_source_type:!0,latest_search_keyword:!0,latest_referrer:!0,latest_referrer_host:!1,latest_landing_page:!1,url:!1},img_use_crossorigin:!1,name:"sa",max_referrer_string_length:200,max_string_length:500,cross_subdomain:!0,show_log:!0,is_debug:!1,debug_mode:!1,debug_mode_upload:!1,session_time:0,use_client_time:!1,source_channel:[],send_type:"image",vtrack_ignore:{},auto_init:!0,is_track_single_page:!1,is_single_page:!1,batch_send:!1,source_type:{},callback_timeout:200,datasend_timeout:3e3,queue_timeout:300,is_track_device_id:!1,use_app_track:!1,ignore_oom:!0},sd.addReferrerHost=function(e){var t="\u53d6\u503c\u5f02\u5e38";_.isObject(e.properties)&&(e.properties.$first_referrer&&(e.properties.$first_referrer_host=_.getHostname(e.properties.$first_referrer,t)),"track"===e.type&&("$referrer"in e.properties&&(e.properties.$referrer_host=""===e.properties.$referrer?"":_.getHostname(e.properties.$referrer,t)),sd.para.preset_properties.latest_referrer&&sd.para.preset_properties.latest_referrer_host&&(e.properties.$latest_referrer_host=""===e.properties.$latest_referrer?"":_.getHostname(e.properties.$latest_referrer,t))))},sd.addPropsHook=function(e){sd.para.preset_properties&&sd.para.preset_properties.url&&"track"===e.type&&"undefined"==typeof e.properties.$url&&(e.properties.$url=window.location.href)},sd.initPara=function(e){sd.para=e||sd.para||{};var t,r={};if(_.isObject(sd.para.is_track_latest))for(var n in sd.para.is_track_latest)r["latest_"+n]=sd.para.is_track_latest[n];for(t in sd.para.preset_properties=_.extend({},sd.para_default.preset_properties,r,sd.para.preset_properties||{}),sd.para_default)void 0===sd.para[t]&&(sd.para[t]=sd.para_default[t]);"string"==typeof sd.para.server_url&&"://"===sd.para.server_url.slice(0,3)&&(sd.para.server_url=location.protocol+sd.para.server_url),"string"==typeof sd.para.web_url&&"://"===sd.para.web_url.slice(0,3)&&(sd.para.web_url=location.protocol+sd.para.web_url),"image"!==sd.para.send_type&&"ajax"!==sd.para.send_type&&"beacon"!==sd.para.send_type&&(sd.para.send_type="image");var a={datasend_timeout:6e3,send_interval:6e3,one_send_max_length:6};_.localStorage.isSupport()&&_.isSupportCors()&&"object"==typeof localStorage?!0===sd.para.batch_send?(sd.para.batch_send=_.extend({},a),sd.para.use_client_time=!0):"object"==typeof sd.para.batch_send&&(sd.para.use_client_time=!0,sd.para.batch_send=_.extend({},a,sd.para.batch_send)):sd.para.batch_send=!1;var s=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],o=["www.baidu.","m.baidu.","m.sm.cn","so.com","sogou.com","youdao.com","google.","yahoo.com/","bing.com/","ask.com/"],i=["weibo.com","renren.com","kaixin001.com","douban.com","qzone.qq.com","zhihu.com","tieba.baidu.com","weixin.qq.com"],c={baidu:["wd","word","kw","keyword"],google:"q",bing:"q",yahoo:"p",sogou:["query","keyword"],so:"q",sm:"q"};if("object"==typeof sd.para.source_type&&(sd.para.source_type.utm=_.isArray(sd.para.source_type.utm)?sd.para.source_type.utm.concat(s):s,sd.para.source_type.search=_.isArray(sd.para.source_type.search)?sd.para.source_type.search.concat(o):o,sd.para.source_type.social=_.isArray(sd.para.source_type.social)?sd.para.source_type.social.concat(i):i,sd.para.source_type.keyword=_.isObject(sd.para.source_type.keyword)?_.extend(c,sd.para.source_type.keyword):c),_.isObject(sd.para.heatmap)&&(sd.para.heatmap.clickmap=sd.para.heatmap.clickmap||"default",sd.para.heatmap.scroll_notice_map=sd.para.heatmap.scroll_notice_map||"default",sd.para.heatmap.scroll_delay_time=sd.para.heatmap.scroll_delay_time||4e3,sd.para.heatmap.scroll_event_duration=sd.para.heatmap.scroll_event_duration||18e3,sd.para.heatmap.renderRefreshTime=sd.para.heatmap.renderRefreshTime||1e3,sd.para.heatmap.loadTimeout=sd.para.heatmap.loadTimeout||1e3),"object"==typeof sd.para.server_url&&sd.para.server_url.length)for(t=0;tsd.para.datasend_timeout&&(sd.para.datasend_timeout=sd.para.callback_timeout),sd.para.callback_timeout>sd.para.queue_timeout&&(sd.para.queue_timeout=sd.para.callback_timeout),sd.para.queue_timeout>sd.para.datasend_timeout&&(sd.para.datasend_timeout=sd.para.queue_timeout)},sd.readyState={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},sd.setPreConfig=function(e){sd.para=e.para,sd._q=e._q},sd.setInitVar=function(){sd._t=sd._t||1*new Date,sd.lib_version="1.14.14",sd.is_first_visitor=!1,sd.source_channel_standard="utm_source utm_medium utm_campaign utm_content utm_term"},sd.log=function(){if((_.sessionStorage.isSupport()&&"true"===sessionStorage.getItem("sensorsdata_jssdk_debug")||sd.para.show_log)&&(!0!==sd.para.show_log&&"string"!==sd.para.show_log&&!1!==sd.para.show_log||(arguments[0]=_.formatJsonString(arguments[0])),"object"==typeof console&&console.log))try{return console.log.apply(console,arguments)}catch(e){console.log(arguments[0])}},sd.enableLocalLog=function(){if(_.sessionStorage.isSupport())try{sessionStorage.setItem("sensorsdata_jssdk_debug","true")}catch(e){sd.log("enableLocalLog error: "+e.message)}},sd.disableLocalLog=function(){_.sessionStorage.isSupport()&&sessionStorage.removeItem("sensorsdata_jssdk_debug")},sd.debug={distinct_id:function(){},jssdkDebug:function(){},_sendDebug:function(e){sd.track("_sensorsdata2019_debug",{_jssdk_debug_info:e})},apph5:function(e){var t="app_h5\u6253\u901a\u5931\u8d25-",r={1:t+"use_app_track\u4e3afalse",2:t+"Android\u6216\u8005iOS\uff0c\u6ca1\u6709\u66b4\u9732\u76f8\u5e94\u65b9\u6cd5",3.1:t+"Android\u6821\u9a8cserver_url\u5931\u8d25",3.2:t+"iOS\u6821\u9a8cserver_url\u5931\u8d25"},n=e.output,a=e.step,s=e.data;"all"!==n&&"console"!==n||sd.log(r[a]),("all"===n||"code"===n)&&_.isObject(sd.para.is_debug)&&sd.para.is_debug.apph5&&(s.type&&"profile"===s.type.slice(0,7)||(s.properties._jssdk_debug_info="apph5-"+String(a)))}};var commonWays={setOnlineState:function(e){if(!0===e&&_.isObject(sd.para.jsapp)&&"function"==typeof sd.para.jsapp.getData){sd.para.jsapp.isOnline=!0;var t=sd.para.jsapp.getData();_.isArray(t)&&t.length>0&&_.each(t,function(e){_.isJSONString(e)&&sd.sendState.pushSend(JSON.parse(e))})}else sd.para.jsapp.isOnline=!1},autoTrackIsUsed:!1,isReady:function(e){e()},getUtm:function(){return _.info.campaignParams()},getStayTime:function(){return(new Date-sd._t)/1e3},setProfileLocal:function(e){if(!_.localStorage.isSupport())return sd.setProfile(e),!1;if(!_.isObject(e)||_.isEmptyObject(e))return!1;var t=_.localStorage.parse("sensorsdata_2015_jssdk_profile"),r=!1;if(_.isObject(t)&&!_.isEmptyObject(t)){for(var n in e)!(n in t&&t[n]!==e[n])&&n in t||(t[n]=e[n],r=!0);r&&(_.localStorage.set("sensorsdata_2015_jssdk_profile",JSON.stringify(t)),sd.setProfile(e))}else _.localStorage.set("sensorsdata_2015_jssdk_profile",JSON.stringify(e)),sd.setProfile(e)},setInitReferrer:function(){var e=_.getReferrer();sd.setOnceProfile({_init_referrer:e,_init_referrer_host:_.info.pageProp.referrer_host})},setSessionReferrer:function(){var e=_.getReferrer();store.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:_.info.pageProp.referrer_host})},setDefaultAttr:function(){_.info.register({_current_url:location.href,_referrer:_.getReferrer(),_referring_host:_.info.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase(),a=e.parentNode.tagName.toLowerCase();"button"!==n&&"a"!==n&&"a"!==a&&"button"!==a&&"input"!==n&&"textarea"!==n&&heatmap.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();heatmap.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function r(){var e=_.info.campaignParams(),t={};for(var r in e)-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+r+" ")?t["$"+r]=e[r]:t[r]=e[r];return t}function n(e,t){sd.track("$pageview",_.extend({$referrer:a,$url:location.href,$url_path:location.pathname,$title:document.title},e,r()),t),a=location.href}if(this.autoTrackIsUsed)var a=_.info.pageProp.url;else a=_.info.pageProp.referrer;e=_.isObject(e)?e:{},e=_.isObject(e)?e:{},sd.is_first_visitor&&!e.not_set_profile&&(sd.setOnceProfile(_.extend({$first_visit_time:new Date,$first_referrer:_.getReferrer(),$first_browser_language:navigator.language||"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:_.getSourceFromReferrer(),$first_search_keyword:_.getKeywordFromReferrer()},r())),sd.is_first_visitor=!1),e.not_set_profile&&delete e.not_set_profile,sd.is_first_visitor&&!e.not_set_profile&&(sd.setOnceProfile(_.extend({$first_visit_time:new Date,$first_referrer:_.getReferrer(),$first_browser_language:navigator.language||"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:_.getSourceFromReferrer(),$first_search_keyword:_.getKeywordFromReferrer()},r())),sd.is_first_visitor=!1),e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n},autoTrackWithoutProfile:function(e,t){e=_.isObject(e)?e:{},this.autoTrack(_.extend(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=_.isObject(e)?e:{};var r=_.info.campaignParams(),n={};for(var a in r)-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+a+" ")?n["$"+a]=r[a]:n[a]=r[a];sd.is_first_visitor&&!e.not_set_profile&&(sd.setOnceProfile(_.extend({$first_visit_time:new Date,$first_referrer:_.getReferrer(),$first_browser_language:navigator.language||"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:"string"==typeof document.charset?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:_.getSourceFromReferrer(),$first_search_keyword:_.getKeywordFromReferrer()},n)),sd.is_first_visitor=!1),e.not_set_profile&&delete e.not_set_profile;var s=location.href;sd.para.is_single_page&&_.addHashEvent(function(){var r=_.getReferrer(s);sd.track("$pageview",_.extend({$referrer:r,$url:location.href,$url_path:location.pathname,$title:document.title},n,e),t),s=location.href}),sd.track("$pageview",_.extend({$referrer:_.getReferrer(),$url:location.href,$url_path:location.pathname,$title:document.title},n,e),t),this.autoTrackIsUsed=!0},getAnonymousID:function(){return _.isEmptyObject(sd.store._state)?"\u8bf7\u5148\u521d\u59cb\u5316SDK":sd.store._state.first_id?sd.store._state.first_id:sd.store._state.distinct_id}};sd.quick=function(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&commonWays[t]?commonWays[t].apply(commonWays,r):void("function"==typeof t?t.apply(sd,r):sd.log("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))},sd.track=function(e,t,r){saEvent.check({event:e,properties:t})&&saEvent.send({type:"track",event:e,properties:t},r)},sd.trackLink=function(e,t,r){"object"==typeof e&&e.tagName?_.trackLink({ele:e},t,r):"object"==typeof e&&e.target&&e.event&&_.trackLink(e,t,r)},sd.trackLinks=function(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&!(!e.href||/^javascript/.test(e.href)||e.target)&&void _.addEvent(e,"click",function(n){function a(){s||(s=!0,location.href=e.href)}n.preventDefault();var s=!1;setTimeout(a,1e3),sd.track(t,r,a)})},sd.setProfile=function(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set",properties:e},t)},sd.setOnceProfile=function(e,t){saEvent.check({propertiesMust:e})&&saEvent.send({type:"profile_set_once",properties:e},t)},sd.appendProfile=function(e,t){saEvent.check({propertiesMust:e})&&(_.each(e,function(t,r){_.isString(t)?e[r]=[t]:_.isArray(t)||(delete e[r],sd.log("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),_.isEmptyObject(e)||saEvent.send({type:"profile_append",properties:e},t))},sd.incrementProfile=function(e,t){var r=e;_.isString(e)&&((e={})[r]=1),saEvent.check({propertiesMust:e})&&(function(e){for(var t in e)if(!/-*\d+/.test(String(e[t])))return!1;return!0}(e)?saEvent.send({type:"profile_increment",properties:e},t):sd.log("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))},sd.deleteProfile=function(e){saEvent.send({type:"profile_delete"},e),store.set("distinct_id",_.UUID()),store.set("first_id","")},sd.unsetProfile=function(e,t){var r=e,n={};_.isString(e)&&(e=[]).push(r),_.isArray(e)?(_.each(e,function(e){_.isString(e)?n[e]=!0:sd.log("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),saEvent.send({type:"profile_unset",properties:n},t)):sd.log("profile_unset\u7684\u53c2\u6570\u662f\u6570\u7ec4")},sd.identify=function(e,t){"number"==typeof e&&(e=String(e));var r=store.getFirstId();"undefined"==typeof e?r?store.set("first_id",_.UUID()):store.set("distinct_id",_.UUID()):saEvent.check({distinct_id:e})?!0===t?r?store.set("first_id",e):store.set("distinct_id",e):r?store.change("first_id",e):store.change("distinct_id",e):sd.log("identify\u7684\u53c2\u6570\u5fc5\u987b\u662f\u5b57\u7b26\u4e32")},sd.trackSignup=function(e,t,r,n){if(saEvent.check({distinct_id:e,event:t,properties:r})){var a=store.getFirstId()||store.getDistinctId();store.set("distinct_id",e),saEvent.send({original_id:a,distinct_id:e,type:"track_signup",event:t,properties:r},n)}},sd.trackAbtest=function(e,t){},sd.registerPage=function(e){saEvent.check({properties:e})?_.extend(_.info.currentProps,e):sd.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")},sd.clearAllRegister=function(e){store.clearAllProps(e)},sd.register=function(e){saEvent.check({properties:e})?store.setProps(e):sd.log("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")},sd.registerOnce=function(e){saEvent.check({properties:e})?store.setPropsOnce(e):sd.log("registerOnce\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")},sd.registerSession=function(e){saEvent.check({properties:e})?store.setSessionProps(e):sd.log("registerSession\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")},sd.registerSessionOnce=function(e){saEvent.check({properties:e})?store.setSessionPropsOnce(e):sd.log("registerSessionOnce\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")},sd.login=function(e,t){if("number"==typeof e&&(e=String(e)),saEvent.check({distinct_id:e})){var r=store.getFirstId(),n=store.getDistinctId();e!==n?(r||store.set("first_id",n),sd.trackSignup(e,"$SignUp",{},t)):t&&t()}else sd.log("login\u7684\u53c2\u6570\u5fc5\u987b\u662f\u5b57\u7b26\u4e32"),t&&t()},sd.logout=function(e){var t=store.getFirstId();t?(store.set("first_id",""),!0===e?store.set("distinct_id",_.UUID()):store.set("distinct_id",t)):sd.log("\u6ca1\u6709first_id\uff0clogout\u5931\u8d25")},sd.getPresetProperties=function(){var e={$referrer:_.info.pageProp.referrer||"",$referrer_host:_.info.pageProp.referrer?_.getHostname(_.info.pageProp.referrer):"",$url:location.href,$url_path:location.pathname,$title:document.title||"",_distinct_id:store.getDistinctId()};return _.extend({},_.info.properties(),sd.store.getProps(),function(){var e=_.info.campaignParams(),t={};for(var r in e)-1!==(" "+sd.source_channel_standard+" ").indexOf(" "+r+" ")?t["$"+r]=e[r]:t[r]=e[r];return t}(),e)},BatchSend.prototype={add:function(e){_.isObject(e)&&(this.writeStore(e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendStrategy())},remove:function(e){this.sendingData>0&&--this.sendingData,_.isArray(e)&&e.length>0&&_.each(e,function(e){_.localStorage.remove(e)})},send:function(e){var t=this,r=_.isArray(sd.para.server_url)?sd.para.server_url[0]:sd.para.server_url;_.ajax({url:r,type:"POST",data:"data_list="+encodeURIComponent(_.base64Encode(JSON.stringify(e.vals))),credentials:!1,timeout:sd.para.batch_send.datasend_timeout,cors:!0,success:function(){t.remove(e.keys)}})},sendPrepare:function(e){var t=e.vals,r=sd.para.batch_send.one_send_max_length,n=t.length;if(n>0)if(n<=r)this.send({keys:e.keys,vals:t});else for(var a=0;a*r0&&0===this.sendingData&&(this.sendingData=Math.ceil(e.vals.length/sd.para.batch_send.one_send_max_length),this.sendPrepare(e))},batchInterval:function(){var e=this;setInterval(function(){e.sendStrategy()},sd.para.batch_send.send_interval)},readStore:function(){for(var e=[],t=[],r=null,n=(new Date).getTime(),a=localStorage.length,s=0;s-1?e.config.send_type:sd.para.send_type)&&"function"!=typeof navigator.sendBeacon&&(r="image"),"ajax"===r&&!1===_.isSupportCors()&&(r="image"),r},image:function(e){this.callback=e.callback,this.img=document.createElement("img"),this.img.width=1,this.img.height=1,sd.para.img_use_crossorigin&&(this.img.crossOrigin="anonymous"),this.data=e.data,this.server_url=dataSend.getSendUrl(e.server_url,e.data)}};dataSend.image.prototype.start=function(){var e=this;sd.para.ignore_oom&&(this.img.onload=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onerror=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()},this.img.onabort=function(){this.onload=null,this.onerror=null,this.onabort=null,e.isEnd()}),this.img.src=this.server_url},dataSend.image.prototype.lastClear=function(){this.img.src=""},dataSend.ajax=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=dataSend.getSendData(e.data)},dataSend.ajax.prototype.start=function(){var e=this;_.ajax({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:sd.para.datasend_timeout,cors:!0,success:function(){e.isEnd()},error:function(){e.isEnd()}})},dataSend.beacon=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=dataSend.getSendData(e.data)},dataSend.beacon.prototype.start=function(){var e=this;"object"==typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.server_url,this.data),setTimeout(function(){e.isEnd()},40)};var sendState={};sd.sendState=sendState,sendState.queue=_.autoExeQueue(),sendState.requestData=null,sendState.getSendCall=function(e,t,r){if(sd.is_heatmap_render_mode)return!1;if(sd.readyState.state<3)return sd.log("\u521d\u59cb\u5316\u6ca1\u6709\u5b8c\u6210"),!1;e._track_id=Number(String(Math.random()).slice(2,5)+String(Math.random()).slice(2,4)+String((new Date).getTime()).slice(-4)),sd.para.use_client_time&&(e._flush_time=(new Date).getTime());var n=e;if(e=JSON.stringify(e),this.requestData={data:n,config:t,callback:r},!sd.para.use_app_track&&sd.para.batch_send&&localStorage.length<200)return sd.log(n),sd.batchSend.add(this.requestData.data),!1;if(!0===sd.para.use_app_track||"only"===sd.para.use_app_track)if("object"==typeof SensorsData_APP_JS_Bridge&&(SensorsData_APP_JS_Bridge.sensorsdata_verify||SensorsData_APP_JS_Bridge.sensorsdata_track))SensorsData_APP_JS_Bridge.sensorsdata_verify?SensorsData_APP_JS_Bridge.sensorsdata_verify(JSON.stringify(_.extend({server_url:sd.para.server_url},n)))?"function"==typeof r&&r():(sd.debug.apph5({data:n,step:"3.1",output:"all"}),this.prepareServerUrl()):(SensorsData_APP_JS_Bridge.sensorsdata_track(JSON.stringify(_.extend({server_url:sd.para.server_url},n))),"function"==typeof r&&r());else if(!/sensors-verify/.test(navigator.userAgent)&&!/sa-sdk-ios/.test(navigator.userAgent)||window.MSStream)!0===sd.para.use_app_track&&(sd.debug.apph5({data:n,step:"2",output:"all"}),this.prepareServerUrl());else{var a=null;if(/sensors-verify/.test(navigator.userAgent)){var s=navigator.userAgent.match(/sensors-verify\/([^\s]+)/);if(s&&s[0]&&"string"==typeof s[1]&&2===s[1].split("?").length){s=s[1].split("?");var o=null,i=null;try{o=_.URL(sd.para.server_url).hostname,i=_.URL(sd.para.server_url).searchParams.get("project")||"default"}catch(c){}o&&o===s[0]&&i&&i===s[1]?((a=document.createElement("iframe")).setAttribute("src","sensorsanalytics://trackEvent?event="+encodeURIComponent(JSON.stringify(_.extend({server_url:sd.para.server_url},n)))),document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=null,"function"==typeof r&&r()):(sd.debug.apph5({data:n,step:"3.2",output:"all"}),this.prepareServerUrl())}}else(a=document.createElement("iframe")).setAttribute("src","sensorsanalytics://trackEvent?event="+encodeURIComponent(JSON.stringify(_.extend({server_url:sd.para.server_url},n)))),document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=null,"function"==typeof r&&r()}else"mui"===sd.para.use_app_track?_.isObject(window.plus)&&window.plus.SDAnalytics&&window.plus.SDAnalytics.trackH5Event&&window.plus.SDAnalytics.trackH5Event(e):(sd.debug.apph5({data:n,step:"1",output:"code"}),this.prepareServerUrl());sd.log(n)},sendState.prepareServerUrl=function(){if("object"==typeof this.requestData.config&&this.requestData.config.server_url)this.sendCall(this.requestData.config.server_url,this.requestData.callback);else if(_.isArray(sd.para.server_url))for(var e=0;e0)for(var t=0;t "):this.getDomSelector(e.parentNode,t)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},W:function(e){var t=parseInt(+e.clientX+ +this.na(),10);e=parseInt(+e.clientY+ +this.i(),10);return{x:isNaN(t)?0:t,y:isNaN(e)?0:e}},start:function(e,t,r,n,a){var s=_.isObject(n)?n:{},o=_.isFunction(a)?a:_.isFunction(n)?n:void 0;if(sd.para.heatmap&&sd.para.heatmap.collect_element&&!sd.para.heatmap.collect_element(t))return!1;var i=this.getDomSelector(t),c=_.getEleInfo({target:t});if(c.$element_selector=i||"",sd.para.heatmap&&sd.para.heatmap.custom_property){var u=sd.para.heatmap.custom_property(t);_.isObject(u)&&(c=_.extend(c,u))}c=_.extend(c,s),"a"===r&&sd.para.heatmap&&!0===sd.para.heatmap.isTrackLink?_.trackLink({event:e,target:t},"$WebClick",c):sd.track("$WebClick",c,o)},hasElement:function(e){var t=e._getPath();if(_.isArray(t)&&t.length>0)for(var r=0;rsd.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=location.href,e.$title=document.title,e.$url_path=location.pathname,e.event_duration=Math.min(sd.para.heatmap.scroll_event_duration,parseInt(a)/1e3),sd.track("$WebStay",e)),this.current_time=n}});e.current_time=new Date,_.addEvent(window,"scroll",function(){e.go()}),_.addEvent(window,"unload",function(){e.go("notime")})},initHeatmap:function(){var e=this;return!(!_.isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.clickmap)&&!(_.isFunction(sd.para.heatmap.collect_url)&&!sd.para.heatmap.collect_url())&&("all"===sd.para.heatmap.collect_elements?sd.para.heatmap.collect_elements="all":sd.para.heatmap.collect_elements="interact",void("all"===sd.para.heatmap.collect_elements?_.addEvent(document,"click",function(t){var r=t||window.event;if(!r)return!1;var n=r.target||r.srcElement;if("object"!=typeof n)return!1;if("string"!=typeof n.tagName)return!1;var a=n.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!n||!n.parentNode||!n.parentNode.children)return!1;var s=n.parentNode.tagName.toLowerCase();"a"===s||"button"===s?e.start(r,n.parentNode,s):e.start(r,n,a)}):_.addEvent(document,"click",function(t){var r=t||window.event;if(!r)return!1;var n=r.target||r.srcElement;if("object"!=typeof n)return!1;if("string"!=typeof n.tagName)return!1;var a=n.tagName.toLowerCase();if("body"===a.toLowerCase()||"html"===a.toLowerCase())return!1;if(!n||!n.parentNode||!n.parentNode.children)return!1;var s=n.parentNode;if("a"===a||"button"===a||"input"===a||"textarea"===a)e.start(r,n,a);else if("button"===s.tagName.toLowerCase()||"a"===s.tagName.toLowerCase())e.start(r,s,n.parentNode.tagName.toLowerCase());else if("area"===a&&"map"===s.tagName.toLowerCase()&&_.ry(s).prev().tagName&&"img"===_.ry(s).prev().tagName.toLowerCase())e.start(r,_.ry(s).prev(),_.ry(s).prev().tagName.toLowerCase());else{var o=e.hasElement(t);o&&e.start(r,o,o.tagName.toLowerCase())}})))},prepare:function(e){function t(e,t,r){sd.para.heatmap_url?_.loadScript({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(sd,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(sd.heatmap_version&&sd.heatmap_version===sd.lib_version||console.log("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:sd.para.heatmap_url}):sd.log("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")}var r=location.search.match(/sa-request-id=([^&#]+)/),n=location.search.match(/sa-request-type=([^&#]+)/),a=location.search.match(/sa-request-url=([^&#]+)/);r&&r[0]&&r[1]?(heatmap.setNotice(a),_.sessionStorage.isSupport()&&(a&&a[0]&&a[1]&&sessionStorage.setItem("sensors_heatmap_url",decodeURIComponent(a[1])),sessionStorage.setItem("sensors_heatmap_id",r[1]),n&&n[0]&&n[1]?"1"===n[1]||"2"===n[1]||"3"===n[1]?(n=n[1],sessionStorage.setItem("sensors_heatmap_type",n)):n=null:n=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),t(r[1],n)):_.sessionStorage.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")?(heatmap.setNotice(),t(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),location.href)):(e(),_.isObject(sd.para.heatmap)&&(this.initHeatmap(),this.initScrollmap()))}};if(sd.init=function(e){function t(){var e=null,t=null;window.sensorsdata_app_js_bridge_call_js=function(r){!function(r){e=r,_.isJSONString(e)&&(e=JSON.parse(e)),t&&(t(e),t=null,e=null)}(r)},sd.getAppStatus=function(r){return function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var e=document.createElement("iframe");e.setAttribute("src","sensorsanalytics://getAppInfo"),document.documentElement.appendChild(e),e.parentNode.removeChild(e),e=null}}(),"object"==typeof window.SensorsData_APP_JS_Bridge&&window.SensorsData_APP_JS_Bridge.sensorsdata_call_app&&(e=SensorsData_APP_JS_Bridge.sensorsdata_call_app(),_.isJSONString(e)&&(e=JSON.parse(e))),r?void(null===e?t=r:(r(e),e=null)):e}}return!(sd.readyState&&sd.readyState.state&&sd.readyState.state>=2)&&(sd.setInitVar(),sd.readyState.setState(2),sd.initPara(e),void heatmap.prepare(function(){t(),_.info.initPage(),sd.para.is_track_single_page&&_.addSinglePageEvent(function(e){var t=function(t){t=t||{},e!==location.href&&(_.info.pageProp.referrer=e,sd.quick("autoTrack",_.extend({$url:location.href,$referrer:e},t)))};if("boolean"==typeof sd.para.is_track_single_page)t();else if("function"==typeof sd.para.is_track_single_page){var r=sd.para.is_track_single_page();_.isObject(r)?t(r):!0===r&&t()}}),sd.para.batch_send&&sd.batchSend.batchInterval(),sd.store.init(),sd.readyState.setState(3),sd._q&&_.isArray(sd._q)&&sd._q.length>0&&_.each(sd._q,function(e){sd[e[0]].apply(sd,Array.prototype.slice.call(e[1]))})}))},"string"!=typeof window.sensorsDataAnalytic201505)return"undefined"==typeof window.sensorsDataAnalytic201505?(window.sensorsDataAnalytic201505=sd,sd):window.sensorsDataAnalytic201505;sd.setPreConfig(window[sensorsDataAnalytic201505]),window[sensorsDataAnalytic201505]=sd,sd.init(),window.sensorsDataAnalytic201505=sd}catch(err){if("object"==typeof console&&console.log)try{console.log(err)}catch(e){}}},module.exports=e()},qArv:function(e,t,r){"use strict";var n=r("hfKm"),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};n(t,"__esModule",{value:!0});var s=a(r("q1tI"));t.DataManagerContext=s.createContext(null)},yLiY:function(e,t,r){"use strict";var n;r("hfKm")(t,"__esModule",{value:!0}),t.default=function(){return n},t.setConfig=function(e){n=e}},zmvN:function(e,t,r){"use strict";var n=r("ln6h"),a=r("/HRN"),s=r("WaGi"),o=r("KI45");t.__esModule=!0,t.default=void 0;var i=o(r("+oT+")),c=o(r("eVuF")),u=o(r("dZ6Y"));var d=function(e){try{return e.relList.supports("preload")}catch(t){return!1}}(document.createElement("link"));function p(e){var t=document.createElement("link");t.rel="preload",t.crossOrigin=void 0,t.href=encodeURI(e),t.as="script",document.head.appendChild(t)}var l=function(){function e(t,r){a(this,e),this.buildId=t,this.assetPrefix=r,this.pageCache={},this.pageRegisterEvents=(0,u.default)(),this.loadingRoutes={}}return s(e,[{key:"getDependencies",value:function(e){return this.promisedBuildManifest.then(function(t){return t[e]&&t[e].map(function(e){return"/_next/"+e})||[]})}},{key:"normalizeRoute",value:function(e){if("/"!==e[0])throw new Error('Route name should start with a "/", got "'+e+'"');return"/"===(e=e.replace(/\/index$/,"/"))?e:e.replace(/\/$/,"")}},{key:"loadPage",value:function(e){return this.loadPageScript(e).then(function(e){return e.page})}},{key:"loadPageScript",value:function(e){var t=this;return e=this.normalizeRoute(e),new c.default(function(r,n){var a=t.pageCache[e];if(a){var s=a.error,o=a.page,i=a.mod;s?n(s):r({page:o,mod:i})}else t.pageRegisterEvents.on(e,function a(s){var o=s.error,i=s.page,c=s.mod;t.pageRegisterEvents.off(e,a),delete t.loadingRoutes[e],o?n(o):r({page:i,mod:c})}),document.querySelector('script[data-next-page="'+e+'"]')||t.loadingRoutes[e]||(t.loadRoute(e),t.loadingRoutes[e]=!0)})}},{key:"loadRoute",value:function(e){var t=this;return(0,i.default)(n.mark(function r(){var a,s;return n.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:e=t.normalizeRoute(e),a="/"===e?"/index.js":e+".js",s=t.assetPrefix+"/_next/static/"+encodeURIComponent(t.buildId)+"/pages"+a,t.loadScript(s,e,!0);case 4:case"end":return r.stop()}},r)}))()}},{key:"loadScript",value:function(e,t,r){var n=this,a=document.createElement("script");a.crossOrigin=void 0,a.src=encodeURI(e),a.onerror=function(){var r=new Error("Error loading script "+e);r.code="PAGE_LOAD_ERROR",n.pageRegisterEvents.emit(t,{error:r})},document.body.appendChild(a)}},{key:"registerPage",value:function(e,t){var r=this;!function(){try{var n=t(),a={page:n.default||n,mod:n};r.pageCache[e]=a,r.pageRegisterEvents.emit(e,a)}catch(s){r.pageCache[e]={error:s},r.pageRegisterEvents.emit(e,{error:s})}}()}},{key:"prefetch",value:function(e,t){var r=this;return(0,i.default)(n.mark(function a(){var s,o,i;return n.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(e=r.normalizeRoute(e),s=("/"===e?"/index":e)+".js",o=r.assetPrefix+(t?e:"/_next/static/"+encodeURIComponent(r.buildId)+"/pages"+s),!document.querySelector('link[rel="preload"][href^="'+o+'"], script[data-next-page="'+e+'"]')){n.next=6;break}return n.abrupt("return");case 6:if(!(i=navigator.connection)){n.next=9;break}if(-1===(i.effectiveType||"").indexOf("2g")&&!i.saveData){n.next=9;break}return n.abrupt("return");case 9:n.next=15;break;case 13:n.t0=function(e){r.prefetch(e,!0)},n.sent.forEach(n.t0);case 15:if(!d){n.next=18;break}return p(o),n.abrupt("return");case 18:if(!t){n.next=20;break}return n.abrupt("return");case 20:if("complete"!==document.readyState){n.next=24;break}return n.abrupt("return",r.loadPage(e).catch(function(){}));case 24:return n.abrupt("return",new c.default(function(t){window.addEventListener("load",function(){r.loadPage(e).then(function(){return t()},function(){return t()})})}));case 25:case"end":return n.stop()}},a)}))()}}]),e}();t.default=l}},[[5,0,1]]]);