Plugin Directory

Changeset 3457051 for wpdiscuz

Timestamp:
02/09/2026 12:32:35 PM (3 weeks ago)
Author:
AdvancedCoding
Message:

Comments - wpDiscuz v7.6.46 - 09.02.2026

  • Added: A new filter hook "wpdiscuz_is_update_nonce_with_ajax" to control nonce ajax requests for guests
Location:
wpdiscuz
Files:
682 added
7 edited

Legend:

Unmodified
Added
Removed
  • wpdiscuz/assets/blueprints/blueprint.json

    r3442652 r3457051  
    1616      "pluginZipFile": {
    1717        "resource": "url",
    18         "url": "https://downloads.wordpress.org/plugin/wpdiscuz.7.6.45.zip"
     18        "url": "https://downloads.wordpress.org/plugin/wpdiscuz.7.6.4.zip"
    1919      },
    2020      "options": {
  • wpdiscuz/trunk/assets/js/wpdiscuz-combo-no_quill.min.js

    r3442652 r3457051  
    44jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
    55/* wpDiscuz */
    6 var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;if(wpdiscuzAjaxObj.validateNonceForGuest&&!o&&!Cookies.get("wpdiscuz_nonce_"+$)){var P=new FormData;P.append("action","wpdGetNonce"),eg(C,!1,P)}var H=e("html").css("scroll-behavior"),q=e("body").css("scroll-behavior");function U(e){j=Math.ceil(Date.now()/1e3)}if(k&&(document.addEventListener("mousedown",U),document.addEventListener("mousemove",U),document.addEventListener("touchstart",U),document.addEventListener("scroll",U),document.addEventListener("keydown",U)),e("#wp-admin-bar-wpdiscuz > .ab-item").prepend("<img src='"+wpdiscuzAjaxObj.menu_icon+"' style='width:22px;height:22px;vertical-align:middle;'>"),e(document).on("mouseover","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon_hover)}),e(document).on("mouseleave","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon)}),e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(t){var o=e(".wpd-form").not(":hidden");if(o.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var a=0;a<o.length;a++)if("\n"!==wpDiscuzEditor.createEditor(e(o[a]).find(".ql-container").attr("id")).getText()){t.preventDefault(),t.returnValue="";return}}else for(var a=0;a<o.length;a++)if(e(o[a]).find(".wc_comment").val()){t.preventDefault(),t.returnValue="";return}}}),wpdiscuzLoadRichEditor||(e(document).delegate("textarea.wc_comment","input",function(){eb(e(this))}),e.each(e("textarea.wc_comment"),function(){eb(e(this))})),e("body").on("focus","#wpdcom .ql-editor, #wpdcom .wc_comment",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(y)}),e("body").on("focus","#wpdcom textarea",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e("body").on("click","#wpd-editor-source-code-wrapper-bg",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e("body").on("click","#wpd-insert-source-code",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var o=e("#wpd-editor-source-code").val();o.length&&t.clipboard.dangerouslyPasteHTML(0,o,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e("body").on("click",".wpd-reply-button",function(){var t,i,s,c,r=ee(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+r).focus()},y):setTimeout(function(){e("#wc-textarea-"+r).trigger("focus")},y),e("#wpd-secondary-form-wrapper-"+r).slideToggle(y)):(t=e(this),i=ee(t,0),e("#wpdiscuz_form_anchor-"+i).before((s=i,e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,s))),c=e("#wpd-secondary-form-wrapper-"+i),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+i).focus()},y):setTimeout(function(){e("#wc-textarea-"+i).trigger("focus")},y),c.slideToggle(y,function(){t.addClass("wpdiscuz-clonned")})),function t(o){if((a||n)&&"2.0"===d){var i=et(o);setTimeout(function(){if(!L[i])try{L[i]=grecaptcha.render("wpdiscuz-recaptcha-"+o,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-"+o).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+o).val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3)}}(r)}),e("body").on("click","#wpdcom [data-wpd-clipboard]",function(){var t=e(this).data("wpd-clipboard");e(this).data("wpd-ismention")&&(t="@"+t);var o=e("<input/>");o.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),o.trigger("select"),document.execCommand("copy"),o.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(e){e.preventDefault()}),e("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked");var o,a,n,d,i=ee(e(this),0),s=e(this),c=e(".fas",s);!s.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&v?(o=i,a=t,n=et(o),d=new FormData,d.append("action","wpdShowReplies"),d.append("commentId",n),eg(C,!0,d).done(function(t){a.addClass("wpd_not_clicked"),"object"==typeof t&&t.success&&(e("#wpd-comm-"+o).replaceWith(t.data.comment_list),e("#wpd-comm-"+o+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+o+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+o+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})):e("#wpd-comm-"+i+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(c.removeClass("fa-chevron-up"),c.addClass("fa-chevron-down"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(c.removeClass("fa-chevron-down"),c.addClass("fa-chevron-up"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e("body").on("mouseenter",".wpd-new-loaded-comment",function(){e(this).removeClass("wpd-new-loaded-comment")}),e("body").on("click",".wpd-sbs-toggle",function(){e(".wpdiscuz-subscribe-bar").slideToggle(y)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!o&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&e("#wpdiscuz-subscribe-form").length&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),ed(e(this),""),t.preventDefault())})):"3.0"===d&&e("body").on("click","#wpdiscuz_subscription_button",function(t){var o=e(this).parents("#wpdiscuz-subscribe-form");ed(o,""),t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,o.trigger("submit")},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}})),(a||n)&&"2.0"===d){var A=e(window).width(),W=e("#wpdcom").width();W>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),W>=940&&W<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),W>=810&&W<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),W>=730&&W<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),W>=610&&W<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),A>650&&(W>=510&&W<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W>=470&&W<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function B(t,o,a){e(document.body).trigger("wpdiscuz_before_comment_post",o,a),eg(C,!1,o).done(function(n){if(e(a).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(y),n.data.wc_all_comments_count_new=parseInt(n.data.wc_all_comments_count_new),e(".wpd-thread-info").html(n.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",n.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(n.data.wc_all_comments_count_bubble_html);var d,i,s,c,r=y;n.data.is_main?ec(n.data.message):(r=y+700,e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).slideToggle(700),1==n.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).after(n.data.message):e("#wpd-comm-"+n.data.uniqueid).after(n.data.message)),function e(t){if(!t.data.held_moderate){var o=new FormData;o.append("action","wpdCheckNotificationType"),o.append("comment_id",t.data.new_comment_id),o.append("email",t.data.comment_author_email),o.append("isParent",t.data.is_main),eg(C,!0,o)}}(n),function e(t){if(t.data.redirect>0&&t.data.new_comment_id){var o=new FormData;o.append("action","wpdRedirect"),o.append("commentId",t.data.new_comment_id),eg(C,!0,o).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,o){console.log(o)})}}(n),b&&g?(d=n.data,i=d.comment_author_email,s=d.comment_author,c=d.comment_author_url,null==h?(Cookies.set("comment_author_email_"+$,i),Cookies.set("comment_author_"+$,s),c.length&&Cookies.set("comment_author_url_"+$,c)):(h=parseInt(h),Cookies.set("comment_author_email_"+$,i,{expires:h,path:"/"}),Cookies.set("comment_author_"+$,s,{expires:h,path:"/"}),c.length&&Cookies.set("comment_author_url_"+$,c,{expires:h,path:"/"})),e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").prop("checked",!0)):g||e(".wpd-cookies-checkbox").prop("checked",!1),t.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]):eb(t.find(".wc_comment")),N(n.data),e(".wmu-preview-wrap",t).remove(),M.length&&(M.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),M=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+n.data.new_comment_id).offset().top-D},1e3,es)},r),e8(n,t),e(document.body).trigger("wpdiscuz_comment_posted",[t,o,a,n.data])}else n.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,t))}else wpdiscuzAjaxObj.setCommentMessage(n,"error");e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,n){console.log(n),e(a).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function N(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&0>t.comment_author_email.indexOf("@example.com")&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function V(t,o){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(o),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var t,i,s,c,r,p=e(this),l=1,m=e(this).parents("form");if("true"===m.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",m),"warning");return}if(m.hasClass("wpd_main_comm_form")||(l=(t=e(this).parents(".wpd-comment"),i=t.attr("class").split(" "),s="",e.each(i,function(e,t){"wpd_comment_level"===eo(t,!1)&&(s=eo(t,!0))}),parseInt(s)+1)),e(document.body).trigger("wpdiscuz_new_comment",[p,m,l]),ed(m,"#wpd-editor-"+e(".wpdiscuz_unique_id",m).val()),m.on("submit",function(e){e.preventDefault()}),m[0].checkValidity()&&(c=m,r=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(r=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),r)){F=!0,function t(o){e(".wpd-agreement-checkbox",o).each(function(){e(this).hasClass("wpd_agreement_hide")&&b&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+$,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){M.push(e(this))}))})}(m),e(p).removeClass("wpd_not_clicked");let w=new FormData;w.append("action","wpdAddComment");let f=e(":input",m),u=0;if(f.each(function(){let t=this;if(""!==t.name){if("file"==t.type){let o=t.files;e.each(o,function(e,o){w.append(t.name+"["+e+"]",o),u+=o.size})}else"checkbox"!=t.type&&"radio"!=t.type?w.append(t.name+"",e(t).val().trim()):("checkbox"==t.type||"radio"==t.type)&&e(t).is(":checked")&&w.append(t.name+"",e(t).val())}}),u>parseInt(wpdiscuzAjaxObj.wmuMaxFileSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseMaxFileSize,"wmuPhraseMaxFileSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(u>parseInt(wpdiscuzAjaxObj.wmuPostMaxSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhrasePostMaxSize,"wmuPhrasePostMaxSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(w.append("wpd_comment_depth",l),wpdiscuzAjaxObj.wpdiscuz_zs&&w.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",m).length?e(".wpd-cookies-checkbox",m).prop("checked")||(g=!1):o&&(g=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){w.append("g-recaptcha-response",e),B(m,w,p)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(h){console.log(h),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+h.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else B(m,w,p)}(function e(t){if((a||n)&&"2.0"===d){var o=et(t);grecaptcha.reset(L[o])}})(e(".wpdiscuz_unique_id",m).val()),e(".wpdiscuz_reset").val("")}),e(document.body).on("wpdiscuz_comment_posted",function(t,o,a,n,d){let i=e(".wpd-thread-filter");void 0===d||isNaN(d.wc_all_comments_count_new)||void 0===d.wc_all_comments_count_new||!d.wc_all_comments_count_new?i.find(".wpd-filter").addClass("wpdiscuz-hidden"):i.find(".wpd-filter").removeClass("wpdiscuz-hidden")}),e("body").on("click",".wpd_editable_comment",function(){t&&e(".wpdiscuz-edit-form-wrap").length&&V(ee(e(".wpdiscuz-edit-form-wrap"),0),t);var o=e(this),a=ee(o,0),n=et(a),d=new FormData;d.append("action","wpdEditComment"),d.append("commentId",n),t=e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-text").get(0),eg(C,!0,d).done(function(t){if("object"==typeof t){if(t.success){if(e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(t.data.html),wpdiscuzLoadRichEditor){var n=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+a);n.clipboard.dangerouslyPasteHTML(0,t.data.content),n.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+a).val(t.data.content),eb(e("#wc-textarea-edit_"+a));e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else console.log(t);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wc_save_edited_comment",function(){var t=e(this),o=ee(t),a=et(o),n=e("#wpd-comm-"+o+" #wpdiscuz-edit-form");if(ed(n,"#wpd-editor-edit_"+o),n.on("submit",function(e){e.preventDefault()}),n[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",n).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),("checkbox"===this.type||"radio"===this.type)&&e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),eg(C,!0,d).done(function(n){"object"==typeof n?(n.success?(V(o,n.data.message),n.data.comment_approved_html&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-subheader").append(n.data.comment_approved_html),n.data.lastEdited&&(e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(n.data.lastEdited).insertAfter("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),n.data.twitterShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",n.data.twitterShareLink),n.data.whatsappShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",n.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,a)):wpdiscuzAjaxObj.setCommentMessage(n,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wc_cancel_edit",function(){var o=ee(e(this));V(o,t),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)}),!u&&w&&(S=0,1==w?setTimeout(function(){Y(!0)},500):e("body").on("click",".wpd-load-comments",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),Y(!0)})),e("body").on("click",".wpd-load-more-submit",function(){var t=e(this),o="wpd-loaded";t.hasClass(o)&&Y(!1,t,o,"wpd-loading")});var K=!1;function G(){var t=document.getElementById("wpdiscuzHasMoreComments"),o=0;t&&(o=t.dataset.is_show_load_more);var a=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,n=e(window).height()+e(window).scrollTop();a&&n&&100*n/a>=80&&!1===K&&1==o&&(K=!0,Y(!1,e(".wpd-load-more-submit")))}function Y(t,o,a,n){o&&(o.toggleClass(a),o.toggleClass(n));var d=new FormData;d.append("action","wpdLoadMoreComments");var s=e(".wpdiscuz-sort-button-active").attr("data-sorting");s&&d.append("sorting",s),d.append("offset",S),d.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),d.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");d.append("wpdType",c||""),eg(C,!t||1!=w,d).done(function(d){"object"==typeof d&&d.success&&(S++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(d.data.comment_list),X(d,t&&2!==i),K=!1,d.data.loadLastCommentId&&(l=d.data.loadLastCommentId),e8(d),t&&J(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))}).fail(function(t,d,i){console.log(i),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))})}function X(t,o){var a,n=document.getElementById("wpdiscuzHasMoreComments");if(!1==t.data.is_show_load_more)n&&(n.dataset.is_show_load_more=0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else{if(a=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",a),2!==i&&e(".wpdiscuz-comment-pagination").show(),n&&(n.dataset.is_show_load_more=1),o&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),t.data.comments_left>0){if(!e(".wpd-load-more-submit .wpd-comments-left").length){let d=e("<span>");d.addClass("wpd-comments-left"),e(".wpd-load-more-submit").append(d)}e(".wpd-load-more-submit .wpd-comments-left").text(t.data.comments_left_text)}}e8(t)}function J(t){var o=location.href.match(/#comment\-(\d+)/);if(null!==o){var a=o[1];if(e("#comment-"+a).length)setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+a).parents("[id^=wpd-comm-]").offset().top-D},1e3,es),t&&Q(a)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",a),eg(C,!0,n).done(function(o){"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+a).offset().top-D},1e3,es),t&&Q(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Z(e){if(void 0!==e.data.message)for(var t,o=e.data.message,a=0;a<o.length;a++)ea((t=o[a]).comment_parent,t.comment_html)}function ee(e,t){var o="";return(o=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(o.lastIndexOf("-")+1)}function et(e){return e.substring(0,e.indexOf("_"))}function eo(e,t){var o="";return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function ea(t,o){if(0==t)ec(o);else{var a=ee(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+a).after(o)}}function en(){var t=[];return e(".wpd-comment-right").each(function(){t.push(et(ee(e(this),0)))}),t.join(",")}function ed(t,o){var a=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(o+">.ql-editor").html()),function e(t){if("wpdiscuz-subscribe-form"!=t.attr("id")){var o=t.find(".wc_comment"),a=o.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),o.val(a)}}(t),e.each(a,function(){e("input",this).prop("required",!1),0===e("input:checked",this).length?e("input",e(this)).prop("required",!0):e(".wpd-field-invalid",this).remove()})}function ei(){e("html, body").css("scroll-behavior","unset")}function es(){e("html").css("scroll-behavior",H),e("body").css("scroll-behavior",q)}function ec(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function er(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,o){var a=e(o);a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==i||u||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),G(),e(window).scroll(function(){G()})),wpdiscuzAjaxObj.setLoadMoreVisibility=X,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var t,o=e(this);e(o).removeClass("wpd_not_clicked");var a=ee(o),n=et(a);t=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",n),d.append("voteType",t),eg(C,!0,d).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){if("total"===a.data.buttonsStyle){var d=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result"),i=a.data.votes;d.text(a.data.votesHumanReadable),d.attr("title",i),d.removeClass("wpd-up wpd-down"),i>0&&d.addClass("wpd-up"),i<0&&d.addClass("wpd-down")}else{var s=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-like"),c=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-dislike");s.text(a.data.likeCountHumanReadable),s.attr("title",a.data.likeCount),c.text(a.data.dislikeCountHumanReadable),c.attr("title",a.data.dislikeCount),parseInt(a.data.likeCount)>0?s.addClass("wpd-up"):s.removeClass("wpd-up"),0>parseInt(a.data.dislikeCount)?c.addClass("wpd-down"):c.removeClass("wpd-down")}var r=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-up"),p=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-down");r.removeClass("wpd-up"),p.removeClass("wpd-down"),a.data.curUserReaction>0?r.addClass("wpd-up"):a.data.curUserReaction<0&&p.addClass("wpd-down")}else a.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,o),"error");e8(a,n,t)}else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).on("click","body",function(t){var o=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?o.css({display:o.is(":visible")?"none":"flex"}):o.hide()}),e("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",function(){var t=e(this),o=e(this).attr("data-sorting");if(o){e(".wpd-load-comments").parents(".wpd-load-more-submit-wrap").remove(),e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var a=new FormData;a.append("action","wpdSorting"),a.append("sorting",o);var n=e(".wpdf-active").attr("data-filter-type");a.append("wpdType",n||""),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),X(t,!1),S=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){J(!1)},1!=w&&J(!1),e("body").on("click",".wpdiscuz-readmore",function(){var t=ee(e(this)),o=et(t),a=new FormData;a.append("action","wpdReadMore"),a.append("commentId",o),eg(C,!0,a).done(function(a){"object"==typeof a?(a.success?(e("#comment-"+o+" .wpd-comment-text").replaceWith(" "+a.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(a.data),e8(a)):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("change",".wpd-required-group",function(){0!==e("input:checked",this).length?e("input",e(this)).prop("required",!1):e("input",e(this)).prop("required",!0)}),e("body").on("click",".wpdiscuz-spoiler",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e("body").on("click",".wpd-tools",function(){var t=e(".wpd-tools-actions",e(this));t.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e("body").on("mouseleave",".wpd-comment-right",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e("body").on("click",".wpd_stick_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd_close_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",function(){var t=e(this),o=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+o),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdLoadMoreComments");var n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&a.append("sorting",n),a.append("lastParentId",0),a.append("offset",0),S=1,a.append("wpdType",t.hasClass("wpdf-active")?"":o),a.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),eg(C,!1,a).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(o.data.comment_list),X(o),l=o.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),e8(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpdf-reacted.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdMostReactedComment"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e("#comment-"+o.data.commentId).length||e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpdf-hottest.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdHottestThread"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.commentId).length?e("#comment-"+o.data.commentId).parents("[id^=wpd-comm-"+o.data.commentId+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpd-filter-view-all",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-follow-link.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=ee(t,0),a=et(o),n=new FormData;n.append("action","wpdFollowUser"),n.append("commentId",a),eg(C,!0,n).done(function(o){t.addClass("wpd_not_clicked"),"object"==typeof o?o.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data.code],o.data.code,t),"success"),t.removeClass("wpd-follow-active"),o.data.followTip&&t.attr("wpd-tooltip",o.data.followTip),o.data.followClass&&t.addClass(o.data.followClass),e8(o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),er(),e("body").on("keyup",".wc_email",function(){er(e(this))}),z&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),_&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover");let t=wpdiscuzAjaxObj.bubbleHintShowOnce?"/":location.href;wpdiscuzAjaxObj.bubbleHintCookieExpires&&parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),path:t}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*O)},1e3*_),"content_left"===T){if(e(".entry-content").length){var ep=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){var ep=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ep=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===T?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===T&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("body").on("click","#wpd-bubble-add-message-close",function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("body").on("click","#wpd-bubble",function(){ei(),e("#tab-title-reviews").length&&e("#tab-title-reviews a").trigger("click"),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-(D+28)},1e3,function(){es(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").trigger("focus")})}),e("body").on("click","#wpd-bubble-comment-close",function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("body").on("click","#wpd-bubble-comment-reply-link a",function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),J(!0);var o=t.match(/#comment\-(\d+)/);R=R.filter(function(e){return e!=o[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(R.length),0==R.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("body").on("click","#wpd-bubble-count",function(){if(R.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",R.join()),eg(C,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Z(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),R=[],e(".wpd-new-loaded-comment").length&&(ei(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,es)),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,o){console.log(o)})}})}function em(){if(k){let t=Math.ceil(Date.now()/1e3),o=t-j;if(o>Math.floor(r/1e3/2))return setTimeout(em,r),console.log("You are not interacted with the website, the request has been blocked!"),!1}e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:m,visibleCommentIds:en()}}).done(function(t){if(!F){if("object"==typeof t){if(t.commentIDsToRemove.forEach(function(t){e("[id^=wpd-comm-"+t+"]").remove()}),t.ids.length){if(c){var o;(o=new FormData).append("action","wpdUpdateAutomatically"),o.append("loadLastCommentId",l),o.append("visibleCommentIds",en()),eg(C,!1,o).done(function(t){!F&&"object"==typeof t&&t.success&&(Z(t),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e(".wpd-thread-info").html(t.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(t.data.wc_all_comments_count_bubble_html),l=t.data.loadLastCommentId)}).fail(function(e,t,o){console.log(o)})}t.ids=t.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var a=5e3;m=parseInt(t.ids[t.ids.length-1]),R=R.concat(t.ids),E&&t.commentText&&(e("#wpd-bubble-author-avatar").html(t.avatar),e("#wpd-bubble-author-name").html(t.authorName),e("#wpd-bubble-comment-date span").html(t.commentDate),e("#wpd-bubble-comment-text").html(t.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",t.commentLink),e("#wpd-bubble-notification-message").show(),a=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=t.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},a),e(".wpd-new-comments-count").text(n),e("#wpd-bubble-count").addClass("wpd-new-comments")}t.all_comments_count=parseInt(t.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(t.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(t.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.all_comments_count))}else console.log(t)}setTimeout(em,r)}).fail(function(e,t,o){console.log(o),setTimeout(em,r)})}if((z&&x||c)&&(o||!o&&p)&&setTimeout(em,r),e(".wpd-inline-form-wrapper").length){var P=new FormData;P.append("action","wpdGetInlineCommentForm"),eg(C,!1,P).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),o=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+o.substring(o.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),eh()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)}).fail(function(e,t,o){console.log(o)})}function ew(t){if(e(t).hasClass("wpd-inline-shortcode"))var o=e(t).attr("id");else var o=e(t).parents(".wpd-inline-shortcode").attr("id");return o.substring(o.lastIndexOf("-")+1)}function ef(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function eu(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),o=t.offset().top-window.pageYOffset;t.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&o>0&&o<300&&("blink"===I?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),eh(t.siblings(".wpd-inline-form-wrapper"))))})}function eh(t){if(t){if(t.offset().left<=10){t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o<3&&(o=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}else if(t.offset().left+t.width()>document.body.clientWidth-10){t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o>t.width()-3&&(o=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function eb(t){var o,a=0;if(t.parents(".wpd_main_comm_form").length)a=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents(".wpd_main_comm_form");else if(t.parents(".wpd-secondary-form-wrapper").length)a=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),o=t.parents(".wpd-secondary-form-wrapper");else if(t.parents("#wpdiscuz-edit-form").length){var n=ee(t);a=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents("#wpdiscuz-edit-form")}if(a&&o){var d=t.val().length,i=e(".wpd-editor-char-counter",o),s=a-d;i.html(s),s<=10?i.addClass("error"):i.removeClass("error")}}function e8(t,o,a,n){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,o,a,n):"function"==typeof window[t.data.callbackFunctions[e]]?window[t.data.callbackFunctions[e]](t,o,a,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function eg(t,o,a){o&&e("#wpdiscuz-loading-bar").show(),a.append("postId",s);var n=a.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](a,t,o))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return console.log(d),e.ajax({type:"POST",url:d,data:a,contentType:!1,processData:!1})}e(document).on("click","body",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){ef();var o="";e(t.target).hasClass("wpd-inline-icon")?o=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(o=e(t.target).parents(".wpd-inline-icon")),o.length&&o.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(o.parents(".wpd-inline-shortcode").addClass("wpd-active"),o.siblings(".wpd-inline-form-wrapper").show(),o.addClass("wpd-open"),o.removeClass("wpd-ignored"),eh(o.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e("body").on("click",".wpd-inline-submit.wpd_not_clicked",function(t){t.preventDefault();var o=e(this),a=e(this).parents(".wpd_inline_comm_form");if(a[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ew(a)),e.each(e("input, textarea",a),function(t,o){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(o).attr("name"),e(o).val()):n.append(e(o).attr("name"),e(o).val())}),eg(C,!0,n).done(function(t){if(o.addClass("wpd_not_clicked"),"object"==typeof t){if(t.success){a[0].reset(),ef();var n=parseInt(t.data.newCount),d=o.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.removeClass("wpd-has-comments"),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e(".wpd-thread-info").html(t.data.allCommentsCountBeforeThreadsHtml),e(".wpd-thread-info").attr("data-comments-count",t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").replaceWith(t.data.allCommentsCountBubbleHtml),t.data.message&&ec(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("keydown",".wpd-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e("body").on("keydown","#wpdiscuz-edit-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e("body").on("keydown",".wpd-inline-comment-content",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-inline-icon-count.wpd-has-comments",function(){var t=e(this),o=new FormData;o.append("action","wpdGetLastInlineComments"),o.append("inline_form_id",ew(t)),eg(C,!0,o).done(function(o){"object"==typeof o?o.success?e(o.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-view-all-inline-comments",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),ei(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-D},1e3,es)}),e("body").on("click",".wpd-feedback-content-link",function(t){t.preventDefault();var o=e(this).data("feedback-content-id");ei(),e("html, body").animate({scrollTop:e("#wpd-inline-"+o).offset().top-(D+6)},1e3,function(){es(),e("#wpd-inline-"+o).addClass("wpd-active")})}),("scroll_open"===I||"blink"===I)&&(eu(),e(window).on("scroll",eu)),e("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",function(){if(parseInt(f)&&!confirm(wpdiscuzAjaxObj.wc_confirm_rate_edit))return!1;var t=new FormData,o=e(this).index();o>=0&&o<5&&(t.append("action","wpdUserRate"),t.append("rating",o+1),eg(C,!0,t).done(function(t){"object"==typeof t?(t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data),"error"),e8(t)):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){t.preventDefault();var o=e(this);let a=e("#wpdiscuz_subscription_button",o);if(o[0].checkValidity()&&(n=o,i=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).val().length?(i=!1,e(".wpdiscuz-recaptcha",n).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&e(".wpdiscuz-recaptcha",n).css("border","none"),i)&&a.hasClass("wpd_not_clicked")){a.removeClass("wpd_not_clicked");var n,i,s=new FormData;s.append("action","wpdAddSubscription"),e("*",o).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),eg(C,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1,a.addClass("wpd_not_clicked")}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wpd-unsubscribe",function(t){t.preventDefault();var o=new FormData;o.append("action","wpdUnsubscribe"),o.append("sid",e(this).data("sid")),o.append("skey",e(this).data("skey")),eg(C,!0,o).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=eg});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
     6var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
    77/* Colorbox */
    88!function(t,e,i){var o,n,r,h,a,s,l,c,d,g,f,u,p,m,w,v,y,x,b,T,C,H,k,W,E,I,M,L,R,S,K,P,B,O={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},_="colorbox",j="cbox",D=j+"Element",F=j+"_open",N=j+"_load",z=j+"_complete",A=j+"_cleanup",q=j+"_closed",U=j+"_purge",$=t("<a/>"),G="div",Q=0,J={};function V(i,o,n){var r=e.createElement(i);return o&&(r.id=j+o),n&&(r.style.cssText=n),t(r)}function X(){return i.innerHeight?i.innerHeight:t(i).height()}function Y(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==O[e]&&(this.cache[e]=O[e])),this.cache[e]},this.get=function(t){var e=this.value(t);return"function"==typeof e?e.call(this.el,this):e}}function Z(t){var e=d.length,i=(I+t)%e;return i<0?e+i:i}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():X())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function it(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function ot(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.trigger("focus"))}function nt(t){nt.str!==t&&(n.add(o).removeClass(nt.str).addClass(t),nt.str=t)}function rt(i){t(e).trigger(i),$.triggerHandler(i)}var ht=function(){var t,e,i=j+"Slideshow_",o="click."+j;function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(P.next,C.get("slideshowSpeed")))}function a(){v.html(C.get("slideshowStop")).off(o).one(o,s),$.on(z,h).on(N,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),$.off(z,h).off(N,r),v.html(C.get("slideshowStart")).off(o).one(o,function(){P.next(),a()}),n.removeClass(i+"on").addClass(i+"off")}function l(){t=!1,v.hide(),r(),$.off(z,h).off(N,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||($.off(A,l),l()):C.get("slideshow")&&d[1]&&(t=!0,$.one(A,l),C.get("slideshowAuto")?a():s(),v.show())}}();function at(r){var g,w;if(!S){if(g=t(r).data(_),C=new Y(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t("."+D).filter(function(){return new Y(this,t.data(this,_)).get("rel")===w}),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=R=!0,nt(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),f=V(G,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(f),H=a.height()+c.height()+h.outerHeight(!0)-h.height(),k=s.width()+l.width()+h.outerWidth(!0)-h.width(),W=f.outerHeight(!0),E=f.outerWidth(!0);var v=tt(C.get("initialWidth"),"x"),y=tt(C.get("initialHeight"),"y"),x=C.get("maxWidth"),B=C.get("maxHeight");C.w=Math.max((!1!==x?Math.min(v,tt(x,"x")):v)-E-k,0),C.h=Math.max((!1!==B?Math.min(y,tt(B,"y")):y)-W-H,0),f.css({width:"",height:C.h}),P.position(),rt(F),C.get("onOpen"),T.add(m).hide(),n.trigger("focus"),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",ot,!0),$.one(q,function(){e.removeEventListener("focus",ot,!0)})),C.get("returnFocus")&&$.one(q,function(){t(C.el).trigger("focus")})}var O=parseFloat(C.get("opacity"));o.css({opacity:O==O?O:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?b.html(C.get("close")).appendTo(h):b.appendTo("<div/>"),function(){var e,o,n,r=P.prep,h=++Q;R=!0,M=!1,rt(U),rt(N),C.get("onLoad"),C.h=C.get("height")?tt(C.get("height"),"y")-W-H:C.get("innerHeight")&&tt(C.get("innerHeight"),"y"),C.w=C.get("width")?tt(C.get("width"),"x")-E-k:C.get("innerWidth")&&tt(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=tt(C.get("maxWidth"),"x")-E-k,C.mw=C.w&&C.w<C.mw?C.w:C.mw);C.get("maxHeight")&&(C.mh=tt(C.get("maxHeight"),"y")-W-H,C.mh=C.h&&C.h<C.mh?C.h:C.mh);if(e=C.get("href"),K=setTimeout(function(){p.show()},100),C.get("inline")){var a=t(e).eq(0);n=t("<div>").hide().insertBefore(a),$.one(U,function(){n.replaceWith(a)}),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):et(C,e)?(e=it(C,e),M=C.get("createImg"),t(M).addClass(j+"Photo").on("error."+j,function(){r(V(G,"Error").html(C.get("imgError")))}).one("load",function(){h===Q&&setTimeout(function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).on("click."+j,function(){P.next()})),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)},1)}),M.src=e):e&&u.load(e,C.get("data"),function(e,i){h===Q&&r("error"===i?V(G,"Error").html(C.get("xhrError")):t(this).contents())})}()}}function st(){n||(B=!1,g=t(i),n=V(G).attr({id:_,class:!1===t.support.opacity?j+"IE":"",role:"dialog",tabindex:"-1"}).hide(),o=V(G,"Overlay").hide(),p=t([V(G,"LoadingOverlay")[0],V(G,"LoadingGraphic")[0]]),r=V(G,"Wrapper"),h=V(G,"Content").append(m=V(G,"Title"),w=V(G,"Current"),x=t('<button type="button"/>').attr({id:j+"Previous"}),y=t('<button type="button"/>').attr({id:j+"Next"}),v=t('<button type="button"/>').attr({id:j+"Slideshow"}),p),b=t('<button type="button"/>').attr({id:j+"Close"}),r.append(V(G).append(V(G,"TopLeft"),a=V(G,"TopCenter"),V(G,"TopRight")),V(G,!1,"clear:left").append(s=V(G,"MiddleLeft"),h,l=V(G,"MiddleRight")),V(G,!1,"clear:left").append(V(G,"BottomLeft"),c=V(G,"BottomCenter"),V(G,"BottomRight"))).find("div div").css({float:"left"}),u=V(G,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),T=y.add(x).add(w).add(v)),e.body&&!n.parent().length&&t(e.body).append(o,n.append(r,u))}function lt(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),at(this))}return!!n&&(B||(B=!0,y.on("click",function(){P.next()}),x.on("click",function(){P.prev()}),b.on("click",function(){P.close()}),o.on("click",function(){C.get("overlayClose")&&P.close()}),t(e).on("keydown."+j,function(t){var e=t.keyCode;L&&C.get("escKey")&&27===e&&(t.preventDefault(),P.close()),L&&C.get("arrowKey")&&d[1]&&!t.altKey&&(37===e?(t.preventDefault(),x.trigger("click")):39===e&&(t.preventDefault(),y.trigger("click")))}),"function"==typeof t.fn.on?t(e).on("click."+j,"."+D,i):t("."+D).live("click."+j,i)),!0)}t[_]||(t(st),(P=t.fn[_]=t[_]=function(e,i){var o=this;return e=e||{},"function"==typeof o&&(o=t("<a/>"),e.open=!0),o[0]?(st(),lt()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,_)||{};t.data(this,_,t.extend(i,e))}).addClass(D),new Y(o[0],e).get("open")&&at(o[0])),o):o}).position=function(e,i){var o,d,f,u=0,p=0,m=n.offset();function w(){a[0].style.width=c[0].style.width=h[0].style.width=parseInt(n[0].style.width,10)-k+"px",h[0].style.height=s[0].style.height=l[0].style.height=parseInt(n[0].style.height,10)-H+"px"}if(g.off("resize."+j),n.css({top:-9e4,left:-9e4}),d=g.scrollTop(),f=g.scrollLeft(),C.get("fixed")?(m.top-=d,m.left-=f,n.css({position:"fixed"})):(u=d,p=f,n.css({position:"absolute"})),!1!==C.get("right")?p+=Math.max(g.width()-C.w-E-k-tt(C.get("right"),"x"),0):!1!==C.get("left")?p+=tt(C.get("left"),"x"):p+=Math.round(Math.max(g.width()-C.w-E-k,0)/2),!1!==C.get("bottom")?u+=Math.max(X()-C.h-W-H-tt(C.get("bottom"),"y"),0):!1!==C.get("top")?u+=tt(C.get("top"),"y"):u+=Math.round(Math.max(X()-C.h-W-H,0)/2),n.css({top:m.top,left:m.left,visibility:"visible"}),r[0].style.width=r[0].style.height="9999px",o={width:C.w+E+k,height:C.h+W+H,top:u,left:p},e){var v=0;t.each(o,function(t){o[t]===J[t]||(v=e)}),e=v}J=o,e||n.css(o),n.dequeue().animate(o,{duration:e||0,complete:function(){w(),R=!1,r[0].style.width=C.w+E+k+"px",r[0].style.height=C.h+W+H+"px",C.get("reposition")&&setTimeout(function(){g.on("resize."+j,P.position)},1),"function"==typeof i&&i()},step:w})},P.resize=function(t){var e;L&&((t=t||{}).width&&(C.w=tt(t.width,"x")-E-k),t.innerWidth&&(C.w=tt(t.innerWidth,"x")),f.css({width:C.w}),t.height&&(C.h=tt(t.height,"y")-W-H),t.innerHeight&&(C.h=tt(t.innerHeight,"y")),t.innerHeight||t.height||(e=f.scrollTop(),f.css({height:"auto"}),C.h=f.height()),f.css({height:C.h}),e&&f.scrollTop(e),P.position("none"===C.get("transition")?0:C.get("speed")))},P.prep=function(i){if(L){var o,r="none"===C.get("transition")?0:C.get("speed");f.remove(),(f=V(G,"LoadedContent").append(i)).hide().appendTo(u.show()).css({width:(C.w=C.w||f.width(),C.w=C.mw&&C.mw<C.w?C.mw:C.w,C.w),overflow:C.get("scrolling")?"auto":"hidden"}).css({height:(C.h=C.h||f.height(),C.h=C.mh&&C.mh<C.h?C.mh:C.h,C.h)}).prependTo(h),u.hide(),t(M).css({float:"none"}),nt(C.get("className")),o=function(){var i,o,h=d.length;function a(){!1===t.support.opacity&&n[0].style.removeAttribute("filter")}L&&(o=function(){clearTimeout(K),p.hide(),rt(z),C.get("onComplete")},m.html(C.get("title")).show(),f.show(),h>1?("string"==typeof C.get("current")&&w.html(C.get("current").replace("{current}",I+1).replace("{total}",h)).show(),y[C.get("loop")||I<h-1?"show":"hide"]().html(C.get("next")),x[C.get("loop")||I?"show":"hide"]().html(C.get("previous")),ht(),C.get("preloading")&&t.each([Z(-1),Z(1)],function(){var i=d[this],o=new Y(i,t.data(i,_)),n=o.get("href");n&&et(o,n)&&(n=it(o,n),e.createElement("img").src=n)})):T.hide(),C.get("iframe")?(i=C.get("createIframe"),C.get("scrolling")||(i.scrolling="no"),t(i).attr({src:C.get("href"),class:j+"Iframe"}).one("load",o).appendTo(f),$.one(U,function(){i.src="//about:blank"}),C.get("fastIframe")&&t(i).trigger("load")):o(),"fade"===C.get("transition")?n.fadeTo(r,1,a):a())},"fade"===C.get("transition")?n.fadeTo(r,0,function(){P.position(0,o)}):P.position(r,o)}},P.next=function(){!R&&d[1]&&(C.get("loop")||d[I+1])&&(I=Z(1),at(d[I]))},P.prev=function(){!R&&d[1]&&(C.get("loop")||I)&&(I=Z(-1),at(d[I]))},P.close=function(){L&&!S&&(S=!0,L=!1,rt(A),C.get("onCleanup"),g.off("."+j),o.fadeTo(C.get("fadeOut")||0,0),n.stop().fadeTo(C.get("fadeOut")||0,0,function(){n.hide(),o.hide(),rt(U),f.remove(),setTimeout(function(){S=!1,rt(q),C.get("onClosed")},1)}))},P.remove=function(){n&&(n.stop(),t[_].close(),n.stop(!1,!0).remove(),o.remove(),S=!1,n=null,t("."+D).removeData(_).removeClass(D),t(e).off("click."+j).off("keydown."+j))},P.element=function(){return t(C.el)},P.settings=O)}(jQuery,document,window);
  • wpdiscuz/trunk/assets/js/wpdiscuz-combo.min.js

    r3442652 r3457051  
    88jQuery.fn.autoGrow=function(){return this.each(function(){var createMirror=function(textarea){jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")+".<br/>.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})};
    99/* wpDiscuz */
    10 var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;if(wpdiscuzAjaxObj.validateNonceForGuest&&!o&&!Cookies.get("wpdiscuz_nonce_"+$)){var P=new FormData;P.append("action","wpdGetNonce"),eg(C,!1,P)}var H=e("html").css("scroll-behavior"),q=e("body").css("scroll-behavior");function U(e){j=Math.ceil(Date.now()/1e3)}if(k&&(document.addEventListener("mousedown",U),document.addEventListener("mousemove",U),document.addEventListener("touchstart",U),document.addEventListener("scroll",U),document.addEventListener("keydown",U)),e("#wp-admin-bar-wpdiscuz > .ab-item").prepend("<img src='"+wpdiscuzAjaxObj.menu_icon+"' style='width:22px;height:22px;vertical-align:middle;'>"),e(document).on("mouseover","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon_hover)}),e(document).on("mouseleave","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon)}),e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(t){var o=e(".wpd-form").not(":hidden");if(o.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var a=0;a<o.length;a++)if("\n"!==wpDiscuzEditor.createEditor(e(o[a]).find(".ql-container").attr("id")).getText()){t.preventDefault(),t.returnValue="";return}}else for(var a=0;a<o.length;a++)if(e(o[a]).find(".wc_comment").val()){t.preventDefault(),t.returnValue="";return}}}),wpdiscuzLoadRichEditor||(e(document).delegate("textarea.wc_comment","input",function(){eb(e(this))}),e.each(e("textarea.wc_comment"),function(){eb(e(this))})),e("body").on("focus","#wpdcom .ql-editor, #wpdcom .wc_comment",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(y)}),e("body").on("focus","#wpdcom textarea",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e("body").on("click","#wpd-editor-source-code-wrapper-bg",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e("body").on("click","#wpd-insert-source-code",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var o=e("#wpd-editor-source-code").val();o.length&&t.clipboard.dangerouslyPasteHTML(0,o,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e("body").on("click",".wpd-reply-button",function(){var t,i,s,c,r=ee(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+r).focus()},y):setTimeout(function(){e("#wc-textarea-"+r).trigger("focus")},y),e("#wpd-secondary-form-wrapper-"+r).slideToggle(y)):(t=e(this),i=ee(t,0),e("#wpdiscuz_form_anchor-"+i).before((s=i,e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,s))),c=e("#wpd-secondary-form-wrapper-"+i),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+i).focus()},y):setTimeout(function(){e("#wc-textarea-"+i).trigger("focus")},y),c.slideToggle(y,function(){t.addClass("wpdiscuz-clonned")})),function t(o){if((a||n)&&"2.0"===d){var i=et(o);setTimeout(function(){if(!L[i])try{L[i]=grecaptcha.render("wpdiscuz-recaptcha-"+o,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-"+o).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+o).val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3)}}(r)}),e("body").on("click","#wpdcom [data-wpd-clipboard]",function(){var t=e(this).data("wpd-clipboard");e(this).data("wpd-ismention")&&(t="@"+t);var o=e("<input/>");o.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),o.trigger("select"),document.execCommand("copy"),o.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(e){e.preventDefault()}),e("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked");var o,a,n,d,i=ee(e(this),0),s=e(this),c=e(".fas",s);!s.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&v?(o=i,a=t,n=et(o),d=new FormData,d.append("action","wpdShowReplies"),d.append("commentId",n),eg(C,!0,d).done(function(t){a.addClass("wpd_not_clicked"),"object"==typeof t&&t.success&&(e("#wpd-comm-"+o).replaceWith(t.data.comment_list),e("#wpd-comm-"+o+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+o+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+o+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})):e("#wpd-comm-"+i+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(c.removeClass("fa-chevron-up"),c.addClass("fa-chevron-down"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(c.removeClass("fa-chevron-down"),c.addClass("fa-chevron-up"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e("body").on("mouseenter",".wpd-new-loaded-comment",function(){e(this).removeClass("wpd-new-loaded-comment")}),e("body").on("click",".wpd-sbs-toggle",function(){e(".wpdiscuz-subscribe-bar").slideToggle(y)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!o&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&e("#wpdiscuz-subscribe-form").length&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),ed(e(this),""),t.preventDefault())})):"3.0"===d&&e("body").on("click","#wpdiscuz_subscription_button",function(t){var o=e(this).parents("#wpdiscuz-subscribe-form");ed(o,""),t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,o.trigger("submit")},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}})),(a||n)&&"2.0"===d){var A=e(window).width(),W=e("#wpdcom").width();W>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),W>=940&&W<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),W>=810&&W<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),W>=730&&W<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),W>=610&&W<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),A>650&&(W>=510&&W<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W>=470&&W<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function B(t,o,a){e(document.body).trigger("wpdiscuz_before_comment_post",o,a),eg(C,!1,o).done(function(n){if(e(a).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(y),n.data.wc_all_comments_count_new=parseInt(n.data.wc_all_comments_count_new),e(".wpd-thread-info").html(n.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",n.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(n.data.wc_all_comments_count_bubble_html);var d,i,s,c,r=y;n.data.is_main?ec(n.data.message):(r=y+700,e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).slideToggle(700),1==n.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).after(n.data.message):e("#wpd-comm-"+n.data.uniqueid).after(n.data.message)),function e(t){if(!t.data.held_moderate){var o=new FormData;o.append("action","wpdCheckNotificationType"),o.append("comment_id",t.data.new_comment_id),o.append("email",t.data.comment_author_email),o.append("isParent",t.data.is_main),eg(C,!0,o)}}(n),function e(t){if(t.data.redirect>0&&t.data.new_comment_id){var o=new FormData;o.append("action","wpdRedirect"),o.append("commentId",t.data.new_comment_id),eg(C,!0,o).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,o){console.log(o)})}}(n),b&&g?(d=n.data,i=d.comment_author_email,s=d.comment_author,c=d.comment_author_url,null==h?(Cookies.set("comment_author_email_"+$,i),Cookies.set("comment_author_"+$,s),c.length&&Cookies.set("comment_author_url_"+$,c)):(h=parseInt(h),Cookies.set("comment_author_email_"+$,i,{expires:h,path:"/"}),Cookies.set("comment_author_"+$,s,{expires:h,path:"/"}),c.length&&Cookies.set("comment_author_url_"+$,c,{expires:h,path:"/"})),e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").prop("checked",!0)):g||e(".wpd-cookies-checkbox").prop("checked",!1),t.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]):eb(t.find(".wc_comment")),N(n.data),e(".wmu-preview-wrap",t).remove(),M.length&&(M.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),M=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+n.data.new_comment_id).offset().top-D},1e3,es)},r),e8(n,t),e(document.body).trigger("wpdiscuz_comment_posted",[t,o,a,n.data])}else n.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,t))}else wpdiscuzAjaxObj.setCommentMessage(n,"error");e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,n){console.log(n),e(a).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function N(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&0>t.comment_author_email.indexOf("@example.com")&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function V(t,o){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(o),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var t,i,s,c,r,p=e(this),l=1,m=e(this).parents("form");if("true"===m.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",m),"warning");return}if(m.hasClass("wpd_main_comm_form")||(l=(t=e(this).parents(".wpd-comment"),i=t.attr("class").split(" "),s="",e.each(i,function(e,t){"wpd_comment_level"===eo(t,!1)&&(s=eo(t,!0))}),parseInt(s)+1)),e(document.body).trigger("wpdiscuz_new_comment",[p,m,l]),ed(m,"#wpd-editor-"+e(".wpdiscuz_unique_id",m).val()),m.on("submit",function(e){e.preventDefault()}),m[0].checkValidity()&&(c=m,r=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(r=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),r)){F=!0,function t(o){e(".wpd-agreement-checkbox",o).each(function(){e(this).hasClass("wpd_agreement_hide")&&b&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+$,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){M.push(e(this))}))})}(m),e(p).removeClass("wpd_not_clicked");let w=new FormData;w.append("action","wpdAddComment");let f=e(":input",m),u=0;if(f.each(function(){let t=this;if(""!==t.name){if("file"==t.type){let o=t.files;e.each(o,function(e,o){w.append(t.name+"["+e+"]",o),u+=o.size})}else"checkbox"!=t.type&&"radio"!=t.type?w.append(t.name+"",e(t).val().trim()):("checkbox"==t.type||"radio"==t.type)&&e(t).is(":checked")&&w.append(t.name+"",e(t).val())}}),u>parseInt(wpdiscuzAjaxObj.wmuMaxFileSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseMaxFileSize,"wmuPhraseMaxFileSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(u>parseInt(wpdiscuzAjaxObj.wmuPostMaxSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhrasePostMaxSize,"wmuPhrasePostMaxSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(w.append("wpd_comment_depth",l),wpdiscuzAjaxObj.wpdiscuz_zs&&w.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",m).length?e(".wpd-cookies-checkbox",m).prop("checked")||(g=!1):o&&(g=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){w.append("g-recaptcha-response",e),B(m,w,p)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(h){console.log(h),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+h.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else B(m,w,p)}(function e(t){if((a||n)&&"2.0"===d){var o=et(t);grecaptcha.reset(L[o])}})(e(".wpdiscuz_unique_id",m).val()),e(".wpdiscuz_reset").val("")}),e(document.body).on("wpdiscuz_comment_posted",function(t,o,a,n,d){let i=e(".wpd-thread-filter");void 0===d||isNaN(d.wc_all_comments_count_new)||void 0===d.wc_all_comments_count_new||!d.wc_all_comments_count_new?i.find(".wpd-filter").addClass("wpdiscuz-hidden"):i.find(".wpd-filter").removeClass("wpdiscuz-hidden")}),e("body").on("click",".wpd_editable_comment",function(){t&&e(".wpdiscuz-edit-form-wrap").length&&V(ee(e(".wpdiscuz-edit-form-wrap"),0),t);var o=e(this),a=ee(o,0),n=et(a),d=new FormData;d.append("action","wpdEditComment"),d.append("commentId",n),t=e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-text").get(0),eg(C,!0,d).done(function(t){if("object"==typeof t){if(t.success){if(e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(t.data.html),wpdiscuzLoadRichEditor){var n=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+a);n.clipboard.dangerouslyPasteHTML(0,t.data.content),n.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+a).val(t.data.content),eb(e("#wc-textarea-edit_"+a));e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else console.log(t);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wc_save_edited_comment",function(){var t=e(this),o=ee(t),a=et(o),n=e("#wpd-comm-"+o+" #wpdiscuz-edit-form");if(ed(n,"#wpd-editor-edit_"+o),n.on("submit",function(e){e.preventDefault()}),n[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",n).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),("checkbox"===this.type||"radio"===this.type)&&e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),eg(C,!0,d).done(function(n){"object"==typeof n?(n.success?(V(o,n.data.message),n.data.comment_approved_html&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-subheader").append(n.data.comment_approved_html),n.data.lastEdited&&(e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(n.data.lastEdited).insertAfter("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),n.data.twitterShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",n.data.twitterShareLink),n.data.whatsappShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",n.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,a)):wpdiscuzAjaxObj.setCommentMessage(n,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wc_cancel_edit",function(){var o=ee(e(this));V(o,t),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)}),!u&&w&&(S=0,1==w?setTimeout(function(){Y(!0)},500):e("body").on("click",".wpd-load-comments",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),Y(!0)})),e("body").on("click",".wpd-load-more-submit",function(){var t=e(this),o="wpd-loaded";t.hasClass(o)&&Y(!1,t,o,"wpd-loading")});var K=!1;function G(){var t=document.getElementById("wpdiscuzHasMoreComments"),o=0;t&&(o=t.dataset.is_show_load_more);var a=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,n=e(window).height()+e(window).scrollTop();a&&n&&100*n/a>=80&&!1===K&&1==o&&(K=!0,Y(!1,e(".wpd-load-more-submit")))}function Y(t,o,a,n){o&&(o.toggleClass(a),o.toggleClass(n));var d=new FormData;d.append("action","wpdLoadMoreComments");var s=e(".wpdiscuz-sort-button-active").attr("data-sorting");s&&d.append("sorting",s),d.append("offset",S),d.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),d.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");d.append("wpdType",c||""),eg(C,!t||1!=w,d).done(function(d){"object"==typeof d&&d.success&&(S++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(d.data.comment_list),X(d,t&&2!==i),K=!1,d.data.loadLastCommentId&&(l=d.data.loadLastCommentId),e8(d),t&&J(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))}).fail(function(t,d,i){console.log(i),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))})}function X(t,o){var a,n=document.getElementById("wpdiscuzHasMoreComments");if(!1==t.data.is_show_load_more)n&&(n.dataset.is_show_load_more=0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else{if(a=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",a),2!==i&&e(".wpdiscuz-comment-pagination").show(),n&&(n.dataset.is_show_load_more=1),o&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),t.data.comments_left>0){if(!e(".wpd-load-more-submit .wpd-comments-left").length){let d=e("<span>");d.addClass("wpd-comments-left"),e(".wpd-load-more-submit").append(d)}e(".wpd-load-more-submit .wpd-comments-left").text(t.data.comments_left_text)}}e8(t)}function J(t){var o=location.href.match(/#comment\-(\d+)/);if(null!==o){var a=o[1];if(e("#comment-"+a).length)setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+a).parents("[id^=wpd-comm-]").offset().top-D},1e3,es),t&&Q(a)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",a),eg(C,!0,n).done(function(o){"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+a).offset().top-D},1e3,es),t&&Q(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Z(e){if(void 0!==e.data.message)for(var t,o=e.data.message,a=0;a<o.length;a++)ea((t=o[a]).comment_parent,t.comment_html)}function ee(e,t){var o="";return(o=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(o.lastIndexOf("-")+1)}function et(e){return e.substring(0,e.indexOf("_"))}function eo(e,t){var o="";return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function ea(t,o){if(0==t)ec(o);else{var a=ee(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+a).after(o)}}function en(){var t=[];return e(".wpd-comment-right").each(function(){t.push(et(ee(e(this),0)))}),t.join(",")}function ed(t,o){var a=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(o+">.ql-editor").html()),function e(t){if("wpdiscuz-subscribe-form"!=t.attr("id")){var o=t.find(".wc_comment"),a=o.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),o.val(a)}}(t),e.each(a,function(){e("input",this).prop("required",!1),0===e("input:checked",this).length?e("input",e(this)).prop("required",!0):e(".wpd-field-invalid",this).remove()})}function ei(){e("html, body").css("scroll-behavior","unset")}function es(){e("html").css("scroll-behavior",H),e("body").css("scroll-behavior",q)}function ec(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function er(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,o){var a=e(o);a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==i||u||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),G(),e(window).scroll(function(){G()})),wpdiscuzAjaxObj.setLoadMoreVisibility=X,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var t,o=e(this);e(o).removeClass("wpd_not_clicked");var a=ee(o),n=et(a);t=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",n),d.append("voteType",t),eg(C,!0,d).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){if("total"===a.data.buttonsStyle){var d=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result"),i=a.data.votes;d.text(a.data.votesHumanReadable),d.attr("title",i),d.removeClass("wpd-up wpd-down"),i>0&&d.addClass("wpd-up"),i<0&&d.addClass("wpd-down")}else{var s=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-like"),c=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-dislike");s.text(a.data.likeCountHumanReadable),s.attr("title",a.data.likeCount),c.text(a.data.dislikeCountHumanReadable),c.attr("title",a.data.dislikeCount),parseInt(a.data.likeCount)>0?s.addClass("wpd-up"):s.removeClass("wpd-up"),0>parseInt(a.data.dislikeCount)?c.addClass("wpd-down"):c.removeClass("wpd-down")}var r=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-up"),p=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-down");r.removeClass("wpd-up"),p.removeClass("wpd-down"),a.data.curUserReaction>0?r.addClass("wpd-up"):a.data.curUserReaction<0&&p.addClass("wpd-down")}else a.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,o),"error");e8(a,n,t)}else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).on("click","body",function(t){var o=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?o.css({display:o.is(":visible")?"none":"flex"}):o.hide()}),e("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",function(){var t=e(this),o=e(this).attr("data-sorting");if(o){e(".wpd-load-comments").parents(".wpd-load-more-submit-wrap").remove(),e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var a=new FormData;a.append("action","wpdSorting"),a.append("sorting",o);var n=e(".wpdf-active").attr("data-filter-type");a.append("wpdType",n||""),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),X(t,!1),S=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){J(!1)},1!=w&&J(!1),e("body").on("click",".wpdiscuz-readmore",function(){var t=ee(e(this)),o=et(t),a=new FormData;a.append("action","wpdReadMore"),a.append("commentId",o),eg(C,!0,a).done(function(a){"object"==typeof a?(a.success?(e("#comment-"+o+" .wpd-comment-text").replaceWith(" "+a.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(a.data),e8(a)):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("change",".wpd-required-group",function(){0!==e("input:checked",this).length?e("input",e(this)).prop("required",!1):e("input",e(this)).prop("required",!0)}),e("body").on("click",".wpdiscuz-spoiler",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e("body").on("click",".wpd-tools",function(){var t=e(".wpd-tools-actions",e(this));t.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e("body").on("mouseleave",".wpd-comment-right",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e("body").on("click",".wpd_stick_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd_close_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",function(){var t=e(this),o=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+o),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdLoadMoreComments");var n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&a.append("sorting",n),a.append("lastParentId",0),a.append("offset",0),S=1,a.append("wpdType",t.hasClass("wpdf-active")?"":o),a.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),eg(C,!1,a).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(o.data.comment_list),X(o),l=o.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),e8(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpdf-reacted.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdMostReactedComment"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e("#comment-"+o.data.commentId).length||e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpdf-hottest.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdHottestThread"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.commentId).length?e("#comment-"+o.data.commentId).parents("[id^=wpd-comm-"+o.data.commentId+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpd-filter-view-all",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-follow-link.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=ee(t,0),a=et(o),n=new FormData;n.append("action","wpdFollowUser"),n.append("commentId",a),eg(C,!0,n).done(function(o){t.addClass("wpd_not_clicked"),"object"==typeof o?o.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data.code],o.data.code,t),"success"),t.removeClass("wpd-follow-active"),o.data.followTip&&t.attr("wpd-tooltip",o.data.followTip),o.data.followClass&&t.addClass(o.data.followClass),e8(o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),er(),e("body").on("keyup",".wc_email",function(){er(e(this))}),z&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),_&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover");let t=wpdiscuzAjaxObj.bubbleHintShowOnce?"/":location.href;wpdiscuzAjaxObj.bubbleHintCookieExpires&&parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),path:t}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*O)},1e3*_),"content_left"===T){if(e(".entry-content").length){var ep=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){var ep=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ep=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===T?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===T&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("body").on("click","#wpd-bubble-add-message-close",function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("body").on("click","#wpd-bubble",function(){ei(),e("#tab-title-reviews").length&&e("#tab-title-reviews a").trigger("click"),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-(D+28)},1e3,function(){es(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").trigger("focus")})}),e("body").on("click","#wpd-bubble-comment-close",function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("body").on("click","#wpd-bubble-comment-reply-link a",function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),J(!0);var o=t.match(/#comment\-(\d+)/);R=R.filter(function(e){return e!=o[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(R.length),0==R.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("body").on("click","#wpd-bubble-count",function(){if(R.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",R.join()),eg(C,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Z(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),R=[],e(".wpd-new-loaded-comment").length&&(ei(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,es)),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,o){console.log(o)})}})}function em(){if(k){let t=Math.ceil(Date.now()/1e3),o=t-j;if(o>Math.floor(r/1e3/2))return setTimeout(em,r),console.log("You are not interacted with the website, the request has been blocked!"),!1}e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:m,visibleCommentIds:en()}}).done(function(t){if(!F){if("object"==typeof t){if(t.commentIDsToRemove.forEach(function(t){e("[id^=wpd-comm-"+t+"]").remove()}),t.ids.length){if(c){var o;(o=new FormData).append("action","wpdUpdateAutomatically"),o.append("loadLastCommentId",l),o.append("visibleCommentIds",en()),eg(C,!1,o).done(function(t){!F&&"object"==typeof t&&t.success&&(Z(t),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e(".wpd-thread-info").html(t.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(t.data.wc_all_comments_count_bubble_html),l=t.data.loadLastCommentId)}).fail(function(e,t,o){console.log(o)})}t.ids=t.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var a=5e3;m=parseInt(t.ids[t.ids.length-1]),R=R.concat(t.ids),E&&t.commentText&&(e("#wpd-bubble-author-avatar").html(t.avatar),e("#wpd-bubble-author-name").html(t.authorName),e("#wpd-bubble-comment-date span").html(t.commentDate),e("#wpd-bubble-comment-text").html(t.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",t.commentLink),e("#wpd-bubble-notification-message").show(),a=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=t.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},a),e(".wpd-new-comments-count").text(n),e("#wpd-bubble-count").addClass("wpd-new-comments")}t.all_comments_count=parseInt(t.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(t.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(t.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.all_comments_count))}else console.log(t)}setTimeout(em,r)}).fail(function(e,t,o){console.log(o),setTimeout(em,r)})}if((z&&x||c)&&(o||!o&&p)&&setTimeout(em,r),e(".wpd-inline-form-wrapper").length){var P=new FormData;P.append("action","wpdGetInlineCommentForm"),eg(C,!1,P).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),o=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+o.substring(o.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),eh()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)}).fail(function(e,t,o){console.log(o)})}function ew(t){if(e(t).hasClass("wpd-inline-shortcode"))var o=e(t).attr("id");else var o=e(t).parents(".wpd-inline-shortcode").attr("id");return o.substring(o.lastIndexOf("-")+1)}function ef(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function eu(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),o=t.offset().top-window.pageYOffset;t.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&o>0&&o<300&&("blink"===I?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),eh(t.siblings(".wpd-inline-form-wrapper"))))})}function eh(t){if(t){if(t.offset().left<=10){t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o<3&&(o=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}else if(t.offset().left+t.width()>document.body.clientWidth-10){t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o>t.width()-3&&(o=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function eb(t){var o,a=0;if(t.parents(".wpd_main_comm_form").length)a=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents(".wpd_main_comm_form");else if(t.parents(".wpd-secondary-form-wrapper").length)a=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),o=t.parents(".wpd-secondary-form-wrapper");else if(t.parents("#wpdiscuz-edit-form").length){var n=ee(t);a=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents("#wpdiscuz-edit-form")}if(a&&o){var d=t.val().length,i=e(".wpd-editor-char-counter",o),s=a-d;i.html(s),s<=10?i.addClass("error"):i.removeClass("error")}}function e8(t,o,a,n){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,o,a,n):"function"==typeof window[t.data.callbackFunctions[e]]?window[t.data.callbackFunctions[e]](t,o,a,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function eg(t,o,a){o&&e("#wpdiscuz-loading-bar").show(),a.append("postId",s);var n=a.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](a,t,o))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return console.log(d),e.ajax({type:"POST",url:d,data:a,contentType:!1,processData:!1})}e(document).on("click","body",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){ef();var o="";e(t.target).hasClass("wpd-inline-icon")?o=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(o=e(t.target).parents(".wpd-inline-icon")),o.length&&o.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(o.parents(".wpd-inline-shortcode").addClass("wpd-active"),o.siblings(".wpd-inline-form-wrapper").show(),o.addClass("wpd-open"),o.removeClass("wpd-ignored"),eh(o.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e("body").on("click",".wpd-inline-submit.wpd_not_clicked",function(t){t.preventDefault();var o=e(this),a=e(this).parents(".wpd_inline_comm_form");if(a[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ew(a)),e.each(e("input, textarea",a),function(t,o){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(o).attr("name"),e(o).val()):n.append(e(o).attr("name"),e(o).val())}),eg(C,!0,n).done(function(t){if(o.addClass("wpd_not_clicked"),"object"==typeof t){if(t.success){a[0].reset(),ef();var n=parseInt(t.data.newCount),d=o.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.removeClass("wpd-has-comments"),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e(".wpd-thread-info").html(t.data.allCommentsCountBeforeThreadsHtml),e(".wpd-thread-info").attr("data-comments-count",t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").replaceWith(t.data.allCommentsCountBubbleHtml),t.data.message&&ec(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("keydown",".wpd-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e("body").on("keydown","#wpdiscuz-edit-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e("body").on("keydown",".wpd-inline-comment-content",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-inline-icon-count.wpd-has-comments",function(){var t=e(this),o=new FormData;o.append("action","wpdGetLastInlineComments"),o.append("inline_form_id",ew(t)),eg(C,!0,o).done(function(o){"object"==typeof o?o.success?e(o.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-view-all-inline-comments",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),ei(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-D},1e3,es)}),e("body").on("click",".wpd-feedback-content-link",function(t){t.preventDefault();var o=e(this).data("feedback-content-id");ei(),e("html, body").animate({scrollTop:e("#wpd-inline-"+o).offset().top-(D+6)},1e3,function(){es(),e("#wpd-inline-"+o).addClass("wpd-active")})}),("scroll_open"===I||"blink"===I)&&(eu(),e(window).on("scroll",eu)),e("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",function(){if(parseInt(f)&&!confirm(wpdiscuzAjaxObj.wc_confirm_rate_edit))return!1;var t=new FormData,o=e(this).index();o>=0&&o<5&&(t.append("action","wpdUserRate"),t.append("rating",o+1),eg(C,!0,t).done(function(t){"object"==typeof t?(t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data),"error"),e8(t)):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){t.preventDefault();var o=e(this);let a=e("#wpdiscuz_subscription_button",o);if(o[0].checkValidity()&&(n=o,i=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).val().length?(i=!1,e(".wpdiscuz-recaptcha",n).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&e(".wpdiscuz-recaptcha",n).css("border","none"),i)&&a.hasClass("wpd_not_clicked")){a.removeClass("wpd_not_clicked");var n,i,s=new FormData;s.append("action","wpdAddSubscription"),e("*",o).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),eg(C,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1,a.addClass("wpd_not_clicked")}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wpd-unsubscribe",function(t){t.preventDefault();var o=new FormData;o.append("action","wpdUnsubscribe"),o.append("sid",e(this).data("sid")),o.append("skey",e(this).data("skey")),eg(C,!0,o).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=eg});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
     10var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
    1111/* Colorbox */
    1212!function(t,e,i){var o,n,r,h,a,s,l,c,d,g,f,u,p,m,w,v,y,x,b,T,C,H,k,W,E,I,M,L,R,S,K,P,B,O={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},_="colorbox",j="cbox",D=j+"Element",F=j+"_open",N=j+"_load",z=j+"_complete",A=j+"_cleanup",q=j+"_closed",U=j+"_purge",$=t("<a/>"),G="div",Q=0,J={};function V(i,o,n){var r=e.createElement(i);return o&&(r.id=j+o),n&&(r.style.cssText=n),t(r)}function X(){return i.innerHeight?i.innerHeight:t(i).height()}function Y(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==O[e]&&(this.cache[e]=O[e])),this.cache[e]},this.get=function(t){var e=this.value(t);return"function"==typeof e?e.call(this.el,this):e}}function Z(t){var e=d.length,i=(I+t)%e;return i<0?e+i:i}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():X())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function it(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function ot(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.trigger("focus"))}function nt(t){nt.str!==t&&(n.add(o).removeClass(nt.str).addClass(t),nt.str=t)}function rt(i){t(e).trigger(i),$.triggerHandler(i)}var ht=function(){var t,e,i=j+"Slideshow_",o="click."+j;function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(P.next,C.get("slideshowSpeed")))}function a(){v.html(C.get("slideshowStop")).off(o).one(o,s),$.on(z,h).on(N,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),$.off(z,h).off(N,r),v.html(C.get("slideshowStart")).off(o).one(o,function(){P.next(),a()}),n.removeClass(i+"on").addClass(i+"off")}function l(){t=!1,v.hide(),r(),$.off(z,h).off(N,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||($.off(A,l),l()):C.get("slideshow")&&d[1]&&(t=!0,$.one(A,l),C.get("slideshowAuto")?a():s(),v.show())}}();function at(r){var g,w;if(!S){if(g=t(r).data(_),C=new Y(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t("."+D).filter(function(){return new Y(this,t.data(this,_)).get("rel")===w}),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=R=!0,nt(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),f=V(G,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(f),H=a.height()+c.height()+h.outerHeight(!0)-h.height(),k=s.width()+l.width()+h.outerWidth(!0)-h.width(),W=f.outerHeight(!0),E=f.outerWidth(!0);var v=tt(C.get("initialWidth"),"x"),y=tt(C.get("initialHeight"),"y"),x=C.get("maxWidth"),B=C.get("maxHeight");C.w=Math.max((!1!==x?Math.min(v,tt(x,"x")):v)-E-k,0),C.h=Math.max((!1!==B?Math.min(y,tt(B,"y")):y)-W-H,0),f.css({width:"",height:C.h}),P.position(),rt(F),C.get("onOpen"),T.add(m).hide(),n.trigger("focus"),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",ot,!0),$.one(q,function(){e.removeEventListener("focus",ot,!0)})),C.get("returnFocus")&&$.one(q,function(){t(C.el).trigger("focus")})}var O=parseFloat(C.get("opacity"));o.css({opacity:O==O?O:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?b.html(C.get("close")).appendTo(h):b.appendTo("<div/>"),function(){var e,o,n,r=P.prep,h=++Q;R=!0,M=!1,rt(U),rt(N),C.get("onLoad"),C.h=C.get("height")?tt(C.get("height"),"y")-W-H:C.get("innerHeight")&&tt(C.get("innerHeight"),"y"),C.w=C.get("width")?tt(C.get("width"),"x")-E-k:C.get("innerWidth")&&tt(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=tt(C.get("maxWidth"),"x")-E-k,C.mw=C.w&&C.w<C.mw?C.w:C.mw);C.get("maxHeight")&&(C.mh=tt(C.get("maxHeight"),"y")-W-H,C.mh=C.h&&C.h<C.mh?C.h:C.mh);if(e=C.get("href"),K=setTimeout(function(){p.show()},100),C.get("inline")){var a=t(e).eq(0);n=t("<div>").hide().insertBefore(a),$.one(U,function(){n.replaceWith(a)}),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):et(C,e)?(e=it(C,e),M=C.get("createImg"),t(M).addClass(j+"Photo").on("error."+j,function(){r(V(G,"Error").html(C.get("imgError")))}).one("load",function(){h===Q&&setTimeout(function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).on("click."+j,function(){P.next()})),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)},1)}),M.src=e):e&&u.load(e,C.get("data"),function(e,i){h===Q&&r("error"===i?V(G,"Error").html(C.get("xhrError")):t(this).contents())})}()}}function st(){n||(B=!1,g=t(i),n=V(G).attr({id:_,class:!1===t.support.opacity?j+"IE":"",role:"dialog",tabindex:"-1"}).hide(),o=V(G,"Overlay").hide(),p=t([V(G,"LoadingOverlay")[0],V(G,"LoadingGraphic")[0]]),r=V(G,"Wrapper"),h=V(G,"Content").append(m=V(G,"Title"),w=V(G,"Current"),x=t('<button type="button"/>').attr({id:j+"Previous"}),y=t('<button type="button"/>').attr({id:j+"Next"}),v=t('<button type="button"/>').attr({id:j+"Slideshow"}),p),b=t('<button type="button"/>').attr({id:j+"Close"}),r.append(V(G).append(V(G,"TopLeft"),a=V(G,"TopCenter"),V(G,"TopRight")),V(G,!1,"clear:left").append(s=V(G,"MiddleLeft"),h,l=V(G,"MiddleRight")),V(G,!1,"clear:left").append(V(G,"BottomLeft"),c=V(G,"BottomCenter"),V(G,"BottomRight"))).find("div div").css({float:"left"}),u=V(G,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),T=y.add(x).add(w).add(v)),e.body&&!n.parent().length&&t(e.body).append(o,n.append(r,u))}function lt(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),at(this))}return!!n&&(B||(B=!0,y.on("click",function(){P.next()}),x.on("click",function(){P.prev()}),b.on("click",function(){P.close()}),o.on("click",function(){C.get("overlayClose")&&P.close()}),t(e).on("keydown."+j,function(t){var e=t.keyCode;L&&C.get("escKey")&&27===e&&(t.preventDefault(),P.close()),L&&C.get("arrowKey")&&d[1]&&!t.altKey&&(37===e?(t.preventDefault(),x.trigger("click")):39===e&&(t.preventDefault(),y.trigger("click")))}),"function"==typeof t.fn.on?t(e).on("click."+j,"."+D,i):t("."+D).live("click."+j,i)),!0)}t[_]||(t(st),(P=t.fn[_]=t[_]=function(e,i){var o=this;return e=e||{},"function"==typeof o&&(o=t("<a/>"),e.open=!0),o[0]?(st(),lt()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,_)||{};t.data(this,_,t.extend(i,e))}).addClass(D),new Y(o[0],e).get("open")&&at(o[0])),o):o}).position=function(e,i){var o,d,f,u=0,p=0,m=n.offset();function w(){a[0].style.width=c[0].style.width=h[0].style.width=parseInt(n[0].style.width,10)-k+"px",h[0].style.height=s[0].style.height=l[0].style.height=parseInt(n[0].style.height,10)-H+"px"}if(g.off("resize."+j),n.css({top:-9e4,left:-9e4}),d=g.scrollTop(),f=g.scrollLeft(),C.get("fixed")?(m.top-=d,m.left-=f,n.css({position:"fixed"})):(u=d,p=f,n.css({position:"absolute"})),!1!==C.get("right")?p+=Math.max(g.width()-C.w-E-k-tt(C.get("right"),"x"),0):!1!==C.get("left")?p+=tt(C.get("left"),"x"):p+=Math.round(Math.max(g.width()-C.w-E-k,0)/2),!1!==C.get("bottom")?u+=Math.max(X()-C.h-W-H-tt(C.get("bottom"),"y"),0):!1!==C.get("top")?u+=tt(C.get("top"),"y"):u+=Math.round(Math.max(X()-C.h-W-H,0)/2),n.css({top:m.top,left:m.left,visibility:"visible"}),r[0].style.width=r[0].style.height="9999px",o={width:C.w+E+k,height:C.h+W+H,top:u,left:p},e){var v=0;t.each(o,function(t){o[t]===J[t]||(v=e)}),e=v}J=o,e||n.css(o),n.dequeue().animate(o,{duration:e||0,complete:function(){w(),R=!1,r[0].style.width=C.w+E+k+"px",r[0].style.height=C.h+W+H+"px",C.get("reposition")&&setTimeout(function(){g.on("resize."+j,P.position)},1),"function"==typeof i&&i()},step:w})},P.resize=function(t){var e;L&&((t=t||{}).width&&(C.w=tt(t.width,"x")-E-k),t.innerWidth&&(C.w=tt(t.innerWidth,"x")),f.css({width:C.w}),t.height&&(C.h=tt(t.height,"y")-W-H),t.innerHeight&&(C.h=tt(t.innerHeight,"y")),t.innerHeight||t.height||(e=f.scrollTop(),f.css({height:"auto"}),C.h=f.height()),f.css({height:C.h}),e&&f.scrollTop(e),P.position("none"===C.get("transition")?0:C.get("speed")))},P.prep=function(i){if(L){var o,r="none"===C.get("transition")?0:C.get("speed");f.remove(),(f=V(G,"LoadedContent").append(i)).hide().appendTo(u.show()).css({width:(C.w=C.w||f.width(),C.w=C.mw&&C.mw<C.w?C.mw:C.w,C.w),overflow:C.get("scrolling")?"auto":"hidden"}).css({height:(C.h=C.h||f.height(),C.h=C.mh&&C.mh<C.h?C.mh:C.h,C.h)}).prependTo(h),u.hide(),t(M).css({float:"none"}),nt(C.get("className")),o=function(){var i,o,h=d.length;function a(){!1===t.support.opacity&&n[0].style.removeAttribute("filter")}L&&(o=function(){clearTimeout(K),p.hide(),rt(z),C.get("onComplete")},m.html(C.get("title")).show(),f.show(),h>1?("string"==typeof C.get("current")&&w.html(C.get("current").replace("{current}",I+1).replace("{total}",h)).show(),y[C.get("loop")||I<h-1?"show":"hide"]().html(C.get("next")),x[C.get("loop")||I?"show":"hide"]().html(C.get("previous")),ht(),C.get("preloading")&&t.each([Z(-1),Z(1)],function(){var i=d[this],o=new Y(i,t.data(i,_)),n=o.get("href");n&&et(o,n)&&(n=it(o,n),e.createElement("img").src=n)})):T.hide(),C.get("iframe")?(i=C.get("createIframe"),C.get("scrolling")||(i.scrolling="no"),t(i).attr({src:C.get("href"),class:j+"Iframe"}).one("load",o).appendTo(f),$.one(U,function(){i.src="//about:blank"}),C.get("fastIframe")&&t(i).trigger("load")):o(),"fade"===C.get("transition")?n.fadeTo(r,1,a):a())},"fade"===C.get("transition")?n.fadeTo(r,0,function(){P.position(0,o)}):P.position(r,o)}},P.next=function(){!R&&d[1]&&(C.get("loop")||d[I+1])&&(I=Z(1),at(d[I]))},P.prev=function(){!R&&d[1]&&(C.get("loop")||I)&&(I=Z(-1),at(d[I]))},P.close=function(){L&&!S&&(S=!0,L=!1,rt(A),C.get("onCleanup"),g.off("."+j),o.fadeTo(C.get("fadeOut")||0,0),n.stop().fadeTo(C.get("fadeOut")||0,0,function(){n.hide(),o.hide(),rt(U),f.remove(),setTimeout(function(){S=!1,rt(q),C.get("onClosed")},1)}))},P.remove=function(){n&&(n.stop(),t[_].close(),n.stop(!1,!0).remove(),o.remove(),S=!1,n=null,t("."+D).removeData(_).removeClass(D),t(e).off("click."+j).off("keydown."+j))},P.element=function(){return t(C.el)},P.settings=O)}(jQuery,document,window);
  • wpdiscuz/trunk/assets/js/wpdiscuz.js

    r3442652 r3457051  
    123123    var wpdiscuzLoadCount = 1;
    124124    var userInteractedAt = 0;
    125     let validateNonceForGuest = wpdiscuzAjaxObj.validateNonceForGuest;
    126 
    127     if (validateNonceForGuest && !isUserLoggedIn && !Cookies.get('wpdiscuz_nonce_' + wpdiscuzCookiehash)) {
    128         var data = new FormData();
     125    ;
     126
     127    if () {
     128        data = new FormData();
    129129        data.append('action', 'wpdGetNonce');
    130130        getAjaxObj(isNativeAjaxEnabled, false, data);
  • wpdiscuz/trunk/assets/js/wpdiscuz.min.js

    r3442652 r3457051  
    1 var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;if(wpdiscuzAjaxObj.validateNonceForGuest&&!o&&!Cookies.get("wpdiscuz_nonce_"+$)){var P=new FormData;P.append("action","wpdGetNonce"),eg(C,!1,P)}var H=e("html").css("scroll-behavior"),q=e("body").css("scroll-behavior");function U(e){j=Math.ceil(Date.now()/1e3)}if(k&&(document.addEventListener("mousedown",U),document.addEventListener("mousemove",U),document.addEventListener("touchstart",U),document.addEventListener("scroll",U),document.addEventListener("keydown",U)),e("#wp-admin-bar-wpdiscuz > .ab-item").prepend("<img src='"+wpdiscuzAjaxObj.menu_icon+"' style='width:22px;height:22px;vertical-align:middle;'>"),e(document).on("mouseover","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon_hover)}),e(document).on("mouseleave","#wp-admin-bar-wpdiscuz",function(){e(this).find("> .ab-item img").attr("src",wpdiscuzAjaxObj.menu_icon)}),e(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?e(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .the_champ_login_container").length?e(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .social_connect_form").length?e(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"):e(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&e(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper >  .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(t){var o=e(".wpd-form").not(":hidden");if(o.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var a=0;a<o.length;a++)if("\n"!==wpDiscuzEditor.createEditor(e(o[a]).find(".ql-container").attr("id")).getText()){t.preventDefault(),t.returnValue="";return}}else for(var a=0;a<o.length;a++)if(e(o[a]).find(".wc_comment").val()){t.preventDefault(),t.returnValue="";return}}}),wpdiscuzLoadRichEditor||(e(document).delegate("textarea.wc_comment","input",function(){eb(e(this))}),e.each(e("textarea.wc_comment"),function(){eb(e(this))})),e("body").on("focus","#wpdcom .ql-editor, #wpdcom .wc_comment",function(){e(".wpd-form-foot",e(this).parents(".wpd_comm_form")).slideDown(y)}),e("body").on("focus","#wpdcom textarea",function(){e(this).next(".autogrow-textarea-mirror").length||e(this).autoGrow()}),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),e(".wpd-vote-down.wpd-dislike-hidden").remove(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd"),e("body").on("click","#wpd-editor-source-code-wrapper-bg",function(){e(this).hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),wpdiscuzLoadRichEditor&&e("body").on("click","#wpd-insert-source-code",function(){var t=wpDiscuzEditor.createEditor("#"+e("#wpd-editor-uid").val());t.deleteText(0,t.getLength(),Quill.sources.USER);var o=e("#wpd-editor-source-code").val();o.length&&t.clipboard.dangerouslyPasteHTML(0,o,Quill.sources.USER),t.update(),e("#wpd-editor-source-code-wrapper-bg").hide(),e("#wpd-editor-source-code-wrapper").hide(),e("#wpd-editor-uid").val(""),e("#wpd-editor-source-code").val("")}),e("body").on("click",".wpd-reply-button",function(){var t,i,s,c,r=ee(e(this),0);e(this).hasClass("wpdiscuz-clonned")?(wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+r).focus()},y):setTimeout(function(){e("#wc-textarea-"+r).trigger("focus")},y),e("#wpd-secondary-form-wrapper-"+r).slideToggle(y)):(t=e(this),i=ee(t,0),e("#wpdiscuz_form_anchor-"+i).before((s=i,e("#wpdiscuz_hidden_secondary_form").html().replace(/wpdiscuzuniqueid/g,s))),c=e("#wpd-secondary-form-wrapper-"+i),!o&&N({comment_author:Cookies.get("comment_author_"+$),comment_author_email:Cookies.get("comment_author_email_"+$),comment_author_url:Cookies.get("comment_author_url_"+$)}),wpdiscuzLoadRichEditor?setTimeout(function(){wpDiscuzEditor.createEditor("#wpd-editor-"+i).focus()},y):setTimeout(function(){e("#wc-textarea-"+i).trigger("focus")},y),c.slideToggle(y,function(){t.addClass("wpdiscuz-clonned")})),function t(o){if((a||n)&&"2.0"===d){var i=et(o);setTimeout(function(){if(!L[i])try{L[i]=grecaptcha.render("wpdiscuz-recaptcha-"+o,{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-"+o).val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-"+o).val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3)}}(r)}),e("body").on("click","#wpdcom [data-wpd-clipboard]",function(){var t=e(this).data("wpd-clipboard");e(this).data("wpd-ismention")&&(t="@"+t);var o=e("<input/>");o.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(t),o.trigger("select"),document.execCommand("copy"),o.remove(),wpdiscuzAjaxObj.setCommentMessage(t+"<br/>"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),e("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(e){e.preventDefault()}),e("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked");var o,a,n,d,i=ee(e(this),0),s=e(this),c=e(".fas",s);!s.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&v?(o=i,a=t,n=et(o),d=new FormData,d.append("action","wpdShowReplies"),d.append("commentId",n),eg(C,!0,d).done(function(t){a.addClass("wpd_not_clicked"),"object"==typeof t&&t.success&&(e("#wpd-comm-"+o).replaceWith(t.data.comment_list),e("#wpd-comm-"+o+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),e("#wpd-comm-"+o+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),e("#wpd-comm-"+o+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})):e("#wpd-comm-"+i+"> .wpd-reply").slideToggle(700,function(){e(this).is(":hidden")?(c.removeClass("fa-chevron-up"),c.addClass("fa-chevron-down"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(c.removeClass("fa-chevron-down"),c.addClass("fa-chevron-up"),s.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),s.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),t.addClass("wpd_not_clicked")})}),e("body").on("mouseenter",".wpd-new-loaded-comment",function(){e(this).removeClass("wpd-new-loaded-comment")}),e("body").on("click",".wpd-sbs-toggle",function(){e(".wpdiscuz-subscribe-bar").slideToggle(y)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!o&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&e("#wpdiscuz-subscribe-form").length&&("2.0"===d?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){e("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(t){console.log(t),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+t.message,"error")}},1e3),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){e("#wpdiscuz-recaptcha-field-subscribe-form").val()?e(".wpdiscuz-recaptcha",e(this)).css("border","none"):(e(".wpdiscuz-recaptcha",e(this)).css("border","1px solid red"),ed(e(this),""),t.preventDefault())})):"3.0"===d&&e("body").on("click","#wpdiscuz_subscription_button",function(t){var o=e(this).parents("#wpdiscuz-subscribe-form");ed(o,""),t.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(e){document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=e,o.trigger("submit")},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}})),(a||n)&&"2.0"===d){var A=e(window).width(),W=e("#wpdcom").width();W>=1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),W>=940&&W<1100&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),W>=810&&W<940&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),W>=730&&W<810&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),W>=610&&W<730&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),A>650&&(W>=510&&W<610&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W>=470&&W<510&&(e("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),e("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),W<470&&(e("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),e("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),e("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),e("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function B(t,o,a){e(document.body).trigger("wpdiscuz_before_comment_post",o,a),eg(C,!1,o).done(function(n){if(e(a).addClass("wpd_not_clicked"),"object"==typeof n){if(n.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&e(".wpd-form-foot",t).slideUp(y),n.data.wc_all_comments_count_new=parseInt(n.data.wc_all_comments_count_new),e(".wpd-thread-info").html(n.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",n.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(n.data.wc_all_comments_count_bubble_html);var d,i,s,c,r=y;n.data.is_main?ec(n.data.message):(r=y+700,e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).slideToggle(700),1==n.data.is_in_same_container?e("#wpd-secondary-form-wrapper-"+n.data.uniqueid).after(n.data.message):e("#wpd-comm-"+n.data.uniqueid).after(n.data.message)),function e(t){if(!t.data.held_moderate){var o=new FormData;o.append("action","wpdCheckNotificationType"),o.append("comment_id",t.data.new_comment_id),o.append("email",t.data.comment_author_email),o.append("isParent",t.data.is_main),eg(C,!0,o)}}(n),function e(t){if(t.data.redirect>0&&t.data.new_comment_id){var o=new FormData;o.append("action","wpdRedirect"),o.append("commentId",t.data.new_comment_id),eg(C,!0,o).done(function(e){"object"==typeof e&&e.success&&setTimeout(function(){location.href=e.data},2e3)}).fail(function(e,t,o){console.log(o)})}}(n),b&&g?(d=n.data,i=d.comment_author_email,s=d.comment_author,c=d.comment_author_url,null==h?(Cookies.set("comment_author_email_"+$,i),Cookies.set("comment_author_"+$,s),c.length&&Cookies.set("comment_author_url_"+$,c)):(h=parseInt(h),Cookies.set("comment_author_email_"+$,i,{expires:h,path:"/"}),Cookies.set("comment_author_"+$,s,{expires:h,path:"/"}),c.length&&Cookies.set("comment_author_url_"+$,c,{expires:h,path:"/"})),e(".wpd-cookies-checkbox").length&&e(".wpd-cookies-checkbox").prop("checked",!0)):g||e(".wpd-cookies-checkbox").prop("checked",!1),t.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+e(".wpdiscuz_unique_id",t).val()).setContents([{insert:"\n"}]):eb(t.find(".wc_comment")),N(n.data),e(".wmu-preview-wrap",t).remove(),M.length&&(M.forEach(function(e){e.parents(".wpd-field-checkbox").remove()}),M=[]),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+n.data.new_comment_id).offset().top-D},1e3,es)},r),e8(n,t),e(document.body).trigger("wpdiscuz_comment_posted",[t,o,a,n.data])}else n.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,t))}else wpdiscuzAjaxObj.setCommentMessage(n,"error");e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,n){console.log(n),e(a).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}function N(t){e(".wpd_comm_form .wc_name").val(t.comment_author),t.comment_author_email&&0>t.comment_author_email.indexOf("@example.com")&&e(".wpd_comm_form .wc_email").val(t.comment_author_email),t.comment_author_url&&e(".wpd_comm_form .wc_website").val(t.comment_author_url)}function V(t,o){e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),e("#wpd-comm-"+t+" .wpdiscuz-edit-form-wrap").replaceWith(o),e("#wpd-comm-"+t+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}e("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var t,i,s,c,r,p=e(this),l=1,m=e(this).parents("form");if("true"===m.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",m),"warning");return}if(m.hasClass("wpd_main_comm_form")||(l=(t=e(this).parents(".wpd-comment"),i=t.attr("class").split(" "),s="",e.each(i,function(e,t){"wpd_comment_level"===eo(t,!1)&&(s=eo(t,!0))}),parseInt(s)+1)),e(document.body).trigger("wpdiscuz_new_comment",[p,m,l]),ed(m,"#wpd-editor-"+e(".wpdiscuz_unique_id",m).val()),m.on("submit",function(e){e.preventDefault()}),m[0].checkValidity()&&(c=m,r=!0,"2.0"===d&&e("input[name=wc_captcha]",c).length&&!e("input[name=wc_captcha]",c).val().length?(r=!1,e(".wpdiscuz-recaptcha",c).css("border","1px solid red")):"2.0"===d&&e("input[name=wc_captcha]",c).length&&e(".wpdiscuz-recaptcha",c).css("border","none"),r)){F=!0,function t(o){e(".wpd-agreement-checkbox",o).each(function(){e(this).hasClass("wpd_agreement_hide")&&b&&e(this).prop("checked")&&(Cookies.set(e(this).attr("name")+"_"+$,1,{expires:30,path:"/"}),e("input[name="+e(this).attr("name")+"]").each(function(){M.push(e(this))}))})}(m),e(p).removeClass("wpd_not_clicked");let w=new FormData;w.append("action","wpdAddComment");let f=e(":input",m),u=0;if(f.each(function(){let t=this;if(""!==t.name){if("file"==t.type){let o=t.files;e.each(o,function(e,o){w.append(t.name+"["+e+"]",o),u+=o.size})}else"checkbox"!=t.type&&"radio"!=t.type?w.append(t.name+"",e(t).val().trim()):("checkbox"==t.type||"radio"==t.type)&&e(t).is(":checked")&&w.append(t.name+"",e(t).val())}}),u>parseInt(wpdiscuzAjaxObj.wmuMaxFileSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseMaxFileSize,"wmuPhraseMaxFileSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(u>parseInt(wpdiscuzAjaxObj.wmuPostMaxSize,10))return wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhrasePostMaxSize,"wmuPhrasePostMaxSize",m),"error",3e3),e(p).addClass("wpd_not_clicked"),!1;if(w.append("wpd_comment_depth",l),wpdiscuzAjaxObj.wpdiscuz_zs&&w.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),e(".wpd-cookies-checkbox",m).length?e(".wpd-cookies-checkbox",m).prop("checked")||(g=!1):o&&(g=!1),e("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===d&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(e){w.append("g-recaptcha-response",e),B(m,w,p)},function(e){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(e)})})}catch(h){console.log(h),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+h.message,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}else B(m,w,p)}(function e(t){if((a||n)&&"2.0"===d){var o=et(t);grecaptcha.reset(L[o])}})(e(".wpdiscuz_unique_id",m).val()),e(".wpdiscuz_reset").val("")}),e(document.body).on("wpdiscuz_comment_posted",function(t,o,a,n,d){let i=e(".wpd-thread-filter");void 0===d||isNaN(d.wc_all_comments_count_new)||void 0===d.wc_all_comments_count_new||!d.wc_all_comments_count_new?i.find(".wpd-filter").addClass("wpdiscuz-hidden"):i.find(".wpd-filter").removeClass("wpdiscuz-hidden")}),e("body").on("click",".wpd_editable_comment",function(){t&&e(".wpdiscuz-edit-form-wrap").length&&V(ee(e(".wpdiscuz-edit-form-wrap"),0),t);var o=e(this),a=ee(o,0),n=et(a),d=new FormData;d.append("action","wpdEditComment"),d.append("commentId",n),t=e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-text").get(0),eg(C,!0,d).done(function(t){if("object"==typeof t){if(t.success){if(e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(t.data.html),wpdiscuzLoadRichEditor){var n=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+a);n.clipboard.dangerouslyPasteHTML(0,t.data.content),n.update(),e(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else e("#wc-textarea-edit_"+a).val(t.data.content),eb(e("#wc-textarea-edit_"+a));e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),e("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else console.log(t);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wc_save_edited_comment",function(){var t=e(this),o=ee(t),a=et(o),n=e("#wpd-comm-"+o+" #wpdiscuz-edit-form");if(ed(n,"#wpd-editor-edit_"+o),n.on("submit",function(e){e.preventDefault()}),n[0].checkValidity()){var d=new FormData;d.append("action","wpdSaveEditedComment"),d.append("commentId",a),e(":input",n).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&d.append(this.name+"",e(this).val()),("checkbox"===this.type||"radio"===this.type)&&e(this).is(":checked")&&d.append(this.name+"",e(this).val())}),eg(C,!0,d).done(function(n){"object"==typeof n?(n.success?(V(o,n.data.message),n.data.comment_approved_html&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-subheader").append(n.data.comment_approved_html),n.data.lastEdited&&(e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),e(n.data.lastEdited).insertAfter("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),n.data.twitterShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",n.data.twitterShareLink),n.data.whatsappShareLink&&e("#wpd-comm-"+o+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",n.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[n.data],n.data,t),"error"),e8(n,a)):wpdiscuzAjaxObj.setCommentMessage(n,"error"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wc_cancel_edit",function(){var o=ee(e(this));V(o,t),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+o)}),!u&&w&&(S=0,1==w?setTimeout(function(){Y(!0)},500):e("body").on("click",".wpd-load-comments",function(){e(this).parent(".wpd-load-more-submit-wrap").remove(),Y(!0)})),e("body").on("click",".wpd-load-more-submit",function(){var t=e(this),o="wpd-loaded";t.hasClass(o)&&Y(!1,t,o,"wpd-loading")});var K=!1;function G(){var t=document.getElementById("wpdiscuzHasMoreComments"),o=0;t&&(o=t.dataset.is_show_load_more);var a=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,n=e(window).height()+e(window).scrollTop();a&&n&&100*n/a>=80&&!1===K&&1==o&&(K=!0,Y(!1,e(".wpd-load-more-submit")))}function Y(t,o,a,n){o&&(o.toggleClass(a),o.toggleClass(n));var d=new FormData;d.append("action","wpdLoadMoreComments");var s=e(".wpdiscuz-sort-button-active").attr("data-sorting");s&&d.append("sorting",s),d.append("offset",S),d.append("lastParentId",e(".wpd-load-more-submit").attr("data-lastparentid")),d.append("isFirstLoad",t?1:0);var c=e(".wpdf-active").attr("data-filter-type");d.append("wpdType",c||""),eg(C,!t||1!=w,d).done(function(d){"object"==typeof d&&d.success&&(S++,t&&e(".wpd-comment").remove(),e(".wpdiscuz_single").remove(),e(".wpdiscuz-comment-pagination").before(d.data.comment_list),X(d,t&&2!==i),K=!1,d.data.loadLastCommentId&&(l=d.data.loadLastCommentId),e8(d),t&&J(!1)),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))}).fail(function(t,d,i){console.log(i),e("#wpdiscuz-loading-bar").fadeOut(250),e(".wpd-load-more-submit").blur(),o&&(o.toggleClass(a),o.toggleClass(n))})}function X(t,o){var a,n=document.getElementById("wpdiscuzHasMoreComments");if(!1==t.data.is_show_load_more)n&&(n.dataset.is_show_load_more=0),e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else{if(a=t.data.last_parent_id,e(".wpd-load-more-submit").attr("data-lastparentid",a),2!==i&&e(".wpdiscuz-comment-pagination").show(),n&&(n.dataset.is_show_load_more=1),o&&e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),t.data.comments_left>0){if(!e(".wpd-load-more-submit .wpd-comments-left").length){let d=e("<span>");d.addClass("wpd-comments-left"),e(".wpd-load-more-submit").append(d)}e(".wpd-load-more-submit .wpd-comments-left").text(t.data.comments_left_text)}}e8(t)}function J(t){var o=location.href.match(/#comment\-(\d+)/);if(null!==o){var a=o[1];if(e("#comment-"+a).length)setTimeout(function(){ei(),e("html, body").animate({scrollTop:e("#comment-"+a).parents("[id^=wpd-comm-]").offset().top-D},1e3,es),t&&Q(a)},500);else{var n=new FormData;n.append("action","wpdGetSingleComment"),n.append("commentId",a),eg(C,!0,n).done(function(o){"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+a).offset().top-D},1e3,es),t&&Q(a)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}}function Q(t){setTimeout(function(){e("#comment-"+t).siblings(".wpd-secondary-form-wrapper").is(":visible")||e("#comment-"+t).find(".wpd-reply-button").trigger("click")},1100)}function Z(e){if(void 0!==e.data.message)for(var t,o=e.data.message,a=0;a<o.length;a++)ea((t=o[a]).comment_parent,t.comment_html)}function ee(e,t){var o="";return(o=t?e.parents(".wpd-main-form-wrapper").attr("id"):e.parents(".wpd-comment").attr("id")).substring(o.lastIndexOf("-")+1)}function et(e){return e.substring(0,e.indexOf("_"))}function eo(e,t){var o="";return t?e.substring(e.indexOf("-")+1):e.substring(0,e.indexOf("-"))}function ea(t,o){if(0==t)ec(o);else{var a=ee(e("#comment-"+t),0);e("#wpdiscuz_form_anchor-"+a).after(o)}}function en(){var t=[];return e(".wpd-comment-right").each(function(){t.push(et(ee(e(this),0)))}),t.join(",")}function ed(t,o){var a=t.find(".wpd-required-group");wpdiscuzLoadRichEditor&&t.find(".wc_comment").val(e(o+">.ql-editor").html()),function e(t){if("wpdiscuz-subscribe-form"!=t.attr("id")){var o=t.find(".wc_comment"),a=o.val().trim().replace(/<p><br><\/p>/g,"\n").replace(/<p>(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/<img src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img[^>]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/<img\s+([^>]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/<img\s+([^>]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),o.val(a)}}(t),e.each(a,function(){e("input",this).prop("required",!1),0===e("input:checked",this).length?e("input",e(this)).prop("required",!0):e(".wpd-field-invalid",this).remove()})}function ei(){e("html, body").css("scroll-behavior","unset")}function es(){e("html").css("scroll-behavior",H),e("body").css("scroll-behavior",q)}function ec(t){e(".wpd-sticky-comment").last()[0]?e(t).insertAfter(e(".wpd-sticky-comment").last()[0]):e(".wpd-thread-list").prepend(t)}function er(t){t?t.prop("required")||(t.val()?t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):t.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):e.each(e(".wc_email"),function(t,o){var a=e(o);a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==i||u||(e(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),G(),e(window).scroll(function(){G()})),wpdiscuzAjaxObj.setLoadMoreVisibility=X,e("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var t,o=e(this);e(o).removeClass("wpd_not_clicked");var a=ee(o),n=et(a);t=e(this).hasClass("wpd-vote-up")?1:-1;var d=new FormData;d.append("action","wpdVoteOnComment"),d.append("commentId",n),d.append("voteType",t),eg(C,!0,d).done(function(a){if(e(o).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){if("total"===a.data.buttonsStyle){var d=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result"),i=a.data.votes;d.text(a.data.votesHumanReadable),d.attr("title",i),d.removeClass("wpd-up wpd-down"),i>0&&d.addClass("wpd-up"),i<0&&d.addClass("wpd-down")}else{var s=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-like"),c=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-result-dislike");s.text(a.data.likeCountHumanReadable),s.attr("title",a.data.likeCount),c.text(a.data.dislikeCountHumanReadable),c.attr("title",a.data.dislikeCount),parseInt(a.data.likeCount)>0?s.addClass("wpd-up"):s.removeClass("wpd-up"),0>parseInt(a.data.dislikeCount)?c.addClass("wpd-down"):c.removeClass("wpd-down")}var r=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-up"),p=e("#comment-"+n+" .wpd-comment-footer .wpd-vote-down");r.removeClass("wpd-up"),p.removeClass("wpd-down"),a.data.curUserReaction>0?r.addClass("wpd-up"):a.data.curUserReaction<0&&p.addClass("wpd-down")}else a.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,o),"error");e8(a,n,t)}else console.log(a);e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,a,n){console.log(n),e(o).addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e(document).on("click","body",function(t){var o=e(".wpdiscuz-sort-buttons");e(t.target).hasClass("wpdf-sorting")||e(t.target).parent().hasClass("wpdf-sorting")?o.css({display:o.is(":visible")?"none":"flex"}):o.hide()}),e("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",function(){var t=e(this),o=e(this).attr("data-sorting");if(o){e(".wpd-load-comments").parents(".wpd-load-more-submit-wrap").remove(),e(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),t.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var a=new FormData;a.append("action","wpdSorting"),a.append("sorting",o);var n=e(".wpdf-active").attr("data-filter-type");a.append("wpdType",n||""),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&(e("#wpdcom .wpd-comment").remove(),e("#wpdcom .wpd-thread-list").prepend(t.data.message),X(t,!1),S=1),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){J(!1)},1!=w&&J(!1),e("body").on("click",".wpdiscuz-readmore",function(){var t=ee(e(this)),o=et(t),a=new FormData;a.append("action","wpdReadMore"),a.append("commentId",o),eg(C,!0,a).done(function(a){"object"==typeof a?(a.success?(e("#comment-"+o+" .wpd-comment-text").replaceWith(" "+a.data.message),e("#wpdiscuz-readmore-"+t).remove()):console.log(a.data),e8(a)):console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("change",".wpd-required-group",function(){0!==e("input:checked",this).length?e("input",e(this)).prop("required",!1):e("input",e(this)).prop("required",!0)}),e("body").on("click",".wpdiscuz-spoiler",function(){e(this).next().slideToggle(),e(this).hasClass("wpdiscuz-spoiler-closed")?e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):e(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),e(this).toggleClass("wpdiscuz-spoiler-closed")}),e("body").on("click",".wpd-tools",function(){var t=e(".wpd-tools-actions",e(this));t.is(":visible")||e(this).parents(".wpd-comment-right").attr("id")!==e("[id^=comment-]","#wpdcom").last().attr("id")||e("#comments").css({paddingBottom:"160px"}),t.css({display:t.is(":visible")?"none":"flex"})}),e("body").on("mouseleave",".wpd-comment-right",function(){e(this).find(".wpd-tools-actions").hide(),e("#comments").css({paddingBottom:"0"})}),e("body").on("click",".wpd_stick_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd_close_btn",function(){var t=ee(e(this),0),o=et(t),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",o),eg(C,!0,a).done(function(t){"object"==typeof t&&t.success&&location.reload(!0),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",function(){var t=e(this),o=t.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+o),t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdLoadMoreComments");var n=e(".wpdiscuz-sort-button-active").attr("data-sorting");n&&a.append("sorting",n),a.append("lastParentId",0),a.append("offset",0),S=1,a.append("wpdType",t.hasClass("wpdf-active")?"":o),a.append("isFirstLoad",1),e(this).hasClass("wpdf-inline")?e(this).hasClass("wpdf-active")?e(".wpd-comment-info-bar").hide():e(".wpd-comment-info-bar").css("display","flex"):e(".wpd-comment-info-bar").hide(),eg(C,!1,a).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(t.toggleClass("wpdf-active"),e(".wpd-load-comments").remove(),e(".wpd-comment").remove(),e(".wpd-thread-list").prepend(o.data.comment_list),X(o),l=o.data.loadLastCommentId,e(".wpd-load-more-submit").blur(),e8(o)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpdf-reacted.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdMostReactedComment"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.parentCommentID).length?e("#comment-"+o.data.parentCommentID).parents("[id^=wpd-comm-"+o.data.parentCommentID+"]").replaceWith(o.data.message):e("#comment-"+o.data.commentId).length||e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpdf-hottest.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=new FormData;o.append("action","wpdHottestThread"),eg(C,!1,o).done(function(o){t.addClass("wpd_not_clicked"),e(".fas",t).removeClass("fa-pulse fa-spinner"),"object"==typeof o&&o.success&&(e("#comment-"+o.data.commentId).length?e("#comment-"+o.data.commentId).parents("[id^=wpd-comm-"+o.data.commentId+"]").replaceWith(o.data.message):e(".wpd-thread-list").prepend(o.data.message),e8(o),ei(),e("html, body").animate({scrollTop:e("#comment-"+o.data.commentId).offset().top-D},1e3,es))}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner")})}),e("body").on("click",".wpd-filter-view-all",function(){e(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-follow-link.wpd_not_clicked",function(){var t=e(this);t.removeClass("wpd_not_clicked"),e(".fas",t).addClass("fa-pulse fa-spinner");var o=ee(t,0),a=et(o),n=new FormData;n.append("action","wpdFollowUser"),n.append("commentId",a),eg(C,!0,n).done(function(o){t.addClass("wpd_not_clicked"),"object"==typeof o?o.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data.code],o.data.code,t),"success"),t.removeClass("wpd-follow-active"),o.data.followTip&&t.attr("wpd-tooltip",o.data.followTip),o.data.followClass&&t.addClass(o.data.followClass),e8(o)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(o,a,n){console.log(n),e(".fas",t).removeClass("fa-pulse fa-spinner"),e("#wpdiscuz-loading-bar").fadeOut(250)})}),er(),e("body").on("keyup",".wc_email",function(){er(e(this))}),z&&e("#wpdcom").length){if(e("#wpd-bubble-wrapper").hover(function(){e(this).addClass("wpd-bubble-hover")},function(){e(this).removeClass("wpd-bubble-hover")}),_&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){e("#wpd-bubble-wrapper").addClass("wpd-bubble-hover");let t=wpdiscuzAjaxObj.bubbleHintShowOnce?"/":location.href;wpdiscuzAjaxObj.bubbleHintCookieExpires&&parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:parseInt(wpdiscuzAjaxObj.bubbleHintCookieExpires,10),path:t}),setTimeout(function(){e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*O)},1e3*_),"content_left"===T){if(e(".entry-content").length){var ep=Math.min(e(".entry-content").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".post-entry").length){var ep=Math.min(e(".post-entry").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if(e(".container").length){var ep=Math.min(e(".container").offset().left,e("#wpdcom").offset().left)-120,el=ep>25?ep:25;e("#wpd-bubble-wrapper").css({left:el+"px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-content")}else e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===T?(e("#wpd-bubble-wrapper").css({left:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===T&&(e("#wpd-bubble-wrapper").css({right:"25px"}),e("#wpd-bubble-wrapper").addClass("wpd-right-corner"));e("#wpd-bubble-wrapper").show(),e("body").on("click","#wpd-bubble-add-message-close",function(t){t.preventDefault(),t.stopPropagation(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),e("body").on("click","#wpd-bubble",function(){ei(),e("#tab-title-reviews").length&&e("#tab-title-reviews a").trigger("click"),e("html, body").animate({scrollTop:e("#wpdcom").offset().top-(D+28)},1e3,function(){es(),e("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?e("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():e("#wc-textarea-0_0").length&&e("#wc-textarea-0_0").trigger("focus")})}),e("body").on("click","#wpd-bubble-comment-close",function(t){t.preventDefault(),e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),e("body").on("click","#wpd-bubble-comment-reply-link a",function(){var t=e(this).attr("href");setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),J(!0);var o=t.match(/#comment\-(\d+)/);R=R.filter(function(e){return e!=o[1]}),e("#wpd-bubble-count .wpd-new-comments-count").text(R.length),0==R.length&&e("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),e("body").on("click","#wpd-bubble-count",function(){if(R.length){var t=new FormData;t.append("action","wpdBubbleUpdate"),t.append("newCommentIds",R.join()),eg(C,!0,t).done(function(t){"object"==typeof t&&t.success&&(t.data.message=t.data.message.filter(function(t){if(!e("#comment-"+t.comment_id).length)return t}),Z(t),e("#wpd-bubble-count").removeClass("wpd-new-comments"),e("#wpd-bubble-count .wpd-new-comments-count").text("0"),R=[],e(".wpd-new-loaded-comment").length&&(ei(),e("html, body").animate({scrollTop:e(e(".wpd-new-loaded-comment")[0]).offset().top-(D+28)},1e3,es)),e8(t)),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(e,t,o){console.log(o)})}})}function em(){if(k){let t=Math.ceil(Date.now()/1e3),o=t-j;if(o>Math.floor(r/1e3/2))return setTimeout(em,r),console.log("You are not interacted with the website, the request has been blocked!"),!1}e.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:s,lastId:m,visibleCommentIds:en()}}).done(function(t){if(!F){if("object"==typeof t){if(t.commentIDsToRemove.forEach(function(t){e("[id^=wpd-comm-"+t+"]").remove()}),t.ids.length){if(c){var o;(o=new FormData).append("action","wpdUpdateAutomatically"),o.append("loadLastCommentId",l),o.append("visibleCommentIds",en()),eg(C,!1,o).done(function(t){!F&&"object"==typeof t&&t.success&&(Z(t),t.data.wc_all_comments_count_new=parseInt(t.data.wc_all_comments_count_new),e(".wpd-thread-info").html(t.data.wc_all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.data.wc_all_comments_count_new),e("#wpd-bubble-all-comments-count").replaceWith(t.data.wc_all_comments_count_bubble_html),l=t.data.loadLastCommentId)}).fail(function(e,t,o){console.log(o)})}t.ids=t.ids.filter(function(t){if(!e("#comment-"+t).length)return t});var a=5e3;m=parseInt(t.ids[t.ids.length-1]),R=R.concat(t.ids),E&&t.commentText&&(e("#wpd-bubble-author-avatar").html(t.avatar),e("#wpd-bubble-author-name").html(t.authorName),e("#wpd-bubble-comment-date span").html(t.commentDate),e("#wpd-bubble-comment-text").html(t.commentText),e("#wpd-bubble-comment-reply-link a").attr("href",t.commentLink),e("#wpd-bubble-notification-message").show(),a=1e4);var n=parseInt(e(".wpd-new-comments-count").text());n+=t.ids.length,e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),e("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){e("#wpd-bubble-notification-message").hide(),e("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},a),e(".wpd-new-comments-count").text(n),e("#wpd-bubble-count").addClass("wpd-new-comments")}t.all_comments_count=parseInt(t.all_comments_count),e("#wpd-bubble-all-comments-count").replaceWith(t.all_comments_count_bubble_html),e(".wpd-reviews-tab").length||(e(".wpd-thread-info").html(t.all_comments_count_before_threads_html),e(".wpd-thread-info").attr("data-comments-count",t.all_comments_count))}else console.log(t)}setTimeout(em,r)}).fail(function(e,t,o){console.log(o),setTimeout(em,r)})}if((z&&x||c)&&(o||!o&&p)&&setTimeout(em,r),e(".wpd-inline-form-wrapper").length){var P=new FormData;P.append("action","wpdGetInlineCommentForm"),eg(C,!1,P).done(function(t){"object"==typeof t?t.success?(e(".wpd-inline-form-wrapper").append(t.data),e.each(e("[name=_wpd_inline_nonce]"),function(){var t=e(this).attr("id"),o=e(this).parents(".wpd-inline-shortcode").attr("id");e(this).attr("id",t+"-"+o.substring(o.lastIndexOf("-")+1))}),e(".wpd-inline-opened").addClass("wpd-active"),e(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),e(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),e(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),eh()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data]),t.data,"error"):console.log(t)}).fail(function(e,t,o){console.log(o)})}function ew(t){if(e(t).hasClass("wpd-inline-shortcode"))var o=e(t).attr("id");else var o=e(t).parents(".wpd-inline-shortcode").attr("id");return o.substring(o.lastIndexOf("-")+1)}function ef(){e(".wpd-inline-form-wrapper").hide(),e(".wpd-inline-shortcode").removeClass("wpd-active"),e(".wpd-inline-icon").removeClass("wpd-open")}function eu(){e.each(e(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var t=e(this),o=t.offset().top-window.pageYOffset;t.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&o>0&&o<300&&("blink"===I?(t.addClass("wpd-blink"),setTimeout(function(){t.removeClass("wpd-blink")},3e3)):(t.parents(".wpd-inline-shortcode").addClass("wpd-active"),t.siblings(".wpd-inline-form-wrapper").show(),t.addClass("wpd-open"),eh(t.siblings(".wpd-inline-form-wrapper"))))})}function eh(t){if(t){if(t.offset().left<=10){t.css("left",Math.ceil(parseInt(t.css("left"))-t.offset().left+10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o<3&&(o=3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}else if(t.offset().left+t.width()>document.body.clientWidth-10){t.css("left",Math.ceil(parseInt(t.css("left"))+(document.body.clientWidth-(t.offset().left+t.width()))-10));var o=Math.ceil(t.siblings(".wpd-inline-icon.wpd-open").offset().left-t.offset().left+2);o>t.width()-3&&(o=t.width()-3),document.styleSheets[0].addRule("#"+t.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+o+"px;")}}else e.each(e(".wpd-inline-form-wrapper:visible"),function(){if(e(this).offset().left<=10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))-e(this).offset().left+10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t<3&&(t=3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}else if(e(this).offset().left+e(this).width()>document.body.clientWidth-10){e(this).css("left",Math.ceil(parseInt(e(this).css("left"))+(document.body.clientWidth-(e(this).offset().left+e(this).width()))-10));var t=Math.ceil(e(this).siblings(".wpd-inline-icon.wpd-open").offset().left-e(this).offset().left+2);t>e(this).width()-3&&(t=e(this).width()-3),document.styleSheets[0].addRule("#"+e(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+t+"px;")}})}function eb(t){var o,a=0;if(t.parents(".wpd_main_comm_form").length)a=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents(".wpd_main_comm_form");else if(t.parents(".wpd-secondary-form-wrapper").length)a=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),o=t.parents(".wpd-secondary-form-wrapper");else if(t.parents("#wpdiscuz-edit-form").length){var n=ee(t);a=parseInt(n.substring(n.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),o=t.parents("#wpdiscuz-edit-form")}if(a&&o){var d=t.val().length,i=e(".wpd-editor-char-counter",o),s=a-d;i.html(s),s<=10?i.addClass("error"):i.removeClass("error")}}function e8(t,o,a,n){t.data.callbackFunctions&&e.each(t.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[t.data.callbackFunctions[e]]?wpdiscuzAjaxObj[t.data.callbackFunctions[e]](t,o,a,n):"function"==typeof window[t.data.callbackFunctions[e]]?window[t.data.callbackFunctions[e]](t,o,a,n):console.log(t.data.callbackFunctions[e]+" is not a function")})}function eg(t,o,a){o&&e("#wpdiscuz-loading-bar").show(),a.append("postId",s);var n=a.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[n]&&e.each(wpdiscuzAjaxObj.dataFilterCallbacks[n],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[n][e]](a,t,o))});var d=t?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return console.log(d),e.ajax({type:"POST",url:d,data:a,contentType:!1,processData:!1})}e(document).on("click","body",function(t){if(e(t.target).hasClass("wpd-inline-form-close")||e(t.target).parents(".wpd-inline-form-close").length)t.preventDefault(),e(t.target).parents(".wpd-inline-form-wrapper").hide(),e(t.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),e(t.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!e(t.target).hasClass("wpd-inline-form-wrapper")&&!e(t.target).parents(".wpd-inline-form-wrapper").length){ef();var o="";e(t.target).hasClass("wpd-inline-icon")?o=e(t.target):e(t.target).parents(".wpd-inline-icon").length&&(o=e(t.target).parents(".wpd-inline-icon")),o.length&&o.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(o.parents(".wpd-inline-shortcode").addClass("wpd-active"),o.siblings(".wpd-inline-form-wrapper").show(),o.addClass("wpd-open"),o.removeClass("wpd-ignored"),eh(o.siblings(".wpd-inline-form-wrapper")))}(!e(t.target).hasClass("wpd-last-inline-comments-wrapper")&&!e(t.target).parents(".wpd-last-inline-comments-wrapper").length||e(t.target).parents(".wpd-last-inline-comments-wrapper").length&&e(t.target).hasClass("wpd-load-inline-comment"))&&e(".wpd-last-inline-comments-wrapper").remove()}),e("body").on("click",".wpd-inline-submit.wpd_not_clicked",function(t){t.preventDefault();var o=e(this),a=e(this).parents(".wpd_inline_comm_form");if(a[0].checkValidity()){e(this).removeClass("wpd_not_clicked");var n=new FormData;n.append("action","wpdAddInlineComment"),n.append("inline_form_id",ew(a)),e.each(e("input, textarea",a),function(t,o){"checkbox"===this.type?e(this).is(":checked")&&n.append(e(o).attr("name"),e(o).val()):n.append(e(o).attr("name"),e(o).val())}),eg(C,!0,n).done(function(t){if(o.addClass("wpd_not_clicked"),"object"==typeof t){if(t.success){a[0].reset(),ef();var n=parseInt(t.data.newCount),d=o.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");d.text(n),n?d.addClass("wpd-has-comments"):d.removeClass("wpd-has-comments"),t.data.allCommentsCountNew=parseInt(t.data.allCommentsCountNew),e(".wpd-thread-info").html(t.data.allCommentsCountBeforeThreadsHtml),e(".wpd-thread-info").attr("data-comments-count",t.data.allCommentsCountNew),e("#wpd-bubble-all-comments-count").replaceWith(t.data.allCommentsCountBubbleHtml),t.data.message&&ec(t.data.message),wpdiscuzAjaxObj.setCommentMessage(t.data.notification,"success")}else t.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data,o),"error")}else wpdiscuzAjaxObj.setCommentMessage(t,"error");e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("keydown",".wpd-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_comm_submit").trigger("click")}),e("body").on("keydown","#wpdiscuz-edit-form",function(t){t.ctrlKey&&13==t.keyCode&&e(this).find(".wc_save_edited_comment").trigger("click")}),e("body").on("keydown",".wpd-inline-comment-content",function(t){t.ctrlKey&&13==t.keyCode&&e(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),e("body").on("click",".wpd-inline-icon-count.wpd-has-comments",function(){var t=e(this),o=new FormData;o.append("action","wpdGetLastInlineComments"),o.append("inline_form_id",ew(t)),eg(C,!0,o).done(function(o){"object"==typeof o?o.success?e(o.data).insertAfter(t):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[o.data],o.data,t),"error"):console.log(o),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),e("body").on("click",".wpd-view-all-inline-comments",function(t){t.preventDefault(),e(this).parents(".wpd-last-inline-comments-wrapper").remove(),e(".wpdf-inline").hasClass("wpdf-active")||e(".wpdf-inline").trigger("click"),ei(),e("html, body").animate({scrollTop:e(".wpdf-inline").offset().top-D},1e3,es)}),e("body").on("click",".wpd-feedback-content-link",function(t){t.preventDefault();var o=e(this).data("feedback-content-id");ei(),e("html, body").animate({scrollTop:e("#wpd-inline-"+o).offset().top-(D+6)},1e3,function(){es(),e("#wpd-inline-"+o).addClass("wpd-active")})}),("scroll_open"===I||"blink"===I)&&(eu(),e(window).on("scroll",eu)),e("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",function(){if(parseInt(f)&&!confirm(wpdiscuzAjaxObj.wc_confirm_rate_edit))return!1;var t=new FormData,o=e(this).index();o>=0&&o<5&&(t.append("action","wpdUserRate"),t.append("rating",o+1),eg(C,!0,t).done(function(t){"object"==typeof t?(t.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[t.data],t.data),"error"),e8(t)):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)}))}),e("body").on("submit","#wpdiscuz-subscribe-form",function(t){t.preventDefault();var o=e(this);let a=e("#wpdiscuz_subscription_button",o);if(o[0].checkValidity()&&(n=o,i=!0,"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&!e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).val().length?(i=!1,e(".wpdiscuz-recaptcha",n).css("border","1px solid red")):"2.0"===d&&e("input[name=wpdiscuz_recaptcha_subscribe_form]",n).length&&e(".wpdiscuz-recaptcha",n).css("border","none"),i)&&a.hasClass("wpd_not_clicked")){a.removeClass("wpd_not_clicked");var n,i,s=new FormData;s.append("action","wpdAddSubscription"),e("*",o).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&s.append(this.name+"",e(this).val()),("checkbox"==this.type||"radio"==this.type)&&e(this).is(":checked")&&s.append(this.name+"",e(this).val())}),eg(C,!0,s).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):wpdiscuzAjaxObj.setCommentMessage(t,"error"),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1,a.addClass("wpd_not_clicked")}).fail(function(t,o,n){console.log(n),a.addClass("wpd_not_clicked"),e("#wpdiscuz-loading-bar").fadeOut(250)})}}),e("body").on("click",".wpd-unsubscribe",function(t){t.preventDefault();var o=new FormData;o.append("action","wpdUnsubscribe"),o.append("sid",e(this).data("sid")),o.append("skey",e(this).data("skey")),eg(C,!0,o).done(function(t){"object"==typeof t?t.success?(wpdiscuzAjaxObj.setCommentMessage(t.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(t.data,"error"):console.log(t),e("#wpdiscuz-loading-bar").fadeOut(250),F=!1}).fail(function(t,o,a){console.log(a),e("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(t){e(".wpd-filter.wpdf-active"+(t?":not("+t+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=eg});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
     1var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(e,t){wpdiscuzAjaxObj.setCommentMessage(e,t),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(e,t,o){var a="wpdiscuz-message-error";if(e instanceof Array)for(var n in e)t instanceof Array?"success"===t[n]?a="wpdiscuz-message-success":"warning"===t[n]&&(a="wpdiscuz-message-warning"):"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e[n]).prependTo("#wpdiscuz-comment-message").delay(o instanceof Array?o[n]:o||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===t?a="wpdiscuz-message-success":"warning"===t&&(a="wpdiscuz-message-warning"),jQuery("<div/>").addClass(a).html(e).prependTo("#wpdiscuz-comment-message").delay(o||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(e,t,o){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(a){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]]&&(e=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[a]](e,t,o))}),e},jQuery(document).ready(function(e){e("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var t,o=wpdiscuzAjaxObj.is_user_logged_in,a=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!o,n=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&o,d=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,i=parseInt(wpdiscuzAjaxObj.commentListLoadType),s=parseInt(wpdiscuzAjaxObj.wc_post_id),c=parseInt(wpdiscuzAjaxObj.commentListUpdateType),r=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),p=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),l=wpdiscuzAjaxObj.loadLastCommentId,m=l,w=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax),f=parseInt(wpdiscuzAjaxObj.is_rate_editable,10);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var u=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),h=wpdiscuzAjaxObj.storeCommenterData;parseInt(wpdiscuzAjaxObj.wmuEnabled);var b=wpdiscuzAjaxObj.isCookiesEnabled,g=!0,$=wpdiscuzAjaxObj.cookiehash,v=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),y=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,C=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),k=parseInt(wpdiscuzAjaxObj.userInteractionCheck,10),z=parseInt(wpdiscuzAjaxObj.enableBubble),x=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),_=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),O=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,E=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),T=wpdiscuzAjaxObj.bubbleLocation,I=wpdiscuzAjaxObj.inlineFeedbackAttractionType,D=parseInt(wpdiscuzAjaxObj.scrollSize),D=D||32,M=[],L=[],R=[],F=!1,S=1,j=0;});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(e){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(e){console.log(e),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+e.message,"error")}};
  • wpdiscuz/trunk/class.WpdiscuzCore.php

    r3442652 r3457051  
    33 * Plugin Name: wpDiscuz
    44 * Description: #1 WordPress Comment Plugin. Innovative, modern and feature-rich comment system to supercharge your website comment section.
    5  * Version: 7.6.45
     5 * Version: 7.6.4
    66 * Author: gVectors Team
    77 * Author URI: https://gvectors.com/
     
    13461346            $this->wpdiscuzOptionsJs["menu_icon"]             = WPDISCUZ_DIR_URL . "/assets/img/plugin-icon/wpdiscuz-svg.svg";
    13471347            $this->wpdiscuzOptionsJs["menu_icon_hover"]       = WPDISCUZ_DIR_URL . "/assets/img/plugin-icon/wpdiscuz-svg_hover.svg";
    1348             $this->wpdiscuzOptionsJs["validateNonceForGuest"] = apply_filters('wpdiscuz_validate_nonce_for_guests', true);
     1348            $this->wpdiscuzOptionsJs[");
    13491349            $this->wpdiscuzOptionsJs                          = apply_filters("wpdiscuz_js_options", $this->wpdiscuzOptionsJs, $this->options);
    13501350            $loadQuill                                        = $this->options->form["richEditor"] === "both" || (!wp_is_mobile() && $this->options->form["richEditor"] === "desktop");
  • wpdiscuz/trunk/readme.txt

    r3442666 r3457051  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 7.6.45
     6Stable tag: 7.6.4
    77Requires PHP: 5.6
    88License: GPLv3
     
    188188Please don't forget delete all caches and purge CDN after the update.
    189189
     190
     191
     192
     193
    190194= Comments - wpDiscuz v7.6.45 - 19.01.2026 =
    191195
Note: See TracChangeset for help on using the changeset viewer.