You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
96 KiB
JavaScript

(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;o<a;o++,i=i.previousElementSibling)i.tagName.toLowerCase()===e&&s.push(i);var c=t.map(u).filter(function(e){for(var t=0,r=s.length;t<r;t++){if(s[t].isEqualNode(e))return s.splice(t,1),!1}return!0});s.forEach(function(e){return e.parentNode.removeChild(e)}),c.forEach(function(e){return r.insertBefore(e,n)}),n.content=(a-s.length+c.length).toString()}}]),e}();function u(e){var t=e.type,r=e.props,n=document.createElement(t);for(var a in r)if(r.hasOwnProperty(a)&&"children"!==a&&"dangerouslySetInnerHTML"!==a){var s=i[a]||a.toLowerCase();n.setAttribute(s,r[a])}var o=r.children,c=r.dangerouslySetInnerHTML;return c?n.innerHTML=c.__html||"":o&&(n.textContent="string"===typeof o?o:o.join("")),n}t.default=c},IKlv:function(e,t,r){"use strict";var n=r("ln6h"),a=r("/HRN"),s=r("WaGi"),o=r("ZDA2"),i=r("/+P4"),c=r("N9n2"),u=r("8+Nu"),d=r("5Uuq"),p=r("KI45");t.__esModule=!0,t.render=te,t.renderError=ne,t.default=t.emitter=t.ErrorComponent=t.router=t.dataManager=t.version=void 0;var l=p(r("+oT+")),_=p(r("htGi")),f=(p(r("5Uuq")),p(r("eVuF"))),h=p(r("q1tI")),g=p(r("i8i4")),m=p(r("DqTX")),v=r("nOHt"),y=p(r("dZ6Y")),b=r("g/15"),w=p(r("zmvN")),S=d(r("yLiY")),E=r("FYa8"),O=r("qArv"),k=r("qOIg"),C=r("0IRE"),P=r("s4NR"),N=r("/jkW");window.Promise||(window.Promise=f.default);var I=JSON.parse(document.getElementById("__NEXT_DATA__").textContent);window.__NEXT_DATA__=I;t.version="9.1.4";var T=I.props,x=I.err,R=I.page,j=I.query,D=I.buildId,$=I.assetPrefix,A=I.runtimeConfig,L=I.dynamicIds,U=JSON.parse(window.__NEXT_DATA__.dataManager),M=new C.DataManager(U);t.dataManager=M;var q=$||"";r.p=q+"/_next/",S.setConfig({serverRuntimeConfig:{},publicRuntimeConfig:A||{}});var H=(0,b.getURL)(),F=new w.default(D,q),B=function(e){var t=u(e,2),r=t[0],n=t[1];return F.registerPage(r,n)};window.__NEXT_P&&window.__NEXT_P.map(B),window.__NEXT_P=[],window.__NEXT_P.push=B;var J,W,K,X,G,V,Y=new m.default,z=document.getElementById("__next");t.router=W,t.ErrorComponent=K;var Q=function(e){function t(){return a(this,t),o(this,i(t).apply(this,arguments))}return c(t,e),s(t,[{key:"componentDidCatch",value:function(e,t){this.props.fn(e,t)}},{key:"componentDidMount",value:function(){this.scrollToHash(),I.nextExport&&((0,N.isDynamicRoute)(W.pathname)||location.search)&&W.replace(W.pathname+"?"+(0,P.stringify)((0,_.default)({},W.query,{},(0,P.parse)(location.search.substr(1)))),H,{_h:1})}},{key:"componentDidUpdate",value:function(){this.scrollToHash()}},{key:"scrollToHash",value:function(){var e=location.hash;if(e=e&&e.substring(1)){var t=document.getElementById(e);t&&setTimeout(function(){return t.scrollIntoView()},0)}}},{key:"render",value:function(){return this.props.children}}]),t}(h.default.Component),Z=(0,y.default)();t.emitter=Z;var ee=function(){var e=(0,l.default)(n.mark(function e(r){var a,s,o,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(void 0===r?{}:r).webpackHMR,e.next=4,F.loadPageScript("/_app");case 4:return a=e.sent,s=a.page,o=a.mod,G=s,o&&o.unstable_onPerformanceData&&(V=function(e){var t=e.name,r=e.startTime,n=e.value;o.unstable_onPerformanceData({name:t,startTime:r,value:n})}),i=x,e.prev=10,e.next=13,F.loadPage(R);case 13:X=e.sent,e.next=18;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(10),i=e.t0;case 23:if(!window.__NEXT_PRELOADREADY){e.next=26;break}return e.next=26,window.__NEXT_PRELOADREADY(L);case 26:return t.router=W=(0,v.createRouter)(R,j,H,{initialProps:T,pageLoader:F,App:G,Component:X,wrapApp:de,err:i,subscription:function(e,t){te({App:t,Component:e.Component,props:e.props,err:e.err,emitter:Z})}}),te({App:G,Component:X,props:T,err:i,emitter:Z}),e.abrupt("return",Z);case 31:case"end":return e.stop()}},e,null,[[10,20]])}));return function(t){return e.apply(this,arguments)}}();function te(e){return re.apply(this,arguments)}function re(){return(re=(0,l.default)(n.mark(function e(t){return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ne(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,pe(t);case 7:e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(4),e.next=13,ne((0,_.default)({},t,{err:e.t0}));case 13:case"end":return e.stop()}},e,null,[[4,9]])}))).apply(this,arguments)}function ne(e){return ae.apply(this,arguments)}function ae(){return(ae=(0,l.default)(n.mark(function e(r){var a,s,o,i,c;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=r.App,s=r.err,e.next=3;break;case 3:return console.error(s),e.next=7,F.loadPage("/_error");case 7:if(t.ErrorComponent=K=e.sent,o=de(a),i={Component:K,AppTree:o,router:W,ctx:{err:s,pathname:R,query:j,asPath:H,AppTree:o}},!r.props){e.next=14;break}e.t0=r.props,e.next=17;break;case 14:return e.next=16,(0,b.loadGetInitialProps)(a,i);case 16:e.t0=e.sent;case 17:return c=e.t0,e.next=20,pe((0,_.default)({},r,{err:s,Component:K,props:c}));case 20:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.default=ee;var se="function"===typeof g.default.hydrate;function oe(){b.SUPPORTS_PERFORMANCE_USER_TIMING&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),V&&(performance.getEntriesByName("Next.js-hydration").forEach(V),performance.getEntriesByName("beforeRender").forEach(V)),ce())}function ie(){if(b.SUPPORTS_PERFORMANCE_USER_TIMING){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),V&&(performance.getEntriesByName("Next.js-render").forEach(V),performance.getEntriesByName("Next.js-route-change-to-render").forEach(V)),ce())}}function ce(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach(function(e){return performance.clearMarks(e)}),["Next.js-before-hydration","Next.js-hydration","Next.js-route-change-to-render","Next.js-render"].forEach(function(e){return performance.clearMeasures(e)})}function ue(e){var t=e.children;return h.default.createElement(Q,{fn:function(e){return ne({App:G,err:e}).catch(function(e){return console.error("Error rendering page: ",e)})}},h.default.createElement(k.RouterContext.Provider,{value:(0,v.makePublicRouterInstance)(W)},h.default.createElement(O.DataManagerContext.Provider,{value:M},h.default.createElement(E.HeadManagerContext.Provider,{value:Y.updateHead},t))))}var de=function(e){return function(t){var r=(0,_.default)({},t,{Component:X,err:x,router:W});return h.default.createElement(ue,null,h.default.createElement(e,r))}};function pe(e){return le.apply(this,arguments)}function le(){return(le=(0,l.default)(n.mark(function e(t){var r,a,s,o,i,c,u,d,p,l,f,m;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.App,a=t.Component,s=t.props,o=t.err,s||!a||a===K||J.Component!==K){e.next=8;break}return c=(i=W).pathname,u=i.query,d=i.asPath,p=de(r),l={router:W,AppTree:p,Component:K,ctx:{err:o,pathname:c,query:u,asPath:d,AppTree:p}},e.next=7,(0,b.loadGetInitialProps)(r,l);case 7:s=e.sent;case 8:a=a||J.Component,s=s||J.props,f=(0,_.default)({},s,{Component:a,err:o,router:W}),J=f,Z.emit("before-reactdom-render",{Component:a,ErrorComponent:K,appProps:f}),m=h.default.createElement(ue,null,h.default.createElement(r,f)),n=m,v=z,b.SUPPORTS_PERFORMANCE_USER_TIMING&&performance.mark("beforeRender"),se?(g.default.hydrate(n,v,oe),se=!1):g.default.render(n,v,ie),V&&performance.getEntriesByType("paint").forEach(V),Z.emit("after-reactdom-render",{Component:a,ErrorComponent:K,appProps:f});case 16:case"end":return e.stop()}var n,v},e)}))).apply(this,arguments)}},Wr5T:function(e,t){!function(){"use strict";if("object"===typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});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<this.thresholds.length;a++){var s=this.thresholds[a];if(s==r||s==n||s<r!==s<n)return!0}},n.prototype._rootIsInDom=function(){return!this.root||c(e,this.root)},n.prototype._rootContainsTarget=function(t){return c(this.root||e,t)},n.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},n.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=n,window.IntersectionObserverEntry=r}function r(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,r=t.width*t.height,n=this.intersectionRect,a=n.width*n.height;this.intersectionRatio=r?Number((a/r).toFixed(4)):this.isIntersecting?1:0}function n(e,t){var r=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=function(e,t){var r=null;return function(){r||(r=setTimeout(function(){e(),r=null},t))}}(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function a(e,t,r,n){"function"==typeof e.addEventListener?e.addEventListener(t,r,n||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,r)}function s(e,t,r,n){"function"==typeof e.removeEventListener?e.removeEventListener(t,r,n||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,r)}function o(e,t){var r=Math.max(e.top,t.top),n=Math.min(e.bottom,t.bottom),a=Math.max(e.left,t.left),s=Math.min(e.right,t.right),o=s-a,i=n-r;return o>=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<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){Object(p.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e))}}return Object(_.a)(e,[{key:"trackEvent",value:function(e,t,r){y.includes(e)&&h.a.track(e,Object.assign({},t,{page_title:document.title}),r)}}]),e}()),S=r("nOHt"),E=r.n(S);!function(e,t,r,n,a){e.GoogleAnalyticsObject=a,e.ga=e.ga||function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e.ga.q=e.ga.q||[]).push(r)},e.ga.l=1*new Date;var s=t.createElement(r),o=t.getElementsByTagName(r)[0];s.async=!0,s.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(s,o)}(window,document,"script",0,"ga"),window.ga("create","UA-33092501-2","auto"),window.ga("send","pageview"),E.a.events.on("routeChangeComplete",function(e){ga("set","page",e),ga("send","pageview")}),window._hmt=window._hmt||[],function(){var e=document.createElement("script");e.async=!0,e.src="https://hm.baidu.com/hm.js?0c0e9d9b1e7d617b3e6842e85b9fb068";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),E.a.events.on("routeChangeComplete",function(e){_hmt&&_hmt.push(["_trackPageview",e])}),function(e){var t=e.title,r=e.content;u({title:t,content:r,backgroundColor:c})}({title:"Environment",content:"production"}),d({title:"Platform",content:"shakespeare"}),d({title:"Version",content:"1.1.0"}),d({title:"Build Date",content:"2022-03-01T08:34:56.490Z"}),window.M=window.M||Object.create(null),M.$sensor=w,M.$sensor.autoTrack({platform:"shakespeare"})},"k+uP":function(module,exports,__webpack_require__){var e;e=function(){function BatchSend(){this.sendingData=0}try{var sd={},_=sd._={};"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,a,s,o,i=gap,c=t[e];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,o=[],"[object Array]"===Object.prototype.toString.apply(c)){for(s=c.length,r=0;r<s;r+=1)o[r]=str(r,c)||"null";return a=0===o.length?"[]":gap?"[\n"+gap+o.join(",\n"+gap)+"\n"+i+"]":"["+o.join(",")+"]",gap=i,a}if(rep&&"object"==typeof rep)for(s=rep.length,r=0;r<s;r+=1)"string"==typeof rep[r]&&((a=str(n=rep[r],c))&&o.push(quote(n)+(gap?": ":":")+a));else for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&((a=str(n,c))&&o.push(quote(n)+(gap?": ":":")+a));return a=0===o.length?"{}":gap?"{\n"+gap+o.join(",\n"+gap)+"\n"+i+"}":"{"+o.join(",")+"}",gap=i,a}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var r,n,a=e[t];if(a&&"object"==typeof a)for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(void 0!==(n=walk(a,r))?a[r]=n:delete a[r]);return reviver.call(e,t,a)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(){var e=Array.prototype,t=Function.prototype,r=Object.prototype,n=e.slice,a=r.toString,s=r.hasOwnProperty,o=(t.bind,e.forEach),i=(e.indexOf,Array.isArray),c={},u=_.each=function(e,t,r){if(null==e)return!1;if(o&&e.forEach===o)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,a=e.length;n<a;n++)if(n in e&&t.call(r,e[n],n,e)===c)return!1}else for(var i in e)if(s.call(e,i)&&t.call(r,e[i],i,e)===c)return!1};_.extend=function(e){return u(n.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])}),e},_.extend2Lev=function(e){return u(n.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&(_.isObject(t[r])&&_.isObject(e[r])?_.extend(e[r],t[r]):e[r]=t[r])}),e},_.coverExtend=function(e){return u(n.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e},_.isArray=i||function(e){return"[object Array]"===a.call(e)},_.isFunction=function(e){if(!e)return!1;try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}},_.isArguments=function(e){return!(!e||!s.call(e,"callee"))},_.toArray=function(e){return e?e.toArray?e.toArray():_.isArray(e)?n.call(e):_.isArguments(e)?n.call(e):_.values(e):[]},_.values=function(e){var t=[];return null==e?t:(u(e,function(e){t[t.length]=e}),t)},_.indexOf=function(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1},_.filter=function(e,t,r){var n=Object.prototype.hasOwnProperty;if(e.filter)return e.filter(t);for(var a=[],s=0;s<e.length;s++)if(n.call(e,s)){var o=e[s];t.call(r,o,s,e)&&a.push(o)}return a},_.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},_.trim=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_.isObject=function(e){return null!=e&&"[object Object]"==a.call(e)},_.isEmptyObject=function(e){if(_.isObject(e)){for(var t in e)if(s.call(e,t))return!1;return!0}return!1},_.isUndefined=function(e){return void 0===e},_.isString=function(e){return"[object String]"==a.call(e)},_.isDate=function(e){return"[object Date]"==a.call(e)},_.isBoolean=function(e){return"[object Boolean]"==a.call(e)},_.isNumber=function(e){return"[object Number]"==a.call(e)&&/[\d\.]+/.test(String(e))},_.isElement=function(e){return!(!e||1!==e.nodeType)},_.isJSONString=function(e){try{JSON.parse(e)}catch(t){return!1}return!0},_.safeJSONParse=function(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return t},_.decodeURIComponent=function(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t},_.encodeDates=function(e){return _.each(e,function(t,r){_.isDate(t)?e[r]=_.formatDate(t):_.isObject(t)&&(e[r]=_.encodeDates(t))}),e},_.mediaQueriesSupported=function(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia},_.getScreenOrientation=function(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-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;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t},_.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+"."+t(e.getMilliseconds())},_.searchObjDate=function(e){_.isObject(e)&&_.each(e,function(t,r){_.isObject(t)?_.searchObjDate(e[r]):_.isDate(t)&&(e[r]=_.formatDate(t))})},_.searchZZAppStyle=function(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)},_.formatJsonString=function(e){try{return JSON.stringify(e,null," ")}catch(t){return JSON.stringify(e)}},_.formatString=function(e){return e.length>sd.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;a<e.length;a++)(t=e[a])in n||(n[t]=!0,r.push(t));return r},_.strip_sa_properties=function(e){return _.isObject(e)?(_.each(e,function(t,r){if(_.isArray(t)){var n=[];_.each(t,function(e){_.isString(e)?n.push(e):sd.log("\u60a8\u7684\u6570\u636e-",r,t,"\u7684\u6570\u7ec4\u91cc\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32,\u5df2\u7ecf\u5c06\u5176\u5220\u9664")}),0!==n.length?e[r]=n:(delete e[r],sd.log("\u5df2\u7ecf\u5220\u9664\u7a7a\u7684\u6570\u7ec4"))}_.isString(t)||_.isNumber(t)||_.isDate(t)||_.isBoolean(t)||_.isArray(t)||"$option"===r||(sd.log("\u60a8\u7684\u6570\u636e-",r,t,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete e[r])}),e):e},_.strip_empty_properties=function(e){var t={};return _.each(e,function(e,r){null!=e&&(t[r]=e)}),t},_.utf8Encode=function(e){var t,r,n,a,s="";for(t=r=0,a=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<a;n++){var o=e.charCodeAt(n),i=null;o<128?r++:i=o>127&&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<e.length);switch(u=d.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},_.UUID=function(){var e=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)};return function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*Math.random()).replace(".","").slice(0,8);var r=e()+"-"+Math.random().toString(16).replace(".","")+"-"+function(e){function t(e,t){var r,n=0;for(r=0;r<t.length;r++)n|=s[r]<<8*r;return e^n}var r,n,a=navigator.userAgent,s=[],o=0;for(r=0;r<a.length;r++)n=a.charCodeAt(r),s.unshift(255&n),s.length>=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<r.length;n++){for(var a=r[n];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return _.decodeURIComponent(a.substring(t.length,a.length))}return null},set:function(e,t,r,n,a){var s="",o="",i="";if(r=null==r?73e3:r,n="undefined"==typeof n?sd.para.cross_subdomain:n){var c=_.getCurrentDomain(location.href);"url\u89e3\u6790\u5931\u8d25"===c&&(c=""),s=c?"; domain="+c:""}if(0!==r){var u=new Date;"s"===String(r).slice(-1)?u.setTime(u.getTime()+1e3*Number(String(r).slice(0,-1))):u.setTime(u.getTime()+24*r*60*60*1e3),o="; expires="+u.toGMTString()}a&&(i="; secure"),document.cookie=e+"="+encodeURIComponent(t)+o+"; path=/"+s+i},remove:function(e,t){t="undefined"==typeof t?sd.para.cross_subdomain:t,_.cookie.set(e,"",-1,t)},getCookieName:function(e,t){var r="";if(t=t||location.href,!1===sd.para.cross_subdomain){try{r=_.URL(t).hostname}catch(n){}r="string"==typeof r&&""!==r?"sajssdk_2015_"+e+"_"+r.replace(/\./g,"_"):"sajssdk_2015_root_"+e}else r="sajssdk_2015_cross_"+e;return r},getNewUser:function(){return null!==this.get("sensorsdata_is_new_user")||null!==this.get(this.getCookieName("new_user"))}},_.getEleInfo=function(e){if(!e.target)return!1;var t=e.target,r=t.tagName.toLowerCase(),n={};n.$element_type=r,n.$element_name=t.getAttribute("name"),n.$element_id=t.getAttribute("id"),n.$element_class_name="string"==typeof t.className?t.className:null,n.$element_target_url=t.getAttribute("href");var a="";return t.textContent?a=_.trim(t.textContent):t.innerText&&(a=_.trim(t.innerText)),a&&(a=a.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n.$element_content=a||"","input"===r&&("button"===t.type||"submit"===t.type?n.$element_content=t.value||"":sd.para.heatmap&&"function"==typeof sd.para.heatmap.collect_input&&sd.para.heatmap.collect_input(t)&&(n.$element_content=t.value||"")),(n=_.strip_empty_properties(n)).$url=location.href,n.$url_path=location.pathname,n.$title=document.title,n.$viewport_width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,n},_.localStorage={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(_.localStorage.get(e))||null}catch(r){}return t},set:function(e,t){window.localStorage.setItem(e,t)},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__sensorsdatasupport__",r="testIsSupportStorage";_.localStorage.set(t,r),_.localStorage.get(t)!==r&&(e=!1),_.localStorage.remove(t)}catch(n){e=!1}return e}},_.sessionStorage={isSupport:function(){var e=!0,t="__sensorsdatasupport__",r="testIsSupportStorage";try{sessionStorage&&sessionStorage.setItem?(sessionStorage.setItem(t,r),sessionStorage.removeItem(t,r),e=!0):e=!1}catch(n){e=!1}return e}},_.isSupportCors=function(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)},_.xhr=function(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}},_.ajax=function(e){function t(e){if(!e)return"";try{return JSON.parse(e)}catch(t){return{}}}e.timeout=e.timeout||2e4,e.credentials="undefined"==typeof e.credentials||e.credentials;var r=_.xhr(e.cors);if(!r)return!1;e.type||(e.type=e.data?"POST":"GET"),e=_.extend({success:function(){},error:function(){}},e);try{"object"==typeof r&&"timeout"in r?r.timeout=e.timeout:setTimeout(function(){r.abort()},e.timeout+500)}catch(n){try{setTimeout(function(){r.abort()},e.timeout+500)}catch(a){}}r.onreadystatechange=function(){try{4==r.readyState&&(r.status>=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<n.length;a++){var s=n[a].indexOf("=");if(-1!==s){var o=n[a].substring(0,s),i=n[a].substring(s+1);o=t(o),i=t(i),r[o]=i}}return r},_.URL=function(e){var t={},r=["hash","host","hostname","href","origin","password","pathname","port","protocol","search","username"];if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())t=new URL(e);else{if(!1===/^https?:\/\/.+/.test(e))throw"Invalid URL";var n=document.createElement("a");n.href=e;for(var a=r.length-1;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;r<e.length;r++)t+="\\"+e.charCodeAt(r).toString(16);return t},_.getReferrer=function(e){return"string"!=typeof(e=e||document.referrer)?"\u53d6\u503c\u5f02\u5e38_referrer\u5f02\u5e38_"+String(e):(0===e.indexOf("https://www.baidu.com/")&&(e=e.split("?")[0]),"string"==typeof(e=e.slice(0,sd.para.max_referrer_string_length))?e:"")},_.getKeywordFromReferrer=function(e){e=e||document.referrer;var t=sd.para.source_type.keyword;if(document&&"string"==typeof e){if(0===e.indexOf("http")){var r=_.getReferSearchEngine(e),n=_.getQueryParamsFromUrl(e);if(_.isEmptyObject(n))return"\u672a\u53d6\u5230\u503c";var a=null;for(var s in t)if(r===s&&"object"==typeof n)if(a=t[s],_.isArray(a))for(s=0;s<a.length;s++){var o=n[a[s]];if(o)return o}else if(n[a])return n[a];return"\u672a\u53d6\u5230\u503c"}return""===e?"\u672a\u53d6\u5230\u503c_\u76f4\u63a5\u6253\u5f00":"\u672a\u53d6\u5230\u503c_\u975ehttp\u7684url"}return"\u53d6\u503c\u5f02\u5e38_referrer\u5f02\u5e38_"+String(e)},_.getReferSearchEngine=function(e){var t=_.getHostname(e);if(!t||"hostname\u89e3\u6790\u5f02\u5e38"===t)return"";var r=(sd.para.source_type.keyword,{baidu:[/^.*\.baidu\.com$/],bing:[/^.*\.bing\.com$/],google:[/^www\.google\.com$/,/^www\.google\.com\.[a-z]{2}$/,/^www\.google\.[a-z]{2}$/],sm:[/^m\.sm\.cn$/],so:[/^.+\.so\.com$/],sogou:[/^.*\.sogou\.com$/],yahoo:[/^.*\.yahoo\.com$/]});for(var n in r)for(var a=r[n],s=0,o=a.length;s<o;s++)if(a[s].test(t))return n;return"\u672a\u77e5\u641c\u7d22\u5f15\u64ce"},_.getSourceFromReferrer=function(){function e(e,t){for(var r=0;r<e.length;r++)if(-1!==t.split("?")[0].indexOf(e[r]))return!0}var t="("+sd.para.source_type.utm.join("|")+")\\=[^&]+",r=sd.para.source_type.search,n=sd.para.source_type.social,a=document.referrer||"",s=_.info.pageProp.url;if(s){var o=s.match(new RegExp(t));return o&&o[0]?"\u4ed8\u8d39\u5e7f\u544a\u6d41\u91cf":e(r,a)?"\u81ea\u7136\u641c\u7d22\u6d41\u91cf":e(n,a)?"\u793e\u4ea4\u7f51\u7ad9\u6d41\u91cf":""===a?"\u76f4\u63a5\u6d41\u91cf":"\u5f15\u8350\u6d41\u91cf"}return"\u83b7\u53d6url\u5f02\u5e38"},_.info={initPage:function(){var e=_.getReferrer(),t=location.href,r=_.getCurrentDomain(t);r||sd.debug.jssdkDebug("url_domain\u5f02\u5e38_"+t+"_"+r),this.pageProp={referrer:e,referrer_host:e?_.getHostname(e):"",url:t,url_host:_.getHostname(t,"url_host\u53d6\u503c\u5f02\u5e38"),url_domain:r}},pageProp:{},campaignParams:function(){var e=sd.source_channel_standard.split(" "),t="",r={};return _.isArray(sd.para.source_channel)&&sd.para.source_channel.length>0&&(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;t<sd.para.server_url.length;t++)/sa\.gif[^\/]*$/.test(sd.para.server_url[t])||(sd.para.server_url[t]=sd.para.server_url[t].replace(/\/sa$/,"/sa.gif").replace(/(\/sa)(\?[^\/]+)$/,"/sa.gif$2"));else/sa\.gif[^\/]*$/.test(sd.para.server_url)||(sd.para.server_url=sd.para.server_url.replace(/\/sa$/,"/sa.gif").replace(/(\/sa)(\?[^\/]+)$/,"/sa.gif$2"));"string"==typeof sd.para.server_url&&(sd.para.debug_mode_url=sd.para.debug_mode_url||sd.para.server_url.replace("sa.gif","debug")),!0===sd.para.noCache?sd.para.noCache="?"+(new Date).getTime():sd.para.noCache="",sd.para.callback_timeout>sd.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*r<n;a++)this.send({keys:e.keys.splice(0,r),vals:t.splice(0,r)})},sendStrategy:function(){var e=this.readStore();e.keys.length>0&&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<a;s++){var o=localStorage.key(s);0===o.indexOf("sawebjssdk-")&&/^sawebjssdk\-\d+$/.test(o)&&((r=localStorage.getItem(o))?(r=_.safeJSONParse(r))&&_.isObject(r)?(r._flush_time=n,e.push(o),t.push(r)):(localStorage.removeItem(o),sd.log("localStorage-\u6570\u636eparse\u5f02\u5e38"+r)):(localStorage.removeItem(o),sd.log("localStorage-\u6570\u636e\u53d6\u503c\u5f02\u5e38"+r)))}return{keys:e,vals:t}},writeStore:function(e){var t=String(Math.random()).slice(2,5)+String(Math.random()).slice(2,5)+String((new Date).getTime()).slice(3);localStorage.setItem("sawebjssdk-"+t,JSON.stringify(e))}},sd.batchSend=new BatchSend;var dataSend={getSendUrl:function(e,t){var r=_.base64Encode(t),n="crc="+_.hashCode(r);return-1!==e.indexOf("?")?e+"&data="+encodeURIComponent(r)+"&ext="+encodeURIComponent(n):e+"?data="+encodeURIComponent(r)+"&ext="+encodeURIComponent(n)},getSendData:function(e){var t=_.base64Encode(e),r="crc="+_.hashCode(t);return"data="+encodeURIComponent(t)+"&ext="+encodeURIComponent(r)},getInstance:function(e){var t=new(this[this.getSendType(e)])(e),r=t.start;return t.start=function(){_.isObject(sd.para.is_debug)&&sd.para.is_debug.storage&&sd.store.requests&&sd.store.requests.push({name:this.server_url,initiatorType:this.img?"img":"xmlhttprequest",entryType:"resource",requestData:this.data});var e=this;r.apply(this,arguments),setTimeout(function(){e.isEnd(!0)},sd.para.callback_timeout)},t.end=function(){this.callback&&this.callback();var e=this;setTimeout(function(){e.lastClear&&e.lastClear()},sd.para.datasend_timeout-sd.para.callback_timeout)},t.isEnd=function(e){if(!this.received){this.received=!0,this.end();var t=this;e?sd.para.queue_timeout-sd.para.callback_timeout<=0?t.close():setTimeout(function(){t.close()},sd.para.queue_timeout-sd.para.callback_timeout):t.close()}},t},getSendType:function(e){var t=["image","ajax","beacon"],r=t[0];return"beacon"===(r=e.config&&_.indexOf(t,e.config.send_type)>-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;e<sd.para.server_url.length;e++)this.sendCall(sd.para.server_url[e]);else this.sendCall(sd.para.server_url,this.requestData.callback)},sendState.sendCall=function(e,t){var r={server_url:e,data:JSON.stringify(this.requestData.data),callback:t,config:this.requestData.config};_.isObject(sd.para.jsapp)&&!sd.para.jsapp.isOnline&&"function"==typeof sd.para.jsapp.setData?(delete r.callback,r=JSON.stringify(r),sd.para.jsapp.setData(r)):this.pushSend(r)},sendState.pushSend=function(e){var t=dataSend.getInstance(e),r=this;t.close=function(){r.queue.close()},this.queue.enqueue(t)};var saEvent={};saEvent.checkOption={regChecks:{regName:/^((?!^distinct_id$|^original_id$|^time$|^properties$|^id$|^first_id$|^second_id$|^users$|^events$|^event$|^user_id$|^date$|^datetime$)[a-zA-Z_$][a-zA-Z\d_$]{0,99})$/i},checkPropertiesKey:function(e){var t=this,r=!0;return _.each(e,function(e,n){t.regChecks.regName.test(n)||(r=!1)}),r},check:function(e,t){return"string"==typeof this[e]?this[this[e]](t):this[e](t)},str:function(e){return!!_.isString(e)||(sd.log("\u8bf7\u68c0\u67e5\u53c2\u6570\u683c\u5f0f,\u5fc5\u987b\u662f\u5b57\u7b26\u4e32"),!0)},properties:function(e){return _.strip_sa_properties(e),!e||(_.isObject(e)?!!this.checkPropertiesKey(e)||(sd.log("properties \u91cc\u7684\u81ea\u5b9a\u4e49\u5c5e\u6027\u540d\u9700\u8981\u662f\u5408\u6cd5\u7684\u53d8\u91cf\u540d\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\uff0c\u4e14\u53ea\u5305\u542b\uff1a\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\uff0c\u81ea\u5b9a\u4e49\u5c5e\u6027\u4e0d\u80fd\u4ee5 $ \u5f00\u5934"),!0):(sd.log("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0))},propertiesMust:function(e){return _.strip_sa_properties(e),void 0===e||!_.isObject(e)||_.isEmptyObject(e)?(sd.log("properties\u5fc5\u987b\u662f\u5bf9\u8c61\u4e14\u6709\u503c"),!0):!!this.checkPropertiesKey(e)||(sd.log("properties \u91cc\u7684\u81ea\u5b9a\u4e49\u5c5e\u6027\u540d\u9700\u8981\u662f\u5408\u6cd5\u7684\u53d8\u91cf\u540d\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\uff0c\u4e14\u53ea\u5305\u542b\uff1a\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\uff0c\u81ea\u5b9a\u4e49\u5c5e\u6027\u4e0d\u80fd\u4ee5 $ \u5f00\u5934"),!0)},event:function(e){return!(!_.isString(e)||!this.regChecks.regName.test(e))||(sd.log("\u8bf7\u68c0\u67e5\u53c2\u6570\u683c\u5f0f\uff0ceventName \u5fc5\u987b\u662f\u5b57\u7b26\u4e32\uff0c\u4e14\u9700\u662f\u5408\u6cd5\u7684\u53d8\u91cf\u540d\uff0c\u5373\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\uff0c\u4e14\u53ea\u5305\u542b\uff1a\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\u548c $,\u5176\u4e2d\u4ee5 $ \u5f00\u5934\u7684\u8868\u660e\u662f\u7cfb\u7edf\u7684\u4fdd\u7559\u5b57\u6bb5\uff0c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u540d\u8bf7\u4e0d\u8981\u4ee5 $ \u5f00\u5934"),!0)},test_id:"str",group_id:"str",distinct_id:function(e){return!(!_.isString(e)||!/^.{1,255}$/.test(e))||(sd.log("distinct_id\u5fc5\u987b\u662f\u4e0d\u80fd\u4e3a\u7a7a\uff0c\u4e14\u5c0f\u4e8e255\u4f4d\u7684\u5b57\u7b26\u4e32"),!1)}},saEvent.check=function(e){for(var t in e)if(!this.checkOption.check(t,e[t]))return!1;return!0},saEvent.send=function(e,t){var r={distinct_id:store.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(sd.lib_version)},properties:{}};_.isObject(e)&&_.isObject(e.properties)&&!_.isEmptyObject(e.properties)&&e.properties.$lib_detail&&(r.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),_.extend(r,sd.store.getUnionId(),e),_.isObject(e.properties)&&!_.isEmptyObject(e.properties)&&_.extend(r.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(r.properties=_.extend({},_.info.properties(),store.getProps(),store.getSessionProps(),_.info.currentProps,r.properties),sd.para.preset_properties.latest_referrer&&!_.isString(r.properties.$latest_referrer)&&(r.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_search_keyword&&!_.isString(r.properties.$latest_search_keyword)&&(r.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_traffic_source_type&&!_.isString(r.properties.$latest_traffic_source_type)&&(r.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),sd.para.preset_properties.latest_landing_page&&!_.isString(r.properties.$latest_landing_page)&&(r.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38")),r.properties.$time&&_.isDate(r.properties.$time)?(r.time=1*r.properties.$time,delete r.properties.$time):sd.para.use_client_time&&(r.time=1*new Date),_.searchObjDate(r),_.searchObjString(r),_.searchZZAppStyle(r);var n=_.searchConfigData(r.properties);saNewUser.checkIsAddSign(r),saNewUser.checkIsFirstTime(r),sd.addReferrerHost(r),sd.addPropsHook(r),!0===sd.para.debug_mode?(sd.log(r),this.debugPath(JSON.stringify(r),t)):sd.sendState.getSendCall(r,n,t)},saEvent.debugPath=function(e,t){var r,n=e;r=-1!==sd.para.debug_mode_url.indexOf("?")?sd.para.debug_mode_url+"&data="+encodeURIComponent(_.base64Encode(e)):sd.para.debug_mode_url+"?data="+encodeURIComponent(_.base64Encode(e)),_.ajax({url:r,type:"GET",cors:!0,header:{"Dry-Run":String(sd.para.debug_mode_upload)},success:function(e){!0===_.isEmptyObject(e)?alert("debug\u6570\u636e\u53d1\u9001\u6210\u529f"+n):alert("debug\u5931\u8d25 \u9519\u8bef\u539f\u56e0"+JSON.stringify(e))}})};var store=sd.store={requests:[],_sessionState:{},_state:{distinct_id:"",first_id:"",props:{}},getProps:function(){return this._state.props||{}},getSessionProps:function(){return this._sessionState},getDistinctId:function(){return this._state.distinct_id},getUnionId:function(){var e={},t=this._state.first_id,r=this._state.distinct_id;return t&&r?(e.login_id=r,e.anonymous_id=t):e.anonymous_id=r,e},getFirstId:function(){return this._state.first_id},toState:function(e){var t=null;if(null!=e&&_.isJSONString(e))if(t=JSON.parse(e),this._state=_.extend(t),t.distinct_id){if("object"==typeof t.props){for(var r in t.props)"string"==typeof t.props[r]&&(t.props[r]=t.props[r].slice(0,sd.para.max_referrer_string_length));this.save()}}else this.set("distinct_id",_.UUID()),sd.debug.distinct_id("1",e);else this.set("distinct_id",_.UUID()),sd.debug.distinct_id("2",e)},initSessionState:function(){var e=_.cookie.get("sensorsdata2015session"),t=null;null!==e&&"object"==typeof(t=JSON.parse(e))&&(this._sessionState=t||{})},setOnce:function(e,t){e in this._state||this.set(e,t)},set:function(e,t){this._state=this._state||{},this._state[e]=t,this.save()},change:function(e,t){this._state[e]=t},setSessionProps:function(e){var t=this._sessionState;_.extend(t,e),this.sessionSave(t)},setSessionPropsOnce:function(e){var t=this._sessionState;_.coverExtend(t,e),this.sessionSave(t)},setProps:function(e,t){var r={};for(var n in r=t?e:_.extend(this._state.props||{},e))"string"==typeof r[n]&&(r[n]=r[n].slice(0,sd.para.max_referrer_string_length));this.set("props",r)},setPropsOnce:function(e){var t=this._state.props||{};_.coverExtend(t,e),this.set("props",t)},clearAllProps:function(e){if(this._sessionState={},_.isArray(e)&&e.length>0)for(var t=0;t<e.length;t++)_.isString(e[t])&&-1===e[t].indexOf("latest_")&&e[t]in this._state.props&&delete this._state.props[e[t]];else for(var t in this._state.props)1!==t.indexOf("latest_")&&delete this._state.props[t];this.sessionSave({}),this.save()},sessionSave:function(e){this._sessionState=e,_.cookie.set("sensorsdata2015session",JSON.stringify(this._sessionState),0)},save:function(){_.cookie.set(this.getCookieName(),JSON.stringify(this._state),73e3,sd.para.cross_subdomain)},getCookieName:function(){var e="";if(!1===sd.para.cross_subdomain){try{e=_.URL(location.href).hostname}catch(t){}e="string"==typeof e&&""!==e?"sa_jssdk_2015_"+e.replace(/\./g,"_"):"sa_jssdk_2015_root"}else e="sensorsdata2015jssdkcross";return e},init:function(){this.initSessionState();var e=_.UUID(),t=_.cookie.get(this.getCookieName());null===t?(sd.is_first_visitor=!0,this.set("distinct_id",e)):(_.isJSONString(t)&&JSON.parse(t).distinct_id||(sd.is_first_visitor=!0),this.toState(t)),saNewUser.setDeviceId(e),saNewUser.storeInitCheck(),saNewUser.checkIsFirstLatest()}},saNewUser={checkIsAddSign:function(e){"track"===e.type&&(_.cookie.getNewUser()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e){var t=null,r=_.cookie.get("sensorsdata2015jssdkcross"),n={};null!=r&&_.isJSONString(r)&&((n=JSON.parse(r)).$device_id&&(t=n.$device_id)),t=t||e,!0===sd.para.cross_subdomain?store.set("$device_id",t):(n.$device_id=t,_.cookie.set("sensorsdata2015jssdkcross",JSON.stringify(n),null,!0)),sd.para.is_track_device_id&&(_.info.currentProps.$device_id=t)},storeInitCheck:function(){if(sd.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};_.cookie.set(_.cookie.getCookieName("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0}else _.cookie.getNewUser()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}},checkIsFirstLatest:function(){for(var e=_.info.pageProp.url_domain,t=["$utm_source","$utm_medium","$utm_campaign","$utm_content","$utm_term"],r=store.getProps(),n=0;n<t.length;n++)t[n]in r&&delete r[t[n]];store.setProps(r,!0);var a={};if(""===e&&(e="url\u89e3\u6790\u5931\u8d25"),_.each(sd.para.preset_properties,function(t,r){if(-1===r.indexOf("latest_"))return!1;if(r=r.slice(7),t){if("utm"!==r&&"url\u89e3\u6790\u5931\u8d25"===e)a["$latest_"+r]="url\u7684domain\u89e3\u6790\u5931\u8d25";else if(_.isReferralTraffic(document.referrer))switch(r){case"traffic_source_type":a.$latest_traffic_source_type=_.getSourceFromReferrer();break;case"referrer":a.$latest_referrer=_.info.pageProp.referrer;break;case"search_keyword":a.$latest_search_keyword=_.getKeywordFromReferrer();break;case"landing_page":a.$latest_landing_page=location.href}}else if("utm"===r&&sd.store._state.props)for(var n in sd.store._state.props)0===n.indexOf("$latest_utm")&&0===n.indexOf("_latest_")||delete sd.store._state.props[n];else sd.store._state.props&&"$latest_"+r in sd.store._state.props&&delete sd.store._state.props["$latest_"+r]}),sd.register(a),sd.para.preset_properties.latest_utm){var s=_.info.campaignParamsStandard("$latest_","_latest_"),o=s.$utms,i=s.otherUtms;_.isEmptyObject(o)||sd.register(o),_.isEmptyObject(i)||sd.register(i)}}},heatmap=sd.heatmap={setNotice:function(e){sd.is_heatmap_render_mode=!0,sd.para.heatmap||(sd.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&e[0]&&e[1]&&"http:"===e[1].slice(0,5)&&"https"===location.protocol&&(sd.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),sd.para.heatmap_url||(sd.para.heatmap_url=location.protocol+"//static.sensorsdata.cn/sdk/"+sd.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,a=0;a<n.length;a++)if(n[a].tagName===r){if(e===n[a])return t;t++}return-1},selector:function(e){var t=e.parentNode&&9==e.parentNode.nodeType?-1:this.getDomIndex(e);return e.getAttribute&&e.getAttribute("id")&&(!sd.para.heatmap||sd.para.heatmap&&"not_use_id"!==sd.para.heatmap.element_selector)?"#"+e.getAttribute("id"):e.tagName.toLowerCase()+(~t?":nth-of-type("+(t+1)+")":"")},getDomSelector:function(e,t){if(!e||!e.parentNode||!e.parentNode.children)return!1;t=t&&t.join?t:[];var r=e.nodeName.toLowerCase();return e&&"body"!==r&&1==e.nodeType?(t.unshift(this.selector(e)),e.getAttribute&&e.getAttribute("id")&&sd.para.heatmap&&"not_use_id"!==sd.para.heatmap.element_selector?t.join(" > "):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;r<t.length;r++)if(t[r]&&t[r].tagName&&"a"===t[r].tagName.toLowerCase())return t[r];return!1},initScrollmap:function(){if(!_.isObject(sd.para.heatmap)||"default"!==sd.para.heatmap.scroll_notice_map)return!1;if(sd.para.scrollmap&&_.isFunction(sd.para.scrollmap.collect_url)&&!sd.para.scrollmap.collect_url())return!1;var e=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,r.$viewport_height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,r.$viewport_width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t}({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,a=n-this.current_time;(a>sd.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]]]);