!function(e){"use strict";var t,i,s;(t=e("#woocommerce_add_nip_field")).length&&(t.change((function(){e(this).is(":checked")?e(".nip-additional-fields").closest("tr").show():e(".nip-additional-fields").closest("tr").hide()})),t.trigger("change")),function(){var t=e("#show_signatures");t.length&&(t.change((function(){e(this).is(":checked")?e("#signature_user").closest("tr").show():e("#signature_user").closest("tr").hide()})),t.trigger("change"))}(),function(){var t=e(".woocommerce_currency_exchange_enable");t.length&&(t.change((function(){var t=e(this).val();"on"===t||"yes_without_tax"===t?e(".exchange-table-fields").closest("tr").show():e(".exchange-table-fields").closest("tr").hide()})),t.trigger("change"))}(),function(){var t=e(".woocommerce_eu_vat_vies_validate");t.length&&(t.change((function(){e(this).is(":checked")?e(".vies-validation-fields").closest("tr").show():e(".vies-validation-fields").closest("tr").hide()})),t.trigger("change"))}(),(s=jQuery(".select2")).length&&s.select2({width:"400px"}),(i=jQuery(".form-table .edit_disabled_field")).length&&i.after('<a class="remove-disabled" href="#"><span class="dashicons dashicons-edit"></span></a>'),jQuery(".form-table").on("click",".remove-disabled",(function(){return"disabled"===e(this).prev().attr("disabled")?e(this).prev().removeAttr("disabled"):e(this).prev().attr("disabled","disabled"),!1})),function(){e("#flexible_invoices_tax_table tbody").sortable({handle:"td:first",helper:function(t,i){return i.children().each((function(){e(this).width(e(this).width())})),i}});var t=jQuery("#flexible_invoices_tax_table");t.length&&(t.on("click","#insert_tax",(function(){var t=0,i=e(e("#tax-rates-row").html());e(document).find(".row-num").each((function(){var i=parseInt(e(this).val());i>t&&(t=i)}));var s=t+1;i.find("input").attr("value",""),i.find(".row-num").val(s);var r=new RegExp("\\[0\\]","gm"),a=i.html().replace(r,"["+s+"]");return e("#flexible_invoices_tax_table tbody").append("<tr>"+a+"</tr>"),!1})),t.on("click",".delete-item",(function(){return e(this).closest("tbody").find("tr").length>1&&e(this).closest("tr").remove(),!1})))}(),function(){var e="general";if(jQuery(".nav-tab-active").length){var t=window.location.search,i=new URLSearchParams(t);e=i.get("tab")}var s=jQuery(".sub-table");if(s.length){jQuery(".js-subsubsub-wrapper a").click((function(){jQuery(this).closest("ul").find(".current").removeClass("current"),jQuery(this).addClass("current"),jQuery(".form-table").hide(),s.hide(),jQuery(".field-settings-"+jQuery(this).attr("id").replace("tab-anchor-","")).show(),wpCookies.set("fi-settings-tab-"+e,jQuery(this).attr("id").replace("tab-anchor-",""))}));var r=wpCookies.get("fi-settings-tab-"+e);r?jQuery(".sub-tab-"+r).click():(s.hide(),s.first().show())}}()}(jQuery);