(()=>{"use strict";var e,t,n,c,i;function s(){$(".select2-show-search").select2({minimumResultsForSearch:"",width:"100%"})}function o(e){return e.id?$('<span><img src="https://laravel8.spruko.com/noa/assets/images/users/'+e.element.value.toLowerCase()+'.jpg" class="rounded-circle avatar-sm" /> '+e.text+"</span>"):e.text}e=document.querySelector("#shipping-address"),(t=document.querySelector("#addShippingAddress")).addEventListener("click",(function(){e.classList.contains("d-none")?e.classList.remove("d-none"):e.classList.add("d-none"),t.classList.add("d-none")})),c=document.querySelector(".product-description-list"),i=document.querySelector(".product-description-each"),function(){function e(e){c.removeChild(e.target.parentElement)}setInterval((function(){setTimeout((function(){for(var t=document.querySelectorAll(".delete-row-btn"),n=0;n<t.length;n++)t[n].addEventListener("click",e)}),1)}),1)}(),n=i.cloneNode(!0),document.querySelector(".add-invoice-item-btn").addEventListener("click",(function(){var e=n.cloneNode(!0);c.appendChild(e),s()})),$((function(){$("#inv-datepicker").datepicker({autoclose:!0,format:"dd-mm-yyyy",todayHighlight:!0}).datepicker("update",new Date),$("#due-datepicker").datepicker({autoclose:!0,format:"dd-mm-yyyy",todayHighlight:!0}).datepicker("update")})),$(".select2").select2({minimumResultsForSearch:1/0,width:"100%"}),s(),$(".select2-client-search").select2({templateResult:o,templateSelection:o,escapeMarkup:function(e){return e}})})();