function r(){const e=document.createElement("div");return e.className="input-group mb-2 seo-sameas-row",e.innerHTML='<input type="url" class="form-control" name="seo_org_sameas[]" value="" placeholder="https://..."><button type="button" class="btn btn-outline-danger seo-sameas-remove"><i class="fas fa-times"></i></button>',e}function n(){const e=document.getElementById("seo_org_sameas_list"),s=document.getElementById("seo_org_sameas_add");!e||!s||(s.addEventListener("click",()=>{e.appendChild(r())}),e.addEventListener("click",a=>{const t=a.target.closest(".seo-sameas-remove");if(!t)return;if(e.querySelectorAll(".seo-sameas-row").length>1)t.closest(".seo-sameas-row").remove();else{const o=t.closest(".seo-sameas-row").querySelector("input");o&&(o.value="")}}))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n();
