text: !function(n){var a={};function i(t){if(a[t])return a[t].exports;var e=a[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=n,i.c=a,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=3)}([function(t,e,n){"use strict";n.d(e,"h",function(){return a}),n.d(e,"e",function(){return o}),n.d(e,"d",function(){return s}),n.d(e,"g",function(){return d}),n.d(e,"f",function(){return r}),n.d(e,"k",function(){return l}),n.d(e,"i",function(){return p}),n.d(e,"b",function(){return u}),n.d(e,"c",function(){return h}),n.d(e,"j",function(){return f}),n.d(e,"a",function(){return g});var m=n(1);function i(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function c(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a="http://116.62.113.105:7070",o=$("#app"),s=function(t){return new Promise(function(e,n){$.ajax({type:t.type||"get",url:"".concat(a).concat(t.url),data:t.data||{},dataType:"json"}).done(function(t){0===t.c?e(t.d):(n(),alert(t.m))}).catch(function(t){alert("请求超时！服务器发生异常！")})})},d=function(){var t=window.location.hash.match(/(\w+)=([^&])+/g),n={};return t&&t.length?(t.forEach(function(t){var e=t.split("=");n[e[0]]=decodeURIComponent(e[1])}),n):{}},r=function(n,a){var d=n.width(),m=n.height();var i,t=(i=[],a.forEach(function(e,t){i.push(new Promise(function(o,t){var a;(a=e,new Promise(function(t,e){var n=new Image;n.onload=function(){t({w:n.width,h:n.height})},n.onerror=function(t){e(t)},n.src=a})).then(function(t){var e,n,a=t.w,i=t.h,c=a/i;d<a?m<i?(e=a,n=i):e=c*(n=m):m<i?n=(e=d)/c:e=(n=m)/c,o({w:e,h:n})})}))}),i);Promise.all(t).then(function(t){var s,r,l,e;s=t,r=Math.floor(d/3),l=m/5,e="",new Array(15).fill("").forEach(function(t,c){var o="";a.forEach(function(t,e){var n="";0===e&&(n="transform: rotateY(0)"),1===e&&(n="transform: rotateY(90deg)"),2===e&&(n="transform: rotateY(180deg)"),3===e&&(n="transform: rotateY(270deg)");var a=c%3*r,i=Math.floor(c/3)*l;o+='<div style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; background-image: url('.concat(t,"); background-size: ").concat(s[e].w,"px ").concat(s[e].h,"px; background-position: ").concat(-a,"px ").concat(-i,"px; transform-origin: center center -").concat(r/2,"px; ").concat(n,"; animation: picture3DSwitch").concat(e+1," 20s ").concat(.04*c+2,'s infinite"></div>')}),e+='<div style="transform-style: preserve-3d; float: left; position: relative; width: '.concat(r,"px; height: ").concat(l,'px;">').concat(o,"</div>")}),n.html(e)})},l=function(t){return t<10?"0"+t:t},p={set:function(t,e){window.localStorage.setItem(t,JSON.stringify(e))},get:function(t){return JSON.parse(window.localStorage.getItem(t))}},u=function(n,a){var i=null;return function(){var t=this,e=arguments;i&&clearTimeout(i),i=setTimeout(function(){n.apply(t,c(e))},a)}},h=function(t){var e=[];t.forEach(function(a){e.push(new Promise(function(t,e){var n=new Image;n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.src=a}))}),Promise.all(e).then(function(t){!function(t){var e=t.length;s.clearRect(0,0,o.attr("width"),o.attr("height"));for(var n=0;n<l;n++){var a=i()*o.attr("width");r.push({x:a,startX:a,y:i()*o.attr("height"),speedY:1,r:8*i()+8,xNum:0,range:40*i(),img:t[Math.floor(Math.random()*e)]})}}(t),requestAnimationFrame(d)});var o=$("#canvasBg"),s=o[0].getContext("2d"),r=[],l=Math.floor(m.a.width()*m.a.height()/4e4);function i(){return Math.random()}function d(){s.clearRect(0,0,o.attr("width"),o.attr("height"));for(var t=0;t<l;t++)r[t].y+=r[t].speedY,r[t].y>=m.a.height()&&(r[t].y=-r[t].r),r[t].xNum--,-360===r[t].xNum&&(r[t].xNum=0),r[t].x=r[t].startX-r[t].range*Math.sin(Math.PI/180*r[t].xNum),e=s,n=r[t].img,a=r[t].x,i=r[t].y,c=r[t].r,e.beginPath(),e.drawImage(n,a,i,c,c),e.closePath();var e,n,a,i,c;setTimeout(function(){requestAnimationFrame(d)},20)}l=l<10?10:l,o.attr({width:m.a.width(),height:m.a.height()})},f={navTmp:function(){return'{{~it:nav}}\n            <li class="nav-item" data-reg="{{=nav.reg}}">\n                <a href="{{=nav.href}}" class="nav-outer" {{=nav.target}}>\n                    <span class="nav-inner">\n                        <i class="nav-icon {{=nav.icon}}"></i>\n                        <span class="nav-text">{{=nav.text}}</span>\n                    </span>\n                </a>\n            </li>\n        {{~}}'},articleTmp:function(){return'{{~it:atc}}\n            <article class="article-item">\n                <div class="art-pretty">\n                    <b class="art-dotts"></b>\n                    <time class="art-time">\n                        {{=atc.date}}\n                    </time>\n                </div>\n                <div class="art-main com-block">\n                    <a href="#article?aid={{=atc.aid}}" class="art-wrap">\n                        <div class="art-info">\n                            <h2 class="art-title">{{=atc.title}}</h2>\n                            <h3 class="art-note" title="{{=atc.preface}}">\n                                <span>{{=atc.preface}}</span>\n                            </h3>\n                        </div>\n                        <div class="art-img" style="background-image: url('.concat(a,'/{{=atc.cover}})"></div>\n                    </a>\n                    <div class="art-meta">\n                        <a href="javascript:;" class="art-heart heart-box art-icon{{? atc.is_like }} act {{?}} mr20" data-aid="{{=atc.aid}}">\n                            <i class="heart-icon__pic"></i>\n                            <span class="heart-icon__text">喜欢(<span class="like-num">{{=atc.like_count}}</span>)</span>\n                        </a>\n                        <a href="javascript:;" class="com-icon art-comment art-icon mr20">\n                            <i class="com-icon__pic eye-icon"></i>\n                            <span class="com-icon__text">阅读({{=atc.read_count}})</span>\n                        </a>\n                        <a href="#article?tag={{=atc.tag_name}}&page=1" class="com-icon art-tag art-icon mr20">\n                            <i class="com-icon__pic tag-icon" style="background-image: url(').concat(a,'/{{=atc.tag_url}})"></i>\n                            <span class="com-icon__text">{{=atc.tag_name}}</span>\n                        </a>\n                    </div>\n                </div>\n            </article>\n        {{~}}')}},g=function(){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.el=t,this.commentMore=e.methods.commentMore,this.add=e.methods.add,this.like=e.methods.like,this.replyMore=e.methods.replyMore,this.noCommentMsg=e.noCommentMsg||"暂无评论，快来抢沙发吧！",this.temps={commentBox:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"评论";return'<div class="com-comment-block">\n                            <div class="comment-line">\n                                <span>'.concat(t,'</span>\n                            </div>\n                            \x3c!-- 发布评论框 --\x3e\n                            <div class="publish-box">\n                                \x3c!-- 用户头像 --\x3e\n                                ').concat(this.userFace(),'\n                                <div class="ml50">\n                                    \x3c!-- 公共评论输入框 --\x3e\n                                    ').concat(this.pubPublishInput({type:"comment"}),'\n                                </div>\n                            </div>\n                            \x3c!-- 评论列表 --\x3e\n                            <div class="comment-box"></div>\n                            <div class="comment-more mt10">加载更多 ></div>\n                        </div>')},userFace:function(t){return'<div class="user-face fl">'.concat(t||"","</div>")},pubPublishInput:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return'<div class="pub-publish-submit mt10">\n                    <div class="publish-input">\n                        <input type="text" class="com-text comment-input animated" placeholder="'.concat(t.plh||"说点啥呗~",'" autofocus="autofocus">\n                        <span class="comment-text-line"></span>\n                    </div>\n                    <div class="publish-action">\n                        <div class="publish-user-text">\n                            <input type="text" class="com-text user-input animated" placeholder="我的大名！">\n                            <span class="comment-text-line"></span>\n                        </div>\n                        <button type="button" data-type="').concat(t.type,'" class="').concat(t.type,'-btn publish-btn com-button blue mini"> <i class="fa fa-send"></i> ').concat(t.subText||"评论","</button>\n                    </div>\n                </div>")},pubPublishContent:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"comment";return'<div class="pub-publish-content '.concat(e,'-publish-content" ').concat(t.cid?'data-cid="'.concat(t.cid,'"'):""," ").concat(t.mid?'data-mid="'.concat(t.mid,'"'):"",' data-cuser="').concat(t.user,'" ').concat(t.aid?'data-aid="'.concat(t.aid,'"'):"",' data-type="').concat(e,'">\n                            <div class="user-name">').concat(t.user,' <span class="user-city">').concat(t.city,'的大佬</span></div>\n                            <div class="comment-content">').concat(t.toUser?'回复 <span style="color: #2e97ff;">'.concat(t.toUser,"</span>："):"").concat(t.content,'</div>\n                            <div class="comment-bar clear mt10">\n                                <div class="com-icon fl">\n                                    <i class="com-icon__pic calendar-icon"></i>\n                                    <span class="com-icon__text">').concat(Object(m.d)(t.date),'</span>\n                                </div>\n                                <div class="action-box fr">\n                                    <a href="javascript:;" class="comment-like heart-box art-icon mr10 ').concat(t.isLike?"act":"",'" ').concat(t.cid?'data-cid="'.concat(t.cid,'"'):""," ").concat(t.mid?'data-mid="'.concat(t.mid,'"'):"").concat(t.rid?' data-rid="'.concat(t.rid,'"'):"",'>\n                                        <i class="heart-icon__pic"></i>\n                                        <span class="heart-icon__text">喜欢(<span class="like-num">').concat(t.likeCount,'</span>)</span>\n                                    </a>\n                                    <a href="javascript:;" class="com-icon reply-action">\n                                        <i class="com-icon__pic reply-icon">&nbsp;</i>\n                                        <span class="com-icon__text">回复</span>\n                                    </a>\n                                </div>\n                            </div>\n                            ').concat(t.replyData&&t.replyData.list.length?this.replyBox({list:t.replyData.list,isMore:t.replyData.isMore,cid:t.cid,mid:t.mid}):"","\n                        </div>")},commentList:function(t){var n=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"comment";return t&&t.length?t.reduce(function(t,e){return t+'<div class="'.concat(a,'-item item flipInX enter">\n                                ').concat(n.userFace(e.user[0]),'\n                                <div class="ml50">\n                                    ').concat(n.pubPublishContent(e,a),"\n                                </div>\n                            </div>")},""):""},replyBox:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return'\x3c!-- 回复block，如果有回复内容 --\x3e\n                <div class="reply-box">\n                    <div class="reply-list">\n                        '.concat(this.commentList(t.list,"reply"),"\n                    </div>\n                    ").concat(t.isMore?'<div class="reply-more" '.concat(t.cid?'data-cid="'.concat(t.cid,'"'):""," ").concat(t.mid?'data-mid="'.concat(t.mid,'"'):"",">加载更多 ></div>"):"","\n                </div>")},noComment:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"暂无评论！";return'<div class="no-comment com-plain">'.concat(t,"</div>")}},t.append(this.temps.commentBox(e.title)),this.getCommentList(),this.replyAction(),this.addComment(),this.commentLike(),this.getReplyList()}var t,e,a;return t=n,(e=[{key:"getCommentList",value:function(){var i=this,c=!0,o=i.el.find(".comment-box:first"),s=i.el.find(".comment-more:first");s.on("click",function(){if(!c)return!1;c=!1,void 0===$(this).data("page")?$(this).data("page",0):$(this).data("page",$(this).data("page")+1),i.commentMore($(this).data("page"),function(t){var e=t.list,n=t.isMore;if(e&&e.length){var a=i.temps.commentList(e);o.append(a)}n||s.remove(),e.length||o.append(i.temps.noComment(i.noCommentMsg)),c=!0})}),s.trigger("click")}},{key:"replyAction",value:function(){var i=this,c=$();i.el.off("click.replyAction").delegate(".reply-action","click.replyAction",function(t){t.stopPropagation();var e=$(this).parents(".pub-publish-content:first"),n=e.data(),a=e.find(">.pub-publish-submit:first");c=a.length?(c[0]===a[0]?a.toggle():(c.hide(),a.show()),a):(c.hide(),e.find(".comment-bar:first").after(i.temps.pubPublishInput({type:"reply",plh:"回复".concat(n.cuser),subText:"回复"})),e.find(">.pub-publish-submit:first"))})}},{key:"addComment",value:function(){var l=this;l.el.off("click.publish").delegate(".publish-btn","click.publish",function(){var i=$(this),t=i.parent().prev().find(".comment-input:first"),e=$.trim(t.val());if(e){var n=$.trim(i.prev().find(".user-input:first").val());if(n){t.val("");var a=i.parents(".pub-publish-content:first").data()||{},c=a.mid,o=a.cid,s=a.cuser,r={content:e,user:n,mid:c,cid:o,aid:d().aid,toUser:s};l.add&&l.add(r,function(t){if(console.log(t),"comment"===t.type){var e=i.parents(".publish-box:first").siblings(".comment-box:first");e.prepend(l.temps.commentList(t.list)),e.find(".no-comment:first").remove()}else{var n=i.parents(".pub-publish-content:last"),a=n.find(".reply-list:first");a.length||(a=$('<div class="reply-list"></div>').appendTo($('<div class="reply-box"></div>').appendTo(n))),a.append(l.temps.commentList(t.list,"reply")),i.parents(".pub-publish-submit:first").hide()}})}else alert("尊姓大名！")}else alert("说点啥呗~")}),l.el.off("keydown.commentInp").delegate(".comment-input","keydown.commentInp",function(t){13===t.keyCode&&$(this).parent().next().find(".publish-btn:first").trigger("click.publish")}),l.el.off("keydown.userInp").delegate(".user-input","keydown.userInp",function(t){13===t.keyCode&&$(this).parent().next().trigger("click.publish")})}},{key:"commentLike",value:function(){var n=this,a=!0;n.el.off("click.commentLike").delegate(".comment-like","click.commentLike",function(){var e=this;if(a){a=!1;var t=$(this).data();n.like&&n.like(t,function(t){t.likeState?$(e).addClass("act"):$(e).removeClass("act"),$(e).find(".like-num:first").text(t.likeTotal),a=!0})}})}},{key:"getReplyList",value:function(){var o=this,s=!0;o.el.off("click.replyMore").delegate(".reply-more","click.replyMore",function(){if(!s)return!1;s=!1;var a=$(this),i=a.prev(),t=a.data(),e=t.mid,n=t.cid,c=t.page;console.log(e),c=c||0,c++,a.data("page",c),o.replyMore&&o.replyMore({mid:e,cid:n,page:c},function(t){var e=t.list,n=t.isMore;i.append(o.temps.commentList(e,"reply")),0===n&&a.remove(),s=!0})})}}])&&i(t.prototype,e),a&&i(t,a),n}()},function(t,e,n){"use strict";n.d(e,"a",function(){return a}),n.d(e,"b",function(){return i}),n.d(e,"e",function(){return o}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return r});var c=$("body:first"),a=$(window),i=function t(e){this.el=e.par||$(),this.total=e.total||0,this.total<1||(this.page_size=e.page_size||0,this.now_page=e.now_page||1,this.url=e.url||"javascript:;",this.theme=e.theme||"#2e97ff",this.on_change=e.on_change||function(){},this.page_len=Math.ceil(this.total/this.page_size),t.prototype.init=function(){this.el.append('<div class="com-page-box">\n                <span class="com-page-total">共 '.concat(this.total,' 条</span>\n                <div class="com-page-ul">').concat(this.create_page_num(),"</div>\n            </div>\n        "))},t.prototype.create_page_num=function(){var t=this.page_len,e="",n=1===this.now_page;e+='<a href="'.concat(n?"javascript:;":this.url+(this.now_page-1),'" class="com-page-prev fa fa-angle-left').concat(n?" disabled":"",'"></a>'),e+='<a href="'.concat(this.url,'1" class="com-page-num" ').concat(n?'style="border: 1px solid '.concat(this.theme,"; color: ").concat(this.theme,'"'):"",' data-page="1">1</a>'),5<this.now_page?e+='<a href="'.concat(this.url).concat(this.now_page-5<1?1:this.now_page-5,'" class="com-page-li-jump__prev">\n                <i class="page-ellipsis"></i>\n                <i class="page-arrow page-arrow-left fa fa-angle-double-left" style="color: ').concat(this.theme,';"></i>\n            </a>'):this.el.find(".com-page-li-jump__prev:first").remove();var a=1,i=0;i=this.now_page<=5?(a=2,this.now_page+2):this.now_page>t-5?(a=this.now_page-2,t-1):(a=this.now_page-2,this.now_page+2);for(var c=a;c<=i&&!(t-1<c);c++)e+='<a href="'.concat(this.url).concat(c,'" class="com-page-num" ').concat(c===this.now_page?'style="border: 1px solid '.concat(this.theme,"; color: ").concat(this.theme,'"'):"",'  data-page="').concat(c,'">').concat(c,"</a>");this.now_page<=t-5?e+='<a href="'.concat(this.url).concat(this.now_page+5>t?t:this.now_page+5,'" class="com-page-li-jump__next">\n                <i class="page-ellipsis"></i>\n                <i class="page-arrow page-arrow-right fa fa-angle-double-right" style="color: ').concat(this.theme,';"></i>\n            </a>'):this.el.find(".com-page-li-jump__next:first").remove();var o=this.now_page===t;return 1!==t&&(e+='<a href="'.concat(this.url).concat(t,'" class="com-page-num" ').concat(o?'style="border: 1px solid '.concat(this.theme,"; color: ").concat(this.theme,'"'):"",' data-page="').concat(t,'">').concat(t,"</a>")),e+='<a href="'.concat(o?"javascript:;":this.url+(this.now_page+1),'" class="com-page-next fa fa-angle-right').concat(o?" disabled":"",'"></a>')},t.prototype.page_listener=function(){var t=this;this.el.find(".com-page-num").on("click",function(){t.on_change()}).on("mouseover",function(){t.now_page!==$(this).data("page")&&t.Page_add_active($(this))}).on("mouseout",function(){t.now_page!==$(this).data("page")&&t.Page_remove_active($(this))}),this.el.find(".com-page-prev:first").hover(function(){1!==t.now_page&&t.Page_add_active($(this))},function(){1!==t.now_page&&t.Page_remove_active($(this))}).on("click",function(){t.on_change()}),this.el.find(".com-page-next:first").hover(function(){t.now_page!==t.page_len&&t.Page_add_active($(this))},function(){t.now_page!==t.page_len&&t.Page_remove_active($(this))}).on("click",function(){t.on_change()})},t.prototype.Page_add_active=function(t){t.css({border:"1px solid ".concat(this.theme),color:this.theme})},t.prototype.Page_remove_active=function(t){t.css({border:"1px solid #dcdee2",color:"#000"})},this.init(),this.page_listener())},o=function t(e){this.el=e.el||$(),this.theme=e.theme||"dark",this.content=e.content||"默认文字",this.tooltip_dis=10,this.ani_dis=10,t.prototype.event=function(){var t=this;t.el.hover(function(){t.show()},function(){t.hide()})},t.prototype.show=function(){this.tooltip_box=$('<div class="com-tooltip-box '.concat(this.theme,'">').concat(this.content,"</div>"));var t=this.tooltip_box;$(document.body).append(t);var e=(this.el.width()-t.outerWidth())/2+this.el.offset().left,n=this.el.offset().top-t.outerHeight()-this.tooltip_dis;t.css({left:e,top:n-this.ani_dis}).animate({opacity:1,top:n},250)},t.prototype.hide=function(){this.tooltip_box.animate({opacity:0,top:"-=".concat(this.ani_dis,"px")},250,function(){$(this).remove()})},this.event()},s=function t(e){this.scroll_el=e.scroll_el||c,this.parent_el=e.parent_el||c;var n=e.styles||{},a=n.right,i=n.bottom;this.pageup_btn=$('<div class="com-page-up" style="right: '.concat(a,"px; bottom: ").concat(i,'px;">\n        <i class="fa fa-caret-up"></i>\n    </div>')),this.parent_el.append(this.pageup_btn),t.prototype.animateEnd=function(){this.pageup_btn.on("animationEnd webkitAnimationEnd",function(){$(this).removeClass("rubberBand animated")})},t.prototype.handler=function(){var t=this;this.pageup_btn.click(function(){t.pageup_btn.addClass("rubberBand animated"),t.scroll_el.stop().animate({scrollTop:0},300)})},this.handler(),this.animateEnd()},r=function(t){var e=t.match(/(\d+)\-(\d+)\-(\d+)\s(\d+)\:(\d+)\:(\d+)/);function n(t){return(1===String(t).length?"0":"")+t}t=new Date(e[1],parseInt(e[2])-1,e[3],e[4],e[5],e[6]).getTime()/1e3;var a=parseInt((new Date).getTime()/1e3),i=a-t,c=new Date(1e3*a),o=new Date(1e3*t),s=o.getFullYear(),r=o.getMonth()+1,l=o.getDate(),d=o.getHours(),m=o.getMinutes();o.getSeconds();if(i<60)return"刚刚";if(i<3600)return Math.floor(i/60)+"分钟前";if(c.getFullYear()==s&&c.getMonth()+1==r&&c.getDate()==l)return"今天"+n(d)+":"+n(m);var p=new Date(1e3*(a-86400));return p.getFullYear()==s&&p.getMonth()+1==r&&p.getDate()==l?"昨天"+n(d)+":"+n(m):c.getFullYear()==s?n(r)+"月"+n(l)+"日 "+n(d)+":"+n(m):s+"年"+n(r)+"月"+n(l)+"日 "+n(d)+":"+n(m)}},function(t,e,n){"use strict";var i=n(0),c=n(1);e.a=[{reg:/^article\?type=technology&page=(\d+)$/,name:"technology",href:"#article?type=technology&page=1",text:"前端",target:"",icon:"fa fa-html5",element:$('<section id="article-box" class="blog-element"></section>'),fns:{artLike:function(){var n=!0;this.element.off("click.artLike").delegate(".art-heart","click.artLike",function(){var e=this;if(n){n=!1;var t=$(this).data("aid");Object(i.d)({url:"/index/article/givealike",data:{aid:t}}).then(function(t){1===t.likeState?$(e).addClass("act"):$(e).removeClass("act"),$(e).find(".like-num:first").text(t.likeTotal),n=!0})}})}},handler:{ajax:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object(i.d)({url:"/index/article/getArticleList",data:t})},callback:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.articleList;e.map(function(t){t.date=Object(c.d)(t.date)});var n=doT.template(i.j.articleTmp());for(var a in this.element.html(n(e)),new c.b({par:this.element,total:t.total,page_size:t.page_size,now_page:parseInt(Object(i.g)().page),url:"#article?type=technology&page=",on_change:function(){i.e.animate({scrollTop:0},"fast")}}),this.fns)this.fns[a].call(this)}}},{reg:/^article\?type=live&page=(\d+)$/,name:"live",href:"#article?type=live&page=1",text:"生活",target:"",icon:"fa fa-coffee",element:$('<section id="live-box" class="blog-element"></section>'),handler:{ajax:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object(i.d)({url:"/index/article/getArticleList",data:t})},callback:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.articleList;e.map(function(t){t.date=Object(c.d)(t.date)});var n=doT.template(i.j.articleTmp());this.element.html(n(e)||"暂无文章！"),new c.b({par:this.element,total:t.total,page_size:t.page_size,now_page:parseInt(Object(i.g)().page),url:"#article?type=live&page=",on_change:function(){i.e.animate({scrollTop:0},"fast")}})}}},{reg:/^comment\?&page=(\d+)$/,name:"comment",href:"#comment?&page=1",text:"留言",target:"",icon:"fa fa-comment",element:$('<section id="message-box" class="blog-element"></section>'),handler:{ajax:function(){return new Promise(function(t){t()})},callback:function(){new i.a(this.element,{title:"留言板",noCommentMsg:"当前没有留言，抢个沙发吧！",methods:{commentMore:function(t,e){Object(i.g)().aid;Object(i.d)({url:"/index/message/getMessageList",data:{page:t}}).then(function(t){e&&e(t)})},add:function(t,e){Object(i.d)({type:"post",url:"/index/message/addMessage",data:t}).then(function(t){e&&e(t)})},like:function(t,e){Object(i.d)({type:"post",url:"/index/message/messageLike",data:t}).then(function(t){e&&e(t)})},replyMore:function(t,e){Object(i.d)({url:"/index/message/getMReplyList",data:t}).then(function(t){e&&e(t)})}}})}}},{reg:/^aboutMe$/,href:"https://www.caodj.cn",text:"简历",target:'target="_blank"',icon:"fa fa-book",element:$('<section id="mood-box" class="blog-element"></section>'),reqUrl:"/index/article/getArticleList"},{reg:/^article\?tag=(.+)&page=(\d+)$/,name:"articleTagList",element:$('<section id="article-tag-box" class="blog-element"></section>'),fns:{artLike:function(){var n=!0;this.element.off("click.artLike").delegate(".art-heart","click.artLike",function(){var e=this;if(n){n=!1;var t=$(this).data("aid");Object(i.d)({url:"/index/article/givealike",data:{aid:t}}).then(function(t){1===t.likeState?$(e).addClass("act"):$(e).removeClass("act"),$(e).find(".like-num:first").text(t.likeTotal),n=!0})}})}},handler:{ajax:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object(i.d)({url:"/index/article/getArticleListByTag",data:t})},callback:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.articleList;e.map(function(t){t.date=Object(c.d)(t.date)});var n=doT.template(i.j.articleTmp());for(var a in this.element.html(n(e)),new c.b({par:this.element,total:t.total,page_size:t.page_size,now_page:parseInt(Object(i.g)().page),url:"#article?tag=".concat(Object(i.g)().tag,"&page="),on_change:function(){i.e.animate({scrollTop:0},"fast")}}),this.fns)this.fns[a].call(this)}}},{reg:/^article\?searchText=(.+)&page=(\d+)$/,name:"articleTagList",element:$('<section id="article-search-box" class="blog-element"></section>'),fns:{artLike:function(){var n=!0;this.element.off("click.artLike").delegate(".art-heart","click.artLike",function(){var e=this;if(n){n=!1;var t=$(this).data("aid");Object(i.d)({url:"/index/article/givealike",data:{aid:t}}).then(function(t){1===t.likeState?$(e).addClass("act"):$(e).removeClass("act"),$(e).find(".like-num:first").text(t.likeTotal),n=!0})}})}},handler:{ajax:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object(i.d)({url:"/index/article/getArticleBySearch",data:t})},callback:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.articleList;e.map(function(t){t.date=Object(c.d)(t.date)});var n=doT.template(i.j.articleTmp());for(var a in this.element.html(n(e)),new c.b({par:this.element,total:t.total,page_size:t.page_size,now_page:parseInt(Object(i.g)().page),url:"#article?searchText=".concat(Object(i.g)().searchText,"&page="),on_change:function(){i.e.animate({scrollTop:0},"fast")}}),this.fns)this.fns[a].call(this)}}},{reg:/^article\?aid=(\w+)$/,name:"articleContent",element:$('<section id="markdown-box" class="blog-element"></section>'),fns:{createCatalog:function(){for(var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",n=/<(h[1-3])><a id="(\w+)"><\/a>(.+)<\/\1>/gi,a="";null!==(t=n.exec(e));){var i=t[1],c=t[2],o=t[3];a+='<div class="catalog-item catalog-'.concat(i,'" data-id="').concat(c,'" title="').concat(o,'">\n                    <a href="javascript:;" class="catalog-link">').concat(o,"</a></div>")}return{catalogStr:a,handler:function(a){var i=$(".catalog-item");i.each(function(t,e){var n=$(this).data("id");$(e).data("top",$("#"+n).position().top-20),$(e).click(function(){i.removeClass("act"),$(this).addClass("act"),a.stop().animate({scrollTop:$(this).data("top")},400)})})}}},getCommentList:function(){var t=this.element.find(".markdown-comment:first");this.element.find(".comment-trigger-btn:first").on("click",function(){i.e.animate({scrollTop:t.position().top},300)}),i.e.off("scroll.comment").on("scroll.comment",function(){t.offset().top<=$(window).height()&&(i.e.off("scroll.comment"),new i.a(t,{title:"评论区（纯手工，望大佬们手下留情~）",methods:{commentMore:function(t,e){var n=Object(i.g)().aid;Object(i.d)({url:"/index/comment/getCommentList",data:{aid:n,page:t}}).then(function(t){e&&e(t)})},add:function(t,e){Object(i.d)({type:"post",url:"/index/comment/addComment",data:t}).then(function(t){e&&e(t)})},like:function(t,e){Object(i.d)({type:"post",url:"/index/comment/commentLike",data:t}).then(function(t){e&&e(t)})},replyMore:function(t,e){Object(i.d)({url:"/index/comment/getReplyList",data:t}).then(function(t){e&&e(t)})}}}))}),i.e.trigger("scroll.comment")},artLike:function(){var a=!1;this.element.find(".art-heart-btn:first").on("click",function(){var e=this;if(!a){a=!0;var t=$(this).data("aid"),n=$(this).find(".com-badge:first");Object(i.d)({url:"/index/article/givealike",data:{aid:t}}).then(function(t){1===t.likeState?($(e).addClass("red"),n.addClass("red")):($(e).removeClass("red"),n.removeClass("red")),n.text(t.likeTotal),a=!1})}})}},tmps:{articleMainTmp:function(){return'<div id="markdown-main" class="markdown-main com-block">\n                    \x3c!-- 文字标题 --\x3e\n                    <div class="markdown-title">\n                        <h1>{{=it.title}}</h1>\n                    </div>\n                    \x3c!-- 文章元信息 --\x3e\n                    <div class="markdown-meta">\n                        \x3c!-- 文章发布时间 --\x3e\n                        <time class="com-icon meta-time">\n                            <i class="com-icon__pic calendar-icon">&nbsp;</i>\n                            <span class="com-icon__text">{{=it.date}}</span>\n                        </time>\n                        \x3c!-- 文章点赞 --\x3e\n                        \x3c!-- <a href="javascript:;" class="com-icon heart-box art-heart art-icon {{? it.is_like }} act {{?}}" data-aid="{{=it.aid}}">\n                            <i class="com-icon__pic heart-icon__pic"></i>\n                            <span class="com-icon__text heart-icon__text">喜欢(<span class="like-num">{{=it.like_count}}</span>)</span>\n                        </a> --\x3e\n                        \x3c!-- 文章阅读量 --\x3e\n                        <span class="com-icon meta-like">\n                            <i class="com-icon__pic eye-icon">&nbsp;</i>\n                            <span class="com-icon__text">阅读({{=it.read_count}})</span>\n                        </span>\n                        \x3c!-- 文章标签 --\x3e\n                        <a href="#article?tag={{=it.tag_name}}&page=1" class="com-icon art-tag art-icon">\n                            <i class="com-icon__pic tag-icon" style="background-image: url('.concat(i.h,'/{{=it.tag_url}})"></i>\n                            <span class="com-icon__text">{{=it.tag_name}}</span>\n                        </a>\n                    </div>\n                    \x3c!-- 文章前言 --\x3e\n                    <div class="markdown-preface">{{=it.preface}}</div>\n                    \x3c!-- 文章封面 --\x3e\n                    <div class="markdown-cover" style="background-image: url(').concat(i.h,'/{{=it.cover}})"></div>\n                    \x3c!-- 文章内容 --\x3e\n                    <div class="markdown-content">{{=it.content}}</div>\n                    \x3c!-- 文章评论 --\x3e\n                    <div class="markdown-comment"></div>\n                </div>\n                \x3c!-- 目录 --\x3e\n                <div class="markdown-action com-scroll">\n                    <div class="markdown-action-wrap">\n                        <div class="mb20">\n                            <div class="markdown-catalog com-block">\n                                <div class="markdown-catalog-title">\n                                    <span class="markdown-catalog-item">目录</span>\n                                </div>\n                                {{=it.catalog}}\n                            </div>\n                        </div>\n                        \x3c!-- 操作 --\x3e\n                        <div class="mb20">\n                            <div class="markdown-handler">\n                            \x3c!-- 评论区 --\x3e\n                            <button class="comment-trigger-btn com-button blue mini"><i class="fa fa-comment"></i> <sup class="com-badge blue">{{=it.commentCount}}</sup>评论区</button>\n                            \x3c!-- 点赞 --\x3e\n                            <button class="art-heart-btn com-button mini {{? it.is_like }} red {{?}}" data-aid="{{=it.aid}}"><i class="fa fa-thumbs-up"></i> <sup class="com-badge {{? it.is_like }} red {{?}}">{{=it.like_count}}</sup>喜欢</button>\n                            </div>\n                        </div>\n                    </div>\n                </div>')}},handler:{ajax:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object(i.d)({url:"/index/article/getArticleCnt",data:t})},callback:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};t.date=Object(c.d)(t.date);var e=this.fns.createCatalog(t.content);t.catalog=e.catalogStr;var n=doT.template(this.tmps.articleMainTmp())(t);for(var a in $(n).appendTo($('<div id="markdown-wrap" class="clear"></div>').appendTo(this.element)),e.handler(i.e),this.fns)this.fns[a].call(this)}}}]},function(t,e,n){n(4),n(5),n(6),n(7),n(8),n(9)},function(t,e,n){"use strict";n.r(e);var a=n(1);$("#head-portrait").on("webkitAnimationEnd animationend",function(){$(this).removeClass()}).hover(function(){$(this).addClass("tada animated")},function(){$(this).removeClass("tada animated")}),new a.e({el:$("#wechat__icon"),theme:"light",content:'<img width="100" src="./img/WeChat-qr-code.jpg">'}),new a.e({el:$("#qq__icon"),theme:"light",content:'<img width="100" src="./img/QQ-qr-code.jpg">'}),new a.e({el:$("#github__icon"),theme:"light",content:"github"}),new a.e({el:$("#email__icon"),theme:"light",content:"597649635@qq.com"})},function(t,e,n){"use strict";n.r(e);var a,i,c,o,s,l=n(0);n(2);a=$("#article-search-input"),i=$("#article-search-btn"),c=Object(l.b)(function(t){window.location.hash="#article?searchText=".concat(t,"&page=1")},200),i.on("click",function(){a.val(),c(a.val())}),a.on("keydown",function(t){13===t.keyCode&&i.trigger("click")}),function(){for(var t=$("#hour-num"),e=$("#anchor-box"),n="",a=0;a<60;a++)n+=a%5==0?'<i class="anchor anchor-num" style="transform: rotate('.concat(6*a,'deg);">\n                <span style="transform: rotate(').concat(6*-a,'deg);">').concat(Object(l.k)(a),"</span>\n            </i>"):'<i class="anchor anchor-bar" style="transform: rotate('.concat(6*a,'deg);"></i>');e.html(n);for(var i="",c=1;c<=12;c++)i+='<span class="hour-text" style="transform: rotate('.concat(30*c,'deg);">\n            <span style="').concat(9<c?"left: -9px;":""," transform: rotate(").concat(30*-c,'deg);">').concat(c,"</span>\n        </span>");t.html(i);var o=$("#hour-hand"),s=$("#min-hand"),r=$("#sec-hand");!function t(){var e=new Date;var n=6*e.getSeconds();var a=6*e.getMinutes()+n/360*6;var i=30*(11<e.getHours()?e.getHours()-12:e.getHours())+a/360*30;o.css("transform","rotate(".concat(i,"deg)"));s.css("transform","rotate(".concat(a,"deg)"));r.css("transform","rotate(".concat(n,"deg)"));setTimeout(function(){requestAnimationFrame(t)},1e3)}()}(),o=$("#tag-box"),s=[],Object(l.d)({url:"/index/article/getArticleTag"}).then(function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n="";e.forEach(function(t){s.push("".concat(l.h,"/").concat(t.img)),n+='<a href="#article?tag='.concat(t.tag_name,'&page=1" class="com-icon tag-item">\n                <i class="com-icon__pic" style="background-image: url(').concat(l.h,"/").concat(t.img,')"></i>\n                <span class="com-icon__text">').concat(t.tag_name,"</span>\n            </a>")}),o.html(n),Object(l.c)(s),t=$(),$(".tag-item").on("click",function(){t.removeClass("act"),t=$(this).addClass("act")})})},function(t,e,n){"use strict";n.r(e);var a,o=n(0),i=n(1),s=n(2),c=$("#main-box");window.onhashchange=function(t){var e=t.newURL,n=t.oldURL,a=e.split("#")[1],i=n.split("#")[1];m(a,i)},a=Object(o.b)(function(){Object(o.f)($("#intrude-bg"),["".concat(o.h,"/bg/bg1.jpg"),"".concat(o.h,"/bg/bg2.jpg"),"".concat(o.h,"/bg/bg3.jpg"),"".concat(o.h,"/bg/bg4.jpg")])},500),i.a.on("resize.initBg",a),a();var r,l=function(t){t.off("animationend webkitAnimationEnd").on("animationend webkitAnimationEnd",function(){$(this).off("animationend webkitAnimationEnd").empty().detach()}),t.removeClass("enter").addClass("leave")},d=function(a,i){return new Promise(function(t){var e,n;l(i),e=a,n=t,c.append(e),e.off("animationend webkitAnimationEnd").on("animationend webkitAnimationEnd",n).removeClass("leave").addClass("enter")})},m=function(n,a){var i=-1,c=-1;if(s.a.forEach(function(t,e){t.reg.test(n)&&(i=e),t.reg.test(a)&&(c=e)}),-1===i)return-1<c&&l(s.a[c].element),void(window.location.hash=s.a[0].href);s.a[i]!==s.a[c]&&d(s.a[i].element,s.a[c]?s.a[c].element:$()).then(function(){var t=o.i.get("scrollTop")||{},e=t[n]?t[n]:0;o.e.animate({scrollTop:e},300)}),s.a[i].handler.ajax.call(s.a[i],Object(o.g)()).then(function(t){s.a[i].handler.callback.call(s.a[i],t)})};m(window.location.hash.substr(1)),$("#head-portrait").addClass("zoomInDown animated"),$("#intrude-info").addClass("bounceInLeft animated"),function(){var t=$("#nav-list"),e=doT.template(o.j.navTmp()),n=s.a.filter(function(t){return t.text});t.html(e(n));var a=$(".nav-item"),i=window.location.hash.substr(1);a.each(function(t,e){var n=$(e).data("reg").replace(/\//g,"");new RegExp(n).test(i)&&$(e).addClass("act")}),a.on("click",function(){$(this).addClass("act").siblings().removeClass("act")})}(),new i.c({scroll_el:o.e}),r=Object(o.b)(function(){var t=o.i.get("scrollTop")||{},e=window.location.hash;t[e=e.substr(1,e.length)]=o.e.scrollTop(),o.i.set("scrollTop",t)},50),o.e.on("scroll",r)},function(t,e,n){},function(t,e,n){},function(t,e,n){}]);