define("article:widget/ui/article-log/article-log.js",function(e,n,t){var o=e("common:widget/lib/tangram/base/base.js"),i=e("common:widget/ui/log/log.js"),a=function(){var e="/static/article/ui/log/log.gif",n={},t=(new Date).getTime();o.each(effBaiduAds,function(e){var t=o.g(bdAdsPrefix+e);t&&(n[e]=0,o.event.on(t,"click",function(t){{var i=o.event.getTarget(t);i.tagName||""}n[e]++}))});var i=[];o.event.on(document,"mouseover",function(){i.length>100||i.push(1)}),o.event.on(window,"beforeunload",function(){var a=document.referrer||"";if(""!=a){var c=[];c.push("eid="+F.context("eid")),c.push("ep="+((new Date).getTime()-t));var r=[];o.object.each(n,function(e,n){r.push(n+":"+e)}),c.push("ad="+r.join(",")),c.push(i.length>5?"iu=1":"iu=0");var l=document.createElement("img");l.src=e+"?"+c.join("&"),window["___article_img_"+1*new Date]=l}})},c=function(){var e=o.g("relate-explist");if(e){var n=o.dom.q("related-exp-link",e);i.send(location.href,1e3,{action:"show_relate_exp",evtType:"show",count:n.length})}else i.send(location.href,1e3,{action:"not_show_relate_exp",evtType:"show"})};t.exports.init=function(){o.event.on(window,"load",function(){a(),c()})}});
;define("article:widget/ui/auto-app/auto-app.js",function(a,s,n){var e=a("common:widget/lib/tangram/base/base.js"),i=a("common:widget/ui/log/log.js"),t=function(a){var s="";return s=a>Math.pow(1024,3)?Math.round(a/Math.pow(1024,3)*100)/100+"G":a>Math.pow(1024,2)?Math.round(a/Math.pow(1024,2)*100)/100+"M":a>1024?Math.round(a/Math.pow(1024,1)*100)/100+"K":a};n.exports.init=function(a,s){e.ajax.get("/asyncreq?method=getApp&title="+encodeURIComponent(a)+"&word="+encodeURIComponent(s),function(a,s){if(""!==s){var n=e.json.parse(s);if(0==n.errno){var l=e.g("auto-app-placehold"),d=n.data;if(!d.sname)return;var p='<div class="exp-content-block"><h2 class="exp-content-head">软件基本信息</h2><div class="app-dl-mdl"><div class="app-dl-icon"><img title="'+(d.sname||"")+'" src="'+(d.icon||"")+'" /></div><div class="app-dl-info"><div class="app-dl-titl"><span class="mdl-item-name">名称：</span><span class="mdl-item-value">'+(d.sname||"")+'</span></div><div class="app-dl-meta"><span class="mdl-item-name">大小：</span><span class="mdl-item-value">'+t(d.size||0)+'<b class="s-line">|</b></span><span class="mdl-item-name">版本：</span><span class="mdl-item-value">'+(d.version||"")+'<b class="s-line">|</b></span><span class="mdl-item-name">系统：</span><span class="mdl-item-value">Android</span></div></div><div class="app-dl-link"><a id="dl-log-stat" title="下载该应用" href="'+(d.address||"")+'"></a><span>内容由百度移动应用提供</span></div></div></div>';l.innerHTML=p;var o=3008,c=location.href;e.on("dl-log-stat","click",function(){i.send(c,o,{evtType:"click",item:"1"})}),i.send(c,o,{evtType:"click",item:"0"})}}})}});
;define("article:widget/ui/auto-locate-pic/auto-locate-pic.js",function(t,e,o){var i=t("common:widget/lib/tangram/base/base.js"),n=(t("common:widget/ui/dialog/dialog.js"),t("common:widget/lib/fis/event/event.js").eventCenter),l=i.browser.ie||i.browser.firefox?document.documentElement:document.body,r=i.page.getViewHeight(),s=function(t,e){for(var o=i.page.getScrollTop(),n=10,l=1;10>=l;l++)void function(e,o,i,n){setTimeout(function(){t.scrollTop=o+(i-o)/n*e},16*e)}(l,o,e,n)},c=function(t){var e=i.dom.q("content-list-image")[t],o=i.dom.query("img",e)[0],n={target:e,height:parseInt(i.dom.getStyle(o,"height"))};return n.pos=i.dom.getPosition(e),n},d=function(t,e){var o=i.dom.create("div",{"class":"scroll-tip"}),s=scrollTipWidth=0,c=i.dom.getAncestorByClass(t,"content-list-media"),d=i.dom.getPosition(c).left,a=parseInt(i.dom.getStyle(c,"width"));l.appendChild(o),s=parseInt(i.dom.getStyle(o,"height")),scrollTipWidth=parseInt(i.dom.getStyle(o,"width")),i.dom.setStyles(o,{top:e+(r-s)/2+"px",left:d+(a-scrollTipWidth)/2+"px"}),n.on("scrollTip.close",function(){i.dom.q("scroll-tip").length&&i.dom.remove(i.dom.q("scroll-tip")[0])})};o.exports.init=function(t){var e={},o=0,i=0;s(l,0),setTimeout(function(){var n=setInterval(function(){e=c(t),o=r>e.height?(r-e.height)/2:0,i=e.pos.top-o,l.scrollTop<=i+5&&l.scrollTop>=i-5?(clearInterval(n),d(e.target,i)):s(l,i)},300)},500)}});
;define("article:widget/ui/image-lazy-loader/base.js",function(t,o,e){var i=t("common:widget/lib/tangram/base/base.js"),n=document,a="defalut",r={diff:300,isValidContainer:function(t){return 9!=t.nodeType},inDocument:function(t){return i.dom.contains(n.body,t)},isCross:function(t,o){var e={};return e.top=Math.max(parseFloat(t.top),parseFloat(o.top)),e.bottom=Math.min(parseFloat(t.bottom),parseFloat(o.bottom)),e.left=Math.max(parseFloat(t.left),parseFloat(o.left)),e.right=Math.min(parseFloat(t.right),parseFloat(o.right)),e.bottom>=e.top&&e.right>=e.left},isWindow:function(t){return!!t.window&&t.window===t.window.window},_getBoundingRect:function(t){var o,e,n,r,s=this;if(void 0===t||s.isWindow(t)||9==t.nodeType)o=i.page.getViewHeight(),e=i.page.getViewWidth(),n=i.page.getScrollLeft(),r=i.page.getScrollTop();else{o=t.offsetHeight,e=t.offsetWidth;var f=i.dom.getPosition(t);n=f.left,r=f.top}var l=this.diff,g=l===a?e:l,d=0,p=g,h=l===a?o:l,m=0,u=h,c=n+e,w=r+o;return"object"==typeof l&&(d=l.left||0,p=l.right||0,m=l.top||0,u=l.bottom||0),n-=d,c+=p,r-=m,w+=u,{left:n,top:r,right:c,bottom:w}},_checkElemInViewport:function(t){var o,e,n=this,a=i.dom.getPosition(t),r=!0,s=null,f=n._getBoundingRect(),l=a.left,g=a.top,d={left:l,top:g,right:l+t.offsetWidth,bottom:g+t.offsetHeight};return s&&(e=n._getBoundingRect(s),r=n.isCross(e,d)),o=n.isCross(f,d),r&&o}};e.exports=r});
;define("article:widget/ui/image-lazy-loader/image-lazy-loader.js",function(t,e,n){var o=t("common:widget/lib/tangram/base/base.js"),i=t("article:widget/ui/image-lazy-loader/base.js"),a=window,r=document,l="scroll",s="touchmove",m="resize",d="data-src",g=100;t("common:widget/lib/tangram/fx/fadeIn/fadeIn.js");var c=function(t){var e=this,n=t.container?o.g(t.container):r;e.containers=o.lang.toArray(n),e.option={imgCls:"lazy-load-img",autoDestroy:!0,isCheckAttr:"data-is-check",imgAttr:["width","height","style"]},e.imageEls=[],e.remainEls=[],t=t||{},o.object.extend(e.option,t),e._init()};c.prototype={_init:function(){var t=this;t._filterItems(),0!=t._getItemsLength()&&t._initLoadEvent()},_filterItems:function(){var t=this;t.imageEls=o.lang.toArray(o.q(t.option.imgCls))},_initLoadEvent:function(){var t=this,e=t.option.autoDestroy,n=function(){t._loadItems(),e&&0==t._getItemsLength()&&t.destroy()};loadLazyImg=function(){setTimeout(n,g)},o.event.on(a,l,loadLazyImg),o.event.on(a,s,loadLazyImg),o.event.on(a,m,loadLazyImg),t._loadFn=loadLazyImg,t._getItemsLength()&&o.dom.ready(n)},_loadItems:function(){var t=this;t.imageEls=o.array.filter(t.imageEls,t._loadImg,t)},_loadImg:function(t){var e=this,n=d,a=o.dom.getAttr(t,n);if(!a)return!1;if(i.inDocument(t)){if(!i._checkElemInViewport(t,e.containers))return!0;e._loadImgSrc(t,a)}else;},_loadImgSrc:function(t,e){var n=this,i=d;e&&t.src!=e&&(t.onload=function(){var e=this;if(!e.src.match(/exp_loading\.gif/i)){if(o.dom.getAttr(e,n.option.isCheckAttr))for(var i=null,a=n.option.imgAttr,r=a.length-1;r>=0;r--)i=o.dom.getAttr(e,"data-"+a[r]),i&&(o.dom.setAttr(e,a[r],i),e.removeAttribute("data-"+a[r]),i=null);o.fx.fadeIn(t,{duration:800}),o.dom.removeClass(t,n.option.imgCls),e.onload=null}},t.src=e,t.removeAttribute(i))},_getItemsLength:function(){var t=this;return t.imageEls.length},destroy:function(){var t=this,e=t._loadFn;o.event.un(a,l,e),o.event.un(a,s,e),o.event.un(a,m,e)}},n.exports=c});
;define("article:widget/ui/lazyload/lazyload.js",function(t,e,o){var i=t("common:widget/lib/tangram/base/base.js"),a=(t("common:widget/lib/tangram/fx/fadeIn/fadeIn.js"),t("common:widget/lib/fis/event/event.js").eventCenter),n=[],s={getQuery:function(){return{title:F.context("title")||"",tags:F.context("tags")||"",cate:F.context("cate")||""}},watchImagePlus:function(t){var e=this.getQuery();i.array.filter(n,function(o){var a=i.dom.getAttr(o,"src");if("G2"===F.context("expGroup")){var n=i.dom.getAncestorByClass(o,"exp-brief-step");n&&a&&t({type:"lazyload",img:o,query:e})}"G3"===F.context("expGroup")&&a&&t({type:"lazyload",img:o,query:e})}),a.on("EXP_ARTICLE_IMAGE_PLUS_LOAD",function(e){var o=e.imagePlus,a=o.img;if("G2"===F.context("expGroup")){var n=i.dom.getAncestorByClass(a,"exp-brief-step");n&&t(o)}"G3"===F.context("expGroup")&&t(o)})},pushImage:function(t){n.push(t)}};window.exp={imagePlus:s};var r=function(t,e){var o=arguments.callee;return this instanceof o?("undefined"==typeof e&&(e=t,t=e.container),t=t?i.g(t):document,this.containers=i.lang.toArray(t),this.options={lazyCls:"lazy-load-img",dataSrc:"data-src",diff:250,isCheckAttr:"data-is-check",imgAttr:["width","height","style"]},i.object.extend(this.options,e),this.images=[],this.loaded=[],void this.init()):new o(t,e)};r.prototype={init:function(){this.filterItems(),this.images.length>0&&this.initLoadEvent()},filterItems:function(){this.images=i.lang.toArray(i.q(this.options.lazyCls))},initLoadEvent:function(){function t(){e||(e=setTimeout(function(){o.loadItems(),0===o.images.length&&o.destroy(),e=null},100))}var e,o=this;i.event.on(window,"scroll",t),i.event.on(window,"resize",t),o._loadFn=t,o.images.length>0&&i.dom.ready(t)},loadItems:function(){var t=this;this.images=i.array.filter(this.images,function(e){var o=i.dom.getAttr(e,this.options.dataSrc);return o?t.checkElemInViewport(e)?(i.dom.hasClass(e,"exp-image-default")&&s.pushImage(e),t.loadImage(e,o),!1):!0:!1},this)},loadImage:function(t,e){var o=this;e&&t.src!==e&&(t.onload=function(){var e=this;if(!e.src.match(/exp_loading\.gif/i)){if(i.dom.getAttr(e,o.options.isCheckAttr))for(var n=null,r=o.options.imgAttr,l=r.length-1;l>=0;l--)n=i.dom.getAttr(e,"data-"+r[l]),n&&(i.dom.setAttr(e,r[l],n),e.removeAttribute("data-"+r[l]),n=null);if(i.fx.fadeIn(t,{duration:800}),i.dom.removeClass(t,o.options.lazyCls),e.onload=null,i.dom.hasClass(t,"exp-image-default")){var d=s.getQuery();a.fire("EXP_ARTICLE_IMAGE_PLUS_LOAD",{imagePlus:{type:"lazyload",img:e,query:d}})}}},t.src=e,t.removeAttribute(o.options.dataSrc))},isCross:function(t,e){var o={};return o.top=Math.max(parseFloat(t.top),parseFloat(e.top)),o.bottom=Math.min(parseFloat(t.bottom),parseFloat(e.bottom)),o.left=Math.max(parseFloat(t.left),parseFloat(e.left)),o.right=Math.min(parseFloat(t.right),parseFloat(e.right)),o.bottom>=o.top&&o.right>=o.left},isWindow:function(t){return!!t.window&&t.window===t.window.window},getBoundingRect:function(t){var e,o,a,n;if(void 0===t||this.isWindow(t)||9===t.nodeType)e=i.page.getViewHeight(),o=i.page.getViewWidth(),a=i.page.getScrollLeft(),n=i.page.getScrollTop();else{e=t.offsetHeight,o=t.offsetWidth;var s=i.dom.getPosition(t);a=s.left,n=s.top}var r=this.options.diff,l=0===r?o:r,d=0,g=l,f=0===r?e:r,m=0,c=f,u=a+o,h=n+e;return"object"==typeof r&&(d=r.left||0,g=r.right||0,m=r.top||0,c=r.bottom||0),a-=d,u+=g,n-=m,h+=c,{left:a,top:n,right:u,bottom:h}},checkElemInViewport:function(t){var e=i.dom.getPosition(t),o=e.left,a=e.top,n=this.getBoundingRect(),s={left:o,top:a,right:o+t.offsetWidth,bottom:a+t.offsetHeight};return this.isCross(n,s)},destroy:function(){var t=this._loadFn;i.event.un(window,"scroll",t),i.event.un(window,"resize",t)}},o.exports=r});
;define("article:widget/ui/step-num/step-num.js",function(t,e,i){var n=t("common:widget/lib/tangram/base/base.js"),o=t("common:widget/lib/fis/event/event.js").eventCenter,s={wrapper:"format-exp",listIcons:null,stepIcons:[],iLen:0,currentSectionIndex:0,isOrder:1,container:null,containerWidth:32,iconHeight:0,topGap:44,endDivGap:20,scrollTo:function(t){for(var e=n.page.getScrollTop(),i=10,o=1;10>=o;o++)void function(t,e,i,n){setTimeout(function(){document.documentElement.scrollTop=document.body.scrollTop=e+(i-e)/n*t},16*t)}(o,e,t,i)},clickScroll:function(t){for(var e,i=0;i<this.sectionNum&&(e=n.array.lastIndexOf(this.sectionContent[i].stepIcons,t),!(e>-1));i++);if(-1===e)throw new Error("Hey,there must be something wrong...");var o=this.sectionContent[i].listIcons[e],s=n.dom.getPosition(o);this.scrollTo(s.top-this.topGap)},fixPosition:function(){var t=n.dom.getPosition(this.sectionContent[0].listIcons[0]),e=this.topGap;n.dom.fixable(this.container,{vertival:"top",horizontal:"left",offset:{x:t.left,y:e},autofix:!0})},_init:function(){var t=document.createElement("div"),e=n.q("last-item",this.wrapper,"div"),i=e.length,s=[],r={isOrder:0,isUnOrder:0},c=6===n.browser.ie;t.id="exp-step-nav";for(var l=0;i>l;l++){var d,a=n.dom.getAncestorByClass(e[l],"exp-conent-orderlist");a?(d={isOrder:1,iconHeight:34,klass:"list-icon",tag:"div"},r.isOrder=1):(a=n.dom.getAncestorByClass(e[l],"exp-content-unorderlist"),d={isOrder:0,iconHeight:13,klass:"exp-content-list",tag:"li"},r.isUnOrder=1);var p=n.q(d.klass,a,d.tag),h=p.length;d.listIcons=p,d.stepIcons=[],d.lastItem=e[l];var m=document.createElement("div");m.className=d.isOrder?"order-ico-group":"unorder-ico-group",m.id="ico-group-"+l;for(var u=0;h>u;u++){var v=document.createElement("a"),f=d.isOrder?p[u].innerHTML:u+1;v.className="list-icon-link",v.style.display="none",c&&(v.href="javascript:void(0);"),v.setAttribute("title","点击返回第"+f+"步"),d.isOrder&&v.appendChild(document.createTextNode(f)),m.appendChild(v),d.stepIcons.push(v)}s.push(d),t.appendChild(m)}r.isOrder&&r.isUnOrder&&(t.className=s[0].isOrder?"complex-order-first":"complex-unorder-first"),n.dom.setStyles(t,{width:this.containerWidth}),this.sectionContent=s,this.container=t,this.sectionNum=i,this.pageWidth=n.page.getWidth(),this.ltIe7=n.browser.ie&&n.browser.ie<8,t.style.visibility="hidden",document.body.appendChild(t);var g=this;g.setIconVisibility(),g.fixPosition(),t.style.visibility="visible",n.on(window,"scroll",function(){g.setIconVisibility(),o.fire("scrollTip.close")}),n.on(window,"resize",function(){if(g.ltIe7){var t=n.page.getWidth();if(n.g("exp-step-nav").style.visibility="hidden",t>document.documentElement.offsetWidth)return void clearTimeout(g.timer);if(g.pageWidth===t)return void(n.g("exp-step-nav").style.visibility="visible");g.timer&&clearTimeout(g.timer),g.timer=setTimeout(function(){g.fixPosition(),n.g("exp-step-nav").style.visibility="visible",g.timer=null,delete g.timer},1e3),g.pageWidth=n.page.getWidth()}else g.fixPosition()}),n.on(t,"click",function(t){var e=n.event.getTarget(t);g.clickScroll(e)})},getVisibleInfo:function(){for(var t=n.page.getScrollTop(),e=this.sectionNum,i=0,o=this.topGap,s={currentSectionIndex:0,currentStepIndex:0,visibleStepNum:0};e>i;i++){var r=this.sectionContent[i],c=r.listIcons,l=c.length,d=0;for(s.currentSectionIndex=i;l>d;d++){var a=n.dom.getPosition(c[d]).top;if(a-o>t+Math.min(d,10)*r.iconHeight)return d||(s.currentSectionIndex=-1),s.currentStepIndex=d-1,s}var p=n.dom.getPosition(r.lastItem).top;if(t+r.iconHeight*Math.min(l,10)<p)return s.currentStepIndex=l-1,s;if(p>t){var h=p-t-this.endDivGap-this.topGap,m=Math.floor(h/r.iconHeight);if(m=Math.min(l,10,m),m>0)return s.currentStepIndex=l-1,s.visibleStepNum=m,s}}return s={currentSectionIndex:-1}},setItemVisible:function(t,e,i){i?t.style.visibility=e?"visible":"hidden":t.style.backgroundPosition=e?"0 8px":"-1000px 8px"},setIconVisibility:function(){for(var t=this.getVisibleInfo(),e=t.currentSectionIndex,i=t.currentStepIndex,o=t.visibleStepNum,s=0;s<this.sectionNum;s++)if(n.g("ico-group-"+s).style.display=s===e?"block":"none",-1===e){for(var r=this.sectionContent[s].listIcons,c=this.sectionContent[s].isOrder,l=0,d=r.length;d>l;l++)this.setItemVisible(r[l],1,c);if(this.sectionNum-1===s)return}var a=this.sectionContent[e],p=a.stepIcons,h=p.length,c=a.isOrder,m=a.listIcons;if(10>i){for(var s=0;i>=s;s++)n.dom.show(p[s]),this.setItemVisible(m[s],0,c);for(var s=i+1;h>s;s++)n.dom.hide(p[s]),this.setItemVisible(m[s],1,c)}else{for(var u=i-10,s=0;u>=s;s++)n.dom.hide(p[s]),this.setItemVisible(m[s],1,c);for(var s=i+1;h>s;s++)n.dom.hide(p[s]),this.setItemVisible(m[s],1,c);for(var s=u+1;i>=s;s++)n.dom.show(p[s]),this.setItemVisible(m[s],0,c)}var v=n.q("list-icon-current",this.container)[0],f=p[i];if(f!=v&&(v&&n.dom.removeClass(v,"list-icon-current"),n.dom.addClass(f,"list-icon-current")),o)for(var s=0;i-o>=s;s++)n.dom.hide(p[s])},init:function(){var t=this;setTimeout(function(){t._init()},1500)}};i.exports=s});