// main: ChatGPT.module.scss, Messages.module.scss
.mwai-copy-button {
opacity: 0;
transition: all 0.3s ease-out;
width: 22px;
height: 22px;
position: absolute;
right: var(--mwai-spacing);
}
.mwai-copy-button .mwai-copy-button-one {
position: absolute;
width: 16px;
height: 16px;
margin-top: 0px;
margin-left: 0px;
background: white;
opacity: 0.4;
transition: all 0.2s ease-in;
cursor: pointer;
border-radius: 2px;
}
.mwai-copy-button .mwai-copy-button-two {
position: absolute;
width: 16px;
height: 16px;
margin-top: 6px;
margin-left: 6px;
background: white;
opacity: 0.6;
transition: all 0.2s ease-in;
cursor: pointer;
border-radius: 2px;
}
.mwai-copy-button:hover .mwai-copy-button-one {
opacity: 0.6;
margin-top: 0px;
margin-left: 6px;
}
.mwai-copy-button:hover .mwai-copy-button-two {
opacity: 1;
margin-top: 6px;
margin-left: 0px;
}
.mwai-copy-button.mwai-animate .mwai-copy-button-one {
opacity: 0;
}
.mwai-copy-button.mwai-animate .mwai-copy-button-two {
width: 18px;
height: 18px;
margin-top: 2px;
margin-left: 2px;
opacity: 1;
}
.mwai-chat .mwai-reply:hover .mwai-copy-button {
display: block;
opacity: 1;
}function disableScrolling(){var e=window.scrollX,t=window.scrollY;window.onscroll=function(){window.scrollTo(e,t)}}function enableScrolling(){ezTocSettingsTabsFixed()}jQuery(document).ready((function(e){var t=e(".ez-toc-color-picker");t.length&&t.wpColorPicker();var n=document.getElementById("ez-toc-settings[width]"),s=document.getElementById("ez-toc-settings[width_custom]");s&&("custom"!=n.value&&(s.parentNode.parentNode.style.display="none"),n.addEventListener("change",(function(){"custom"==document.getElementById("ez-toc-settings[width]").value?s.parentNode.parentNode.style.display="revert":s.parentNode.parentNode.style.display="none"}))),e("#reset-options-to-default-button").click((function(){1==confirm("Do you want reset settings to default options?")&&e.post(ajaxurl,{action:"eztoc_reset_options_to_default",eztoc_security_nonce:cn_toc_admin_data.eztoc_security_nonce},(function(e){alert("Default Options Reset Now!"),window.location.reload()}))})),e("#subscribe-newsletter-form").on("submit",(function(t){t.preventDefault();var n=e("#subscribe-newsletter-form"),s=n.find('input[name="name"]').val(),a=n.find('input[name="email"]').val(),o=n.find('input[name="company"]').val();e.post(ajaxurl,{action:"eztoc_subscribe_newsletter",name:s,email:a,website:o,eztoc_security_nonce:cn_toc_admin_data.eztoc_security_nonce},(function(e){if("security_nonce_not_verified"===e)return alert("Security nonce not verified"),!1}))}));let a=e("#eztoc-general").find("select[name='ez-toc-settings[position]']"),o=e("#eztoc-general").find("input[name='ez-toc-settings[custom_para_number]']"),i=e("#eztoc-general").find("input[name='ez-toc-settings[custom_img_number]']"),c=e("#eztoc-general").find("input[name='ez-toc-settings[blockqoute_checkbox]']");"aftercustompara"==e(a).val()?e(o).parents("tr").show():e(o).parents("tr").hide(),"afterpara"==e(a).val()||"aftercustompara"==e(a).val()?e(c).parents("tr").show():e(c).parents("tr").hide(),"aftercustomimg"==e(a).val()?e(i).parents("tr").show():e(i).parents("tr").hide(),e(document).on("change","select[name='ez-toc-settings[position]']",(function(){"aftercustompara"==e(this).val()?e(o).parents("tr").show(500):e(o).parents("tr").hide(500),"afterpara"==e(this).val()||"aftercustompara"==e(this).val()?e(c).parents("tr").show(500):e(c).parents("tr").hide(500),"aftercustomimg"==e(this).val()?e(i).parents("tr").show(500):e(i).parents("tr").hide(500)}));let r=e("#eztoc-general").find("select[name='ez-toc-settings[toc_loading]']"),l=e("#eztoc-general").find("input[name='ez-toc-settings[smooth_scroll]']"),d=e("#eztoc-general").find("input[name='ez-toc-settings[avoid_anch_jump]']"),u=e("#eztoc-advanced").find("select[name='ez-toc-settings[load_js_in]']");"js"==e(r).val()?(e(l).parents("tr").show(),e(d).parents("tr").show(),e(u).parents("tr").show()):(e(l).parents("tr").hide(),e(d).parents("tr").hide(),e(u).parents("tr").hide()),e(document).on("change","select[name='ez-toc-settings[toc_loading]']",(function(){"js"==e(this).val()?(e(l).parents("tr").show(500),e(d).parents("tr").show(500),e(u).parents("tr").show(500)):(e(l).parents("tr").hide(500),e(d).parents("tr").hide(500),e(u).parents("tr").hide(500))}));let p=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky_highlight_heading]']"),m=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky_highlight_bg_colour]']"),v=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky_highlight_title_colour]']");1==e(p).prop("checked")?(e(m).parents("tr").show(),e(v).parents("tr").show()):(e(m).parents("tr").hide(),e(v).parents("tr").hide()),e(document).on("change","input[name='ez-toc-settings[sticky_highlight_heading]']",(function(){1==e(this).prop("checked")?(e(m).parents("tr").show(500),e(v).parents("tr").show(500)):(e(m).parents("tr").hide(500),e(v).parents("tr").hide(500))}));let g=jQuery("#ez-toc").find("select[name='ez-toc-settings[position-specific]']"),_=jQuery("#ez-toc").find("input[name='ez-toc-settings[s_custom_para_number]']"),h=jQuery("#ez-toc").find("input[name='ez-toc-settings[s_custom_img_number]']"),f=jQuery("#ez-toc").find("input[name='ez-toc-settings[s_blockqoute_checkbox]']");if("aftercustompara"==jQuery(g).val()?jQuery(_).parents("tr").show():jQuery(_).parents("tr").hide(),"afterpara"==jQuery(g).val()||"aftercustompara"==jQuery(g).val()?jQuery(f).parents("tr").show():jQuery(f).parents("tr").hide(),"aftercustomimg"==jQuery(g).val()?jQuery(h).parents("tr").show():jQuery(h).parents("tr").hide(),jQuery("#ez-toc").on("change","select[name='ez-toc-settings[position-specific]']",(function(){"aftercustompara"==jQuery(this).val()?jQuery(_).parents("tr").show(500):jQuery(_).parents("tr").hide(500),"afterpara"==jQuery(this).val()||"aftercustompara"==jQuery(this).val()?jQuery(f).parents("tr").show(500):jQuery(f).parents("tr").hide(500),"aftercustomimg"==jQuery(this).val()?jQuery(h).parents("tr").show(500):jQuery(h).parents("tr").hide(500)})),cn_toc_admin_data.do_tour){var y,b="
"+cn_toc_admin_data.translable_txt.using_eztoc+"
";b+=""+cn_toc_admin_data.translable_txt.do_you_want+" "+cn_toc_admin_data.translable_txt.sd_update+" "+cn_toc_admin_data.translable_txt.before_others+"
",b+='",b+='",jQuery(document).on("submit","#eztoc-news-letter-form",(function(e){e.preventDefault();var t=jQuery(this),n=t.find('input[name="eztoc_subscriber_name"]').val(),s=t.find('input[name="eztoc_subscriber_email"]').val();website=t.find('input[name="eztoc_subscriber_website"]').val(),jQuery.post(cn_toc_admin_data.ajax_url,{action:"eztoc_subscribe_newsletter",eztoc_security_nonce:cn_toc_admin_data.eztoc_security_nonce,name:n,email:s,website:website},(function(e){e?"Some fields are missing."==e.response||"Invalid email address."==e.response||"Invalid list ID."==e.response||"Already subscribed."==e.response?(jQuery("#eztoc-news-letter-status").text(""),jQuery("#eztoc-news-letter-status").css("color","red")):(jQuery("#eztoc-news-letter-status").text("You're subscribed!"),jQuery("#eztoc-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")}),"json")}));var z={content:b,position:{edge:"top",align:"left"}};y=function(){e(cn_toc_admin_data.displayID).pointer(z).pointer("open"),cn_toc_admin_data.button2&&(e("#pointer-close").after(''+cn_toc_admin_data.button2+""),e("#pointer-primary").click((function(){cn_toc_admin_data.function_name})),e("#pointer-close").click((function(){e.post(cn_toc_admin_data.ajax_url,{pointer:"eztoc_subscribe_pointer",action:"dismiss-wp-pointer"})})))},(z=e.extend(z,{buttons:function(t,n){return button=e(''+cn_toc_admin_data.button1+""),button_2=e("#pointer-close.button"),button.bind("click.pointer",(function(){n.element.pointer("close")})),button_2.on("click",(function(){setTimeout((function(){n.element.pointer("close")}),3e3)})),button},close:function(){e.post(cn_toc_admin_data.ajax_url,{pointer:"eztoc_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(e,t){t.pointer.css({left:"170px",top:"160px"})}})).position&&z.position.defer_loading?e(window).bind("load.wp-pointers",y):y()}}));const unsecuredCopyToClipboard=e=>{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.error("Unable to copy to clipboard",e)}document.body.removeChild(t)};function ez_toc_clipboard(e,t,n,s){s.preventDefault(),disableScrolling();var a=n.parentNode.parentNode.querySelectorAll("#"+e)[0];a.select(),a.setSelectionRange(0,99999),navigator.clipboard.writeText(a.value),n.querySelectorAll("span."+t)[0].innerHTML="Copied: "+a.value}function ez_toc_outFunc(e,t,n){n.preventDefault(),t.querySelectorAll("span."+e)[0].innerHTML="Copy to clipboard",enableScrolling()}function ezTocSettingsTabsFixed(){var e=document.querySelector("#general #eztoc-tabs"),t=document.querySelector("#general form");window.onscroll=null!==e?function(){var n=window.scrollY,s=document.getElementsByClassName("ez-toc-pro-settings-link-paid"),a=document.getElementsByClassName("general-pro-settings-container"),o=document.querySelector("#general #eztoc-tabs #eztoc-link-general"),i=document.querySelector("#general #eztoc-tabs #eztoc-link-appearance"),c=document.querySelector("#general #eztoc-tabs #eztoc-link-advanced"),r=document.querySelector("#general #eztoc-tabs #eztoc-link-shortcode"),l=document.querySelector("#general #eztoc-tabs #eztoc-link-sticky"),d=document.querySelector("#general #eztoc-tabs #eztoc-link-compatibility"),u=document.querySelector("#general #eztoc-tabs #eztoc-link-iesettings"),p=document.querySelector("#general #eztoc-tabs #eztoc-link-prosettings"),m=100,v=document.querySelector("#general div#eztoc-general").offsetTop-m,g=document.querySelector("#general div#eztoc-appearance").offsetTop-m,_=document.querySelector("#general div#eztoc-advanced").offsetTop-m,h=document.querySelector("#general div#eztoc-shortcode").offsetTop-m,f=document.querySelector("#general div#eztoc-compatibility").offsetTop-m,y=document.querySelector("#general div#eztoc-iesettings").offsetTop-m,b=document.querySelector("#eztoc-sticky").offsetTop-m;if(null!==s&&s.length>0)var z=document.querySelector("#general div#eztoc-prosettings").offsetTop-m-150;else f-=150,y-=150;o.classList.add("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),a.length>0&&null!==p&&p.classList.remove("active"),n>=100?(e.classList.remove("stay"),e.classList.add("moving"),t.classList.add("moving"),null!==s&&s.length>0&&0==a.length&&(e.innerHTML+=' | Pro Settings')):(e.classList.remove("moving"),e.classList.add("stay"),t.classList.remove("moving"),null!==s&&s.length>0&&a.length>0&&document.querySelector(".general-pro-settings-container").remove()),n>=v&&(o.classList.add("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=g&&(o.classList.remove("active"),i.classList.add("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=_&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.add("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=h&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.add("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=b&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.add("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=f&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.add("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),n>=y&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.add("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.remove("active")),a.length>0&&n>=z&&(o.classList.remove("active"),i.classList.remove("active"),c.classList.remove("active"),r.classList.remove("active"),d.classList.remove("active"),u.classList.remove("active"),l.classList.remove("active"),null!==s&&s.length>0&&a.length>0&&null!==p&&p.classList.add("active"))}:function(){}}function no_heading_text(e){1==jQuery("input[name='ez-toc-settings[no_heading_text]']").prop("checked")?jQuery("input[name='ez-toc-settings[no_heading_text_value]']").parents("tr").show(200):jQuery("input[name='ez-toc-settings[no_heading_text_value]']").parents("tr").hide(200)}ezTocSettingsTabsFixed(),jQuery(document).on("change","input[name='ez-toc-settings[no_heading_text]']",(function(){no_heading_text()})),no_heading_text(),jQuery((function(e){if(0==cn_toc_admin_data.is_amp_activated){let t=e('input[name="ez-toc-settings[toc-run-on-amp-pages]"]');t.length>0&&t.attr("disabled",!0)}})),jQuery((function(e){let t=e("#eztoc-appearance"),n=t.find("input[name='ez-toc-settings[headings-padding]']"),s=["top","bottom","left","right"];s.forEach((e=>{let s=t.find(`input[name='ez-toc-settings[headings-padding-${e}]']`),a=s.parent();var o;s.attr("type","number"),s.parents("tr").remove(),n.parent().append(` ${a.html()}`),t.find(`select[name='ez-toc-settings[headings-padding-${e}_units]']`).html('')}));let a={};function o(){s.forEach((e=>{a[e].hide(500),t.find(`input[name='ez-toc-settings[headings-padding-${e}]']`).val(0)}))}s.forEach((e=>{a[e]=t.find(`span#headings-padding-${e}-container`)})),n.prop("checked")||o(),e(document).on("change click","input[name='ez-toc-settings[headings-padding]']",(function(){n.prop("checked")?s.forEach((e=>{a[e].show(500)})):o()}))})),jQuery((function(e){let t=e("#eztoc-general"),n=t.find("input[name='ez-toc-settings[show_heading_text]']"),s=t.find("input[name='ez-toc-settings[visibility_on_header_text]']"),a=t.find("input[name='ez-toc-settings[heading_text]']");function o(){n.prop("checked")?(s.parents("tr").show(500),a.parents("tr").show(500)):(s.parents("tr").hide(500),a.parents("tr").hide(500))}o(),e(document).on("change click","input[name='ez-toc-settings[show_heading_text]']",o)})),jQuery((function(e){let t=e("#eztoc-general"),n=t.find("input[name='ez-toc-settings[visibility]']"),s=t.find("input[name='ez-toc-settings[visibility_hide_by_default]']");function a(){n.prop("checked")?s.parents("tr").show(500):s.parents("tr").hide(500)}a(),e(document).on("change click","input[name='ez-toc-settings[visibility]']",a)})),jQuery("#eztoc_migrate_toc").on("click",(function(e){if(e.preventDefault(),!confirm("Migration will overwrite the current Easy TOC settings."))return;jQuery("#eztoc-importer-loader").show();const t=new FormData;t.append("action","eztoc_migrate_tocplus"),t.append("nonce",eztoc_admin_data.eztoc_security_nonce),jQuery.ajax({url:eztoc_admin_data.ajax_url,method:"POST",data:t,processData:!1,contentType:!1,success:function(e){jQuery("#eztoc-importer-loader").hide(),e.success?(alert(e.data),window.location.reload()):alert(e.data)},error:function(){jQuery("#eztoc-importer-loader").hide(),alert("An error occurred while importing the settings.")}})}));