function wfp_donation_pop_up_donation_list(o){let e=document.querySelector(".donation_type"),t=document.querySelector(".wfp-donation-pop-up-fixed");document.querySelectorAll(".wfp-donation-pop-up-multi").forEach((o=>{o.style.display="none"})),t.style.display="none";let n=o.options[o.options.selectedIndex],p=n.dataset.type,l=document.querySelector(".wfp-donation-pop-up-multi-"+n.dataset.no),u=o.closest(".wfp-form").querySelector(".wfp-donation-pop-up-form-group-custom"),a=n.dataset.permalink;if(e.value=p,a&&(o.closest("form").action=a),u&&u.parentNode.removeChild(u),"fixed-lebel"==p){let o=n.dataset.price;"No"==n.dataset.enable_custom_amount?t.innerHTML='<label for="">Fixed Amount</label><input type="text" name="type" value="'+o+'" readonly>':t.innerHTML='<label for="">Amount</label><select onchange="wfp_pop_up_custom_amount(this)" name="type" required><option value="'+o+'">'+o+'</option><option value="custom">Custom</option></select>',t.style.display="block"}else l&&(l.style.display="block")}function wfp_pop_up_custom_amount(o){let e=o.closest(".wfp-form"),t=e.querySelector(".wfp-donation-pop-up-form-group-custom");"custom"==o.options[o.options.selectedIndex].value?t||e.insertAdjacentHTML("beforeend",'<div class="wfp-donation-pop-up-form-group wfp-donation-pop-up-form-group-custom"><label for="">Custom Amount</label><input min="1" name="custom_amount" type="number" required/></div>'):t&&t.parentNode.removeChild(t)}