text: !function(a){"use strict";a(function(){"1"===wcbcf_shop_order_params.person_type&&a("#_billing_persontype").on("change",function(){var b=a(this).val();a("._billing_cpf_field, ._billing_rg_field, ._billing_company_field, ._billing_cnpj_field, ._billing_ie_field").hide(),"1"===b&&a("._billing_cpf_field, ._billing_rg_field").show(),"2"===b&&a("._billing_company_field, ._billing_cnpj_field, ._billing_ie_field").show()}).change(),a(".load_customer_billing").on("click",function(){var b,c=a("#customer_user").val();if(window.confirm(wcbcf_shop_order_params.load_message)){if(!c)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;b={user_id:c,type_to_load:"billing",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce},a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:b,type:"POST",success:function(b){b&&(a("input#_billing_number").val(b.billing_number),a("input#_billing_neighborhood").val(b.billing_neighborhood),a("input#_billing_persontype").val(b.billing_persontype),a("input#_billing_cpf").val(b.billing_cpf),a("input#_billing_rg").val(b.billing_rg),a("input#_billing_cnpj").val(b.billing_cnpj),a("input#_billing_ie").val(b.billing_ie),a("input#_billing_birthdate").val(b.billing_birthdate),a("input#_billing_sex").val(b.billing_sex),a("input#_billing_cellphone").val(b.billing_cellphone)),a(".edit_address").unblock()}})}return!1}),a(".load_customer_shipping").on("click",function(){var b,c=a("#customer_user").val();if(window.confirm(wcbcf_shop_order_params.load_message)){if(!c)return window.alert(woocommerce_admin_meta_boxes.no_customer_selected),!1;b={user_id:c,type_to_load:"shipping",action:"woocommerce_get_customer_details",security:woocommerce_admin_meta_boxes.get_customer_details_nonce},a(this).closest(".edit_address").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_admin_meta_boxes.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:.6}}),a.ajax({url:woocommerce_admin_meta_boxes.ajax_url,data:b,type:"POST",success:function(b){b&&(a("input#_shipping_number").val(b.shipping_number),a("input#_shipping_neighborhood").val(b.shipping_neighborhood)),a(".edit_address").unblock()}})}return!1}),a("button.billing-same-as-shipping").on("click",function(){return window.confirm(wcbcf_shop_order_params.copy_message)&&(a("input#_shipping_number").val(a("input#_billing_number").val()),a("input#_shipping_neighborhood").val(a("input#_billing_neighborhood").val())),!1})})}(jQuery);