")),$("#blog_detail_zk_collection").click(function(){window.csdn.articleCollection()}),o(),$("#tool-share").on("click",function(){"block"!==$("#tool-QRcode").css("display")&&t($(this),!0),$("#tool-QRcode").show()}),$("#QRcode-close").on("click",function(){$("#tool-QRcode").fadeOut(200),t($("#tool-share"),!1)}),h($("#tool-QRcode"),$("#tool-share")),$("#tool-reward").on("click",function(){$("#reward").show()}),$("#is-like").on("click",function(){n()}),$("#btn-readmore-zk").on("click",function(){$("#btn-readmore").show()}),$("#btn-readmore").on("click",function(){var t=$(window).height();t*$(this).attr("height");$(".hide-article-box").show(),$("div.article_content")[0].style="height:2000px; overflow: hidden;",e(),$("#btn-readmore").hide(),$(".btn-readmore-gz")&&$(".btn-readmore-gz span").text("阅读全文")}),$(document).on("click",".is-collection",function(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show()}),$(document).on("click",".tool-more .article-report",function(){getCookie("UserName")?showReport(!1):window.csdn.loginBox.show()}),e(),$(window).scroll(function(){e()}),$(window).resize(function(){e()}),$(".btn-readmore").click(e),""!==articleDetailUrl||void 0!==articleDetailUrl?collectionUrl=articleDetailUrl:collectionUrl=curentUrl;var w=!0;window.csdn.collectionBox.params={url:collectionUrl,title:articleTitle,description:articleDesc,author:username,source_id:articleId,source:"blog",collectionCallBack:function(t){s(t)}},window.csdn=window.csdn?window.csdn:{},window.csdn.articleCollection=c,r();var x={rewardItem:$("#toolreward"),rewardBox:$("#reward"),skinBoxshadow:$(".skin-boxshadow"),isHaveMoney:$("#reward .is-have-money"),coinNum:0,moneyNum:0,coinNumInit:5,rewardShowMore:$(".reward-user-box"),rewardBtCoin:$(".change-bt-box")};x.rewardBox.find(".choose_money").each(function(t,e){$(e).html("¥"+$(e).data("id"))}),l(),x.rewardBtCoin.find(".reward-bt").on("click",function(){x.rewardBtCoin.find(".reward-bt").removeClass("reward-bt-active"),$(this).addClass("reward-bt-active"),$(this).is(".reward-bt-money")?x.rewardBox.find(".choose_money").each(function(t,e){$(e).html("¥"+$(e).data("id"))}):x.rewardBox.find(".choose_money").each(function(t,e){$(e).html($(e).data("id")+"C币")}),l()}),x.rewardItem.on("click",function(){"block"!==$("#reward").css("display")&&t($(this).parents(".tool-item"),!0),getCookie("UserName")?$.ajax({url:blogUrl+"phoenix/web/v1/reward/getUserAmount",type:"GET",xhrFields:{withCredentials:!0},success:function(t){200==t.code&&$.each(t.data,function(t,e){100==e.code&&(x.coinNum=e.availableAmount),7e3==e.code&&(x.moneyNum=e.availableAmount)}),l(),x.rewardBox.fadeIn(200)},error:function(){x.rewardBox.fadeIn(200)}}):window.csdn.loginBox.show()}),x.rewardBox.find(".choose_money").click(function(){x.rewardBox.find(".choose_money").removeClass("choosed"),$(this).addClass("choosed"),l()}),x.rewardBox.on("click",".reward-sure",function(){x.rewardBtCoin.find(".reward-bt-active").is(".reward-bt-money")?(rewardCoinType="balance",dataJson={amount:100*x.rewardBox.find(".choosed").data("id"),articleId:articleId}):(rewardCoinType="coin",dataJson={coin:1*x.rewardBox.find(".choosed").data("id"),articleId:articleId}),$.ajax({url:blogUrl+"/phoenix/web/v1/reward/"+rewardCoinType,type:"POST",data:dataJson,xhrFields:{withCredentials:!0},success:function(t){if(200==t.code){x.skinBoxshadow.html("");var e='
';x.skinBoxshadow.append(e),x.rewardBox.fadeOut(200),x.skinBoxshadow.fadeIn(200),setTimeout(function(){x.skinBoxshadow.fadeOut(200),x.skinBoxshadow.html(""),window.location.reload()},4e3),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&("balance"==rewardCoinType?window.csdn.report.reportClick({mod:"1582594662_001",spm:"1001.2101.3001.4303"}):window.csdn.report.reportClick({mod:"1582594662_002",spm:"1001.2101.3001.4301"}))}else i(!1,t.message)},error:function(t){i(!1,"操作失败,请重试")}})}),x.rewardBox.on("click",".reward-close",function(e){x.rewardBox.fadeOut(200),t($(this).parents(".tool-item"),!1);var o=e||window.e;o&&o.stopPropagation?o.stopPropagation():o.cancelBubble=!0}),$(".tool-subscribe").on("click",function(){$("#bt-click").trigger("click")});var y=!1;$("#btnAttent").on("click",function(){p()}),$(".tool-attend").on("click",function(t){t.originalEvent&&(y=!0),$("#btnAttent").trigger("click")}),$("#health-companies").on("click",function(){$(this).hasClass("active")&&(window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.4429"}),"block"==$("#is-like-img").css("display")&&n(),"block"==$("#is-collection-img").css("display")&&a(),$(".tool-bt-attend").length>0&&($(".tool-attend").trigger("click"),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"关注"})),$("#is-like-imgactive-animation-like").show().addClass("active-animation"),$("#is-collection-img-collection").show().addClass("active-animation"),$(".tool-item-follow").show().addClass("active-animation"),setTimeout(function(){$("#is-like-imgactive-animation-like").hide().removeClass("active-animation"),$("#is-collection-img-collection").hide().removeClass("active-animation"),$(".tool-item-follow").hide().removeClass("active-animation")},800))});var C=!1;$(".toolbox-list .tool-item").hover(f,g),$("#blog_detail_zk_collection").hover(f,g),$("#health-companies").on({mouseover:function(){$(this).is(".active")&&($(".triplet-prompt img.close-prompt").css("display","none"),$(".triplet-prompt").css("width","300px"),$(".triplet-prompt").fadeIn(500))},mouseout:function(){$(".triplet-prompt").fadeOut(500)}})}),$(function(){function t(t,e){var o=6,i=new Date;i.setTime(i.getTime()+36e5*o),document.cookie=t+"="+escape(e)+";expires="+i.toGMTString()+";domain=.csdn.net;path=/"}function e(t){var e,o=new RegExp("(^| )"+t+"=([^;]*)(;|$)");return(e=document.cookie.match(o))?unescape(e[2]):null}if(!currentUserName){var o=$("div.article_content"),i=o.offset().top,n=o.height(),a=document.body.clientHeight||document.documentElement.clientHeight,s=$(document).scrollTop();$(document).scroll(function(){s=$(document).scrollTop(),e("unlogin_scroll_step")||e("UserName")||showPcWindowAd||(s+a-i>n/2||s+a-i>2*a)&&(window.csdn.loginBox.show(),t("unlogin_scroll_step",(new Date).getTime()))})}}),"undefined"!=typeof document.addEventListener&&document.addEventListener("DOMContentLoaded",function(){return"undefined"==typeof Chart?void("undefined"!=typeof console&&console.log("ERROR: You must include chart.min.js on this page in order to use Chart.js")):void[].forEach.call(document.querySelectorAll("div.chartjs"),function(t){var e,o;e="undefined"!=typeof chartjs_colors?chartjs_colors:"undefined"!=typeof chartjs_colors_json?JSON.parse(chartjs_colors_json):{fillColor:"rgba(151,187,205,0.5)",strokeColor:"rgba(151,187,205,0.8)",highlightFill:"rgba(151,187,205,0.75)",highlightStroke:"rgba(151,187,205,1)",data:["#B33131","#B66F2D","#B6B330","#71B232","#33B22D","#31B272","#2DB5B5","#3172B6","#3232B6","#6E31B2","#B434AF","#B53071"]},o="undefined"!=typeof chartjs_config?chartjs_config:"undefined"!=typeof chartjs_config_json?JSON.parse(chartjs_config_json):{Bar:{animation:!1},Doughnut:{animateRotate:!1},Line:{animation:!1},Pie:{animateRotate:!1},PolarArea:{animateRotate:!1}};var i=t.getAttribute("data-chart"),n=JSON.parse(t.getAttribute("data-chart-value"));if(n&&n.length&&i){t.innerHTML="";var a=document.createElement("canvas");a.height=t.getAttribute("data-chart-height"),t.appendChild(a);var s=document.createElement("div");s.setAttribute("class","chartjs-legend"),t.appendChild(s);var c,r=a.getContext("2d"),l=new Chart(r);if("bar"!=i)for(c=0;c
").addClass("pre-numbering").hide();for($(this).addClass("has-numbering").parent().append(e),i=1;i ").text(i));e.fadeIn(1700)}),$(".pre-numbering li").css("color","#999"),setTimeout(function(){$(".math").each(function(t,e){$(this).find("span").last().css("color","#fff")})}),setTimeout(function(){$(".toc a[target='_blank']").attr("target",""),$("a.reversefootnote,a.footnote").attr("target","")},500)},html_line:function(){function t(){$(".CopyToClipboard").each(function(){var t=new ZeroClipboard.Client;t.setHandCursor(!0),t.addEventListener("load",function(t){}),t.addEventListener("mouseOver",function(t){var e=t.movie.parentNode.parentNode.parentNode.parentNode.nextSibling.innerHTML;e=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),t.setText(e)}),t.addEventListener("complete",function(t,e){alert("代码已经复制到你的剪贴板。")}),t.glue(this,this.parentNode)})}$(".article_content pre").each(function(){var t=$(this);try{if(t.attr("class").indexOf("brush:")!=-1){var e=t.attr("class").split(";")[0].split(":")[1];t.attr("name","code"),t.attr("class",e)}t.attr("class")&&t.attr("name","code")}catch(o){}}),$(".article_content textarea[name=code]").each(function(){var t=$(this);t.attr("class").indexOf(":")!=-1&&t.attr("class",t.attr("class").split(":")[0])}),$(".highlighter").each(function(t,e){hljs.highlightBlock(e),hljs.lineNumbersBlock(e)}),window.clipboardData||setTimeout(t,1e3)}},s=$(".markdown_views")[0];s?(a.markdown_line(),/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&window.csdn.setSafariCodestyle()):a.html_line(),$(document).on("click",".input-mod",function(){$(".select-option").show(),$(".select-button").removeClass("rotate0").addClass("rotate180")}),$(document).on("input porpertychange",".private-input",function(){n(),$(this).val().length>120&&$(this).val($(this).val().substr(0,120)),$(".textarea-box .number").text(120-$(this).val().length),$(this).val().length>0&&$(".private-form").removeClass("no-active").addClass("active")}),$(document).on("click",".select-option li",function(){$(".super-private").height(126),$(".private-content .other").hide(),n(),$(".select-active").text($(this).text()).data("index",$(this).data("index")),$(this).data("isinput")?($(".super-private").height(240),$(".private-content .other").show()):$(".private-form").removeClass("no-active").addClass("active"),$(".select-button").addClass("rotate0").removeClass("rotate180"),$(".select-option").fadeOut()}),$(document).on("click",".select-button",function(){"block"===$(".select-option").css("display")?($(".select-option").fadeOut(),$(this).removeClass("rotate180").addClass("rotate0")):($(this).removeClass("rotate0").addClass("rotate180"),$(".select-option").fadeIn()),e.stopPropagation(),e.cancelBubble=!0}),$(document).on("click",".private-close, .close-active",function(){$(".super-private").hide(),$(".mask-dark").hide()}),$(document).on("click",".private-footer .active",function(){var e=$(".select-active").data("index"),o=$(".reason").val();e||alert("请选择原因"),text="text",t(articleId,e,o)})}),$(function(){$("article").find("table").map(function(){$(this).wrap('
')})}),$(window).bind("load",function(){var t=$(".hot-words-highlight").length,e=2*$("#csdn-toolbar").height();t&&($(".hot-word-tip-box").fadeIn(),$(".hot-word-tip-box .hot-word-count").text("1/"+t),$(".blog-content-box").find(".hot-words-highlight").each(function(e,o){e下一个')}},mouseout:function(){$(".next-word").remove()}}),$(".hot-word-tip-box .hot-word-clear").click(function(){$(".blog-content-box span[class*=highlight-index]").removeClass("hot-words-highlight"),$(".hot-word-tip-box").fadeOut()}))}),!function(t){function e(){var e=navigator.userAgent.toLowerCase();return t.ActiveXObject||"ActiveXObject"in t?"ie":e.indexOf("firefox")>=0?"firefox":e.indexOf("chrome")>=0?"chrome":e.indexOf("opera")>=0?"opera":e.indexOf("safari")>=0?"safari":void 0}var o=t.document,i=function(e,i,n,a,s,c){function r(t,o,n){var a=(t+o)/2;if(n<=0||o-t=0?"win":t.indexOf("mac")>=0?"mac":void 0}function round2(number,fractionDigits){with(Math)return round(number*pow(10,fractionDigits))/pow(10,fractionDigits)}function iszoom(t){return"win"==t.system&&1!=t.zoom||("mac"==t.system&&t.zoom%1!=0&&t.zoom%2!=0||void 0)}function keyUpEvent(t){var e={win:{add:187,minus:189,origin:48},mac:{add:187,minus:189,origin:48}},o=e[system()];if(t.ctrlKey||t.metaKey)if(t.keyCode==o.add||t.keyCode==o.minus){var i={zoom:round2(detectZoom(),2),system:system()};LeftPopShow(iszoom(i),leftPopRendering,RenderData)}else t.keyCode!=o.add&&t.keyCode!=o.origin||BOXDOM.animate(CLOSEANI,2e3)}function keydownEvent(t){setTimeout(keyUpEvent,300,t)}function setStorage(t,e){return localStorage.setItem(t,e)}function getStorage(t){return localStorage.getItem(t)}function addStyles(t){var e=document.createElement("style");e.type="text/css",e.innerHTML=[".leftPop{width:330px;position: fixed;font-size: 12px;","box-shadow: 0 4px 8px 0 rgba(0,0,0,0.10);padding:16px 40px 16px 16px;z-index: 100;","}",".leftPop .leftPop-close{position: absolute;right: 20px;"+t,"cursor: pointer;","}"].join(""),document.getElementsByTagName("head")[0].appendChild(e)}function leftPopRendering(t){var e=$(".leftPop");if(e.length>0)return e.stop(!0,!1).animate(t.animate,t.animateTime),!1;var o='不再显示 ';e=$(''+o+"
"),addStyles(t.closeColor),e.append(t.template).css(t.style),e.appendTo($("body")).delay(2e3).animate(t.animate,t.animateTime),BOXDOM=e,$(".leftPop-close").on("click",function(){e.stop(!0,!1).animate(t.closeAnimate,t.animateTime),setStorage("leftPop",0)})}function LeftPopShow(t,e,o){var i=getStorage("leftPop");t&&null==i?e(o):BOXDOM.stop(!0,!1).animate(o.closeAnimate,o.animateTime)}var zoomData={zoom:round2(detectZoom(),2),system:system()},BOXDOM=$("leftPop");CLOSEANI={right:"-100%"};var events={win:{even:"keyup",fun:keyUpEvent},mac:{even:"keydown",fun:keydownEvent}};$(window).on(events[system()].even,events[system()].fun);var RenderData={template:"你的浏览器目前处于缩放状态,页面可能会出现错位现象,建议100%大小显示。 ",style:{right:"-100%","background-color":"#EBF5FD",top:"100px","border-left":"4px solid #70B8F0"},closeColor:"fill:#70B8F0;",animate:{right:0},closeAnimate:CLOSEANI,animateTime:2e3};LeftPopShow(iszoom(zoomData),leftPopRendering,RenderData)});