MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/www/support/wp-content/plugins/echo-advanced-search/js/admin-analytics.min.js
jQuery(document).ready(function(a){function e(e){if(a(".asea-analytics-container").length>0){$first_ten_count=[],$first_ten_words=[],total=a("#"+e+" .asea-pie-data-list li").length,a("#"+e+" .asea-pie-data-list .asea-first-10").each(function(){$first_ten_count.push(a(this).find(".asea-pie-chart-count").text()),$first_ten_words.push(a(this).find(".asea-pie-chart-word").text())}),a("#"+e).hasClass("asea-pie-chart-container-show-data")&&($remaining_count=0,$remaining_words="Remaining Results",a("#"+e+" .asea-pie-data-list .asea-after-10").each(function(){$remaining_count+=Number(a(this).find(".asea-pie-chart-count").text())}),$first_ten_count.push($remaining_count),$first_ten_words.push($remaining_words)),a("#"+e+" .asea-pie-data-total").remove(),a("#"+e+" h4").append('<span class="asea-pie-data-total"> ( '+total+" )</span>"),a("#"+e+"-chart").remove(),a("#"+e+" .asea-pie-chart-right-col #asea-pie-chart").append('<canvas id="'+e+'-chart"><canvas>');var t=document.getElementById(e+"-chart").getContext("2d");new Chart(t,{type:"doughnut",data:{labels:$first_ten_words,datasets:[{data:$first_ten_count,backgroundColor:["#aed581","#4fc3f7","#FED32F","#ef5350","#D0D8E0","#ff8a65","#ba68c8","#4A7BEC","#768CA3","#8d6e63","#444444"]}]},options:{maintainAspectRatio:!1,legend:{display:!1,position:"left"}}})}}function t(a,e,t,s,n){return'<div class="eckb-top-notice-message"><div class="contents"><span class="'+t+'">'+(a?"<h4>"+a+"</h4>":"")+(e||"")+"</span>"+(s?'<button id="">'+a+"</h4>":"")+"</div></div>"}function s(e){a(".asea-dialog-box-loading").remove();let t='<div class="asea-dialog-box-loading"><div class="asea-admin-dbl__header"><div class="asea-admin-dbl-icon epkbfa epkbfa-hourglass-half"></div>'+(e?"<h4>"+e+"</h4>":"")+"</div></div>";a(".asea-analytics-container").append(t)}if(a(".asea-pie-chart-container").each(function(){var t=a(this).attr("id");e(t),e(t)}),a(".asea-analytics-content__tab-button").on("click",function(){return a(this).parent().find(".asea-analytics-content__tab-button").removeClass("active"),a(this).addClass("active"),a(this).closest(".asea-analytics-content").find(".asea-analytics-content__tab").removeClass("active"),a(a(this).data("target")).addClass("active"),!1}),a(".asea-analytics-container").length>0&&a(".asea-pie-chart-cog").on("click",function(){a(this).toggleClass("asea-pie-chart-cog--expanded");let t=a(this).closest(".asea-pie-chart-container").attr("id");a("#"+t).toggleClass("asea-pie-chart-container-show-data"),e(t)}),a(".asea-reset-container").length>0){a(".asea-reset-analytics").on("click",function(){return a(".epkb-dialog-box-form").toggleClass("epkb-dialog-box-form--active"),!1}),a("#asea-reset-search-data .asea-accept-button").on("click",n),a("#asea-reset-cancel").on("click",function(){a("#asea-ajax-in-progress").dialog("close")});function n(){s("Processing ..."),a.ajax({type:"POST",dataType:"json",data:{action:"asea_handle_reset_request",_wpnonce_asea_search_analytics:a("#_wpnonce_asea_search_analytics").val(),kb_id:a("#asea_reset_analytics_kb_id").val()},url:ajaxurl,beforeSend:function(a){}}).done(function(e){a(".asea-dialog-box-loading").remove(),(e=e||"").message&&"true"!==e.error?(msg=e.message?t("",e.message,"success"):t("","Advanced Search: Error occurred. Please try again later. (L01)","error"),window.location.reload()):e.message&&(msg=e.message?e.message:t("","Advanced Search: Error occurred. Please try again later. (L01)","error"))}).fail(function(e,t,s){msg=s?" ["+s+"]":"unknown error",a(".asea-dialog-box-loading").remove()}).always(function(){a("#asea-ajax-in-progress").dialog("close"),a(".asea-dbf__footer__cancel__btn").trigger("click"),a("#asea-reset-analytics-button").hide(),msg&&(a(".eckb-top-notice-message").length?a(".eckb-top-notice-message").replaceWith(msg):a(".epkb-config-wrapper").append(msg))})}}a(".asea-dbf__footer__cancel__btn, .asea-dbf__close").on("click",function(){a(this).parents(".asea-dialog-box-form").removeClass("asea-dialog-box-form--active")}),a("body").on("click",".asea-close-notice",function(){a(this).closest(".eckb-bottom-notice-message").remove()}),a(document.body).on("change",".asea_admin_analytics_filters select",function(){s("Processing ..."),a(this).closest("form").submit()})});