(()=>{var s;(s=jQuery)(document).ready(function(){s("<bookingor class='bookingor bookingor-why-backgrop'></bookingor>").appendTo("body"),s(".shw-bkdrp").on("click",function(){}),s("#example").on("click",".payment-view-update",function(t){t.preventDefault(),t=s(this).attr("data-id"),s.post(TCN_BIND.GET_URL+"?action=update_paid_n_pay_status",{get_pay_id:t,nonce:TCN_BIND.nonce},function(t){var n=t[0].pay_id,e=t[0].service_get_price,a=t[0].extra_get_price,o=t[0].discount_get_price,t=t[0].tax_get_price,i=parseFloat(e)+parseFloat(a)+parseFloat(o)+parseFloat(t);s(document).on("click",".change-due-pr",function(t){t.preventDefault();var a=s(".paying-now"),o=s("<input />",{type:"number",name:"currElmModelAttr",style:"width:100px",class:"updated-paid-price",value:s(a).text()});s(a).replaceWith(o),s(document).on("click",".update-due-pr",function(t){t.preventDefault(),s(".updated-paid-price").on("change",function(){s(this).val(parseFloat(s(this).val()).toFixed(2))}),setTimeout(function(){var t=o.val(),e=(parseFloat(i)-t).toFixed(2);s.post({url:TCN_BIND.GET_URL+"?action=update_paid_amount",data:{due_amount:e,paid_amount:t,nonce:TCN_BIND.nonce,pay_stats_id:n},dataType:"json",success:function(t){"success"===t.success?s.toast({text:t.message,icon:"success",position:"bottom-right"}):s.toast({text:t.message,icon:"error",position:"bottom-right"})}}),a.text(t),o.replaceWith('<div id="paying-now">'+t+"</div>"),s(".due-remaining-price").text(parseFloat(e).toFixed(2))},100)})})},"json")}),s("#myTable").on("click",".pay-status",function(t){t.preventDefault();var t=s(this).text(),e=s(this).parent().parent().attr("data-id");s.post(TCN_BIND.GET_URL+"?action=change_pay_status",{pay_status:t,nonce:TCN_BIND.nonce,pay_stats_id:e},function(t){t.success&&s.toast({text:t.message,icon:"success",position:"bottom-right"})},"json")})})})();