!function(){const e=document.getElementById("_arraysubs_apply_to_subscriptions"),n=document.getElementById("_arraysubs_discount_duration"),t=document.getElementById("_arraysubs_discount_cycles"),s=document.getElementById("_arraysubs_count_initial_checkout");if(!e||!n)return;const c=t?t.closest("p.form-field"):null,o=s?s.closest("p.form-field"):null,l=n.closest("p.form-field");function d(){const s=e.checked,d="recurring"===n.value;if(l&&(l.style.display=s?"":"none"),c&&(c.style.display=s&&d?"":"none"),o){const e=t&&parseInt(t.value,10)||0;o.style.display=s&&d&&e>0?"":"none"}}e.addEventListener("change",d),n.addEventListener("change",d),t&&t.addEventListener("input",d),d()}();