\n"):e,setAttributes(e,t){for(var l in t)e.setAttribute(l,t[l])},inputToggle(e){if(e.target.classList.contains("input-toggle")){let t=e.target.parentElement.lastElementChild;!0===e.target.checked?(t.style.height=t.scrollHeight+"px",t.classList.remove("hidden")):(t.firstChild.value="",t.style.height=null,t.classList.add("hidden"))}},addInput(e){let t=e.parent,l=e.elm;var n=e.placeholder,i=e.type;e=(e=e.max||6)||6;let a=document.createElement("div");a.setAttribute("class","new-input");let r=document.createElement("input");r.setAttribute("type",i),r.setAttribute("placeholder",n);let d=document.createElement("button");d.setAttribute("class","remove"),d.setAttribute("type","button"),a.appendChild(r),a.appendChild(d),l.appendChild(a),l.childNodes.length>=e&&(l.nextElementSibling.disabled=!0,l.nextElementSibling.style.cssText="opacity:.3;cursor:not-allowed"),t.style.height=t.scrollHeight+"px"},removeInput(e){let t=e.elm,l=e.target;var n=e.max||6;if("remove"===l.className){--n;let i=l.parentElement.parentNode;e=l.parentElement.getBoundingClientRect().height,l.parentElement.remove(),t.style.height=t.getBoundingClientRect().height-e+"px",i.childNodes.length<=n&&(i.nextElementSibling.disabled=!1,i.nextElementSibling.style.cssText="opacity:1;cursor:pointer;")}}};var l;l="#url-gambar-input",(l=e.querySelector(l)).style.height=l.scrollHeight+"px",e.getElementById("addfield").addEventListener("click",function(){t.addInput({parent:this.previousElementSibling,elm:this.previousElementSibling,placeholder:"https://...",type:"url",max:5})}),e.getElementById("url-gambar-input").addEventListener("click",function(e){t.removeInput({elm:this,target:e.target,max:5})}),e.getElementById("submit").addEventListener("click",function(){var l=e.getElementById("url-gambar-input").querySelectorAll("input"),n=e.getElementById("tokopedia").value,i=e.getElementById("shopee").value,a=e.getElementById("bukalapak").value,r=e.getElementById("blibli").value,d=e.getElementById("lazada").value,o=e.getElementById("harga").value.replace(/\D/g,""),s=e.getElementById("hargapromo").value.replace(/\D/g,""),c=e.getElementById("promo").checked,u=e.getElementById("stokhabis").checked,g=e.getElementById("terlaris").checked,m=e.getElementById("deskripsi").value;function p(e,t,l){return""==t?"":''+l+""}function h(e,t,l){let n;return n=e?'