403Webshell
Server IP : 43.130.17.34  /  Your IP : 216.73.217.6
Web Server : nginx/1.28.0
System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64
User : www ( 1000)
PHP Version : 8.0.26
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/yespkg.com/wp-content/plugins/sticky-chat-widget/dist/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/yespkg.com/wp-content/plugins/sticky-chat-widget/dist/admin/js/script.js
!function(t){"use strict";var e=0,n="",s="",i="",a="",o="",c="desktop",l="ginger-menu-fade",r="",g=0,d="",u=!1,b=0,p="",h="",m={beforeSubmit:function(e,n,s){t(".save-changes").prop("disabled",!0),t(".save-changes").addClass("loading-btn")},success:function(e,n,s,i){t(".save-changes").removeClass("loading-btn"),e=t.parseJSON(e);var a=new SwipeHandler,o=new ToastsHandler(a);1==e.status?(o.createToast({type:"success",icon:"info-circle",message:e.message,duration:3e3}),""!=e.data.URL?window.location=e.data.URL:setTimeout((function(){t(".save-changes").prop("disabled",!1)}),3e3)):(t(".save-changes").prop("disabled",!1),o.createToast({type:"error",icon:"info-circle",message:e.message,duration:5e3}))}},v={change:k,hide:!0,palettes:!0};function f(){var e=new Date,n=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),s=(e.getHours()<10?"0"+e.getHours():e.getHours())+":"+n;t(".selected-button-settings li.gsb-settings").each((function(){var e=t(this).data("button");"whatsapp"==t(this).data("label")&&t("#"+e+"_popup_text").length&&"undefined"!=typeof tinymce&&(tinymce.execCommand("mceRemoveEditor",!1,e+"_popup_text"),tinymce.init({selector:"#"+e+"_popup_text",plugins:"link",toolbar:"bold italic underline link | emoji",toolbar_sticky:!0,toolbar_mode:"wrap",directionality:t('html[dir="rtl"]').length?"rtl":"ltr",menubar:!1,branding:!1,content_css:BUTTON_SETTINGS.content_css,setup:function(n){n.addButton("emoji",{icon:"emoticons",onclick:function(){var i=window.picmoPopup.createPopup,a=jQuery(".mce-emoji-custom-icon-"+e+" button").attr("id"),o=document.querySelector("#"+a),c=i({},{referenceElement:o,triggerElement:o,position:"right-start",hideOnEmojiSelect:!1});c.toggle(),c.addEventListener("emoji:select",(function(i){tinyMCE.get(e+"_popup_text").focus(),tinymce.activeEditor.execCommand("mceInsertContent",!1,i.emoji),t("#"+e+"_popup_text").val(n.getContent()),""!=n.getContent()?(t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-chat-content").length||t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-popup-body").append("<div class='whatsapp-chat'><div class='whatsapp-chat-user-name'></div><div class='whatsapp-chat-content'></div><div class='whatsapp-chat-time'>"+s+"</div></div>"),t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-chat-content").html(n.getContent())):t(".ginger-sticky-buttons").find("#"+e+"_popup .whatsapp-chat").remove()}))},classes:"emoji-custom-icon-"+e}),n.on("keyup",(function(i){t("#"+e+"_popup_text").val(n.getContent()),""!=n.getContent()?(t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-chat-content").length||t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-popup-body").append("<div class='whatsapp-chat'><div class='whatsapp-chat-user-name'></div><div class='whatsapp-chat-content'></div><div class='whatsapp-chat-time'>"+s+"</div></div>"),t(".ginger-sticky-buttons .whatsapp-popup#"+e+"_popup .whatsapp-chat-content").html(n.getContent())):t(".ginger-sticky-buttons").find("#"+e+"_popup .whatsapp-chat").remove()}))}}),tinymce.execCommand("mceAddEditor",!1,e+"_popup_text"))})),t("#consent_message_text").length&&"undefined"!=typeof tinymce&&(tinymce.execCommand("mceRemoveEditor",!1,"consent_message_text"),tinymce.init({selector:"#consent_message_text",plugins:"link textcolor",toolbar:"bold italic underline link forecolor backcolor",toolbar_sticky:!0,toolbar_mode:"wrap",directionality:t('html[dir="rtl"]').length?"rtl":"ltr",menubar:!1,branding:!1,content_css:BUTTON_SETTINGS.content_css,setup:function(e){e.on("change",(function(n){t("#consent_message_text").val(e.getContent()),""!=e.getContent()?t(".scw-form-body .consent-check-box label").html(e.getContent()):t(".scw-form-body .consent-check-box label").html("")})),e.on("keyup",(function(n){t("#consent_message_text").val(e.getContent()),""!=e.getContent()?t(".scw-form-body .consent-check-box label").html(e.getContent()):t(".scw-form-body .consent-check-box label").html("")}))}}),tinymce.execCommand("mceAddEditor",!1,"consent_message_text"))}function w(){t(window).width()<=1330?"mobile"==(s=t("input[name='preview_device_switch']:checked").val())?(t(".preview-desktop-layout").removeClass("desktop-layout").addClass("mobile-layout"),t(".preview-layout .inner").height(parseInt(1*t(".preview-layout .inner").width())),c="mobile"):(t(".preview-desktop-layout").removeClass("mobile-layout").addClass("desktop-layout"),t(".preview-layout .inner").height(parseInt(.6*t(".preview-layout .inner").width())),c="desktop"):"mobile"==(s=t("input[name='device_switch']:checked").val())?(t(".preview-desktop-layout").removeClass("desktop-layout").addClass("mobile-layout"),t(".preview-layout .inner").height(parseInt(1.6*t(".preview-layout .inner").width())),c="mobile"):(t(".preview-desktop-layout").removeClass("mobile-layout").addClass("desktop-layout"),t(".preview-layout .inner").height(parseInt(.6*t(".preview-layout .inner").width())),c="desktop"),t(".preview-desktop-layout").hasClass("mobile-layout")&&t(".preview-mobile-btn").prop("checked",!0),t(".preview-desktop-layout").hasClass("desktop-layout")&&t(".preview-desktop-btn").prop("checked",!0)}function k(){var e="";t("#custom_style_widget").remove(),e+="<style id='custom_style_widget'>",t(".selected-button-settings .channel-bg-color").each((function(){s=t(this).val(),t(this).closest("li.gsb-settings").find(".ginger-button-icon").css("background-color",s)})),t(".selected-button-settings .channel-text-color").each((function(){s=t(this).val(),t(this).closest("li.gsb-settings").find(".ginger-button-icon svg").css("color",s).css("fill",s)})),s=t("input[name='widget_settings[bg_color]']").val(),t(".ginger-sticky-buttons .main-button .cta-button, .close-gsb-button").css("background-color",s),s=t("input[name='widget_settings[text_color]']").val(),t(".ginger-sticky-buttons .main-button .cta-button, .close-gsb-button, .ginger-sticky-buttons .main-button .cta-button svg, .close-gsb-button svg").css("color",s).css("fill",s),s=t("input[name='contact_form_settings[btn_bg_color]']").val(),t(".scw-form-btn button").css("background",s),s=t("input[name='contact_form_settings[btn_color]']").val(),t(".scw-form-btn button").css("color",s),s=t("input[name='contact_form_settings[btn_bg_hover_color]']").val(),e+=".ginger-sticky-buttons .scw-form-container .scw-form-btn button:hover, .ginger-sticky-buttons .scw-form-container .scw-form-btn button:focus {background-color: "+s+" !important;}",s=t("input[name='contact_form_settings[btn_hover_color]']").val(),e+=".ginger-sticky-buttons .scw-form-container .scw-form-btn button:hover, .ginger-sticky-buttons .scw-form-container .scw-form-btn button:focus {color: "+s+" !important;}",s=t("input[name='widget_settings[message_bg_color]']").val(),t(".scw-pending-message").css("background",s),s=t("input[name='widget_settings[message_text_color]']").val(),t(".scw-pending-message").css("color",s),s=t("input[name='tooltip_settings[bg_color]']").val(),e+=".ginger-sticky-buttons [data-ginger-tooltip]:before, .ginger-sticky-buttons .cta-tooltip {background-color: "+s+"}",e+=".ginger-sticky-buttons [data-ginger-tooltip-location='left']:after, .ginger-sticky-buttons [data-ginger-tooltip-location='left'] .cta-tooltip:after {border-color: transparent transparent transparent "+s+";}",e+=".ginger-sticky-buttons [data-ginger-tooltip-location='right']:after, .ginger-sticky-buttons [data-ginger-tooltip-location='right'] .cta-tooltip:after {border-color: transparent "+s+" transparent transparent;}",e+=".ginger-sticky-buttons [data-ginger-tooltip-location='top']:after, .ginger-sticky-buttons [data-ginger-tooltip-location='top'] .cta-tooltip:after {border-color: "+s+" transparent transparent transparent;}",s=t("input[name='tooltip_settings[text_color]']").val(),e+=".ginger-sticky-buttons [data-ginger-tooltip]:before, .ginger-sticky-buttons .cta-tooltip {color: "+s+"}",t(".gsb-settings .ssb-btn-bg-instagram").removeClass("default-insta-hover"),t(".channel-instagram.gsb-social-channel").removeClass("default-insta-hover"),t(".selected-button-settings .channel-bg-hover-color").each((function(){s=t(this).closest("li.gsb-settings").attr("data-button"),("instagram"!=(p=t(this).closest("li.gsb-settings").attr("data-label"))||"instagram"==p&&"#df0079"!=t(this).val())&&(e+=".ginger-button-icon.ssb-btn-bg-"+s+":hover, .ginger-button-icon.ssb-btn-bg-"+s+":focus ,.ginger-sticky-buttons a.channel-"+s+":hover, .ginger-sticky-buttons a.channel-"+s+":focus, .list-channel a:hover .ginger-button-icon.ssb-btn-bg-"+s+", .list-channel a:focus .ginger-button-icon.ssb-btn-bg-"+s+" {background: "+t(this).val()+" !important;}"),"instagram"==p&&"#df0079"==t(this).val()&&(t(".gsb-settings .ssb-btn-bg-instagram").addClass("default-insta-hover"),t(".channel-instagram.gsb-social-channel").addClass("default-insta-hover")),"twitter"!=p||"#65BBF2"!=t(this).val()&&"#65bbf2"!=t(this).val()||(e+=".ginger-button-icon.ssb-btn-bg-"+s+":hover, .ginger-button-icon.ssb-btn-bg-"+s+":focus ,.ginger-sticky-buttons a.channel-"+s+":hover, .ginger-sticky-buttons a.channel-"+s+":focus {background: #000000 !important;}")})),t(".selected-button-settings .channel-text-hover-color").each((function(){s=t(this).closest("li.gsb-settings").attr("data-button"),p=t(this).closest("li.gsb-settings").attr("data-label"),e+=".ginger-button-icon.ssb-btn-bg-"+s+":hover svg, .ginger-button-icon.ssb-btn-bg-"+s+":focus svg, .ginger-sticky-buttons a.channel-"+s+":focus svg, .ginger-sticky-buttons a.channel-"+s+":hover svg, .list-channel a:hover .ginger-button-icon.ssb-btn-bg-"+s+" svg, .list-channel a:focus .ginger-button-icon.ssb-btn-bg-"+s+" svg, .ginger-sticky-buttons a.channel-"+s+":hover, .ginger-sticky-buttons a.channel-"+s+":focus {color: "+t(this).val()+" !important; fill: "+t(this).val()+" !important;}","slack"==p&&"#ffffff"!=t(this).val()&&(e+=".ginger-button-icon.ssb-btn-bg-"+s+":hover svg path, .ginger-button-icon.ssb-btn-bg-"+s+":focus svg path, .ginger-sticky-buttons a.channel-"+s+":focus svg path, .ginger-sticky-buttons a.channel-"+s+":hover svg path {fill: "+t(this).val()+" !important;}")})),t(".selected-button-settings .channel-bg-color").each((function(){s=t(this).closest("li.gsb-settings").attr("data-button"),("instagram"!=(p=t(this).closest("li.gsb-settings").attr("data-label"))||"instagram"==p&&"#df0079"!=t(this).val())&&(e+=".ginger-button-icon.ssb-btn-bg-"+s+", .ginger-sticky-buttons a.channel-"+s+" {background: "+t(this).val()+" !important;}"),"twitter"!=p||"#65BBF2"!=t(this).val()&&"#65bbf2"!=t(this).val()||(e+=".ginger-button-icon.ssb-btn-bg-"+s+", .ginger-sticky-buttons a.channel-"+s+" {background: #000000 !important;}")})),t(".selected-button-settings .channel-text-color").each((function(){s=t(this).closest("li.gsb-settings").attr("data-button"),p=t(this).closest("li.gsb-settings").attr("data-label"),e+=".ginger-button-icon.ssb-btn-bg-"+s+" svg, .ginger-sticky-buttons a.channel-"+s+", .ginger-sticky-buttons a.channel-"+s+" svg {color: "+t(this).val()+" !important; fill: "+t(this).val()+" !important;}","slack"==p&&"#ffffff"!=t(this).val()&&(e+=".ginger-button-icon.ssb-btn-bg-"+s+":not(:hover) svg path, .ginger-sticky-buttons a.channel-"+s+":not(:hover), .ginger-sticky-buttons a.channel-"+s+":not(:hover) svg path {fill: "+t(this).val()+" !important;}")})),t(".btn-for-"+c+":checked").length>1&&(s=t("input[name='widget_settings[interaction_bg_color]']").val(),e+=".ginger-sticky-buttons .main-button .gsb-main-action-button a:hover, .ginger-sticky-buttons .main-button .close-gsb-action-button a:hover, .ginger-sticky-buttons .main-button .gsb-main-action-button a:focus, .ginger-sticky-buttons .main-button .close-gsb-action-button a:focus, .ginger-sticky-buttons .main-button .gsb-contact-button a:hover, .ginger-sticky-buttons .main-button .gsb-contact-button a:focus, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:hover, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:focus {background-color: "+s+" !important;}",s=t("input[name='widget_settings[interaction_text_color]']").val(),e+=".ginger-sticky-buttons .main-button .gsb-main-action-button a:hover, .ginger-sticky-buttons .main-button .close-gsb-action-button a:hover, .ginger-sticky-buttons .main-button .gsb-main-action-button a:focus, .ginger-sticky-buttons .main-button .close-gsb-action-button a:focus, .ginger-sticky-buttons .main-button .gsb-contact-button a:hover, .ginger-sticky-buttons .main-button .gsb-contact-button a:focus, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:hover, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:focus {color: "+s+" !important;}",e+=".ginger-sticky-buttons .main-button .gsb-main-action-button a:hover svg, .ginger-sticky-buttons .main-button .close-gsb-action-button a:hover svg, .ginger-sticky-buttons .main-button .gsb-main-action-button a:focus svg, .ginger-sticky-buttons .main-button .close-gsb-action-button a:focus svg, .ginger-sticky-buttons .main-button .gsb-contact-button a:hover svg, .ginger-sticky-buttons .main-button .gsb-contact-button a:focus svg, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:hover svg, .ginger-sticky-buttons .main-button .gsb-whatsapp-button a:focus svg {fill: "+s+" !important;}"),"icon_view"!=r&&t(".btn-for-"+c+":checked").length>=1&&(s=t("input[name='widget_settings[list_title_bg]']").val(),e+=".button-list .list_title_container {background-color: "+s+";}",s=t("input[name='widget_settings[list_title_color]']").val(),e+=".button-list .list_title_container {color: "+s+";}"),t(".selected-button-settings li.gsb-settings").each((function(){var n=t(this).closest("li.gsb-settings").attr("data-button");"wechat"==(p=t(this).closest("li.gsb-settings").attr("data-label"))&&(s=t("input[name='channel_settings["+n+"][wechat_qr_bg_color]']").val(),e+=".sticky-button-list .wechat-popup#"+n+"_popup .wechat-popup-header {background-color: "+s+";}")}));var n=t("input[name='widget_settings[greeting_bg_color]']").val(),i=t("input[name='widget_settings[greeting_text_color]']").val();e+=".ginger-sticky-buttons .scw-greeting-message{background-color:"+n+";color:"+i+"}",e+=".ginger-sticky-buttons .scw-greeting-message svg{fill:"+i+"}",e+=".ginger-sticky-buttons .scw-greeting-message svg path{stroke:"+i+"}",e+=".ginger-sticky-buttons .scw-greeting-message:after{border-color: "+n+" transparent transparent transparent;}",e+="</style>",t("head").append(e)}function _(t,e){var n=t.toString();return n.length<e&&(n=("0000000000"+n).slice(-e)),n}function C(){t("input[name='widget_settings[show_close_button]']").is(":checked")?t(".hide-menu-close-click").addClass("active"):"corner_circle_view"!=t(".ginger-menu-view:checked").val()?t(".hide-menu-close-click").removeClass("active"):t(".hide-menu-close-click").addClass("active"),t("#country_rules_custom").is(":checked")?t(".custom-country-rule").addClass("active"):t(".custom-country-rule").removeClass("active"),t("#user_rules_custom").is(":checked")?t(".custom-user-rule").addClass("active"):t(".custom-user-rule").removeClass("active"),t("#date_rules_custom").is(":checked")?t(".custom-dates-rule").addClass("active"):t(".custom-dates-rule").removeClass("active"),t("#channel-settings").hasClass("active")||(t(".button-list .channel-btn.active").removeClass("active"),t(".ginger-sticky-buttons").removeClass("menu-open"),t(".button-list").removeClass(l),t(".main-button").removeClass("hide-tooltip"),t(".main-button").addClass("active-tooltip"));var e=t(".button-list").attr("data-view");if(t(".button-list").removeClass(e),r=t(".ginger-menu-view:checked").val(),t(".button-list").attr("data-view",r),t(".button-list").addClass(r),"list_view"==r&&t(".btn-for-"+c+":checked").length>=1?t(".ginger-sticky-buttons").addClass("view-list"):t(".ginger-sticky-buttons").removeClass("view-list"),"grid_view"==r&&t(".btn-for-"+c+":checked").length>=1?t(".ginger-sticky-buttons").addClass("view-grid"):t(".ginger-sticky-buttons").removeClass("view-grid"),w(),""!=t("#widget_icon_size").val())if(t(".btn-for-"+c+":checked").length>0){a="",t(".btn-for-"+c+":checked").length>0?(t(".btn-for-"+c+":checked").each((function(){var e=t(this).closest("li.gsb-settings").find(".gsb-free-settings .gsb-input-icon").html();e=e.replace('<a href="javascript:;" class="remove-channel-img"><span class="dashicons dashicons-no-alt"></span></a>',""),L=t(this).closest("li.gsb-settings").attr("data-button"),p=t(this).closest("li.gsb-settings").attr("data-label");var n="",s="";"list_view"==r&&t(".btn-for-"+c+":checked").length>=1&&(n="list-channel",s='<div class="list-channel-title">'+(s=t(this).closest("li.gsb-settings").find(".gsb-title input").val().replace(/(<([^>]+)>)/gi,""))+"</div>"),"grid_view"==r&&t(".btn-for-"+c+":checked").length>=1&&(n="grid-channel"),"menu_view"==r&&t(".btn-for-"+c+":checked").length>=1&&(s='<div class="menu-channel-title">'+(s=t(this).closest("li.gsb-settings").find(".gsb-title input").val().replace(/(<([^>]+)>)/gi,""))+"</div>");var i="";"contact_form"==p&&(i="open-contact-form-channel");var o="",l="";"whatsapp"==p&&t("#show_"+L+"_popup").is(":checked")&&(o="open-whatsapp-channel",l=L);var g="",d="";"wechat"==p&&""!=t("#"+L+"_qr_code_input").val()&&(g="open-wechat-channel",d=L);var u="";"instagram"==p&&"list_view"!=r&&(u="channel-instagram-base"),a+='<div class="channel-btn '+n+'">',a+="<a class='channel-"+L+" gsb-social-channel "+i+" "+o+" "+g+" "+u+"' data-channel-class='channel-"+L+"' data-wpid='"+l+"' data-weid='"+d+"' href='javascript:;'>"+e+s+"</a>",a+="</div>"})),t(".ginger-sticky-buttons").show()):t(".ginger-sticky-buttons").hide();var n=t("#ginger_sb_"+L+"_title").val(),s="";if(""!=(L=tinymce.get("ginger_sb_call_to_action").getContent())&&(s+="<span class='cta-tooltip'>"+L+"</span>"),t(".cta-tooltip").remove(),t(".grid-title-container").remove(),t(".ginger-sticky-buttons .button-list .channel-btn").remove(),1==t(".btn-for-"+c+":checked").length&&"icon_view"==r)t(".ginger-sticky-buttons").addClass("one-channel"),t(".ginger-sticky-buttons .main-button .single-btn").html(a),t(".ginger-sticky-buttons .main-button .single-btn").append(s),t(".ginger-sticky-buttons .main-button .single-btn").attr("data-ginger-tooltip-hover",n),t(".ginger-sticky-buttons .main-button .single-btn .ginger-button-icon").addClass("active-tooltip"),t(".ginger-sticky-buttons .main-button").removeAttr("data-ginger-tooltip"),t("#default_state_click").is(":checked")||t(".single-btn .channel-btn a").addClass(t("#ginger_sb_animation").val()),t(".single-btn").attr("data-ginger-tooltip-location",t(".single-btn .ginger-button-icon").data("ginger-tooltip-location")),t(".single-btn .ginger-button-icon").removeAttr("data-ginger-tooltip-location"),t(".single-btn .ginger-button-icon").removeAttr("data-ginger-tooltip"),t(".single-btn").addClass("active-tooltip");else{t(".ginger-sticky-buttons").removeClass("one-channel"),t(".ginger-sticky-buttons").show(),t(".ginger-sticky-buttons .main-button").show();var o="";"list_view"==r&&t(".btn-for-"+c+":checked").length>=1?(o+="<div class='channel-list-container'>",'<p><br data-mce-bogus="1"></p>'!=t("#grid_view_title_ifr").contents().find("body").html()&&(o+="<div class='grid-title-container'><div class='grid-title'>"+t("#grid_view_title_ifr").contents().find("body").html()+"</div></div>"),o+="<div class='channel-list'>",o+=a,o+="</div>",o+="</div>"):"grid_view"==r&&t(".btn-for-"+c+":checked").length>=1?(o="<div class='channel-grid'>",'<p><br data-mce-bogus="1"></p>'!=t("#grid_view_title_ifr").contents().find("body").html()&&(o+="<div class='grid-title-container'><div class='grid-title'>"+t("#grid_view_title_ifr").contents().find("body").html()+"</div></div>"),o+="<div class='channel-grid-container'>",o+=a,o+="</div>",o+="</div>"):o=a,t(".button-list").html(o),t(".ginger-sticky-buttons .main-button").append(s),t(".ginger-sticky-buttons .main-button .single-btn").html(""),"menu_view"==r&&t(".button-list.menu_view .channel-btn").each((function(){t(this).find("span.ginger-button-icon").removeAttr("data-ginger-tooltip")}))}if(t(".list_title_container").remove(),"list_view"==r&&t(".btn-for-"+c+":checked").length>=1){if(""!=t("#list_view_title").val()){var g="";g+="<div class='list_title_container'>",g+="<span class='list_title'>"+t("#list_view_title").val().replace(/(<([^>]+)>)/gi,"")+"</span>",g+="<span class='close-view-btn'><span class='dashicons dashicons-arrow-down-alt2'></span></span>",g+="</div>",t(".button-list.list_view .channel-list-container").before(g)}t(".channel-btn.list-channel").each((function(){var e=t(this).find(".gsb-social-channel").attr("data-channel-class");t(this).find(".gsb-social-channel .ginger-button-icon").addClass(e),t(this).find(".gsb-social-channel").removeClass(e),t(this).find("span.ginger-button-icon").removeAttr("data-ginger-tooltip")}))}if("grid_view"==r&&t(".btn-for-"+c+":checked").length>=1&&""!=t("#list_view_title").val()&&(g="",g+="<div class='list_title_container'>",g+="<span class='list_title'>"+t("#list_view_title").val().replace(/(<([^>]+)>)/gi,"")+"</span>",g+="<span class='close-view-btn'><span class='dashicons dashicons-arrow-down-alt2'></span></span>",g+="</div>",t(".button-list.grid_view .channel-grid").before(g)),0==t("input[name='widget_settings[chat_icon]']:checked").length&&t("input[name='widget_settings[chat_icon]']:first").attr("checked",!0),L=t("input[name='widget_settings[chat_icon]']:checked").val(),t(".ginger-sticky-buttons .main-button .cta-button").html(t("#chat_icon_"+L).closest("li").find("span.svg-icon").html()),t(".ginger-sticky-buttons").hasClass("open-form")&&(t(".main-button").removeClass("hide-tooltip"),t(".main-button").addClass("active-tooltip"),t(".ginger-sticky-buttons").removeClass("open-form")),t("#social-buttons-contact_form-settings").length){t(".scw-form-container").remove();var d=function(){var e="";e+="<div class='scw-form-container'>",e+="<div class='scw-form-close'><span class='dashicons dashicons-arrow-down-alt2'></span></div>",e+="<div class='scw-form-title'>"+t("input[name='contact_form_settings[form_title]']").val()+"</div>",e+="<div class='scw-form'>",e+="<div class='scw-form-body'>",t(".contact-form-toggle-fields .toggle-field").each((function(){if(t(this).find(".visible_check").is(":checked")){var n="",s=t(this).data("type");t(".required_check").is(":checked")&&(n="<span> *</span>"),e+="<div class='scw-form-field'>","consent_checkbox"!=s&&(e+="<label for='"+s+"'>"+t(this).find(".contact-form-input").val()+n+"</label>"),"name"==s||"email"==s||"phone"==s?e+="<input id='"+s+"' type='text' name='' class='scw-field' placeholder='"+t(this).find(".contact_form_custom_value").val()+"'>":"message"==s?e+="<textarea id='"+s+"' name='' class='scw-field' placeholder='"+t(this).find(".contact_form_custom_value").val()+"'></textarea>":"consent_checkbox"==s&&(e+="<div class='d-flex consent-check-box'>",e+="<input type='checkbox' class='scw-field' id='form_consent_checkbox'>",e+="<label for='form_consent_checkbox'>"+t("#consent_message_text").val(),e+="</div>"),e+="</div>"}})),e+="</div>",e+="<div class='scw-form-btn'>",e+="<button type='button'>"+t("input[name='contact_form_settings[btn_text]']").val()+"</button>",e+="</div>",e+="</div>",e+="</div>";var n=t(".close-gsb-action-button a").html();t(".gsb-contact-button").remove();var s="<div class='gsb-contact-button'><a href='javascript:;' class='cta-button'>"+n+"</a></div>";return t(".ginger-sticky-buttons .main-button .main-action-button").append(s),t(".ginger-sticky-buttons .main-button .single-btn").append(s),e}();t(d).insertBefore(".ginger-sticky-buttons .sticky-button-list .button-list")}t(".ginger-sticky-buttons").hasClass("open-whatsapp-popup")&&(t(".main-button").removeClass("hide-tooltip"),t(".main-button").addClass("active-tooltip"),t(".ginger-sticky-buttons").removeClass("open-whatsapp-popup")),t(".btn-for-"+c+":checked").length>0&&t(".btn-for-"+c+":checked").each((function(){if(L=t(this).closest("li.gsb-settings").attr("data-button"),"whatsapp"==(p=t(this).closest("li.gsb-settings").attr("data-label"))&&t("#social-buttons-"+L+"-settings").length&&t("#show_"+L+"_popup").is(":checked")){t("#"+L+"_popup").remove();var e=function(e){var n=new Date,s=n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),i=(n.getHours()<10?"0"+n.getHours():n.getHours())+":"+s,a="";""==t("#"+e+"_user_profile_img").val()&&(a="no-user-profile");var o="";o+='<div class="whatsapp-popup" id="'+e+'_popup">',o+='<div class="whatsapp-popup-header">',o+='<div class="whatsapp-profile">',""!=t("#custom_"+e+"_profile").val()?o+='<img src="'+t("#custom_"+e+"_profile").val()+'" alt="Profile image">':o+='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="33" viewBox="0 0 32 33" fill="none"> <g filter="url(#filter0_f_9477_7201)"> <path d="M9.95924 25.2858L10.3674 25.5276C12.0818 26.545 14.0475 27.0833 16.052 27.0842H16.0562C22.2122 27.0842 27.2221 22.0753 27.2247 15.919C27.2258 12.9357 26.0652 10.1303 23.9565 8.01998C22.9223 6.97924 21.6919 6.15397 20.3365 5.59195C18.9812 5.02992 17.5278 4.74231 16.0606 4.74576C9.89989 4.74576 4.88975 9.75407 4.88756 15.91C4.88453 18.0121 5.47648 20.0722 6.59498 21.852L6.86071 22.2742L5.73223 26.394L9.95924 25.2858ZM2.50586 29.5857L4.41235 22.6249C3.23657 20.5878 2.618 18.2768 2.61873 15.9091C2.62183 8.50231 8.64941 2.47656 16.0564 2.47656C19.6508 2.47839 23.0245 3.87717 25.5618 6.41629C28.0991 8.95542 29.4952 12.3305 29.4939 15.9199C29.4906 23.3262 23.4621 29.353 16.0562 29.353H16.0504C13.8016 29.3521 11.592 28.788 9.62923 27.7177L2.50586 29.5857Z" fill="#B3B3B3"/> </g> <path d="M2.36719 29.447L4.27368 22.4862C3.09587 20.4442 2.47721 18.1278 2.48005 15.7705C2.48316 8.36364 8.51074 2.33789 15.9177 2.33789C19.5121 2.33972 22.8859 3.73849 25.4232 6.27762C27.9605 8.81675 29.3565 12.1918 29.3552 15.7812C29.3519 23.1875 23.3234 29.2143 15.9175 29.2143H15.9117C13.663 29.2134 11.4533 28.6493 9.49056 27.5791L2.36719 29.447Z" fill="white"/> <path d="M15.715 3.84769C9.17146 3.84769 3.85 9.16696 3.84767 15.7051C3.84445 17.9377 4.47318 20.1257 5.66119 22.016L5.94343 22.4646L4.48888 27.2525L9.23469 25.663L9.66824 25.9199C11.4891 27.0005 13.5769 27.5719 15.7061 27.5731H15.7105C22.249 27.5731 27.5705 22.2532 27.573 15.7146C27.5779 14.1562 27.2737 12.6123 26.6778 11.1722C26.082 9.73214 25.2064 8.42458 24.1017 7.3252C23.0032 6.21981 21.6963 5.34329 20.2567 4.74637C18.8171 4.14946 17.2734 3.844 15.715 3.84769Z" fill="#25D366"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M12.0858 9.60401C11.8138 9.00922 11.5276 8.99717 11.2692 8.98687L10.5736 8.97852C10.3316 8.97852 9.93846 9.0679 9.60608 9.42544C9.27369 9.78297 8.33594 10.6471 8.33594 12.4046C8.33594 14.1622 9.63628 15.8605 9.81747 16.0991C9.99866 16.3377 12.3277 20.0594 16.0162 21.4913C19.0813 22.6813 19.705 22.4446 20.3706 22.3852C21.0361 22.3257 22.5175 21.521 22.8197 20.6869C23.1219 19.8527 23.1221 19.138 23.0315 18.9886C22.9409 18.8391 22.6989 18.7503 22.3357 18.5716C21.9725 18.3928 20.1888 17.5287 19.8562 17.4094C19.5236 17.2901 19.2818 17.2308 19.0396 17.5883C18.7975 17.9459 18.1029 18.7501 17.8911 18.9886C17.6793 19.227 17.4679 19.2569 17.1047 19.0783C16.7416 18.8998 15.5731 18.5224 14.1867 17.3054C13.108 16.3585 12.3799 15.1892 12.1679 14.8318C11.9559 14.4745 12.1454 14.2809 12.3274 14.1029C12.4902 13.9428 12.6901 13.6858 12.8719 13.4773C13.0537 13.2688 13.1135 13.1197 13.2343 12.8817C13.3551 12.6437 13.2949 12.4346 13.2041 12.256C13.1133 12.0774 12.4083 10.3105 12.0858 9.60401Z" fill="white"/> <defs> <filter id="filter0_f_9477_7201" x="1.21611" y="1.18682" width="29.5678" height="29.6889" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> <feFlood flood-opacity="0" result="BackgroundImageFix"/> <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> <feGaussianBlur stdDeviation="0.644873" result="effect1_foregroundBlur_9477_7201"/> </filter> </defs> </svg>',o+="</div>",o+='<div class="whatsapp-popup-title-section">',o+='<div class="whatsapp-popup-title">'+t("#"+e+"_popup_title").val()+"</div>",o+='<div class="whatsapp-popup-sub-title">'+t("#"+e+"_popup_sub_title").val()+"</div>",o+="</div>",o+='<div class="whatsapp-popup-close-btn"><span class="dashicons dashicons-arrow-down-alt2"></span></div>',o+="</div>",o+='<div class="whatsapp-popup-body">',""!=t("#"+e+"_user_profile_img").val()&&(o+="<img src='"+t("#"+e+"_user_profile_img").val()+"' class='wp-user-profile-img'>"),""!=t("#"+e+"_popup_text").val()&&(o+='<div class="whatsapp-chat '+a+'">',o+='<div class="whatsapp-chat-user-name">'+t("#"+e+"_name_to_display").val()+"</div>",o+='<div class="whatsapp-chat-content">'+t("#"+e+"_popup_text").val()+"</div>",o+='<div class="whatsapp-chat-time">'+i+"</div>",o+="</div>"),o+="</div>",o+='<div class="whatsapp-popup-footer">',o+='<input type="text" name="text" class="whatsapp-chat-input" value="">',o+='<div class="whatsapp-form-btn">',o+='<button type="button" class="whatsapp-send-btn">',o+='<svg viewBox="0 0 24 24" height="24" width="24" version="1.1" x="0px" y="0px" enable-background="new 0 0 24 24"><title>send</title><path d="M1.101,21.757L23.8,12.028L1.101,2.3l0.011,7.912l13.623,1.816L1.112,13.845 L1.101,21.757z"></path></svg>',o+='<span class="sr-only">Submit</span>',o+="</button>",o+="</div>",o+="</div>",o+="</div>";var c=t(".close-gsb-action-button a").html();t(".gsb-whatsapp-button").remove();var l="<div class='gsb-whatsapp-button'><a href='javascript:;' class='cta-button'>"+c+"</a></div>";return t(".ginger-sticky-buttons .main-button .main-action-button").append(l),t(".ginger-sticky-buttons .main-button .single-btn").append(l),o}(L);t(e).insertBefore(".ginger-sticky-buttons .sticky-button-list .button-list")}})),t(".ginger-sticky-buttons").hasClass("open-wechat-popup")&&(t(".main-button").removeClass("hide-tooltip"),t(".main-button").addClass("active-tooltip"),t(".ginger-sticky-buttons").removeClass("open-wechat-popup")),t(".btn-for-"+c+":checked").length>0&&t(".btn-for-"+c+":checked").each((function(){if(L=t(this).closest("li.gsb-settings").attr("data-button"),"wechat"==(p=t(this).closest("li.gsb-settings").attr("data-label"))&&t("#social-buttons-"+L+"-settings").length&&""!=t("#"+L+"_qr_code_input").val()){t("#"+L+"_popup").remove();var e=function(e){var n="";""!=t("#"+e+"_qr_popup_heading").val()&&""!=t("#ginger_sb_"+e+"_value").val()&&(n=": ");var s="";s+='<div class="wechat-popup" id="'+e+'_popup">',s+='<div class="wechat-popup-header">',s+='<div class="wechat-profile">',s+='<svg xmlns="http://www.w3.org/2000/svg" height="512" viewBox="0 0 24 24" width="512" style="color: rgb(255, 255, 255); fill: rgb(255, 255, 255);"><path d="M12.82 9.618c-7.242 3.732-2.425 13.745 6.6 11.13.842.327 1.592.857 2.408 1.25-.21-.7-.436-1.412-.676-2.11 2.8-1.995 3.414-4.818 2.38-7.138-1.616-3.677-6.776-5.183-10.72-3.133zm2.53 3.658c-.21.655-1.156.85-1.615.353-.506-.46-.31-1.424.355-1.63.734-.3 1.582.54 1.26 1.277zm4.78.094h.014c-.257.587-1.14.725-1.575.27-.21-.192-.27-.48-.344-.733.104-.46.42-.937.93-.96.705-.098 1.336.776.975 1.422z"></path><path d="M17.414 8.248c-.436-2.144-1.936-3.955-3.824-5h.027v-.001C6.917-.54-1.425 4.742.187 10.97c.433 1.848 1.71 3.397 3.262 4.43-.3.853-.585 1.706-.855 2.565L5.52 16.4c1.17.377 2.415.56 3.66.52-1.538-4.412 2.407-9.086 8.234-8.67zm-6.077-2.56c.785-.316 1.713.345 1.65 1.2L13 6.89c.008.965-1.275 1.567-1.995.913-.747-.538-.535-1.845.342-2.115zM6.932 7.134c-.172.838-1.29 1.243-1.946.68-.76-.537-.546-1.868.345-2.14.873-.338 1.865.552 1.6 1.46z"></path></svg>',s+="</div>",s+='<div class="wechat-popup-title-section">',s+='<div class="wechat-popup-title">'+t("#"+e+"_qr_popup_heading").val()+n+t("#ginger_sb_"+e+"_value").val()+"</div>",s+="</div>",s+='<div class="wechat-popup-close-btn"><span class="dashicons dashicons-arrow-down-alt2"></span></div>',s+="</div>",s+='<div class="wechat-popup-body">',""!=t("#"+e+"_qr_heading").val()&&(s+='<div class="wechat-qr-code-header">'+t("#"+e+"_qr_heading").val()+":</div>"),s+='<div class="wechat-qr-popup-img">',s+='<img src="'+t("#"+e+"_qr_code_input").val()+'" alt="QR code">',s+="</div>",s+="</div>",s+="</div>";var i=t(".close-gsb-action-button a").html();t(".gsb-wechat-button").remove();var a="<div class='gsb-wechat-button'><a href='javascript:;' class='cta-button'>"+i+"</a></div>";return t(".ginger-sticky-buttons .main-button .main-action-button").append(a),t(".ginger-sticky-buttons .main-button .single-btn").append(a),s}(L);t(e).insertBefore(".ginger-sticky-buttons .sticky-button-list .button-list")}})),L=parseInt(t("input[name='widget_settings[icon_size]']").val());var u=Math.ceil(2*L/10);t(".channel-btn, .single-btn .gsb-whatsapp-button, .single-btn .gsb-contact-button").css("width",L).css("height",L).css("line-height",L+"px"),t(".channel-btn a, .main-action-button").css("width",L).css("height",L).css("line-height",L+"px").css("padding",u+"px"),t(".view-grid .grid_view .grid-channel a .ginger-button-icon.has-image").closest("a.gsb-social-channel").css("cssText","padding:0 !important;").css("width",L).css("height",L).css("line-height",L+"px"),t(".channel-btn i").css("line-height",L+"px");var b=L+10;t(".ginger-sticky-buttons .scw-form-container, .ginger-sticky-buttons .whatsapp-popup, .ginger-sticky-buttons .wechat-popup").css("bottom",b+"px");var h=t(".preview-layout").find(".inner").outerHeight()-parseInt(L+65);t(".ginger-sticky-buttons .scw-form-container .scw-form-body").css("max-height",h+"px");var m=t(".preview-layout").find(".inner").outerHeight()-parseInt(L+65+10);t(".ginger-sticky-buttons .whatsapp-popup .whatsapp-popup-body, .ginger-sticky-buttons .wechat-popup .wechat-popup-body").css("max-height",m+"px"),t(".channel-btn span.ginger-button-icon.has-image, .ginger-sticky-buttons img, .channel-btn span.ginger-button-icon.has-image img").css("width",L).css("height",L).css("line-height",L+"px");var v=parseInt(L-parseInt(.15*L)),f=Math.ceil(2*v/10);"corner_circle_view"==t(".ginger-menu-view:checked").val()&&(t(".button-list .channel-btn a").css("width",v).css("height",v).css("line-height",v+"px").css("padding",f+"px"),t(".button-list .channel-btn span.ginger-button-icon.has-image, .button-list .channel-btn span.ginger-button-icon.has-image img").css("width",v).css("height",v).css("line-height",v+"px")),L=parseInt(t("input[name='widget_settings[border_radius]']").val()),isNaN(L)&&(L=28),t(".channel-btn a, .channel-btn, .ginger-sticky-buttons img, .close-gsb-button, .channel-btn span.ginger-button-icon, .channel-btn span.ginger-button-icon img").css("border-radius",L+"px").css("-moz-border-radius",L+"px").css("-webkit-border-radius",L+"px"),"right"==(L=t("input[name='widget_settings[position]']:checked").val())?(t(".ginger-sticky-buttons").removeClass("left-position").addClass("right-position"),t(".channel-btn, .channel-btn span.ginger-button-icon, .close-gsb-button, .single-btn").attr("data-ginger-tooltip-location","left")):"left"==L?(t(".ginger-sticky-buttons").removeClass("right-position").addClass("left-position"),t(".channel-btn, .channel-btn, .channel-btn span.ginger-button-icon, .close-gsb-button, .single-btn").attr("data-ginger-tooltip-location","right")):"custom"==L&&("right"==(L=t("#select-custom_position").val())?(t(".ginger-sticky-buttons").removeClass("left-position").addClass("right-position"),t(".channel-btn, .channel-btn, .channel-btn span.ginger-button-icon, .close-gsb-button, .single-btn").attr("data-ginger-tooltip-location","left")):"left"==L&&(t(".ginger-sticky-buttons").removeClass("right-position").addClass("left-position"),t(".channel-btn, .channel-btn, .channel-btn span.ginger-button-icon, .close-gsb-button, .single-btn").attr("data-ginger-tooltip-location","right"))),"corner_circle_view"==r&&t(".button-list .channel-btn, .button-list .channel-btn span.ginger-button-icon").attr("data-ginger-tooltip-location","top"),"icon_view"==r?t("#menu_view_vertical").is(":checked")?t(".ginger-sticky-buttons").removeClass("horizontal-menu").addClass("vertical-menu"):(t(".button-list .channel-btn, .button-list .channel-btn span.ginger-button-icon").attr("data-ginger-tooltip-location","top"),t(".ginger-sticky-buttons").removeClass("vertical-menu").addClass("horizontal-menu")):t(".ginger-sticky-buttons").removeClass("horizontal-menu").addClass("vertical-menu"),t("#default_state_click").is(":checked")?(t(".ginger-sticky-buttons").addClass("menu-open"),t(".button-list").addClass(t("#ginger_menu_animation").val()),t(".main-button").addClass("hide-tooltip").removeClass("active-tooltip"),t(".button-list .channel-btn").addClass("active"),t("#show_close_button").is(":checked")?t(".ginger-sticky-buttons").removeClass("has-no-close-button"):"corner_circle_view"!=t(".ginger-menu-view:checked").val()?t(".ginger-sticky-buttons").addClass("has-no-close-button"):t(".ginger-sticky-buttons").removeClass("has-no-close-button")):t("#channel-settings").hasClass("active")?t(".button-list .channel-btn").addClass("active"):(t(".ginger-sticky-buttons").removeClass("menu-open"),t(".button-list").removeClass(t("#ginger_menu_animation").val()),t(".main-button").removeClass("hide-tooltip"),t(".button-list .channel-btn").removeClass("active"),t(".ginger-sticky-buttons").removeClass("has-no-close-button")),"list_view"!=r&&"grid_view"!=r||t(".ginger-sticky-buttons").removeClass("has-no-close-button"),t("#has_pending_message").is(":checked")?(t(".pending-message-setting").addClass("active"),t("#no_of_messages").addClass("is-required")):(t(".pending-message-setting").removeClass("active"),t("#no_of_messages").removeClass("is-required")),i="<style>",i+=".whatsapp-chat.no-user-profile:before { border-top: 0 solid transparent;}",i+=".whatsapp-chat.no-user-profile { border-top-left-radius: 6px;}";var _=0,C=t(".btn-for-"+c+":checked").length,x=parseInt(t("input[name='widget_settings[icon_size]']").val()),T=t("#ginger_menu_animation").val(),S=t("input[name='widget_settings[position]']:checked").val(),M=0;for(_=0;_<C;_++)"corner_circle_view"==t(".ginger-menu-view:checked").val()?"right"==S?(M=y(_,x,S),i+=".ginger-sticky-buttons .button-list.corner_circle_view .channel-btn:nth-child("+(_+1)+") {opacity: 0; visibility: hidden; margin-bottom: 0; position: absolute;}",i+=".ginger-sticky-buttons.menu-open .button-list.corner_circle_view .channel-btn:nth-child("+(_+1)+") {transform: translate("+-1*M[0]+"px, "+-1*M[1]+"px); opacity: 1; visibility: visible; transition: all ease-in-out 250ms, transform 200ms "+150*_+"ms, opacity 200ms "+150*_+"ms}"):(M=y(_,x,S),i+=".ginger-sticky-buttons .button-list.corner_circle_view .channel-btn:nth-child("+(_+1)+") {opacity: 0; visibility: hidden; margin-bottom: 0; position: absolute;}",i+=".ginger-sticky-buttons.menu-open .button-list.corner_circle_view .channel-btn:nth-child("+(_+1)+") {transform: translate("+M[0]+"px, "+-1*M[1]+"px); opacity: 1; visibility: visible; transition: all ease-in-out 250ms, transform 200ms "+150*_+"ms, opacity 200ms "+150*_+"ms}"):t("#menu_view_vertical").is(":checked")?"ginger-menu-none"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1);transition:none; display: block;}"):"ginger-menu-slide"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY("+(x+5)*(C-_)+"px) scale(1); transform: translateY("+(x+5)*(C-_)+"px) scale(1); transition-delay: "+.09*(_+1)+"s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px) scale(1); transform: translateY(0px)  scale(1);visibility: visible;opacity: 1;}"):"ginger-menu-fade"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1); opacity: 0; visibility: hidden; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1);  opacity: 1; visibility: visible;}"):"ginger-menu-spin"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px)  rotate(0deg); transform: translateY(0px) rotate(0deg); opacity: 0; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px) rotate(360deg); transform: translateY(0px)  rotate(360deg);opacity: 1;}"):"ginger-menu-pop"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px) scale(0); transform: translateY(0px) scale(0); transition-delay: "+.075*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px) scale(1); transform: translateY(0px) scale(1);}"):(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateY(0px); transform: translateY(0px)  scale(1); display: block;}"):"right"==S?"ginger-menu-none"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: block;}"):"ginger-menu-slide"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX("+(x+8)*(C-_)+"px) scale(1); transform: translateX("+(x+8)*(C-_)+"px) scale(1); transition-delay: "+.075*(_+1)+"s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(1); transform: translateX(0px)  scale(1); opacity: 1; visibility: visible;}"):"ginger-menu-fade"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); opacity: 0; visibility: hidden; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1);  opacity: 1; visibility: visible;}"):"ginger-menu-spin"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px)  rotate(0deg); transform: translateX(0px)  rotate(0deg); opacity: 0; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) rotate(360deg); transform: translateX(0px) rotate(360deg); opacity: 1;}"):"ginger-menu-pop"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(0); transform: translateX(0px) scale(0); transition-delay: "+.075*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(1); transform: translateX(0px) scale(1);}"):(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: block;}"):"ginger-menu-none"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: block;}"):"ginger-menu-slide"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(-"+(x+5)*(C-_)+"px) scale(1); transform: translateX(-"+(x+5)*(C-_)+"px) scale(1); transition-delay: "+.075*(_+1)+"s; opacity: 0; visibility: hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(1); transform: translateX(0px)  scale(1); opacity: 1; visibility :visible;}"):"ginger-menu-fade"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); opacity: 0; visibility: hidden; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1);  opacity: 1; visibility: visible;}"):"ginger-menu-spin"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px)  rotate(0deg); transform: translateX(0px)  rotate(0deg); opacity :0; transition-delay: "+.1*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) rotate(360deg); transform: translateX(0px) rotate(360deg); opacity: 1;}"):"ginger-menu-pop"==T?(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(0); transform: translateX(0px) scale(0); transition-delay: "+.075*(C-_-1)+"s;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px) scale(1); transform: translateX(0px) scale(1);}"):(i+=".ginger-sticky-buttons .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: none;}",i+=".ginger-sticky-buttons.menu-open .button-list.icon_view .channel-btn:nth-child("+(_+1)+") {-webkit-transform: translateX(0px); transform: translateX(0px)  scale(1); display: block;}");i+=".ginger-sticky-buttons .button-list.list_view {-webkit-transform: translateY(50px) scale(1); transform: translateY(50px) scale(1); transition-delay: 0.5s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.list_view {-webkit-transform: translateY(0px) scale(1); transform: translateY(0px)  scale(1);visibility: visible;opacity: 1;}",i+=".ginger-sticky-buttons .button-list.grid_view {-webkit-transform: translateY(50px) scale(1); transform: translateY(50px) scale(1); transition-delay: 0.5s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.grid_view {-webkit-transform: translateY(0px) scale(1); transform: translateY(0px)  scale(1);visibility: visible;opacity: 1;}",i+=".ginger-sticky-buttons .button-list.menu_view {-webkit-transform: translateY(50px) scale(1); transform: translateY(50px) scale(1); transition-delay: 0.2s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons .button-list.menu_view .channel-btn {transition-delay: 0.2s; opacity: 0; visibility:hidden;}",i+=".ginger-sticky-buttons.menu-open .button-list.menu_view .channel-btn {opacity: 1; visibility:visible;}",i+=".ginger-sticky-buttons.menu-open.right-position .button-list.menu_view {-webkit-transform: translateY(-"+b+"px) scale(1); transform: translateY(-"+b+"px)  scale(1);visibility: visible;opacity: 1;}",i+=".ginger-sticky-buttons.menu-open.left-position .button-list.menu_view {-webkit-transform: translateY(-5px) scale(1); transform: translateY(-5px)  scale(1);visibility: visible;opacity: 1;}",i+=".ginger-sticky-buttons.menu-open.has-no-close-button .button-list.menu_view {-webkit-transform: translateY(0px) scale(1); transform: translateY(0px)  scale(1);visibility: visible;opacity: 1;}",("open"==t("input[name='widget_settings[default_state]']:checked").val()&&"yes"==t("input[name='widget_settings[show_close_button]']:checked").val()||"open"==t("input[name='widget_settings[default_state]']:checked").val()&&"corner_circle_view"==t(".ginger-menu-view:checked").val())&&t(".ginger-sticky-buttons").addClass("has-no-animation"),L=""==t("input[name='tooltip_settings[tooltip_height]']").val()?20:parseInt(t("input[name='tooltip_settings[tooltip_height]']").val()),i+=".ginger-sticky-buttons [data-ginger-tooltip]:before, .ginger-sticky-buttons .cta-tooltip, .ginger-sticky-buttons .cta-tooltip p {line-height: "+L+"px}",L=""==t("input[name='tooltip_settings[border_radius]']").val()?5:parseInt(t("input[name='tooltip_settings[border_radius]']").val()),i+=".ginger-sticky-buttons [data-ginger-tooltip]:before, .ginger-sticky-buttons .cta-tooltip {border-radius: "+L+"px}",L=""==t("input[name='tooltip_settings[font_size]']").val()?16:parseInt(t("input[name='tooltip_settings[font_size]']").val()),i+=".ginger-sticky-buttons [data-ginger-tooltip]:before, .ginger-sticky-buttons .cta-tooltip, .ginger-sticky-buttons .cta-tooltip p {font-size: "+L+"px}",i+="</style>",t(".ginger-sticky-buttons .button-list .ginger-button-icon").length>0&&t(".channel-title").length>0&&t(".channel-title").each((function(){L=t(this).attr("data-channel"),"list_view"!=r&&"menu_view"!=r&&t(".ginger-sticky-buttons .button-list .ssb-btn-bg-"+L).attr("data-ginger-tooltip",t(this).val()),"grid_view"==r&&t(".ginger-sticky-buttons .button-list .ssb-btn-bg-"+L).attr("data-ginger-tooltip-location","top")})),t(".inline-style").html(i),t(".ginger-sticky-buttons .remove-channel-img").remove(),t(".ginger-sticky-buttons:not(.view-grid) span.has-image").each((function(){t(this).closest("a").css("padding","0px")})),t("#chat_icon_custom").is(":checked")&&""!=t("#custom_cta_icon").val()?t(".gsb-main-action-button .cta-button").addClass("has-image"):t(".gsb-main-action-button .cta-button").removeClass("has-image"),t("#gsb-google-font").remove();var I=t("#ginger_sb_font_family").val();if(""!=I&&"Arial"!=I&&"Tahoma"!=I&&"Verdana"!=I&&"Helvetica"!=I&&"Times New Roman"!=I&&"Trebuchet MS"!=I&&"Georgia"!=I&&t("head").append("<link id='gsb-google-font' href='https://fonts.googleapis.com/css?family="+I+"' rel='stylesheet' type='text/css' >"),""==I?t(".ginger-sticky-buttons").css("font-family","-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):t(".ginger-sticky-buttons").css("font-family",I),t(".scw-pending-message").remove(),(1==t(".btn-for-"+c+":checked").length||t(".btn-for-"+c+":checked").length>1&&!t("#default_state_click").is(":checked"))&&""!=t("#no_of_messages").val()&&t("#has_pending_message").is(":checked")){t(".gsb-main-action-button, .gsb-main-action-button > a, .single-btn > .channel-btn, .single-btn > .channel-btn a").append("<span class='scw-pending-message'>"+t("#no_of_messages").val()+"</span>");var L=20*t(".main-action-button").outerHeight(!0)/54;t(".scw-pending-message").css({width:L+"px",height:L+"px","font-size":parseInt(L/4)+5+"px"})}var X=t("#ginger_sb_greeting_text").val();if(t(".scw-greeting-message").remove(),(1==t(".btn-for-"+c+":checked").length&&"click"==t(".default-state-option:checked").val()||t(".btn-for-"+c+":checked").length>1&&"click"==t(".default-state-option:checked").val())&&""!=X&&t("#show_greeting_message").is(":checked")){var B="";B+="<span class='scw-greeting-message'>",B+="<span>"+t("#ginger_sb_greeting_text_ifr").contents().find("body").html(),B+='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M18 6L6 18M6 6L18 18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>',B+="</span>",t(".ginger-sticky-buttons .sticky-button-list .main-button").append(B)}k()}else t(".ginger-sticky-buttons").hide();else t(".ginger-sticky-buttons").hide()}function y(t,e,n){var s=e;e=parseInt(e-parseInt(.15*e))+15;var i,a=0,o=1.2,c=-1.5,l=1,r=0;do{c=Math.round(e*Math.cos(.5*(r-a)*Math.PI/(l+1))),i=Math.round(e*Math.sin(.5*(r-a)*Math.PI/(l+1))),r++,c<0&&(a=--r,o+=.9,l+=1)}while(r<=t);return c*=o,i*=o,i=parseFloat(i)-parseFloat(.15*s),"right"==n&&(c=parseFloat(c)-parseFloat(.15*s)),[c,i]}function x(){s="",t(".selected-button-settings .gsb-settings").each((function(){s+=t(this).data("button")+","})),t("#gsb_selected_channels").val(s),C()}function T(){if(t("#ginger-sticky-element").length){var e=15;t("#wpadminbar").hasClass("mobile")||(e=15+parseInt(t("#wpadminbar").height()));var n=t("#ginger-sticky-element").offset().top-e-t(window).scrollTop();t(".ginger-sticky-box").width(t(".ginger-box-right").innerWidth()-24),n<=0?t(".ginger-box-layout").hasClass("sticky")||t(".ginger-box-layout").addClass("sticky"):t(".ginger-box-layout").removeClass("sticky"),t("#analytics-settings").length&&t(".ginger-box-layout").hasClass("sticky")&&((n=t("#analytics-settings").offset().top-e-t(window).scrollTop()-t(".ginger-sticky-box").height()+15)<0?t(".ginger-sticky-box").css("margin-top",n+"px"):t(".ginger-sticky-box").css("margin-top","0"))}t(".preview-layout").length&&("mobile"!=(s=t("input[name='device_switch']:checked").val())?t(".preview-layout .inner").height(parseInt(.6*t(".preview-layout .inner").width())):t(".preview-layout .inner").height(parseInt(1.6*t(".preview-layout .inner").width())))}function S(e,n){if(("whatsapp"==n||"phone"==n||"sms"==n)&&t("#ginger_sb_"+e+"_value").length){t("#ginger_sb_"+e+"_value").intlTelInput({dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,initialDialCode:!0,autoInsertDialCode:!1}).on("countrychange",(function(){var n=t("#ginger_sb_"+e+"_value").intlTelInput("getSelectedCountryData");""==t("#ginger_sb_"+e+"_value").val()&&t("#ginger_sb_"+e+"_value").val("+"+n.dialCode)}));var s=t("#ginger_sb_"+e+"_value").offset(),i=t("#ginger_sb_"+e+"_value").outerWidth(),a="body.rtl .iti.iti--container {left: "+parseInt(s.left+i)+"px !important;}";t("#intlinput_css_"+e).remove(),t("head").append("<style id='intlinput_css_"+e+"'>"+a+"</style>")}}t(document).ready((function(){t(document).on("click","a[href='#']",(function(t){t.preventDefault()})),t(document).on("click",".sticky-help-button button, .open-help-form",(function(e){e.stopPropagation(),t(".sticky-help-form").hasClass("active")?t(".sticky-help-form").removeClass("active"):(t(".sticky-help-form").addClass("active"),t(".sticky-help-form #name").focus())})),t(document).on("click",".hide-help-form",(function(){t(".sticky-help-form").removeClass("active")})),t(document).on("submit","#ginger_sb_form",(function(){if(g=0,t(this).find(".ginger-error-message").remove(),t(this).find(".ginger-input-error").removeClass("ginger-input-error"),t(this).find(".is-required").each((function(){""!=t(this).val()&&"0"!=t(this).val()||(s=t(this).attr("data-label"),d=(d=BUTTON_SETTINGS.required_message).replace("%s",s),t(this).closest(".gp-form-input").append("<span class='ginger-error-message'>"+d+"</span>"),t(this).addClass("ginger-input-error"),g++)})),"Save and View Dashboard"==t(document.activeElement).text()?t("#save_btn_type").val("save-view-btn"):t("#save_btn_type").val("save-btn"),0==g)if("no"==t(this).find("#check_widget_status").val()){if(!u)return t(".form-confirmation").show(),t(".save-confirm-btn").focus(),!1;t(this).ajaxSubmit(m)}else t(this).ajaxSubmit(m);else t(".gsb-settings input").hasClass("ginger-input-error")&&(t(".setting-tab").removeClass("active"),t(".widget-sidebar .widget-sidebar-step a").removeClass("active"),t("#channel-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("active"),t(this).find(".ginger-input-error:first").focus()),t(this).find(".ginger-input-error:first").hasClass("contact-btn-text")&&(t(".gsb-settings.contact-form-li").addClass("active"),t(this).find(".ginger-input-error:first").focus()),t(this).find(".ginger-input-error:first").hasClass("toggle-field-required")&&(t(this).find(".ginger-input-error:first").closest(".toggle-field-content").show(),t(this).find(".ginger-input-error:first").focus());return!1})),t(document).on("click",".save-confirm-btn",(function(){t(this).closest("#ginger_sb_form").find("#check_widget_status").val("yes"),u=!0,t("#ginger_sb_form").trigger("submit"),t(".form-confirmation").hide()})),t(document).on("click",".no-confirm-btn",(function(){u=!0,t("#ginger_sb_form").trigger("submit"),t(".form-confirmation").hide()})),t(document).on("blur",".is-required",(function(){""==t(this).val()?t(this).hasClass("ginger-input-error")||(s=t(this).attr("data-label"),d=(d=BUTTON_SETTINGS.required_message).replace("%s",s),t(this).closest(".gp-form-input").append("<span class='ginger-error-message'>"+d+"</span>"),t(this).addClass("ginger-input-error")):(t(this).removeClass("ginger-input-error"),t(this).closest(".gp-form-field").find(".ginger-error-message").remove())})),t("#ginger_sb_form input[name='ginger_sb_position']").on("change",(function(){"custom"==t(this).val()?t("#custom-position").addClass("active"):t("#custom-position").removeClass("active")})),t(document).on("click","input[name='trigger_rules[on_scroll]']",(function(){t(this).is(":checked")?t("input[name='trigger_rules[page_scroll]']").prop("disabled",!1):t("input[name='trigger_rules[page_scroll]']").prop("disabled",!0)})),t(document).on("click","input[name='trigger_rules[after_seconds]']",(function(){t(this).is(":checked")?t("input[name='trigger_rules[seconds]']").prop("disabled",!1):t("input[name='trigger_rules[seconds]']").prop("disabled",!0)})),t(document).on("change","#ginger_sb_animation",(function(){s=t(this).attr("data-class"),t("#default_state_click").is(":checked")?(t(".cta-button").removeClass(s),t(".single-btn .channel-btn a").removeClass(s)):(s&&(t(".cta-button").removeClass(s),t(".single-btn .channel-btn a").removeClass(s)),t(this).attr("data-class",t(this).val()),t(".cta-button").addClass(t(this).val()),t(".single-btn .channel-btn a").addClass(t(this).val()))})),t("#ginger_sb_animation").trigger("change"),t(document).on("change","#ginger_sb_form input[type='radio']",(function(){t(this).closest(".ginger-color-list").length&&("custom_color"==t(this).val()?t(this).closest(".ginger-form-right").find(".custom-color-for-element").addClass("active"):t(this).closest(".ginger-form-right").find(".custom-color-for-element").removeClass("active"))})),t(".custom-color-picker").wpColorPicker(v),t("#wpadminbar").hasClass("mobile")&&t(".gp-sticky-box").addClass("mobile"),T(),t(document).on("click",".remove-channel-setting",(function(e){n=t(this).closest(".gsb-settings").data("button"),t("#social-buttons-"+n+"-settings").remove(),t("#social-icon-"+n).removeClass("active"),x()})),t(document).on("click",".load-channel-settings",(function(e){t(this).closest(".gsb-settings").toggleClass("active"),t(this).closest("li.gsb-settings.active").find(".pro-settings").length&&t("html, body").animate({scrollTop:t(this).closest("li.gsb-settings.active").find(".pro-settings").offset().top-50},1e3)})),t(document).on("click",".contact-form-more-setting",(function(){t(this).closest(".gsb-settings").addClass("active"),t(this).closest("li.gsb-settings.active").find(".contact-form-setting").length&&t("html, body").animate({scrollTop:t(this).closest("li.gsb-settings.active").find(".contact-form-setting").offset().top-50},1e3);var e=t(this).data("tab");t(".contact-form-setting .tab-section, .contact-form-setting .tab-setting-section").removeClass("active"),t("."+e+", #"+e).addClass("active")})),t(document).on("click","#social-links-options li:not(.add-more-channel)",(function(s){var i=t(this).data("social");if(s.stopPropagation(),n=t(this).data("social"),t(this).addClass("check-loader"),t(this).find(".channel-loader").addClass("active"),t(this).hasClass("active"))t(this).removeClass("active"),t("#social-buttons-"+n+"-settings").remove(),t("#social-links-options li").removeClass("check-loader"),t(".channel-loader").removeClass("active"),x();else if(t("#social-links-options li.active").length,!e){t(this).addClass("active");var a=t("#button_setting_id").val();e=1,t.ajax({url:ajaxurl,data:{button:n,postId:a,action:"get_gb_settings"},type:"post",cache:!1,success:function(s){e=0,"1"==(s=t.parseJSON(s)).status&&(t("#social-links-options li").removeClass("check-loader"),t(".channel-loader").removeClass("active"),t("#social-buttons-"+n+"-settings").remove(),t(".selected-button-settings").append(s.message),t(".selected-button-settings li.gsb-settings:last-child a.load-channel-settings").trigger("click"),"phone"!=i&&"whatsapp"!=i&&"sms"!=i&&t(".selected-button-settings .gsb-input-value:last input").focus()),x(),t(".color-picker:not(.wp-color-picker)").wpColorPicker(v),S(n,i),f()}})}})),t(document).on("click","#more_channel_list li",(function(n){n.stopPropagation();var s=t(this).data("social"),i=(new Date).getTime();if(h=s+"_"+i,t(this).addClass("check-loader"),t(this).find(".channel-loader").addClass("active"),!e){t(this).addClass("active");var a=t("#button_setting_id").val();e=1,t.ajax({url:ajaxurl,data:{button:h,postId:a,action:"get_gb_settings"},type:"post",cache:!1,success:function(n){e=0,"1"==(n=t.parseJSON(n)).status&&(t("#more_channel_list li").removeClass("check-loader"),t(".channel-loader").removeClass("active"),t("#social-buttons-"+h+"-settings").remove(),t(".selected-button-settings").append(n.message),t("li#social-buttons-"+h+"-settings").find("a.load-channel-settings").length?t(".selected-button-settings li.gsb-settings:last-child a.load-channel-settings").trigger("click"):t("html, body").animate({scrollTop:t("li#social-buttons-"+h+"-settings").offset().top-50},1e3),"phone"!=s&&"whatsapp"!=s&&"sms"!=s&&t(".selected-button-settings .gsb-input-value:last input").focus(),t("#more_channel_popup").removeClass("active"),t("#show_more_channel").removeClass("active")),x(),t(".color-picker:not(.wp-color-picker)").wpColorPicker(v),S(h,s),f()}})}})),t(document).on("keyup",".widget-settings input:not(.channel-value-input)",(function(){C()})),t(document).on("keyup",".widget-settings textarea",(function(){C()})),t(document).on("change",".widget-settings input, .widget-settings select, .preview-button",(function(){C()})),t(document).on("keyup",".country-list-input input",(function(){var e=t(this).val();""!=t.trim(e)?(e=e.toLowerCase(),t(".select-country > ul > li").each((function(){0==t(this).text().toLowerCase().indexOf(e)?t(this).show():t(this).hide()}))):t(".select-country > ul > li").show()})),t(document).on("keyup",".selected-country-input input",(function(){var e=t(this).val();""!=t.trim(e)?(e=e.toLowerCase(),t(".selected-country > ul > li").each((function(){0==t(this).text().toLowerCase().indexOf(e)?t(this).show():t(this).hide()}))):t(".selected-country > ul > li").show()})),t(document).on("click",".add-country",(function(){var e=t(this).closest("li").text();t(this).closest("li").addClass("hide");var n=t(this).closest("li").data("country");t(".selected-country ul").append("<li data-country='"+n+"' class='country-list'>"+e+'<span class=\'right remove-country\'><svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 11H15M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg></span></li> <input type=\'hidden\' id=\'country-name-'+n+"' name='gsb_country_rules[selected_country][]' value='"+n+"'>")})),t(document).on("click",".remove-country",(function(){var e=t(this).closest("li").data("country");t("#county-"+e).removeClass("hide"),t("#country-name-"+e).val()==e&&t("#country-name-"+e).remove(),t(this).closest("li").remove()})),t(document).on("click","input[type='checkbox']",(function(){C()}));for(var i=0;i<7;i++)t("#time-range-"+i).length&&t("#time-range-"+i).slider({range:!0,min:0,max:1439,values:[0,1439],slide:function(e,n){var s=t(n.handle).closest(".weekday-input").attr("data-index"),i=_(parseInt(n.values[0]/60),2)+":"+_(n.values[0]%60,2),a=_(parseInt(n.values[1]/60),2)+":"+_(n.values[1]%60,2);t(".start-time_"+s).text(i),t(".end-time_"+s).text(a),t("#start_time_"+s).val(n.values[0]),t("#end_time_"+s).val(n.values[1])}});t(".selected-button-settings").sortable({placeholder:"social-chat-buttons-channel-placeholder",handle:".gsb-free-settings",start:function(e,n){t(".position-icon a").addClass("grabbing")},stop:function(e,n){t(".position-icon a").removeClass("grabbing"),f()},update:function(e,n){t(".position-icon a").removeClass("grabbing"),x(),C(),f()}}),t(document).on("click",".main-button.channel-btn .gsb-main-action-button, .main-button.channel-btn .close-gsb-action-button",(function(){t(".ginger-sticky-buttons").removeClass("has-no-animation"),t(".ginger-sticky-buttons").hasClass("menu-open")?(t(".button-list .channel-btn.active").removeClass("active"),t(".ginger-sticky-buttons").removeClass("menu-open"),t(".button-list").removeClass(l),t(".main-button").removeClass("hide-tooltip"),t(".main-button").addClass("active-tooltip"),t("#default_state_click").is(":checked")?t(".cta-button").removeClass(t("#ginger_sb_animation").val()):t(".cta-button").addClass(t("#ginger_sb_animation").val())):(t(".ginger-sticky-buttons").addClass("menu-open"),t(".button-list").addClass(l),t(".main-button").removeClass("active-tooltip"),t(".main-button").addClass("hide-tooltip"),t(".button-list .channel-btn:not(.active)").addClass("active"),t(".button-list .channel-btn:not(.active)").length)})),t(document).on("change",".only-numeric",(function(){o=/^[0-9]+$/;var e=t(this).val();e.match(o)||t(this).val(e.replace(/\D/g,""))})),t(document).on("keyup",".only-numeric",(function(){o=/^[0-9]+$/;var e=t(this).val();e.match(o)||t(this).val(e.replace(/\D/g,""))})),t(".color-picker").wpColorPicker(v),k(),t(document).on("change","input[type='radio']",(function(){C()})),t(document).on("click",".upgrade-link, a.ginger-link, .ginger-upgrade-link, .img-upgrade-btn.disabled , .upgrade-link-btn",(function(e){e.preventDefault(),t("#premium-features").show()})),t(document).on("click",".ginger-popup-content",(function(t){t.stopPropagation()})),t(document).on("click",".close-ginger-popup, .ginger-popup-box-bg",(function(e){e.preventDefault(),t("#premium-features").hide(),t("#pro-features").hide()})),t(document).on("click",".remove-rule",(function(e){t(this).closest(".page-rule").remove()})),t(document).on("click",".gp-modal-bg, .gp-modal-close-btn, .hide-gp-modal",(function(){t(this).closest(".gp-modal").removeClass("active"),t(".form-confirmation").hide(),t("#show_more_channel").removeClass("active")})),t(document).on("click",".sticky-chat-widget-status",(function(){var e=t(this).is(":checked")?"yes":"no";t.ajax({url:BUTTON_SETTINGS.ajax_url,data:{setting_id:t(this).closest("tr").data("id"),nonce:t(this).closest("tr").data("nonce"),status:e,action:"gsb_buttons_change_status"},type:"post"})})),t(document).on("click",".pro-premium-features",(function(){t("#pro-features").show()})),t(document).on("click",".close-ginger-popup, .ginger-popup-box-bg",(function(){t("#premium-features").hide()})),t(document).on("click",".remove-widget",(function(){b=t(this).closest("tr").data("id"),t("#delete-widget").addClass("active")})),t(document).on("click","#delete_widget:not(.disabled)",(function(e){t(this).addClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").addClass("form-loading"),e.preventDefault(),t.ajax({url:BUTTON_SETTINGS.ajax_url,data:{widget_id:b,nonce:t("tr.gsb-buttons-col-"+b).data("nonce"),action:"gsb_buttons_remove_widget"},type:"post",success:function(e){t("#delete-widget").removeClass("active"),t("#delete_widget").removeClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").removeClass("form-loading"),e=t.parseJSON(e);var n=new SwipeHandler,s=new ToastsHandler(n);1==e.status?(t("tr.gsb-buttons-col-"+b).remove(),s.createToast({type:"success",icon:"info-circle",message:e.message,duration:5e3}),setTimeout((function(){window.location.reload()}),1e3)):(t(".save-changes").prop("disabled",!1),s.createToast({type:"error",icon:"info-circle",message:e.message,duration:5e3}))}})})),t(document).keydown((function(e){27==e.keyCode&&(t(".gp-modal").removeClass("active"),t(".ginger-popup-box").hide(),t(".form-confirmation").hide(),t("#show_more_channel").removeClass("active"))})),t(document).on("click",".preview-btn",(function(){t("#preview_widget").addClass("active")})),t(document).on("click",".dropdown-button",(function(e){e.stopPropagation(),t(this).closest(".action-col").toggleClass("active")})),t(document).on("click","body, html",(function(e){t(".action-col").removeClass("active"),t(".sticky-help-form").removeClass("active"),t(".save-view-btn").removeClass("active")})),t(document).on("click",".sticky-help-form",(function(t){t.stopPropagation()})),t(document).on("click",".add-new-widget",(function(){t("#create-widget").addClass("active"),t("#create-widget .gp-form-input input").focus()})),1==BUTTON_SETTINGS.show_popup&&1!=BUTTON_SETTINGS.isSettingExists?(t("#create-widget").addClass("active"),t("#create-widget .gp-form-input input").focus(),t("#create-widget .gp-form-input input").val("Widget #1")):1==BUTTON_SETTINGS.show_popup&&1==BUTTON_SETTINGS.isSettingExists&&t("#pro-features").show(),t(document).on("click","#create_widget:not(.disabled)",(function(e){var n=0;t(this).closest(".gp-modal-data").find(".ginger-error-message").remove(),t(this).closest(".gp-modal-data").find(".ginger-input-error").removeClass("ginger-input-error"),t(this).closest(".gp-modal-data").find(".is-required").each((function(){""!=t(this).val()&&"0"!=t(this).val()||(s=t(this).attr("data-label"),d=(d=BUTTON_SETTINGS.required_message).replace("%s",s),t(this).after("<span class='ginger-error-message'>"+d+"</span>"),t(this).addClass("ginger-input-error"),n++)})),e.preventDefault(),0==n?(t(this).addClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").addClass("form-loading"),t.ajax({url:BUTTON_SETTINGS.ajax_url,data:{widget_title:t("#widget_title").val(),nonce:BUTTON_SETTINGS.nonce,action:"gsb_buttons_create_widget"},type:"post",success:function(e){t("#create-widget").removeClass("active"),t("#create_widget").removeClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").removeClass("form-loading"),e=t.parseJSON(e);var n=new SwipeHandler,s=new ToastsHandler(n);1==e.status?(s.createToast({type:"success",icon:"info-circle",message:e.message,duration:5e3}),setTimeout((function(){window.location=e.data.URL}),1e3)):(t(".save-changes").prop("disabled",!1),s.createToast({type:"error",icon:"info-circle",message:e.message,duration:5e3}))}})):t(this).find(".has-error:first").focus()})),t(document).on("click",".rename-widget",(function(){t("#rename-widget").addClass("active"),t("#rename-widget .gp-form-input input").focus(),b=t(this).closest("tr").data("id");var e=t(this).data("title");t("#rename_widget_title").val(e)})),t(document).on("click","#rename_widget:not(.disabled)",(function(e){var n=0;t(this).closest(".gp-modal-data").find(".has-error").removeClass("has-error"),t(this).closest(".gp-modal-data").find(".is-required").each((function(){""==t.trim(t(this).val())&&(t(this).addClass("has-error"),n++)})),e.preventDefault(),0==n?(t(this).addClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").addClass("form-loading"),t.ajax({url:BUTTON_SETTINGS.ajax_url,data:{widget_title:t("#rename_widget_title").val(),widget_id:b,nonce:t("tr.gsb-buttons-col-"+b).data("nonce"),action:"gsb_buttons_rename_widget"},type:"post",success:function(e){t("#rename-widget").removeClass("active"),t("#rename_widget").removeClass("disabled"),t(this).closest(".gp-modal").find(".gp-modal-content").removeClass("form-loading"),e=t.parseJSON(e);var n=new SwipeHandler,s=new ToastsHandler(n);1==e.status?(s.createToast({type:"success",icon:"info-circle",message:e.message,duration:5e3}),setTimeout((function(){window.location.reload()}),1e3)):(t(".save-changes").prop("disabled",!1),s.createToast({type:"error",icon:"info-circle",message:e.message,duration:5e3}))}})):t(this).find(".has-error:first").focus()})),t(".sumoselect-font-family").SumoSelect({search:!0}),t(document).on("click",".default-state-option",(function(){"open"==t(this).val()&&"corner_circle_view"!=t(".ginger-menu-view:checked").val()?(t(".default-state").addClass("active"),t(".cta-button").removeClass(t("#ginger_sb_animation").val())):(t(".default-state").removeClass("active"),t(".cta-button").addClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".exit-intent",(function(){t(this).is(":checked")?t(".exit-intent-setting").addClass("active"):t(".exit-intent-setting").removeClass("active")})),t(document).on("click",".page-rule-type",(function(){"custom_pages"==t(this).val()?t(".custom-page-rules").addClass("active"):t(".custom-page-rules").removeClass("active")})),t(document).on("click","#show_on_pages",(function(){t(this).is(":checked")?t("#show-pages-rule").addClass("active"):t("#show-pages-rule").removeClass("active")})),t(document).on("click","#hide_on_pages",(function(){t(this).is(":checked")?t("#hide-pages-rule").addClass("active"):t("#hide-pages-rule").removeClass("active")})),t(document).on("click",".time-rule-type",(function(){"custom_time"==t(this).val()?t(".custom-time-rules").addClass("active"):t(".custom-time-rules").removeClass("active")})),t(document).on("click","#has_pending_message",(function(){t(this).is(":checked")?t(".pending-message-setting").addClass("active"):t(".pending-message-setting").removeClass("active")})),t(document).on("click",".back-button.active",(function(){var e=t(this).closest(".scw-settings").find(".setting-tab.active").attr("id"),n=1,s="channel-settings";t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("completed"),"icon-settings"==e?(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#channel-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("active"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").data("step"),s="channel-settings"):"triggers-settings"==e?(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#icon-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").data("step"),s="icon-settings"):"targeting-settings"==e&&(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#triggers-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").data("step"),s="triggers-settings"),t(".header-step-number").text(n),t(".header-step-text").text(t("#"+s).find(".setting-title-text").text());var i=t("#"+s).find(".setting-title-text").text();i.includes("Select Channels")?i=i.replace("Select Channels","Channels"):i.includes("Customize Widget")&&(i=i.replace("Customize Widget","Customize")),t(".header-step-text-hidden").text(i);var a=n/4*100;t(".step-ratio-box").css("--value",a+"%")})),t(document).on("click",".next-button.active",(function(){var e=t(this).closest(".scw-settings").find(".setting-tab.active").attr("id"),n=1,s="channel-settings";t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("completed"),"channel-settings"==e?(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#icon-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").data("step"),s="icon-settings"):"icon-settings"==e?(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#triggers-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").data("step"),s="triggers-settings"):"triggers-settings"==e&&(t(".widget-sidebar").find(".widget-sidebar-step a").removeClass("active"),t(".setting-tab").removeClass("active"),t("#targeting-settings").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#targeting-settings']").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),n=t(".widget-sidebar").find(".widget-sidebar-step a[href='#targeting-settings']").data("step"),s="targeting-settings"),t(".header-step-number").text(n),t(".header-step-text").text(t("#"+s).find(".setting-title-text").text());var i=t("#"+s).find(".setting-title-text").text();i.includes("Select Channels")?i=i.replace("Select Channels","Channels"):i.includes("Customize Widget")&&(i=i.replace("Customize Widget","Customize")),t(".header-step-text-hidden").text(i);var a=n/4*100;t(".step-ratio-box").css("--value",a+"%")})),t(document).on("click",".back-next-btn.active",(function(){var e=t(this).closest(".scw-settings").find(".setting-tab.active").attr("id");"channel-settings"==e?(t(".back-button").removeClass("active"),t(".next-button").addClass("active")):"icon-settings"==e||"triggers-settings"==e?(t(".back-button").addClass("active"),t(".next-button").addClass("active")):"targeting-settings"==e&&(t(".back-button").addClass("active"),t(".next-button").removeClass("active"))})),t(document).on("click",".widget-sidebar a,.back-next-btn.active",(function(){t("html, body").animate({scrollTop:0})})),t(document).on("click",".widget-sidebar a",(function(e){e.preventDefault(),t(this).hasClass("active")||(t(".widget-sidebar a").removeClass("active"),t(this).addClass("active"),t(".setting-tab").removeClass("active"),t(t(this).attr("href")).addClass("active"),t(".widget-sidebar a").removeClass("completed"));var n=t(this).attr("href"),s=t(this).data("step");t(".header-step-number").text(s),t(".header-step-text").text(t(n).find(".setting-title-text").text());var i=t(n).find(".setting-title-text").text();i.includes("Select Channels")?i=i.replace("Select Channels","Channels"):i.includes("Customize Widget")&&(i=i.replace("Customize Widget","Customize")),t(".header-step-text-hidden").text(i);var a=s/4*100;t(".step-ratio-box").css("--value",a+"%"),t("#channel-settings").hasClass("active")?(t(".back-button").removeClass("active"),t(".next-button").addClass("active")):t("#icon-settings").hasClass("active")?(t(".back-button").addClass("active"),t(".next-button").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed")):t("#triggers-settings").hasClass("active")?(t(".back-button").addClass("active"),t(".next-button").addClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("completed")):t("#targeting-settings").hasClass("active")&&(t(".back-button").addClass("active"),t(".next-button").removeClass("active"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#channel-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#icon-settings']").addClass("completed"),t(".widget-sidebar").find(".widget-sidebar-step a[href='#triggers-settings']").addClass("completed"))})),t(".sumoselect").SumoSelect(),t(".selected-button-settings .gsb-settings").length>0&&t(".selected-button-settings .gsb-settings").each((function(){var e=t(this).data("label");S(t(this).data("button"),e)})),t(document).on("click",".toggle-field-title.toggle-field-clickable",(function(){t(this).closest(".toggle-field").find(".toggle-field-content").slideToggle(),t(this).closest(".toggle-field").toggleClass("active")})),t(document).on("click",".visible_check_toggle",(function(t){t.stopPropagation()})),t(document).on("change",".required_check",(function(){t(this).is(":checked")?(t(this).closest(".toggle-field").find(".required-field-message").addClass("active"),t(this).closest(".toggle-field").find(".required-field-message input").addClass("is-required")):(t(this).closest(".toggle-field").find(".required-field-message").removeClass("active"),t(this).closest(".toggle-field").find(".required-field-message input").removeClass("is-required"))})),t(document).on("change",".visible_check",(function(){t(this).is(":checked")?(t(this).closest(".toggle-field").find(".toggle-field-setting").addClass("active"),t(this).closest(".toggle-field").find(".toggle-field-title").addClass("toggle-field-clickable")):(t(this).closest(".toggle-field").find(".toggle-field-setting").removeClass("active"),t(this).closest(".toggle-field").find(".toggle-field-title").removeClass("toggle-field-clickable"),t(this).closest(".toggle-field").find(".toggle-field-content").hide(),t(this).closest(".toggle-field").removeClass("active"))})),t(document).on("keyup",".contact-form-input",(function(){t(this).closest(".toggle-field").find(".toggle-field-label").text(t(this).val())})),t(document).on("click",".redirect_check",(function(){t(this).is(":checked")?(t(this).closest(".contact-form-color-option-inner").find(".redirect-field-contact").addClass("active"),t(this).closest(".contact-form-color-option-inner").find(".redirect-field-contact input[type=text]").addClass("is-required")):(t(this).closest(".contact-form-color-option-inner").find(".redirect-field-contact").removeClass("active"),t(this).closest(".contact-form-color-option-inner").find(".redirect-field-contact input[type=text]").removeClass("is-required"))})),t(document).on("click",".close_after_submit_check",(function(){t(this).is(":checked")?t(this).closest(".contact-form-color-option-inner").find(".close-after-field-contact").addClass("active"):t(this).closest(".contact-form-color-option-inner").find(".close-after-field-contact").removeClass("active")})),t(document).on("change",".ginger-menu-view",(function(){var e=t("input[name='widget_settings[view]']:checked").val();"list_view"==e||"grid_view"==e?(t(".list-view-field").addClass("active"),t(".grid-view-field").addClass("active"),t(".icon-view-field").each((function(){t(this).hasClass("default-state")?t(this).removeClass("activate"):t(this).removeClass("activate active")})),"grid_view"==e&&t(".grid-view-field").addClass("active")):(t(".list-view-field").removeClass("active"),t(".grid-view-field").removeClass("active"),t(".icon-view-field").each((function(){t(this).hasClass("default-state")?t(this).addClass("activate"):t(this).addClass("activate active")})),"corner_circle_view"==e?(t(".default-state").removeClass("active"),t(".menu-animation").removeClass("active"),t(".menu-view").removeClass("active")):"menu_view"==e?(t(".menu-animation").removeClass("active"),t(".menu-view").removeClass("active"),"open"==t(".default-state-option:checked").val()?t(".default-state").addClass("active"):t(".default-state").removeClass("active")):(t(".default-state").addClass("active"),t(".menu-animation").addClass("active"),"open"==t(".default-state-option:checked").val()?t(".menu-view").addClass("active"):t(".default-state").removeClass("active")))})),t(document).on("click",".close-view-btn",(function(){t(".ginger-sticky-buttons").removeClass("menu-open"),t(".ginger-sticky-buttons").find(".main-button").removeClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").addClass("active-tooltip"),t(".ginger-sticky-buttons").find(".channel-btn").removeClass("active"),t(".ginger-sticky-buttons").find(".button-list").removeClass(l)})),t(document).on("click",".whatsapp-channel-widget-settings",(function(){t(this).closest(".gsb-settings").addClass("active"),t(this).closest("li.gsb-settings.active").find(".whatsapp-form-setting").length&&t("html, body").animate({scrollTop:t(this).closest("li.gsb-settings.active").find(".whatsapp-form-setting").offset().top-50},1e3);var e=t(this).data("tab"),n=t(this).data("tabid");t(this).closest("li.gsb-settings").find(".whatsapp-form-setting .tab-section, .whatsapp-form-setting .tab-setting-section").removeClass("active"),t("."+e+", #"+n).addClass("active")})),t(document).on("click",".show-whatsapp-popup",(function(){t(this).is(":checked")?(t(this).closest("li.gsb-settings").find(".whatsapp-widget-setting").removeClass("add-blur-bg"),t(this).closest("li.gsb-settings").find(".mobile-link-settings").removeClass("active")):(t(this).closest("li.gsb-settings").find(".whatsapp-widget-setting").addClass("add-blur-bg"),t(this).closest("li.gsb-settings").find(".mobile-link-settings").addClass("active"))})),t(document).on("click",".img-profile-upload-btn",(function(){var e=t(this).closest("li.gsb-settings").data("button"),n=wp.media({title:"Select image for whatsapp profile",multiple:!1,library:{type:"image"}}).open().on("select",(function(s){var i=n.state().get("selection").first();i=i.toJSON(),t("#custom_"+e+"_profile").val(i.url),t("li#social-buttons-"+e+"-settings").find(".custom-profile-img img").remove(),t("li#social-buttons-"+e+"-settings").find(".custom-profile-img").append("<img src='"+i.url+"' alt='Profile image' />"),t("li#social-buttons-"+e+"-settings").find(".remove-whatsapp-profile ").addClass("active"),C()}))})),t(document).on("click",".remove-whatsapp-profile",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#custom_"+e+"_profile").val(""),t("li#social-buttons-"+e+"-settings").find(".custom-profile-img img").remove(),t("li#social-buttons-"+e+"-settings").find(".remove-whatsapp-profile").removeClass("active"),C()})),t(document).on("click",".whatsapp-user-profile-img",(function(){var e=t(this).closest("li.gsb-settings").data("button"),n=wp.media({title:"Select image for whatsapp user profile",multiple:!1,library:{type:"image"}}).open().on("select",(function(s){var i=n.state().get("selection").first();i=i.toJSON(),t("#"+e+"_user_profile_img").val(i.url),t("li#social-buttons-"+e+"-settings").find(".custom-user-profile-img img").remove(),t("li#social-buttons-"+e+"-settings").find(".custom-user-profile-img").append("<img src='"+i.url+"' alt='Profile image' />"),t("li#social-buttons-"+e+"-settings").find(".remove-whatsapp-user-profile").addClass("active"),C()}))})),t(document).on("click",".remove-whatsapp-user-profile",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#"+e+"_user_profile_img").val(""),t("li#social-buttons-"+e+"-settings").find(".custom-user-profile-img img").remove(),t("li#social-buttons-"+e+"-settings").find(".remove-whatsapp-user-profile").removeClass("active"),C()})),t(document).on("click",".more-save-option",(function(e){e.preventDefault(),e.stopPropagation(),t(".save-view-btn").toggleClass("active")})),t(document).on("click",".tab-section",(function(){var e=t(this).data("id");t(this).closest("li").find(".tab-section").removeClass("active"),t(this).addClass("active"),t(this).closest("li").find(".tab-setting-section").removeClass("active"),t("#"+e).addClass("active")})),t(document).on("click",".wp-badges",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#"+e+"_message").val(t("#"+e+"_message").val()+" "+t(this).text())})),t(document).on("click",".mail-badges",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#"+e+"_subject").val(t("#"+e+"_subject").val()+" "+t(this).text())})),t(document).on("click",".sms-badges",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#"+e+"_message").val(t("#"+e+"_message").val()+" "+t(this).text())})),t(document).on("click",".view-badges",(function(){tinyMCE.get("grid_view_title").focus(),tinymce.activeEditor.execCommand("mceInsertContent",!1,t(this).text()),C()})),f(),t(document).on("click",".open-contact-form-channel",(function(){t(".ginger-sticky-buttons").hasClass("menu-open")?(t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-form"),t(".ginger-sticky-buttons").hasClass("one-channel")&&(t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip"))):t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").addClass("open-form"),t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip")):t(".ginger-sticky-buttons").removeClass("open-form").addClass("menu-open"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").removeClass(t("#ginger_sb_animation").val())):(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .gsb-contact-button a").removeClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".gsb-contact-button a",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-form").addClass("menu-open"),t(".button-list").addClass(l),t(".main-button").removeClass("active-tooltip"),t(".main-button").addClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons").addClass("has-no-animation"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-contact-button a").addClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".open-whatsapp-channel",(function(){var e=t(this).data("wpid");t(".ginger-sticky-buttons").hasClass("menu-open")?(t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-whatsapp-popup"),t(".ginger-sticky-buttons").hasClass("one-channel")&&(t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip")),t(".whatsapp-popup").removeClass("active"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").addClass("active")):(t(".whatsapp-popup").removeClass("active"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").addClass("open-whatsapp-popup"),t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").addClass("active")):(t(".ginger-sticky-buttons").removeClass("open-whatsapp-popup").addClass("menu-open"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").removeClass("active"))),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").removeClass(t("#ginger_sb_animation").val())):(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .gsb-whatsapp-button a").removeClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".gsb-whatsapp-button a",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-whatsapp-popup").addClass("menu-open"),t(".button-list").addClass(l),t(".main-button").removeClass("active-tooltip"),t(".main-button").addClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons").addClass("has-no-animation"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-whatsapp-button a").addClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".whatsapp-popup-close-btn",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-whatsapp-popup"),t(".main-button").addClass("active-tooltip"),t(".main-button").removeClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-whatsapp-button a").addClass(t("#ginger_sb_animation").val())),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&(t(".ginger-sticky-buttons").hasClass("menu-open")?t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-whatsapp-popup"):t(".ginger-sticky-buttons").removeClass("open-whatsapp-popup").addClass("menu-open")),"menu_view"==t(".ginger-menu-view:checked").val()&&t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons .main-button").removeClass("active-tooltip").addClass("hide-tooltip")})),t(document).on("click",".scw-form-close",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-form"),t(".main-button").addClass("active-tooltip"),t(".main-button").removeClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-contact-button a").addClass(t("#ginger_sb_animation").val())),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&(t(".ginger-sticky-buttons").hasClass("menu-open")?t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-form"):t(".ginger-sticky-buttons").removeClass("open-form").addClass("menu-open")),"menu_view"==t(".ginger-menu-view:checked").val()&&t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons .main-button").removeClass("active-tooltip").addClass("hide-tooltip")})),t(document).on("click",".open-wechat-channel",(function(){var e=t(this).data("weid");t(".ginger-sticky-buttons").hasClass("menu-open")?(t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-wechat-popup"),t(".ginger-sticky-buttons").hasClass("one-channel")&&(t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip")),t(".wechat-popup").removeClass("active"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").addClass("active")):(t(".wechat-popup").removeClass("active"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").addClass("open-wechat-popup"),t(".ginger-sticky-buttons").find(".single-btn").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".main-button").removeClass("active-tooltip").addClass("hide-tooltip"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").addClass("active")):(t(".ginger-sticky-buttons").removeClass("open-wechat-popup").addClass("menu-open"),t(".ginger-sticky-buttons").find(".sticky-button-list #"+e+"_popup").removeClass("active"))),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").removeClass(t("#ginger_sb_animation").val())):(t(".scw-pending-message").hide(),t(".ginger-sticky-buttons").find(".main-button .gsb-wechat-button a").removeClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".gsb-wechat-button a",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-wechat-popup").addClass("menu-open"),t(".button-list").addClass(l),t(".main-button").removeClass("active-tooltip"),t(".main-button").addClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons").addClass("has-no-animation"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-wechat-button a").addClass(t("#ginger_sb_animation").val()))})),t(document).on("click",".wechat-popup-close-btn",(function(){var e;t(".ginger-sticky-buttons").removeClass("open-wechat-popup"),t(".main-button").addClass("active-tooltip"),t(".main-button").removeClass("hide-tooltip"),t(".ginger-sticky-buttons").hasClass("one-channel")?(t(".ginger-sticky-buttons").find(".single-btn").removeClass("hide-tooltip").addClass("active-tooltip"),"ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".single-btn .channel-btn a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".single-btn .channel-btn a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .channel-btn a").addClass(t("#ginger_sb_animation").val())):("ginger-btn-bounce"!=(e=t("#ginger_sb_animation").val())&&"ginger-btn-shockwave"!=e&&"ginger-btn-waggle"!=e&&"ginger-btn-zoom"!=e||t(".gsb-main-action-button a > .scw-pending-message").show(),"ginger-btn-fade"!=e&&"none"!=e&&"ginger-btn-pulse"!=e&&"ginger-btn-spin"!=e||t(".gsb-main-action-button a + .scw-pending-message").show(),t(".ginger-sticky-buttons").find(".main-button .gsb-wechat-button a").addClass(t("#ginger_sb_animation").val())),t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&(t(".ginger-sticky-buttons").hasClass("menu-open")?t(".ginger-sticky-buttons").removeClass("menu-open").addClass("open-wechat-popup"):t(".ginger-sticky-buttons").removeClass("open-wechat-popup").addClass("menu-open")),"menu_view"==t(".ginger-menu-view:checked").val()&&t(".ginger-sticky-buttons").hasClass("has-no-close-button")&&t(".ginger-sticky-buttons .main-button").removeClass("active-tooltip").addClass("hide-tooltip")})),t(document).on("click","#woocommerce_customization",(function(){t(this).is(":checked")?t(".woocommerce-customization-setting").addClass("active"):t(".woocommerce-customization-setting").removeClass("active")})),t(document).on("click",".add-tags-badge",(function(){t(this).toggleClass("active"),t(".woocommerce-badges").toggleClass("active")})),t(document).on("click",".woo-view-badges",(function(){tinyMCE.get("woo_list_view_subtitle").focus(),tinymce.activeEditor.execCommand("mceInsertContent",!1,t(this).text())})),t(document).on("click",".add-contact-custom-field",(function(e){if(e.preventDefault(),t(".contact-custom-field").length>=6){t(".contact-form-toggle-fields + .contact-custom-field-limit").remove();var n="<div class='contact-custom-field-limit'><div class='social-channel-popover'><p class='description'>You can add up to 6 custom fields</p></div></div>";t(".contact-form-toggle-fields").after(n),t(".contact-custom-field-limit .social-channel-popover").show()}else n="",n+='<div class="gp-modal contact-form-field-open" id="contact_form_field_open0">',n+='<div class="gp-modal-bg"></div>',n+='<div class="gp-modal-container">',n+='<div class="gp-modal-content">',n+='<div class="gp-modal-data">',n+='<button class="gp-modal-close-btn" type="button">',n+='<span class="svg-icon">',n+='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"></path></svg>',n+="</span>",n+="</button>",n+='<div class="gp-modal-header">Add New Field</div>',n+='<div class="gp-modal-body">',n+='<div class=\'contact-form-field-select-wrap\'><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'text\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11 3.99998H6.8C5.11984 3.99998 4.27976 3.99998 3.63803 4.32696C3.07354 4.61458 2.6146 5.07353 2.32698 5.63801C2 6.27975 2 7.11983 2 8.79998V17.2C2 18.8801 2 19.7202 2.32698 20.362C2.6146 20.9264 3.07354 21.3854 3.63803 21.673C4.27976 22 5.11984 22 6.8 22H15.2C16.8802 22 17.7202 22 18.362 21.673C18.9265 21.3854 19.3854 20.9264 19.673 20.362C20 19.7202 20 18.8801 20 17.2V13M7.99997 16H9.67452C10.1637 16 10.4083 16 10.6385 15.9447C10.8425 15.8957 11.0376 15.8149 11.2166 15.7053C11.4184 15.5816 11.5914 15.4086 11.9373 15.0627L21.5 5.49998C22.3284 4.67156 22.3284 3.32841 21.5 2.49998C20.6716 1.67156 19.3284 1.67155 18.5 2.49998L8.93723 12.0627C8.59133 12.4086 8.41838 12.5816 8.29469 12.7834C8.18504 12.9624 8.10423 13.1574 8.05523 13.3615C7.99997 13.5917 7.99997 13.8363 7.99997 14.3255V16Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Text</span></label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'textarea\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 5H1M19 13H1M19 1H1M19 9H1" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Text Area</span></label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'number\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.38028 7.85335C8.07627 9.30297 9.02506 10.6616 10.2266 11.8632C11.4282 13.0648 12.7869 14.0136 14.2365 14.7096C14.3612 14.7694 14.4235 14.7994 14.5024 14.8224C14.7828 14.9041 15.127 14.8454 15.3644 14.6754C15.4313 14.6275 15.4884 14.5704 15.6027 14.4561C15.9523 14.1064 16.1271 13.9316 16.3029 13.8174C16.9658 13.3864 17.8204 13.3864 18.4833 13.8174C18.6591 13.9316 18.8339 14.1064 19.1835 14.4561L19.3783 14.6509C19.9098 15.1824 20.1755 15.4481 20.3198 15.7335C20.6069 16.301 20.6069 16.9713 20.3198 17.5389C20.1755 17.8242 19.9098 18.09 19.3783 18.6214L19.2207 18.779C18.6911 19.3087 18.4263 19.5735 18.0662 19.7757C17.6667 20.0001 17.0462 20.1615 16.588 20.1601C16.1751 20.1589 15.8928 20.0788 15.3284 19.9186C12.295 19.0576 9.43264 17.4332 7.04466 15.0452C4.65668 12.6572 3.03221 9.79483 2.17124 6.76144C2.01103 6.19699 1.93092 5.91477 1.9297 5.50182C1.92833 5.0436 2.08969 4.42311 2.31411 4.0236C2.51636 3.66357 2.78117 3.39876 3.3108 2.86913L3.46843 2.7115C3.99987 2.18006 4.2656 1.91433 4.55098 1.76999C5.11854 1.48292 5.7888 1.48292 6.35636 1.76999C6.64174 1.91433 6.90747 2.18006 7.43891 2.7115L7.63378 2.90637C7.98338 3.25597 8.15819 3.43078 8.27247 3.60655C8.70347 4.26945 8.70347 5.12403 8.27247 5.78692C8.15819 5.96269 7.98338 6.1375 7.63378 6.4871C7.51947 6.60142 7.46231 6.65857 7.41447 6.72538C7.24446 6.96281 7.18576 7.30707 7.26748 7.58743C7.29048 7.66632 7.32041 7.72866 7.38028 7.85335Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Number</span></label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'date\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 9H1M14 1V5M6 1V5M8.5 13L10 12V17M8.75 17H11.25M5.8 21H14.2C15.8802 21 16.7202 21 17.362 20.673C17.9265 20.3854 18.3854 19.9265 18.673 19.362C19 18.7202 19 17.8802 19 16.2V7.8C19 6.11984 19 5.27976 18.673 4.63803C18.3854 4.07354 17.9265 3.6146 17.362 3.32698C16.7202 3 15.8802 3 14.2 3H5.8C4.11984 3 3.27976 3 2.63803 3.32698C2.07354 3.6146 1.6146 4.07354 1.32698 4.63803C1 5.27976 1 6.11984 1 7.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Date</span></label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'url\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8.99999 12C9.42944 12.5741 9.97734 13.0491 10.6065 13.3929C11.2357 13.7367 11.9315 13.9411 12.6466 13.9923C13.3618 14.0435 14.0796 13.9403 14.7513 13.6897C15.4231 13.4392 16.0331 13.047 16.54 12.54L19.54 9.53997C20.4508 8.59695 20.9547 7.33394 20.9434 6.02296C20.932 4.71198 20.4061 3.45791 19.4791 2.53087C18.552 1.60383 17.298 1.07799 15.987 1.0666C14.676 1.0552 13.413 1.55918 12.47 2.46997L10.75 4.17997M13 9.99996C12.5705 9.42584 12.0226 8.95078 11.3934 8.60703C10.7642 8.26327 10.0685 8.05885 9.35334 8.00763C8.63819 7.95641 7.9204 8.0596 7.24864 8.31018C6.57688 8.56077 5.96687 8.9529 5.45999 9.45996L2.45999 12.46C1.5492 13.403 1.04522 14.666 1.05662 15.977C1.06801 17.288 1.59385 18.542 2.52089 19.4691C3.44793 20.3961 4.702 20.9219 6.01298 20.9333C7.32396 20.9447 8.58697 20.4408 9.52999 19.53L11.24 17.82" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Website</span></label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'dropdown\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 1L7 7L13 1" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>Dropdown</span>\t</label><label class=\'contact-form-field-select\'><input type=\'radio\' value=\'file\' data-field=\'0\' name=\'contact-form[custom_fields][0][field_dropdown]\' /><span><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19 13V14.2C19 15.8802 19 16.7202 18.673 17.362C18.3854 17.9265 17.9265 18.3854 17.362 18.673C16.7202 19 15.8802 19 14.2 19H5.8C4.11984 19 3.27976 19 2.63803 18.673C2.07354 18.3854 1.6146 17.9265 1.32698 17.362C1 16.7202 1 15.8802 1 14.2V13M15 6L10 1M10 1L5 6M10 1V13" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>File Upload</span></label></div>',n+="<div class='go-pro-contact'><a href='"+BUTTON_SETTINGS.go_pro_url+"' target='_blank'>Go Pro</a></div>",n+="</div>",n+="</div>",n+="</div>",n+="</div>",n+="</div>",n+="</div>",t(".contact-form-field-option").append(n),t("#contact_form_field_open0").addClass("active")})),t(document).on("click",".contact-form-field-open",(function(t){t.stopPropagation()})),t(document).on("keyup","#input_channel_search",(function(){var e=t(this).val().toLowerCase();if(t(".no-channel-found").removeClass("active"),""!=e){var n=0;t(".social-buttons li").each((function(){t(this).data("social").startsWith(e)?(n+=1,t(this).show()):t(this).hide()})),0==n&&(t(".no-channel-found").addClass("active"),t(".no-channel-found .search_text").text(t(this).val()))}else t(".social-buttons li").each((function(){t(this).show()}))})),t(document).on("click",".enable-whatsapp-widget",(function(){var e=t(this).closest("li.gsb-settings").data("button");t(this).closest("li.gsb-settings").find("#show_"+e+"_popup").prop("checked",!0),t(this).closest("li.gsb-settings").find(".mobile-link-settings").removeClass("active"),t(this).closest("li.gsb-settings").find(".whatsapp-widget-setting").removeClass("add-blur-bg"),C()})),t(document).on("click",".qr-img-upload-btn",(function(){var e=t(this).closest("li.gsb-settings").data("button"),n=wp.media({title:"Select image for QR code",multiple:!1,library:{type:"image"}}).open().on("select",(function(s){var i=n.state().get("selection").first();i=i.toJSON(),t("#"+e+"_qr_code_input").val(i.url),t("li#social-buttons-"+e+"-settings").find(".wechat-qr-code-img-box .wechat-qr-code-img img").attr("src",i.url),t("li#social-buttons-"+e+"-settings").find(".wechat-qr-setting-box").addClass("active"),C()}))})),t(document).on("click",".wechat-qr-img-remove",(function(){var e=t(this).closest("li.gsb-settings").data("button");t("#"+e+"_qr_code_input").val(""),t("li#social-buttons-"+e+"-settings").find(".wechat-qr-code-img-box .wechat-qr-code-img img").attr("src",""),t("li#social-buttons-"+e+"-settings").find(".wechat-qr-setting-box").removeClass("active"),C()})),t(document).on("click",".img-upgrade-btn",(function(e){e.stopPropagation(),t(this).closest(".upgrade-upload-btn").find(".upload-image-selection-container").toggleClass("active")})),t(document).on("click",".upload-image-selection-overlay",(function(){t(".upload-image-selection-container").removeClass("active")})),t(document).on("click",".image-upload-gallery:not(.disabled)",(function(e){e.preventDefault(),a=t(this).closest("li.gsb-settings").attr("data-button");var n=wp.media({title:"Select image for channel",multiple:!1,library:{type:"image"}}).open().on("select",(function(e){t(".upload-image-selection-container").removeClass("active");var s=n.state().get("selection").first();s=s.toJSON(),t("#icon_for_"+a).val(""),t("#image_for_"+a).val(s.id),t(".ssb-btn-bg-"+a+" img").remove(),t(".ssb-btn-bg-"+a+" .channel-bs-icon").remove(),t(".ssb-btn-bg-"+a).prepend("<img src='"+s.url+"' alt='"+a+"' />"),t(".ssb-btn-bg-"+a).addClass("has-image"),t(".ssb-btn-bg-"+a).removeClass("has-icon"),C()}))})),t(document).on("click",".remove-channel-img",(function(){a=t(this).closest("li.gsb-settings").attr("data-button"),t(".ssb-btn-bg-"+a).removeClass("has-image"),t(".ssb-btn-bg-"+a).removeClass("has-icon"),t(".ssb-btn-bg-"+a+" img").remove(),t(".ssb-btn-bg-"+a+" .channel-bs-icon").remove(),t("#icon_for_"+a).val(""),t("#image_for_"+a).val(""),C()})),t(document).on("click","#show_greeting_message",(function(){t(this).is(":checked")?t(".greeting-message-setting").removeClass("hidden"):t(".greeting-message-setting").addClass("hidden")})),t(document).on("mouseenter",".ginger-sticky-buttons .main-button .single-btn",(function(){var e=t(this).attr("data-ginger-tooltip-hover");t(".ginger-sticky-buttons .main-button .single-btn").find(".cta-tooltip").html(e),t(".cta-tooltip").length||""==e||t(this).append("<span class='cta-tooltip'>"+e+"</span>")})),t(document).on("mouseout",".ginger-sticky-buttons .main-button .single-btn",(function(){var e=tinymce.get("ginger_sb_call_to_action").getContent();""==e?t(".ginger-sticky-buttons .main-button .single-btn").find(".cta-tooltip").html(""):t(".ginger-sticky-buttons .main-button .single-btn").find(".cta-tooltip").html(e),""==e&&""!=t(this).attr("data-ginger-tooltip-hover")&&t(".cta-tooltip").remove()})),t(document).on("click","#show_more_channel",(function(){t(this).addClass("active"),t("#more_channel_popup").addClass("active"),t("#social-links-options li").removeClass("check-loader"),t(".channel-loader").removeClass("active")}))})),t(window).on("load",(function(){if("undefined"!=typeof tinymce&&tinymce.editors.length)for(var t=0;t<tinymce.editors.length;t++)tinymce.editors[t].onChange.add((function(t,e){C()})),tinymce.editors[t].onKeyUp.add((function(t,e){C()}));C()})),t(window).on("scroll",(function(){T(),function(){if(t(window).width()<=600){var e=t(window).scrollTop();e>0&&(t(".widget-sidebar").css("cssText","top: 0 !important"),t(".widget-sticky-header").css("cssText","top: 0")),0==e&&(t(".widget-sidebar").css("cssText","top: 46px !important"),t(".widget-sticky-header").css("cssText","top: 46px"))}}()})),t(window).on("resize",(function(){T(),w()}))}(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit