',videoTop:k}}else videosLazy[e]=""}loadImagesLazy(),loadVideosLazy(),trackViewables()}function viewablesInit(){if(sections.length>0&&"string"==typeof window.gPageId&&""!==window.gPageId){var e={block:0,banner:0,mpu:0,storympu:0,footer:0,"in-story-recommend":0};window.bBlocked="unknown";for(var t=0;t=0?(0===t&&"number"!=typeof n&&document.getElementById("topad")&§ions[t].previousSibling.offsetTop>0&&(n=sections[t].previousSibling.offsetTop,a=sections[t].previousSibling.offsetHeight),s="banner",r=.5,l=!0):"story_main_mpu"===sections[t].id?(s="storympu",r=.5,l=!0):sections[t].className.indexOf("mpu-container")>=0?(s="mpu",r=.5,l=!0):sections[t].className.indexOf("footer")>=0?s="footer":sections[t].className.indexOf("block")>=0?s="block":sections[t].className.indexOf("in-story-recommend")>=0&&(s="in-story-recommend"),l===!0&&null!==(o=sections[t].querySelector(".banner-iframe"))&&(d=o.getAttribute("data-adch")||"",c=o.getAttribute("data-adPosition")||""),e[s]++,"number"==typeof n?(viewables[t]={id:s+"-"+e[s],top:n,height:a,minimum:r,time:1e3,viewed:i,adch:d,adPosition:c},0===t&&(window.bBlocked="no")):(viewables[t]="",0===t&&(window.bBlocked="yes")),sections[t].setAttribute("data-id",s+"-"+e[s]),"in-story-recommend"===s&&window.gReplacedInstroyWithAd&&viewables[t]&&(viewables[t].id="instoryAd"+textIndex,gInstoryAdHasTrackInview===!1?(viewables[t].viewed=!1,gInstoryAdHasTrackInview=!0):viewables[t].viewed=!0)}}}function stickyBottomPrepare(){var e=document.querySelector(".o-nav__placeholder");void 0===e&&(e=document.body),gNavOffsetY=findTop(e),bodyHeight=getBodyHeight(gNavOffsetY),"object"==typeof recommendInner&&(gRecomendOffsetY=findTop(recommendInner)),document.getElementById("story-action-placeholder")&&(gShareOffsetY=findTop(document.getElementById("story-action-placeholder"))),document.getElementById("audio-placeholder")&&(gAudioOffsetY=findTop(document.getElementById("audio-placeholder")));var t=document.querySelector("#story-body-container, .story-container");t&&(gStoryBodyBottomOffsetY=findTop(t)+t.offsetHeight);var i,o=document.querySelectorAll(".sticky-element").length,n=document.querySelector(".sticky-element");if(n&&(i=n.querySelector(".sticky-element-inner")),1===o&&n&&i){n.style.height="auto",i.style.height="auto",gStickyElementOffsetY=findTop(n);var a=n.offsetHeight,s=i.offsetWidth;a>0&&s>0&&(n.style.height=a+"px",i.style.height=a+"px",i.style.width=s+"px")}var r=document.getElementById("language-switch-placeholder");if(r&&(gLanguageSwitchOffsetY=findTop(r)),w=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,sectionsWithSide&§ionsWithSide.length>0)for(var d=0;dgNavOffsetY?scrollTop+gNavOffsetY>=gLanguageSwitchOffsetY&&(e+=" audio-sticky"):"number"==typeof gShareOffsetY&&gShareOffsetY>gNavOffsetY?scrollTop>=gShareOffsetY?e+=" tool-sticky":scrollTop>=gNavHeight&&(e+=" o-nav-sticky"):scrollTop>=gNavOffsetY&&(e+=" o-nav-sticky"),"number"==typeof gAudioOffsetY&&gAudioOffsetY>gNavOffsetY&&scrollTop+gNavOffsetY>=gAudioOffsetY&&(e+=" audio-sticky"),"number"==typeof gStickyElementOffsetY&&gStickyElementOffsetY>gNavOffsetY&&scrollTop+gNavHeight>=gStickyElementOffsetY&&(e+=" sticky-element-on"),e!==htmlClass&&(htmlClass=e,document.documentElement.className=htmlClass),sectionsWithSideLength>0&&w>hasSideWidth)for(var t=0;t=bodyHeight&&maxHeight[t]-minHeight[t]>=100&&(minHeight[t]+gNavHeight+defaultPaddingsideHeight[t]?i<=0?sectionClassNameNew[t]+=" bottomside":o<=0&&(sectionClassNameNew[t]+=" fixside"+n):mainHeight[t]0)for(var a=0;a0?" is-fix":"",d="banner-container"+d,d!==stickyAds[a].currentClass&&(stickyAds[a].currentClass=d,document.getElementById(stickyAds[a].BannerId).parentNode.parentNode.parentNode.className=d)}gRecomendInViewNoted===!1&&window.recommendLoaded===!0&&"object"==typeof window.recommendInner&&gRecomendOffsetY>0&&scrollTop+bodyHeight>gRecomendOffsetY&&(void 0===window.ftItemId&&(window.ftItemId=""),gRecomendInViewNoted=!0),"object"==typeof inreadAd&&inreadAd.h>0&&inreadAd.t>0&&inreadAd.displayed===!1&&scrollTop+bodyHeight>inreadAd.t+inreadAd.h&&showInreadAd(),loadImagesLazy(),loadVideosLazy(),trackViewables()}function requestTick(){ticking||requestAnimationFrame(stickyBottomUpdate),ticking=!0}function stickyBottom(){scrollTop=window.scrollY||document.documentElement.scrollTop,"function"==typeof requestAnimationFrame?requestTick():stickyBottomUpdate()}function setResizeClass(){htmlClass.indexOf(" resized")<0&&gShowLanguageSwitchOnly===!1&&(htmlClass+=" resized",document.documentElement.className=htmlClass)}function validHTMLCode(){if(!/print|findpassword|search|corp|marketing|event|innotree|webview=ftcapp|newad=yes/.test(window.location.href)){var e=!1;document.querySelectorAll&&("home"===window.gPageId?0===document.querySelectorAll(".item-container").length&&(e=!0):"story"===window.gPageId?0===document.querySelectorAll(".story-body, .subscribe-lock-container").length&&(e=!0):"string"==typeof window.gPageId&&0===document.querySelectorAll(".item-container").length&&(e=!0),e===!0&&ga("send","event","CatchError","Page Validation Fail","Some Page",{nonInteraction:1}))}}function checkLanguageSwitch(){var e,t=document.referrer||"",i=window.location.hostname||"",o=""!==t&&""!==i&&t.indexOf(i)>=0;e=!!document.querySelector(".language-switch-inner"),(o||isTouchDevice())&&e?(document.documentElement.className+=" show-language-switch-only audio-sticky",gShowLanguageSwitchOnly=!0):gShowLanguageSwitchOnly=!1}function isHidden(e){return null===e.offsetParent}function openLink(e){try{webkit.messageHandlers.link.postMessage(e)}catch(t){document.location=e}}function trackInternalPromos(){setTimeout(function(){for(var e=document.querySelectorAll(".n-internal-promo"),t=0;t0&&scrollTop>=e/2&&trackRead("Read To Half","metric4")}}function Toggler(e){function t(){n.isOpen=!n.isOpen,n.isOpen?(n.button.setAttribute("aria-expanded","true"),n.target.setAttribute("aria-hidden","false")):(n.button.setAttribute("aria-expanded","false"),n.target.setAttribute("aria-hidden","true"))}function i(e){n.isOpen&&27===e.keyCode&&t()}function o(i){n.isOpen&&!e.contains(i.target)&&t()}var n=this,a="[data-o-toggler-button]",s="[data-o-toggler-target]";!function(){e||(e=document.body);var r=e.querySelector(a),d=e.querySelector(s);r&&(n.rootEl=e,n.button=r,n.target=d,n.isOpen=!1,n.button.addEventListener("click",t),document.body.addEventListener("click",o),document.body.addEventListener("keydown",i))}()}function Nav(e){var t={navClassName:"o-nav"},i=this;!function(){e||(e=document.body);var t=new Delegate(e);i.delegate=t,i.rootEl=e}(),function(){var e=i.rootEl.querySelector("[data-o-nav-togglable]"),o=t.navClassName+"--open";e&&e.addEventListener("click",function(){document.documentElement.classList.toggle(o),document.body.classList.toggle(o)})}(),function(){i.delegate.on("click","[data-o-nav-togglable]",function(e,t){var i=t.getAttribute("aria-pressed");"true"===i?t.setAttribute("aria-pressed","false"):"false"!==i&&i||t.setAttribute("aria-pressed","true")})}(),function(){var e=i.rootEl.querySelectorAll(".nav-section-head.mobile");i.delegate.on("click",".nav-section-head.mobile",function(t,i){for(var o=0;o0)for(var n=0,a=o.length;n-1)for(var m=f.getAttribute("data-section"),u=f.getElementsByTagName("ol"),g=0;g=0;n--)a=r[n],t&&t!==a.selector||i&&i!==a.handler||r.splice(n,1);return r.length||(delete s[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,o)),this},Delegate.prototype.handle=function(e){var t,i,o,n,a,s,r=e.type,d=[];if(e.ftLabsDelegateIgnore!==!0){switch(s=e.target,3===s.nodeType&&(s=s.parentNode),o=this.rootElement,e.eventPhase||(e.target!==e.currentTarget?3:2)){case 1:d=this.listenerMap[1][r];break;case 2:this.listenerMap[0]&&this.listenerMap[0][r]&&(d=d.concat(this.listenerMap[0][r])),this.listenerMap[1]&&this.listenerMap[1][r]&&(d=d.concat(this.listenerMap[1][r]));break;case 3:d=this.listenerMap[0][r]}for(i=d.length;s&&i;){for(t=0;t1,scrollTop=window.scrollY||document.documentElement.scrollTop,ticking=!1,hostForVideo="",currentFavButton,figures=document.querySelectorAll("figure.loading"),figuresLazy=[],figuresLoadStatus=0,videos=document.querySelectorAll("figure.loading-video"),videosLazy=[],videosLoadStatus=0,viewables=[],gShowLanguageSwitchOnly;try{delegate=new Delegate(document.body)}catch(e){}try{validHTMLCode()}catch(e){}0===(gNavOffsetY=findTop(document.querySelector(".o-nav__placeholder")))&&(gNavOffsetY=findTop(document.querySelector(".site-map")));var addEvent=window.attachEvent||window.addEventListener,eventResize=window.attachEvent?"onresize":"resize",eventScroll=window.attachEvent?"onscroll":"scroll";if(checkLanguageSwitch(),(gNavOffsetY>30&&w>490||document.getElementById("audio-placeholder"))&&gShowLanguageSwitchOnly===!1)try{stickyBottomPrepare(),stickyAdsPrepare(),addEvent(eventScroll,function(){stickyBottom(),trackViewables()}),addEvent(eventResize,function(){stickyBottomPrepare(),stickyAdsPrepare(),setResizeClass(),loadImages()}),setInterval(function(){stickyBottomPrepare(),stickyAdsPrepare()},1e4)}catch(e){}else stickyBottomPrepare(),bodyHeight=getBodyHeight(),addEvent(eventResize,function(){bodyHeight=getBodyHeight(),loadImages(),setResizeClass()}),addEvent(eventScroll,function(){scrollTop=window.scrollY||document.documentElement.scrollTop,loadImagesLazy(),loadVideosLazy(),trackViewables()});"undefined"==typeof SVGRect&&(document.documentElement.className+=" no-svg"),loadImages(),viewablesInit();try{delegate.on("error","img",function(){if(""!==this.getAttribute("src")){var e=this.getAttribute("data-backupimage")||"";""!==e?(this.setAttribute("data-backupimage",""),this.src=e):(this.setAttribute("data-hide-image-reason","failed to load"),this.style.display="none")}})}catch(e){}try{delegate.on("click",".video-package .XL2 a.image",function(){var e=hostForVideo+this.getAttribute("href"),t=this.parentNode.parentNode.parentNode,i=t.querySelector("#video-package-play"),o=i.offsetWidth,n=i.offsetHeight,a=this.parentNode.parentNode,s=a.querySelector(".item-headline a").innerHTML,r=this.parentNode.parentNode.parentNode.querySelectorAll(".video-package .XL2");e=e.replace(/#.*$/g,"");for(var d=0;d=0&&(c=c.replace(" on",""),r[d].className=c)}return this.parentNode.parentNode.className+=" on",i.querySelector("iframe").src=e+"?i=2&k=1&w="+o+"&h="+n+"&autostart=true",t.querySelector(".video-package-title a").innerHTML=s,t.querySelector(".video-package-title a").href=e,!1}),delegate.on("click","a, .track-click",function(){var e=this.getAttribute("data-ec")||"",t=this.getAttribute("data-ea")||"",i=this.getAttribute("data-el")||"";if(""!==e&&""!==t&&(this.className.indexOf("track-click")>=0&&ga("send","event",e,t,i),"uluAd"===i)){var o=new Image,n=0,a="Success",s="Fail",r=function(){n>0&&(a="Success"+n,s="Fail"+n),o.onload=function(){},o.onerror=function(){++n<=5&&r()},o.src="http://e.cn.miaozhen.com/r/k=2049651&p=76w3I&dx=__IPDX__&rt=2&ns=__IP__&ni=__IESID__&v=__LOC__&xa=__ADPLATFORM__&tr=__REQUESTID__&mo=__OS__&m0=__OPENUDID__&m0a=__DUID__&m1=__ANDROIDID1__&m1a=__ANDROIDID__&m2=__IMEI__&m4=__AAID__&m5=__IDFA__&m6=__MAC1__&m6a=__MAC__&o="};r()}}),delegate.on("click",".overlay",function(e){"cell"===e.target.className&&closeOverlay()})}catch(e){}delegate.on("click",".overlay-close, .overlay-bg",function(){var e=this.getAttribute("data-parentid");closeOverlay(e)}),delegate.on("click",".current-edition span",function(){var e=this.parentNode.parentNode.className;e.indexOf(" on")>0?e=e.replace(/ on/g,""):e+=" on",this.parentNode.parentNode.className=e}),delegate.on("click",".icon-save button",function(){if(""===username||null===username)return void alert("您必须登录后能才能收藏文章!");var e,t=this.id.replace(/addfavlink/g,"");if("收藏"===this.innerHTML)e="add";else{if("删除"!==this.innerHTML)return;e="remove"}currentFavButton=document.getElementById("addfavlink"+t)||document.getElementById("addfavlink"),currentFavButton.innerHTML="add"===e?"保存...":"删除...";var i=new XMLHttpRequest;i.open("POST","/users/"+e+"favstory/"+t),i.setRequestHeader("Content-Type","application/text"),i.onload=function(){if(200===i.status){var t=i.responseText;"ok"!==t&&""!==t||(currentFavButton.innerHTML="add"===e?"删除":"收藏")}else i.status},i.send(JSON.stringify({storyid:t}))}),delegate.on("click",".close-img",function(){var e=document.querySelector(".warn-content");e&&(e.style.display="none",SetCookie("DSW","1","","/",null))}),trackInternalPromos();var deleteWarn=GetCookie("DSW")||"",warnContent=document.querySelector(".warn-content");warnContent&&(warnContent.style.display=deleteWarn?"none":"block");try{if("VIP"===window.gUserType||"Subscriber"===window.gUserType)for(var fullScreenContainers=document.querySelectorAll(".o-ads.fullscreen-pc, .o-ads.fullscreen-ad"),i=0;i'+itemLeads[i].innerHTML+"")}}}void 0===window.privilegeEventLabel||"Subscriber"!==window.gUserType&&"VIP"!==window.gUserType||(window.privilegeEventCategory=window.privilegeEventCategory||"Web Privileges",ga("send","event",window.privilegeEventCategory,"Read",window.privilegeEventLabel,{nonInteraction:1}));var navEl=document.querySelector(".o-nav");if(navEl){searchRedirect("#search-form");var ajax={getData:function(e,t){var i=new XMLHttpRequest;i.onreadystatechange=function(){4===i.readyState&&(i.status>=200&&i.status<300||304===i.status?t(null,i.responseText):t(i.status))},i.open("GET",e),i.send(null)}};new Nav(navEl);var searchEl=navEl.querySelector(".o-nav__search");new Toggler(searchEl);var emptyNavSections=getEmptyNavSections(navEl),ajaxNavUrl="/m/corp/ajax-nav.html";"localhost"!==window.location.hostname&&0!==window.location.hostname.indexOf("192.168")&&0!==window.location.hostname.indexOf("10.113")&&0!==window.location.hostname.indexOf("127.0")||(ajaxNavUrl="./api/page/ajax-nav.html"),ajax.getData(ajaxNavUrl,function(e,t){if(e)return e;zipObject(emptyNavSections,stringToDOM(t))})}