OwlCyberSecurity - MANAGER
Edit File: admin-demo.js
(()=>{function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},c(t)}function t(t,o,_){return(o=function(t){var o=function(t,o){if("object"!=c(t)||!t)return t;var _=t[Symbol.toPrimitive];if(void 0!==_){var e=_.call(t,o||"default");if("object"!=c(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"==c(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:_,enumerable:!0,configurable:!0,writable:!0}):t[o]=_,t}var o;(o=jQuery)((function(){var c=window.location.href,_=void 0!==document.title?document.title:"",e=void 0!==screen.width&&screen.width>1024?"no":"yes",s=window.ht_ctc_admin_demo_var?window.ht_ctc_admin_demo_var:{},n="2";!function(){if(o(".ctc_demo_style").on("click",(function(){var t=ht_ctc_admin_demo_var.number,o=ht_ctc_admin_demo_var.pre_filled;try{var n=s.site?s.site:"";o=(o=(o=(o=(o=o.replaceAll("%","%25")).replaceAll("{site}",n)).replaceAll("{url}",c)).replaceAll("{title}",_)).replace(/\[url]/gi,c),o=encodeURIComponent(decodeURI(o))}catch(c){}var i="https://wa.me/"+t+"?text="+o,a=s.url_target_d?s.url_target_d:"_blank",l=s.url_structure_d?s.url_structure_d:"",r=s.url_structure_m?s.url_structure_m:"";"yes"==e?("wa_colon"==r&&(i="whatsapp://send?phone="+t+"&text="+o,a="_self"),s.custom_url_m&&""!==s.custom_url_m&&(i=s.custom_url_m)):("web"==l&&(i="https://web.whatsapp.com/send?phone="+t+"&text="+o),s.custom_url_d&&""!==s.custom_url_d&&(i=s.custom_url_d));var d="popup"==a?"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=788,height=514,left=100,top=100":"noopener";""==t?T(s.m1):"_self"==a?T(s.m2):window.open(i,a,d)})),o("body").hasClass("toplevel_page_click-to-chat")){var i=function(){var c=o(".call_to_action").val();if(o(".ctc_demo_style .ctc_cta").text(c),o(".ctc_demo_style").hide(),o(".ctc_demo_style_"+n).show(),"close"!==l)try{o(".ht-ctc-admin-sidebar .collapsible").collapsible("close"),l="close"}catch(c){}o(".ht-ctc-admin-sidebar .collapsible").on("click",(function(){o(".ctc_demo_style").hide(),S(),l="open"})),S(),o(".ctc_ad_links").show()},a=function(){"left"==o(".position_right_left").val()?(o(".ctc_s_2 .ctc_cta").css("order","1"),o(".ctc_s_3 .ctc_cta").css("order","1"),o(".ctc_s_3_1 .ctc_cta").css("order","1"),o(".ctc_s_7 .ctc_cta").css("order","1"),o(".ctc_s_5 .s5_content ").css("order","1"),o(".ctc_s_5 .s5_content ").removeClass("right").addClass("left"),o(".ctc_s_7_1 .ctc_cta").css({order:"1","padding-left":"0px","padding-right":"21px"})):(o(".ctc_s_2 .ctc_cta").css("order","0"),o(".ctc_s_3 .ctc_cta").css("order","0"),o(".ctc_s_3_1 .ctc_cta").css("order","0"),o(".ctc_s_7 .ctc_cta").css("order","0"),o(".ctc_s_5 .s5_content").css("order","0"),o(".ctc_s_5 .s5_content ").removeClass("left").addClass("right"),o(".ctc_s_7_1 .ctc_cta").css({order:"0","padding-left":"21px","padding-right":"0px"}))},l="";o(".select_style_item").on("click",(function(){n=o(".select_style_desktop").val(),i()})),o(".m_select_style_item").on("click",(function(){n=o(".select_style_mobile").val(),i()})),o(".ctc_ad_main_page_on_change_input").on("change input paste",(function(){i()})),o(".ctc_ad_main_page_on_change_input_update_var").on("change input paste",(function(){s[o(this).attr("data-var")]=o(this).val(),i()})),document.addEventListener("ht_ctc_admin_event_valid_number",(function(c){i()})),o(".ctc_demo_position").on("change input paste",(function(){o(this).val(),function(){var c=o(".ctc_demo_position").val(),_="top"==c?"bottom":"top",e=o(".position_right_left").val(),s="left"==e?"right":"left",n=/^\d+$/,l=o(".position_right_left_value").val();""==l?l="0px":n.test(l)&&(l+="px");var r=o(".position_bottom_top_value").val();""==r?r="0px":n.test(r)&&(r+="px");var d=t(t(t(t({},c,r),e,l),_,"unset"),s,"unset");o(".ctc_demo_load").css(d),a(),i(),S(),o(".ctc_menu_at_demo .ctc_ad_page_link").remove()}()}))}if(o("body").hasClass("click-to-chat_page_click-to-chat-other-settings")){var r=function(){o(".ctc_demo_style").removeClass(v);var c=o(".select_an_type").val();v="ht_ctc_an_"+c,o(".ctc_demo_style").addClass(v);var t=o("#an_delay").val(),_=o("#an_itr").val(),e={"animation-delay":t?t+"s":"0","animation-iteration-count":_||"1"};o(".ctc_demo_style.ht_ctc_animation").css(e),"no-animation"==c?o(".ctc_an_demo_btn").hide():o(".ctc_an_demo_btn").show()},d=function(){o(".ctc_demo_style").removeClass(v),o(".ctc_demo_style").removeClass(f),o(".ctc_demo_style.ht_ctc_animation").css({"animation-delay":"unset","animation-iteration-count":"unset"}),o(".ctc_demo_style").hide();var c=o(".show_effect").val();"From Center"==c?(f="ht_ctc_an_entry_center",o(".ctc_demo_style").addClass(f),o(".ctc_demo_style").show()):"From Corner"==c&&setTimeout((function(){o(".ctc_demo_style").show(180)}),100),"no-show-effects"==c?(o(".ctc_demo_style").show(),o(".ctc_ee_demo_btn").hide()):o(".ctc_ee_demo_btn").show()},h=function(){if(o(".notification_badge").is(":checked")){g="yes",o(".ctc_ad_notification").show();var c=o(".field_notification_bg_color").val();o(".ctc_ad_badge").css("background-color",c);var t=o(".field_notification_text_color").val();o(".ctc_ad_badge").css("color",t)}else g="no",o(".ctc_ad_notification").hide()},u=function(){var c=o(".field_notification_border_color").val();border=""!==c?"2px solid "+c:"none",o(".ctc_ad_badge").css("border",border)},m=function(){if(document.querySelector(".ctc_nb")){var c=o(".ctc_ad_badge").closest(".ctc_demo_style");o(".ctc_ad_badge").css({top:o(c).find(".ctc_nb").attr("data-nb_top"),right:o(c).find(".ctc_nb").attr("data-nb_right")})}};o(".ctc_ad_page_link").remove(),o(".ctc_ad_links").css("margin","0 50px").show(),o(".ctc_demo_style").show();var v="";o(".select_an_type").val(),o(".select_an_type").on("change",(function(c){r()})),o(".ctc_an_demo_btn").on("click",(function(c){o(".ctc_demo_style").removeClass(v),setTimeout((function(){r()}),100)}));var f="";o(".select_an_type").val(),o(".show_effect").on("change",(function(c){d()})),o(".ctc_ee_demo_btn").on("click",(function(c){o(".ctc_demo_style").removeClass(f),setTimeout((function(){d()}),100)}));var p,g="";if(o(".notification_badge").is(":checked")){g="yes";var b=o(".field_notification_time").val();b=b&&""!=b?b:0,setTimeout((function(){h(),m()}),1e3*b)}o(".notification_badge").on("change",(function(c){h(),m(),u()})),o(".notification_border_color_field .wp-picker-container").on("click",(function(c){u()})),o(document).on("change, input, keyup",".field_notification_bg_color, .field_notification_text_color, .field_notification_border_color",(function(){h()})),o(".field_notification_count").on("input",(function(){var c=o(this).val();o(".ctc_ad_badge").text(c)})),o(".field_notification_time").on("change",(function(){o(".ctc_ad_notification").hide(),clearTimeout(p);var c=o(this).val();c=c&&""!=c?c:0,p=setTimeout((function(){"yes"==g&&o(".ctc_ad_notification").show()}),1e3*c)}))}var y,w,k,x,C;function T(){var c,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";clearTimeout(c),o(".ctc_ad_links").hide(),o(".ctc_demo_messages").html(t),o(".ctc_demo_messages").hide().fadeIn(500),c=setTimeout((function(){o(".ctc_demo_messages").hide(120),o(".ctc_ad_links").show(120)}),9e3)}function S(){o(".ctc_demo_messages").hide(),o(".ctc_ad_links").hide(),o(".ctc_no_demo_notice").hide()}o("body").hasClass("click-to-chat_page_click-to-chat-customize-styles")&&(o(".ctc_ad_page_link").remove(),o(".ctc_ad_links").css("margin","0 50px"),o(".ht_ctc_customize_style").on("click",(function(){var c=o(this).attr("data-style");o(".ctc_demo_style_"+c).show(),o(".ctc_demo_style").not(".ctc_demo_style_"+c).hide(),o(".ctc_ad_links").show()})),o(".wp-picker-container").on("click",(function(){var c=o(this).closest(".ht_ctc_customize_style"),t=o(c).attr("data-style");t&&(o(".ctc_demo_style_"+t).show(),o(".ctc_demo_style").not(".ctc_demo_style_"+t).hide())})),o(".ctc_s_3_1").hover((function(){o(".ctc_s_3_1 .ht_ctc_padding").css("background-color",o("#s3_1_bg_color_hover").val()),!o("#s3_box_shadow").is(":checked")&&o("#s3_box_shadow_hover").is(":checked")&&o(".ctc_s_3_1 .ht_ctc_padding").css("box-shadow","0px 0px 11px rgba(0,0,0,.5)")}),(function(){o(".ctc_s_3_1 .ht_ctc_padding").css("background-color",o("#s3_1_bg_color").val()),!o("#s3_box_shadow").is(":checked")&&o("#s3_box_shadow_hover").is(":checked")&&o(".ctc_s_3_1 .ht_ctc_padding").css("box-shadow","unset")})),o("#s3_box_shadow").on("change",(function(c){o("#s3_box_shadow").is(":checked")?o(".ctc_s_3_1 .ht_ctc_padding").css("box-shadow","0px 0px 11px rgba(0,0,0,.5)"):o(".ctc_s_3_1 .ht_ctc_padding").css("box-shadow","unset")})),o(".s4_img_position").on("change",(function(c){var t=o(this).val();"left"==t?(o(".ctc_s_4 .s4_img").css("margin","0 8px 0 -12px"),o(".ctc_s_4 .s4_img").css("order","0")):"right"==t&&(o(".ctc_s_4 .s4_img").css("margin","0 -12px 0 8px"),o(".ctc_s_4 .s4_img").css("order","1"))})),o(".ctc_s_6").hover((function(){o(".ctc_s_6").css({color:o("#s6_txt_color_on_hover").val(),"text-decoration":o("#s6_txt_decoration_on_hover").find(":selected").val()})}),(function(){o(".ctc_s_6").css({color:o("#s6_txt_color").val(),"text-decoration":o("#s6_txt_decoration").find(":selected").val()})})),o(".ctc_s_7").hover((function(){o(".ctc_s_7 svg path").css("fill",o("#s7_icon_color_hover").val()),o(".ctc_s_7 .ctc_s_7_icon_padding").css("background-color",o("#s7_border_color_hover").val())}),(function(){o(".ctc_s_7 svg path").css("fill",o("#s7_icon_color").val()),o(".ctc_s_7 .ctc_s_7_icon_padding").css("background-color",o("#s7_border_color").val())})),o(".ctc_s_7_1").hover((function(){o(".ctc_s_7_1 svg path").css("fill",o("#s7_1_icon_color_hover").val()),o(".ctc_s_7_1 .ctc_s_7_1_cta").css("color",o("#s7_1_icon_color_hover").val()),o(".ctc_s_7_1").css("background-color",o("#s7_1_bgcolor_hover").val()),o(".ctc_s_7_1 .ctc_s_7_icon_padding").css("background-color",o("#s7_1_bgcolor_hover").val())}),(function(){o(".ctc_s_7_1 svg path").css("fill",o("#s7_1_icon_color").val()),o(".ctc_s_7_1 .ctc_s_7_1_cta").css("color",o("#s7_1_icon_color").val()),o(".ctc_s_7_1").css("background-color",o("#s7_1_bgcolor").val()),o(".ctc_s_7_1 .ctc_s_7_icon_padding").css("background-color",o("#s7_1_bgcolor").val())})),o(".ctc_s_8").hover((function(){o(".ctc_s_8 .s_8").css({"background-color":o("#s8_bg_color_on_hover").val()}),o(".ctc_s_8 .s8_span").css("color",o("#s8_txt_color_on_hover").val()),o(".ctc_s_8 svg path").css("fill",o("#s8_icon_color_on_hover").val())}),(function(){o(".ctc_s_8 .s_8").css({"background-color":o("#s8_bg_color").val()}),o(".ctc_s_8 .s8_span").css("color",o("#s8_txt_color").val()),o(".ctc_s_8 svg path").css("fill",o("#s8_icon_color").val())})),o(".ctc_oninput").on("change paste keyup",(function(c){var t=o(this).attr("data-update-type");S();var _=o(this).val(),e=o(this).attr("data-update-selector");if(t&&e)if("text"==t)o(e).text(_);else if("cta"==t){var s=o(e).closest(".ctc_demo_style");"show"==_?(o(e).show(),o(e).removeClass("ht-ctc-cta-hover"),o(s).removeAttr("title")):"hide"==_?(o(e).hide(),o(e).removeClass("ht-ctc-cta-hover"),o(s).attr("title","Call to action")):"hover"==_&&(o(e).hide(),o(e).addClass("ht-ctc-cta-hover"),o(s).removeAttr("title"))}else{o(e).css(t,_);var n=o(this).attr("data-update-type-2");n&&o(e).css(n,_)}}))),o(".ctc_no_demo").on("change paste keyup",(function(c){S(),clearTimeout(y),o(".ctc_no_demo_notice").hide().fadeIn(500),y=setTimeout((function(){o(".ctc_no_demo_notice").hide(120)}),5e3)})),o(".ctc_demo_style").hover((function(){o(this).find(".ht-ctc-cta-hover").show(120)}),(function(){o(".ctc_demo_style .ht-ctc-cta-hover").hide(100)})),w=o(".ctc_ad_show_demo"),k=o(".ctc_ad_hide_demo"),x=o(".ctc_demo_load"),C=o(".ctc_ad_page_link"),w.on("click",(function(){x.show(),w.hide(),k.show(),C.show()})),k.on("click",(function(){x.hide(),k.hide(),w.show(),C.hide()}))}()}))})();