(()=>{const e=window.mc4wp_vars.ajaxurl,n=window.mc4wp_vars.nonce,t=window.mc4wp.settings,i=document.getElementById("notice-additional-fields");function c(){const t=[].filter.call(document.querySelectorAll(".mc4wp-list-input"),e=>e.checked).map(e=>e.value).join(","),c=["EMAIL","FNAME","NAME","LNAME"];let l=!1;window.fetch(`${e}?action=mc4wp_get_list_details&_ajax_nonce=${n}&ids=${t}`).then(e=>e.json()).then(e=>{e.forEach(e=>{e.merge_fields.forEach(e=>{e.required&&c.indexOf(e.tag)<0&&(l=!0)})})}).finally(()=>{i.style.display=l?"":"none"})}i&&(c(),t.on("selectedLists.change",c))})();