/*! This file is auto-generated */
!function(w){var o,s,i=document.title,C=w("#dashboard_right_now").length,c=wp.i18n.__,x=function(t){t=parseInt(t.html().replace(/[^0-9]+/g,""),10);return isNaN(t)?0:t},r=function(t,e){var n="";if(!isNaN(e)){if(3<(e=e<1?"0":e.toString()).length){for(;3"),e=i,1<=(t=(a=s.exec(document.title))?(a=a[0],o.html(a),x(o)+t):(o.html(0),t))?(r(o,t),(n=s.exec(document.title))&&(e=document.title.replace(n[0],c("Comments (%s)").replace("%s",o.text())+" "))):(n=s.exec(e))&&(e=e.replace(n[0],c("Comments"))),document.title=e},I=function(n,t){var e=".post-com-count-"+t,a="comment-count-no-pending",o="post-com-count-no-pending",s="comment-count-pending";C||l(n),w("span.pending-count").each(function(){var t=w(this),e=x(t)+n;e<1&&(e=0),t.closest(".awaiting-mod")[0===e?"addClass":"removeClass"]("count-0"),r(t,e)}),t&&(t=w("span."+s,e),e=w("span."+a,e),t.each(function(){var t=w(this),e=x(t)+n;0===(e=e<1?0:e)?(t.parent().addClass(o),t.removeClass(s).addClass(a)):(t.parent().removeClass(o),t.addClass(s).removeClass(a)),r(t,e)}),e.each(function(){var t=w(this);0'+o+" | ")):(s=w(".comment-author",a).text(),w(''+o+"
")),a.before(o),w("strong","#undo-"+n).text(s),(s=w(".undo a","#undo-"+n)).attr("href","comment.php?action=un"+i+"comment&c="+n+"&_wpnonce="+t.data._ajax_nonce),s.attr("data-wp-lists","delete:the-comment-list:comment-"+n+"::un"+i+"=1"),s.attr("class","vim-z vim-destructive aria-button-if-js"),w(".avatar",a).first().clone().prependTo("#undo-"+n+" ."+i+"-undo-inside"),s.on("click",function(t){t.preventDefault(),t.stopPropagation(),e.wpList.del(this),w("#undo-"+n).css({backgroundColor:"#ceb"}).fadeOut(350,function(){w(this).remove(),w("#comment-"+n).css("backgroundColor","").fadeIn(300,function(){w(this).show()})})})),t},n=function(t,e){var n,a,o,s,i=!0===e.parsed?{}:e.parsed.responses[0],r=!0===e.parsed?"":i.supplemental.status,l=!0===e.parsed?"":i.supplemental.postId,p=!0===e.parsed?"":i.supplemental,c=w(e.target).parent(),d=w("#"+e.element),m=d.hasClass("approved")&&!d.hasClass("unapproved"),u=d.hasClass("unapproved"),h=d.hasClass("spam"),f=d.hasClass("trash"),d=!1;E(p),R(p),c.is("span.undo")?(c.hasClass("unspam")?(n=-1,"trash"===r?a=1:"1"===r?s=1:"0"===r&&(o=1)):c.hasClass("untrash")&&(a=-1,"spam"===r?n=1:"1"===r?s=1:"0"===r&&(o=1)),d=!0):c.is("span.spam")?(m?s=-1:u?o=-1:f&&(a=-1),n=1):c.is("span.unspam")?(m?o=1:u?s=1:(f||h)&&(c.hasClass("approve")?s=1:c.hasClass("unapprove")&&(o=1)),n=-1):c.is("span.trash")?(m?s=-1:u?o=-1:h&&(n=-1),a=1):c.is("span.untrash")?(m?o=1:u?s=1:f&&(c.hasClass("approve")?s=1:c.hasClass("unapprove")&&(o=1)),a=-1):c.is("span.approve:not(.unspam):not(.untrash)")?o=-(s=1):c.is("span.unapprove:not(.unspam):not(.untrash)")?(s=-1,o=1):c.is("span.delete")&&(h?n=-1:f&&(a=-1)),o&&(I(o,l),k("span.all-count",o)),s&&(b(s,l),k("span.all-count",s)),n&&k("span.spam-count",n),a&&k("span.trash-count",a),("trash"===e.data.comment_status&&!x(w("span.trash-count"))||"spam"===e.data.comment_status&&!x(w("span.spam-count")))&&w("#delete_all").hide(),C||(a=g.val()?parseInt(g.val(),10):0,w(e.target).parent().is("span.undo")?a++:a--,a<0&&(a=0),"object"==typeof t?i.supplemental.total_items_i18n&&vn||(t?(theExtraList.empty(),e.number=Math.min(8,a)):(e.number=1,e.offset=Math.min(8,a)-1),e.no_placeholder=!0,e.paged++,!0===e.comment_type&&(e.comment_type=""),e=w.extend(e,{action:"fetch-list",list_args:list_args,_ajax_fetch_list_nonce:w("#_ajax_fetch_list_nonce").val()}),w.ajax({url:ajaxurl,global:!1,dataType:"json",data:e,success:function(t){theExtraList.get(0).wpList.add(t.rows)}}))};window.theExtraList=w("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"}),window.theList=w("#the-comment-list").wpList({alt:"",delBefore:e,dimAfter:t,delAfter:n,addColor:"none"}).on("wpListDelEnd",function(t,e){var n=w(e.target).attr("data-wp-lists"),e=e.element.replace(/[^0-9]+/g,"");-1==n.indexOf(":trash=1")&&-1==n.indexOf(":spam=1")||w("#undo-"+e).fadeIn(300,function(){w(this).show()})})},window.commentReply={cid:"",act:"",originalContent:"",init:function(){var t=w("#replyrow");w(".cancel",t).on("click",function(){return commentReply.revert()}),w(".save",t).on("click",function(){return commentReply.send()}),w("input#author-name, input#author-email, input#author-url",t).on("keypress",function(t){if(13==t.which)return commentReply.send(),t.preventDefault(),!1}),w("#the-comment-list .column-comment > p").on("dblclick",function(){commentReply.toggle(w(this).parent())}),w("#doaction, #post-query-submit").on("click",function(){0 input[name="comment_status"]').val()||""},addEvents:function(t){t.each(function(){w(this).find(".column-comment > p").on("dblclick",function(){commentReply.toggle(w(this).parent())})})},toggle:function(t){"none"!==w(t).css("display")&&(w("#replyrow").parent().is("#com-reply")||window.confirm(c("Are you sure you want to edit this comment?\nThe changes you made will be lost.")))&&w(t).find("button.vim-q").trigger("click")},revert:function(){if(w("#the-comment-list #replyrow").length<1)return!1;w("#replyrow").fadeOut("fast",function(){commentReply.close()})},close:function(){var t=w(),e=w("#replyrow");e.parent().is("#com-reply")||(this.cid&&(t=w("#comment-"+this.cid)),"edit-comment"===this.act&&t.fadeIn(300,function(){t.show().find(".vim-q").attr("aria-expanded","false").trigger("focus")}).css("backgroundColor",""),"replyto-comment"===this.act&&t.find(".vim-r").attr("aria-expanded","false").trigger("focus"),"undefined"!=typeof QTags&&QTags.closeAllTags("replycontent"),w("#add-new-comment").css("display",""),e.hide(),w("#com-reply").append(e),w("#replycontent").css("height","").val(""),w("#edithead input").val(""),w(".notice-error",e).addClass("hidden").find(".error").empty(),w(".spinner",e).removeClass("is-active"),this.cid="",this.originalContent="")},open:function(t,e,n){var a,o,s,i,r=w("#comment-"+t),l=r.height();return this.discardCommentChanges()&&(this.close(),this.cid=t,a=w("#replyrow"),o=w("#inline-"+t),s="edit"==(n=n||"replyto")?"edit":"replyto",s=this.act=s+"-comment",this.originalContent=w("textarea.comment",o).val(),i=w("> th:visible, > td:visible",r).length,a.hasClass("inline-edit-row")&&0!==i&&w("td",a).attr("colspan",i),w("#action",a).val(s),w("#comment_post_ID",a).val(e),w("#comment_ID",a).val(t),"edit"==n?(w("#author-name",a).val(w("div.author",o).text()),w("#author-email",a).val(w("div.author-email",o).text()),w("#author-url",a).val(w("div.author-url",o).text()),w("#status",a).val(w("div.comment_status",o).text()),w("#replycontent",a).val(w("textarea.comment",o).val()),w("#edithead, #editlegend, #savebtn",a).show(),w("#replyhead, #replybtn, #addhead, #addbtn",a).hide(),120]*?>/g,""):e)&&(n.removeClass("hidden"),a.html(e))},addcomment:function(t){var e=this;w("#add-new-comment").fadeOut(200,function(){e.open(0,t,"add"),w("table.comments-box").css("display",""),w("#no-comments").remove()})},discardCommentChanges:function(){var t=w("#replyrow");return this.originalContent===w("#replycontent",t).val()||window.confirm(c("Are you sure you want to do this?\nThe comment changes you made will be lost."))}},w(document).ready(function(){var t,e,n,a;setCommentsList(),commentReply.init(),w(document).on("click","span.delete a.delete",function(t){t.preventDefault()}),void 0!==w.table_hotkeys&&(t=function(n){return function(){var t="next"==n?"first":"last",e=w(".tablenav-pages ."+n+"-page:not(.disabled)");e.length&&(window.location=e[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+t+"=1")}},e=function(t,e){window.location=w("span.edit a",e).attr("href")},n=function(){w("#cb-select-all-1").data("wp-toggle",1).trigger("click").removeData("wp-toggle")},a=function(e){return function(){var t=w('select[name="action"]');w('option[value="'+e+'"]',t).prop("selected",!0),w("#doaction").trigger("click")}},w.table_hotkeys(w("table.widefat"),["a","u","s","d","r","q","z",["e",e],["shift+x",n],["shift+a",a("approve")],["shift+s",a("spam")],["shift+d",a("delete")],["shift+t",a("trash")],["shift+z",a("untrash")],["shift+u",a("unapprove")]],{highlight_first:adminCommentsSettings.hotkeys_highlight_first,highlight_last:adminCommentsSettings.hotkeys_highlight_last,prev_page_link_cb:t("prev"),next_page_link_cb:t("next"),hotkeys_opts:{disableInInput:!0,type:"keypress",noDisable:'.check-column input[type="checkbox"]'},cycle_expr:"#the-comment-list tr",start_row_index:0})),w("#the-comment-list").on("click",".comment-inline",function(){var t=w(this),e="replyto";void 0!==t.data("action")&&(e=t.data("action")),w(this).attr("aria-expanded","true"),commentReply.open(t.data("commentId"),t.data("postId"),e)})})}(jQuery);