Give – Donation Plugin and Fundraising Platform - Version 2.7.5

Version Description

Download this release

Release Info

Developer dlocc
Plugin Icon 128x128 Give – Donation Plugin and Fundraising Platform
Version 2.7.5
Comparing to
See all releases

Code changes from version 2.7.4 to 2.7.5

assets/dist/js/admin.js CHANGED
@@ -67,4 +67,4 @@ jQuery(document).ready((function(e){function t(t){var n=void 0!==t.standard_fiel
67
  * @subpackage: Assets/JS
68
  * @copyright: Copyright (c) 2016, GiveWP
69
  * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
70
- */();s=s.filter((function(e){var t=-1!==parseInt(e.attr("href").indexOf("&tab="+r.tab));return t&&(n=e),!t})),n.length&&(s.unshift(a.pop()),a.push(n))}new Promise((function(e,t){a.length&&jQuery.each(a,(function(e,t){(t=jQuery(t)).hasClass("give-hidden")&&t.removeClass("give-hidden")})),e(!0)})).then((function(e){s.length?(o.html(""),jQuery.each(s,(function(e,t){(t=jQuery(t)).hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(o)})),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(i),i.show()):i.hide()}))}))}!function(e){var t=function(t,n){var i=(n=jQuery.extend({wrapper:!0,show:!1},n)).wrapper?e(".give-spinner-wrapper",t):{},o=e(".give-spinner",t);if(n.show)return i.length&&i.addClass("is-active"),void o.addClass("is-active");i.length&&i.removeClass("is-active"),o.removeClass("is-active")},n=function(e){var t=document.location.href,n=t.split("?");e=void 0===e?"":e.replace("give-","");if(n.length>=2){for(var i=n.shift(),o=n.join("?"),r=encodeURIComponent("give-message")+"=",a=o.split(/[&;]/g),s=a.length;s-- >0;)(-1!==a[s].lastIndexOf(r,0)||""!==e&&-1!==a[s].lastIndexOf("give-messages",0)&&a[s].match(e+"$"))&&a.splice(s,1);t=i+"?"+a.join("&"),window.history.pushState("",document.title,t)}return t};function i(e,t){return e=accounting.unformat(e,Give.fn.getGlobalVar("decimal_separator")).toString(),e=!1!==(t="undefined"!==t&&t)?parseFloat(e).toFixed(t):parseFloat(e).toFixed(Give.fn.getGlobalVar("currency_decimals"))}var o={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){new a.GiveConfirmModal({triggerSelector:".delete-single-donation",modalWrapper:"give-modal--warning",modalContent:{title:Give.fn.getGlobalVar("confirm_delete_donation"),desc:Give.fn.getGlobalVar("delete_payment")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})},resendSingleDonationReceipt:function(){new a.GiveConfirmModal({triggerSelector:".resend-single-donation-receipt",modalContent:{title:Give.fn.getGlobalVar("confirm_resend"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})}},s={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change((function(){var t=e(this),n={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"};return e.post(ajaxurl,n,(function(n){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");var i=e("#give-order-address-state-wrap");i.find("*").not(".order-data-address-line").remove(),void 0!==r()(n.states_found)&&!0===n.states_found?(i.append(n.data),i.find("select").chosen()):(i.append('<input type="text" name="give-payment-address[0][state]" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==r()(n.show_field)&&!1===n.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))})),!1}))},add_note:function(){e("#give-add-payment-note").on("click",(function(t){function n(){e.ajax({type:"POST",data:a,url:ajaxurl,beforeSend:function(){o.prop("disabled",!0),i.prop("disabled",!0)},success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).always((function(){o.prop("disabled",!1),i.prop("disabled",!1)}))}t.preventDefault();var i=e(this),o=e("#give-payment-note"),r=e("#donation_note_type"),a={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:o.val(),type:r.val()};if(a.note)"donor"===a.type&&give_vars.email_notification.donor_note.status?new Give.modal.GiveConfirmModal({successConfirm:function(){n()},modalContent:{desc:give_vars.donor_note_confirm_msg}}).render():n();else{var s=o.css("border-color");o.css("border-color","red"),setTimeout((function(){o.css("border-color",s)}),500)}}))},remove_note:function(){e("body").on("click",".give-delete-payment-note",(function(t){t.preventDefault();var n=this;new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_deletion"),desc:Give.fn.getGlobalVar("delete_payment_note")},successConfirm:function(t){var i={action:"give_delete_payment_note",payment_id:e(n).data("payment-id"),note_id:e(n).data("note-id")};e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail((function(e){window.console&&window.console.log&&console.log(e)}))}}).render()}))},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",(function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)}))},resend_receipt:function(){e("body").on("click","#give-resend-receipt",(function(t){var n=this;t.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(){window.location.assign(e(n).attr("href"))}}).render()}))},variable_price_list:function(){e("#give_payment_form_select").chosen().change((function(){var t,n=e(".give-donation-level");return!!(t=e(this).val())&&(!!n.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){(t=t.trim())?(n.html(t),e('select[name="give-variable-price"]').chosen().change()):n.html("")}}))})),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',(function(){var t=jQuery(this).data("prices"),n=e("#give-payment-total");""!==t&&e(this).val()in t&&(n.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout((function(){n.css("background-color","white")}),1e3))}))}},l={init:function(){this.toggle_gateways(),this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings(),this.saveButtonTriggered(),this.changeAlert(),this.detectSettingsChange(),this.sequentialDonationIDPreview()},toggle_gateways:function(){e(".gateways-checkbox").on("click",(function(){var t=e(this).prev(".gateways-radio"),n=(this.checked,e(".gateways-checkbox:checked"));1===n.length?(n.prev(".gateways-radio").attr("checked","checked"),this.checked?t.removeAttr("disabled"):t.attr("disabled","disabled")):this.checked?(t.removeAttr("disabled"),t.removeAttr("checked")):t.attr("disabled","disabled")}))},setting_change_country:function(){e('select[name="base_country"]').change((function(){var t=e(this),n={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,n,(function(i){t.closest("tr").next().show(),e("#base_state_chosen").remove(),void 0!==r()(i.states_found)&&1==i.states_found?(e(':input[name="base_state"]').replaceWith(i.data).addClass("give-select-chosen"),e(':input[name="base_state"]').chosen()):(void 0!==r()(i.show_field)&&0==i.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+n.field_name+'" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'))})),!1}))},toggle_options:function(){e('input[name="email_access"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e('input[name="enable_recaptcha"]').parents("tr").show(),"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide(),e('input[name="enable_recaptcha"]').parents("tr").hide())})).change(),e('input[name="enable_recaptcha"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t&&"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())})).change(),e('input[name="form_featured_img"]',".give-setting-tab-body-display").on("change",(function(){"enabled"===e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val()?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()})).change(),e('input[name="terms"]',".give-setting-tab-body-display").on("change",(function(){"enabled"===e('input[name="terms"]:checked',".give-setting-tab-body-display").val()?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())})).change(),e('input[name="admin_notices"]',".give-setting-tab-body-emails").on("change",(function(){"enabled"===e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val()?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())})).change(),e('input[name="sequential-ordering_status"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="sequential-ordering_status"]:checked',".give-setting-tab-body-general").val(),n=e(this).closest("table");"enabled"===t?e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").show():e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").hide()})).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout((function(){t.slideUp()}),5e3)},verify_settings:function(){var t=e("#success_page"),n=e("#failure_page");t.add(n).change((function(){if(t.val()===n.val()){var i='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+Give.fn.getGlobalVar("matched_success_failure_page")+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+Give.fn.getGlobalVar("dismiss_notice_text")+"</span></button> </div>",o=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),o.length)return!1;e("h1","#give-mainform").after(i),o=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",o).click((function(){o.remove()}))}})).change()},saveButtonTriggered:function(){e(".give-settings-setting-page").on("click",".give-save-button",(function(){e(window).unbind("beforeunload")}))},changeAlert:function(){e(window).bind("beforeunload",(function(e){var t=Give.fn.getGlobalVar("setting_not_save_message");if(I)return(e||window.event).returnValue=t,t}))},detectSettingsChange:function(){var t=e(".give-settings-setting-page");if(t.length>0){var n=e("#give-mainform").serialize();t.on("change keyup blur","form",(function(t){if(!e(t.target).closest(".js-fields-has-custom-saving-logic").length){var i=e("#give-mainform").serialize();I=n!==i}}))}},sequentialDonationIDPreview:function(){var t=jQuery("#sequential-ordering_preview");t.length&&(jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number, #sequential-ordering_number_padding, #sequential-ordering_number_suffix").on("keyup change",(function(){var e=jQuery("#sequential-ordering_number_prefix").val(),n=jQuery("#sequential-ordering_number").val().trim()||"1",i=jQuery("#sequential-ordering_number_padding").val().trim(),o=jQuery("#sequential-ordering_number_suffix").val(),r="".concat(e).concat(n.padStart(i,"0")).concat(o);t.val(r)})),jQuery("#sequential-ordering_number_prefix").trigger("keyup"),jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number_suffix").on("blur",(function(){e(this).val(e(this).val().replace(new RegExp(" ","g"),"-"))})))}},c={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change((function(){"other"===e(this).val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()}))},donors_export:function(){e("#give_donor_export_form").change((function(){var t=e(this),n=e("option:selected",t).val(),i=e("#give_customer_export_option");"0"===t.val()?i.show():i.hide();var o=e(".give_price_options_select");if(0!=parseInt(n)){var r={action:"give_check_for_form_price_variations",form_id:n,all_prices:!0};e.post(ajaxurl,r,(function(t){o.remove(),e("#give_donor_export_form_chosen").after(t)}))}else o.remove()}))},recount_stats:function(){e("body").on("change","#recount-stats-type",(function(){var t=e("#give-tools-recount-form"),n=e("option:selected",this).data("type"),i=e("#recount-stats-submit"),o=e(".tools-form-dropdown"),r=e(".tools-date-dropdown-delete-donations");if(t.find(".notice-wrap").remove(),i.removeClass("button-disabled").attr("disabled",!1),o.hide(),r.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===n)t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("reset_stats_warn")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled");else if("delete-test-donors"===n){t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_test_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===n){t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_import_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-donations"===n){r.show(),t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_donations_only")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else o.hide(),o.val(0);var a=e(".tools-form-dropdown-"+n);a.show(),a.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+n).show()})),e("body").on("change","#confirm-reset",(function(){e(this).is(":checked")?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")})),e("#give-tools-recount-form").submit((function(t){var n=e("#recount-stats-type").val(),i=e(this),o=e("option:selected",this).data("type");if("reset-stats"===o){if(e("#confirm-reset").is(":checked"))return!0;a=!0}i.find(".notice-wrap").remove(),i.append('<div class="notice-wrap"></div>');var r=i.find(".notice-wrap"),a=!1;(null!==n&&0!==n||(r.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_class")+"</p></div>"),a=!0),"recount-form"===o)&&(0==e('select[name="form_id"]').val()&&(r.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_reqs")+"</p></div>"),a=!0));if(a)return i.find(".button-disabled").removeClass("button-disabled"),!1}))}},d={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",(function(n){n.preventDefault();var i=e(this).find('input[type="submit"]');if(!i.hasClass("button-disabled")){var o=e(this).serialize();i.addClass("button-disabled"),e("form.give-export-form select").attr("disabled",!0).trigger("chosen:updated");var r=e(this);e(this).find(".add-notices").length>0&&(r=e(this).find(".add-notices")),r.find(".notice-wrap").remove(),r.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,o,t,this)}}))},process_step:function(t,n,i,o){I=!0;var r=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:n,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){I=!1,r=!0;var a=e(o).parent().find(".notice-wrap");a.find(".give-progress");if(e(o).find(".button-disabled").removeClass("button-disabled"),e(o).find("select").attr("disabled",!1).trigger("chosen:updated"),t.error){var s=t.message;a.html('<div class="updated error"><p>'+s+"</p></div>")}else if(t.success){var l=t.message;a.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+l+'<span class="notice-dismiss"></span></p></div>')}else a.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,(function(){})),i.process_step(parseInt(t.step),n,i,o);!0===r&&e("#give-tools-recount-form").length>0&&(e("#give-tools-recount-form")[0].reset(),e("#give-tools-recount-form .tools-form-dropdown").hide(),e("#give-tools-recount-form .tools-date-dropdown").hide(),e("#give-tools-recount-form .tools-form-dropdown-recount-form-select").val("0").trigger("chosen:updated"))}}).fail((function(t){I=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)}))},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",(function(){e("#give-batch-success").parent().slideUp("fast")}))}},u={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-now",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_progress_counter=Give_Selector_Cache.get(e(".give-update-progress-count")),t.el.main_container.data("resume-update")&&(t.el.update_link.addClass("active").hide().removeClass("give-hidden"),e("#give-restart-upgrades").length||(Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3),window.setTimeout(u.get_db_updates_info,1e3,t))),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",(function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+Give.fn.getGlobalVar("db_update_confirmation_msg_button")+"</a> "+Give.fn.getGlobalVar("db_update_confirmation_msg")+"</p></div>")})),e("#give-db-updates").on("click","a.give-run-update-button",(function(n){return n.preventDefault(),e(this).hasClass("active")||(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),u.start_db_update(),window.setTimeout(u.get_db_updates_info,500,t)),!1})))},start_db_update:function(){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_run_db_updates",run_db_update:1,nonce:Give.fn.getGlobalVar("db_update_nonce")},dataType:"json",success:function(e){}}).always((function(){Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3)}))},get_db_updates_info:function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_db_updates_info"},dataType:"json",success:function(n){var i=Give_Selector_Cache.get(".notice-wrap",t.el.progress_container,!0);-1!==e.inArray("success",Object.keys(n))?n.success?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text("100%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),n.data.message?(t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-error is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3)):n&&-1!==e.inArray("percentage",Object.keys(n.data))?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text(n.data.total_percentage+"%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),e(".give-progress div","#give-db-updates").animate({width:n.data.percentage+"%"},50,(function(){})),window.setTimeout(u.get_db_updates_info,1e3,t)):(i.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3))}})},process_step:function(t,n,i){I=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(n)},dataType:"json",success:function(t){I=!1;var n=Give_Selector_Cache.get(".notice-wrap",i.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.el.update_link.closest("p").remove(),n.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3)):t&&-1!==e.inArray("percentage",Object.keys(t.data))?(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,(function(){})),-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",i.el.heading.data("update-count"))+"</strong>"),i.process_step(parseInt(t.data.step),t.data.update,i)):(n.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3))}}).fail((function(e){I=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",self.el.progress_container).append(e.responseText)})).always((function(){}))},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",(function(){e(this).parent().slideUp("fast")}))}},f={init:function(){this.restartUpgrade(),this.stopUpgrade(),this.restartUpdater()},restartUpgrade:function(){jQuery("#give-restart-upgrades").click("click",(function(e){var t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").show(),jQuery(".give-update-paused-text-p").hide(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},stopUpgrade:function(){jQuery("#give-pause-upgrades").click("click",(function(e){var t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").hide(),jQuery(".give-update-paused-text-p").show(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("stop_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},restartUpdater:function(){jQuery(".give-restart-updater-btn,.give-run-update-now").click("click",(function(e){var t=this;e.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_update")},successConfirm:function(){window.location.assign(jQuery(t).attr("href"))}}).render()}))}},h={onLoadPageNumber:"",init:function(){this.loadGravatar(),this.unlockDonorFields(),this.editDonor(),this.add_email(),this.removeUser(),this.cancelEdit(),this.add_note(),this.delete_checked(),this.addressesAction(),this.bulkDeleteDonor(),h.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-donors-filter .bulkactions input[type="submit"]',this.handleBulkActions)},loadGravatar:function(){var t,n;e(".give-donor-name").each((function(){if(!(t=e(this).find(".give-donor__image")).hasClass("gravatar-loaded")){if(n=t.attr("data-donor_email"),"1"===t.attr("data-has-valid-gravatar")){var i=e("<img>");i.attr("src",G.url(n)),i.attr("width","60"),i.attr("height","60"),e(this).find(".give-donor__image").html(i)}t.addClass("gravatar-loaded")}}))},unlockDonorFields:function(t){e("body").on("click",".give-lock-block",(function(e){new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("unlock_donor_fields_title"),desc:Give.fn.getGlobalVar("unlock_donor_fields_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),e.preventDefault()}))},editDonor:function(){e("body").on("click","#edit-donor",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block")}))},removeUser:function(){e("body").on("click","#disconnect-donor",(function(t){return t.preventDefault(),new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("disconnect_user")},successConfirm:function(){var t={give_action:"disconnect-userid",customer_id:e('input[name="donor_info[id]"]').val(),_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,t,(function(e){window.location.href=e.redirect}),"json")}}).render(),!1}))},cancelEdit:function(){e("body").on("click","#give-edit-donor-cancel",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")}))},add_note:function(){e("body").on("click","#add-donor-note",(function(t){t.preventDefault();var n={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(n.donor_note)e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)}));else{var i=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout((function(){e("#donor-note").css("border-color",i)}),500)}}))},delete_checked:function(){e("#give-donor-delete-confirm").change((function(){var t=e("#give-donor-delete-records"),n=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),n.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),n.attr("disabled",!0))}))},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",(function(t){t.preventDefault();var n=e(this),i=n.parent();i.parent().find(".notice-wrap").remove(),i.find(".spinner").css("visibility","visible"),n.attr("disabled",!0);var o={give_action:"add_donor_email",customer_id:i.find('input[name="donor-id"]').val(),email:i.find('input[name="additional-email"]').val(),primary:i.find('input[name="make-additional-primary"]').is(":checked"),_wpnonce:i.find('input[name="add_email_nonce"]').val()};e.post(ajaxurl,o,(function(e){!0===e.success?window.location.href=e.redirect:(n.attr("disabled",!1),i.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),i.find(".spinner").css("visibility","hidden"))}),"json")}))},addressesAction:function(){var n=this,i=e("#donor-address-wrapper"),o=e(".all-address",i),r=e(".give-no-address-message",i),a=e(o).parent(),s=e(".address-form",i),l=e(".js-cancel",s),c=e('select[name="country"]',s),d=e(".add-new-address",i),u=parseInt(e('input[name="donor-id"]').val());c.on("change",(function(){e(this).trigger("chosen:updated")})),o.on("click",".js-edit",(function(t){var i=e(this).closest(".address");t.preventDefault(),e(".notice",a).remove(),n.__set_address_form_val(i),n.__set_address_form_action("update",i.data("address-id")),d.hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),s.data("process","update")})),o.on("click",".js-remove",(function(t){t.preventDefault();var i=e(this).closest(".address");e(".notice",a).remove(),s.data("changed",!0),n.__set_address_form_val(i),n.__set_address_form_action("remove",i.data("address-id")),s.trigger("submit")})),d.on("click",(function(t){t.preventDefault(),e(".notice",a).remove(),e(this).hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),n.__set_address_form_action("add"),n.__set_address_form_action()})),l.on("click",(function(e){e.preventDefault(),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),s.on("change",(function(){e(this).data("changed",!0)})).on("submit",(function(n){n.preventDefault();var l=e(this);return e(".notice",a).remove(),e(this).data("changed")?(e.ajax({type:"POST",url:ajaxurl,data:{action:"donor_manage_addresses",donorID:u,form:e("form",s).serialize()},beforeSend:function(){t(i,{show:!0})},success:function(n){if(t(i),n.success){var s;switch(n.data.action){case"add":e(".give-grid-row",o).append(n.data.address_html),!r.hasClass("give-hidden")&&e("div.give-grid-col-4",o).length&&r.addClass("give-hidden");break;case"remove":(s=o.find('div[data-address-id*="'+n.data.id+'"]').parent()).length&&s.animate({"margin-left":"-999"},1e3,(function(){s.remove(),r.hasClass("give-hidden")&&!e("div.give-grid-col-4",o).length&&r.removeClass("give-hidden")}));break;case"update":var l=(s=o.find('div[data-address-id*="'+n.data.id+'"]').parent()).prev(),c={},d=!1;parseInt(e(".give-grid-row>div",o).length)<2?e(".give-grid-row",o).append(n.data.address_html):(l.length&&(l.after(n.data.address_html),d=!0),d||(c=s.next()).length&&c.before(n.data.address_html)),s.remove()}a.prepend(n.data.success_msg)}else a.prepend(n.data.error_msg)},dataType:"json"}).always((function(){l.data("changed",!1),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),!1):(d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden"),!1)}))},__set_address_form_action:function(t,n){var i=e("#donor-address-wrapper"),o=e(".address-form",i),r=e('input[name="address-action"]',o),a=e('input[name="address-id"]',o);t=t||"add",n=n||"billing",r.val(t),a.val(n)},__set_address_form_val:function(t){var n=e("#donor-address-wrapper"),i=e(".address-form",n),o=e('[data-address-type="state"]',t).text().substr(2).trim();e('select[name="country"]',i).val().trim()!==e('[data-address-type="country"]',t).text().trim()?(e('select[name="country"]',i).val(e('[data-address-type="country"]',t).text().trim()).trigger("chosen:updated").change(),window.setTimeout((function(){e('[name="state"]',i).val(o).trigger("chosen:updated")}),500)):e('[name="state"]',i).val(o).trigger("chosen:updated"),e('input[name="line1"]',i).val(e('[data-address-type="line1"]',t).text().trim()),e('input[name="line2"]',i).val(e('[data-address-type="line2"]',t).text().trim()),e('input[name="city"]',i).val(e('[data-address-type="city"]',t).text().trim()),e('input[name="zip"]',i).val(e('[data-address-type="zip"]',t).text().trim())},bulkDeleteDonor:function(){var t=e("body");t.on("click","#give-bulk-delete-cancel",(function(t){e(this).closest("tr").hide(),e(".give-skip-donor").trigger("click"),t.preventDefault()})),t.on("click","#cb-select-all-1, #cb-select-all-2",(function(){var t=e(this);e.each(e(".donor-selector"),(function(){var n=e(this).val(),i=e(this).data("name"),o='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+i+"</div>";t.is(":checked")&&!e(this).is(":checked")?e("#give-bulk-donors").append(o):t.is(":checked")||e("#give-bulk-donors").find("#give-donor-"+n).remove()}))})),t.on("click",".donor-selector",(function(){var t=e(this).val(),n=e(this).data("name"),i='<div id="give-donor-'+t+'" data-id="'+t+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+n+"</div>";e(this).is(":checked")?e("#give-bulk-donors").prepend(i):e("#give-bulk-donors").find("#give-donor-"+t).remove()})),t.on("click","#give-bulk-delete .give-donor-delete-confirm",(function(){e(this).is(":checked")?e("#give-bulk-delete-button").removeAttr("disabled"):(e("#give-bulk-delete-button").attr("disabled",!0),e("#give-bulk-delete .give-donor-delete-records").removeAttr("checked"))})),t.on("click","#give-bulk-delete .give-donor-delete-records",(function(){e(this).is(":checked")&&(e("#give-bulk-delete .give-donor-delete-confirm").attr("checked","checked"),e("#give-bulk-delete-button").removeAttr("disabled"))})),t.on("click",".give-skip-donor",(function(){var t=e(this).closest("div").data("id");e("#give-donor-"+t).remove(),e("#donor-"+t).find('input[type="checkbox"]').removeAttr("checked")})),t.on("click",".give-single-donor-delete",(function(t){var n=e(this).data("id"),i=e("tr#donor-"+n).find(".donor-selector"),o=e('[id^="cb-select-all-"]'),r=e("#give-bulk-donors"),a=i.data("name"),s='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+a+"</div>";r.html(""),o.is(":checked")&&o.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),i.attr("checked","checked"),0===e("#give-donor-"+n).length&&(r.prepend(s),e("#give-bulk-delete").slideDown()),t.preventDefault()}))},handleBulkActions:function(t){var n=e(this).closest(".tablenav").find("select").val(),i=[],o=e("#current-page-selector").val(),r=h.onLoadPageNumber!==o,s=Give.fn.getGlobalVar("donors_bulk_action.no_action_selected"),l=Give.fn.getGlobalVar("donors_bulk_action.no_donor_selected");return!!r||(e.each(e(".donor-selector:checked"),(function(){i.push(e(this).val())})),"-1"===n?(new a.GiveWarningAlert({modalContent:{title:s.title,desc:s.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1):parseInt(i)?("delete"===n&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(new a.GiveWarningAlert({modalContent:{title:l.title,desc:l.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1))}},p={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",(function(t){t.preventDefault();var n=e(this).attr("href");return new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("revoke_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",(function(t){var n=e(this).attr("href");return new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("regenerate_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))}},m={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_template_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this;e(".give-metabox-tabs a").on("click",(function(n){n.preventDefault();var i=e(this);t.activate_tab(i),t.update_query(i)}))},activate_tab:function(t){var n=t.data("tab-id"),i=t.parent(),o=e("ul.give-metabox-sub-tabs",i),r=o.length,a=e(".give-metabox-tabs a").parents("li"),s=e("ul.give-metabox-sub-tabs"),l=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(n),r){i.toggleClass("active"),o.removeClass("give-hidden");var c=e("li.active","ul.give-metabox-sub-tabs");s.not(o).addClass("give-hidden"),a.not(i).removeClass("active"),c.addClass("active")}else l?l&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),a.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):a.each((function(t,n){(n=e(n)).removeClass("active"),n.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",n).addClass("give-hidden")}));t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var n=t.data("tab-id"),i=e.query.set("give_tab",n).remove("message").toString();history.replaceState&&history.replaceState(null,null,i)},setup_colorpicker_fields:function(){e(document).ready((function(){var t=e(".give-colorpicker");t.length&&t.each((function(t,n){var i=e(n);i.parents(".give-template").length||i.wpColorPicker()}))}))},setup_media_fields:function(){var t,n,i=e("body");i.on("click",".give-upload-button",(function(o){o.preventDefault();var r={};switch(n=e(this),e(this).data("field-type")){case"media":r={title:Give.fn.getGlobal().metabox_fields.media.button_title,button:{text:Give.fn.getGlobal().metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:r={title:Give.fn.getGlobal().metabox_fields.file.button_title,button:{text:Give.fn.getGlobal().metabox_fields.file.button_title},multiple:!1}}void 0!==jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing")&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var a=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");void 0!==a&&""!==a&&(r.library={type:a}),(t=wp.media(r)).on("select",(function(){var e=t.state().get("selection").first().toJSON(),o=n.prev(),r="id"===n.data("fvalue")?e.id:e.url;if(i.trigger("give_media_inserted",[e,o]),o.val(r),"id"!==n.data("fvalue")){var a='input[name="'+o.attr("name")+'_id"]';o.closest("tr").next("tr").find(a).length&&o.closest("tr").next("tr").find(a).val(e.id)}})),t.open()})),i.on("give_media_inserted",(function(t,i){var o=n.parents(".give-field-wrap"),r=e(".give-image-thumb",o);return!!r.length&&("image"!==i.type?(r.addClass("give-hidden"),e("img",r).attr("src",""),!1):(r.find("img").attr("src",i.url),void r.removeClass("give-hidden")))})),e("span.give-delete-image-thumb",".give-image-thumb").on("click",(function(t){t.preventDefault();var n=e(this).parents(".give-field-wrap"),i=e(this).parent(),o=e('input[type="text"]',n);i.addClass("give-hidden"),o.val(""),e("img",i).attr("src","")}))},setup_repeatable_fields:function(){jQuery((function(){jQuery(".give-repeatable-field-section").each((function(){var t=e(this),n={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:Give.fn.getGlobalVar("confirm_before_remove_row_text"),is_sortable:!0,before_add:null,after_add:g,before_remove:null,after_remove:v,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);var o=e(".give-row",t).not(".give-template");o.length&&o.each((function(t,n){var i=e('input[type="radio"].give-field',e(n));i.length&&i.each((function(){e(this).attr("data-give-checked",e(this).is(":checked"))}))})),e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item),e("body").trigger("repeater_field_sorting_stop",[n.item])},update:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);var o=e(".give-row",t).not(".give-template"),r=e(this).closest(".give-repeatable-fields-section-wrapper");if(o.length){var a=1;o.each((function(t,n){var i=e(".give-field, label",e(n));i.length&&i.each((function(){var t=e(this).parents(".give-field-wrap"),n=e(this);e.each(this.attributes,(function(e,i){var o,r=this.value.replace(/\[/g,"_").replace(/]/g,""),s=r+"_field",l="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(a-1)+"]"),o=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(s)&&(l=o+"_field",t.removeClass(s).addClass(l)),r==n.attr("id")&&n.attr("id",o))}))})),a++})),window.setTimeout((function(){e("input[data-give-checked]",r).each((function(t,n){(n=e(n)).prop("checked","true"===n.attr("data-give-checked"))}))}),100),t.trigger("repeater_field_row_reordered",[i.item])}}}};jQuery(this).repeatable_fields(n)}))}))},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),n=e("body");n.on("click",".give-row-head button",(function(){var t=e(this).closest(".give-row");t.toggleClass("closed"),e(".give-row-body",t).toggle()})),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",(function(){_(e(this))})),n.on("repeater_field_sorting_start",(function(t,n){var i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(n).attr("id"))}),300)}))})),n.on("repeater_field_sorting_stop",(function(t,n){var i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){var t=e(n).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout((function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")}),100)}),300)}))})),t.each((function(t,n){var i=e(n);_(i),parseInt(i.data("close-tabs"))&&(e(".give-row-head button",i).trigger("click"),e(".give-template",i).removeClass("closed"),e(".give-template .give-row-body",i).show())})),t.on("repeater_field_new_row_added",(function(t,n,i){e(".give-colorpicker",e(this)).each((function(t,n){var i=e(n);i.parents(".wp-picker-container").length||i.parents(".give-template").length||i.wpColorPicker()}));var o=e("div[data-wp-editor]",i);o.length&&o.each((function(t,n){var i=e(n),o=e(".wp-editor-wrap",i),r=e("textarea",i),a="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),s=o.prev();r.attr("id",a),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:i.data("wp-editor"),wp_editor_id:a,textarea_name:e("textarea",i).attr("name")},(function(t){o.remove(),s.after(t),tinyMCEPreInit.qtInit[r.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:a}),tinyMCEPreInit.mceInit[a]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:a+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+a}),tinymce.init(tinyMCEPreInit.mceInit[a]),quicktags(tinyMCEPreInit.qtInit[a]),QTags._buttonsInit(),window.setTimeout((function(){switchEditors.go(a,"html"),e("#"+a+"-tmce").trigger("click")}),100),window.wpActiveEditor||(window.wpActiveEditor=a)}))}))}))},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",(function(){var t=e(this).closest("tr"),n=e(".give-row-head h2 span",t),i=n.data("header-title");if(e(this).val()&&e(this).val()===n.html())return!1;e(this).val()?n.html(i+": "+e(this).val()):n.html(i)})),e(".give-multilevel-text-field").each((function(t,n){if(t){var i=e(n),o=i.closest("tr"),r=e(".give-row-head h2 span",o),a=r.data("header-title");if(i.val()&&i.val()===r.html())return!1;i.val()?r.html(a+": "+i.val()):r.html(a)}})),t.on("repeater_field_row_deleted",(function(){var t=e(this);window.setTimeout((function(){var n=e(".give-row",t).not(".give-template"),i=e(".give-give_default_radio_inline",n);1===n.length&&i.prop("checked",!0)}),200)})),t.on("repeater_field_new_row_added",(function(t,n,i){var o=e(this),r=0;window.setTimeout((function(){!1===e(".give-give_default_radio_inline",o).is(":checked")&&e(".give-row",o).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)}),200),e('input[type="hidden"].give-levels_id',o).each((function(t,n){var i=e(n),o=parseInt(i.val());r<o&&(r=o)})),e('input[type="hidden"].give-levels_id',i).val(++r)}))}},g=function(t,n){var i=e(t).attr("data-rf-row-count"),o=e(t).parents(".give-repeatable-field-section");i++,e("*",n).each((function(){e.each(this.attributes,(function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",i-1)}))})),e(t).attr("data-rf-row-count",i),o.trigger("repeater_field_new_row_added",[t,n])},v=function(t){var n=e(t),i=n.parents(".give-repeatable-field-section"),o=e(t).attr("data-rf-row-count");n.attr("data-rf-row-count",--o),i.trigger("repeater_field_row_deleted")},_=function(t){if(parseInt(t.data("group-numbering"))){var n=e(".give-row-head h2 span",t),i=n.data("header-title");n.each((function(t,n){var o=e(n);o.parents(".give-template").length||o.html(i+": "+t)}))}},b={onLoadPageNumber:"",init:function(){b.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(t){var n=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+n+'"]').text(),o=e('input[name="payment[]"]:checked').length,r=-1!==n.indexOf("set-status-"),s="",l="",c=e("#current-page-selector").val();if(b.onLoadPageNumber!==c)return!0;if("-1"===(n=r?"set-to-status":n))return new a.GiveWarningAlert({modalContent:{title:Give.fn.getGlobal().donors_bulk_action.no_action_selected.title,desc:Give.fn.getGlobal().donors_bulk_action.no_action_selected.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;if(Object.keys(Give.fn.getGlobalVar("donations_bulk_action")).length)for(l in Give.fn.getGlobalVar("donations_bulk_action"))if(l===n){if(s=r?Give.fn.getGlobal().donations_bulk_action[n].zero.replace("{status}",i.replace("Set To ","")):Give.fn.getGlobal().donations_bulk_action[n].zero,!parseInt(o))return new a.GiveWarningAlert({modalContent:{title:Give.fn.getGlobal().donations_bulk_action.titles.zero,desc:s,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;s=1<o?Give.fn.getGlobal().donations_bulk_action[n].multiple:Give.fn.getGlobal().donations_bulk_action[n].single,t.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_bulk_action"),desc:s.replace("{payment_count}",o).replace("{status}",i.replace("Set To ",""))},successConfirm:function(t){e("#give-payments-filter").submit()}}).render()}return!0}},y=function(){var e=document.querySelectorAll(".js-give-shortcode-button");if(e){var t,n=j(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;new S(i).init()}}catch(e){n.e(e)}finally{n.f()}}};e((function(){var t;e("body").on("click","button.notice-dismiss",(function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&n(jQuery(this).closest("div.give-notice").attr("id"))})),function(){var t,n=e(".give_datepicker");if(n.length){var i={},o={altFormat:"yy-mm-dd",onClose:function(e,t){e.length||t.input.next().val("")}};e.each(n,(function(o,r){r=e(r),t=void 0!==r.attr("data-standard-date")?r.attr("data-standard-date"):r.attr("value"),r.attr("name").length&&(i=r.clone(),n[o]=i,i.attr("name",""),r.before(i),r.hide(),r.attr("class",""),r.attr("id",""),r.val(t),r.prop("readonly",!0))})),n.length>0&&e.each(n,(function(t,n){n=e(n),o.altField=n.next(),n.datepicker(o)}))}}(),e('select[name="give-payment-status"]').on("change",(function(){var t=e(this).val();e(".give-donation-status").removeClass((function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")})).addClass("status-"+t)})),(t=e(".give-select-chosen")).hasClass("give-chosen-settings")?t.chosen({no_results_text:Give.fn.getGlobalVar("chosen_add_title_prefix")+" ",width:"30%"}).on("chosen:no_results",(function(t,n){e(n.chosen.container).on("keydown",(function(i){var o=n.chosen.get_search_text(),r=jQuery(n.chosen.form_field);13!==i.keyCode||r.find('option[value="'+o+'"]').length||"true"!==r.attr("data-allows-new-values")||(e(n.chosen.form_field).append('<option value="'+o+'" selected>'+o+"</option>").trigger("chosen:updated"),n.chosen.result_highlight=n.chosen.search_results.find("li.active-result").lasteturn,n.chosen.result_select(t))}))})):Object(T.a)(t),e(".chosen-container").each((function(){0===e(this).width()&&e(this).css("width","100%")})),e("#post").on("click",".give-thickbox",(function(){e(".give-select-chosen","#choose-give-form").css("width","100%")})),e.giveAjaxifyFields({type:"country_state",debug:!0}),o.init(),s.init(),l.init(),c.init(),h.init(),p.init(),d.init(),u.init(),f.init(),m.init(),b.init(),y(),e("a.give-rating-link").click((function(){jQuery(this).parent().text(jQuery(this).data("rated"))})),e(".give-ajax-user-search").on("keyup",(function(){var t=e(this).val(),n="";e(this).data("exclude")&&(n=e(this).data("exclude")),e(".give-ajax").show(),data={action:"give_search_users",user_name:t,exclude:n},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".give-ajax").hide(),e(".give_user_search_results").removeClass("hidden"),e(".give_user_search_results span").html(""),e(t.results).appendTo(".give_user_search_results span"),document.body.style.cursor="default"}})})),e("body").on("click.giveSelectUser",".give_user_search_results span a",(function(t){t.preventDefault();var n=e(this).data("login");e(".give-ajax-user-search").val(n),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")})),e("body").on("click.giveCancelUserSearch",".give_user_search_results a.give-ajax-user-cancel",(function(t){t.preventDefault(),e(".give-ajax-user-search").val(""),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")}));var r=e("#poststuff"),a=Give.fn.getGlobalVar("thousands_separator"),g=Give.fn.getGlobalVar("decimal_separator"),v="",_="",w="",x=g===a?1:0;r.on("keyup","input.give-money-field, input.give-price-field",(function(){var t={label:Give.fn.getGlobalVar("price_format_guide").trim()};v=(e(this).val().match(new RegExp(a,"g"))||[]).length,_=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(a)&&x<v||_?e(this).giveHintCss("show",t):e(this).giveHintCss("hide",t),v=_=""})),r.on("focusout","input.give-money-field, input.give-price-field",(function(){if(w=i(e(this).val(),!1),e(this).giveHintCss("hide",{label:Give.fn.getGlobalVar("price_format_guide").trim()}),i("0",!1)===i(e(this).val(),!1)){var t=e(this).attr("placeholder");return t=t||"0",e(this).val(t),!1}-1!==(w=w.replace(".",g)).indexOf("-")&&(w=w.replace("-","")),e(this).val(w)})),r.on("focusout","#_give_number_of_donation_goal",(function(){1>e(this).val()&&e(this).val(1)})),e(".give-settings-page").on("click","#give-show-sub-nav",(function(t){t.preventDefault();var n=e(this).next();return n.is(":hover")||n.toggleClass("give-hidden"),!1})).on("blur","#give-show-sub-nav",(function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")})),e(".give_email_api_notification_status_setting input").change((function(){var t=e(this).val(),n="enabled"===t,i={};return e(this).closest(".give_options_panel").length?i=e(this).closest(".give_options_panel").children(".give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section"):e(this).closest("table").length&&(i=e(this).closest("table").find("tr:not(.give_email_api_notification_status_setting)")),-1!==jQuery.inArray(t,["enabled","disabled","global"])&&(!!i.length&&void(n?i.show():i.hide()))})),e(".give_email_api_notification_status_setting input:checked").change(),E()}))}(jQuery),jQuery(window).resize((function(){E()}));function A(){var e=document.querySelector(".give-tools-setting-page-import table.step-2 .give-import-donation-required-fields");if("undefined"!==e&&null!==e){var t=!0,n=!1,i=!1,o=!1,r=!1;document.querySelectorAll(".give-import-donation-required-fields li").forEach((function(e){e.querySelector(".dashicons").classList.remove("dashicons-yes"),e.querySelector(".dashicons").classList.add("dashicons-no-alt")}));var a=Array.from(document.querySelectorAll("table.step-2 tbody select")).map((function(e){return e.value}));a.includes("email")&&(n=!0,document.querySelector(".give-import-donation-required-email .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-email .dashicons").classList.add("dashicons-yes")),a.includes("first_name")&&(i=!0,document.querySelector(".give-import-donation-required-first .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-first .dashicons").classList.add("dashicons-yes")),a.includes("amount")&&(o=!0,document.querySelector(".give-import-donation-required-amount .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-amount .dashicons").classList.add("dashicons-yes")),(a.includes("form_id")||a.includes("form_title"))&&(r=!0,document.querySelector(".give-import-donation-required-form .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-form .dashicons").classList.add("dashicons-yes")),n&&i&&o&&r&&(t=!1),document.getElementById("recount-stats-submit").disabled=t}}jQuery((function(){window.onload=function(){var e,t;A(),"undefined"!==(e=document.querySelector(".give-tools-setting-page-import table.step-2 tbody select"))&&null!==e&&jQuery(".give-tools-setting-page-import table.step-2 tbody").on("change","select",(function(){A()})),jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3").length>0&&function e(){var t=jQuery("form.tools-setting-page-import");!0;var n=t.find(".give-progress"),i=jQuery(n).data("total_ajax"),o=jQuery(n).data("current"),r=jQuery(n).data("start"),s=jQuery(n).data("end"),l=jQuery(n).data("next"),c=jQuery(n).data("total"),d=jQuery(n).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("give_donation_import"),total_ajax:i,current:o,start:r,end:s,next:l,total:c,per_page:d,fields:t.serialize()},dataType:"json",success:function(t){jQuery(n).data("current",t.current),jQuery(n).find("div").width(t.percentage+"%"),1==t.next?(jQuery(n).data("start",t.start),jQuery(n).data("end",t.end),1==t.last&&jQuery(n).data("next",!1),e()):(!1,window.location=t.url)},error:function(){!1,new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}(),t="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-1 .is_csv_valid",jQuery(t).length>0&&(window.location=jQuery(t).val()),function(){var e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-2 .csv_not_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}(),function(){if(jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-2").length>0){var e=jQuery("form.tools-setting-page-import"),t=e.find(".give-progress");!0,jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("core_settings_import"),fields:e.serialize()},dataType:"json",success:function(e){!1,!0===e.success?(jQuery(t).find("div").width(e.percentage+"%"),window.location=e.url):new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()},error:function(){!1,new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}}(),function(){var e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-1 .is_json_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}()}}));n(508);function O(e,t){var n="",i=document.querySelector(".give-save-button");try{n=JSON.parse(t),e.value=JSON.stringify(n,void 0,2),e.style.border="none",i.removeAttribute("disabled")}catch(t){e.style.border="1px solid red",i.setAttribute("disabled","disabled")}}function P(e){null!==e&&(O(e,e.value),e.addEventListener("blur",(function(t){O(e,t.target.value)})))}window.addEventListener("DOMContentLoaded",(function(){document.querySelector(".stripe-cc-field-format-settings");var e=document.querySelectorAll('input[name="stripe_fonts"]'),t=document.getElementById("stripe_styles_base"),n=document.getElementById("stripe_styles_empty"),i=document.getElementById("stripe_styles_invalid"),o=document.getElementById("stripe_styles_complete"),r=document.getElementById("stripe_custom_fonts"),s=document.getElementById("give-payment-status"),l=(document.querySelector(".give-stripe-disconnect"),document.querySelectorAll('input[name="stripe_checkout_type"]')),c=Array.from(document.querySelectorAll(".stripe-checkout-field")),d=document.getElementById("give-stripe-connected"),u=Array.from(document.querySelectorAll('input[name="stripe_hide_icon"]')),f=document.querySelector(".stripe-icon-style"),h=Array.from(document.querySelectorAll(' input[name="stripe_mandate_acceptance_option"]')),p=document.querySelector(".stripe-mandate-acceptance-text"),m=Array.from(document.querySelectorAll('input[name="stripe_becs_hide_icon"]')),g=document.querySelector(".stripe-becs-icon-style"),v=Array.from(document.querySelectorAll(' input[name="stripe_becs_mandate_acceptance_option"]')),_=document.querySelector(".stripe-becs-mandate-acceptance-text"),b=Array.from(document.querySelectorAll(".give-stripe-account-type-manual")),y=document.querySelector(".give-stripe-account-type-connect"),w=Array.from(document.querySelectorAll('input[name="stripe_connection_type"]')),x=document.querySelector('input[name="stripe_connection_type"]:checked'),k=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn")),C=Array.from(document.querySelectorAll(".give-stripe-account-set-default")),S=Array.from(document.querySelectorAll('input[name="give_stripe_per_form_accounts"]')),T=document.querySelector(".give-stripe-per-form-default-account"),j=Array.from(document.querySelectorAll(".give-stripe-account-edit-name")),M=Array.from(document.querySelectorAll(".give-stripe-account-update-name")),I=Array.from(document.querySelectorAll(".give-stripe-account-cancel-name")),G=document.getElementById("give-stripe-account-manager-errors");function E(e){"connect"===e?(b.map((function(e){e.classList.add("give-hidden")})),y.classList.remove("give-hidden")):(b.map((function(e){e.classList.remove("give-hidden")})),y.classList.add("give-hidden"))}if(P(t),P(n),P(i),P(o),P(r),null!==I&&I.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode,i=n.querySelector(".give-stripe-account-update-name"),o=n.querySelector(".give-stripe-account-edit-name"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector('input[name="account_name"]'),s=n.querySelector(".give-stripe-account-default > a");r.textContent=a.value,t.classList.add("give-hidden"),i.classList.add("give-hidden"),a.classList.add("give-hidden"),o.classList.remove("give-hidden"),null!==s&&s.classList.remove("give-hidden")}))})),null!==j&&j.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode,i=n.querySelector(".give-stripe-account-update-name"),o=n.querySelector(".give-stripe-account-cancel-name"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector(".give-stripe-account-default > a"),s=r.textContent.trim(),l=document.createElement("input");l.type="text",l.name="account_name",l.value=s,r.textContent="",r.append(l),t.classList.add("give-hidden"),i.classList.remove("give-hidden"),o.classList.remove("give-hidden"),null!==a&&a.classList.add("give-hidden")}))})),null!==M&&M.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode.parentNode,i=n.querySelector(".give-stripe-disconnect-account-btn"),o=t.getAttribute("data-account"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector(".give-stripe-account-cancel-name"),s=n.querySelector(".give-stripe-account-default > a"),l=n.querySelector('input[name="account_name"]').value,c=new XMLHttpRequest,d=new FormData,u=e.target.previousElementSibling;d.append("action","give_stripe_update_account_name"),d.append("account_slug",o),d.append("new_account_name",l),c.open("POST",ajaxurl),c.onload=function(){var e=JSON.parse(c.response),n="";if(200===c.status&&e.success){var o=e.data.slug;n='<div class="give-notice notice inline success notice-success"><p>'.concat(e.data.message,"</p></div>"),r.innerHTML=e.data.name,t.classList.add("give-hidden"),a.classList.add("give-hidden"),t.setAttribute("data-account",o),u.classList.remove("give-hidden"),null!==i&&i.setAttribute("data-account",o),null!==s&&s.classList.remove("give-hidden")}else n='<div class="give-notice notice inline error notice-error"><p>'.concat(e.data.message,"</p></div>");G.innerHTML=n},c.send(d)}))})),null!==S&&S.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?T.classList.remove("give-hidden"):T.classList.add("give-hidden")}))})),null!==C&&C.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=new XMLHttpRequest,n=new FormData;n.append("action","give_stripe_set_account_default"),n.append("account_slug",e.target.getAttribute("data-account")),t.open("POST",ajaxurl),t.onload=function(){var n=JSON.parse(t.response);200===t.status&&n.success&&(window.location.href=e.target.getAttribute("data-url"))},t.send(n)}))})),null!==w&&null!==x&&(E(x.value),w.forEach((function(e){e.addEventListener("change",(function(e){E(e.target.value)}))}))),null!==u&&u.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?f.classList.remove("give-hidden"):f.classList.add("give-hidden")}))})),null!==h&&h.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?p.classList.remove("give-hidden"):p.classList.add("give-hidden")}))})),null!==m&&m.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?g.classList.remove("give-hidden"):g.classList.add("give-hidden")}))})),null!==v&&v.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?_.classList.remove("give-hidden"):_.classList.add("give-hidden")}))})),null!==d){var A=d.getAttribute("data-status"),O=d.getAttribute("data-redirect-url"),z=d.getAttribute("data-display"),L=d.getAttribute("data-title"),N=d.getAttribute("data-first-detail"),q=d.getAttribute("data-second-detail");"connected"===A&&"0"===z&&(new a.GiveConfirmModal({modalWrapper:"give-stripe-connected-modal give-modal--success",type:"confirm",modalContent:{title:L,desc:"<span>".concat(N,'</span><span class="give-field-description">').concat(q,"</span>")},successConfirm:function(e){window.location.href=O}}).render(),d.setAttribute("data-display","1"),history.pushState({urlPath:O},"",O))}null!==l&&l.forEach((function(e){e.addEventListener("change",(function(e){"modal"===e.target.value?c.map((function(e){return e.classList.remove("give-hidden")})):c.map((function(e){return e.classList.add("give-hidden")}))}))})),null!==k&&k.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target;new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:Give.fn.getGlobalVar("disconnect_stripe_title"),desc:t.getAttribute("data-disconnect-message")},successConfirm:function(){window.location.href="".concat(t.getAttribute("href"),"&account=").concat(t.getAttribute("data-account"))}}).render()}))})),null!==s&&s.addEventListener("change",(function(e){var t=document.getElementById("give-stripe-opt-refund");null!==t&&(t.checked=!1,"refunded"===e.target.value?document.getElementById("give-stripe-opt-refund-wrap").style.display="block":document.getElementById("give-stripe-opt-refund-wrap").style.display="none")})),null!==e&&e.forEach((function(e){var t=document.querySelector(".give-stripe-google-fonts-wrap"),n=document.querySelector(".give-stripe-custom-fonts-wrap");e.addEventListener("change",(function(e){"custom_fonts"===e.target.value?(t.style.display="none",n.style.display="table-row"):"google_fonts"===e.target.value&&(t.style.display="table-row",n.style.display="none")}))}))})),s.a.modal=a;var z=s.a.init,L=s.a.fn,N=s.a.cache,q=s.a.modal,W=s.a.notice;window.Give={init:z,fn:L,cache:N,modal:q,notice:W,initializeIframeResize:l.a}},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(102),o=function(e){return new i.iframeResize({log:!1,sizeWidth:!0,checkOrigin:[window.location.origin],heightCalculationMethod:"documentElementOffset",widthCalculationMethod:"documentElementOffset",onMessage:function(t){var n=e.parentElement;switch(e.parentElement.classList.contains("modal-content")&&(n=n.parentElement.parentElement),t.message.action){case"giveEmbedFormContentLoaded":var i=setTimeout((function(){o()}),400);e.setAttribute("data-contentLoaded","1");var o=function(){clearTimeout(i),n.querySelector(".iframe-loader").style.opacity=0,n.querySelector(".iframe-loader").style.transition="opacity 0.2s ease",e.style.visibility="visible",e.style.minHeight="",n.style.height=null}}},onInit:function(){var t=e.parentElement,n=!1;window.addEventListener("beforeunload",(function(){n=!0})),e.contentWindow.addEventListener("beforeunload",(function(){!1===n&&(e.scrollIntoView({behavior:"smooth",inline:"nearest"}),e.parentElement.querySelector(".iframe-loader").style.opacity=1,e.parentElement.querySelector(".iframe-loader").style.transition="",e.style.visibility="hidden",t.style.height="700px")})),e.iFrameResizer.sendMessage({currentPage:Give.fn.removeURLParameter(window.location.href,"giveDonationAction")})}},e)}},9:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}});
67
  * @subpackage: Assets/JS
68
  * @copyright: Copyright (c) 2016, GiveWP
69
  * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
70
+ */();s=s.filter((function(e){var t=-1!==parseInt(e.attr("href").indexOf("&tab="+r.tab));return t&&(n=e),!t})),n.length&&(s.unshift(a.pop()),a.push(n))}new Promise((function(e,t){a.length&&jQuery.each(a,(function(e,t){(t=jQuery(t)).hasClass("give-hidden")&&t.removeClass("give-hidden")})),e(!0)})).then((function(e){s.length?(o.html(""),jQuery.each(s,(function(e,t){(t=jQuery(t)).hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(o)})),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(i),i.show()):i.hide()}))}))}!function(e){var t=function(t,n){var i=(n=jQuery.extend({wrapper:!0,show:!1},n)).wrapper?e(".give-spinner-wrapper",t):{},o=e(".give-spinner",t);if(n.show)return i.length&&i.addClass("is-active"),void o.addClass("is-active");i.length&&i.removeClass("is-active"),o.removeClass("is-active")},n=function(e){var t=document.location.href,n=t.split("?");e=void 0===e?"":e.replace("give-","");if(n.length>=2){for(var i=n.shift(),o=n.join("?"),r=encodeURIComponent("give-message")+"=",a=o.split(/[&;]/g),s=a.length;s-- >0;)(-1!==a[s].lastIndexOf(r,0)||""!==e&&-1!==a[s].lastIndexOf("give-messages",0)&&a[s].match(e+"$"))&&a.splice(s,1);t=i+"?"+a.join("&"),window.history.pushState("",document.title,t)}return t};function i(e,t){return e=accounting.unformat(e,Give.fn.getGlobalVar("decimal_separator")).toString(),e=!1!==(t="undefined"!==t&&t)?parseFloat(e).toFixed(t):parseFloat(e).toFixed(Give.fn.getGlobalVar("currency_decimals"))}var o={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){new a.GiveConfirmModal({triggerSelector:".delete-single-donation",modalWrapper:"give-modal--warning",modalContent:{title:Give.fn.getGlobalVar("confirm_delete_donation"),desc:Give.fn.getGlobalVar("delete_payment")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})},resendSingleDonationReceipt:function(){new a.GiveConfirmModal({triggerSelector:".resend-single-donation-receipt",modalContent:{title:Give.fn.getGlobalVar("confirm_resend"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})}},s={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change((function(){var t=e(this),n={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"};return e.post(ajaxurl,n,(function(n){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");var i=e("#give-order-address-state-wrap");i.find("*").not(".order-data-address-line").remove(),void 0!==r()(n.states_found)&&!0===n.states_found?(i.append(n.data),i.find("select").chosen()):(i.append('<input type="text" name="give-payment-address[0][state]" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==r()(n.show_field)&&!1===n.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))})),!1}))},add_note:function(){e("#give-add-payment-note").on("click",(function(t){function n(){e.ajax({type:"POST",data:a,url:ajaxurl,beforeSend:function(){o.prop("disabled",!0),i.prop("disabled",!0)},success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).always((function(){o.prop("disabled",!1),i.prop("disabled",!1)}))}t.preventDefault();var i=e(this),o=e("#give-payment-note"),r=e("#donation_note_type"),a={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:o.val(),type:r.val()};if(a.note)"donor"===a.type&&give_vars.email_notification.donor_note.status?new Give.modal.GiveConfirmModal({successConfirm:function(){n()},modalContent:{desc:give_vars.donor_note_confirm_msg}}).render():n();else{var s=o.css("border-color");o.css("border-color","red"),setTimeout((function(){o.css("border-color",s)}),500)}}))},remove_note:function(){e("body").on("click",".give-delete-payment-note",(function(t){t.preventDefault();var n=this;new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_deletion"),desc:Give.fn.getGlobalVar("delete_payment_note")},successConfirm:function(t){var i={action:"give_delete_payment_note",payment_id:e(n).data("payment-id"),note_id:e(n).data("note-id")};e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail((function(e){window.console&&window.console.log&&console.log(e)}))}}).render()}))},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",(function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)}))},resend_receipt:function(){e("body").on("click","#give-resend-receipt",(function(t){var n=this;t.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(){window.location.assign(e(n).attr("href"))}}).render()}))},variable_price_list:function(){e("#give_payment_form_select").chosen().change((function(){var t,n=e(".give-donation-level");return!!(t=e(this).val())&&(!!n.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){(t=t.trim())?(n.html(t),e('select[name="give-variable-price"]').chosen().change()):n.html("")}}))})),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',(function(){var t=jQuery(this).data("prices"),n=e("#give-payment-total");""!==t&&e(this).val()in t&&(n.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout((function(){n.css("background-color","white")}),1e3))}))}},l={init:function(){this.toggle_gateways(),this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings(),this.saveButtonTriggered(),this.changeAlert(),this.detectSettingsChange(),this.sequentialDonationIDPreview()},toggle_gateways:function(){e(".gateways-checkbox").on("click",(function(){var t=e(this).prev(".gateways-radio"),n=(this.checked,e(".gateways-checkbox:checked"));1===n.length?(n.prev(".gateways-radio").attr("checked","checked"),this.checked?t.removeAttr("disabled"):t.attr("disabled","disabled")):this.checked?(t.removeAttr("disabled"),t.removeAttr("checked")):t.attr("disabled","disabled")}))},setting_change_country:function(){e('select[name="base_country"]').change((function(){var t=e(this),n={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,n,(function(i){t.closest("tr").next().show(),e("#base_state_chosen").remove(),void 0!==r()(i.states_found)&&1==i.states_found?(e(':input[name="base_state"]').replaceWith(i.data).addClass("give-select-chosen"),e(':input[name="base_state"]').chosen()):(void 0!==r()(i.show_field)&&0==i.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+n.field_name+'" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'))})),!1}))},toggle_options:function(){e('input[name="email_access"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e('input[name="enable_recaptcha"]').parents("tr").show(),"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide(),e('input[name="enable_recaptcha"]').parents("tr").hide())})).change(),e('input[name="enable_recaptcha"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t&&"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())})).change(),e('input[name="form_featured_img"]',".give-setting-tab-body-display").on("change",(function(){"enabled"===e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val()?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()})).change(),e('input[name="terms"]',".give-setting-tab-body-display").on("change",(function(){"enabled"===e('input[name="terms"]:checked',".give-setting-tab-body-display").val()?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())})).change(),e('input[name="admin_notices"]',".give-setting-tab-body-emails").on("change",(function(){"enabled"===e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val()?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())})).change(),e('input[name="sequential-ordering_status"]',".give-setting-tab-body-general").on("change",(function(){var t=e('input[name="sequential-ordering_status"]:checked',".give-setting-tab-body-general").val(),n=e(this).closest("table");"enabled"===t?e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").show():e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").hide()})).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout((function(){t.slideUp()}),5e3)},verify_settings:function(){var t=e("#success_page"),n=e("#failure_page");t.add(n).change((function(){if(t.val()===n.val()){var i='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+Give.fn.getGlobalVar("matched_success_failure_page")+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+Give.fn.getGlobalVar("dismiss_notice_text")+"</span></button> </div>",o=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),o.length)return!1;e("h1","#give-mainform").after(i),o=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",o).click((function(){o.remove()}))}})).change()},saveButtonTriggered:function(){e(".give-settings-setting-page").on("click",".give-save-button",(function(){e(window).unbind("beforeunload")}))},changeAlert:function(){e(window).bind("beforeunload",(function(e){var t=Give.fn.getGlobalVar("setting_not_save_message");if(I)return(e||window.event).returnValue=t,t}))},detectSettingsChange:function(){var t=e(".give-settings-setting-page");if(t.length>0){var n=e("#give-mainform").serialize();t.on("change keyup blur","form",(function(t){if(!e(t.target).closest(".js-fields-has-custom-saving-logic").length){var i=e("#give-mainform").serialize();I=n!==i}}))}},sequentialDonationIDPreview:function(){var t=jQuery("#sequential-ordering_preview");t.length&&(jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number, #sequential-ordering_number_padding, #sequential-ordering_number_suffix").on("keyup change",(function(){var e=jQuery("#sequential-ordering_number_prefix").val(),n=jQuery("#sequential-ordering_number").val().trim()||"1",i=jQuery("#sequential-ordering_number_padding").val().trim(),o=jQuery("#sequential-ordering_number_suffix").val(),r="".concat(e).concat(n.padStart(i,"0")).concat(o);t.val(r)})),jQuery("#sequential-ordering_number_prefix").trigger("keyup"),jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number_suffix").on("blur",(function(){e(this).val(e(this).val().replace(new RegExp(" ","g"),"-"))})))}},c={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change((function(){"other"===e(this).val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()}))},donors_export:function(){e("#give_donor_export_form").change((function(){var t=e(this),n=e("option:selected",t).val(),i=e("#give_customer_export_option");"0"===t.val()?i.show():i.hide();var o=e(".give_price_options_select");if(0!=parseInt(n)){var r={action:"give_check_for_form_price_variations",form_id:n,all_prices:!0};e.post(ajaxurl,r,(function(t){o.remove(),e("#give_donor_export_form_chosen").after(t)}))}else o.remove()}))},recount_stats:function(){e("body").on("change","#recount-stats-type",(function(){var t=e("#give-tools-recount-form"),n=e("option:selected",this).data("type"),i=e("#recount-stats-submit"),o=e(".tools-form-dropdown"),r=e(".tools-date-dropdown-delete-donations");if(t.find(".notice-wrap").remove(),i.removeClass("button-disabled").attr("disabled",!1),o.hide(),r.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===n)t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("reset_stats_warn")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled");else if("delete-test-donors"===n){t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_test_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===n){t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_import_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-donations"===n){r.show(),t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_donations_only")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")}else o.hide(),o.val(0);var a=e(".tools-form-dropdown-"+n);a.show(),a.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+n).show()})),e("body").on("change","#confirm-reset",(function(){e(this).is(":checked")?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")})),e("#give-tools-recount-form").submit((function(t){var n=e("#recount-stats-type").val(),i=e(this),o=e("option:selected",this).data("type");if("reset-stats"===o){if(e("#confirm-reset").is(":checked"))return!0;a=!0}i.find(".notice-wrap").remove(),i.append('<div class="notice-wrap"></div>');var r=i.find(".notice-wrap"),a=!1;(null!==n&&0!==n||(r.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_class")+"</p></div>"),a=!0),"recount-form"===o)&&(0==e('select[name="form_id"]').val()&&(r.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_reqs")+"</p></div>"),a=!0));if(a)return i.find(".button-disabled").removeClass("button-disabled"),!1}))}},d={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",(function(n){n.preventDefault();var i=e(this).find('input[type="submit"]');if(!i.hasClass("button-disabled")){var o=e(this).serialize();i.addClass("button-disabled"),e("form.give-export-form select").attr("disabled",!0).trigger("chosen:updated");var r=e(this);e(this).find(".add-notices").length>0&&(r=e(this).find(".add-notices")),r.find(".notice-wrap").remove(),r.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,o,t,this)}}))},process_step:function(t,n,i,o){I=!0;var r=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:n,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){I=!1,r=!0;var a=e(o).parent().find(".notice-wrap");a.find(".give-progress");if(e(o).find(".button-disabled").removeClass("button-disabled"),e(o).find("select").attr("disabled",!1).trigger("chosen:updated"),t.error){var s=t.message;a.html('<div class="updated error"><p>'+s+"</p></div>")}else if(t.success){var l=t.message;a.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+l+'<span class="notice-dismiss"></span></p></div>')}else a.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,(function(){})),i.process_step(parseInt(t.step),n,i,o);!0===r&&e("#give-tools-recount-form").length>0&&(e("#give-tools-recount-form")[0].reset(),e("#give-tools-recount-form .tools-form-dropdown").hide(),e("#give-tools-recount-form .tools-date-dropdown").hide(),e("#give-tools-recount-form .tools-form-dropdown-recount-form-select").val("0").trigger("chosen:updated"))}}).fail((function(t){I=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)}))},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",(function(){e("#give-batch-success").parent().slideUp("fast")}))}},u={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-now",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_progress_counter=Give_Selector_Cache.get(e(".give-update-progress-count")),t.el.main_container.data("resume-update")&&(t.el.update_link.addClass("active").hide().removeClass("give-hidden"),e("#give-restart-upgrades").length||(Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3),window.setTimeout(u.get_db_updates_info,1e3,t))),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",(function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+Give.fn.getGlobalVar("db_update_confirmation_msg_button")+"</a> "+Give.fn.getGlobalVar("db_update_confirmation_msg")+"</p></div>")})),e("#give-db-updates").on("click","a.give-run-update-button",(function(n){return n.preventDefault(),e(this).hasClass("active")||(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),u.start_db_update(),window.setTimeout(u.get_db_updates_info,500,t)),!1})))},start_db_update:function(){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_run_db_updates",run_db_update:1,nonce:Give.fn.getGlobalVar("db_update_nonce")},dataType:"json",success:function(e){}}).always((function(){Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3)}))},get_db_updates_info:function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_db_updates_info"},dataType:"json",success:function(n){var i=Give_Selector_Cache.get(".notice-wrap",t.el.progress_container,!0);-1!==e.inArray("success",Object.keys(n))?n.success?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text("100%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),n.data.message?(t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-error is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3)):n&&-1!==e.inArray("percentage",Object.keys(n.data))?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text(n.data.total_percentage+"%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),e(".give-progress div","#give-db-updates").animate({width:n.data.percentage+"%"},50,(function(){})),window.setTimeout(u.get_db_updates_info,1e3,t)):(i.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3))}})},process_step:function(t,n,i){I=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(n)},dataType:"json",success:function(t){I=!1;var n=Give_Selector_Cache.get(".notice-wrap",i.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.el.update_link.closest("p").remove(),n.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3)):t&&-1!==e.inArray("percentage",Object.keys(t.data))?(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,(function(){})),-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",i.el.heading.data("update-count"))+"</strong>"),i.process_step(parseInt(t.data.step),t.data.update,i)):(n.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3))}}).fail((function(e){I=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",self.el.progress_container).append(e.responseText)})).always((function(){}))},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",(function(){e(this).parent().slideUp("fast")}))}},f={init:function(){this.restartUpgrade(),this.stopUpgrade(),this.restartUpdater()},restartUpgrade:function(){jQuery("#give-restart-upgrades").click("click",(function(e){var t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").show(),jQuery(".give-update-paused-text-p").hide(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},stopUpgrade:function(){jQuery("#give-pause-upgrades").click("click",(function(e){var t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").hide(),jQuery(".give-update-paused-text-p").show(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("stop_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},restartUpdater:function(){jQuery(".give-restart-updater-btn,.give-run-update-now").click("click",(function(e){var t=this;e.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_update")},successConfirm:function(){window.location.assign(jQuery(t).attr("href"))}}).render()}))}},h={onLoadPageNumber:"",init:function(){this.loadGravatar(),this.unlockDonorFields(),this.editDonor(),this.add_email(),this.removeUser(),this.cancelEdit(),this.add_note(),this.delete_checked(),this.addressesAction(),this.bulkDeleteDonor(),h.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-donors-filter .bulkactions input[type="submit"]',this.handleBulkActions)},loadGravatar:function(){var t,n;e(".give-donor-name").each((function(){if(!(t=e(this).find(".give-donor__image")).hasClass("gravatar-loaded")){if(n=t.attr("data-donor_email"),"1"===t.attr("data-has-valid-gravatar")){var i=e("<img>");i.attr("src",G.url(n)),i.attr("width","60"),i.attr("height","60"),e(this).find(".give-donor__image").html(i)}t.addClass("gravatar-loaded")}}))},unlockDonorFields:function(t){e("body").on("click",".give-lock-block",(function(e){new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("unlock_donor_fields_title"),desc:Give.fn.getGlobalVar("unlock_donor_fields_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),e.preventDefault()}))},editDonor:function(){e("body").on("click","#edit-donor",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block")}))},removeUser:function(){e("body").on("click","#disconnect-donor",(function(t){return t.preventDefault(),new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("disconnect_user")},successConfirm:function(){var t={give_action:"disconnect-userid",customer_id:e('input[name="donor_info[id]"]').val(),_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,t,(function(e){window.location.href=e.redirect}),"json")}}).render(),!1}))},cancelEdit:function(){e("body").on("click","#give-edit-donor-cancel",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")}))},add_note:function(){e("body").on("click","#add-donor-note",(function(t){t.preventDefault();var n={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(n.donor_note)e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)}));else{var i=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout((function(){e("#donor-note").css("border-color",i)}),500)}}))},delete_checked:function(){e("#give-donor-delete-confirm").change((function(){var t=e("#give-donor-delete-records"),n=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),n.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),n.attr("disabled",!0))}))},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",(function(t){t.preventDefault();var n=e(this),i=n.parent();i.parent().find(".notice-wrap").remove(),i.find(".spinner").css("visibility","visible"),n.attr("disabled",!0);var o={give_action:"add_donor_email",customer_id:i.find('input[name="donor-id"]').val(),email:i.find('input[name="additional-email"]').val(),primary:i.find('input[name="make-additional-primary"]').is(":checked"),_wpnonce:i.find('input[name="add_email_nonce"]').val()};e.post(ajaxurl,o,(function(e){!0===e.success?window.location.href=e.redirect:(n.attr("disabled",!1),i.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),i.find(".spinner").css("visibility","hidden"))}),"json")}))},addressesAction:function(){var n=this,i=e("#donor-address-wrapper"),o=e(".all-address",i),r=e(".give-no-address-message",i),a=e(o).parent(),s=e(".address-form",i),l=e(".js-cancel",s),c=e('select[name="country"]',s),d=e(".add-new-address",i),u=parseInt(e('input[name="donor-id"]').val());c.on("change",(function(){e(this).trigger("chosen:updated")})),o.on("click",".js-edit",(function(t){var i=e(this).closest(".address");t.preventDefault(),e(".notice",a).remove(),n.__set_address_form_val(i),n.__set_address_form_action("update",i.data("address-id")),d.hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),s.data("process","update")})),o.on("click",".js-remove",(function(t){t.preventDefault();var i=e(this).closest(".address");e(".notice",a).remove(),s.data("changed",!0),n.__set_address_form_val(i),n.__set_address_form_action("remove",i.data("address-id")),s.trigger("submit")})),d.on("click",(function(t){t.preventDefault(),e(".notice",a).remove(),e(this).hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),n.__set_address_form_action("add"),n.__set_address_form_action()})),l.on("click",(function(e){e.preventDefault(),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),s.on("change",(function(){e(this).data("changed",!0)})).on("submit",(function(n){n.preventDefault();var l=e(this);return e(".notice",a).remove(),e(this).data("changed")?(e.ajax({type:"POST",url:ajaxurl,data:{action:"donor_manage_addresses",donorID:u,form:e("form",s).serialize()},beforeSend:function(){t(i,{show:!0})},success:function(n){if(t(i),n.success){var s;switch(n.data.action){case"add":e(".give-grid-row",o).append(n.data.address_html),!r.hasClass("give-hidden")&&e("div.give-grid-col-4",o).length&&r.addClass("give-hidden");break;case"remove":(s=o.find('div[data-address-id*="'+n.data.id+'"]').parent()).length&&s.animate({"margin-left":"-999"},1e3,(function(){s.remove(),r.hasClass("give-hidden")&&!e("div.give-grid-col-4",o).length&&r.removeClass("give-hidden")}));break;case"update":var l=(s=o.find('div[data-address-id*="'+n.data.id+'"]').parent()).prev(),c={},d=!1;parseInt(e(".give-grid-row>div",o).length)<2?e(".give-grid-row",o).append(n.data.address_html):(l.length&&(l.after(n.data.address_html),d=!0),d||(c=s.next()).length&&c.before(n.data.address_html)),s.remove()}a.prepend(n.data.success_msg)}else a.prepend(n.data.error_msg)},dataType:"json"}).always((function(){l.data("changed",!1),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),!1):(d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden"),!1)}))},__set_address_form_action:function(t,n){var i=e("#donor-address-wrapper"),o=e(".address-form",i),r=e('input[name="address-action"]',o),a=e('input[name="address-id"]',o);t=t||"add",n=n||"billing",r.val(t),a.val(n)},__set_address_form_val:function(t){var n=e("#donor-address-wrapper"),i=e(".address-form",n),o=e('[data-address-type="state"]',t).text().substr(2).trim();e('select[name="country"]',i).val().trim()!==e('[data-address-type="country"]',t).text().trim()?(e('select[name="country"]',i).val(e('[data-address-type="country"]',t).text().trim()).trigger("chosen:updated").change(),window.setTimeout((function(){e('[name="state"]',i).val(o).trigger("chosen:updated")}),500)):e('[name="state"]',i).val(o).trigger("chosen:updated"),e('input[name="line1"]',i).val(e('[data-address-type="line1"]',t).text().trim()),e('input[name="line2"]',i).val(e('[data-address-type="line2"]',t).text().trim()),e('input[name="city"]',i).val(e('[data-address-type="city"]',t).text().trim()),e('input[name="zip"]',i).val(e('[data-address-type="zip"]',t).text().trim())},bulkDeleteDonor:function(){var t=e("body");t.on("click","#give-bulk-delete-cancel",(function(t){e(this).closest("tr").hide(),e(".give-skip-donor").trigger("click"),t.preventDefault()})),t.on("click","#cb-select-all-1, #cb-select-all-2",(function(){var t=e(this);e.each(e(".donor-selector"),(function(){var n=e(this).val(),i=e(this).data("name"),o='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+i+"</div>";t.is(":checked")&&!e(this).is(":checked")?e("#give-bulk-donors").append(o):t.is(":checked")||e("#give-bulk-donors").find("#give-donor-"+n).remove()}))})),t.on("click",".donor-selector",(function(){var t=e(this).val(),n=e(this).data("name"),i='<div id="give-donor-'+t+'" data-id="'+t+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+n+"</div>";e(this).is(":checked")?e("#give-bulk-donors").prepend(i):e("#give-bulk-donors").find("#give-donor-"+t).remove()})),t.on("click","#give-bulk-delete .give-donor-delete-confirm",(function(){e(this).is(":checked")?e("#give-bulk-delete-button").removeAttr("disabled"):(e("#give-bulk-delete-button").attr("disabled",!0),e("#give-bulk-delete .give-donor-delete-records").removeAttr("checked"))})),t.on("click","#give-bulk-delete .give-donor-delete-records",(function(){e(this).is(":checked")&&(e("#give-bulk-delete .give-donor-delete-confirm").attr("checked","checked"),e("#give-bulk-delete-button").removeAttr("disabled"))})),t.on("click",".give-skip-donor",(function(){var t=e(this).closest("div").data("id");e("#give-donor-"+t).remove(),e("#donor-"+t).find('input[type="checkbox"]').removeAttr("checked")})),t.on("click",".give-single-donor-delete",(function(t){var n=e(this).data("id"),i=e("tr#donor-"+n).find(".donor-selector"),o=e('[id^="cb-select-all-"]'),r=e("#give-bulk-donors"),a=i.data("name"),s='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+a+"</div>";r.html(""),o.is(":checked")&&o.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),i.attr("checked","checked"),0===e("#give-donor-"+n).length&&(r.prepend(s),e("#give-bulk-delete").slideDown()),t.preventDefault()}))},handleBulkActions:function(t){var n=e(this).closest(".tablenav").find("select").val(),i=[],o=e("#current-page-selector").val(),r=h.onLoadPageNumber!==o,s=Give.fn.getGlobalVar("donors_bulk_action.no_action_selected"),l=Give.fn.getGlobalVar("donors_bulk_action.no_donor_selected");return!!r||(e.each(e(".donor-selector:checked"),(function(){i.push(e(this).val())})),"-1"===n?(new a.GiveWarningAlert({modalContent:{title:s.title,desc:s.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1):parseInt(i)?("delete"===n&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(new a.GiveWarningAlert({modalContent:{title:l.title,desc:l.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1))}},p={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",(function(t){t.preventDefault();var n=e(this).attr("href");return new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("revoke_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",(function(t){var n=e(this).attr("href");return new a.GiveConfirmModal({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("regenerate_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))}},m={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_template_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this;e(".give-metabox-tabs a").on("click",(function(n){n.preventDefault();var i=e(this);t.activate_tab(i),t.update_query(i)}))},activate_tab:function(t){var n=t.data("tab-id"),i=t.parent(),o=e("ul.give-metabox-sub-tabs",i),r=o.length,a=e(".give-metabox-tabs a").parents("li"),s=e("ul.give-metabox-sub-tabs"),l=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(n),r){i.toggleClass("active"),o.removeClass("give-hidden");var c=e("li.active","ul.give-metabox-sub-tabs");s.not(o).addClass("give-hidden"),a.not(i).removeClass("active"),c.addClass("active")}else l?l&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),a.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):a.each((function(t,n){(n=e(n)).removeClass("active"),n.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",n).addClass("give-hidden")}));t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var n=t.data("tab-id"),i=e.query.set("give_tab",n).remove("message").toString();history.replaceState&&history.replaceState(null,null,i)},setup_colorpicker_fields:function(){e(document).ready((function(){var t=e(".give-colorpicker");t.length&&t.each((function(t,n){var i=e(n);i.parents(".give-template").length||i.wpColorPicker()}))}))},setup_media_fields:function(){var t,n,i=e("body");i.on("click",".give-upload-button",(function(o){o.preventDefault();var r={};switch(n=e(this),e(this).data("field-type")){case"media":r={title:Give.fn.getGlobal().metabox_fields.media.button_title,button:{text:Give.fn.getGlobal().metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:r={title:Give.fn.getGlobal().metabox_fields.file.button_title,button:{text:Give.fn.getGlobal().metabox_fields.file.button_title},multiple:!1}}void 0!==jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing")&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var a=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");void 0!==a&&""!==a&&(r.library={type:a}),(t=wp.media(r)).on("select",(function(){var e=t.state().get("selection").first().toJSON(),o=n.prev(),r="id"===n.data("fvalue")?e.id:e.url;if(i.trigger("give_media_inserted",[e,o]),o.val(r),"id"!==n.data("fvalue")){var a='input[name="'+o.attr("name")+'_id"]';o.closest("tr").next("tr").find(a).length&&o.closest("tr").next("tr").find(a).val(e.id)}})),t.open()})),i.on("give_media_inserted",(function(t,i){var o=n.parents(".give-field-wrap"),r=e(".give-image-thumb",o);return!!r.length&&("image"!==i.type?(r.addClass("give-hidden"),e("img",r).attr("src",""),!1):(r.find("img").attr("src",i.url),void r.removeClass("give-hidden")))})),e("span.give-delete-image-thumb",".give-image-thumb").on("click",(function(t){t.preventDefault();var n=e(this).parents(".give-field-wrap"),i=e(this).parent(),o=e('input[type="text"]',n);i.addClass("give-hidden"),o.val(""),e("img",i).attr("src","")}))},setup_repeatable_fields:function(){jQuery((function(){jQuery(".give-repeatable-field-section").each((function(){var t=e(this),n={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:Give.fn.getGlobalVar("confirm_before_remove_row_text"),is_sortable:!0,before_add:null,after_add:g,before_remove:null,after_remove:v,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);var o=e(".give-row",t).not(".give-template");o.length&&o.each((function(t,n){var i=e('input[type="radio"].give-field',e(n));i.length&&i.each((function(){e(this).attr("data-give-checked",e(this).is(":checked"))}))})),e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item),e("body").trigger("repeater_field_sorting_stop",[n.item])},update:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);var o=e(".give-row",t).not(".give-template"),r=e(this).closest(".give-repeatable-fields-section-wrapper");if(o.length){var a=1;o.each((function(t,n){var i=e(".give-field, label",e(n));i.length&&i.each((function(){var t=e(this).parents(".give-field-wrap"),n=e(this);e.each(this.attributes,(function(e,i){var o,r=this.value.replace(/\[/g,"_").replace(/]/g,""),s=r+"_field",l="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(a-1)+"]"),o=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(s)&&(l=o+"_field",t.removeClass(s).addClass(l)),r==n.attr("id")&&n.attr("id",o))}))})),a++})),window.setTimeout((function(){e("input[data-give-checked]",r).each((function(t,n){(n=e(n)).prop("checked","true"===n.attr("data-give-checked"))}))}),100),t.trigger("repeater_field_row_reordered",[i.item])}}}};jQuery(this).repeatable_fields(n)}))}))},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),n=e("body");n.on("click",".give-row-head button",(function(){var t=e(this).closest(".give-row");t.toggleClass("closed"),e(".give-row-body",t).toggle()})),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",(function(){_(e(this))})),n.on("repeater_field_sorting_start",(function(t,n){var i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(n).attr("id"))}),300)}))})),n.on("repeater_field_sorting_stop",(function(t,n){var i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){var t=e(n).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout((function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")}),100)}),300)}))})),t.each((function(t,n){var i=e(n);_(i),parseInt(i.data("close-tabs"))&&(e(".give-row-head button",i).trigger("click"),e(".give-template",i).removeClass("closed"),e(".give-template .give-row-body",i).show())})),t.on("repeater_field_new_row_added",(function(t,n,i){e(".give-colorpicker",e(this)).each((function(t,n){var i=e(n);i.parents(".wp-picker-container").length||i.parents(".give-template").length||i.wpColorPicker()}));var o=e("div[data-wp-editor]",i);o.length&&o.each((function(t,n){var i=e(n),o=e(".wp-editor-wrap",i),r=e("textarea",i),a="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),s=o.prev();r.attr("id",a),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:i.data("wp-editor"),wp_editor_id:a,textarea_name:e("textarea",i).attr("name")},(function(t){o.remove(),s.after(t),tinyMCEPreInit.qtInit[r.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:a}),tinyMCEPreInit.mceInit[a]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:a+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+a}),tinymce.init(tinyMCEPreInit.mceInit[a]),quicktags(tinyMCEPreInit.qtInit[a]),QTags._buttonsInit(),window.setTimeout((function(){switchEditors.go(a,"html"),e("#"+a+"-tmce").trigger("click")}),100),window.wpActiveEditor||(window.wpActiveEditor=a)}))}))}))},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",(function(){var t=e(this).closest("tr"),n=e(".give-row-head h2 span",t),i=n.data("header-title");if(e(this).val()&&e(this).val()===n.html())return!1;e(this).val()?n.html(i+": "+e(this).val()):n.html(i)})),e(".give-multilevel-text-field").each((function(t,n){if(t){var i=e(n),o=i.closest("tr"),r=e(".give-row-head h2 span",o),a=r.data("header-title");if(i.val()&&i.val()===r.html())return!1;i.val()?r.html(a+": "+i.val()):r.html(a)}})),t.on("repeater_field_row_deleted",(function(){var t=e(this);window.setTimeout((function(){var n=e(".give-row",t).not(".give-template"),i=e(".give-give_default_radio_inline",n);1===n.length&&i.prop("checked",!0)}),200)})),t.on("repeater_field_new_row_added",(function(t,n,i){var o=e(this),r=0;window.setTimeout((function(){!1===e(".give-give_default_radio_inline",o).is(":checked")&&e(".give-row",o).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)}),200),e('input[type="hidden"].give-levels_id',o).each((function(t,n){var i=e(n),o=parseInt(i.val());r<o&&(r=o)})),e('input[type="hidden"].give-levels_id',i).val(++r)}))}},g=function(t,n){var i=e(t).attr("data-rf-row-count"),o=e(t).parents(".give-repeatable-field-section");i++,e("*",n).each((function(){e.each(this.attributes,(function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",i-1)}))})),e(t).attr("data-rf-row-count",i),o.trigger("repeater_field_new_row_added",[t,n])},v=function(t){var n=e(t),i=n.parents(".give-repeatable-field-section"),o=e(t).attr("data-rf-row-count");n.attr("data-rf-row-count",--o),i.trigger("repeater_field_row_deleted")},_=function(t){if(parseInt(t.data("group-numbering"))){var n=e(".give-row-head h2 span",t),i=n.data("header-title");n.each((function(t,n){var o=e(n);o.parents(".give-template").length||o.html(i+": "+t)}))}},b={onLoadPageNumber:"",init:function(){b.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(t){var n=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+n+'"]').text(),o=e('input[name="payment[]"]:checked').length,r=-1!==n.indexOf("set-status-"),s="",l="",c=e("#current-page-selector").val();if(b.onLoadPageNumber!==c)return!0;if("-1"===(n=r?"set-to-status":n))return new a.GiveWarningAlert({modalContent:{title:Give.fn.getGlobal().donors_bulk_action.no_action_selected.title,desc:Give.fn.getGlobal().donors_bulk_action.no_action_selected.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;if(Object.keys(Give.fn.getGlobalVar("donations_bulk_action")).length)for(l in Give.fn.getGlobalVar("donations_bulk_action"))if(l===n){if(s=r?Give.fn.getGlobal().donations_bulk_action[n].zero.replace("{status}",i.replace("Set To ","")):Give.fn.getGlobal().donations_bulk_action[n].zero,!parseInt(o))return new a.GiveWarningAlert({modalContent:{title:Give.fn.getGlobal().donations_bulk_action.titles.zero,desc:s,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;s=1<o?Give.fn.getGlobal().donations_bulk_action[n].multiple:Give.fn.getGlobal().donations_bulk_action[n].single,t.preventDefault(),new a.GiveConfirmModal({modalContent:{title:Give.fn.getGlobalVar("confirm_bulk_action"),desc:s.replace("{payment_count}",o).replace("{status}",i.replace("Set To ",""))},successConfirm:function(t){e("#give-payments-filter").submit()}}).render()}return!0}},y=function(){var e=document.querySelectorAll(".js-give-shortcode-button");if(e){var t,n=j(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;new S(i).init()}}catch(e){n.e(e)}finally{n.f()}}},w=function(){e(".give-select-chosen[multiple]").each((function(t,n){e(n).chosen().change((function(t,n){var i=e(this),o=i.attr("id"),r=[];e("#".concat(o,"_chosen li.search-choice span")).each((function(e,t){var i=t.textContent;i!==n.deselected&&r.push({value:i,selected:!0})})),Array.from(t.target.options).map((function(e){r.filter((function(t){return t.value===e.value})).length||r.push({value:e.value,selected:e.selected})})),i.empty(),r.map((function(t){return i.append(e("<option>",{value:t.value,text:t.value,selected:t.selected}))}))}))}))};e((function(){var t;e("body").on("click","button.notice-dismiss",(function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&n(jQuery(this).closest("div.give-notice").attr("id"))})),function(){var t,n=e(".give_datepicker");if(n.length){var i={},o={altFormat:"yy-mm-dd",onClose:function(e,t){e.length||t.input.next().val("")}};e.each(n,(function(o,r){r=e(r),t=void 0!==r.attr("data-standard-date")?r.attr("data-standard-date"):r.attr("value"),r.attr("name").length&&(i=r.clone(),n[o]=i,i.attr("name",""),r.before(i),r.hide(),r.attr("class",""),r.attr("id",""),r.val(t),r.prop("readonly",!0))})),n.length>0&&e.each(n,(function(t,n){n=e(n),o.altField=n.next(),n.datepicker(o)}))}}(),e('select[name="give-payment-status"]').on("change",(function(){var t=e(this).val();e(".give-donation-status").removeClass((function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")})).addClass("status-"+t)})),(t=e(".give-select-chosen")).hasClass("give-chosen-settings")?t.chosen({no_results_text:Give.fn.getGlobalVar("chosen_add_title_prefix")+" ",width:"30%"}).on("chosen:no_results",(function(t,n){e(n.chosen.container).on("keydown",(function(i){var o=n.chosen.get_search_text(),r=jQuery(n.chosen.form_field);13!==i.keyCode||r.find('option[value="'+o+'"]').length||"true"!==r.attr("data-allows-new-values")||(e(n.chosen.form_field).append('<option value="'+o+'" selected>'+o+"</option>").trigger("chosen:updated"),n.chosen.result_highlight=n.chosen.search_results.find("li.active-result").lasteturn,n.chosen.result_select(t))}))})):Object(T.a)(t),e(".chosen-container").each((function(){0===e(this).width()&&e(this).css("width","100%")})),e("#post").on("click",".give-thickbox",(function(){e(".give-select-chosen","#choose-give-form").css("width","100%")})),e.giveAjaxifyFields({type:"country_state",debug:!0}),o.init(),s.init(),l.init(),c.init(),h.init(),p.init(),d.init(),u.init(),f.init(),m.init(),b.init(),y(),w(),e("a.give-rating-link").click((function(){jQuery(this).parent().text(jQuery(this).data("rated"))})),e(".give-ajax-user-search").on("keyup",(function(){var t=e(this).val(),n="";e(this).data("exclude")&&(n=e(this).data("exclude")),e(".give-ajax").show(),data={action:"give_search_users",user_name:t,exclude:n},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".give-ajax").hide(),e(".give_user_search_results").removeClass("hidden"),e(".give_user_search_results span").html(""),e(t.results).appendTo(".give_user_search_results span"),document.body.style.cursor="default"}})})),e("body").on("click.giveSelectUser",".give_user_search_results span a",(function(t){t.preventDefault();var n=e(this).data("login");e(".give-ajax-user-search").val(n),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")})),e("body").on("click.giveCancelUserSearch",".give_user_search_results a.give-ajax-user-cancel",(function(t){t.preventDefault(),e(".give-ajax-user-search").val(""),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")}));var r=e("#poststuff"),a=Give.fn.getGlobalVar("thousands_separator"),g=Give.fn.getGlobalVar("decimal_separator"),v="",_="",x="",k=g===a?1:0;r.on("keyup","input.give-money-field, input.give-price-field",(function(){var t={label:Give.fn.getGlobalVar("price_format_guide").trim()};v=(e(this).val().match(new RegExp(a,"g"))||[]).length,_=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(a)&&k<v||_?e(this).giveHintCss("show",t):e(this).giveHintCss("hide",t),v=_=""})),r.on("focusout","input.give-money-field, input.give-price-field",(function(){if(x=i(e(this).val(),!1),e(this).giveHintCss("hide",{label:Give.fn.getGlobalVar("price_format_guide").trim()}),i("0",!1)===i(e(this).val(),!1)){var t=e(this).attr("placeholder");return t=t||"0",e(this).val(t),!1}-1!==(x=x.replace(".",g)).indexOf("-")&&(x=x.replace("-","")),e(this).val(x)})),r.on("focusout","#_give_number_of_donation_goal",(function(){1>e(this).val()&&e(this).val(1)})),e(".give-settings-page").on("click","#give-show-sub-nav",(function(t){t.preventDefault();var n=e(this).next();return n.is(":hover")||n.toggleClass("give-hidden"),!1})).on("blur","#give-show-sub-nav",(function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")})),e(".give_email_api_notification_status_setting input").change((function(){var t=e(this).val(),n="enabled"===t,i={};return e(this).closest(".give_options_panel").length?i=e(this).closest(".give_options_panel").children(".give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section"):e(this).closest("table").length&&(i=e(this).closest("table").find("tr:not(.give_email_api_notification_status_setting)")),-1!==jQuery.inArray(t,["enabled","disabled","global"])&&(!!i.length&&void(n?i.show():i.hide()))})),e(".give_email_api_notification_status_setting input:checked").change(),E()}))}(jQuery),jQuery(window).resize((function(){E()}));function A(){var e=document.querySelector(".give-tools-setting-page-import table.step-2 .give-import-donation-required-fields");if("undefined"!==e&&null!==e){var t=!0,n=!1,i=!1,o=!1,r=!1;document.querySelectorAll(".give-import-donation-required-fields li").forEach((function(e){e.querySelector(".dashicons").classList.remove("dashicons-yes"),e.querySelector(".dashicons").classList.add("dashicons-no-alt")}));var a=Array.from(document.querySelectorAll("table.step-2 tbody select")).map((function(e){return e.value}));a.includes("email")&&(n=!0,document.querySelector(".give-import-donation-required-email .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-email .dashicons").classList.add("dashicons-yes")),a.includes("first_name")&&(i=!0,document.querySelector(".give-import-donation-required-first .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-first .dashicons").classList.add("dashicons-yes")),a.includes("amount")&&(o=!0,document.querySelector(".give-import-donation-required-amount .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-amount .dashicons").classList.add("dashicons-yes")),(a.includes("form_id")||a.includes("form_title"))&&(r=!0,document.querySelector(".give-import-donation-required-form .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-form .dashicons").classList.add("dashicons-yes")),n&&i&&o&&r&&(t=!1),document.getElementById("recount-stats-submit").disabled=t}}jQuery((function(){window.onload=function(){var e,t;A(),"undefined"!==(e=document.querySelector(".give-tools-setting-page-import table.step-2 tbody select"))&&null!==e&&jQuery(".give-tools-setting-page-import table.step-2 tbody").on("change","select",(function(){A()})),jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3").length>0&&function e(){var t=jQuery("form.tools-setting-page-import");!0;var n=t.find(".give-progress"),i=jQuery(n).data("total_ajax"),o=jQuery(n).data("current"),r=jQuery(n).data("start"),s=jQuery(n).data("end"),l=jQuery(n).data("next"),c=jQuery(n).data("total"),d=jQuery(n).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("give_donation_import"),total_ajax:i,current:o,start:r,end:s,next:l,total:c,per_page:d,fields:t.serialize()},dataType:"json",success:function(t){jQuery(n).data("current",t.current),jQuery(n).find("div").width(t.percentage+"%"),1==t.next?(jQuery(n).data("start",t.start),jQuery(n).data("end",t.end),1==t.last&&jQuery(n).data("next",!1),e()):(!1,window.location=t.url)},error:function(){!1,new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}(),t="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-1 .is_csv_valid",jQuery(t).length>0&&(window.location=jQuery(t).val()),function(){var e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-2 .csv_not_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}(),function(){if(jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-2").length>0){var e=jQuery("form.tools-setting-page-import"),t=e.find(".give-progress");!0,jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("core_settings_import"),fields:e.serialize()},dataType:"json",success:function(e){!1,!0===e.success?(jQuery(t).find("div").width(e.percentage+"%"),window.location=e.url):new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()},error:function(){!1,new a.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}}(),function(){var e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-1 .is_json_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}()}}));n(508);function O(e,t){var n="",i=document.querySelector(".give-save-button");try{n=JSON.parse(t),e.value=JSON.stringify(n,void 0,2),e.style.border="none",i.removeAttribute("disabled")}catch(t){e.style.border="1px solid red",i.setAttribute("disabled","disabled")}}function P(e){null!==e&&(O(e,e.value),e.addEventListener("blur",(function(t){O(e,t.target.value)})))}window.addEventListener("DOMContentLoaded",(function(){document.querySelector(".stripe-cc-field-format-settings");var e=document.querySelectorAll('input[name="stripe_fonts"]'),t=document.getElementById("stripe_styles_base"),n=document.getElementById("stripe_styles_empty"),i=document.getElementById("stripe_styles_invalid"),o=document.getElementById("stripe_styles_complete"),r=document.getElementById("stripe_custom_fonts"),s=document.getElementById("give-payment-status"),l=(document.querySelector(".give-stripe-disconnect"),document.querySelectorAll('input[name="stripe_checkout_type"]')),c=Array.from(document.querySelectorAll(".stripe-checkout-field")),d=document.getElementById("give-stripe-connected"),u=Array.from(document.querySelectorAll('input[name="stripe_hide_icon"]')),f=document.querySelector(".stripe-icon-style"),h=Array.from(document.querySelectorAll(' input[name="stripe_mandate_acceptance_option"]')),p=document.querySelector(".stripe-mandate-acceptance-text"),m=Array.from(document.querySelectorAll('input[name="stripe_becs_hide_icon"]')),g=document.querySelector(".stripe-becs-icon-style"),v=Array.from(document.querySelectorAll(' input[name="stripe_becs_mandate_acceptance_option"]')),_=document.querySelector(".stripe-becs-mandate-acceptance-text"),b=Array.from(document.querySelectorAll(".give-stripe-account-type-manual")),y=document.querySelector(".give-stripe-account-type-connect"),w=Array.from(document.querySelectorAll('input[name="stripe_connection_type"]')),x=document.querySelector('input[name="stripe_connection_type"]:checked'),k=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn")),C=Array.from(document.querySelectorAll(".give-stripe-account-set-default")),S=Array.from(document.querySelectorAll('input[name="give_stripe_per_form_accounts"]')),T=document.querySelector(".give-stripe-per-form-default-account"),j=Array.from(document.querySelectorAll(".give-stripe-account-edit-name")),M=Array.from(document.querySelectorAll(".give-stripe-account-update-name")),I=Array.from(document.querySelectorAll(".give-stripe-account-cancel-name")),G=document.getElementById("give-stripe-account-manager-errors");function E(e){"connect"===e?(b.map((function(e){e.classList.add("give-hidden")})),y.classList.remove("give-hidden")):(b.map((function(e){e.classList.remove("give-hidden")})),y.classList.add("give-hidden"))}if(P(t),P(n),P(i),P(o),P(r),null!==I&&I.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode,i=n.querySelector(".give-stripe-account-update-name"),o=n.querySelector(".give-stripe-account-edit-name"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector('input[name="account_name"]'),s=n.querySelector(".give-stripe-account-default > a");r.textContent=a.value,t.classList.add("give-hidden"),i.classList.add("give-hidden"),a.classList.add("give-hidden"),o.classList.remove("give-hidden"),null!==s&&s.classList.remove("give-hidden")}))})),null!==j&&j.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode,i=n.querySelector(".give-stripe-account-update-name"),o=n.querySelector(".give-stripe-account-cancel-name"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector(".give-stripe-account-default > a"),s=r.textContent.trim(),l=document.createElement("input");l.type="text",l.name="account_name",l.value=s,r.textContent="",r.append(l),t.classList.add("give-hidden"),i.classList.remove("give-hidden"),o.classList.remove("give-hidden"),null!==a&&a.classList.add("give-hidden")}))})),null!==M&&M.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=t.parentNode.parentNode.parentNode,i=n.querySelector(".give-stripe-disconnect-account-btn"),o=t.getAttribute("data-account"),r=n.querySelector(".give-stripe-account-name"),a=n.querySelector(".give-stripe-account-cancel-name"),s=n.querySelector(".give-stripe-account-default > a"),l=n.querySelector('input[name="account_name"]').value,c=new XMLHttpRequest,d=new FormData,u=e.target.previousElementSibling;d.append("action","give_stripe_update_account_name"),d.append("account_slug",o),d.append("new_account_name",l),c.open("POST",ajaxurl),c.onload=function(){var e=JSON.parse(c.response),n="";if(200===c.status&&e.success){var o=e.data.slug;n='<div class="give-notice notice inline success notice-success"><p>'.concat(e.data.message,"</p></div>"),r.innerHTML=e.data.name,t.classList.add("give-hidden"),a.classList.add("give-hidden"),t.setAttribute("data-account",o),u.classList.remove("give-hidden"),null!==i&&i.setAttribute("data-account",o),null!==s&&s.classList.remove("give-hidden")}else n='<div class="give-notice notice inline error notice-error"><p>'.concat(e.data.message,"</p></div>");G.innerHTML=n},c.send(d)}))})),null!==S&&S.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?T.classList.remove("give-hidden"):T.classList.add("give-hidden")}))})),null!==C&&C.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=new XMLHttpRequest,n=new FormData;n.append("action","give_stripe_set_account_default"),n.append("account_slug",e.target.getAttribute("data-account")),t.open("POST",ajaxurl),t.onload=function(){var n=JSON.parse(t.response);200===t.status&&n.success&&(window.location.href=e.target.getAttribute("data-url"))},t.send(n)}))})),null!==w&&null!==x&&(E(x.value),w.forEach((function(e){e.addEventListener("change",(function(e){E(e.target.value)}))}))),null!==u&&u.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?f.classList.remove("give-hidden"):f.classList.add("give-hidden")}))})),null!==h&&h.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?p.classList.remove("give-hidden"):p.classList.add("give-hidden")}))})),null!==m&&m.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?g.classList.remove("give-hidden"):g.classList.add("give-hidden")}))})),null!==v&&v.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?_.classList.remove("give-hidden"):_.classList.add("give-hidden")}))})),null!==d){var A=d.getAttribute("data-status"),O=d.getAttribute("data-redirect-url"),z=d.getAttribute("data-display"),L=d.getAttribute("data-title"),N=d.getAttribute("data-first-detail"),q=d.getAttribute("data-second-detail");"connected"===A&&"0"===z&&(new a.GiveConfirmModal({modalWrapper:"give-stripe-connected-modal give-modal--success",type:"confirm",modalContent:{title:L,desc:"<span>".concat(N,'</span><span class="give-field-description">').concat(q,"</span>")},successConfirm:function(e){window.location.href=O}}).render(),d.setAttribute("data-display","1"),history.pushState({urlPath:O},"",O))}null!==l&&l.forEach((function(e){e.addEventListener("change",(function(e){"modal"===e.target.value?c.map((function(e){return e.classList.remove("give-hidden")})):c.map((function(e){return e.classList.add("give-hidden")}))}))})),null!==k&&k.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target;new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:Give.fn.getGlobalVar("disconnect_stripe_title"),desc:t.getAttribute("data-disconnect-message")},successConfirm:function(){window.location.href="".concat(t.getAttribute("href"),"&account=").concat(t.getAttribute("data-account"))}}).render()}))})),null!==s&&s.addEventListener("change",(function(e){var t=document.getElementById("give-stripe-opt-refund");null!==t&&(t.checked=!1,"refunded"===e.target.value?document.getElementById("give-stripe-opt-refund-wrap").style.display="block":document.getElementById("give-stripe-opt-refund-wrap").style.display="none")})),null!==e&&e.forEach((function(e){var t=document.querySelector(".give-stripe-google-fonts-wrap"),n=document.querySelector(".give-stripe-custom-fonts-wrap");e.addEventListener("change",(function(e){"custom_fonts"===e.target.value?(t.style.display="none",n.style.display="table-row"):"google_fonts"===e.target.value&&(t.style.display="table-row",n.style.display="none")}))}))})),s.a.modal=a;var z=s.a.init,L=s.a.fn,N=s.a.cache,q=s.a.modal,W=s.a.notice;window.Give={init:z,fn:L,cache:N,modal:q,notice:W,initializeIframeResize:l.a}},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(102),o=function(e){return new i.iframeResize({log:!1,sizeWidth:!0,checkOrigin:[window.location.origin],heightCalculationMethod:"documentElementOffset",widthCalculationMethod:"documentElementOffset",onMessage:function(t){var n=e.parentElement;switch(e.parentElement.classList.contains("modal-content")&&(n=n.parentElement.parentElement),t.message.action){case"giveEmbedFormContentLoaded":var i=setTimeout((function(){o()}),400);e.setAttribute("data-contentLoaded","1");var o=function(){clearTimeout(i),n.querySelector(".iframe-loader").style.opacity=0,n.querySelector(".iframe-loader").style.transition="opacity 0.2s ease",e.style.visibility="visible",e.style.minHeight="",n.style.height=null}}},onInit:function(){var t=e.parentElement,n=!1;window.addEventListener("beforeunload",(function(){n=!0})),e.contentWindow.addEventListener("beforeunload",(function(){!1===n&&(e.scrollIntoView({behavior:"smooth",inline:"nearest"}),e.parentElement.querySelector(".iframe-loader").style.opacity=1,e.parentElement.querySelector(".iframe-loader").style.transition="",e.style.visibility="hidden",t.style.height="700px")})),e.iFrameResizer.sendMessage({currentPage:Give.fn.removeURLParameter(window.location.href,"giveDonationAction")})}},e)}},9:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}});
assets/dist/js/give-sequoia-template.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=710)}({14:function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=i=function(e){return typeof e}:e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}e.exports=i},710:function(e,t,i){i(711),e.exports=i(712)},711:function(e,t,i){},712:function(e,t,i){"use strict";i.r(t);var n=i(14),a=i.n(n);!function(e){var t=window.sequoiaTemplateOptions,i=e(".give-embed-form"),n=e(".advance-btn",i),o=e(".back-btn"),r=e(".give-form-navigator .title"),c=e("#give-payment-mode-select"),s=!1,l={currentStep:"enabled"===t.introduction.enabled?0:1,animating:!1,goToStep:function(n){var a=p[n].title?e(p[n].selector).height()+50:e(p[n].selector).height(),o=p[l.currentStep].title?e(p[l.currentStep].selector).height()+50:e(p[l.currentStep].selector).height();a>o?e(".give-form-templates").css("min-height","".concat(a+123,"px")):setTimeout((function(){e(".give-form-templates").css("min-height","".concat(a+123,"px"))}),200),e(".step-tracker").removeClass("current"),e('.step-tracker[data-step="'+n+'"]').addClass("current"),"disabled"===t.introduction.enabled?(3===e(".step-tracker").length&&e(".step-tracker").remove(),1===(n=n>0?n:1)?e(".back-btn",i).hide():e(".back-btn",i).show(),e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")):0===n?(e(".give-form-navigator",i).removeClass("nav-visible"),e(p[n].selector).css("padding-top","")):(e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")),p[n].title&&r.text(p[n].title);var c=p.map((function(e,t){return t===n||t===l.currentStep?null:e.selector})).filter(Boolean).join(", ");if(e(c).hide(),l.currentStep!==n){var s="slide-in-right slide-in-left slide-out-right slide-out-left",d=l.currentStep<n?"left":"right",u=l.currentStep<n?"right":"left";e(p[l.currentStep].selector).removeClass(s).addClass("slide-out-".concat(d)),e(p[n].selector).show().removeClass(s).addClass("slide-in-".concat(u))}l.currentStep=n,f(),setTimeout((function(){p[l.currentStep].firstFocus&&e(p[l.currentStep].firstFocus).focus()}),200)},init:function(){var t,i;p.forEach((function(t){void 0!==t.setup&&t.setup(),e(t.selector).css("position","absolute")})),n.on("click",(function(e){e.preventDefault(),l.forward()})),o.on("click",(function(e){e.preventDefault(),l.back()})),e(".step-tracker").on("click",(function(t){t.preventDefault(),l.goToStep(parseInt(e(t.target).attr("data-step")))})),t=function(t){!1===s?e(".form-footer").css("transition","margin-top 0.2s ease"):e(".form-footer").css("transition",""),e(".form-footer").css("margin-top","".concat(t,"px"))},i=0,window.requestAnimationFrame((function n(){var a=e(p[l.currentStep].selector);i!==e(a).outerHeight()&&(t(e(a).outerHeight()),i=e(a).outerHeight()),window.requestAnimationFrame(n)})),l.goToStep(Give.fn.getParameterByName("showDonationProcessingError")||Give.fn.getParameterByName("showFailedDonationError")?2:0)},back:function(){var e=0!==l.currentStep?l.currentStep-1:0;l.goToStep(e),l.currentStep=e},forward:function(){var e=null!==l.currentStep?l.currentStep+1:1;l.goToStep(e),l.currentStep=e}},p=[{id:"introduction",title:null,selector:".give-section.introduction",label:t.introduction.donate_label,showErrors:!1,tabOrder:[".introduction .advance-btn",".step-tracker"]},{id:"choose-amount",title:t.payment_amount.header_label,selector:".give-section.choose-amount",label:t.payment_amount.next_label,showErrors:!1,tabOrder:["input.give-amount-top",".give-donation-levels-wrap button",".give-recurring-period",".give-recurring-donors-choice-period",".give_fee_mode_checkbox",".choose-amount .advance-btn",".step-tracker",".back-btn"],firstFocus:".give-default-level",setup:function(){var t=e(".give-donation-level-btn").length;1===t?e(".give-donation-levels-wrap").attr("style","display: none!important;"):t%2==0&&t<6&&e(".give-donation-levels-wrap").css("grid-template-columns","repeat(2, minmax(0, 1fr))"),e("#give-amount").on("blur",(function(){Give.form.fn.isValidDonationAmount(e("form"))?e(".advance-btn").attr("disabled",!1):e(".advance-btn").attr("disabled",!0)})),e(".give-donation-level-btn").each((function(){if(!e(this).attr("has-tooltip")){var t=e(this).attr("value"),i=e(this).text(),n=window.give_global_vars.currency_sign,a=window.give_global_vars.currency_pos;if("custom"!==t){var o="before"===a?'<div class="currency currency--before">'.concat(n,"</div>").concat(t):"".concat(t,'<div class="currency currency--after">').concat(n,"</div>");e(this).html(o)}if("custom"!==t&&i!==("before"===a?n+t:t+n)){var r='<span class="give-tooltip hint--top hint--bounce '.concat(i.length<50?"narrow":"",'" style="width: 100%" aria-label="').concat(i.length<50?i:i.substr(0,50)+"...",'" rel="tooltip"></span>');e(this).wrap(r),e(this).attr("has-tooltip",!0)}}}))}},{id:"payment",title:t.payment_information.header_label,label:t.payment_information.checkout_label,selector:".give-section.payment",showErrors:!0,tabOrder:[".payment input, .payment a, .payment button, .payment select, .payment multiselect, .payment textarea, .payment .button",".give-submit",".step-tracker",".back-btn"],firstFocus:"#give-first",setup:function(){e(".give-section.payment").on("click",".give-cancel-login, .give-checkout-register-cancel",h),e(".give-section.payment").on("click touchend",'input[name="give_login_submit"]',(function(){e('input[name="give_login_submit"] + .give-loading-animation').removeClass("give-loading-animation").addClass("sequoia-loader spinning")})),window.give_global_vars.purchase_loading="",e(".give_error").each((function(){d(e(this))})),v({container:"#give-anonymous-donation-wrap label",label:"#give-anonymous-donation-wrap label",input:"#give-anonymous-donation"}),v({container:".give-recurring-donors-choice",label:".give-recurring-donors-choice label",input:'input[name="give-recurring-period"]'}),v({container:".give-fee-recovery-donors-choice",label:".give-fee-message-label-text",input:'input[name="give_fee_mode_checkbox"]'}),v({container:".give-activecampaign-fieldset",label:".give-activecampaign-optin-label",input:".give-activecampaign-optin-input"}),v({container:".give-mailchimp-fieldset",label:".give-mc-message-text",input:'input[name="give_mailchimp_signup"]'}),v({container:".give-constant-contact-fieldset",label:".give-constant-contact-fieldset span",input:'input[name="give_constant_contact_signup"]'}),v({container:"#give_terms_agreement",label:"#give_terms_agreement label",input:'input[name="give_agree_to_terms"]'}),e("body.give-form-templates").on("click touchend",'form.give-form input[name="give-purchase"].give-submit',(function(){e("#give-purchase-button + .give-loading-animation").removeClass("give-loading-animation").addClass("sequoia-loader"),e("form").get(0).checkValidity()&&e(".sequoia-loader").addClass("spinning")})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_maximum",(function(){l.goToStep(1)})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_amount",(function(){l.goToStep(1)})),e("#give-gateway-radio-list li").each((function(){var t;switch(e("input",this).val()){case"manual":t="fas fa-tools";break;case"offline":t="fas fa-wallet";break;case"paypal":t="fab fa-paypal";break;case"stripe":case"stripe_checkout":t="far fa-credit-card";break;case"stripe_sepa":case"stripe_ach":case"stripe_ideal":case"stripe_becs":t="fas fa-university";break;case"paypalpro_payflow":t="far fa-credit-card";break;case"stripe_google_pay":t="fab fa-google";break;case"stripe_apple_pay":t="fab fa-apple";break;default:t="fas fa-hand-holding-heart"}e(this).append('<i class="'.concat(t,'"></i>'))})),new window.MutationObserver((function(t){t.forEach((function(t){if(t.addedNodes)for(var i=0;i<t.addedNodes.length;i++){var n=t.addedNodes[i];if(e(n).find(".give_error").length>0&&d(e(n).find(".give_error")),e(n).children().hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&e(n).children(".give_errors").each((function(){d(e(this))})),e(n).hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&(d(e(n)),e(".sequoia-loader").removeClass("spinning")),"give_tributes_address_state"===e(n).attr("id")){var a=e(n).attr("placeholder");e(n).prepend("<option selected disabled>".concat(a,"</option>"))}if("give_tributes_address_state"===e(n).attr("name")&&e(n).attr("class").includes("give-input")&&e(n).attr("placeholder",e(n).siblings("label").text().trim()),e(n).attr("id")&&e(n).attr("id").includes("give-checkout-login-register")&&e('[id*="give-register-account-fields"]').on("click",m),e(n).prop("tagName")&&"select"===e(n).prop("tagName").toLowerCase()){var o=e(n).attr("placeholder");e(n).prepend('<option value="" disabled selected>'.concat(o,"</option>"))}}}))})).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1})}}];function d(t){e(t).parent().hasClass("give-stripe-payment-request-button")||(0===e(".donation-errors").length&&e(".payment").prepend('<div class="donation-errors"></div>'),void 0===a()(e(".donation-errors").html())||e(".donation-errors").html().includes(e(t).html())?e(t).remove():e(t).appendTo(".donation-errors"))}function u(){0===e("#donate-fieldset").length&&e("#give-payment-mode-select").after('<fieldset id="donate-fieldset"></fieldset>');if([".give-constant-contact-fieldset",".give-activecampaign-fieldset",".give-mailchimp-fieldset","#give_terms_agreement",".give-donation-submit"].forEach((function(t){0===e("#donate-fieldset ".concat(t)).length?e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t))):e("#donate-fieldset ".concat(t)).html()!==e("#give_purchase_form_wrap ".concat(t)).html()?(e("#donate-fieldset ".concat(t)).remove(),e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t)))):e("#give_purchase_form_wrap ".concat(t)).remove()})),0!==e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]').length){var t=!1;0!==e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').length&&(t=e('input[name="give_fee_mode_checkbox"]').prop("checked"),e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').remove()),e(".choose-amount").append(e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]')),e('input[name="give_fee_mode_checkbox"]').prop("checked",t)}e("li.give-gateway-option-selected").after(e("#give_purchase_form_wrap"));var i="gateway-"+e(".give-gateway-option-selected input").attr("value").replace("_","-");e("#give_purchase_form_wrap").attr("class",i),e("#give-ffm-section").off("click",m),e('[id*="give-register-account-fields"]').off("click",m),e("#give-ffm-section").on("click",m),e('[id*="give-register-account-fields"]').on("click",m),e("#give-ffm-section input").each((function(){switch(e(this).prop("type")){case"checkbox":e(this).prop("checked")?e(this).parent().addClass("checked"):e(this).parent().removeClass("checked");break;case"radio":e(this).prop("checked")?e(this).parent().addClass("selected"):e(this).parent().removeClass("selected")}})),g("#give-first-name-wrap","user"),g("#give-email-wrap","envelope"),g("#give-company-wrap","building"),g("#date_field-wrap","calendar-alt"),g("#url_field-wrap","globe"),g("#phone_field-wrap","phone"),g("#give-phone-wrap","phone"),g("#email_field-wrap","envelope")}function g(t,i){e(t).each((function(){""!==e(this).html()&&!1===e(this).html().includes('<i class="fas fa-'.concat(i,'"></i>'))&&(e(this).prepend('<i class="fas fa-'.concat(i,'"></i>')),e(this).children("input, selector").each((function(){e(this).attr("style","padding-left: 33px!important;")})))}))}function f(){e("select, button, input, textarea, multiselect, a").attr("tabindex",-1),p[l.currentStep].tabOrder.forEach((function(t,i){e(t).attr("tabindex",i+1)}))}function v(t){var i=t.container,n=t.label,a=t.input;!0===e(a).prop("checked")&&e(i).addClass("active"),e(n).on("click touchend",(function(t){i===n&&(t.stopPropagation(),t.preventDefault(),e(a).prop("checked",!e(a).prop("checked"))),e(i).toggleClass("active")}))}function m(t){if(e(t.target).is("input"))switch(e(t.target).prop("type")){case"checkbox":e(t.target).parent().toggleClass("checked");break;case"radio":e(t.target).parent().addClass("selected"),e(t.target).parent().siblings().removeClass("selected")}}function h(){e("#give_error_must_log_in").remove()}function b(){e('select option[selected="selected"][value=""]').length>0&&e('select option[selected="selected"][value=""]').each((function(){e(this).parent().siblings("label").length&&(e(this).text(e(this).parent().siblings("label").text().replace("*","").trim()),e(this).attr("disabled",!0))}))}l.init(),c.length&&"none"!==c.css("display")?(u(),e(document).on("give_gateway_loaded",(function(){f(),u(),b(),e("#give_purchase_form_wrap").slideDown(200,(function(){s=!1}))})),e(document).on("Give:onPreGatewayLoad",(function(){s=!0,e("#give_purchase_form_wrap").slideUp(200)})),e(document).on("Give:onPreGatewayLoad",(function(){var t=["give_error_test_mode"];e(".give_errors, .give_notices, .give_error").each((function(){t.includes(e(this).attr("id"))||e(this).slideUp(200,(function(){e(this).remove()}))}))})),e(document).on("give_gateway_loaded",(function(t,i,n){2===l.currentStep&&e(".give-form-templates").css("min-height","");var a=e("#".concat(n));if(a.parent().hasClass("give-embed-form")){var o={action:"give_cancel_login",form_id:a.find('[name="give-form-id"]').val()};e.post(Give.fn.getGlobalVar("ajaxurl"),o,(function(t){a.find("[id^=give-checkout-login-register]").replaceWith(e.parseJSON(t.fields)),a.find("[id^=give-checkout-login-register]").css({display:"block"}),a.find(".give-submit-button-wrap").show()})).done((function(){window.give_fl_trigger()}))}}))):(e("#give_purchase_form_wrap").addClass("give-single-gateway-wrap"),b())}(jQuery)}});
1
+ !function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=710)}({14:function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=i=function(e){return typeof e}:e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}e.exports=i},710:function(e,t,i){i(711),e.exports=i(712)},711:function(e,t,i){},712:function(e,t,i){"use strict";i.r(t);var n=i(14),a=i.n(n);!function(e){var t=window.sequoiaTemplateOptions,i=e(".give-embed-form"),n=e(".advance-btn",i),o=e(".back-btn"),r=e(".give-form-navigator .title"),c=e("#give-payment-mode-select"),s=!1,l=window.parent.wp;l.data&&i.on("click",(function(){var e=window.frameElement.closest(".wp-block").getAttribute("data-block");l.data.dispatch("core/block-editor").selectBlock(e)}));var d={currentStep:"enabled"===t.introduction.enabled?0:1,animating:!1,firstFocus:!1,goToStep:function(n){var a=p[n].title?e(p[n].selector).height()+50:e(p[n].selector).height(),o=p[d.currentStep].title?e(p[d.currentStep].selector).height()+50:e(p[d.currentStep].selector).height();a>o?e(".give-form-templates").css("min-height","".concat(a+123,"px")):setTimeout((function(){e(".give-form-templates").css("min-height","".concat(a+123,"px"))}),200),e(".step-tracker").removeClass("current"),e('.step-tracker[data-step="'+n+'"]').addClass("current"),"disabled"===t.introduction.enabled?(3===e(".step-tracker").length&&e(".step-tracker").remove(),1===(n=n>0?n:1)?e(".back-btn",i).hide():e(".back-btn",i).show(),e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")):0===n?(e(".give-form-navigator",i).removeClass("nav-visible"),e(p[n].selector).css("padding-top","")):(e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")),p[n].title&&r.text(p[n].title);var c=p.map((function(e,t){return t===n||t===d.currentStep?null:e.selector})).filter(Boolean).join(", ");if(e(c).hide(),d.currentStep!==n){var s="slide-in-right slide-in-left slide-out-right slide-out-left",l=d.currentStep<n?"left":"right",u=d.currentStep<n?"right":"left";e(p[d.currentStep].selector).removeClass(s).addClass("slide-out-".concat(l)),e(p[n].selector).show().removeClass(s).addClass("slide-in-".concat(u))}d.currentStep=n,v(),setTimeout((function(){if(!d.firstFocus&&"disabled"===t.introduction.enabled)return d.firstFocus=!0;p[d.currentStep].firstFocus&&e(p[d.currentStep].firstFocus).focus()}),200)},init:function(){var t,i;p.forEach((function(t){void 0!==t.setup&&t.setup(),e(t.selector).css("position","absolute")})),n.on("click",(function(e){e.preventDefault(),d.forward()})),o.on("click",(function(e){e.preventDefault(),d.back()})),e(".step-tracker").on("click",(function(t){t.preventDefault(),d.goToStep(parseInt(e(t.target).attr("data-step")))})),t=function(t){!1===s?e(".form-footer").css("transition","margin-top 0.2s ease"):e(".form-footer").css("transition",""),e(".form-footer").css("margin-top","".concat(t,"px"))},i=0,window.requestAnimationFrame((function n(){var a=e(p[d.currentStep].selector);i!==e(a).outerHeight()&&(t(e(a).outerHeight()),i=e(a).outerHeight()),window.requestAnimationFrame(n)})),d.goToStep(Give.fn.getParameterByName("showDonationProcessingError")||Give.fn.getParameterByName("showFailedDonationError")?2:0)},back:function(){var e=0!==d.currentStep?d.currentStep-1:0;d.goToStep(e),d.currentStep=e},forward:function(){var e=null!==d.currentStep?d.currentStep+1:1;d.goToStep(e),d.currentStep=e}},p=[{id:"introduction",title:null,selector:".give-section.introduction",label:t.introduction.donate_label,showErrors:!1,tabOrder:[".introduction .advance-btn",".step-tracker"]},{id:"choose-amount",title:t.payment_amount.header_label,selector:".give-section.choose-amount",label:t.payment_amount.next_label,showErrors:!1,tabOrder:["input.give-amount-top",".give-donation-levels-wrap button",".give-recurring-period",".give-recurring-donors-choice-period",".give_fee_mode_checkbox",".choose-amount .advance-btn",".step-tracker",".back-btn"],firstFocus:".give-default-level",setup:function(){var t=e(".give-donation-level-btn").length;1===t?e(".give-donation-levels-wrap").attr("style","display: none!important;"):t%2==0&&t<6&&e(".give-donation-levels-wrap").css("grid-template-columns","repeat(2, minmax(0, 1fr))"),e("#give-amount").on("blur",(function(){Give.form.fn.isValidDonationAmount(e("form"))?e(".advance-btn").attr("disabled",!1):e(".advance-btn").attr("disabled",!0)})),e(".give-donation-level-btn").each((function(){if(!e(this).attr("has-tooltip")){var t=e(this).attr("value"),i=e(this).text(),n=window.give_global_vars.currency_sign,a=window.give_global_vars.currency_pos;if("custom"!==t){var o="before"===a?'<div class="currency currency--before">'.concat(n,"</div>").concat(t):"".concat(t,'<div class="currency currency--after">').concat(n,"</div>");e(this).html(o)}if("custom"!==t&&i!==("before"===a?n+t:t+n)){var r='<span class="give-tooltip hint--top hint--bounce '.concat(i.length<50?"narrow":"",'" style="width: 100%" aria-label="').concat(i.length<50?i:i.substr(0,50)+"...",'" rel="tooltip"></span>');e(this).wrap(r),e(this).attr("has-tooltip",!0)}}}))}},{id:"payment",title:t.payment_information.header_label,label:t.payment_information.checkout_label,selector:".give-section.payment",showErrors:!0,tabOrder:[".payment input, .payment a, .payment button, .payment select, .payment multiselect, .payment textarea, .payment .button",".give-submit",".step-tracker",".back-btn"],firstFocus:"#give-first",setup:function(){e(".give-section.payment").on("click",".give-cancel-login, .give-checkout-register-cancel",b),e(".give-section.payment").on("click touchend",'input[name="give_login_submit"]',(function(){e('input[name="give_login_submit"] + .give-loading-animation').removeClass("give-loading-animation").addClass("sequoia-loader spinning")})),window.give_global_vars.purchase_loading="",e(".give_error").each((function(){u(e(this))})),m({container:"#give-anonymous-donation-wrap label",label:"#give-anonymous-donation-wrap label",input:"#give-anonymous-donation"}),m({container:".give-recurring-donors-choice",label:".give-recurring-donors-choice label",input:'input[name="give-recurring-period"]'}),m({container:".give-fee-recovery-donors-choice",label:".give-fee-message-label-text",input:'input[name="give_fee_mode_checkbox"]'}),m({container:".give-activecampaign-fieldset",label:".give-activecampaign-optin-label",input:".give-activecampaign-optin-input"}),m({container:".give-mailchimp-fieldset",label:".give-mc-message-text",input:'input[name="give_mailchimp_signup"]'}),m({container:".give-constant-contact-fieldset",label:".give-constant-contact-fieldset span",input:'input[name="give_constant_contact_signup"]'}),m({container:"#give_terms_agreement",label:"#give_terms_agreement label",input:'input[name="give_agree_to_terms"]'}),e("body.give-form-templates").on("click touchend",'form.give-form input[name="give-purchase"].give-submit',(function(){e("#give-purchase-button + .give-loading-animation").removeClass("give-loading-animation").addClass("sequoia-loader"),e("form").get(0).checkValidity()&&e(".sequoia-loader").addClass("spinning")})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_maximum",(function(){d.goToStep(1)})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_amount",(function(){d.goToStep(1)})),e("#give-gateway-radio-list li").each((function(){var t;switch(e("input",this).val()){case"manual":t="fas fa-tools";break;case"offline":t="fas fa-wallet";break;case"paypal":t="fab fa-paypal";break;case"stripe":case"stripe_checkout":t="far fa-credit-card";break;case"stripe_sepa":case"stripe_ach":case"stripe_ideal":case"stripe_becs":t="fas fa-university";break;case"paypalpro_payflow":t="far fa-credit-card";break;case"stripe_google_pay":t="fab fa-google";break;case"stripe_apple_pay":t="fab fa-apple";break;default:t="fas fa-hand-holding-heart"}e(this).append('<i class="'.concat(t,'"></i>'))})),new window.MutationObserver((function(t){t.forEach((function(t){if(t.addedNodes)for(var i=0;i<t.addedNodes.length;i++){var n=t.addedNodes[i];if(e(n).find(".give_error").length>0&&u(e(n).find(".give_error")),e(n).children().hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&e(n).children(".give_errors").each((function(){u(e(this))})),e(n).hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&(u(e(n)),e(".sequoia-loader").removeClass("spinning")),"give_tributes_address_state"===e(n).attr("id")){var a=e(n).attr("placeholder");e(n).prepend("<option selected disabled>".concat(a,"</option>"))}if("give_tributes_address_state"===e(n).attr("name")&&e(n).attr("class").includes("give-input")&&e(n).attr("placeholder",e(n).siblings("label").text().trim()),e(n).attr("id")&&e(n).attr("id").includes("give-checkout-login-register")&&e('[id*="give-register-account-fields"]').on("click",h),e(n).prop("tagName")&&"select"===e(n).prop("tagName").toLowerCase()){var o=e(n).attr("placeholder");e(n).prepend('<option value="" disabled selected>'.concat(o,"</option>"))}}}))})).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1})}}];function u(t){e(t).parent().hasClass("give-stripe-payment-request-button")||(0===e(".donation-errors").length&&e(".payment").prepend('<div class="donation-errors"></div>'),void 0===a()(e(".donation-errors").html())||e(".donation-errors").html().includes(e(t).html())?e(t).remove():e(t).appendTo(".donation-errors"))}function g(){0===e("#donate-fieldset").length&&e("#give-payment-mode-select").after('<fieldset id="donate-fieldset"></fieldset>');if([".give-constant-contact-fieldset",".give-activecampaign-fieldset",".give-mailchimp-fieldset","#give_terms_agreement",".give-donation-submit"].forEach((function(t){0===e("#donate-fieldset ".concat(t)).length?e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t))):e("#donate-fieldset ".concat(t)).html()!==e("#give_purchase_form_wrap ".concat(t)).html()?(e("#donate-fieldset ".concat(t)).remove(),e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t)))):e("#give_purchase_form_wrap ".concat(t)).remove()})),0!==e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]').length){var t=!1;0!==e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').length&&(t=e('input[name="give_fee_mode_checkbox"]').prop("checked"),e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').remove()),e(".choose-amount").append(e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]')),e('input[name="give_fee_mode_checkbox"]').prop("checked",t)}e("li.give-gateway-option-selected").after(e("#give_purchase_form_wrap"));var i="gateway-"+e(".give-gateway-option-selected input").attr("value").replace("_","-");e("#give_purchase_form_wrap").attr("class",i),e("#give-ffm-section").off("click",h),e('[id*="give-register-account-fields"]').off("click",h),e("#give-ffm-section").on("click",h),e('[id*="give-register-account-fields"]').on("click",h),e("#give-ffm-section input").each((function(){switch(e(this).prop("type")){case"checkbox":e(this).prop("checked")?e(this).parent().addClass("checked"):e(this).parent().removeClass("checked");break;case"radio":e(this).prop("checked")?e(this).parent().addClass("selected"):e(this).parent().removeClass("selected")}})),f("#give-first-name-wrap","user"),f("#give-email-wrap","envelope"),f("#give-company-wrap","building"),f("#date_field-wrap","calendar-alt"),f("#url_field-wrap","globe"),f("#phone_field-wrap","phone"),f("#give-phone-wrap","phone"),f("#email_field-wrap","envelope")}function f(t,i){e(t).each((function(){""!==e(this).html()&&!1===e(this).html().includes('<i class="fas fa-'.concat(i,'"></i>'))&&(e(this).prepend('<i class="fas fa-'.concat(i,'"></i>')),e(this).children("input, selector").each((function(){e(this).attr("style","padding-left: 33px!important;")})))}))}function v(){e("select, button, input, textarea, multiselect, a").attr("tabindex",-1),p[d.currentStep].tabOrder.forEach((function(t,i){e(t).attr("tabindex",i+1)}))}function m(t){var i=t.container,n=t.label,a=t.input;!0===e(a).prop("checked")&&e(i).addClass("active"),e(n).on("click touchend",(function(t){i===n&&(t.stopPropagation(),t.preventDefault(),e(a).prop("checked",!e(a).prop("checked"))),e(i).toggleClass("active")}))}function h(t){if(e(t.target).is("input"))switch(e(t.target).prop("type")){case"checkbox":e(t.target).parent().toggleClass("checked");break;case"radio":e(t.target).parent().addClass("selected"),e(t.target).parent().siblings().removeClass("selected")}}function b(){e("#give_error_must_log_in").remove()}function _(){e('select option[selected="selected"][value=""]').length>0&&e('select option[selected="selected"][value=""]').each((function(){e(this).parent().siblings("label").length&&(e(this).text(e(this).parent().siblings("label").text().replace("*","").trim()),e(this).attr("disabled",!0))}))}d.init(),c.length&&"none"!==c.css("display")?(g(),e(document).on("give_gateway_loaded",(function(){v(),g(),_(),e("#give_purchase_form_wrap").slideDown(200,(function(){s=!1}))})),e(document).on("Give:onPreGatewayLoad",(function(){s=!0,e("#give_purchase_form_wrap").slideUp(200)})),e(document).on("Give:onPreGatewayLoad",(function(){var t=["give_error_test_mode"];e(".give_errors, .give_notices, .give_error").each((function(){t.includes(e(this).attr("id"))||e(this).slideUp(200,(function(){e(this).remove()}))}))})),e(document).on("give_gateway_loaded",(function(t,i,n){2===d.currentStep&&e(".give-form-templates").css("min-height","");var a=e("#".concat(n));if(a.parent().hasClass("give-embed-form")){var o={action:"give_cancel_login",form_id:a.find('[name="give-form-id"]').val()};e.post(Give.fn.getGlobalVar("ajaxurl"),o,(function(t){a.find("[id^=give-checkout-login-register]").replaceWith(e.parseJSON(t.fields)),a.find("[id^=give-checkout-login-register]").css({display:"block"}),a.find(".give-submit-button-wrap").show()})).done((function(){window.give_fl_trigger()}))}}))):(e("#give_purchase_form_wrap").addClass("give-single-gateway-wrap"),_())}(jQuery)}});
assets/dist/js/give.js CHANGED
@@ -32,7 +32,7 @@
32
  * http://www.gnu.org/licenses/gpl.html
33
  *
34
  * Thanks to Amir-Hossein Sobhi for some excellent contributions!
35
- */!function(){"use strict";function a(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){s(window,e)},e.growlUI=function(t,n,r,i){var o=e('<div class="growlUI"></div>');t&&o.append("<h1>"+t+"</h1>"),n&&o.append("<h2>"+n+"</h2>"),void 0===r&&(r=3e3);var a=function(t){t=t||{},e.blockUI({message:o,fadeIn:void 0!==t.fadeIn?t.fadeIn:700,fadeOut:void 0!==t.fadeOut?t.fadeOut:1e3,timeout:void 0!==t.timeout?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};a();o.css("opacity");o.mouseover((function(){a({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)})).mouseout((function(){e(".blockMsg").fadeOut(1e3)}))},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var n=e.extend({},e.blockUI.defaults,t||{});return this.each((function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})})),this.each((function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,u(this,t)}))},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each((function(){s(this,t)}))},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,a=[];function u(u,c){var d,p,g=u==window,v=c&&void 0!==c.message?c.message:void 0;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(u).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),d=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),p=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),v=void 0===v?c.message:v,g&&o&&s(window,{fadeOut:0}),v&&"string"!=typeof v&&(v.parentNode||v.jquery)){var h=v.jquery?v[0]:v,y={};e(u).data("blockUI.history",y),y.el=h,y.parent=h.parentNode,y.display=h.style.display,y.position=h.style.position,y.parent&&y.parent.removeChild(h)}e(u).data("blockUI.onUnblock",c.onUnblock);var b,w,_,x,C=c.baseZ;b=n||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),w=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+C+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&g?(x='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):c.theme?(x='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):x=g?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>',_=e(x),v&&(c.theme?(_.css(p),_.addClass("ui-widget-content")):_.css(d)),c.theme||w.css(c.overlayCSS),w.css("position",g?"fixed":"absolute"),(n||c.forceIframe)&&b.css("opacity",0);var k=[b,w,_],I=e(g?"body":u);e.each(k,(function(){this.appendTo(I)})),c.theme&&c.draggable&&e.fn.draggable&&_.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var E=i&&(!e.support.boxModel||e("object,embed",g?null:u).length>0);if(r||E){if(g&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(r||!e.support.boxModel)&&!g)var S=m(u,"borderTopWidth"),j=m(u,"borderLeftWidth"),O=S?"(0 - "+S+")":0,T=j?"(0 - "+j+")":0;e.each(k,(function(e,t){var n=t[0].style;if(n.position="absolute",e<2)g?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),g?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),T&&n.setExpression("left",T),O&&n.setExpression("top",O);else if(c.centerY)g&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!c.centerY&&g){var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';n.setExpression("top",r)}}))}if(v&&(c.theme?_.find(".ui-widget-content").append(v):_.append(v),(v.jquery||v.nodeType)&&e(v).show()),(n||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var M=c.onBlock?c.onBlock:t,A=c.showOverlay&&!v?M:t,N=v?M:t;c.showOverlay&&w._fadeIn(c.fadeIn,A),v&&_._fadeIn(c.fadeIn,N)}else c.showOverlay&&w.show(),v&&_.show(),c.onBlock&&c.onBlock.bind(_)();if(l(1,u,c),g?(o=_[0],a=e(c.focusableElements,o),c.focusInput&&setTimeout(f,20)):function(e,t,n){var r=e.parentNode,i=e.style,o=(r.offsetWidth-e.offsetWidth)/2-m(r,"borderLeftWidth"),a=(r.offsetHeight-e.offsetHeight)/2-m(r,"borderTopWidth");t&&(i.left=o>0?o+"px":"0");n&&(i.top=a>0?a+"px":"0")}(_[0],c.centerX,c.centerY),c.timeout){var z=setTimeout((function(){g?e.unblockUI(c):e(u).unblock(c)}),c.timeout);e(u).data("blockUI.timeout",z)}}}function s(t,n){var r,i,u=t==window,s=e(t),d=s.data("blockUI.history"),f=s.data("blockUI.timeout");f&&(clearTimeout(f),s.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),null===n.onUnblock&&(n.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),i=u?e("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),n.cursorReset&&(i.length>1&&(i[1].style.cursor=n.cursorReset),i.length>2&&(i[2].style.cursor=n.cursorReset)),u&&(o=a=null),n.fadeOut?(r=i.length,i.stop().fadeOut(n.fadeOut,(function(){0==--r&&c(i,d,n,t)}))):c(i,d,n,t)}function c(t,n,r,i){var o=e(i);if(!o.data("blockUI.isBlocked")){t.each((function(e,t){this.parentNode&&this.parentNode.removeChild(this)})),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.el.style.cursor="default",n.parent&&n.parent.appendChild(n.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof r.onUnblock&&r.onUnblock(i,r);var a=e(document.body),u=a.width(),s=a[0].style.width;a.width(u-1).width(u),a[0].style.width=s}}function l(t,n,r){var i=n==window,a=e(n);if((t||(!i||o)&&(i||a.data("blockUI.isBlocked")))&&(a.data("blockUI.isBlocked",t),i&&r.bindEvents&&(!t||r.showOverlay))){var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,d):e(document).unbind(u,d)}}function d(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&o&&t.data.constrainTabKey){var n=a,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout((function(){f(i)}),10),!1}var u=t.data,s=e(t.target);return s.hasClass("blockOverlay")&&u.onOverlayClick&&u.onOverlayClick(t),s.parents("div."+u.blockMsgClass).length>0||0===s.parents().children().filter("div.blockUI").length}function f(e){if(a){var t=a[!0===e?a.length-1:0];t&&t.focus()}}function m(t,n){return parseInt(e.css(t,n),10)||0}}n(487).jQuery?(i=[n(71)],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):a(jQuery)}()},487:function(e,t){(function(t){e.exports=t}).call(this,{})},488:function(e,t){jQuery((function(e){var t=jQuery("form.give-form"),n=e(document);e.fn.toggleError=function(e){return this.toggleClass("error",e),this.toggleClass("valid",!e),this},Give.init(),n.on("change","#give_cc_address input.card_state, #give_cc_address select",(function(){var t=e(this),r=t.parents("form");if("card_state"!==t.attr("id")){r.find("#card_state").empty().append('<option value="1">'+Give.fn.getGlobalVar("general_loading")+"</option>").prop("disabled",!0);var i={action:"give_get_states",country:t.val(),field_name:"card_state"};e.ajax({type:"POST",data:i,url:Give.fn.getGlobalVar("ajaxurl"),xhrFields:{withCredentials:!0},success:function(t){var i="",o=t.states_label,a=r.find('input[name="card_state"], select[name="card_state"]'),u=r.find('input[name="card_city"]');void 0!==t.states_found&&!0===t.states_found?i=e(t.data):(i='<input type="text" id="card_state" name="card_state" class="cart-state give-input required" placeholder="'.concat(o,'" value="').concat(t.default_state,'" autocomplete="address-level4"/>'),i=e(i)),!1===r.hasClass("float-labels-enabled")?(void 0!==t.states_require&&!0===t.states_require?(i.attr("required","required").attr("aria-required","true").addClass("required"),a.closest("p").find("label .give-required-indicator").removeClass("give-hidden")):(i.removeAttr("required").removeAttr("aria-required").removeClass("required"),a.closest("p").find("label .give-required-indicator").addClass("give-hidden")),void 0!==t.city_require&&!0===t.city_require?(u.closest("p").find("label .give-required-indicator").removeClass("give-hidden").removeClass("required"),u.attr("required",!0)):(u.closest("p").find("label .give-required-indicator").addClass("give-hidden").addClass("required"),u.removeAttr("required"))):(void 0!==t.states_require&&!0===t.states_require?(i.attr("required","required").attr("aria-required","true").addClass("required"),a.closest("p").find(".give-fl-wrap").addClass("give-fl-is-required")):(i.removeAttr("required").removeAttr("aria-required").removeClass("required"),a.closest("p").find(".give-fl-wrap").removeClass("give-fl-is-required")),void 0!==t.city_require&&!0===t.city_require?(u.closest("p").find(".give-fl-wrap").addClass("give-fl-is-required"),u.attr("required",!0)):(u.closest("p").find(".give-fl-wrap").removeClass("give-fl-is-required"),u.removeAttr("required"))),a.closest("p").find("label .state-label-text").text(o),a.replaceWith(i),void 0!==t.show_field&&!0===t.show_field?(r.find("p#give-card-state-wrap").removeClass("give-hidden"),r.find("p#give-card-zip-wrap").addClass("form-row-last"),r.find("p#give-card-zip-wrap").removeClass("form-row-wide")):(r.find("p#give-card-state-wrap").addClass("give-hidden"),r.find("p#give-card-zip-wrap").addClass("form-row-wide"),r.find("p#give-card-zip-wrap").removeClass("form-row-last")),n.trigger("give_checkout_billing_address_updated",[t,r.attr("id")])}}).fail((function(e){window.console&&window.console.log&&console.log(e)}))}return!1})),n.on("give_gateway_loaded",(function(){Give.form.fn.field.formatCreditCard(t)})),n.on("submit","#give_payment_mode",(function(){if(!Give.form.fn.getGateway(e(this).closest("form")).length)return alert(Give.fn.getGlobalVar("no_gateway")),!1})),n.on("click",'#give-payment-mode-select input[name="payment-mode"]',(function(){var t,n=e(this).parents("form"),r=n.find("#give-payment-mode-select li"),i=n.find('li.give-gateway-option-selected input[name="payment-mode"]').val().trim();r.removeClass("give-gateway-option-selected"),r.prop("checked",!1),e(this).prop("checked",!0),e(this).parent().addClass("give-gateway-option-selected"),t=Give.form.fn.getGateway(n),n.attr("action",n.attr("action").replace("payment-mode="+i,"payment-mode="+t))})),n.on("focus",".give-donation-amount .give-text-input",(function(t){var n=e(this).parents("form");e(this).removeClass("invalid-amount");var r=n.find(".give-final-total-amount").attr("data-total"),i=Give.form.fn.getInfo("decimal_separator",n);e(this).attr("data-amount",Give.fn.unFormatCurrency(r,i)),e(this).parent(".give-donation-amount").addClass("give-custom-amount-focus-in"),n.find(".give-default-level, .give-radio-input").removeClass("give-default-level"),n.find(".give-btn-level-custom").addClass("give-default-level"),n.find(".give-radio-input").prop("checked",!1),n.find(".give-radio-input.give-radio-level-custom").prop("checked",!0),n.find(".give-select-level").prop("selected",!1),n.find(".give-select-level .give-donation-level-custom").prop("selected",!0)})),n.on("blur",".give-donation-amount .give-text-input",(function(t,n,r,i){var o=void 0!==n?n:e(this).closest("form"),a=e(this).attr("data-amount"),u=void 0!==r?r:e(this).val(),s=Give.form.fn.getInfo("decimal_separator",o),c=Give.form.fn.getMinimumAmount(o),l=Give.form.fn.getMaximumAmount(o),d=0===u?c:Give.fn.unFormatCurrency(u,s),f=Give.form.fn.formatAmount(d,o,{});if(i=void 0===i?Give.form.fn.getPriceID(o,!0):i,""===d||0===d){var m=e('.give-donation-levels-wrap [data-default="1"]',n);m.length&&(i=m.data("price-id"),u=d=Give.fn.unFormatCurrency(m.val(),s),f=Give.form.fn.formatAmount(d,o,{}))}if(Give.fn.setCache("amount_"+d,i,o),e(this).val(f),Give.form.fn.isValidDonationAmount(o))e(this).removeClass("give-invalid-amount"),o.find(".give-invalid-minimum, .give-invalid-maximum").slideUp(300,(function(){e(this).remove()})),Give.form.fn.disable(o,!1);else{e(this).addClass("give-invalid-amount"),Give.form.fn.disable(o,!0);var p=o.find(".give-invalid-minimum"),g=o.find(".give-invalid-maximum");0===p.length&&d<c?Give.notice.fn.renderNotice("bad_minimum",o):d>=c&&p.slideUp(300,(function(){e(this).remove()})),0===g.length&&d>l?Give.notice.fn.renderNotice("bad_maximum",o):d<=l&&g.slideUp(300,(function(){e(this).remove()}))}a!==d&&o.find(".give-final-total-amount").attr("data-total",d).text(Give.fn.formatCurrency(d,{symbol:Give.form.fn.getInfo("currency_symbol",o),position:Give.form.fn.getInfo("currency_position",o)},o)),-1!==i&&(e('input[name="give-price-id"]',o).val(i),o.find(".give-amount-hidden").val(Give.form.fn.formatAmount(d,o,{})),o.find(".give-default-level").removeClass("give-default-level"),Give.form.fn.autoSelectDonationLevel(o,i)),e(this).parent(".give-donation-amount").removeClass("give-custom-amount-focus-in"),e(document).trigger("give_donation_value_updated",[o,d,i])})),n.on("click touchend",".give-donation-level-btn",(function(t){t.preventDefault(),Give.form.fn.autoSetMultiLevel(e(this))})),n.on("click touchend",".give-radio-input-level",(function(t){Give.form.fn.autoSetMultiLevel(e(this))})),n.on("change",".give-select-level",(function(t){Give.form.fn.autoSetMultiLevel(e(this))})),n.on("click",".give_terms_links",(function(t){t.preventDefault();var n=e(this).closest("fieldset");return e("[class^=give_terms-]",n).slideToggle(),e("a.give_terms_links",n).toggle(),!1})),e('label[for^="give-radio-level"]').on("click",(function(t){var n=e(this).closest("form").find("#"+e(this).attr("for"));n.length&&(n.trigger("click"),t.preventDefault())}))})),jQuery(window).on("load",(function(){jQuery("body").on("keyup change focusout",".give-form .card-number, .give-form .card-cvc, .give-form .card-expiry",(function(e){var t=jQuery(this),n=t.parents("form.give-form"),r=t.attr("id"),i=n.find(".card-number"),o=n.find(".card-cvc"),a=n.find(".card-expiry"),u=jQuery.payment.cardType(i.val()),s=!1;switch(e.type){case"focusout":r.indexOf("card_number")>-1?(s=!jQuery.payment.validateCardNumber(i.val()),i.toggleError(s)):r.indexOf("card_cvc")>-1?(s=!jQuery.payment.validateCardCVC(o.val(),u),o.toggleError(s)):r.indexOf("card_expiry")>-1&&(s=!jQuery.payment.validateCardExpiry(a.payment("cardExpiryVal")),a.toggleError(s)),Give.form.fn.disable(t.parents("form"),s);break;default:if(t.hasClass("error")&&t.removeClass("error"),r.indexOf("card_number")>-1){var c=n.find(".card-type");null===u?(c.removeClass().addClass("off card-type"),t.removeClass("valid").addClass("error")):c.removeClass().addClass("card-type "+u)}else if(r.indexOf("card_expiry")>-1){var l=a.payment("cardExpiryVal");n.find(".card-expiry-month").val(l.month),n.find(".card-expiry-year").val(l.year)}}}))}))},53:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},71:function(e,t){e.exports=jQuery},846:function(e,t,n){"use strict";n.r(t);n(484),n(286),n(485),n(103),n(102),n(291);var r=n(86),i=n(31),o=(n(488),n(14)),a=n.n(o);function u(e,t){var n=jQuery(e).find("#give-payment-mode-select .give-loading-text"),r=jQuery(e).find("#give-amount").val(),i=jQuery(e).find('input[name="give-form-id"]').val(),o=jQuery(e).find('input[name="give-form-id-prefix"]').val();n.fadeIn(),1!=jQuery(e).data()["blockUI.isBlocked"]&&jQuery(e).find("#give_purchase_form_wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),new Promise((function(n){jQuery(document).trigger("Give:onPreGatewayLoad"),jQuery.post(Give.fn.getGlobalVar("ajaxurl")+"?payment-mode="+t,{action:"give_load_gateway",give_total:r,give_form_id:i,give_form_id_prefix:o,give_payment_mode:t,nonce:Give.form.fn.getNonce(e)},(function(t){return jQuery(e).find("#give_purchase_form_wrap").html(t),jQuery(".give-no-js").hide(),jQuery(e).find("#give-payment-mode-select .give-loading-text").fadeOut(),n(t)}))})).then((function(t){jQuery(document).trigger("give_gateway_loaded",[t,jQuery(e).attr("id")]),jQuery(e).unblock()}))}
36
  /*!
37
  * Give AJAX JS
38
  *
32
  * http://www.gnu.org/licenses/gpl.html
33
  *
34
  * Thanks to Amir-Hossein Sobhi for some excellent contributions!
35
+ */!function(){"use strict";function a(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){s(window,e)},e.growlUI=function(t,n,r,i){var o=e('<div class="growlUI"></div>');t&&o.append("<h1>"+t+"</h1>"),n&&o.append("<h2>"+n+"</h2>"),void 0===r&&(r=3e3);var a=function(t){t=t||{},e.blockUI({message:o,fadeIn:void 0!==t.fadeIn?t.fadeIn:700,fadeOut:void 0!==t.fadeOut?t.fadeOut:1e3,timeout:void 0!==t.timeout?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};a();o.css("opacity");o.mouseover((function(){a({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)})).mouseout((function(){e(".blockMsg").fadeOut(1e3)}))},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var n=e.extend({},e.blockUI.defaults,t||{});return this.each((function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})})),this.each((function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,u(this,t)}))},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each((function(){s(this,t)}))},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,a=[];function u(u,c){var d,p,g=u==window,v=c&&void 0!==c.message?c.message:void 0;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(u).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),d=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),p=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),v=void 0===v?c.message:v,g&&o&&s(window,{fadeOut:0}),v&&"string"!=typeof v&&(v.parentNode||v.jquery)){var h=v.jquery?v[0]:v,y={};e(u).data("blockUI.history",y),y.el=h,y.parent=h.parentNode,y.display=h.style.display,y.position=h.style.position,y.parent&&y.parent.removeChild(h)}e(u).data("blockUI.onUnblock",c.onUnblock);var b,w,_,x,C=c.baseZ;b=n||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),w=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+C+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&g?(x='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):c.theme?(x='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):x=g?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>',_=e(x),v&&(c.theme?(_.css(p),_.addClass("ui-widget-content")):_.css(d)),c.theme||w.css(c.overlayCSS),w.css("position",g?"fixed":"absolute"),(n||c.forceIframe)&&b.css("opacity",0);var k=[b,w,_],I=e(g?"body":u);e.each(k,(function(){this.appendTo(I)})),c.theme&&c.draggable&&e.fn.draggable&&_.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var E=i&&(!e.support.boxModel||e("object,embed",g?null:u).length>0);if(r||E){if(g&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(r||!e.support.boxModel)&&!g)var S=m(u,"borderTopWidth"),j=m(u,"borderLeftWidth"),O=S?"(0 - "+S+")":0,T=j?"(0 - "+j+")":0;e.each(k,(function(e,t){var n=t[0].style;if(n.position="absolute",e<2)g?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),g?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),T&&n.setExpression("left",T),O&&n.setExpression("top",O);else if(c.centerY)g&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!c.centerY&&g){var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';n.setExpression("top",r)}}))}if(v&&(c.theme?_.find(".ui-widget-content").append(v):_.append(v),(v.jquery||v.nodeType)&&e(v).show()),(n||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var M=c.onBlock?c.onBlock:t,A=c.showOverlay&&!v?M:t,N=v?M:t;c.showOverlay&&w._fadeIn(c.fadeIn,A),v&&_._fadeIn(c.fadeIn,N)}else c.showOverlay&&w.show(),v&&_.show(),c.onBlock&&c.onBlock.bind(_)();if(l(1,u,c),g?(o=_[0],a=e(c.focusableElements,o),c.focusInput&&setTimeout(f,20)):function(e,t,n){var r=e.parentNode,i=e.style,o=(r.offsetWidth-e.offsetWidth)/2-m(r,"borderLeftWidth"),a=(r.offsetHeight-e.offsetHeight)/2-m(r,"borderTopWidth");t&&(i.left=o>0?o+"px":"0");n&&(i.top=a>0?a+"px":"0")}(_[0],c.centerX,c.centerY),c.timeout){var z=setTimeout((function(){g?e.unblockUI(c):e(u).unblock(c)}),c.timeout);e(u).data("blockUI.timeout",z)}}}function s(t,n){var r,i,u=t==window,s=e(t),d=s.data("blockUI.history"),f=s.data("blockUI.timeout");f&&(clearTimeout(f),s.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),null===n.onUnblock&&(n.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),i=u?e("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),n.cursorReset&&(i.length>1&&(i[1].style.cursor=n.cursorReset),i.length>2&&(i[2].style.cursor=n.cursorReset)),u&&(o=a=null),n.fadeOut?(r=i.length,i.stop().fadeOut(n.fadeOut,(function(){0==--r&&c(i,d,n,t)}))):c(i,d,n,t)}function c(t,n,r,i){var o=e(i);if(!o.data("blockUI.isBlocked")){t.each((function(e,t){this.parentNode&&this.parentNode.removeChild(this)})),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.el.style.cursor="default",n.parent&&n.parent.appendChild(n.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof r.onUnblock&&r.onUnblock(i,r);var a=e(document.body),u=a.width(),s=a[0].style.width;a.width(u-1).width(u),a[0].style.width=s}}function l(t,n,r){var i=n==window,a=e(n);if((t||(!i||o)&&(i||a.data("blockUI.isBlocked")))&&(a.data("blockUI.isBlocked",t),i&&r.bindEvents&&(!t||r.showOverlay))){var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,d):e(document).unbind(u,d)}}function d(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&o&&t.data.constrainTabKey){var n=a,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout((function(){f(i)}),10),!1}var u=t.data,s=e(t.target);return s.hasClass("blockOverlay")&&u.onOverlayClick&&u.onOverlayClick(t),s.parents("div."+u.blockMsgClass).length>0||0===s.parents().children().filter("div.blockUI").length}function f(e){if(a){var t=a[!0===e?a.length-1:0];t&&t.focus()}}function m(t,n){return parseInt(e.css(t,n),10)||0}}n(487).jQuery?(i=[n(71)],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):a(jQuery)}()},487:function(e,t){(function(t){e.exports=t}).call(this,{})},488:function(e,t){jQuery((function(e){var t=jQuery("form.give-form"),n=e(document);e.fn.toggleError=function(e){return this.toggleClass("error",e),this.toggleClass("valid",!e),this},Give.init(),n.on("change","#give_cc_address input.card_state, #give_cc_address select",(function(){var t=e(this),r=t.parents("form");if("card_state"!==t.attr("id")){r.find("#card_state").empty().append('<option value="1">'+Give.fn.getGlobalVar("general_loading")+"</option>").prop("disabled",!0);var i={action:"give_get_states",country:t.val(),field_name:"card_state"};e.ajax({type:"POST",data:i,url:Give.fn.getGlobalVar("ajaxurl"),xhrFields:{withCredentials:!0},success:function(t){var i="",o=t.states_label,a=r.find('input[name="card_state"], select[name="card_state"]'),u=r.find('input[name="card_city"]');void 0!==t.states_found&&!0===t.states_found?i=e(t.data):(i='<input type="text" id="card_state" name="card_state" class="cart-state give-input required" placeholder="'.concat(o,'" value="').concat(t.default_state,'" autocomplete="address-level4"/>'),i=e(i)),!1===r.hasClass("float-labels-enabled")?(void 0!==t.states_require&&!0===t.states_require?(i.attr("required","required").attr("aria-required","true").addClass("required"),a.closest("p").find("label .give-required-indicator").removeClass("give-hidden")):(i.removeAttr("required").removeAttr("aria-required").removeClass("required"),a.closest("p").find("label .give-required-indicator").addClass("give-hidden")),void 0!==t.city_require&&!0===t.city_require?(u.closest("p").find("label .give-required-indicator").removeClass("give-hidden").removeClass("required"),u.attr("required",!0)):(u.closest("p").find("label .give-required-indicator").addClass("give-hidden").addClass("required"),u.removeAttr("required"))):(void 0!==t.states_require&&!0===t.states_require?(i.attr("required","required").attr("aria-required","true").addClass("required"),a.closest("p").find(".give-fl-wrap").addClass("give-fl-is-required")):(i.removeAttr("required").removeAttr("aria-required").removeClass("required"),a.closest("p").find(".give-fl-wrap").removeClass("give-fl-is-required")),void 0!==t.city_require&&!0===t.city_require?(u.closest("p").find(".give-fl-wrap").addClass("give-fl-is-required"),u.attr("required",!0)):(u.closest("p").find(".give-fl-wrap").removeClass("give-fl-is-required"),u.removeAttr("required"))),a.closest("p").find("label .state-label-text").text(o),a.replaceWith(i),void 0!==t.show_field&&!0===t.show_field?(r.find("p#give-card-state-wrap").removeClass("give-hidden"),r.find("p#give-card-zip-wrap").addClass("form-row-last"),r.find("p#give-card-zip-wrap").removeClass("form-row-wide")):(r.find("p#give-card-state-wrap").addClass("give-hidden"),r.find("p#give-card-zip-wrap").addClass("form-row-wide"),r.find("p#give-card-zip-wrap").removeClass("form-row-last"));var s=!!t.zip_require;r.find("input#card_zip").toggleClass("required",s).attr("required",s).attr("aria-required",s),r.find('label[for="card_zip"] span.give-required-indicator').toggleClass("give-hidden",s),n.trigger("give_checkout_billing_address_updated",[t,r.attr("id")])}}).fail((function(e){window.console&&window.console.log&&console.log(e)}))}return!1})),n.on("give_gateway_loaded",(function(){Give.form.fn.field.formatCreditCard(t)})),n.on("submit","#give_payment_mode",(function(){if(!Give.form.fn.getGateway(e(this).closest("form")).length)return alert(Give.fn.getGlobalVar("no_gateway")),!1})),n.on("click",'#give-payment-mode-select input[name="payment-mode"]',(function(){var t,n=e(this).parents("form"),r=n.find("#give-payment-mode-select li"),i=n.find('li.give-gateway-option-selected input[name="payment-mode"]').val().trim();r.removeClass("give-gateway-option-selected"),r.prop("checked",!1),e(this).prop("checked",!0),e(this).parent().addClass("give-gateway-option-selected"),t=Give.form.fn.getGateway(n),n.attr("action",n.attr("action").replace("payment-mode="+i,"payment-mode="+t))})),n.on("focus",".give-donation-amount .give-text-input",(function(t){var n=e(this).parents("form");e(this).removeClass("invalid-amount");var r=n.find(".give-final-total-amount").attr("data-total"),i=Give.form.fn.getInfo("decimal_separator",n);e(this).attr("data-amount",Give.fn.unFormatCurrency(r,i)),e(this).parent(".give-donation-amount").addClass("give-custom-amount-focus-in"),n.find(".give-default-level, .give-radio-input").removeClass("give-default-level"),n.find(".give-btn-level-custom").addClass("give-default-level"),n.find(".give-radio-input").prop("checked",!1),n.find(".give-radio-input.give-radio-level-custom").prop("checked",!0),n.find(".give-select-level").prop("selected",!1),n.find(".give-select-level .give-donation-level-custom").prop("selected",!0)})),n.on("blur",".give-donation-amount .give-text-input",(function(t,n,r,i){var o=void 0!==n?n:e(this).closest("form"),a=e(this).attr("data-amount"),u=void 0!==r?r:e(this).val(),s=Give.form.fn.getInfo("decimal_separator",o),c=Give.form.fn.getMinimumAmount(o),l=Give.form.fn.getMaximumAmount(o),d=0===u?c:Give.fn.unFormatCurrency(u,s),f=Give.form.fn.formatAmount(d,o,{});if(i=void 0===i?Give.form.fn.getPriceID(o,!0):i,""===d||0===d){var m=e('.give-donation-levels-wrap [data-default="1"]',n);m.length&&(i=m.data("price-id"),u=d=Give.fn.unFormatCurrency(m.val(),s),f=Give.form.fn.formatAmount(d,o,{}))}if(Give.fn.setCache("amount_"+d,i,o),e(this).val(f),Give.form.fn.isValidDonationAmount(o))e(this).removeClass("give-invalid-amount"),o.find(".give-invalid-minimum, .give-invalid-maximum").slideUp(300,(function(){e(this).remove()})),Give.form.fn.disable(o,!1);else{e(this).addClass("give-invalid-amount"),Give.form.fn.disable(o,!0);var p=o.find(".give-invalid-minimum"),g=o.find(".give-invalid-maximum");0===p.length&&d<c?Give.notice.fn.renderNotice("bad_minimum",o):d>=c&&p.slideUp(300,(function(){e(this).remove()})),0===g.length&&d>l?Give.notice.fn.renderNotice("bad_maximum",o):d<=l&&g.slideUp(300,(function(){e(this).remove()}))}a!==d&&o.find(".give-final-total-amount").attr("data-total",d).text(Give.fn.formatCurrency(d,{symbol:Give.form.fn.getInfo("currency_symbol",o),position:Give.form.fn.getInfo("currency_position",o)},o)),-1!==i&&(e('input[name="give-price-id"]',o).val(i),o.find(".give-amount-hidden").val(Give.form.fn.formatAmount(d,o,{})),o.find(".give-default-level").removeClass("give-default-level"),Give.form.fn.autoSelectDonationLevel(o,i)),e(this).parent(".give-donation-amount").removeClass("give-custom-amount-focus-in"),e(document).trigger("give_donation_value_updated",[o,d,i])})),n.on("click touchend",".give-donation-level-btn",(function(t){t.preventDefault(),Give.form.fn.autoSetMultiLevel(e(this))})),n.on("click touchend",".give-radio-input-level",(function(t){Give.form.fn.autoSetMultiLevel(e(this))})),n.on("change",".give-select-level",(function(t){Give.form.fn.autoSetMultiLevel(e(this))})),n.on("click",".give_terms_links",(function(t){t.preventDefault();var n=e(this).closest("fieldset");return e("[class^=give_terms-]",n).slideToggle(),e("a.give_terms_links",n).toggle(),!1})),e('label[for^="give-radio-level"]').on("click",(function(t){var n=e(this).closest("form").find("#"+e(this).attr("for"));n.length&&(n.trigger("click"),t.preventDefault())}))})),jQuery(window).on("load",(function(){jQuery("body").on("keyup change focusout",".give-form .card-number, .give-form .card-cvc, .give-form .card-expiry",(function(e){var t=jQuery(this),n=t.parents("form.give-form"),r=t.attr("id"),i=n.find(".card-number"),o=n.find(".card-cvc"),a=n.find(".card-expiry"),u=jQuery.payment.cardType(i.val()),s=!1;switch(e.type){case"focusout":r.indexOf("card_number")>-1?(s=!jQuery.payment.validateCardNumber(i.val()),i.toggleError(s)):r.indexOf("card_cvc")>-1?(s=!jQuery.payment.validateCardCVC(o.val(),u),o.toggleError(s)):r.indexOf("card_expiry")>-1&&(s=!jQuery.payment.validateCardExpiry(a.payment("cardExpiryVal")),a.toggleError(s)),Give.form.fn.disable(t.parents("form"),s);break;default:if(t.hasClass("error")&&t.removeClass("error"),r.indexOf("card_number")>-1){var c=n.find(".card-type");null===u?(c.removeClass().addClass("off card-type"),t.removeClass("valid").addClass("error")):c.removeClass().addClass("card-type "+u)}else if(r.indexOf("card_expiry")>-1){var l=a.payment("cardExpiryVal");n.find(".card-expiry-month").val(l.month),n.find(".card-expiry-year").val(l.year)}}}))}))},53:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},71:function(e,t){e.exports=jQuery},846:function(e,t,n){"use strict";n.r(t);n(484),n(286),n(485),n(103),n(102),n(291);var r=n(86),i=n(31),o=(n(488),n(14)),a=n.n(o);function u(e,t){var n=jQuery(e).find("#give-payment-mode-select .give-loading-text"),r=jQuery(e).find("#give-amount").val(),i=jQuery(e).find('input[name="give-form-id"]').val(),o=jQuery(e).find('input[name="give-form-id-prefix"]').val();n.fadeIn(),1!=jQuery(e).data()["blockUI.isBlocked"]&&jQuery(e).find("#give_purchase_form_wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),new Promise((function(n){jQuery(document).trigger("Give:onPreGatewayLoad"),jQuery.post(Give.fn.getGlobalVar("ajaxurl")+"?payment-mode="+t,{action:"give_load_gateway",give_total:r,give_form_id:i,give_form_id_prefix:o,give_payment_mode:t,nonce:Give.form.fn.getNonce(e)},(function(t){return jQuery(e).find("#give_purchase_form_wrap").html(t),jQuery(".give-no-js").hide(),jQuery(e).find("#give-payment-mode-select .give-loading-text").fadeOut(),n(t)}))})).then((function(t){jQuery(document).trigger("give_gateway_loaded",[t,jQuery(e).attr("id")]),jQuery(e).unblock()}))}
36
  /*!
37
  * Give AJAX JS
38
  *
give.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
- * Version: 2.7.4
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
@@ -58,30 +58,30 @@ if ( ! defined( 'ABSPATH' ) ) {
58
  * @since 2.8.0 build in a service container
59
  * @since 1.0
60
  *
61
- * @property-read Give_API $api
62
- * @property-read Give_Async_Process $async_process
63
- * @property-read Give_Comment $comment
64
- * @property-read Give_DB_Donors $donors
65
- * @property-read Give_DB_Donor_Meta $donor_meta
66
- * @property-read Give_Emails $emails
67
- * @property-read Give_Email_Template_Tags $email_tags
68
- * @property-read Give_DB_Form_Meta $form_meta
69
- * @property-read Give_Admin_Settings $give_settings
70
- * @property-read Give_HTML_Elements $html
71
- * @property-read Give_Logging $logs
72
- * @property-read Give_DB_Logs $log_db
73
- * @property-read Give_DB_Log_Meta $logmeta_db
74
- * @property-read Give_Notices $notices
75
- * @property-read Give_DB_Payment_Meta $payment_meta
76
- * @property-read Give_Roles $roles
77
- * @property-read FormRoute $routeForm
78
- * @property-read Templates $templates
79
- * @property-read Give_Scripts $scripts
80
- * @property-read Give_DB_Sequential_Ordering $sequential_donation_db
81
  * @property-read Give_Sequential_Donation_Number $seq_donation_number
82
- * @property-read Give_Session $session
83
- * @property-read Give_DB_Sessions $session_db
84
- * @property-read Give_Tooltips $tooltips
85
  *
86
  * @mixin Container
87
  */
@@ -133,6 +133,13 @@ final class Give {
133
  RestAPI::class,
134
  ];
135
 
 
 
 
 
 
 
 
136
  /**
137
  * Give constructor.
138
  *
@@ -162,12 +169,14 @@ final class Give {
162
  return;
163
  }
164
 
 
 
165
  // Add compatibility notice for recurring and stripe support with Give 2.5.0.
166
  add_action( 'admin_notices', [ $this, 'display_old_recurring_compatibility_notice' ] );
167
 
168
  add_action( 'plugins_loaded', [ $this, 'init' ], 0 );
169
 
170
- $this->setup_constants();
171
 
172
  do_action( 'give_loaded' );
173
  }
@@ -230,7 +239,7 @@ final class Give {
230
  private function setup_constants() {
231
  // Plugin version.
232
  if ( ! defined( 'GIVE_VERSION' ) ) {
233
- define( 'GIVE_VERSION', '2.7.4' );
234
  }
235
 
236
  // Plugin Root File.
@@ -365,12 +374,21 @@ final class Give {
365
  }
366
  }
367
 
 
 
 
 
 
368
  /**
369
  * Load all the service providers to bootstrap the various parts of the application.
370
  *
371
  * @since 2.8.0
372
  */
373
  private function loadServiceProviders() {
 
 
 
 
374
  $providers = [];
375
 
376
  foreach ( $this->serviceProviders as $serviceProvider ) {
@@ -389,6 +407,8 @@ final class Give {
389
  foreach ( $providers as $serviceProvider ) {
390
  $serviceProvider->boot();
391
  }
 
 
392
  }
393
 
394
  /**
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
+ * Version: 2.7.5
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
58
  * @since 2.8.0 build in a service container
59
  * @since 1.0
60
  *
61
+ * @property-read Give_API $api
62
+ * @property-read Give_Async_Process $async_process
63
+ * @property-read Give_Comment $comment
64
+ * @property-read Give_DB_Donors $donors
65
+ * @property-read Give_DB_Donor_Meta $donor_meta
66
+ * @property-read Give_Emails $emails
67
+ * @property-read Give_Email_Template_Tags $email_tags
68
+ * @property-read Give_DB_Form_Meta $form_meta
69
+ * @property-read Give_Admin_Settings $give_settings
70
+ * @property-read Give_HTML_Elements $html
71
+ * @property-read Give_Logging $logs
72
+ * @property-read Give_DB_Logs $log_db
73
+ * @property-read Give_DB_Log_Meta $logmeta_db
74
+ * @property-read Give_Notices $notices
75
+ * @property-read Give_DB_Payment_Meta $payment_meta
76
+ * @property-read Give_Roles $roles
77
+ * @property-read FormRoute $routeForm
78
+ * @property-read Templates $templates
79
+ * @property-read Give_Scripts $scripts
80
+ * @property-read Give_DB_Sequential_Ordering $sequential_donation_db
81
  * @property-read Give_Sequential_Donation_Number $seq_donation_number
82
+ * @property-read Give_Session $session
83
+ * @property-read Give_DB_Sessions $session_db
84
+ * @property-read Give_Tooltips $tooltips
85
  *
86
  * @mixin Container
87
  */
133
  RestAPI::class,
134
  ];
135
 
136
+ /**
137
+ * @since 2.8.0
138
+ *
139
+ * @var bool Make sure the providers are loaded only once
140
+ */
141
+ private $providersLoaded = false;
142
+
143
  /**
144
  * Give constructor.
145
  *
169
  return;
170
  }
171
 
172
+ $this->setup_constants();
173
+
174
  // Add compatibility notice for recurring and stripe support with Give 2.5.0.
175
  add_action( 'admin_notices', [ $this, 'display_old_recurring_compatibility_notice' ] );
176
 
177
  add_action( 'plugins_loaded', [ $this, 'init' ], 0 );
178
 
179
+ register_activation_hook( GIVE_PLUGIN_FILE, [ $this, 'install' ] );
180
 
181
  do_action( 'give_loaded' );
182
  }
239
  private function setup_constants() {
240
  // Plugin version.
241
  if ( ! defined( 'GIVE_VERSION' ) ) {
242
+ define( 'GIVE_VERSION', '2.7.5' );
243
  }
244
 
245
  // Plugin Root File.
374
  }
375
  }
376
 
377
+ public function install() {
378
+ $this->loadServiceProviders();
379
+ give_install();
380
+ }
381
+
382
  /**
383
  * Load all the service providers to bootstrap the various parts of the application.
384
  *
385
  * @since 2.8.0
386
  */
387
  private function loadServiceProviders() {
388
+ if ( $this->providersLoaded ) {
389
+ return;
390
+ }
391
+
392
  $providers = [];
393
 
394
  foreach ( $this->serviceProviders as $serviceProvider ) {
407
  foreach ( $providers as $serviceProvider ) {
408
  $serviceProvider->boot();
409
  }
410
+
411
+ $this->providersLoaded = true;
412
  }
413
 
414
  /**
includes/admin/class-admin-settings.php CHANGED
@@ -34,7 +34,7 @@ if ( ! class_exists( 'Give_Admin_Settings' ) ) :
34
  * Setting filter and action prefix.
35
  *
36
  * @since 1.8
37
- * @var string setting fileter and action anme prefix.
38
  */
39
  private static $setting_filter_prefix = '';
40
 
@@ -902,8 +902,8 @@ if ( ! class_exists( 'Give_Admin_Settings' ) ) :
902
 
903
  // Add dynamically added values to options
904
  // we can add option dynamically to chosen select field. For example: "Title Prefixes"
905
- if ( $allow_new_values && $option_value && ( $missing_options = array_diff( $option_value, array_keys( $choices ) ) ) ) {
906
- $choices = array_merge( $value['options'], array_combine( $missing_options, $missing_options ) );
907
  }
908
  ?>
909
  <tr valign="top" <?php echo $wrapper_class; ?>>
34
  * Setting filter and action prefix.
35
  *
36
  * @since 1.8
37
+ * @var string setting filter and action name prefix.
38
  */
39
  private static $setting_filter_prefix = '';
40
 
902
 
903
  // Add dynamically added values to options
904
  // we can add option dynamically to chosen select field. For example: "Title Prefixes"
905
+ if ( $allow_new_values && $option_value ) {
906
+ $choices = array_merge( array_combine( $option_value, $option_value ), $value['options'] );
907
  }
908
  ?>
909
  <tr valign="top" <?php echo $wrapper_class; ?>>
includes/admin/give-metabox-functions.php CHANGED
@@ -341,8 +341,8 @@ function give_chosen_input( $field ) {
341
  $fieldName .= '[]';
342
  }
343
 
344
- if ( $allow_new_values && $field['value'] && ( $missing = array_diff( $field['value'], array_keys( $choices ) ) ) ) {
345
- $choices = array_merge( $choices, array_combine( $missing, $missing ) );
346
  }
347
  ?>
348
  <p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
341
  $fieldName .= '[]';
342
  }
343
 
344
+ if ( $allow_new_values && $field['value'] ) {
345
+ $choices = array_merge( array_combine( $field['value'], $field['value'] ), $choices );
346
  }
347
  ?>
348
  <p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
includes/ajax-functions.php CHANGED
@@ -265,6 +265,7 @@ function give_ajax_get_states_field() {
265
  'data' => $data,
266
  'default_state' => $default_state,
267
  'city_require' => ! array_key_exists( $country, give_city_not_required_country_list() ),
 
268
  );
269
  wp_send_json( $response );
270
  }
265
  'data' => $data,
266
  'default_state' => $default_state,
267
  'city_require' => ! array_key_exists( $country, give_city_not_required_country_list() ),
268
+ 'zip_require' => ! array_key_exists( $country, give_get_country_list_without_postcodes() ),
269
  );
270
  wp_send_json( $response );
271
  }
includes/class-give-session.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Session
4
  *
5
- * @package Give
6
  * @subpackage Classes/Give_Session
7
  * @copyright Copyright (c) 2016, GiveWP
8
  * @license https://opensource.org/licenses/gpl-license GNU Public License
9
- * @since 1.0
10
  */
11
 
12
  // Exit if accessed directly.
@@ -226,6 +226,8 @@ class Give_Session {
226
  return $session;
227
  }
228
 
 
 
229
  // Validate hash.
230
  $to_hash = $donor_id . '|' . $session_expiration;
231
  $hash = hash_hmac( 'md5', $to_hash, wp_hash( $to_hash ) );
@@ -323,7 +325,7 @@ class Give_Session {
323
  * @since 1.0
324
  * @access public
325
  *
326
- * @param string $key Session key.
327
  * @param mixed $default default value.
328
  *
329
  * @return string|array Session variable.
@@ -340,8 +342,8 @@ class Give_Session {
340
  * @since 1.0
341
  * @access public
342
  *
343
- * @param string $key Session key.
344
- * @param mixed $value Session variable.
345
  *
346
  * @return string Session variable.
347
  */
@@ -433,9 +435,10 @@ class Give_Session {
433
  /**
434
  * Setup donor session when authorized by WP user credentials
435
  *
436
- * @param string $wpUserLogin
437
- * @param WP_User $wpUser
438
  * @since 2.7.0
 
 
 
439
  */
440
  public function startSessionWhenLoginAsWPUser( $wpUserLogin, $wpUser ) {
441
  $donor = Give()->donors->get_donor_by( 'user_id', $wpUser->ID );
@@ -586,10 +589,10 @@ class Give_Session {
586
  * Retrieve session ID.
587
  *
588
  * @since 1.0
 
589
  * @deprecated 2.2.0
590
  * @access public
591
  *
592
- * @return string Session ID.
593
  */
594
  public function get_id() {
595
  return $this->get_cookie_name( 'session' );
@@ -602,10 +605,10 @@ class Give_Session {
602
  * (set_expiration_variant_time used in WP_Session).
603
  *
604
  * @since 1.0
 
605
  * @deprecated 2.2.0
606
  * @access public
607
  *
608
- * @return int
609
  */
610
  public function set_expiration_variant_time() {
611
 
@@ -619,9 +622,9 @@ class Give_Session {
619
  *
620
  * @since 1.0
621
  * @access public
 
622
  * @deprecated 2.2.0
623
  *
624
- * @return bool $ret True if we are using PHP sessions, false otherwise.
625
  */
626
  public function use_php_sessions() {
627
  $ret = false;
@@ -638,9 +641,9 @@ class Give_Session {
638
  *
639
  * @since 1.4
640
  * @access public
 
641
  * @deprecated 2.2.0
642
  *
643
- * @return bool
644
  */
645
  public function should_start_session() {
646
 
2
  /**
3
  * Session
4
  *
5
+ * @since 1.0
6
  * @subpackage Classes/Give_Session
7
  * @copyright Copyright (c) 2016, GiveWP
8
  * @license https://opensource.org/licenses/gpl-license GNU Public License
9
+ * @package Give
10
  */
11
 
12
  // Exit if accessed directly.
226
  return $session;
227
  }
228
 
229
+ require_once ABSPATH . WPINC . '/pluggable.php';
230
+
231
  // Validate hash.
232
  $to_hash = $donor_id . '|' . $session_expiration;
233
  $hash = hash_hmac( 'md5', $to_hash, wp_hash( $to_hash ) );
325
  * @since 1.0
326
  * @access public
327
  *
328
+ * @param string $key Session key.
329
  * @param mixed $default default value.
330
  *
331
  * @return string|array Session variable.
342
  * @since 1.0
343
  * @access public
344
  *
345
+ * @param string $key Session key.
346
+ * @param mixed $value Session variable.
347
  *
348
  * @return string Session variable.
349
  */
435
  /**
436
  * Setup donor session when authorized by WP user credentials
437
  *
 
 
438
  * @since 2.7.0
439
+ *
440
+ * @param WP_User $wpUser
441
+ * @param string $wpUserLogin
442
  */
443
  public function startSessionWhenLoginAsWPUser( $wpUserLogin, $wpUser ) {
444
  $donor = Give()->donors->get_donor_by( 'user_id', $wpUser->ID );
589
  * Retrieve session ID.
590
  *
591
  * @since 1.0
592
+ * @return string Session ID.
593
  * @deprecated 2.2.0
594
  * @access public
595
  *
 
596
  */
597
  public function get_id() {
598
  return $this->get_cookie_name( 'session' );
605
  * (set_expiration_variant_time used in WP_Session).
606
  *
607
  * @since 1.0
608
+ * @return int
609
  * @deprecated 2.2.0
610
  * @access public
611
  *
 
612
  */
613
  public function set_expiration_variant_time() {
614
 
622
  *
623
  * @since 1.0
624
  * @access public
625
+ * @return bool $ret True if we are using PHP sessions, false otherwise.
626
  * @deprecated 2.2.0
627
  *
 
628
  */
629
  public function use_php_sessions() {
630
  $ret = false;
641
  *
642
  * @since 1.4
643
  * @access public
644
+ * @return bool
645
  * @deprecated 2.2.0
646
  *
 
647
  */
648
  public function should_start_session() {
649
 
includes/country-functions.php CHANGED
@@ -2363,3 +2363,86 @@ function give_get_spain_states_list() {
2363
 
2364
  return apply_filters( 'give_spain_states', $states );
2365
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2363
 
2364
  return apply_filters( 'give_spain_states', $states );
2365
  }
2366
+
2367
+ /**
2368
+ * Get Country List without postcodes
2369
+ *
2370
+ * @since 2.8.0
2371
+ * @return array $countries A list of countries without postcodes.
2372
+ */
2373
+ function give_get_country_list_without_postcodes() {
2374
+ $countries = [
2375
+ 'AO' => esc_html__( 'Angola', 'give' ),
2376
+ 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ),
2377
+ 'AW' => esc_html__( 'Aruba', 'give' ),
2378
+ 'BS' => esc_html__( 'Bahamas', 'give' ),
2379
+ 'BZ' => esc_html__( 'Belize', 'give' ),
2380
+ 'BJ' => esc_html__( 'Benin', 'give' ),
2381
+ 'BW' => esc_html__( 'Botswana', 'give' ),
2382
+ 'BF' => esc_html__( 'Burkina Faso', 'give' ),
2383
+ 'BI' => esc_html__( 'Burundi', 'give' ),
2384
+ 'CM' => esc_html__( 'Cameroon', 'give' ),
2385
+ 'CF' => esc_html__( 'Central African Republic', 'give' ),
2386
+ 'KM' => esc_html__( 'Comoros', 'give' ),
2387
+ 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ),
2388
+ 'CG' => esc_html__( 'Congo, Republic of', 'give' ),
2389
+ 'CK' => esc_html__( 'Cook Islands', 'give' ),
2390
+ 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
2391
+ 'DJ' => esc_html__( 'Djibouti', 'give' ),
2392
+ 'DM' => esc_html__( 'Dominica', 'give' ),
2393
+ 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ),
2394
+ 'ER' => esc_html__( 'Eritrea', 'give' ),
2395
+ 'FJ' => esc_html__( 'Fiji', 'give' ),
2396
+ 'TF' => esc_html__( 'French Southern Territories', 'give' ),
2397
+ 'GM' => esc_html__( 'Gambia', 'give' ),
2398
+ 'GH' => esc_html__( 'Ghana', 'give' ),
2399
+ 'GD' => esc_html__( 'Grenada', 'give' ),
2400
+ 'GN' => esc_html__( 'Guinea', 'give' ),
2401
+ 'GY' => esc_html__( 'Guyana', 'give' ),
2402
+ 'HK' => esc_html__( 'Hong Kong', 'give' ),
2403
+ 'IE' => esc_html__( 'Ireland', 'give' ),
2404
+ 'JM' => esc_html__( 'Jamaica', 'give' ),
2405
+ 'KE' => esc_html__( 'Kenya', 'give' ),
2406
+ 'KI' => esc_html__( 'Kiribati', 'give' ),
2407
+ 'MO' => esc_html__( 'Macau', 'give' ),
2408
+ 'MW' => esc_html__( 'Malawi', 'give' ),
2409
+ 'ML' => esc_html__( 'Mali', 'give' ),
2410
+ 'MR' => esc_html__( 'Mauritania', 'give' ),
2411
+ 'MU' => esc_html__( 'Mauritius', 'give' ),
2412
+ 'MS' => esc_html__( 'Montserrat', 'give' ),
2413
+ 'NR' => esc_html__( 'Nauru', 'give' ),
2414
+ 'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
2415
+ 'NU' => esc_html__( 'Niue', 'give' ),
2416
+ 'KP' => esc_html__( 'North Korea', 'give' ),
2417
+ 'PA' => esc_html__( 'Panama', 'give' ),
2418
+ 'QA' => esc_html__( 'Qatar', 'give' ),
2419
+ 'RW' => esc_html__( 'Rwanda', 'give' ),
2420
+ 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ),
2421
+ 'LC' => esc_html__( 'Saint Lucia', 'give' ),
2422
+ 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ),
2423
+ 'SC' => esc_html__( 'Seychelles', 'give' ),
2424
+ 'SL' => esc_html__( 'Sierra Leone', 'give' ),
2425
+ 'SB' => esc_html__( 'Solomon Islands', 'give' ),
2426
+ 'SO' => esc_html__( 'Somalia', 'give' ),
2427
+ 'ZA' => esc_html__( 'South Africa', 'give' ),
2428
+ 'SR' => esc_html__( 'Suriname', 'give' ),
2429
+ 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
2430
+ 'TZ' => esc_html__( 'Tanzania', 'give' ),
2431
+ 'TK' => esc_html__( 'Tokelau', 'give' ),
2432
+ 'TO' => esc_html__( 'Tonga', 'give' ),
2433
+ 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ),
2434
+ 'TV' => esc_html__( 'Tuvalu', 'give' ),
2435
+ 'UG' => esc_html__( 'Uganda', 'give' ),
2436
+ 'AE' => esc_html__( 'United Arab Emirates', 'give' ),
2437
+ 'VU' => esc_html__( 'Vanuatu', 'give' ),
2438
+ 'YE' => esc_html__( 'Yemen', 'give' ),
2439
+ 'ZW' => esc_html__( 'Zimbabwe', 'give' ),
2440
+ ];
2441
+
2442
+ /**
2443
+ * Filter list of countries without postcodes
2444
+ *
2445
+ * @since 2.8.0
2446
+ */
2447
+ return (array) apply_filters( 'give_countries_without_postcodes', $countries );
2448
+ }
includes/forms/template.php CHANGED
@@ -103,7 +103,7 @@ function give_get_donation_form( $args = array() ) {
103
  $form_title = ! is_singular( 'give_forms' ) ? apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form->ID ) . '</h2>' ) : '';
104
 
105
  // Get Goal thank you message.
106
- $goal_achieved_message = get_post_meta( $form->ID, '_give_form_goal_achieved_message', true );
107
  $goal_achieved_message = ! empty( $goal_achieved_message ) ? $form_title . apply_filters( 'the_content', $goal_achieved_message ) : '';
108
 
109
  // Print thank you message.
@@ -1253,7 +1253,10 @@ function give_default_cc_address_fields( $form_id ) {
1253
  $require_state = ! array_key_exists( $selected_country, $no_states_country ) && give_field_is_required( 'card_state', $form_id );
1254
  // Used to determine is state input should be marked as required.
1255
  $validate_state = ! array_key_exists( $selected_country, $states_not_required_country_list ) && give_field_is_required( 'card_state', $form_id );
1256
-
 
 
 
1257
  ?>
1258
  <p id="give-card-state-wrap"
1259
  class="form-row form-row-first form-row-responsive <?php echo ( ! empty( $selected_country ) && ! $require_state ) ? 'give-hidden' : ''; ?> ">
@@ -1291,9 +1294,7 @@ function give_default_cc_address_fields( $form_id ) {
1291
  <p id="give-card-zip-wrap" class="form-row <?php echo $require_state ? 'form-row-last' : ''; ?> form-row-responsive">
1292
  <label for="card_zip" class="give-label">
1293
  <?php _e( 'Zip / Postal Code', 'give' ); ?>
1294
- <?php if ( give_field_is_required( 'card_zip', $form_id ) ) : ?>
1295
- <span class="give-required-indicator">*</span>
1296
- <?php endif; ?>
1297
  <?php echo Give()->tooltips->render_help( __( 'The zip or postal code for your billing address.', 'give' ) ); ?>
1298
  </label>
1299
 
@@ -1303,10 +1304,10 @@ function give_default_cc_address_fields( $form_id ) {
1303
  id="card_zip"
1304
  name="card_zip"
1305
  autocomplete="postal-code"
1306
- class="card-zip give-input<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required' : '' ); ?>"
1307
  placeholder="<?php _e( 'Zip / Postal Code', 'give' ); ?>"
1308
  value="<?php echo isset( $give_user_info['card_zip'] ) ? $give_user_info['card_zip'] : ''; ?>"
1309
- <?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
1310
  />
1311
  </p>
1312
  <?php
103
  $form_title = ! is_singular( 'give_forms' ) ? apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form->ID ) . '</h2>' ) : '';
104
 
105
  // Get Goal thank you message.
106
+ $goal_achieved_message = give_get_meta( $form->ID, '_give_form_goal_achieved_message', true );
107
  $goal_achieved_message = ! empty( $goal_achieved_message ) ? $form_title . apply_filters( 'the_content', $goal_achieved_message ) : '';
108
 
109
  // Print thank you message.
1253
  $require_state = ! array_key_exists( $selected_country, $no_states_country ) && give_field_is_required( 'card_state', $form_id );
1254
  // Used to determine is state input should be marked as required.
1255
  $validate_state = ! array_key_exists( $selected_country, $states_not_required_country_list ) && give_field_is_required( 'card_state', $form_id );
1256
+ // Check if post code is required
1257
+ $postcode_required = $selected_country
1258
+ ? ! array_key_exists( $selected_country, give_get_country_list_without_postcodes() ) && give_field_is_required( 'card_zip', $form_id )
1259
+ : give_field_is_required( 'card_zip', $form_id );
1260
  ?>
1261
  <p id="give-card-state-wrap"
1262
  class="form-row form-row-first form-row-responsive <?php echo ( ! empty( $selected_country ) && ! $require_state ) ? 'give-hidden' : ''; ?> ">
1294
  <p id="give-card-zip-wrap" class="form-row <?php echo $require_state ? 'form-row-last' : ''; ?> form-row-responsive">
1295
  <label for="card_zip" class="give-label">
1296
  <?php _e( 'Zip / Postal Code', 'give' ); ?>
1297
+ <span class="give-required-indicator<?php echo ( $postcode_required ? '' : ' give-hidden' ); ?>">*</span>
 
 
1298
  <?php echo Give()->tooltips->render_help( __( 'The zip or postal code for your billing address.', 'give' ) ); ?>
1299
  </label>
1300
 
1304
  id="card_zip"
1305
  name="card_zip"
1306
  autocomplete="postal-code"
1307
+ class="card-zip give-input<?php echo( $postcode_required ? ' required' : '' ); ?>"
1308
  placeholder="<?php _e( 'Zip / Postal Code', 'give' ); ?>"
1309
  value="<?php echo isset( $give_user_info['card_zip'] ) ? $give_user_info['card_zip'] : ''; ?>"
1310
+ <?php echo( $postcode_required ? ' required aria-required="true" ' : '' ); ?>
1311
  />
1312
  </p>
1313
  <?php
includes/payments/class-payments-query.php CHANGED
@@ -33,7 +33,7 @@ class Give_Payments_Query extends Give_Stats {
33
  *
34
  * @var array
35
  */
36
- public $_args = array();
37
 
38
  /**
39
  * The args to pass to the give_get_payments() query
@@ -43,7 +43,7 @@ class Give_Payments_Query extends Give_Stats {
43
  *
44
  * @var array
45
  */
46
- public $args = array();
47
 
48
  /**
49
  * The payments found based on the criteria set
@@ -53,7 +53,7 @@ class Give_Payments_Query extends Give_Stats {
53
  *
54
  * @var array
55
  */
56
- public $payments = array();
57
 
58
  /**
59
  * Default query arguments.
@@ -66,10 +66,10 @@ class Give_Payments_Query extends Give_Stats {
66
  *
67
  * @param $args array The array of arguments that can be passed in and used for setting up this payment query.
68
  */
69
- public function __construct( $args = array() ) {
70
- $defaults = array(
71
  'output' => 'payments',
72
- 'post_type' => array( 'give_payment' ),
73
  'start_date' => false,
74
  'end_date' => false,
75
  'number' => 20,
@@ -94,7 +94,7 @@ class Give_Payments_Query extends Give_Stats {
94
  // Currently these params only works with get_payment_by_group
95
  'group_by' => '',
96
  'count' => false,
97
- );
98
 
99
  // We do not want WordPress to handle meta cache because WordPress stores in under `post_meta` key and cache object while we want it under `donation_meta`.
100
  // Similar for term cache
@@ -115,7 +115,7 @@ class Give_Payments_Query extends Give_Stats {
115
  * @param $value
116
  */
117
  public function __set( $query_var, $value ) {
118
- if ( in_array( $query_var, array( 'meta_query', 'tax_query' ) ) ) {
119
  $this->args[ $query_var ][] = $value;
120
  } else {
121
  $this->args[ $query_var ] = $value;
@@ -158,7 +158,7 @@ class Give_Payments_Query extends Give_Stats {
158
  $this->args = $this->_args;
159
 
160
  // Whitelist order.
161
- $this->args['order'] = in_array( strtoupper( $this->args['order'] ), array( 'ASC', 'DESC' ) ) ? $this->args['order'] : 'DESC';
162
 
163
  $this->date_filter_pre();
164
  $this->orderby();
@@ -174,7 +174,7 @@ class Give_Payments_Query extends Give_Stats {
174
  $this->give_forms();
175
  $this->gateway_filter();
176
 
177
- add_filter( 'posts_orderby', array( $this, 'custom_orderby' ), 10, 2 );
178
 
179
  /**
180
  * Fires after setup filters.
@@ -193,7 +193,7 @@ class Give_Payments_Query extends Give_Stats {
193
  * @access private
194
  */
195
  private function unset_filters() {
196
- remove_filter( 'posts_orderby', array( $this, 'custom_orderby' ) );
197
 
198
  /**
199
  * Fires after retrieving payments.
@@ -221,8 +221,8 @@ class Give_Payments_Query extends Give_Stats {
221
  public function get_payments() {
222
  global $post;
223
 
224
- $results = array();
225
- $this->payments = array();
226
  $cache_key = Give_Cache::get_key( 'give_payment_query', $this->args, false );
227
  $this->payments = Give_Cache::get_db_query( $cache_key );
228
 
@@ -237,10 +237,10 @@ class Give_Payments_Query extends Give_Stats {
237
  /* @var WP_Query $query */
238
  $query = new WP_Query( $this->args );
239
 
240
- $custom_output = array(
241
  'payments',
242
  'give_payments',
243
- );
244
 
245
  if ( $query->have_posts() ) {
246
 
@@ -299,8 +299,8 @@ class Give_Payments_Query extends Give_Stats {
299
  public function get_payment_by_group() {
300
  global $wpdb;
301
 
302
- $allowed_groups = array( 'post_status' );
303
- $result = array();
304
 
305
  if ( in_array( $this->args['group_by'], $allowed_groups ) ) {
306
  // Set only count in result.
@@ -364,7 +364,7 @@ class Give_Payments_Query extends Give_Stats {
364
  $is_end_date = property_exists( __CLASS__, 'end_date' );
365
 
366
  if ( $is_start_date || $is_end_date ) {
367
- $date_query = array();
368
 
369
  if ( $is_start_date && ! is_wp_error( $this->start_date ) ) {
370
  $date_query['after'] = date( 'Y-m-d H:i:s', $this->start_date );
@@ -501,7 +501,7 @@ class Give_Payments_Query extends Give_Stats {
501
  public function custom_orderby( $order, $query ) {
502
 
503
  if ( ! empty( $query->query['post_type'] ) ) {
504
- $post_types = is_array( $query->query['post_type'] ) ? $query->query['post_type'] : array( $query->query['post_type'] );
505
 
506
  if ( ! in_array( 'give_payment', $post_types ) || ! isset( $query->query['orderby'] ) || is_array( $query->query['orderby'] ) ) {
507
  return $order;
@@ -531,21 +531,21 @@ class Give_Payments_Query extends Give_Stats {
531
  return;
532
  }
533
 
534
- $args = array();
535
 
536
  if ( is_numeric( $this->args['user'] ) ) {
537
  // Backward compatibility: user donor param to get payment attached to donor instead of user
538
  $donor_id = Give()->donors->get_column_by( 'id', 'user_id', $this->args['user'] );
539
 
540
- $args = array(
541
  'key' => '_give_payment_donor_id',
542
  'value' => $donor_id ?: -1,
543
- );
544
  } elseif ( is_email( $this->args['user'] ) ) {
545
- $args = array(
546
  'key' => '_give_payment_donor_email',
547
  'value' => $this->args['user'],
548
- );
549
  }
550
 
551
  $this->__set( 'meta_query', $args );
@@ -567,10 +567,10 @@ class Give_Payments_Query extends Give_Stats {
567
 
568
  $this->__set(
569
  'meta_query',
570
- array(
571
  'key' => "_give_payment_{$donor_meta_type}_id",
572
  'value' => (int) $this->args['donor'],
573
- )
574
  );
575
  }
576
 
@@ -613,21 +613,21 @@ class Give_Payments_Query extends Give_Stats {
613
  } elseif ( $is_email || strlen( $search ) == 32 ) {
614
 
615
  $key = $is_email ? '_give_payment_donor_email' : '_give_payment_purchase_key';
616
- $search_meta = array(
617
  'key' => $key,
618
  'value' => $search,
619
  'compare' => 'LIKE',
620
- );
621
 
622
  $this->__set( 'meta_query', $search_meta );
623
  $this->__unset( 's' );
624
 
625
  } elseif ( $is_user ) {
626
 
627
- $search_meta = array(
628
  'key' => '_give_payment_donor_id',
629
  'value' => trim( str_replace( 'user:', '', strtolower( $search ) ) ),
630
- );
631
 
632
  $this->__set( 'meta_query', $search_meta );
633
 
@@ -639,7 +639,7 @@ class Give_Payments_Query extends Give_Stats {
639
 
640
  if ( is_object( $post ) && $post->post_type == 'give_payment' ) {
641
 
642
- $arr = array();
643
  $arr[] = $search;
644
  $this->__set( 'post__in', $arr );
645
  $this->__unset( 's' );
@@ -655,33 +655,33 @@ class Give_Payments_Query extends Give_Stats {
655
  $search_parts = preg_split( '/\s+/', $search );
656
 
657
  if ( is_array( $search_parts ) && 2 === count( $search_parts ) ) {
658
- $search_meta = array(
659
  'relation' => 'AND',
660
- array(
661
  'key' => '_give_donor_billing_first_name',
662
  'value' => $search_parts[0],
663
- 'compare' => '=',
664
- ),
665
- array(
666
  'key' => '_give_donor_billing_last_name',
667
  'value' => $search_parts[1],
668
- 'compare' => '=',
669
- ),
670
- );
671
  } else {
672
- $search_meta = array(
673
  'relation' => 'OR',
674
- array(
675
  'key' => '_give_donor_billing_first_name',
676
  'value' => $search,
677
  'compare' => 'LIKE',
678
- ),
679
- array(
680
  'key' => '_give_donor_billing_last_name',
681
  'value' => $search,
682
  'compare' => 'LIKE',
683
- ),
684
- );
685
  }
686
 
687
  $this->__set( 'meta_query', $search_meta );
@@ -712,10 +712,10 @@ class Give_Payments_Query extends Give_Stats {
712
 
713
  $this->__set(
714
  'meta_query',
715
- array(
716
  'key' => '_give_payment_mode',
717
  'value' => $this->args['mode'],
718
- )
719
  );
720
  }
721
 
@@ -756,11 +756,11 @@ class Give_Payments_Query extends Give_Stats {
756
 
757
  $this->__set(
758
  'meta_query',
759
- array(
760
  'key' => '_give_payment_form_id',
761
  'value' => $this->args['give_forms'],
762
  'compare' => $compare,
763
- )
764
  );
765
 
766
  $this->__unset( 'give_forms' );
@@ -789,11 +789,11 @@ class Give_Payments_Query extends Give_Stats {
789
 
790
  $this->__set(
791
  'meta_query',
792
- array(
793
  'key' => '_give_payment_gateway',
794
  'value' => $this->args['gateway'],
795
  'compare' => $compare,
796
- )
797
  );
798
 
799
  $this->__unset( 'gateway' );
@@ -815,7 +815,7 @@ class Give_Payments_Query extends Give_Stats {
815
  private function get_sql() {
816
  global $wpdb;
817
 
818
- $allowed_keys = array(
819
  'post_name',
820
  'post_author',
821
  'post_date',
@@ -826,7 +826,7 @@ class Give_Payments_Query extends Give_Stats {
826
  'post_type',
827
  'menu_order',
828
  'comment_count',
829
- );
830
 
831
  $this->args['orderby'] = 'post_parent__in';
832
 
@@ -883,16 +883,16 @@ class Give_Payments_Query extends Give_Stats {
883
  if ( ! empty( $this->args['date_query'] ) ) {
884
  $date_query_obj = new WP_Date_Query( $this->args['date_query'] );
885
  $where .= str_replace(
886
- array(
887
  "\n",
888
  '( (',
889
  '))',
890
- ),
891
- array(
892
  '',
893
  '( (',
894
  ') )',
895
- ),
896
  $date_query_obj->get_sql()
897
  );
898
  }
33
  *
34
  * @var array
35
  */
36
+ public $_args = [];
37
 
38
  /**
39
  * The args to pass to the give_get_payments() query
43
  *
44
  * @var array
45
  */
46
+ public $args = [];
47
 
48
  /**
49
  * The payments found based on the criteria set
53
  *
54
  * @var array
55
  */
56
+ public $payments = [];
57
 
58
  /**
59
  * Default query arguments.
66
  *
67
  * @param $args array The array of arguments that can be passed in and used for setting up this payment query.
68
  */
69
+ public function __construct( $args = [] ) {
70
+ $defaults = [
71
  'output' => 'payments',
72
+ 'post_type' => [ 'give_payment' ],
73
  'start_date' => false,
74
  'end_date' => false,
75
  'number' => 20,
94
  // Currently these params only works with get_payment_by_group
95
  'group_by' => '',
96
  'count' => false,
97
+ ];
98
 
99
  // We do not want WordPress to handle meta cache because WordPress stores in under `post_meta` key and cache object while we want it under `donation_meta`.
100
  // Similar for term cache
115
  * @param $value
116
  */
117
  public function __set( $query_var, $value ) {
118
+ if ( in_array( $query_var, [ 'meta_query', 'tax_query' ] ) ) {
119
  $this->args[ $query_var ][] = $value;
120
  } else {
121
  $this->args[ $query_var ] = $value;
158
  $this->args = $this->_args;
159
 
160
  // Whitelist order.
161
+ $this->args['order'] = in_array( strtoupper( $this->args['order'] ), [ 'ASC', 'DESC' ] ) ? $this->args['order'] : 'DESC';
162
 
163
  $this->date_filter_pre();
164
  $this->orderby();
174
  $this->give_forms();
175
  $this->gateway_filter();
176
 
177
+ add_filter( 'posts_orderby', [ $this, 'custom_orderby' ], 10, 2 );
178
 
179
  /**
180
  * Fires after setup filters.
193
  * @access private
194
  */
195
  private function unset_filters() {
196
+ remove_filter( 'posts_orderby', [ $this, 'custom_orderby' ] );
197
 
198
  /**
199
  * Fires after retrieving payments.
221
  public function get_payments() {
222
  global $post;
223
 
224
+ $results = [];
225
+ $this->payments = [];
226
  $cache_key = Give_Cache::get_key( 'give_payment_query', $this->args, false );
227
  $this->payments = Give_Cache::get_db_query( $cache_key );
228
 
237
  /* @var WP_Query $query */
238
  $query = new WP_Query( $this->args );
239
 
240
+ $custom_output = [
241
  'payments',
242
  'give_payments',
243
+ ];
244
 
245
  if ( $query->have_posts() ) {
246
 
299
  public function get_payment_by_group() {
300
  global $wpdb;
301
 
302
+ $allowed_groups = [ 'post_status' ];
303
+ $result = [];
304
 
305
  if ( in_array( $this->args['group_by'], $allowed_groups ) ) {
306
  // Set only count in result.
364
  $is_end_date = property_exists( __CLASS__, 'end_date' );
365
 
366
  if ( $is_start_date || $is_end_date ) {
367
+ $date_query = [];
368
 
369
  if ( $is_start_date && ! is_wp_error( $this->start_date ) ) {
370
  $date_query['after'] = date( 'Y-m-d H:i:s', $this->start_date );
501
  public function custom_orderby( $order, $query ) {
502
 
503
  if ( ! empty( $query->query['post_type'] ) ) {
504
+ $post_types = is_array( $query->query['post_type'] ) ? $query->query['post_type'] : [ $query->query['post_type'] ];
505
 
506
  if ( ! in_array( 'give_payment', $post_types ) || ! isset( $query->query['orderby'] ) || is_array( $query->query['orderby'] ) ) {
507
  return $order;
531
  return;
532
  }
533
 
534
+ $args = [];
535
 
536
  if ( is_numeric( $this->args['user'] ) ) {
537
  // Backward compatibility: user donor param to get payment attached to donor instead of user
538
  $donor_id = Give()->donors->get_column_by( 'id', 'user_id', $this->args['user'] );
539
 
540
+ $args = [
541
  'key' => '_give_payment_donor_id',
542
  'value' => $donor_id ?: -1,
543
+ ];
544
  } elseif ( is_email( $this->args['user'] ) ) {
545
+ $args = [
546
  'key' => '_give_payment_donor_email',
547
  'value' => $this->args['user'],
548
+ ];
549
  }
550
 
551
  $this->__set( 'meta_query', $args );
567
 
568
  $this->__set(
569
  'meta_query',
570
+ [
571
  'key' => "_give_payment_{$donor_meta_type}_id",
572
  'value' => (int) $this->args['donor'],
573
+ ]
574
  );
575
  }
576
 
613
  } elseif ( $is_email || strlen( $search ) == 32 ) {
614
 
615
  $key = $is_email ? '_give_payment_donor_email' : '_give_payment_purchase_key';
616
+ $search_meta = [
617
  'key' => $key,
618
  'value' => $search,
619
  'compare' => 'LIKE',
620
+ ];
621
 
622
  $this->__set( 'meta_query', $search_meta );
623
  $this->__unset( 's' );
624
 
625
  } elseif ( $is_user ) {
626
 
627
+ $search_meta = [
628
  'key' => '_give_payment_donor_id',
629
  'value' => trim( str_replace( 'user:', '', strtolower( $search ) ) ),
630
+ ];
631
 
632
  $this->__set( 'meta_query', $search_meta );
633
 
639
 
640
  if ( is_object( $post ) && $post->post_type == 'give_payment' ) {
641
 
642
+ $arr = [];
643
  $arr[] = $search;
644
  $this->__set( 'post__in', $arr );
645
  $this->__unset( 's' );
655
  $search_parts = preg_split( '/\s+/', $search );
656
 
657
  if ( is_array( $search_parts ) && 2 === count( $search_parts ) ) {
658
+ $search_meta = [
659
  'relation' => 'AND',
660
+ [
661
  'key' => '_give_donor_billing_first_name',
662
  'value' => $search_parts[0],
663
+ 'compare' => 'LIKE',
664
+ ],
665
+ [
666
  'key' => '_give_donor_billing_last_name',
667
  'value' => $search_parts[1],
668
+ 'compare' => 'LIKE',
669
+ ],
670
+ ];
671
  } else {
672
+ $search_meta = [
673
  'relation' => 'OR',
674
+ [
675
  'key' => '_give_donor_billing_first_name',
676
  'value' => $search,
677
  'compare' => 'LIKE',
678
+ ],
679
+ [
680
  'key' => '_give_donor_billing_last_name',
681
  'value' => $search,
682
  'compare' => 'LIKE',
683
+ ],
684
+ ];
685
  }
686
 
687
  $this->__set( 'meta_query', $search_meta );
712
 
713
  $this->__set(
714
  'meta_query',
715
+ [
716
  'key' => '_give_payment_mode',
717
  'value' => $this->args['mode'],
718
+ ]
719
  );
720
  }
721
 
756
 
757
  $this->__set(
758
  'meta_query',
759
+ [
760
  'key' => '_give_payment_form_id',
761
  'value' => $this->args['give_forms'],
762
  'compare' => $compare,
763
+ ]
764
  );
765
 
766
  $this->__unset( 'give_forms' );
789
 
790
  $this->__set(
791
  'meta_query',
792
+ [
793
  'key' => '_give_payment_gateway',
794
  'value' => $this->args['gateway'],
795
  'compare' => $compare,
796
+ ]
797
  );
798
 
799
  $this->__unset( 'gateway' );
815
  private function get_sql() {
816
  global $wpdb;
817
 
818
+ $allowed_keys = [
819
  'post_name',
820
  'post_author',
821
  'post_date',
826
  'post_type',
827
  'menu_order',
828
  'comment_count',
829
+ ];
830
 
831
  $this->args['orderby'] = 'post_parent__in';
832
 
883
  if ( ! empty( $this->args['date_query'] ) ) {
884
  $date_query_obj = new WP_Date_Query( $this->args['date_query'] );
885
  $where .= str_replace(
886
+ [
887
  "\n",
888
  '( (',
889
  '))',
890
+ ],
891
+ [
892
  '',
893
  '( (',
894
  ') )',
895
+ ],
896
  $date_query_obj->get_sql()
897
  );
898
  }
includes/process-donation.php CHANGED
@@ -689,6 +689,12 @@ function give_get_required_fields( $form_id ) {
689
  // If states is empty remove the required fields of city in billing cart.
690
  unset( $required_fields['card_city'] );
691
  }
 
 
 
 
 
 
692
  }
693
  } // End if().
694
 
689
  // If states is empty remove the required fields of city in billing cart.
690
  unset( $required_fields['card_city'] );
691
  }
692
+
693
+ // Check if country is without post codes.
694
+ if ( array_key_exists( $country, give_get_country_list_without_postcodes() ) ) {
695
+ // If country is on the list, zip code is not required.
696
+ unset( $required_fields['card_zip'] );
697
+ }
698
  }
699
  } // End if().
700
 
languages/give.pot CHANGED
@@ -63,35 +63,35 @@ msgstr ""
63
  msgid "Need help? Learn more about %1$sDonors%2$s."
64
  msgstr ""
65
 
66
- #: give.php:297
67
  msgid "Your site could be faster and more secure with a newer PHP version."
68
  msgstr ""
69
 
70
- #: give.php:301
71
  msgid "Hey, we've noticed that you're running an outdated version of PHP. PHP is the programming language that WordPress and GiveWP are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we're sending you this notice."
72
  msgstr ""
73
 
74
- #: give.php:305
75
  msgid "Hosts have the ability to update your PHP version, but sometimes they don't dare to do that because they're afraid they'll break your site."
76
  msgstr ""
77
 
78
- #: give.php:309
79
  msgid "To which version should I update?"
80
  msgstr ""
81
 
82
- #: give.php:310
83
  msgid "You should update your PHP version to either 5.6 or to 7.0 or 7.1. On a normal WordPress site, switching to PHP 5.6 should never cause issues. We would however actually recommend you switch to PHP7. There are some plugins that are not ready for PHP7 though, so do some testing first. PHP7 is much faster than PHP 5.6. It's also the only PHP version still in active development and therefore the better option for your site in the long run."
84
  msgstr ""
85
 
86
- #: give.php:314
87
  msgid "Can't update? Ask your host!"
88
  msgstr ""
89
 
90
- #: give.php:316
91
  msgid "If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don't want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s."
92
  msgstr ""
93
 
94
- #: give.php:349
95
  msgid "<strong>Attention:</strong> GiveWP 2.5.0+ requires the latest version of the Recurring Donations add-on to process payments properly with Stripe. Please update to the latest version add-on to resolve compatibility issues. If your license is active, you should see the update available in WordPress. Otherwise, you can access the latest version by <a href=\"%1$s\" target=\"_blank\">logging into your account</a> and visiting <a href=\"%1$s\" target=\"_blank\">your downloads</a> page on the GiveWP website."
96
  msgstr ""
97
 
@@ -107,33 +107,33 @@ msgstr ""
107
  msgid "State"
108
  msgstr ""
109
 
110
- #: includes/ajax-functions.php:585
111
  msgid "All Levels"
112
  msgstr ""
113
 
114
- #: includes/ajax-functions.php:629, includes/admin/payments/view-payment-details.php:447, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:73, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:75
115
  msgid "n/a"
116
  msgstr ""
117
 
118
- #: includes/ajax-functions.php:735, templates/email-login-form.php:60, templates/history-donations.php:45
119
  msgid "Too many access email requests detected. Please wait %s before requesting a new donation history access link."
120
  msgstr ""
121
 
122
- #: includes/ajax-functions.php:736, templates/email-login-form.php:61, templates/history-donations.php:46
123
  msgid "%s minute"
124
  msgid_plural "%s minutes"
125
  msgstr[0] ""
126
  msgstr[1] ""
127
 
128
- #: includes/ajax-functions.php:695, includes/login-register.php:396
129
  msgid "Unable to send email. Please try again."
130
  msgstr ""
131
 
132
- #: includes/ajax-functions.php:710, includes/class-give-scripts.php:481, templates/email-login-form.php:33
133
  msgid "Please check your email and click on the link to access your complete donation history."
134
  msgstr ""
135
 
136
- #: includes/ajax-functions.php:819
137
  msgid "Sorry, unable to load changelog."
138
  msgstr ""
139
 
@@ -501,7 +501,7 @@ msgstr ""
501
  msgid "The add-on did not activate successfully."
502
  msgstr ""
503
 
504
- #: includes/class-give-scripts.php:239, includes/class-give-scripts.php:288, includes/forms/template.php:1557, includes/admin/donors/class-donor-table.php:598, includes/admin/donors/donors.php:504, includes/admin/donors/donors.php:743, includes/admin/donors/donors.php:1161, includes/admin/payments/view-payment-details.php:688, includes/gateways/stripe/includes/admin/class-give-stripe-admin-settings.php:820
505
  msgid "Cancel"
506
  msgstr ""
507
 
@@ -857,7 +857,7 @@ msgstr ""
857
  msgid "Invalid email address or username."
858
  msgstr ""
859
 
860
- #: includes/class-give-scripts.php:516, includes/process-donation.php:961, includes/user-functions.php:419
861
  msgid "Enter a password."
862
  msgstr ""
863
 
@@ -877,7 +877,7 @@ msgstr ""
877
  msgid "Please select an option"
878
  msgstr ""
879
 
880
- #: includes/class-give-session.php:629, includes/class-give-session.php:649
881
  msgid "We are using database session logic instead of PHP session since GiveWP 2.2.0"
882
  msgstr ""
883
 
@@ -977,7 +977,7 @@ msgstr ""
977
  msgid "Andorra"
978
  msgstr ""
979
 
980
- #: includes/country-functions.php:95
981
  msgid "Angola"
982
  msgstr ""
983
 
@@ -989,7 +989,7 @@ msgstr ""
989
  msgid "Antarctica"
990
  msgstr ""
991
 
992
- #: includes/country-functions.php:98
993
  msgid "Antigua and Barbuda"
994
  msgstr ""
995
 
@@ -1001,7 +1001,7 @@ msgstr ""
1001
  msgid "Armenia"
1002
  msgstr ""
1003
 
1004
- #: includes/country-functions.php:101
1005
  msgid "Aruba"
1006
  msgstr ""
1007
 
@@ -1017,7 +1017,7 @@ msgstr ""
1017
  msgid "Azerbaijan"
1018
  msgstr ""
1019
 
1020
- #: includes/country-functions.php:105
1021
  msgid "Bahamas"
1022
  msgstr ""
1023
 
@@ -1041,11 +1041,11 @@ msgstr ""
1041
  msgid "Belgium"
1042
  msgstr ""
1043
 
1044
- #: includes/country-functions.php:111
1045
  msgid "Belize"
1046
  msgstr ""
1047
 
1048
- #: includes/country-functions.php:112
1049
  msgid "Benin"
1050
  msgstr ""
1051
 
@@ -1065,7 +1065,7 @@ msgstr ""
1065
  msgid "Bosnia and Herzegovina"
1066
  msgstr ""
1067
 
1068
- #: includes/country-functions.php:117
1069
  msgid "Botswana"
1070
  msgstr ""
1071
 
@@ -1089,11 +1089,11 @@ msgstr ""
1089
  msgid "Bulgaria"
1090
  msgstr ""
1091
 
1092
- #: includes/country-functions.php:123
1093
  msgid "Burkina Faso"
1094
  msgstr ""
1095
 
1096
- #: includes/country-functions.php:124
1097
  msgid "Burundi"
1098
  msgstr ""
1099
 
@@ -1101,7 +1101,7 @@ msgstr ""
1101
  msgid "Cambodia"
1102
  msgstr ""
1103
 
1104
- #: includes/country-functions.php:126
1105
  msgid "Cameroon"
1106
  msgstr ""
1107
 
@@ -1113,7 +1113,7 @@ msgstr ""
1113
  msgid "Cayman Islands"
1114
  msgstr ""
1115
 
1116
- #: includes/country-functions.php:129
1117
  msgid "Central African Republic"
1118
  msgstr ""
1119
 
@@ -1141,19 +1141,19 @@ msgstr ""
1141
  msgid "Colombia"
1142
  msgstr ""
1143
 
1144
- #: includes/country-functions.php:136
1145
  msgid "Comoros"
1146
  msgstr ""
1147
 
1148
- #: includes/country-functions.php:137
1149
  msgid "Congo, Democratic People's Republic"
1150
  msgstr ""
1151
 
1152
- #: includes/country-functions.php:138
1153
  msgid "Congo, Republic of"
1154
  msgstr ""
1155
 
1156
- #: includes/country-functions.php:139
1157
  msgid "Cook Islands"
1158
  msgstr ""
1159
 
@@ -1161,7 +1161,7 @@ msgstr ""
1161
  msgid "Costa Rica"
1162
  msgstr ""
1163
 
1164
- #: includes/country-functions.php:141
1165
  msgid "Cote d'Ivoire"
1166
  msgstr ""
1167
 
@@ -1185,11 +1185,11 @@ msgstr ""
1185
  msgid "Denmark"
1186
  msgstr ""
1187
 
1188
- #: includes/country-functions.php:147
1189
  msgid "Djibouti"
1190
  msgstr ""
1191
 
1192
- #: includes/country-functions.php:148
1193
  msgid "Dominica"
1194
  msgstr ""
1195
 
@@ -1209,7 +1209,7 @@ msgstr ""
1209
  msgid "Egypt"
1210
  msgstr ""
1211
 
1212
- #: includes/country-functions.php:153
1213
  msgid "Equatorial Guinea"
1214
  msgstr ""
1215
 
@@ -1217,7 +1217,7 @@ msgstr ""
1217
  msgid "El Salvador"
1218
  msgstr ""
1219
 
1220
- #: includes/country-functions.php:155
1221
  msgid "Eritrea"
1222
  msgstr ""
1223
 
@@ -1237,7 +1237,7 @@ msgstr ""
1237
  msgid "Faroe Islands"
1238
  msgstr ""
1239
 
1240
- #: includes/country-functions.php:160
1241
  msgid "Fiji"
1242
  msgstr ""
1243
 
@@ -1257,7 +1257,7 @@ msgstr ""
1257
  msgid "French Polynesia"
1258
  msgstr ""
1259
 
1260
- #: includes/country-functions.php:165
1261
  msgid "French Southern Territories"
1262
  msgstr ""
1263
 
@@ -1265,7 +1265,7 @@ msgstr ""
1265
  msgid "Gabon"
1266
  msgstr ""
1267
 
1268
- #: includes/country-functions.php:167
1269
  msgid "Gambia"
1270
  msgstr ""
1271
 
@@ -1281,7 +1281,7 @@ msgstr ""
1281
  msgid "Greece"
1282
  msgstr ""
1283
 
1284
- #: includes/country-functions.php:171
1285
  msgid "Ghana"
1286
  msgstr ""
1287
 
@@ -1293,7 +1293,7 @@ msgstr ""
1293
  msgid "Greenland"
1294
  msgstr ""
1295
 
1296
- #: includes/country-functions.php:174
1297
  msgid "Grenada"
1298
  msgstr ""
1299
 
@@ -1313,7 +1313,7 @@ msgstr ""
1313
  msgid "Guernsey"
1314
  msgstr ""
1315
 
1316
- #: includes/country-functions.php:179
1317
  msgid "Guinea"
1318
  msgstr ""
1319
 
@@ -1321,7 +1321,7 @@ msgstr ""
1321
  msgid "Guinea-Bissau"
1322
  msgstr ""
1323
 
1324
- #: includes/country-functions.php:181
1325
  msgid "Guyana"
1326
  msgstr ""
1327
 
@@ -1341,7 +1341,7 @@ msgstr ""
1341
  msgid "Honduras"
1342
  msgstr ""
1343
 
1344
- #: includes/country-functions.php:186
1345
  msgid "Hong Kong"
1346
  msgstr ""
1347
 
@@ -1369,7 +1369,7 @@ msgstr ""
1369
  msgid "Iraq"
1370
  msgstr ""
1371
 
1372
- #: includes/country-functions.php:193
1373
  msgid "Ireland"
1374
  msgstr ""
1375
 
@@ -1385,7 +1385,7 @@ msgstr ""
1385
  msgid "Italy"
1386
  msgstr ""
1387
 
1388
- #: includes/country-functions.php:197
1389
  msgid "Jamaica"
1390
  msgstr ""
1391
 
@@ -1405,11 +1405,11 @@ msgstr ""
1405
  msgid "Kazakhstan"
1406
  msgstr ""
1407
 
1408
- #: includes/country-functions.php:202
1409
  msgid "Kenya"
1410
  msgstr ""
1411
 
1412
- #: includes/country-functions.php:203
1413
  msgid "Kiribati"
1414
  msgstr ""
1415
 
@@ -1457,7 +1457,7 @@ msgstr ""
1457
  msgid "Luxembourg"
1458
  msgstr ""
1459
 
1460
- #: includes/country-functions.php:215
1461
  msgid "Macau"
1462
  msgstr ""
1463
 
@@ -1469,7 +1469,7 @@ msgstr ""
1469
  msgid "Madagascar"
1470
  msgstr ""
1471
 
1472
- #: includes/country-functions.php:218
1473
  msgid "Malawi"
1474
  msgstr ""
1475
 
@@ -1481,7 +1481,7 @@ msgstr ""
1481
  msgid "Maldives"
1482
  msgstr ""
1483
 
1484
- #: includes/country-functions.php:221
1485
  msgid "Mali"
1486
  msgstr ""
1487
 
@@ -1497,11 +1497,11 @@ msgstr ""
1497
  msgid "Martinique"
1498
  msgstr ""
1499
 
1500
- #: includes/country-functions.php:225
1501
  msgid "Mauritania"
1502
  msgstr ""
1503
 
1504
- #: includes/country-functions.php:226
1505
  msgid "Mauritius"
1506
  msgstr ""
1507
 
@@ -1533,7 +1533,7 @@ msgstr ""
1533
  msgid "Montenegro"
1534
  msgstr ""
1535
 
1536
- #: includes/country-functions.php:234
1537
  msgid "Montserrat"
1538
  msgstr ""
1539
 
@@ -1553,7 +1553,7 @@ msgstr ""
1553
  msgid "Namibia"
1554
  msgstr ""
1555
 
1556
- #: includes/country-functions.php:239
1557
  msgid "Nauru"
1558
  msgstr ""
1559
 
@@ -1565,7 +1565,7 @@ msgstr ""
1565
  msgid "Netherlands"
1566
  msgstr ""
1567
 
1568
- #: includes/country-functions.php:242
1569
  msgid "Netherlands Antilles"
1570
  msgstr ""
1571
 
@@ -1589,7 +1589,7 @@ msgstr ""
1589
  msgid "Nigeria"
1590
  msgstr ""
1591
 
1592
- #: includes/country-functions.php:248
1593
  msgid "Niue"
1594
  msgstr ""
1595
 
@@ -1597,7 +1597,7 @@ msgstr ""
1597
  msgid "Norfolk Island"
1598
  msgstr ""
1599
 
1600
- #: includes/country-functions.php:250
1601
  msgid "North Korea"
1602
  msgstr ""
1603
 
@@ -1625,7 +1625,7 @@ msgstr ""
1625
  msgid "Palestinian Territories"
1626
  msgstr ""
1627
 
1628
- #: includes/country-functions.php:257
1629
  msgid "Panama"
1630
  msgstr ""
1631
 
@@ -1661,7 +1661,7 @@ msgstr ""
1661
  msgid "Puerto Rico"
1662
  msgstr ""
1663
 
1664
- #: includes/country-functions.php:266
1665
  msgid "Qatar"
1666
  msgstr ""
1667
 
@@ -1677,7 +1677,7 @@ msgstr ""
1677
  msgid "Russian Federation"
1678
  msgstr ""
1679
 
1680
- #: includes/country-functions.php:270
1681
  msgid "Rwanda"
1682
  msgstr ""
1683
 
@@ -1685,11 +1685,11 @@ msgstr ""
1685
  msgid "Saint Helena"
1686
  msgstr ""
1687
 
1688
- #: includes/country-functions.php:272
1689
  msgid "Saint Kitts and Nevis"
1690
  msgstr ""
1691
 
1692
- #: includes/country-functions.php:273
1693
  msgid "Saint Lucia"
1694
  msgstr ""
1695
 
@@ -1705,7 +1705,7 @@ msgstr ""
1705
  msgid "San Marino"
1706
  msgstr ""
1707
 
1708
- #: includes/country-functions.php:277
1709
  msgid "Sao Tome and Principe"
1710
  msgstr ""
1711
 
@@ -1721,11 +1721,11 @@ msgstr ""
1721
  msgid "Serbia"
1722
  msgstr ""
1723
 
1724
- #: includes/country-functions.php:281
1725
  msgid "Seychelles"
1726
  msgstr ""
1727
 
1728
- #: includes/country-functions.php:282
1729
  msgid "Sierra Leone"
1730
  msgstr ""
1731
 
@@ -1741,15 +1741,15 @@ msgstr ""
1741
  msgid "Slovenia"
1742
  msgstr ""
1743
 
1744
- #: includes/country-functions.php:286
1745
  msgid "Solomon Islands"
1746
  msgstr ""
1747
 
1748
- #: includes/country-functions.php:287
1749
  msgid "Somalia"
1750
  msgstr ""
1751
 
1752
- #: includes/country-functions.php:288
1753
  msgid "South Africa"
1754
  msgstr ""
1755
 
@@ -1773,7 +1773,7 @@ msgstr ""
1773
  msgid "Sudan"
1774
  msgstr ""
1775
 
1776
- #: includes/country-functions.php:294
1777
  msgid "Suriname"
1778
  msgstr ""
1779
 
@@ -1793,7 +1793,7 @@ msgstr ""
1793
  msgid "Switzerland"
1794
  msgstr ""
1795
 
1796
- #: includes/country-functions.php:299
1797
  msgid "Syrian Arab Republic"
1798
  msgstr ""
1799
 
@@ -1805,7 +1805,7 @@ msgstr ""
1805
  msgid "Tajikistan"
1806
  msgstr ""
1807
 
1808
- #: includes/country-functions.php:302
1809
  msgid "Tanzania"
1810
  msgstr ""
1811
 
@@ -1813,11 +1813,11 @@ msgstr ""
1813
  msgid "Togo"
1814
  msgstr ""
1815
 
1816
- #: includes/country-functions.php:304
1817
  msgid "Tokelau"
1818
  msgstr ""
1819
 
1820
- #: includes/country-functions.php:305
1821
  msgid "Tonga"
1822
  msgstr ""
1823
 
@@ -1825,7 +1825,7 @@ msgstr ""
1825
  msgid "Thailand"
1826
  msgstr ""
1827
 
1828
- #: includes/country-functions.php:307
1829
  msgid "Trinidad and Tobago"
1830
  msgstr ""
1831
 
@@ -1845,11 +1845,11 @@ msgstr ""
1845
  msgid "Turks and Caicos Islands"
1846
  msgstr ""
1847
 
1848
- #: includes/country-functions.php:312
1849
  msgid "Tuvalu"
1850
  msgstr ""
1851
 
1852
- #: includes/country-functions.php:313
1853
  msgid "Uganda"
1854
  msgstr ""
1855
 
@@ -1857,7 +1857,7 @@ msgstr ""
1857
  msgid "Ukraine"
1858
  msgstr ""
1859
 
1860
- #: includes/country-functions.php:315
1861
  msgid "United Arab Emirates"
1862
  msgstr ""
1863
 
@@ -1873,7 +1873,7 @@ msgstr ""
1873
  msgid "Uzbekistan"
1874
  msgstr ""
1875
 
1876
- #: includes/country-functions.php:319
1877
  msgid "Vanuatu"
1878
  msgstr ""
1879
 
@@ -1905,7 +1905,7 @@ msgstr ""
1905
  msgid "Western Samoa"
1906
  msgstr ""
1907
 
1908
- #: includes/country-functions.php:327
1909
  msgid "Yemen"
1910
  msgstr ""
1911
 
@@ -1917,7 +1917,7 @@ msgstr ""
1917
  msgid "Zambia"
1918
  msgstr ""
1919
 
1920
- #: includes/country-functions.php:330
1921
  msgid "Zimbabwe"
1922
  msgstr ""
1923
 
@@ -5593,11 +5593,11 @@ msgstr ""
5593
  msgid "%s trillion"
5594
  msgstr ""
5595
 
5596
- #: includes/formatting.php:766, includes/formatting.php:803, includes/process-donation.php:850, includes/api/class-give-api.php:1961, includes/forms/functions.php:312, includes/gateways/actions.php:48, includes/gateways/manual.php:80, includes/admin/donors/donor-actions.php:419, includes/admin/donors/donor-actions.php:498, includes/admin/donors/donor-actions.php:549, includes/admin/forms/class-give-form-duplicator.php:87, includes/admin/tools/export/export-actions.php:27, includes/admin/tools/export/pdf-reports.php:35
5597
  msgid "We're unable to recognize your session. Please refresh the screen to try again; otherwise contact your website administrator for assistance."
5598
  msgstr ""
5599
 
5600
- #: includes/install.php:360, includes/forms/template.php:1762, includes/forms/template.php:1757, includes/admin/forms/class-metabox-form-data.php:561, includes/admin/settings/class-settings-display.php:284, tests/unit-tests/tests-install.php:100
5601
  msgid "Agree to Terms?"
5602
  msgstr ""
5603
 
@@ -5617,11 +5617,11 @@ msgstr ""
5617
  msgid "Donation History"
5618
  msgstr ""
5619
 
5620
- #: includes/login-register.php:125, includes/process-donation.php:965
5621
  msgid "The username you entered does not exist."
5622
  msgstr ""
5623
 
5624
- #: includes/login-register.php:122, includes/process-donation.php:941
5625
  msgid "The password you entered is incorrect."
5626
  msgstr ""
5627
 
@@ -5637,7 +5637,7 @@ msgstr ""
5637
  msgid "Email address already taken."
5638
  msgstr ""
5639
 
5640
- #: includes/login-register.php:267, includes/process-donation.php:806, includes/process-donation.php:1006, includes/user-functions.php:373, includes/admin/donors/donor-actions.php:424
5641
  msgid "Invalid email."
5642
  msgstr ""
5643
 
@@ -6086,36 +6086,36 @@ msgstr ""
6086
  msgid "Please enter billing state / province / County."
6087
  msgstr ""
6088
 
6089
- #: includes/process-donation.php:715
6090
  msgid "Please enter Company Name."
6091
  msgstr ""
6092
 
6093
- #: includes/process-donation.php:811
6094
  msgid "The user information is invalid."
6095
  msgstr ""
6096
 
6097
- #: includes/process-donation.php:908
6098
  msgid "Please enter your username or email to log in."
6099
  msgstr ""
6100
 
6101
- #: includes/process-donation.php:943, includes/forms/template.php:1562, templates/shortcode-login.php:52
6102
  msgid "Reset Password"
6103
  msgstr ""
6104
 
6105
- #: includes/process-donation.php:1032, includes/user-functions.php:363
6106
  msgid "Enter an email."
6107
  msgstr ""
6108
 
6109
- #: includes/process-donation.php:1220
6110
  msgid "The zip / postal code you entered for your billing address is invalid."
6111
  msgstr ""
6112
 
6113
  #. translators: %s: invalid donation amount
6114
- #: includes/process-donation.php:1529
6115
  msgid "Donation amount %s is invalid."
6116
  msgstr ""
6117
 
6118
- #: includes/process-donation.php:1580
6119
  msgid "The First Name and Last Name fields cannot contain an email address or numbers."
6120
  msgstr ""
6121
 
@@ -6163,7 +6163,7 @@ msgstr ""
6163
  msgid "Hey! We've raised {total} of the {total_goal} we are trying to raise for this campaign!"
6164
  msgstr ""
6165
 
6166
- #: includes/shortcodes.php:595, includes/forms/template.php:689, includes/forms/template.php:719, includes/forms/template.php:1936, includes/forms/widget.php:172, includes/gateways/stripe/includes/give-stripe-scripts.php:60, src/Form/Template.php:218, src/Form/Template.php:228, src/Form/Template/Options.php:56, src/Form/Template/Options.php:58, src/Form/Template/Options.php:131, src/Views/Form/Templates/Sequoia/Actions.php:214, src/Views/Form/Templates/Sequoia/Actions.php:259, src/Views/Form/Templates/Sequoia/optionConfig.php:68, src/Views/Form/Templates/Sequoia/optionConfig.php:70, src/Views/Form/Templates/Sequoia/Sequoia.php:67
6167
  msgid "Donate Now"
6168
  msgstr ""
6169
 
@@ -7706,107 +7706,107 @@ msgstr ""
7706
  msgid "The city for your billing address."
7707
  msgstr ""
7708
 
7709
- #: includes/forms/template.php:1265
7710
  msgid "The state, province, or county for your billing address."
7711
  msgstr ""
7712
 
7713
- #: includes/forms/template.php:1293, includes/forms/template.php:1307
7714
  msgid "Zip / Postal Code"
7715
  msgstr ""
7716
 
7717
- #: includes/forms/template.php:1297
7718
  msgid "The zip or postal code for your billing address."
7719
  msgstr ""
7720
 
7721
- #: includes/forms/template.php:1391
7722
  msgid "Registration is required to donate."
7723
  msgstr ""
7724
 
7725
- #: includes/forms/template.php:1401
7726
  msgid "Create an account"
7727
  msgstr ""
7728
 
7729
- #: includes/forms/template.php:1402
7730
  msgid "Create an account on the site to see and manage donation history."
7731
  msgstr ""
7732
 
7733
- #: includes/forms/template.php:1414
7734
  msgid "Already have an account?"
7735
  msgstr ""
7736
 
7737
- #: includes/forms/template.php:1416, includes/forms/template.php:1553, includes/admin/forms/class-metabox-form-data.php:398, includes/admin/shortcodes/shortcode-give-login.php:24, includes/admin/shortcodes/shortcode-give-login.php:25
7738
  msgid "Login"
7739
  msgstr ""
7740
 
7741
- #: includes/forms/template.php:1485
7742
  msgid "Log In to Your Account"
7743
  msgstr ""
7744
 
7745
- #: includes/forms/template.php:1487
7746
  msgid "(optional)"
7747
  msgstr ""
7748
 
7749
- #: includes/forms/template.php:1493
7750
  msgid "Don't have an account?"
7751
  msgstr ""
7752
 
7753
- #: includes/forms/template.php:1500
7754
  msgid "Register or donate as a guest &raquo;"
7755
  msgstr ""
7756
 
7757
- #: includes/forms/template.php:1498
7758
  msgid "Register as a part of your donation &raquo;"
7759
  msgstr ""
7760
 
7761
- #: includes/forms/template.php:1522, templates/shortcode-login.php:34
7762
  msgid "Username or Email Address"
7763
  msgstr ""
7764
 
7765
- #: includes/forms/template.php:1531
7766
  msgid "Your username or email"
7767
  msgstr ""
7768
 
7769
- #: includes/forms/template.php:1537, templates/shortcode-login.php:39, templates/shortcode-register.php:44
7770
  msgid "Password"
7771
  msgstr ""
7772
 
7773
- #: includes/forms/template.php:1544
7774
  msgid "Your password"
7775
  msgstr ""
7776
 
7777
- #: includes/forms/template.php:1629
7778
  msgid "Select Payment Method"
7779
  msgstr ""
7780
 
7781
- #: includes/forms/template.php:1773
7782
  msgid "Please enter valid terms and conditions in <a href=\"%s\">this form's settings</a>."
7783
  msgstr ""
7784
 
7785
- #: includes/forms/template.php:1788
7786
  msgid "Terms"
7787
  msgstr ""
7788
 
7789
- #: includes/forms/template.php:1809
7790
  msgid "Show Terms"
7791
  msgstr ""
7792
 
7793
- #: includes/forms/template.php:1811
7794
  msgid "Hide Terms"
7795
  msgstr ""
7796
 
7797
- #: includes/forms/template.php:1855, includes/admin/shortcodes/shortcode-give-donor-wall.php:154
7798
  msgid "Donation Total:"
7799
  msgstr ""
7800
 
7801
- #: includes/forms/template.php:2205, includes/gateways/stripe/includes/class-give-stripe-gateway.php:140, includes/gateways/stripe/includes/class-give-stripe-gateway.php:129, includes/gateways/stripe/includes/class-give-stripe-gateway.php:118
7802
  msgid "Notice:"
7803
  msgstr ""
7804
 
7805
- #: includes/forms/template.php:2205
7806
  msgid "Test mode is enabled. While in test mode no live donations are processed."
7807
  msgstr ""
7808
 
7809
- #: includes/forms/template.php:2234
7810
  msgid "Please log in in order to complete your donation."
7811
  msgstr ""
7812
 
63
  msgid "Need help? Learn more about %1$sDonors%2$s."
64
  msgstr ""
65
 
66
+ #: give.php:306
67
  msgid "Your site could be faster and more secure with a newer PHP version."
68
  msgstr ""
69
 
70
+ #: give.php:310
71
  msgid "Hey, we've noticed that you're running an outdated version of PHP. PHP is the programming language that WordPress and GiveWP are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we're sending you this notice."
72
  msgstr ""
73
 
74
+ #: give.php:314
75
  msgid "Hosts have the ability to update your PHP version, but sometimes they don't dare to do that because they're afraid they'll break your site."
76
  msgstr ""
77
 
78
+ #: give.php:318
79
  msgid "To which version should I update?"
80
  msgstr ""
81
 
82
+ #: give.php:319
83
  msgid "You should update your PHP version to either 5.6 or to 7.0 or 7.1. On a normal WordPress site, switching to PHP 5.6 should never cause issues. We would however actually recommend you switch to PHP7. There are some plugins that are not ready for PHP7 though, so do some testing first. PHP7 is much faster than PHP 5.6. It's also the only PHP version still in active development and therefore the better option for your site in the long run."
84
  msgstr ""
85
 
86
+ #: give.php:323
87
  msgid "Can't update? Ask your host!"
88
  msgstr ""
89
 
90
+ #: give.php:325
91
  msgid "If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don't want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s."
92
  msgstr ""
93
 
94
+ #: give.php:358
95
  msgid "<strong>Attention:</strong> GiveWP 2.5.0+ requires the latest version of the Recurring Donations add-on to process payments properly with Stripe. Please update to the latest version add-on to resolve compatibility issues. If your license is active, you should see the update available in WordPress. Otherwise, you can access the latest version by <a href=\"%1$s\" target=\"_blank\">logging into your account</a> and visiting <a href=\"%1$s\" target=\"_blank\">your downloads</a> page on the GiveWP website."
96
  msgstr ""
97
 
107
  msgid "State"
108
  msgstr ""
109
 
110
+ #: includes/ajax-functions.php:586
111
  msgid "All Levels"
112
  msgstr ""
113
 
114
+ #: includes/ajax-functions.php:630, includes/admin/payments/view-payment-details.php:447, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:73, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:75
115
  msgid "n/a"
116
  msgstr ""
117
 
118
+ #: includes/ajax-functions.php:736, templates/email-login-form.php:60, templates/history-donations.php:45
119
  msgid "Too many access email requests detected. Please wait %s before requesting a new donation history access link."
120
  msgstr ""
121
 
122
+ #: includes/ajax-functions.php:737, templates/email-login-form.php:61, templates/history-donations.php:46
123
  msgid "%s minute"
124
  msgid_plural "%s minutes"
125
  msgstr[0] ""
126
  msgstr[1] ""
127
 
128
+ #: includes/ajax-functions.php:696, includes/login-register.php:396
129
  msgid "Unable to send email. Please try again."
130
  msgstr ""
131
 
132
+ #: includes/ajax-functions.php:711, includes/class-give-scripts.php:481, templates/email-login-form.php:33
133
  msgid "Please check your email and click on the link to access your complete donation history."
134
  msgstr ""
135
 
136
+ #: includes/ajax-functions.php:820
137
  msgid "Sorry, unable to load changelog."
138
  msgstr ""
139
 
501
  msgid "The add-on did not activate successfully."
502
  msgstr ""
503
 
504
+ #: includes/class-give-scripts.php:239, includes/class-give-scripts.php:288, includes/forms/template.php:1558, includes/admin/donors/class-donor-table.php:598, includes/admin/donors/donors.php:504, includes/admin/donors/donors.php:743, includes/admin/donors/donors.php:1161, includes/admin/payments/view-payment-details.php:688, includes/gateways/stripe/includes/admin/class-give-stripe-admin-settings.php:820
505
  msgid "Cancel"
506
  msgstr ""
507
 
857
  msgid "Invalid email address or username."
858
  msgstr ""
859
 
860
+ #: includes/class-give-scripts.php:516, includes/process-donation.php:967, includes/user-functions.php:419
861
  msgid "Enter a password."
862
  msgstr ""
863
 
877
  msgid "Please select an option"
878
  msgstr ""
879
 
880
+ #: includes/class-give-session.php:632, includes/class-give-session.php:652
881
  msgid "We are using database session logic instead of PHP session since GiveWP 2.2.0"
882
  msgstr ""
883
 
977
  msgid "Andorra"
978
  msgstr ""
979
 
980
+ #: includes/country-functions.php:95, includes/country-functions.php:2375
981
  msgid "Angola"
982
  msgstr ""
983
 
989
  msgid "Antarctica"
990
  msgstr ""
991
 
992
+ #: includes/country-functions.php:98, includes/country-functions.php:2376
993
  msgid "Antigua and Barbuda"
994
  msgstr ""
995
 
1001
  msgid "Armenia"
1002
  msgstr ""
1003
 
1004
+ #: includes/country-functions.php:101, includes/country-functions.php:2377
1005
  msgid "Aruba"
1006
  msgstr ""
1007
 
1017
  msgid "Azerbaijan"
1018
  msgstr ""
1019
 
1020
+ #: includes/country-functions.php:105, includes/country-functions.php:2378
1021
  msgid "Bahamas"
1022
  msgstr ""
1023
 
1041
  msgid "Belgium"
1042
  msgstr ""
1043
 
1044
+ #: includes/country-functions.php:111, includes/country-functions.php:2379
1045
  msgid "Belize"
1046
  msgstr ""
1047
 
1048
+ #: includes/country-functions.php:112, includes/country-functions.php:2380
1049
  msgid "Benin"
1050
  msgstr ""
1051
 
1065
  msgid "Bosnia and Herzegovina"
1066
  msgstr ""
1067
 
1068
+ #: includes/country-functions.php:117, includes/country-functions.php:2381
1069
  msgid "Botswana"
1070
  msgstr ""
1071
 
1089
  msgid "Bulgaria"
1090
  msgstr ""
1091
 
1092
+ #: includes/country-functions.php:123, includes/country-functions.php:2382
1093
  msgid "Burkina Faso"
1094
  msgstr ""
1095
 
1096
+ #: includes/country-functions.php:124, includes/country-functions.php:2383
1097
  msgid "Burundi"
1098
  msgstr ""
1099
 
1101
  msgid "Cambodia"
1102
  msgstr ""
1103
 
1104
+ #: includes/country-functions.php:126, includes/country-functions.php:2384
1105
  msgid "Cameroon"
1106
  msgstr ""
1107
 
1113
  msgid "Cayman Islands"
1114
  msgstr ""
1115
 
1116
+ #: includes/country-functions.php:129, includes/country-functions.php:2385
1117
  msgid "Central African Republic"
1118
  msgstr ""
1119
 
1141
  msgid "Colombia"
1142
  msgstr ""
1143
 
1144
+ #: includes/country-functions.php:136, includes/country-functions.php:2386
1145
  msgid "Comoros"
1146
  msgstr ""
1147
 
1148
+ #: includes/country-functions.php:137, includes/country-functions.php:2387
1149
  msgid "Congo, Democratic People's Republic"
1150
  msgstr ""
1151
 
1152
+ #: includes/country-functions.php:138, includes/country-functions.php:2388
1153
  msgid "Congo, Republic of"
1154
  msgstr ""
1155
 
1156
+ #: includes/country-functions.php:139, includes/country-functions.php:2389
1157
  msgid "Cook Islands"
1158
  msgstr ""
1159
 
1161
  msgid "Costa Rica"
1162
  msgstr ""
1163
 
1164
+ #: includes/country-functions.php:141, includes/country-functions.php:2390
1165
  msgid "Cote d'Ivoire"
1166
  msgstr ""
1167
 
1185
  msgid "Denmark"
1186
  msgstr ""
1187
 
1188
+ #: includes/country-functions.php:147, includes/country-functions.php:2391
1189
  msgid "Djibouti"
1190
  msgstr ""
1191
 
1192
+ #: includes/country-functions.php:148, includes/country-functions.php:2392
1193
  msgid "Dominica"
1194
  msgstr ""
1195
 
1209
  msgid "Egypt"
1210
  msgstr ""
1211
 
1212
+ #: includes/country-functions.php:153, includes/country-functions.php:2393
1213
  msgid "Equatorial Guinea"
1214
  msgstr ""
1215
 
1217
  msgid "El Salvador"
1218
  msgstr ""
1219
 
1220
+ #: includes/country-functions.php:155, includes/country-functions.php:2394
1221
  msgid "Eritrea"
1222
  msgstr ""
1223
 
1237
  msgid "Faroe Islands"
1238
  msgstr ""
1239
 
1240
+ #: includes/country-functions.php:160, includes/country-functions.php:2395
1241
  msgid "Fiji"
1242
  msgstr ""
1243
 
1257
  msgid "French Polynesia"
1258
  msgstr ""
1259
 
1260
+ #: includes/country-functions.php:165, includes/country-functions.php:2396
1261
  msgid "French Southern Territories"
1262
  msgstr ""
1263
 
1265
  msgid "Gabon"
1266
  msgstr ""
1267
 
1268
+ #: includes/country-functions.php:167, includes/country-functions.php:2397
1269
  msgid "Gambia"
1270
  msgstr ""
1271
 
1281
  msgid "Greece"
1282
  msgstr ""
1283
 
1284
+ #: includes/country-functions.php:171, includes/country-functions.php:2398
1285
  msgid "Ghana"
1286
  msgstr ""
1287
 
1293
  msgid "Greenland"
1294
  msgstr ""
1295
 
1296
+ #: includes/country-functions.php:174, includes/country-functions.php:2399
1297
  msgid "Grenada"
1298
  msgstr ""
1299
 
1313
  msgid "Guernsey"
1314
  msgstr ""
1315
 
1316
+ #: includes/country-functions.php:179, includes/country-functions.php:2400
1317
  msgid "Guinea"
1318
  msgstr ""
1319
 
1321
  msgid "Guinea-Bissau"
1322
  msgstr ""
1323
 
1324
+ #: includes/country-functions.php:181, includes/country-functions.php:2401
1325
  msgid "Guyana"
1326
  msgstr ""
1327
 
1341
  msgid "Honduras"
1342
  msgstr ""
1343
 
1344
+ #: includes/country-functions.php:186, includes/country-functions.php:2402
1345
  msgid "Hong Kong"
1346
  msgstr ""
1347
 
1369
  msgid "Iraq"
1370
  msgstr ""
1371
 
1372
+ #: includes/country-functions.php:193, includes/country-functions.php:2403
1373
  msgid "Ireland"
1374
  msgstr ""
1375
 
1385
  msgid "Italy"
1386
  msgstr ""
1387
 
1388
+ #: includes/country-functions.php:197, includes/country-functions.php:2404
1389
  msgid "Jamaica"
1390
  msgstr ""
1391
 
1405
  msgid "Kazakhstan"
1406
  msgstr ""
1407
 
1408
+ #: includes/country-functions.php:202, includes/country-functions.php:2405
1409
  msgid "Kenya"
1410
  msgstr ""
1411
 
1412
+ #: includes/country-functions.php:203, includes/country-functions.php:2406
1413
  msgid "Kiribati"
1414
  msgstr ""
1415
 
1457
  msgid "Luxembourg"
1458
  msgstr ""
1459
 
1460
+ #: includes/country-functions.php:215, includes/country-functions.php:2407
1461
  msgid "Macau"
1462
  msgstr ""
1463
 
1469
  msgid "Madagascar"
1470
  msgstr ""
1471
 
1472
+ #: includes/country-functions.php:218, includes/country-functions.php:2408
1473
  msgid "Malawi"
1474
  msgstr ""
1475
 
1481
  msgid "Maldives"
1482
  msgstr ""
1483
 
1484
+ #: includes/country-functions.php:221, includes/country-functions.php:2409
1485
  msgid "Mali"
1486
  msgstr ""
1487
 
1497
  msgid "Martinique"
1498
  msgstr ""
1499
 
1500
+ #: includes/country-functions.php:225, includes/country-functions.php:2410
1501
  msgid "Mauritania"
1502
  msgstr ""
1503
 
1504
+ #: includes/country-functions.php:226, includes/country-functions.php:2411
1505
  msgid "Mauritius"
1506
  msgstr ""
1507
 
1533
  msgid "Montenegro"
1534
  msgstr ""
1535
 
1536
+ #: includes/country-functions.php:234, includes/country-functions.php:2412
1537
  msgid "Montserrat"
1538
  msgstr ""
1539
 
1553
  msgid "Namibia"
1554
  msgstr ""
1555
 
1556
+ #: includes/country-functions.php:239, includes/country-functions.php:2413
1557
  msgid "Nauru"
1558
  msgstr ""
1559
 
1565
  msgid "Netherlands"
1566
  msgstr ""
1567
 
1568
+ #: includes/country-functions.php:242, includes/country-functions.php:2414
1569
  msgid "Netherlands Antilles"
1570
  msgstr ""
1571
 
1589
  msgid "Nigeria"
1590
  msgstr ""
1591
 
1592
+ #: includes/country-functions.php:248, includes/country-functions.php:2415
1593
  msgid "Niue"
1594
  msgstr ""
1595
 
1597
  msgid "Norfolk Island"
1598
  msgstr ""
1599
 
1600
+ #: includes/country-functions.php:250, includes/country-functions.php:2416
1601
  msgid "North Korea"
1602
  msgstr ""
1603
 
1625
  msgid "Palestinian Territories"
1626
  msgstr ""
1627
 
1628
+ #: includes/country-functions.php:257, includes/country-functions.php:2417
1629
  msgid "Panama"
1630
  msgstr ""
1631
 
1661
  msgid "Puerto Rico"
1662
  msgstr ""
1663
 
1664
+ #: includes/country-functions.php:266, includes/country-functions.php:2418
1665
  msgid "Qatar"
1666
  msgstr ""
1667
 
1677
  msgid "Russian Federation"
1678
  msgstr ""
1679
 
1680
+ #: includes/country-functions.php:270, includes/country-functions.php:2419
1681
  msgid "Rwanda"
1682
  msgstr ""
1683
 
1685
  msgid "Saint Helena"
1686
  msgstr ""
1687
 
1688
+ #: includes/country-functions.php:272, includes/country-functions.php:2420
1689
  msgid "Saint Kitts and Nevis"
1690
  msgstr ""
1691
 
1692
+ #: includes/country-functions.php:273, includes/country-functions.php:2421
1693
  msgid "Saint Lucia"
1694
  msgstr ""
1695
 
1705
  msgid "San Marino"
1706
  msgstr ""
1707
 
1708
+ #: includes/country-functions.php:277, includes/country-functions.php:2422
1709
  msgid "Sao Tome and Principe"
1710
  msgstr ""
1711
 
1721
  msgid "Serbia"
1722
  msgstr ""
1723
 
1724
+ #: includes/country-functions.php:281, includes/country-functions.php:2423
1725
  msgid "Seychelles"
1726
  msgstr ""
1727
 
1728
+ #: includes/country-functions.php:282, includes/country-functions.php:2424
1729
  msgid "Sierra Leone"
1730
  msgstr ""
1731
 
1741
  msgid "Slovenia"
1742
  msgstr ""
1743
 
1744
+ #: includes/country-functions.php:286, includes/country-functions.php:2425
1745
  msgid "Solomon Islands"
1746
  msgstr ""
1747
 
1748
+ #: includes/country-functions.php:287, includes/country-functions.php:2426
1749
  msgid "Somalia"
1750
  msgstr ""
1751
 
1752
+ #: includes/country-functions.php:288, includes/country-functions.php:2427
1753
  msgid "South Africa"
1754
  msgstr ""
1755
 
1773
  msgid "Sudan"
1774
  msgstr ""
1775
 
1776
+ #: includes/country-functions.php:294, includes/country-functions.php:2428
1777
  msgid "Suriname"
1778
  msgstr ""
1779
 
1793
  msgid "Switzerland"
1794
  msgstr ""
1795
 
1796
+ #: includes/country-functions.php:299, includes/country-functions.php:2429
1797
  msgid "Syrian Arab Republic"
1798
  msgstr ""
1799
 
1805
  msgid "Tajikistan"
1806
  msgstr ""
1807
 
1808
+ #: includes/country-functions.php:302, includes/country-functions.php:2430
1809
  msgid "Tanzania"
1810
  msgstr ""
1811
 
1813
  msgid "Togo"
1814
  msgstr ""
1815
 
1816
+ #: includes/country-functions.php:304, includes/country-functions.php:2431
1817
  msgid "Tokelau"
1818
  msgstr ""
1819
 
1820
+ #: includes/country-functions.php:305, includes/country-functions.php:2432
1821
  msgid "Tonga"
1822
  msgstr ""
1823
 
1825
  msgid "Thailand"
1826
  msgstr ""
1827
 
1828
+ #: includes/country-functions.php:307, includes/country-functions.php:2433
1829
  msgid "Trinidad and Tobago"
1830
  msgstr ""
1831
 
1845
  msgid "Turks and Caicos Islands"
1846
  msgstr ""
1847
 
1848
+ #: includes/country-functions.php:312, includes/country-functions.php:2434
1849
  msgid "Tuvalu"
1850
  msgstr ""
1851
 
1852
+ #: includes/country-functions.php:313, includes/country-functions.php:2435
1853
  msgid "Uganda"
1854
  msgstr ""
1855
 
1857
  msgid "Ukraine"
1858
  msgstr ""
1859
 
1860
+ #: includes/country-functions.php:315, includes/country-functions.php:2436
1861
  msgid "United Arab Emirates"
1862
  msgstr ""
1863
 
1873
  msgid "Uzbekistan"
1874
  msgstr ""
1875
 
1876
+ #: includes/country-functions.php:319, includes/country-functions.php:2437
1877
  msgid "Vanuatu"
1878
  msgstr ""
1879
 
1905
  msgid "Western Samoa"
1906
  msgstr ""
1907
 
1908
+ #: includes/country-functions.php:327, includes/country-functions.php:2438
1909
  msgid "Yemen"
1910
  msgstr ""
1911
 
1917
  msgid "Zambia"
1918
  msgstr ""
1919
 
1920
+ #: includes/country-functions.php:330, includes/country-functions.php:2439
1921
  msgid "Zimbabwe"
1922
  msgstr ""
1923
 
5593
  msgid "%s trillion"
5594
  msgstr ""
5595
 
5596
+ #: includes/formatting.php:766, includes/formatting.php:803, includes/process-donation.php:856, includes/api/class-give-api.php:1961, includes/forms/functions.php:312, includes/gateways/actions.php:48, includes/gateways/manual.php:80, includes/admin/donors/donor-actions.php:419, includes/admin/donors/donor-actions.php:498, includes/admin/donors/donor-actions.php:549, includes/admin/forms/class-give-form-duplicator.php:87, includes/admin/tools/export/export-actions.php:27, includes/admin/tools/export/pdf-reports.php:35
5597
  msgid "We're unable to recognize your session. Please refresh the screen to try again; otherwise contact your website administrator for assistance."
5598
  msgstr ""
5599
 
5600
+ #: includes/install.php:360, includes/forms/template.php:1763, includes/forms/template.php:1758, includes/admin/forms/class-metabox-form-data.php:561, includes/admin/settings/class-settings-display.php:284, tests/unit-tests/tests-install.php:100
5601
  msgid "Agree to Terms?"
5602
  msgstr ""
5603
 
5617
  msgid "Donation History"
5618
  msgstr ""
5619
 
5620
+ #: includes/login-register.php:125, includes/process-donation.php:971
5621
  msgid "The username you entered does not exist."
5622
  msgstr ""
5623
 
5624
+ #: includes/login-register.php:122, includes/process-donation.php:947
5625
  msgid "The password you entered is incorrect."
5626
  msgstr ""
5627
 
5637
  msgid "Email address already taken."
5638
  msgstr ""
5639
 
5640
+ #: includes/login-register.php:267, includes/process-donation.php:812, includes/process-donation.php:1012, includes/user-functions.php:373, includes/admin/donors/donor-actions.php:424
5641
  msgid "Invalid email."
5642
  msgstr ""
5643
 
6086
  msgid "Please enter billing state / province / County."
6087
  msgstr ""
6088
 
6089
+ #: includes/process-donation.php:721
6090
  msgid "Please enter Company Name."
6091
  msgstr ""
6092
 
6093
+ #: includes/process-donation.php:817
6094
  msgid "The user information is invalid."
6095
  msgstr ""
6096
 
6097
+ #: includes/process-donation.php:914
6098
  msgid "Please enter your username or email to log in."
6099
  msgstr ""
6100
 
6101
+ #: includes/process-donation.php:949, includes/forms/template.php:1563, templates/shortcode-login.php:52
6102
  msgid "Reset Password"
6103
  msgstr ""
6104
 
6105
+ #: includes/process-donation.php:1038, includes/user-functions.php:363
6106
  msgid "Enter an email."
6107
  msgstr ""
6108
 
6109
+ #: includes/process-donation.php:1226
6110
  msgid "The zip / postal code you entered for your billing address is invalid."
6111
  msgstr ""
6112
 
6113
  #. translators: %s: invalid donation amount
6114
+ #: includes/process-donation.php:1535
6115
  msgid "Donation amount %s is invalid."
6116
  msgstr ""
6117
 
6118
+ #: includes/process-donation.php:1586
6119
  msgid "The First Name and Last Name fields cannot contain an email address or numbers."
6120
  msgstr ""
6121
 
6163
  msgid "Hey! We've raised {total} of the {total_goal} we are trying to raise for this campaign!"
6164
  msgstr ""
6165
 
6166
+ #: includes/shortcodes.php:595, includes/forms/template.php:689, includes/forms/template.php:719, includes/forms/template.php:1937, includes/forms/widget.php:172, includes/gateways/stripe/includes/give-stripe-scripts.php:60, src/Form/Template.php:218, src/Form/Template.php:228, src/Form/Template/Options.php:56, src/Form/Template/Options.php:58, src/Form/Template/Options.php:131, src/Views/Form/Templates/Sequoia/Actions.php:214, src/Views/Form/Templates/Sequoia/Actions.php:259, src/Views/Form/Templates/Sequoia/optionConfig.php:68, src/Views/Form/Templates/Sequoia/optionConfig.php:70, src/Views/Form/Templates/Sequoia/Sequoia.php:67
6167
  msgid "Donate Now"
6168
  msgstr ""
6169
 
7706
  msgid "The city for your billing address."
7707
  msgstr ""
7708
 
7709
+ #: includes/forms/template.php:1268
7710
  msgid "The state, province, or county for your billing address."
7711
  msgstr ""
7712
 
7713
+ #: includes/forms/template.php:1296, includes/forms/template.php:1308
7714
  msgid "Zip / Postal Code"
7715
  msgstr ""
7716
 
7717
+ #: includes/forms/template.php:1298
7718
  msgid "The zip or postal code for your billing address."
7719
  msgstr ""
7720
 
7721
+ #: includes/forms/template.php:1392
7722
  msgid "Registration is required to donate."
7723
  msgstr ""
7724
 
7725
+ #: includes/forms/template.php:1402
7726
  msgid "Create an account"
7727
  msgstr ""
7728
 
7729
+ #: includes/forms/template.php:1403
7730
  msgid "Create an account on the site to see and manage donation history."
7731
  msgstr ""
7732
 
7733
+ #: includes/forms/template.php:1415
7734
  msgid "Already have an account?"
7735
  msgstr ""
7736
 
7737
+ #: includes/forms/template.php:1417, includes/forms/template.php:1554, includes/admin/forms/class-metabox-form-data.php:398, includes/admin/shortcodes/shortcode-give-login.php:24, includes/admin/shortcodes/shortcode-give-login.php:25
7738
  msgid "Login"
7739
  msgstr ""
7740
 
7741
+ #: includes/forms/template.php:1486
7742
  msgid "Log In to Your Account"
7743
  msgstr ""
7744
 
7745
+ #: includes/forms/template.php:1488
7746
  msgid "(optional)"
7747
  msgstr ""
7748
 
7749
+ #: includes/forms/template.php:1494
7750
  msgid "Don't have an account?"
7751
  msgstr ""
7752
 
7753
+ #: includes/forms/template.php:1501
7754
  msgid "Register or donate as a guest &raquo;"
7755
  msgstr ""
7756
 
7757
+ #: includes/forms/template.php:1499
7758
  msgid "Register as a part of your donation &raquo;"
7759
  msgstr ""
7760
 
7761
+ #: includes/forms/template.php:1523, templates/shortcode-login.php:34
7762
  msgid "Username or Email Address"
7763
  msgstr ""
7764
 
7765
+ #: includes/forms/template.php:1532
7766
  msgid "Your username or email"
7767
  msgstr ""
7768
 
7769
+ #: includes/forms/template.php:1538, templates/shortcode-login.php:39, templates/shortcode-register.php:44
7770
  msgid "Password"
7771
  msgstr ""
7772
 
7773
+ #: includes/forms/template.php:1545
7774
  msgid "Your password"
7775
  msgstr ""
7776
 
7777
+ #: includes/forms/template.php:1630
7778
  msgid "Select Payment Method"
7779
  msgstr ""
7780
 
7781
+ #: includes/forms/template.php:1774
7782
  msgid "Please enter valid terms and conditions in <a href=\"%s\">this form's settings</a>."
7783
  msgstr ""
7784
 
7785
+ #: includes/forms/template.php:1789
7786
  msgid "Terms"
7787
  msgstr ""
7788
 
7789
+ #: includes/forms/template.php:1810
7790
  msgid "Show Terms"
7791
  msgstr ""
7792
 
7793
+ #: includes/forms/template.php:1812
7794
  msgid "Hide Terms"
7795
  msgstr ""
7796
 
7797
+ #: includes/forms/template.php:1856, includes/admin/shortcodes/shortcode-give-donor-wall.php:154
7798
  msgid "Donation Total:"
7799
  msgstr ""
7800
 
7801
+ #: includes/forms/template.php:2206, includes/gateways/stripe/includes/class-give-stripe-gateway.php:140, includes/gateways/stripe/includes/class-give-stripe-gateway.php:129, includes/gateways/stripe/includes/class-give-stripe-gateway.php:118
7802
  msgid "Notice:"
7803
  msgstr ""
7804
 
7805
+ #: includes/forms/template.php:2206
7806
  msgid "Test mode is enabled. While in test mode no live donations are processed."
7807
  msgstr ""
7808
 
7809
+ #: includes/forms/template.php:2235
7810
  msgid "Please log in in order to complete your donation."
7811
  msgstr ""
7812
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: donation, donations, donation plugin, wordpress donation plugin, givewp, g
5
  Requires at least: 4.8
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 2.7.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -223,10 +223,19 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
223
 
224
  == Changelog ==
225
 
 
 
 
 
 
 
 
 
 
226
  = 2.7.4: August 4th, 2020 =
227
  * Fix: The uninstall process in v2.7.3 previously resulted in a fatal error due to a change made in the plugin's bootstrapping process. [#4981](https://github.com/impress-org/givewp/issues/4981)
228
 
229
- = 2.7.3: =
230
  * Fix: The Donation Reports were not correctly calculating renewals processed via the Recurring Donations add-on leading to incorrect figures. [#4883](https://github.com/impress-org/givewp/issues/4883)
231
  * Fix: The new Multi-Step Form Template was not correctly marking donations as anonymous if the donor elected to give anonymously. [#4959](https://github.com/impress-org/givewp/issues/4959)
232
  * Fix: Reports have been improved to account for the use of a comma as the currency decimal separator. Previously, when using a ',' as the decimal separator for a currency, it produced inconsistent errors in terms of decimal placement for totals displayed on the Reports page. Furthermore, using a ',' for the decimal separator resulted in consistent misplacement of the decimal in the Average Donations totals. [#4926](https://github.com/impress-org/givewp/issues/4926)
5
  Requires at least: 4.8
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 2.7.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
223
 
224
  == Changelog ==
225
 
226
+ = 2.7.5: August 11th, 2020 =
227
+ * New: Form Templates now support all permalink configurations (or lack there of), including the default value of "plain". [#4952](https://github.com/impress-org/givewp/issues/4952)
228
+ * New: The Donations search bar now allows you to search by like keywords for rather than exact match which makes it a lot easier to find proper results. [#4994](https://github.com/impress-org/givewp/issues/4994)
229
+ * Fix: Revamped the logic for requiring Postal / Zip codes for countries that do not have postal codes. [#5006](https://github.com/impress-org/givewp/issues/5006)
230
+ * Fix: Resolved an issue when using the Multi-Step donation form with the first step disabled would cause the donor to auto-scroll incorrectly on page load. [#5004](https://github.com/impress-org/givewp/issues/5004)
231
+ * Fix: Resolved a database table creation issue for new installs due to bug within our new bootstrapping process. [#5017](https://github.com/impress-org/givewp/issues/5017)
232
+ * Fix: Ensure that the "Title Prefixes" maintain the order of values when saved. [#4992](https://github.com/impress-org/givewp/issues/4992)
233
+ * Fix: The "Donation Form" Block can now properly be re-selected when it's using the new Multi-Step donation form template and the admin loses focus on the block. [#5017](https://github.com/impress-org/givewp/issues/5017)
234
+
235
  = 2.7.4: August 4th, 2020 =
236
  * Fix: The uninstall process in v2.7.3 previously resulted in a fatal error due to a change made in the plugin's bootstrapping process. [#4981](https://github.com/impress-org/givewp/issues/4981)
237
 
238
+ = 2.7.3: July 29th, 2020 =
239
  * Fix: The Donation Reports were not correctly calculating renewals processed via the Recurring Donations add-on leading to incorrect figures. [#4883](https://github.com/impress-org/givewp/issues/4883)
240
  * Fix: The new Multi-Step Form Template was not correctly marking donations as anonymous if the donor elected to give anonymously. [#4959](https://github.com/impress-org/givewp/issues/4959)
241
  * Fix: Reports have been improved to account for the use of a comma as the currency decimal separator. Previously, when using a ',' as the decimal separator for a currency, it produced inconsistent errors in terms of decimal placement for totals displayed on the Reports page. Furthermore, using a ',' for the decimal separator resulted in consistent misplacement of the decimal in the Average Donations totals. [#4926](https://github.com/impress-org/givewp/issues/4926)
src/Route/Form.php CHANGED
@@ -104,12 +104,22 @@ class Form {
104
  * Get form URL.
105
  *
106
  * @since 2.7.0
 
 
107
  * @param int $form_id
108
  *
109
  * @return string
110
  */
111
  public function getURL( $form_id ) {
112
- return home_url( "/{$this->base}/{$form_id}" );
 
 
 
 
 
 
 
 
113
  }
114
 
115
 
104
  * Get form URL.
105
  *
106
  * @since 2.7.0
107
+ * @since 2.8.0 Add support for all permalink settings.
108
+ *
109
  * @param int $form_id
110
  *
111
  * @return string
112
  */
113
  public function getURL( $form_id ) {
114
+ return get_option( 'permalink_structure' )
115
+ ? home_url( "/{$this->base}/{$form_id}" )
116
+ : add_query_arg(
117
+ [
118
+ 'give_form_id' => $form_id,
119
+ 'url_prefix' => $this->base,
120
+ ],
121
+ home_url()
122
+ );
123
  }
124
 
125
 
src/ServiceProviders/LegacyServiceProvider.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace Give\ServiceProviders;
4
 
5
  use Closure;
 
6
 
7
  /**
8
  * Class LegacyServiceProvider
@@ -24,7 +25,6 @@ class LegacyServiceProvider implements ServiceProvider {
24
  * @inheritDoc
25
  */
26
  public function boot() {
27
- register_activation_hook( GIVE_PLUGIN_FILE, 'give_install' );
28
  }
29
 
30
  /**
@@ -181,6 +181,8 @@ class LegacyServiceProvider implements ServiceProvider {
181
  * @since 2.8.0
182
  */
183
  private function bindClasses() {
 
 
184
  $this->bindInstance( 'roles', 'Give_Roles', 'class-give-roles.php' );
185
  $this->bindInstance( 'give_settings', 'Give_Admin_Settings', 'admin/class-admin-settings.php' );
186
  $this->bindInstance( 'api', 'Give_API', 'api/class-give-api.php' );
3
  namespace Give\ServiceProviders;
4
 
5
  use Closure;
6
+ use Give\Route\Form;
7
 
8
  /**
9
  * Class LegacyServiceProvider
25
  * @inheritDoc
26
  */
27
  public function boot() {
 
28
  }
29
 
30
  /**
181
  * @since 2.8.0
182
  */
183
  private function bindClasses() {
184
+ give()->singleton( 'routeForm', Form::class );
185
+
186
  $this->bindInstance( 'roles', 'Give_Roles', 'class-give-roles.php' );
187
  $this->bindInstance( 'give_settings', 'Give_Admin_Settings', 'admin/class-admin-settings.php' );
188
  $this->bindInstance( 'api', 'Give_API', 'api/class-give-api.php' );
src/Views/Form/Templates/Sequoia/assets/js/form.js CHANGED
@@ -7,10 +7,20 @@
7
  const $navigatorTitle = $( '.give-form-navigator .title' );
8
  const $paymentGatewayContainer = $( '#give-payment-mode-select' );
9
  let gatewayAnimating = false;
 
 
 
 
 
 
 
 
 
10
 
11
  const navigator = {
12
  currentStep: templateOptions.introduction.enabled === 'enabled' ? 0 : 1,
13
  animating: false,
 
14
  goToStep: ( step ) => {
15
  // Adjust body height before animating step, to prevent choppy iframe resizing
16
  // Compare next step to current step, and increase body height if next step is taller.
@@ -75,6 +85,10 @@
75
  setupTabOrder();
76
 
77
  setTimeout( function() {
 
 
 
 
78
  if ( steps[ navigator.currentStep ].firstFocus ) {
79
  $( steps[ navigator.currentStep ].firstFocus ).focus();
80
  }
7
  const $navigatorTitle = $( '.give-form-navigator .title' );
8
  const $paymentGatewayContainer = $( '#give-payment-mode-select' );
9
  let gatewayAnimating = false;
10
+ const { wp: parentWp } = window.parent;
11
+
12
+ // Make donation form block selectable in editor
13
+ if ( !! parentWp.data ) {
14
+ $container.on( 'click', function() {
15
+ const blockId = window.frameElement.closest( '.wp-block' ).getAttribute( 'data-block' );
16
+ parentWp.data.dispatch( 'core/block-editor' ).selectBlock( blockId );
17
+ } );
18
+ }
19
 
20
  const navigator = {
21
  currentStep: templateOptions.introduction.enabled === 'enabled' ? 0 : 1,
22
  animating: false,
23
+ firstFocus: false,
24
  goToStep: ( step ) => {
25
  // Adjust body height before animating step, to prevent choppy iframe resizing
26
  // Compare next step to current step, and increase body height if next step is taller.
85
  setupTabOrder();
86
 
87
  setTimeout( function() {
88
+ // Do not auto-focus form on the page load if the first step is disabled
89
+ if ( ! navigator.firstFocus && templateOptions.introduction.enabled === 'disabled' ) {
90
+ return navigator.firstFocus = true;
91
+ }
92
  if ( steps[ navigator.currentStep ].firstFocus ) {
93
  $( steps[ navigator.currentStep ].firstFocus ).focus();
94
  }
src/Views/IframeView.php CHANGED
@@ -299,7 +299,7 @@ class IframeView {
299
 
300
  $iframe_url = add_query_arg(
301
  array_merge( [ 'giveDonationFormInIframe' => 1 ], $query_string ),
302
- trailingslashit( $url )
303
  );
304
 
305
  return GlobalUtils::removeDonationAction( $iframe_url );
299
 
300
  $iframe_url = add_query_arg(
301
  array_merge( [ 'giveDonationFormInIframe' => 1 ], $query_string ),
302
+ $url
303
  );
304
 
305
  return GlobalUtils::removeDonationAction( $iframe_url );
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitfd49bbb1e84e276a3ccee0bd6dd9fcee::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5ee4849b2cb4835613484b13812ef9e2::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitfd49bbb1e84e276a3ccee0bd6dd9fcee
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitfd49bbb1e84e276a3ccee0bd6dd9fcee
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitfd49bbb1e84e276a3ccee0bd6dd9fcee', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitfd49bbb1e84e276a3ccee0bd6dd9fcee', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5ee4849b2cb4835613484b13812ef9e2
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit5ee4849b2cb4835613484b13812ef9e2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit5ee4849b2cb4835613484b13812ef9e2', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit5ee4849b2cb4835613484b13812ef9e2::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -64,9 +64,9 @@ class ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee
64
  public static function getInitializer(ClassLoader $loader)
65
  {
66
  return \Closure::bind(function () use ($loader) {
67
- $loader->prefixLengthsPsr4 = ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee::$prefixLengthsPsr4;
68
- $loader->prefixDirsPsr4 = ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee::$prefixDirsPsr4;
69
- $loader->classMap = ComposerStaticInitfd49bbb1e84e276a3ccee0bd6dd9fcee::$classMap;
70
 
71
  }, null, ClassLoader::class);
72
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5ee4849b2cb4835613484b13812ef9e2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
64
  public static function getInitializer(ClassLoader $loader)
65
  {
66
  return \Closure::bind(function () use ($loader) {
67
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5ee4849b2cb4835613484b13812ef9e2::$prefixLengthsPsr4;
68
+ $loader->prefixDirsPsr4 = ComposerStaticInit5ee4849b2cb4835613484b13812ef9e2::$prefixDirsPsr4;
69
+ $loader->classMap = ComposerStaticInit5ee4849b2cb4835613484b13812ef9e2::$classMap;
70
 
71
  }, null, ClassLoader::class);
72
  }