/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/assets/dist/js
NameSizeModeActions
admin-add-ons.js81130644editdlrm
admin-free-addon-modal.js1499860644editdlrm
admin-onboarding-wizard.js7546960644editdlrm
admin-reports-widget.js6982270644editdlrm
admin-reports.js10430690644editdlrm
admin-setup.js3050644editdlrm
admin-shortcodes.js25970644editdlrm
admin-upsell-addons-page.js1949140644editdlrm
admin-upsell-recurring-donations-settings-tab.js1510610644editdlrm
admin-upsell-sale-banner.js6880644editdlrm
admin-widgets.js55420644editdlrm
admin.js2795370644editdlrm
donor-dashboards-app.js12490320644editdlrm
donor-dashboards-block.js46580644editdlrm
give-admin-donation-forms.js8183080644editdlrm
give-classic-template.js131200644editdlrm
give-donation-summary.js84550644editdlrm
give-log-list-table-app.js7893940644editdlrm
give-migrations-list-table-app.js7874700644editdlrm
give-sequoia-template.js153000644editdlrm
give-stripe-becs.js38590644editdlrm
give-stripe-sepa.js38610644editdlrm
give-stripe.js75790644editdlrm
give.js1582780644editdlrm
gutenberg.js2650130644editdlrm
paypal-commerce.js403930644editdlrm
plugin-deactivation-survey.js310380644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/assets/dist/js/admin.js (279537B)
(()=>{var e={87757:(e,t,n)=>{e.exports=n(35666)},50743:function(e,t){!function(n,i){var o={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},r=Array.prototype.map,a=Array.isArray,s=Object.prototype.toString;function l(e){return!!(""===e||e&&e.charCodeAt&&e.substr)}function c(e){return a?a(e):"[object Array]"===s.call(e)}function d(e){return e&&"[object Object]"===s.call(e)}function u(e,t){var n;for(n in e=e||{},t=t||{})t.hasOwnProperty(n)&&null==e[n]&&(e[n]=t[n]);return e}function f(e,t,n){var i,o,a=[];if(!e)return a;if(r&&e.map===r)return e.map(t,n);for(i=0,o=e.length;i3?l.length%3:0;return s+(p?l.substr(0,p)+r.thousand:"")+l.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+r.thousand)+(a?r.decimal+g(Math.abs(e),a).split(".")[1]:"")},_=o.formatMoney=function(e,t,n,i,r,a){if(c(e))return f(e,(function(e){return _(e,t,n,i,r,a)}));e=m(e);var s=u(d(t)?t:{symbol:t,precision:n,thousand:i,decimal:r,format:a},o.settings.currency),l=p(s.format);return(e>0?l.pos:e<0?l.neg:l.zero).replace("%s",s.symbol).replace("%v",v(Math.abs(e),h(s.precision),s.thousand,s.decimal))};o.formatColumn=function(e,t,n,i,r,a){if(!e)return[];var s=u(d(t)?t:{symbol:t,precision:n,thousand:i,decimal:r,format:a},o.settings.currency),g=p(s.format),_=g.pos.indexOf("%s")0?g.pos:e<0?g.neg:g.zero).replace("%s",s.symbol).replace("%v",v(Math.abs(e),h(s.precision),s.thousand,s.decimal));return n.length>b&&(b=n.length),n}));return f(y,(function(e,t){return l(e)&&e.length{jQuery(document).ready((function(e){function t(t){var n=void 0!==t.standard_fields&&null!==t.standard_fields?t.standard_fields:"",i=e(".give-export-donations-standard-fields ul");n.length>0&&(i.closest("tr").removeClass("give-hidden"),e(n).each((function(e,t){i.append('
  • ")})));var o=void 0!==t.hidden_fields&&null!==t.hidden_fields?t.hidden_fields:"",r=e(".give-export-donations-hidden-fields ul");o&&(r.closest("tr").removeClass("give-hidden"),e(o).each((function(e,t){r.append('
  • ")})))}e(".give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags").change((function(){var n,i,o;n=e("form#give-export_donations-form"),i=e(n).find("tr.give-export-donation-form .give-select-chosen"),o=i.prev(),i.find('input[type="text"]'),i.hasClass("variations"),e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_form_search",s:"",fields:e(n).serialize()},beforeSend:function(){o.closest("ul.chosen-results").empty()},success:function(r){e("option",o).remove();var a=[];r.length?(n.find(".give-export-donation-button").prop("disabled",!1),e.each(r,(function(e,t){o.prepend('"),a.push(t.id)})),o.prepend('")):(o.prepend('"),n.find(".give-export-donation-button").prop("disabled",!0)),n.find(".form_ids").val(a.join()),i.prev("select.give-select-chosen").trigger("chosen:updated"),t("")}})})),e(".give-export_donations #give-export_donations-form #give_payment_form_select").change((function(){var n;if(e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),jQuery(document).trigger("give_export_donations_form_change"),!(n=e(this).val()))return!1;e.ajax({type:"POST",url:ajaxurl,data:{form_id:n,action:"give_export_donations_get_custom_fields"},success:function(e){e?t(e):alert(Give.fn.getGlobalVar("error_message")),jQuery(document).trigger("give_export_donations_form_response",e)}})}));var n=e('.give-export-option-fields input[type="checkbox"]');e(".give-toggle-checkbox-selection").click((function(){var t,i,o,r;e(this).data("clicked",!e(this).data("clicked")),n.prop("checked",!e(this).data("clicked")),i=e(t=this).val(),o=e(t).attr("data-value"),i=(r=[o,i])[0],o=r[1],e(t).attr("value",i),e(t).attr("data-value",o)}))}))},89953:()=>{function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n .cmb-repeatable-grouping").each((function(e,r){(o=n(this).find("input.give-level-id-input").val())>i&&(i=o),t++})),void 0!==i&&i>=t?parseInt(i)+1:t);n(e).find("input.give-level-id-input").val(r),n(e).find(".give-level-id").text(r)}(t)})),n("body").on("cmb2_shift_rows_complete",(function(e,t){n(".cmb-repeatable-grouping").each((function(e,t){var i=n(t).find("input.give-level-id-input").val();n(t).find(".give-level-id").text(i)}))}))},n((function(){n("body").on("change",".give-give_default_radio_inline",(function(){n(".give-give_default_radio_inline").prop("checked",!1),n(this).prop("checked",!0)})),function(){n("._give_price_option_field input:radio").on("change",(function(){"set"===n("._give_price_option_field input:radio:checked").val()?(n("._give_set_price_field").show(),n("#_give_donation_levels_field").hide(),n("._give_display_style_field").hide()):(n("._give_set_price_field").hide(),n("#_give_donation_levels_field").show(),n("._give_display_style_field").show())})).change(),n("._give_display_content_field input:radio").on("change",(function(){"enabled"===n("._give_display_content_field input:radio:checked").val()?(n("._give_content_placement_field").show(),n("._give_form_content_field").show()):(n("._give_content_placement_field").hide(),n("._give_form_content_field").hide())})).change(),n("._give_terms_option_field input:radio").on("change",(function(){"enabled"===n("._give_terms_option_field input:radio:checked").val()?(n("._give_agree_label_field").show(),n("._give_agree_text_field").show()):(n("._give_agree_label_field").hide(),n("._give_agree_text_field").hide())})).change(),n("._give_payment_display_field input:radio").on("change",(function(){"onpage"===n("._give_payment_display_field input:radio:checked").val()?n("._give_reveal_label_field").hide():n("._give_reveal_label_field").show()})).change(),n("._give_custom_amount_field input:radio").on("change",(function(){"disabled"===n("._give_custom_amount_field input:radio:checked").val()?(n("._give_custom_amount_range_field ").hide(),n("._give_custom_amount_text_field").hide()):(n("._give_custom_amount_range_field ").show(),n("._give_custom_amount_text_field").show())})).change();var e=n("._give_goal_option_field"),t=n("._give_goal_format_field input:radio");n("._give_close_form_when_goal_achieved_field input:radio").on("change",(function(){"disabled"===n("._give_close_form_when_goal_achieved_field input:radio:checked").val()?n("._give_form_goal_achieved_message_field").hide():n("._give_form_goal_achieved_message_field").show()})).change(),e.on("change",(function(){"disabled"===n("._give_goal_option_field input:radio:checked").val()?(n("._give_set_goal_field").hide(),n("._give_goal_format_field").hide(),n("._give_goal_color_field").hide(),n("._give_close_form_when_goal_achieved_field").hide(),n("._give_form_goal_achieved_message_field").hide(),n("._give_number_of_donation_goal_field").hide(),n("._give_number_of_donor_goal_field").hide()):(n("._give_set_goal_field").show(),n("._give_goal_format_field").show(),n("._give_goal_color_field").show(),n("._give_close_form_when_goal_achieved_field").show(),"enabled"===n("._give_close_form_when_goal_achieved_field input:radio:checked").val()&&n("._give_form_goal_achieved_message_field").show(),t.change())})).change(),t.on("change",(function(){var e=n("._give_goal_format_field input:radio:checked").val(),t=n("._give_goal_option_field input:radio:checked").val();"donation"===e?(n("._give_set_goal_field, ._give_number_of_donor_goal_field,._give_number_of_donation_goal_field").hide(),"disabled"!==t&&n("._give_number_of_donation_goal_field").show()):"donors"===e?(n("._give_set_goal_field, ._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field").hide(),"disabled"!==t&&n("._give_number_of_donor_goal_field").show()):("disabled"===t?n("._give_set_goal_field").hide():n("._give_set_goal_field").show(),n("._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field").hide())})).change(),n("._give_customize_offline_donations_field input:radio").on("change",(function(){"enabled"===n("._give_customize_offline_donations_field input:radio:checked").val()?(n("._give_offline_checkout_notes_field").show(),n("._give_offline_donation_enable_billing_fields_single_field").show(),n("._give_offline_donation_subject_field").show(),n("._give_offline_donation_email_field").show()):(n("._give_offline_checkout_notes_field").hide(),n("._give_offline_donation_enable_billing_fields_single_field").hide(),n("._give_offline_donation_subject_field").hide(),n("._give_offline_donation_email_field").hide())})).change(),n("._give_email_options_field input:radio").on("change",(function(){"enabled"===n("._give_email_options_field input:radio:checked").val()?n("#email_notification_options .give-field-wrap:not(._give_email_options_field)").show():n("#email_notification_options .give-field-wrap:not(._give_email_options_field)").hide()})).change();var i=n('input[name="_give_name_title_prefix"]:checked').val();"required"!==i&&"optional"!==i||n(".give-title-prefixes-wrap").show(),n('input[name="_give_name_title_prefix"]').on("change",(function(){var e=n('input[name="_give_name_title_prefix"]:checked').val();"required"===e||"optional"===e?n(".give-title-prefixes-wrap").show():n(".give-title-prefixes-wrap").hide()}))}(),i(),n(".cmb2-text-money").each((function(e,t){parseInt(n(t).val())||n(t).removeAttr("value")})),function(){function t(){n("[data-field-visibility]").each((function(){var t=n(this).data("field-visibility"),i=!1;Object.entries(t).forEach((function(t){var o=e(t,2),r=o[0],a=o[1],s=n('[name="'+r+'"]');s&&s.each((function(){var e=n(this),t=e.attr("type");if(!t||"radio"!==t&&"checkbox"!==t){if(e.val()==a)return void(i=!0)}else if(e.is(":checked")&&e.val()==a)return void(i=!0)}))})),n(this).parents(".give-field-wrap").toggle(i)}))}t(),n(".give-visibility-handler").on("change",t)}()}))},96066:()=>{jQuery(document).ready((function(){if("undefined"!=typeof URLSearchParams&&window.history){var e=new URLSearchParams(window.location.search);if(!e.has("give-run-migration")&&!e.has("give-clear-update"))return;e.delete("give-run-migration"),e.delete("give-clear-update");var t="".concat(window.location.origin).concat(window.location.pathname,"?").concat(e);window.history.replaceState({},"",t)}}))},4559:()=>{jQuery(document).ready((function(e){var t=jQuery("ul.give-payment-gatways-list");t.length&&t.sortable();var n="#give-mainform #currency",i="#give-mainform #currency_position";e("body").on("change",n,(function(){var t=e(n+" option:selected").val(),o=JSON.parse(e(this).attr("data-formatting-setting")),r=afterText={},a=o[t],s=e("#thousands_separator","#give-mainform"),l=e("#decimal_separator","#give-mainform"),c=e("#number_decimals","#give-mainform");r=e(i).data("before-template").replace("{currency_pos}",a.symbol),e(i+' option[value="before"]').text(r),afterText=e(i).data("after-template").replace("{currency_pos}",a.symbol),e(i+' option[value="after"]').text(afterText),s.val(a.setting.thousands_separator).trigger("blur"),l.val(a.setting.decimal_separator).trigger("blur"),c.val(a.setting.number_decimals).trigger("blur")})),"disabled"!==e('input[name="name_title_prefix"]:checked').val()&&e(".give-title-prefixes-settings-wrap").show(),e('input[name="name_title_prefix"]').on("change",(function(){"disabled"!==e(this).val()?e(".give-title-prefixes-settings-wrap").show():e(".give-title-prefixes-settings-wrap").hide()})),e("a.give-repeat-setting-field").on("click",(function(t){t.preventDefault();var n=e(this).parents("td"),i=e("p:first-child",n).clone(),o=e("p",n).not(".give-field-description").length,r=e(this).data("id")+"_"+ ++o,a=e(this).prev();return e("input",a).val()&&(e(this).before(i),a=e(this).prev(),e("input",a).attr("id",r),e("input",a).val("")),!1})),e(".give-settings-page").on("click","span.give-remove-setting-field",(function(t){e(this).parents("p").remove()})),e(".give-email-notification-status","table.giveemailnotifications").on("click",(function(){var t=e(this),n=e("i",t),i=e(this).next(),o=e(this).hasClass("give-email-notification-enabled")?"disabled":"enabled",r=e(this).data("id");if(!parseInt(t.data("edit")))return function(t){e("div.give-email-notification-status-notice").remove(),e(".wp-heading-inline").after('

    '.concat(t.data("notice"),"

    "));var n=e("div.give-email-notification-status-notice");n.length&&e("html, body").animate({scrollTop:n.position().top},"slow")}(t),!1;e.ajax({url:ajaxurl,method:"POST",data:{action:"give_set_notification_status",status:o,notification_id:r},beforeSend:function(){t.hide(),i.addClass("is-active")},success:function(e){e.success&&(t.removeClass("give-email-notification-"+t.data("status")),t.addClass("give-email-notification-"+o),t.data("status",o),"enabled"===o?(n.removeClass("dashicons-no-alt"),n.addClass("dashicons-yes")):(n.removeClass("dashicons-yes"),n.addClass("dashicons-no-alt")),i.removeClass("is-active"),t.show())}})})),e("#give-clear-cache").on("click",(function(){e.ajax({url:ajaxurl,type:"GET",data:{action:"give_cache_flush"}}).done((function(e){e.success?new Give.modal.GiveSuccessAlert({modalContent:{title:Give.fn.getGlobalVar("flush_success"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render():new Give.modal.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("flush_error"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}))}));var o=Give.fn.getGlobalVar("decimal_separator"),r=Give.fn.getGlobalVar("thousands_separator"),a=/\(([^)]+)\)/,s={position:Give.fn.getGlobalVar("currency_pos"),symbol:Give.fn.getGlobalVar("currency_sign"),precision:Give.fn.getGlobalVar("number_decimals"),decimal:Give.fn.getGlobalVar("decimal_separator"),thousand:Give.fn.getGlobalVar("thousands_separator")};e("#number_decimals, #decimal_separator, #thousands_separator, #currency_position, #currency").on("input blur change",(function(t){var n=e("#currency_preview"),i=e("#decimal_separator"),l=e("#thousands_separator"),c=t.target.name,d=t.target.value;if("number_decimals"!==c||"input"!==t.type&&"blur"!==t.type||(d&&!isNaN(d)||"blur"!==t.type||(t.target.value=Give.fn.getGlobalVar("number_decimals")),s.precision=isNaN(parseInt(d))?Give.fn.getGlobalVar("number_decimals"):parseInt(d)),"decimal_separator"!==c||"input"!==t.type&&"blur"!==t.type||(d||"blur"!==t.type||(t.target.value=o),s.decimal=d,s.hasOwnProperty("thousand")&&"input"===t.type?s.decimal===s.thousand&&(s.thousand=o,l.val(o),o=d,r=l.val()):s.decimal===Give.fn.getGlobalVar("thousands_separator")&&"input"===t.type&&(s.thousand=o,l.val(o),o=d,r=l.val())),"thousands_separator"!==c||"input"!==t.type&&"blur"!==t.type||(d||"blur"!==t.type||(t.target.value=r),s.thousand=d,s.hasOwnProperty("decimal")&&"input"===t.type?s.decimal===s.thousand&&(s.decimal=r,i.val(r),r=d,o=i.val()):s.thousand===Give.fn.getGlobalVar("decimal_separator")&&"input"===t.type&&(s.decimal=r,i.val(r),r=d,o=i.val())),"currency_position"===c&&"change"===t.type&&(s.position=d),"currency"===c&&"change"===t.type){s.currency=d;var u=a.exec(t.target[t.target.selectedIndex].text);s.symbol=u[1]}n.val(Give.fn.formatCurrency("123456.12345",s,{}))}))})),document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".give-settings-section-content");if(null!==e){var t=e.querySelector(".give-settings-section-group-menu");if(null!==t){var n=Array.prototype.slice.call(e.querySelectorAll(".give-settings-section-group")),i=Array.from(t.querySelectorAll("ul li a")).concat(Array.from(e.querySelectorAll("ul.give-subsubsub li a")));null!==i&&i.forEach((function(t){t.addEventListener("click",(function(t){var o,r;if(t.target.hasAttribute("data-subgroup")){var a=t.target.parentElement.parentElement,s=a.parentElement;o=t.target.getAttribute("data-subgroup"),r=e.querySelector("#give-settings-section-subgroup-".concat(o)),a.querySelectorAll("a").forEach((function(e){e.classList.remove("current")})),s.querySelectorAll(".give-settings-section-subgroup ").forEach((function(e){return e.classList.add("give-hidden")})),t.target.classList.add("current")}else o=t.target.getAttribute("data-group"),r=e.querySelector("#give-settings-section-group-".concat(o)),i.forEach((function(e){e.classList.remove("active")})),n.map((function(e){return e.classList.add("give-hidden")})),t.target.classList.add("active");return r.classList.remove("give-hidden"),history.pushState({urlPath:t.target.getAttribute("href")},"",t.target.getAttribute("href")),t.preventDefault(),!1}))}))}}}))},74241:()=>{var e,t,n,i;e=jQuery,t=function(){var t=e('[class*="sequoia[introduction][headline]_field"], [class*="sequoia[introduction][description]_field"], [class*="sequoia[introduction][image]_field"], [class*="sequoia[introduction][donate_label]_field"]');0===e('input[name="sequoia[introduction][enabled]"]').length||e('input[name="sequoia[introduction][enabled]"]').prop("checked")?e(t).show():e(t).hide()},n=function(){var t=e('[class*="sequoia[payment_information][donation_summary_heading]_field"], [class*="sequoia[payment_information][donation_summary_location]_field"]');0===e('input[name="sequoia[payment_information][donation_summary_enabled]"]').length||e('input[name="sequoia[payment_information][donation_summary_enabled]"]').prop("checked")?e(t).show():e(t).hide()},i=function(){var t=e('[class*="sequoia[thank-you][sharing_instruction]_field"], [class*="sequoia[thank-you][twitter_message]_field"]');0===e('input[name="sequoia[thank-you][sharing]"]').length||e('input[name="sequoia[thank-you][sharing]"]').prop("checked")?e(t).show():e(t).hide()},e(document).ready((function(){e("#form_template_options").on("click",".js-template--activate",(function(t){t.preventDefault();var n=e(this).parents(".templates-list"),i=n.parent(),o=e(this).parents(".template-info").attr("data-id");e(".template-info",n).removeClass("active"),i.find(".template-options.".concat(o)).addClass("active"),e(this).text(Give.fn.getGlobalVar("deactivate")),e(this).removeClass("js-template--activate"),e(this).addClass("js-template--deactivate"),e(this).parents(".template-info").addClass("active"),i.addClass("has-activated-template"),i.prev("input[name=_give_form_template]").val(o).trigger("change")})),e("#form_template_options").on("click",".js-template--deactivate",(function(t){t.preventDefault();var n=e(this).parents(".templates-list"),i=n.parent(),o=e(this).parents(".template-info").attr("data-id");e(".template-info",n).removeClass("active"),i.find(".template-options.".concat(o)).removeClass("active"),e(this).text(Give.fn.getGlobalVar("activate")),e(this).removeClass("js-template--deactivate"),e(this).addClass("js-template--activate"),i.removeClass("has-activated-template"),i.prev("input[name=_give_form_template]").val("").trigger("change")})),e(".post-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #save-action input[type=submit]").add(".post-php.post-type-give_forms #save-action input[type=submit]").on("click",(function(){return!!e("input[name=_give_form_template]","#form_template_options").val()||(new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:Give.fn.getGlobalVar("form_template_required").title,desc:Give.fn.getGlobalVar("form_template_required").desc}}).render(),"form_template_options"!==Give.fn.getParameterByName("give_tab")&&e('a[href="#form_template_options"]').trigger("click"),!1)})),t(),e('input[name="sequoia[introduction][enabled]"]').on("change",(function(){t()})),n(),e('input[name="sequoia[payment_information][donation_summary_enabled]"]').on("change",(function(){n()})),i(),e('input[name="sequoia[thank-you][sharing]"]').on("change",(function(){i()}))}))},69571:()=>{!function(e){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),e.addDynamicEventListener=function(e,t,n,i,o){e.addEventListener(t,function(e,t){return function(n){n.target&&n.target.matches(e)&&t.apply(this,arguments)}}(n,i),o)}}(window)},65962:()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}!function(t){"use strict";t.extend({giveAjaxifyFields:function(n){var i,o,r=t.extend({},{type:"",parentWrapper:"form",countryFieldName:"country",stateFieldName:"state",stateFieldWrapper:".give-field-wrap",chosenState:!0},n||{});if("country_state"===r.type){if(i=t('select[name="'+r.countryFieldName+'"]'),o=i.closest(r.parentWrapper),!i.length||"Country_state"===i.data("give-ajaxify-field"))return;i.data("give-ajaxify-field","country_state"),i.change((function(){var n=t(this),i=n.closest(r.parentWrapper).find('[name="'+r.stateFieldName+'"]'),a=i.closest(r.stateFieldWrapper),s=t("label",a);r.stateFieldWrapper||(s=t('label[for="'+r.stateFieldName+'"]',o),a=i.parent());var l={action:"give_get_states",country:n.val(),field_name:r.stateFieldName};t.post(ajaxurl,l,(function(n){n.show_field?(s.length&&s.text(n.states_label),r.chosenState&&i.chosen("destroy"),r.stateFieldWrapper?a.removeClass("give-hidden"):i.removeClass("give-hidden"),void 0!==e(n.states_found)&&!0===n.states_found?(i.replaceWith(n.data),i=t('[name="'+r.stateFieldName+'"]',a),r.chosenState&&i.chosen()):(i.replaceWith(''),i=t('[name="'+r.stateFieldName+'"]',a))):r.stateFieldWrapper?a.addClass("give-hidden"):i.addClass("give-hidden")}))}))}return this}})}(jQuery)},45099:()=>{jQuery.fn.giveHintCss=function(e,t){return this.each((function(){var n=jQuery(this);t=jQuery.extend({label:""},t);var i=n.next("span.give-hint-tooltip-js");if(!i.length){var o=t.label.length?t.label:n.data("hint-aria-label");if(!o.length)return;n.after(''),(i=n.next()).css({top:-n.outerHeight(),left:-n.outerWidth()/2})}"show"===e?i.addClass("hint--always"):"hide"===e&&i.removeClass("hint--always")}))},jQuery(document).ready((function(e){var t=e("[data-tooltip]");function n(t){if(!t.is('[class*="hint"]')){var n=t.attr("class"),i=[],o=t.data("tooltip").split(" ").length;n&&(n=n.split(" "),(i=e.grep(n,(function(e){return-1!==e.indexOf("give-icon")}))).length&&(i=i.join(" "),t.removeClass(i),t.append(''))),t.addClass("hint--top"),15{jQuery(document).ready((function(e){e("body").on("click",".notice-dismiss",(function(t){var n=e(this).parent().parent();n.hasClass("give-notice")&&(t.preventDefault(),n.fadeTo(100,0,(function(){n.slideUp(100,(function(){n.remove()}))})))}))}))},28345:()=>{var e={collection:{},get:function(e,t,n){return jQuery?(t=void 0!==t?t:void 0,n=!0===n,(void 0===this.collection[e]||n)&&(this.collection[e]=void 0!==t?jQuery(e,t):jQuery(e)),this.collection[e]):-1}};window.Give_Selector_Cache=e},2601:()=>{document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("div[data-give-dismissible]").forEach((function(e){var t="give-dismissed-".concat(e.dataset.giveDismissible);window.localStorage.getItem(t)||(e.classList.remove("hidden"),e.addEventListener("click",(function(n){n.target.classList.contains("notice-dismiss")&&window.localStorage.setItem(t,Date.now()),n.target.classList.contains("give-donor-dashboard-upgrade-notice__dismiss-link")&&(e.classList.add("hidden"),window.localStorage.setItem(t,Date.now()))})))}))}))},36364:()=>{var e=wp.i18n,t=e.__;e.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=document.body.classList.contains("post-php")?".post-php":".post-new-php",n=document.querySelector("".concat(e,'.post-type-give_forms form[name="post"]'));n&&n.addEventListener("submit",(function(e){var n=document.querySelector('#stripe_form_account_options [name="give_stripe_per_form_accounts"]:checked');n&&("enabled"===n.value&&(!!document.querySelector("#stripe_form_account_options .give-stripe-account-manager-list-item.give-stripe-boxshadow-option-wrap__selected")||(e.preventDefault(),new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:t("Select a Stripe Account","give"),desc:t("You've selected to customize the Stripe account for this form, but not selected a different account. Please set an account as default for this form on the Stripe settings tab.","give")}}).render(),"stripe_form_account_options"!==Give.fn.getParameterByName("give_tab")&&document.querySelector('a[href="#stripe_form_account_options"]').click())))}))}))},20252:()=>{var e=wp.i18n,t=e.__;e.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var n=e.target,i=t("Disconnect Stripe Account","give"),o=t("Are you sure you want to disconnect this Stripe account?","give");new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:i,desc:o},successConfirm:function(){fetch(n.getAttribute("href")).then((function(e){return e.json()})).then((function(e){e.success&&window.location.reload()}))}}).render()}))}))}))},49448:()=>{var e=wp.i18n,t=e.__,n=e.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-account-set-default"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var i,o=e.target.parentElement.parentElement.parentElement.parentElement,r=o.querySelector(".give-stripe-account-email .give-stripe-connect-data-field"),a=o.querySelector('input[name="setting-page"]').value,s="",l=n("

    %1$s
    %2$s

    ",t("Account Name","give"),e.target.parentElement.parentElement.querySelector(".give-stripe-account-name .give-stripe-connect-data-field").textContent);r&&(s=n("

    %1$s
    %2$s

    ",t("Account Email","give"),r.textContent));var c=n('%2$s',"https://givewp.com/documentation/core/payment-gateways/stripe-free/using-multiple-stripe-accounts-on-a-single-givewp-site/",t("View Documentation >","give"));i=n(t("global"===a?"Please confirm you’d like to set the account below as the new default Stripe account. All donation forms set to inherit the Global Settings will use this new default account. %1$s
    %2$s%3$s":"Please confirm you’d like to set the account below as the new default Stripe account for this donation form. All donations will process through this Stripe account rather than the Global default Stripe account. %1$s
    %2$s%3$s","give"),c,l,s),new Give.modal.GiveConfirmModal({classes:{modalWrapper:"give-modal--warning give-stripe-modal-new-default"},modalContent:{title:n('%s',t("Confirm New Default Account","give")),desc:i},successConfirm:function(t){var n=new XMLHttpRequest,i=new FormData,o=Give.fn.getGlobalVar("post_id");i.append("action","give_stripe_set_account_default"),i.append("account_slug",e.target.getAttribute("data-account")),i.append("form_id",o),n.open("POST",ajaxurl),n.onload=function(){var e=JSON.parse(n.response);200===n.status&&e.success&&window.location.reload()},n.send(i)}}).render()}))}))}))},99560:function(e,t,n){var i;!function(o){"use strict";function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,i,o,a){return r((s=r(r(t,e),r(i,a)))<<(l=o)|s>>>32-l,n);var s,l}function s(e,t,n,i,o,r,s){return a(t&n|~t&i,e,t,o,r,s)}function l(e,t,n,i,o,r,s){return a(t&i|n&~i,e,t,o,r,s)}function c(e,t,n,i,o,r,s){return a(t^n^i,e,t,o,r,s)}function d(e,t,n,i,o,r,s){return a(n^(t|~i),e,t,o,r,s)}function u(e,t){var n,i,o,a,u;e[t>>5]|=128<>>9<<4)]=t;var f=1732584193,h=-271733879,p=-1732584194,m=271733878;for(n=0;n>5]>>>t%32&255);return n}function h(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+i.charAt(15&t);return o}function m(e){return unescape(encodeURIComponent(e))}function g(e){return function(e){return f(u(h(e),8*e.length))}(m(e))}function v(e,t){return function(e,t){var n,i,o=h(e),r=[],a=[];for(r[15]=a[15]=void 0,o.length>16&&(o=u(o,8*e.length)),n=0;n<16;n+=1)r[n]=909522486^o[n],a[n]=1549556828^o[n];return i=u(r.concat(h(t)),512+8*t.length),f(u(a.concat(i),640))}(m(e),m(t))}function _(e,t,n){return t?n?v(t,e):p(v(t,e)):n?g(e):p(g(e))}void 0===(i=function(){return _}.call(t,n,t,e))||(e.exports=i)}()},90858:function(){(function(){var e,t,n,i,o={}.hasOwnProperty;(i=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,o,r,a;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),a=[],n=0,i=(r=e.childNodes).length;n"+this.escape_html(e.group_label)+""+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},e.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,n,i,o,r,a,s;for(t="",s=0,o=0,r=(a=this.results_data).length;o=this.max_shown_results));o++);return t},e.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),e.style&&(n.style.cssText=e.style),n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.highlighted_html||e.html,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&e.active_options>0?((t=[]).push("group-result"),e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),n.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,n,i,o;for(o=[],e=0,t=(n=this.results_data).length;e"+this.escape_html(n)+""+this.escape_html(p)),null!=u&&(u.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),d<1&&s.length?(this.update_results_content(""),this.no_results(s)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,n;return n=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),t=this.case_sensitive_search?"":"i",new RegExp(n,t)},e.prototype.search_string_match=function(e,t){var n;return n=t.exec(e),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},e.prototype.choices_count=function(){var e,t,n;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(n=this.form_field.options).length;e0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'\n '+this.default_text+'\n
    \n
    \n
    \n \n
      \n
      '},e.prototype.get_multi_html=function(){return'
        \n
      • \n \n
      • \n
      \n
      \n
        \n
        '},e.prototype.get_no_results_html=function(e){return'
      • \n '+this.results_none_found+" "+this.escape_html(e)+"\n
      • "},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),(e=jQuery).fn.extend({chosen:function(i){return t.browser_is_supported()?this.each((function(t){var o,r;r=(o=e(this)).data("chosen"),"destroy"!==i?r instanceof n||o.data("chosen",new n(this,i)):r instanceof n&&r.destroy()})):this}}),n=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(n,t),n.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var t,n;return(t=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),n={class:t.join(" "),title:this.form_field.title},this.form_field.id.length&&(n.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=e("
        ",n),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){var e;return this.container.on("touchstart.chosen",(e=this,function(t){e.container_mousedown(t)})),this.container.on("touchend.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.on("mousedown.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.container.on("mouseup.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.on("mouseenter.chosen",function(e){return function(t){e.mouse_enter(t)}}(this)),this.container.on("mouseleave.chosen",function(e){return function(t){e.mouse_leave(t)}}(this)),this.search_results.on("mouseup.chosen",function(e){return function(t){e.search_results_mouseup(t)}}(this)),this.search_results.on("mouseover.chosen",function(e){return function(t){e.search_results_mouseover(t)}}(this)),this.search_results.on("mouseout.chosen",function(e){return function(t){e.search_results_mouseout(t)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(e){return function(t){e.search_results_mousewheel(t)}}(this)),this.search_results.on("touchstart.chosen",function(e){return function(t){e.search_results_touchstart(t)}}(this)),this.search_results.on("touchmove.chosen",function(e){return function(t){e.search_results_touchmove(t)}}(this)),this.search_results.on("touchend.chosen",function(e){return function(t){e.search_results_touchend(t)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(e){return function(t){e.results_update_field(t)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(e){return function(t){e.activate_field(t)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(e){return function(t){e.close_field(t)}}(this)),this.search_field.on("blur.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.on("keyup.chosen",function(e){return function(t){e.keyup_checker(t)}}(this)),this.search_field.on("keydown.chosen",function(e){return function(t){e.keydown_checker(t)}}(this)),this.search_field.on("focus.chosen",function(e){return function(t){e.input_focus(t)}}(this)),this.search_field.on("cut.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.search_field.on("paste.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(e){return function(t){e.choices_click(t)}}(this)):this.container.on("click.chosen",(function(e){e.preventDefault()}))},n.prototype.destroy=function(){return e(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return!t||"mousedown"!==(n=t.type)&&"touchstart"!==n||this.results_showing||t.preventDefault(),null!=t&&e(t.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},n.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},n.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return e(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(t){var n;return(n=e(t.target).closest(".chosen-container")).length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(e){var t,n,i,o,r;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),o=(i=parseInt(this.search_results.css("maxHeight"),10))+(r=this.search_results.scrollTop()),(t=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(t-i>0?t-i:0);if(n0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(t){var n;if((n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first()).length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},n.prototype.search_results_mouseover=function(t){var n;if(n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first())return this.result_do_highlight(n)},n.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result")||e(t.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(t){var n,i,o;return n=e("
      • ",{class:"search-choice"}).html(""+this.choice_label(t)+""),t.disabled?n.addClass("search-choice-disabled"):((i=e("",{class:"search-choice-close","data-option-array-index":t.array_index})).on("click.chosen",(o=this,function(e){return o.choice_destroy_link_click(e)})),n.append(i)),this.search_container.before(n)},n.prototype.choice_destroy_link_click=function(t){if(t.preventDefault(),t.stopPropagation(),!this.is_disabled)return this.choice_destroy(e(t.target))},n.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(e){var t,n;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),(n=this.results_data[t[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},n.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return e.trim(this.get_search_field_value())},n.prototype.escape_html=function(t){return e("
        ").text(t).html()},n.prototype.winnow_results_set_highlight=function(){var e,t;if(null!=(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},n.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var t,n,i,o,r,a,s;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},n=0,i=(a=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;n").css(r)).text(this.get_search_field_value()),e("body").append(t),s=t.width()+25,t.remove(),this.container.is(":visible")&&(s=Math.min(this.container.outerWidth()-10,s)),this.search_field.width(s)}},n.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},n}(t)}).call(this)},42152:function(e){var t;t=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return w}});var i=n(279),o=n.n(i),r=n(370),a=n.n(r),s=n(817),l=n.n(s);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=l()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=l()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==c(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}],n&&d(t.prototype,n),i&&d(t,i),e}(),f=u;function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new f({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return b("action",e)}},{key:"defaultTarget",value:function(e){var t=b("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return b("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],i=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&p(t.prototype,n),i&&p(t,i),r}(o()),w=y},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var i=n(828);function o(e,t,n,i,o){var a=r.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function r(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,i,r)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var i=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i{jQuery.plot.plugins.push({init:function(e){var t,n,i,o,r=1,a=!1,s={};function l(e,t){for(var n=new Array,i=0;ii?1:0}function d(e,t,n){for(var i=0,r=t;r<=n;r++)i+=e[r].bars.barWidth+2*o;return i}e.hooks.processDatapoints.push((function(e,u,f){var h,p=null;if(function(e){return null!=e.bars&&e.bars.show&&null!=e.bars.order}(u)&&(function(e){e.bars.horizontal&&(a=!0)}(u),function(e){var t=a?e.getPlaceholder().innerHeight():e.getPlaceholder().innerWidth(),n=l(e.getData(),a?1:0),i=n[1]-n[0];r=i/t}(e),function(e){t=function(e){for(var t=new Array,n=[],i=0;i=2)){var m=function(e){for(var n=0,i=0;i{!function(e){e.color={},e.color.make=function(t,n,i,o){var r={};return r.r=t||0,r.g=n||0,r.b=i||0,r.a=null!=o?o:1,r.add=function(e,t){for(var n=0;n=1?"rgb("+[r.r,r.g,r.b].join(",")+")":"rgba("+[r.r,r.g,r.b,r.a].join(",")+")"},r.normalize=function(){function e(e,t,n){return tn?n:t}return r.r=e(0,parseInt(r.r),255),r.g=e(0,parseInt(r.g),255),r.b=e(0,parseInt(r.b),255),r.a=e(0,r.a,1),r},r.clone=function(){return e.color.make(r.r,r.b,r.g,r.a)},r.normalize()},e.color.extract=function(t,n){var i;do{if(""!=(i=t.css(n).toLowerCase())&&"transparent"!=i)break;t=t.parent()}while(t.length&&!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"==i&&(i="transparent"),e.color.parse(i)},e.color.parse=function(n){var i,o=e.color.make;if(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return o(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10));if(i=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return o(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4]));if(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return o(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]));if(i=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return o(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]),parseFloat(i[4]));if(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return o(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16));if(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return o(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16));var r=e.trim(n).toLowerCase();return"transparent"==r?o(255,255,255,0):o((i=t[r]||[0,0,0])[0],i[1],i[2])};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(e){var t=Object.prototype.hasOwnProperty;function n(t,n){var i=n.children("."+t)[0];if(null==i&&((i=document.createElement("canvas")).className=t,e(i).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n),!i.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");i=window.G_vmlCanvasManager.initElement(i)}this.element=i;var o=this.context=i.getContext("2d"),r=window.devicePixelRatio||1,a=o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1;this.pixelRatio=r/a,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={}}function i(t,i,o,r){var a=[],s={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},l=null,c=null,d=null,u=null,f=null,h=[],p=[],m={left:0,right:0,top:0,bottom:0},g=0,v=0,_={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},b=this;function y(e,t){t=[b].concat(t);for(var n=0;ni&&(i=o))}n<=i&&(n=i+1);var r,l=[],c=s.colors,d=c.length,u=0;for(t=0;t=0?u<.5?-u-.2:0:-u),l[t]=r.scale("rgb",1+u);var f,m=0;for(t=0;te.datamax&&n!=g&&(e.datamax=n)}for(e.each(k(),(function(e,t){t.datamin=p,t.datamax=m,t.used=!1})),t=0;t0&&null!=s[i-l]&&s[i-l]!=s[i]&&s[i-l+1]!=s[i+1]){for(o=0;oT&&(T=c)),d.y&&(cj&&(j=c)));if(r.bars.show){var E;switch(r.bars.align){case"left":E=0;break;case"right":E=-r.bars.barWidth;break;default:E=-r.bars.barWidth/2}r.bars.horizontal?(S+=E,j+=E+r.bars.barWidth):(C+=E,T+=E+r.bars.barWidth)}v(r.xaxis,C,T),v(r.yaxis,S,j)}e.each(k(),(function(e,t){t.datamin==p&&(t.datamin=null),t.datamax==m&&(t.datamax=null)}))}()}function x(e,t){var n=e[t+"axis"];return"object"==typeof n&&(n=n.n),"number"!=typeof n&&(n=1),n}function k(){return e.grep(h.concat(p),(function(e){return e}))}function C(e){var t,n,i={};for(t=0;t=0&&(n=0),null==t.max&&(i+=o*a)>0&&null!=e.datamax&&e.datamax<=0&&(i=0))}e.min=n,e.max=i}(t)})),o){var d=e.grep(i,(function(e){return e.show||e.reserveSpace}));for(e.each(d,(function(t,n){!function(t){var n,i=t.options;n="number"==typeof i.ticks&&i.ticks>0?i.ticks:.3*Math.sqrt("x"==t.direction?l.width:l.height);var o=(t.max-t.min)/n,r=-Math.floor(Math.log(o)/Math.LN10),a=i.tickDecimals;null!=a&&r>a&&(r=a);var s,c=Math.pow(10,-r),d=o/c;d<1.5?s=1:d<3?(s=2,d>2.25&&(null==a||r+1<=a)&&(s=2.5,++r)):s=d<7.5?5:10;s*=c,null!=i.minTickSize&&s0&&(null==i.min&&(t.min=Math.min(t.min,f[0])),null==i.max&&f.length>1&&(t.max=Math.max(t.max,f[f.length-1]))),t.tickGenerator=function(e){var t,n,i=[];for(n=0;n1&&/\..*0$/.test((g[1]-g[0]).toFixed(m))||(t.tickDecimals=m)}}}}(n),function(t){var n,i,o=t.options.ticks,r=[];null==o||"number"==typeof o&&o>0?r=t.tickGenerator(t):o&&(r=e.isFunction(o)?o(t):o);for(t.ticks=[],n=0;n1&&(a=s[1])):i=+s,null==a&&(a=t.tickFormatter(i,t)),isNaN(i)||t.ticks.push({v:i,label:a})}}(n),function(e,t){e.options.autoscaleMargin&&t.length>0&&(null==e.options.min&&(e.min=Math.min(e.min,t[0].v)),null==e.options.max&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)))}(n,n.ticks),function(e){for(var t=e.options,n=e.ticks||[],i=t.labelWidth||0,o=t.labelHeight||0,r=i||("x"==e.direction?Math.floor(l.width/(n.length||1)):null),a=e.direction+"Axis "+e.direction+e.n+"Axis",s="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+a,c=t.font||"flot-tick-label tickLabel",d=0;d=0;--n)j(d[n]);!function(){var t,n=s.grid.minBorderMargin;if(null==n)for(n=0,t=0;tt.max||("x"==t.direction?(r="center",i=m.left+t.p2c(n.v),"bottom"==t.position?o=s.top+s.padding:(o=s.top+s.height-s.padding,a="bottom")):(a="middle",o=m.top+t.p2c(n.v),"left"==t.position?(i=s.left+s.width-s.padding,r="right"):i=s.left+s.padding),l.addText(d,i,o,n.label,u,null,null,r,a))})),function(){null!=s.legend.container?e(s.legend.container).html(""):t.find(".legend").remove();if(!s.legend.show)return;for(var n,i,o=[],r=[],l=!1,c=s.legend.labelFormatter,d=0;d"),o.push(""),l=!0),o.push('
        '+f.label+"")}l&&o.push("");if(0==o.length)return;var h=''+o.join("")+"
        ";if(null!=s.legend.container)e(s.legend.container).html(h);else{var p="",g=s.legend.position,v=s.legend.margin;null==v[0]&&(v=[v,v]),"n"==g.charAt(0)?p+="top:"+(v[1]+m.top)+"px;":"s"==g.charAt(0)&&(p+="bottom:"+(v[1]+m.bottom)+"px;"),"e"==g.charAt(1)?p+="right:"+(v[0]+m.right)+"px;":"w"==g.charAt(1)&&(p+="left:"+(v[0]+m.left)+"px;");var _=e('
        '+h.replace('style="','style="position:absolute;'+p+";")+"
        ").appendTo(t);if(0!=s.legend.backgroundOpacity){var b=s.legend.backgroundColor;null==b&&((b=(b=s.grid.backgroundColor)&&"string"==typeof b?e.color.parse(b):e.color.extract(_,"background-color")).a=1,b=b.toString());var y=_.children();e('
        ').prependTo(_).css("opacity",s.legend.backgroundOpacity)}}}()}function I(){l.clear(),y(_.drawBackground,[u]);var e=s.grid;e.show&&e.backgroundColor&&(u.save(),u.translate(m.left,m.top),u.fillStyle=Y(s.grid.backgroundColor,v,0,"rgba(255, 255, 255, 0)"),u.fillRect(0,0,g,v),u.restore()),e.show&&!e.aboveData&&M();for(var t=0;to){var l=i;i=o,o=l}return{from:i,to:o,axis:n}}function M(){var t,n,i,o;u.save(),u.translate(m.left,m.top);var r=s.grid.markings;if(r)for(e.isFunction(r)&&((n=b.getAxes()).xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,r=r(n)),t=0;tl.axis.max||c.toc.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),c.from=Math.max(c.from,c.axis.min),c.to=Math.min(c.to,c.axis.max);var d=l.from===l.to,f=c.from===c.to;if(!d||!f)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),c.from=Math.floor(c.axis.p2c(c.from)),c.to=Math.floor(c.axis.p2c(c.to)),d||f){var h=a.lineWidth||s.grid.markingsLineWidth,p=h%2?.5:0;u.beginPath(),u.strokeStyle=a.color||s.grid.markingsColor,u.lineWidth=h,d?(u.moveTo(l.to+p,c.from),u.lineTo(l.to+p,c.to)):(u.moveTo(l.from,c.to+p),u.lineTo(l.to,c.to+p)),u.stroke()}else u.fillStyle=a.color||s.grid.markingsColor,u.fillRect(l.from,c.to,l.to-l.from,c.from-c.to)}}n=k(),i=s.grid.borderWidth;for(var _=0;_S.max||"full"==j&&("object"==typeof i&&i[S.position]>0||i>0)&&(E==S.min||E==S.max)||("x"==S.direction?(y=S.p2c(E),C="full"==j?-v:j,"top"==S.position&&(C=-C)):(w=S.p2c(E),x="full"==j?-g:j,"left"==S.position&&(x=-x)),1==u.lineWidth&&("x"==S.direction?y=Math.floor(y)+.5:w=Math.floor(w)+.5),u.moveTo(y,w),u.lineTo(y+x,w+C))}u.stroke()}}i&&(o=s.grid.borderColor,"object"==typeof i||"object"==typeof o?("object"!=typeof i&&(i={top:i,right:i,bottom:i,left:i}),"object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),i.top>0&&(u.strokeStyle=o.top,u.lineWidth=i.top,u.beginPath(),u.moveTo(0-i.left,0-i.top/2),u.lineTo(g,0-i.top/2),u.stroke()),i.right>0&&(u.strokeStyle=o.right,u.lineWidth=i.right,u.beginPath(),u.moveTo(g+i.right/2,0-i.top),u.lineTo(g+i.right/2,v),u.stroke()),i.bottom>0&&(u.strokeStyle=o.bottom,u.lineWidth=i.bottom,u.beginPath(),u.moveTo(g+i.right,v+i.bottom/2),u.lineTo(0,v+i.bottom/2),u.stroke()),i.left>0&&(u.strokeStyle=o.left,u.lineWidth=i.left,u.beginPath(),u.moveTo(0-i.left/2,v+i.bottom),u.lineTo(0-i.left/2,0),u.stroke())):(u.lineWidth=i,u.strokeStyle=s.grid.borderColor,u.strokeRect(-i/2,-i/2,g+i,v+i))),u.restore()}function A(e){e.lines.show&&function(e){function t(e,t,n,i,o){var r=e.points,a=e.pointsize,s=null,l=null;u.beginPath();for(var c=a;c=p&&f>o.max){if(p>o.max)continue;d=(o.max-f)/(p-f)*(h-d)+d,f=o.max}else if(p>=f&&p>o.max){if(f>o.max)continue;h=(o.max-f)/(p-f)*(h-d)+d,p=o.max}if(d<=h&&d=h&&d>i.max){if(h>i.max)continue;f=(i.max-d)/(h-d)*(p-f)+f,d=i.max}else if(h>=d&&h>i.max){if(d>i.max)continue;p=(i.max-d)/(h-d)*(p-f)+f,h=i.max}d==s&&f==l||u.moveTo(i.p2c(d)+t,o.p2c(f)+n),s=h,l=p,u.lineTo(i.p2c(h)+t,o.p2c(p)+n)}}u.stroke()}function n(e,t,n){for(var i=e.points,o=e.pointsize,r=Math.min(Math.max(0,n.min),n.max),a=0,s=!1,l=1,c=0,d=0;!(o>0&&a>i.length+o);){var f=i[(a+=o)-o],h=i[a-o+l],p=i[a],m=i[a+l];if(s){if(o>0&&null!=f&&null==p){d=a,o=-o,l=2;continue}if(o<0&&a==c+o){u.fill(),s=!1,l=1,a=c=d+(o=-o);continue}}if(null!=f&&null!=p){if(f<=p&&f=p&&f>t.max){if(p>t.max)continue;h=(t.max-f)/(p-f)*(m-h)+h,f=t.max}else if(p>=f&&p>t.max){if(f>t.max)continue;m=(t.max-f)/(p-f)*(m-h)+h,p=t.max}if(s||(u.beginPath(),u.moveTo(t.p2c(f),n.p2c(r)),s=!0),h>=n.max&&m>=n.max)u.lineTo(t.p2c(f),n.p2c(n.max)),u.lineTo(t.p2c(p),n.p2c(n.max));else if(h<=n.min&&m<=n.min)u.lineTo(t.p2c(f),n.p2c(n.min)),u.lineTo(t.p2c(p),n.p2c(n.min));else{var g=f,v=p;h<=m&&h=n.min?(f=(n.min-h)/(m-h)*(p-f)+f,h=n.min):m<=h&&m=n.min&&(p=(n.min-h)/(m-h)*(p-f)+f,m=n.min),h>=m&&h>n.max&&m<=n.max?(f=(n.max-h)/(m-h)*(p-f)+f,h=n.max):m>=h&&m>n.max&&h<=n.max&&(p=(n.max-h)/(m-h)*(p-f)+f,m=n.max),f!=g&&u.lineTo(t.p2c(g),n.p2c(h)),u.lineTo(t.p2c(f),n.p2c(h)),u.lineTo(t.p2c(p),n.p2c(m)),p!=v&&(u.lineTo(t.p2c(p),n.p2c(m)),u.lineTo(t.p2c(v),n.p2c(m)))}}}}u.save(),u.translate(m.left,m.top),u.lineJoin="round";var i=e.lines.lineWidth,o=e.shadowSize;if(i>0&&o>0){u.lineWidth=o,u.strokeStyle="rgba(0,0,0,0.1)";var r=Math.PI/18;t(e.datapoints,Math.sin(r)*(i/2+o/2),Math.cos(r)*(i/2+o/2),e.xaxis,e.yaxis),u.lineWidth=o/2,t(e.datapoints,Math.sin(r)*(i/2+o/4),Math.cos(r)*(i/2+o/4),e.xaxis,e.yaxis)}u.lineWidth=i,u.strokeStyle=e.color;var a=P(e.lines,e.color,0,v);a&&(u.fillStyle=a,n(e.datapoints,e.xaxis,e.yaxis));i>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis);u.restore()}(e),e.bars.show&&function(e){function t(t,n,i,o,r,a){for(var s=t.points,l=t.pointsize,c=0;cr.max||ha.max||(u.beginPath(),f=r.p2c(f),h=a.p2c(h)+i,"circle"==s?u.arc(f,h,t,0,o?Math.PI:2*Math.PI,!1):s(u,f,h,t,o),u.closePath(),n&&(u.fillStyle=n,u.fill()),u.stroke())}}u.save(),u.translate(m.left,m.top);var n=e.points.lineWidth,i=e.shadowSize,o=e.points.radius,r=e.points.symbol;0==n&&(n=1e-4);if(n>0&&i>0){var a=i/2;u.lineWidth=a,u.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,o,null,a+a/2,!0,e.xaxis,e.yaxis,r),u.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,o,null,a/2,!0,e.xaxis,e.yaxis,r)}u.lineWidth=n,u.strokeStyle=e.color,t(e.datapoints,o,P(e.points,e.color),0,!1,e.xaxis,e.yaxis,r),u.restore()}(e)}function O(e,t,n,i,o,r,a,s,l,c,d){var u,f,h,p,m,g,v,_,b;c?(_=g=v=!0,m=!1,p=t+i,h=t+o,(f=e)<(u=n)&&(b=f,f=u,u=b,m=!0,g=!1)):(m=g=v=!0,_=!1,u=e+i,f=e+o,(p=t)<(h=n)&&(b=p,p=h,h=b,_=!0,v=!1)),fa.max||ps.max||(ua.max&&(f=a.max,g=!1),hs.max&&(p=s.max,v=!1),u=a.p2c(u),h=s.p2c(h),f=a.p2c(f),p=s.p2c(p),r&&(l.fillStyle=r(h,p),l.fillRect(u,p,f-u,h-p)),d>0&&(m||g||v||_)&&(l.beginPath(),l.moveTo(u,h),m?l.lineTo(u,p):l.moveTo(u,p),v?l.lineTo(f,p):l.moveTo(f,p),g?l.lineTo(f,h):l.moveTo(f,h),_?l.lineTo(u,h):l.moveTo(u,h),l.stroke()))}function P(t,n,i,o){var r=t.fill;if(!r)return null;if(t.fillColor)return Y(t.fillColor,i,o,n);var a=e.color.parse(n);return a.a="number"==typeof r?r:.4,a.normalize(),a.toString()}b.setData=w,b.setupGrid=E,b.draw=I,b.getPlaceholder=function(){return t},b.getCanvas=function(){return l.element},b.getPlotOffset=function(){return m},b.width=function(){return g},b.height=function(){return v},b.offset=function(){var e=d.offset();return e.left+=m.left,e.top+=m.top,e},b.getData=function(){return a},b.getAxes=function(){var t={};return e.each(h.concat(p),(function(e,n){n&&(t[n.direction+(1!=n.n?n.n:"")+"axis"]=n)})),t},b.getXAxes=function(){return h},b.getYAxes=function(){return p},b.c2p=C,b.p2c=function(e){var t,n,i,o={};for(t=0;t=0;--i)if(n(a[i])){var u=a[i],f=u.xaxis,h=u.yaxis,p=u.datapoints.points,m=f.c2p(e),g=h.c2p(t),v=l/f.scale,_=l/h.scale;if(r=u.datapoints.pointsize,f.options.inverseTransform&&(v=Number.MAX_VALUE),h.options.inverseTransform&&(_=Number.MAX_VALUE),u.lines.show||u.points.show)for(o=0;ov||b-m<-v||y-g>_||y-g<-_)){var w=Math.abs(f.p2c(b)-e),x=Math.abs(h.p2c(y)-t),k=w*w+x*x;k=Math.min(T,b)&&g>=y+C&&g<=y+S:m>=b+C&&m<=b+S&&g>=Math.min(T,y)&&g<=Math.max(T,y))&&(d=[i,o/r])}}}return d?(i=d[0],o=d[1],r=a[i].datapoints.pointsize,{datapoint:a[i].datapoints.points.slice(o*r,(o+1)*r),dataIndex:o,series:a[i],seriesIndex:i}):null}(r,l,i);if(u&&(u.pageX=parseInt(u.series.xaxis.p2c(u.datapoint[0])+o.left+m.left,10),u.pageY=parseInt(u.series.yaxis.p2c(u.datapoint[1])+o.top+m.top,10)),s.grid.autoHighlight){for(var f=0;fr.max||oa.max)){var l=t.points.radius+t.points.lineWidth/2;f.lineWidth=l,f.strokeStyle=s;var c=1.5*l;i=r.p2c(i),o=a.p2c(o),f.beginPath(),"circle"==t.points.symbol?f.arc(i,o,c,0,2*Math.PI,!1):t.points.symbol(f,i,o,c,!1),f.closePath(),f.stroke()}}function U(t,n){var i,o="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),r=o;switch(t.bars.align){case"left":i=0;break;case"right":i=-t.bars.barWidth;break;default:i=-t.bars.barWidth/2}f.lineWidth=t.bars.lineWidth,f.strokeStyle=o,O(n[0],n[1],n[2]||0,i,i+t.bars.barWidth,(function(){return r}),t.xaxis,t.yaxis,f,t.bars.horizontal,t.bars.lineWidth)}function Y(t,n,i,o){if("string"==typeof t)return t;for(var r=u.createLinearGradient(0,i,0,n),a=0,s=t.colors.length;a
        ").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("
        ").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,i,o,r){var a,s,l,c;if(n=""+n,a="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px/"+i.lineHeight+"px "+i.family:i,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(l=s[a])&&(l=s[a]={}),null==(c=l[n])){var d=e("
        ").html(n).css({position:"absolute","max-width":r,top:-9999}).appendTo(this.getTextLayer(t));"object"==typeof i?d.css({font:a,color:i.color}):"string"==typeof i&&d.addClass(i),c=l[n]={width:d.outerWidth(!0),height:d.outerHeight(!0),element:d,positions:[]},d.detach()}return c},n.prototype.addText=function(e,t,n,i,o,r,a,s,l){var c=this.getTextInfo(e,i,o,r,a),d=c.positions;"center"==s?t-=c.width/2:"right"==s&&(t-=c.width),"middle"==l?n-=c.height/2:"bottom"==l&&(n-=c.height);for(var u,f=0;u=d[f];f++)if(u.x==t&&u.y==n)return void(u.active=!0);u={active:!0,rendered:!1,element:d.length?c.element.clone():c.element,x:t,y:n},d.push(u),u.element.css({top:Math.round(n),left:Math.round(t),"text-align":s})},n.prototype.removeText=function(e,n,i,o,r,a){if(null==o){var s=this._textCache[e];if(null!=s)for(var l in s)if(t.call(s,l)){var c=s[l];for(var d in c)if(t.call(c,d))for(var u=c[d].positions,f=0;h=u[f];f++)h.active=!1}}else{var h;for(u=this.getTextInfo(e,o,r,a).positions,f=0;h=u[f];f++)h.x==n&&h.y==i&&(h.active=!1)}},e.plot=function(t,n,o){return new i(e(t),n,o,e.plot.plugins)},e.plot.version="0.8.3",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each((function(){e.plot(this,t,n)}))}}(jQuery)},59868:()=>{!function(e){function t(e,t){return t*Math.floor(e/t)}function n(e,t,n,i){if("function"==typeof e.strftime)return e.strftime(t);var o,r=function(e,t){return t=""+(null==t?"0":t),1==(e=""+e).length?t+e:e},a=[],s=!1,l=e.getHours(),c=l<12;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==i&&(i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),o=l>12?l-12:0==l?12:l;for(var d=0;d=c);++u);var f=d[u][0],h=d[u][1];if("year"==h){if(null!=a.minTickSize&&"year"==a.minTickSize[1])f=Math.floor(a.minTickSize[0]);else{var p=Math.pow(10,Math.floor(Math.log(e.delta/r.year)/Math.LN10)),m=e.delta/r.year/p;f=m<1.5?1:m<3?2:m<7.5?5:10,f*=p}f<1&&(f=1)}e.tickSize=a.tickSize||[f,h];var g=e.tickSize[0];h=e.tickSize[1];var v=g*r[h];"second"==h?i.setSeconds(t(i.getSeconds(),g)):"minute"==h?i.setMinutes(t(i.getMinutes(),g)):"hour"==h?i.setHours(t(i.getHours(),g)):"month"==h?i.setMonth(t(i.getMonth(),g)):"quarter"==h?i.setMonth(3*t(i.getMonth()/3,g)):"year"==h&&i.setFullYear(t(i.getFullYear(),g)),i.setMilliseconds(0),v>=r.minute&&i.setSeconds(0),v>=r.hour&&i.setMinutes(0),v>=r.day&&i.setHours(0),v>=4*r.day&&i.setDate(1),v>=2*r.month&&i.setMonth(t(i.getMonth(),3)),v>=2*r.quarter&&i.setMonth(t(i.getMonth(),6)),v>=r.year&&i.setMonth(0);var _,b=0,y=Number.NaN;do{if(_=y,y=i.getTime(),n.push(y),"month"==h||"quarter"==h)if(g<1){i.setDate(1);var w=i.getTime();i.setMonth(i.getMonth()+("quarter"==h?3:1));var x=i.getTime();i.setTime(y+b*r.hour+(x-w)*g),b=i.getHours(),i.setHours(0)}else i.setMonth(i.getMonth()+g*("quarter"==h?3:1));else"year"==h?i.setFullYear(i.getFullYear()+g):i.setTime(y+v)}while(y{e.exports=n(98069)},98069:(e,t,n)=>{var i=n(99560),o=n(17673),r=/^[0-9a-f]{32}$/;function a(e,t){if(e)return"boolean"==typeof e.protocol?e.protocol:"http"!==e.protocol&&("https"===e.protocol||void 0)}function s(e){return(e="string"==typeof e?e.trim().toLowerCase():"unspecified").match(r)?e:i(e)}function l(e){var t=o.stringify(function(e){var t={},n={protocol:1,format:1};for(var i in e)n[i]||(t[i]=e[i]);return t}(e));return t&&"?"+t||""}e.exports={url:function(e,t,n){var i="//www.gravatar.com/avatar/";t&&t.cdn?(i=t.cdn+"/avatar/",delete t.cdn):(t&&t.protocol&&(n=a(t)),void 0!==n&&(i=n?"https://s.gravatar.com/avatar/":"http://www.gravatar.com/avatar/"));var o=l(t);return i+s(e)+o},profile_url:function(e,t,n){var i=null!=t&&null!=t.format?String(t.format):"json";if(t&&t.cdn)o=t.cdn+"/",delete t.cdn;else{t&&t.protocol&&(n=a(t));var o=n?"https://secure.gravatar.com/":"http://www.gravatar.com/"}var r=l(t);return o+s(e)+"."+i+r}}},15303:(e,t,n)=>{e.exports=n(49457)},49402:e=>{!function(t){if("undefined"!=typeof window){var n=!0,i="",o=0,r="",a=null,s="",l=!1,c={resize:1,click:1},d=128,u=!0,f=1,h="bodyOffset",p=h,m=!0,g="",v={},_=32,b=null,y=!1,w=!1,x="[iFrameSizer]",k=x.length,C="",S={max:1,min:1,bodyScroll:1,documentElementScroll:1},T="child",j=window.parent,E="*",I=0,G=!1,M=null,A=16,O=1,P="scroll",L=P,z=window,N=function(){re("onMessage function not defined")},q=function(){},D=function(){},F={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},Q=!1;try{var R=Object.create({},{passive:{get:function(){Q=!0}}});window.addEventListener("test",ee,R),window.removeEventListener("test",ee,R)}catch(e){}var B,V,H,U,Y,$,J,X={bodyOffset:function(){return document.body.offsetHeight+ge("marginTop")+ge("marginBottom")},offset:function(){return X.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return F.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,_e(X))},min:function(){return Math.min.apply(null,_e(X))},grow:function(){return X.max()},lowestElement:function(){return Math.max(X.bodyOffset()||X.documentElementOffset(),ve("bottom",ye()))},taggedElement:function(){return be("bottom","data-iframe-height")}},K={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return F.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(K.bodyScroll(),K.documentElementScroll())},max:function(){return Math.max.apply(null,_e(K))},min:function(){return Math.min.apply(null,_e(K))},rightMostElement:function(){return ve("right",ye())},taggedElement:function(){return be("right","data-iframe-width")}},Z=(B=we,Y=null,$=0,J=function(){$=Date.now(),Y=null,U=B.apply(V,H),Y||(V=H=null)},function(){var e=Date.now();$||($=e);var t=A-(e-$);return V=this,H=arguments,t<=0||t>A?(Y&&(clearTimeout(Y),Y=null),$=e,U=B.apply(V,H),Y||(V=H=null)):Y||(Y=setTimeout(J,t)),U});te(window,"message",(function(t){var n={init:function(){g=t.data,j=t.source,ae(),u=!1,setTimeout((function(){m=!1}),d)},reset:function(){m?oe("Page reset ignored by init"):(oe("Page size reset by host page"),Ce("resetPage"))},resize:function(){xe("resizeParent","Parent window requested size check")},moveToAnchor:function(){v.findTarget(o())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=o();oe("PageInfoFromParent called from parent: "+e),D(JSON.parse(e)),oe(" --")},message:function(){var e=o();oe("onMessage called from parent: "+e),N(JSON.parse(e)),oe(" --")}};function i(){return t.data.split("]")[1].split(":")[0]}function o(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function a(){var o=i();o in n?n[o]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}x===(""+t.data).substr(0,k)&&(!1===u?a():r()?n.init():oe('Ignored message of type "'+i()+'". Received before initialization.'))})),te(window,"readystatechange",je),je()}function ee(){}function te(e,t,n,i){e.addEventListener(t,n,!!Q&&(i||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e){return x+"["+C+"] "+e}function oe(e){y&&"object"==typeof window.console&&console.log(ie(e))}function re(e){"object"==typeof window.console&&console.warn(ie(e))}function ae(){var e;!function(){function e(e){return"true"===e}var a=g.substr(k).split(":");C=a[0],o=t!==a[1]?Number(a[1]):o,l=t!==a[2]?e(a[2]):l,y=t!==a[3]?e(a[3]):y,_=t!==a[4]?Number(a[4]):_,n=t!==a[6]?e(a[6]):n,r=a[7],p=t!==a[8]?a[8]:p,i=a[9],s=a[10],I=t!==a[11]?Number(a[11]):I,v.enable=t!==a[12]&&e(a[12]),T=t!==a[13]?a[13]:T,L=t!==a[14]?a[14]:L,w=t!==a[15]?Boolean(a[15]):w}(),oe("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;oe("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(se,e),N="onMessage"in e?e.onMessage:N,q="onReady"in e?e.onReady:q,E="targetOrigin"in e?e.targetOrigin:E,p="heightCalculationMethod"in e?e.heightCalculationMethod:p,L="widthCalculationMethod"in e?e.widthCalculationMethod:L}function t(e,t){return"function"==typeof e&&(oe("Setup custom "+t+"CalcMethod"),F[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),p=t(p,"height"),L=t(L,"width"));oe("TargetOrigin for parent set to: "+E)}(),function(){t===r&&(r=o+"px");le("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",r))}(),le("background",i),le("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),fe(),he(),document.documentElement.style.height="",document.body.style.height="",oe('HTML & body height set to "auto"'),oe("Enable public methods"),z.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,pe()):!1===e&&!0===n&&(n=!1,de("remove"),null!==a&&a.disconnect(),clearInterval(b)),Te(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Te(0,0,"close")},getId:function(){return C},getPageInfo:function(e){"function"==typeof e?(D=e,Te(0,0,"pageInfo")):(D=function(){},Te(0,0,"pageInfoStop"))},moveToAnchor:function(e){v.findTarget(e)},reset:function(){Se("parentIFrame.reset")},scrollTo:function(e,t){Te(t,e,"scrollTo")},scrollToOffset:function(e,t){Te(t,e,"scrollToOffset")},sendMessage:function(e,t){Te(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){p=e,fe()},setWidthCalculationMethod:function(e){L=e,he()},setTargetOrigin:function(e){oe("Set targetOrigin: "+e),E=e},size:function(e,t){xe("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){if(!0!==w)return;function e(e){Te(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){oe("Add event listener: "+n),te(window.document,t,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}(),pe(),v=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),i=e();return{x:parseInt(n.left,10)+parseInt(i.x,10),y:parseInt(n.top,10)+parseInt(i.y,10)}}function i(e){function i(e){var t=n(e);oe("Moving to in page link (#"+o+") at x: "+t.x+" y: "+t.y),Te(t.y,t.x,"scrollToOffset")}var o=e.split("#")[1]||e,r=decodeURIComponent(o),a=document.getElementById(r)||document.getElementsByName(r)[0];t!==a?i(a):(oe("In page link (#"+o+") not found in iFrame, so sending to parent"),Te(0,0,"inPageLink","#"+o))}function o(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&i(t)}function r(){function e(e){function t(e){e.preventDefault(),i(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&te(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){te(window,"hashchange",o)}function s(){setTimeout(o,d)}function l(){Array.prototype.forEach&&document.querySelectorAll?(oe("Setting up location.hash handlers"),r(),a(),s()):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}v.enable?l():oe("In page linking not enabled");return{findTarget:i}}(),xe("init","Init message from host page"),q()}function se(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function le(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,oe("Body "+e+' set to "'+n+'"'))}function ce(e){var t={add:function(t){function n(){xe(e.eventName,e.eventType)}W[t]=n,te(window,t,n,{passive:!0})},remove:function(e){var t,n,i,o=W[e];delete W[e],t=window,n=e,i=o,t.removeEventListener(n,i,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),oe(ne(e.method)+" event listener: "+e.eventType)}function de(e){ce({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ce({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ce({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ce({method:e,eventType:"Input",eventName:"input"}),ce({method:e,eventType:"Mouse Up",eventName:"mouseup"}),ce({method:e,eventType:"Mouse Down",eventName:"mousedown"}),ce({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),ce({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),ce({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),ce({method:e,eventType:"Touch Start",eventName:"touchstart"}),ce({method:e,eventType:"Touch End",eventName:"touchend"}),ce({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),ce({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ce({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ce({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===T&&ce({method:e,eventType:"IFrame Resized",eventName:"resize"})}function ue(e,t,n,i){return t!==e&&(e in n||(re(e+" is not a valid option for "+i+"CalculationMethod."),e=t),oe(i+' calculation method set to "'+e+'"')),e}function fe(){p=ue(p,h,X,"height")}function he(){L=ue(L,P,K,"width")}function pe(){var e;!0===n?(de("add"),e=0>_,window.MutationObserver||window.WebKitMutationObserver?e?me():a=function(){function e(e){function t(e){!1===e.complete&&(oe("Attach listeners to "+e.src),e.addEventListener("load",o,!1),e.addEventListener("error",r,!1),l.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){l.splice(l.indexOf(e),1)}function n(e){oe("Remove listeners from "+e.src),e.removeEventListener("load",o,!1),e.removeEventListener("error",r,!1),t(e)}function i(e,t,i){n(e.target),xe(t,i+": "+e.target.src)}function o(e){i(e,"imageLoad","Image loaded")}function r(e){i(e,"imageLoadFailed","Image load failed")}function a(t){xe("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new c(a),oe("Create body MutationObserver"),d.observe(e,t),d}var l=[],c=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(oe("Disconnect body MutationObserver"),d.disconnect(),l.forEach(n))}}}():(oe("MutationObserver not supported in this browser!"),me())):oe("Auto Resize disabled")}function me(){0!==_&&(oe("setInterval: "+_+"ms"),b=setInterval((function(){xe("interval","setInterval: "+_)}),Math.abs(_)))}function ge(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function ve(e,t){for(var n=t.length,i=0,o=0,r=ne(e),a=Date.now(),s=0;so&&(o=i);return a=Date.now()-a,oe("Parsed "+n+" HTML elements"),oe("Element position calculated in "+a+"ms"),function(e){e>A/2&&oe("Event throttle increased to "+(A=2*e)+"ms")}(a),o}function _e(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function be(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),ve(e,n)}function ye(){return document.querySelectorAll("body *")}function we(e,n,i,o){var r,a;!function(){function e(e,t){return!(Math.abs(e-t)<=I)}return r=t!==i?i:X[p](),a=t!==o?o:K[L](),e(f,r)||l&&e(O,a)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(p in S||l&&L in S)?Se(n):e in{interval:1}||oe("No change in size detected"):(ke(),Te(f=r,O=a,e))}function xe(e,t,n,i){G&&e in c?oe("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||oe("Trigger event: "+t),"init"===e?we(e,t,n,i):Z(e,t,n,i))}function ke(){G||(G=!0,oe("Trigger event lock on")),clearTimeout(M),M=setTimeout((function(){G=!1,oe("Trigger event lock off"),oe("--")}),d)}function Ce(e){f=X[p](),O=K[L](),Te(f,O,e)}function Se(e){var t=p;p=h,oe("Reset trigger event: "+e),ke(),Ce("reset"),p=t}function Te(e,n,i,o,r){var a;t===r?r=E:oe("Message targetOrigin: "+r),oe("Sending message to host page ("+(a=C+":"+e+":"+n+":"+i+(t!==o?":"+o:""))+")"),j.postMessage(x+a,r)}function je(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()},46702:(e,t)=>{var n,i,o;!function(r){if("undefined"!=typeof window){var a,s=0,l=!1,c=!1,d="message".length,u="[iFrameSizer]",f=u.length,h=null,p=window.requestAnimationFrame,m={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},g={},v=null,_={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){j("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},b={};window.jQuery&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){W(n,e)})).end()}):T("","Unable to bind to jQuery, it is not fully loaded.")),i=[],(o="function"==typeof(n=H)?n.apply(t,i):n)===r||(e.exports=o),window.iFrameResize=window.iFrameResize||H()}function y(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,t,n){e.addEventListener(t,n,!1)}function x(e,t,n){e.removeEventListener(t,n,!1)}function k(e){return u+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function C(e){return g[e]?g[e].log:l}function S(e,t){E("log",e,t,C(e))}function T(e,t){E("info",e,t,C(e))}function j(e,t){E("warn",e,t,!0)}function E(e,t,n,i){!0===i&&"object"==typeof window.console&&console[e](k(t),n)}function I(e){function t(){o("Height"),o("Width"),q((function(){N(k),P(C),m("onResized",k)}),k,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function o(e){var t=Number(g[C]["max"+e]),n=Number(g[C]["min"+e]),i=e.toLowerCase(),o=Number(k[i]);S(C,"Checking "+i+" is in range "+n+"-"+t),ot&&(o=t,S(C,"Set "+i+" to max value")),k[i]=""+o}function r(e){return y.substr(y.indexOf(":")+d+e)}function a(e,t){var n,i,o;n=function(){var n,i;D("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),i=k.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-n.top,10),offsetLeft:parseInt(i.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},i=32,b[o=t]||(b[o]=setTimeout((function(){b[o]=null,n()}),i))}function s(e){var t=e.getBoundingClientRect();return O(C),{x:Math.floor(Number(t.left)+Number(h.x)),y:Math.floor(Number(t.top)+Number(h.y))}}function l(e){var t=e?s(k.iframe):{x:0,y:0},n={x:Number(k.width)+t.x,y:Number(k.height)+t.y};S(C,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):j(C,"Unable to scroll to requested position, window.parentIFrame not found"):(h=n,c(),S(C,"--"))}function c(){!1!==m("onScroll",h)?P(C):L()}function p(e){var t={};if(0===Number(k.width)&&0===Number(k.height)){var n=r(9).split(":");t={x:n[1],y:n[0]}}else t={x:k.width,y:k.height};m(e,{iframe:k.iframe,screenX:Number(t.x),screenY:Number(t.y),type:k.type})}function m(e,t){return G(C,e,t)}var v,_,y=e.data,k={},C=null;"[iFrameResizerChild]Ready"===y?function(){for(var e in g)D("iFrame requested init",F(e),g[e].iframe,e)}():u===(""+y).substr(0,f)&&y.substr(f).split(":")[0]in g?(k=function(){var e=y.substr(f).split(":"),t=e[1]?parseInt(e[1],10):0,o=g[e[0]]&&g[e[0]].iframe,r=getComputedStyle(o);return{iframe:o,id:e[0],height:t+n(r)+i(r),width:e[2],type:e[3]}}(),C=k.id,g[C]&&(g[C].loaded=!0),(_=k.type in{true:1,false:1,undefined:1})&&S(C,"Ignoring init message from meta parent page"),!_&&function(e){var t=!0;return g[e]||(t=!1,j(k.type+" No settings for "+e+". Message was: "+y)),t}(C)&&(S(C,"Received: "+y),v=!0,null===k.iframe&&(j(C,"IFrame ("+k.id+") not found"),v=!1),v&&function(){var t,n=e.origin,i=g[C]&&g[C].checkOrigin;if(i&&""+n!="null"&&!(i.constructor===Array?function(){var e=0,t=!1;for(S(C,"Checking connection is from allowed list of origins: "+i);eg[i]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(g[i]&&g[i].bodyMargin)&&"0"!==(g[i]&&g[i].bodyMargin)||(g[i].bodyMarginV1=g[i].bodyMargin,g[i].bodyMargin=g[i].bodyMargin+"px"),function(t){var n=y();n&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&A(e)}))}))})).observe(e.parentNode,{childList:!0})}(n),w(e,"load",(function(){var n,o;D("iFrame.onload",t,e,r,!0),n=g[i]&&g[i].firstRun,o=g[i]&&g[i].heightCalculationMethod in m,!n&&o&&z({iframe:e,height:0,width:0,type:"init"})})),D("init",t,e,r,!0)}(F(i)),g[i]&&(g[i].iframe.iFrameResizer={close:A.bind(null,g[i].iframe),removeListeners:M.bind(null,g[i].iframe),resize:D.bind(null,"Window resize","resize",g[i].iframe),moveToAnchor:function(e){D("Move to anchor","moveToAnchor:"+e,g[i].iframe,i)},sendMessage:function(e){D("Send Message","message:"+(e=JSON.stringify(e)),g[i].iframe,i)}}))}function Q(e,t){null===v&&(v=setTimeout((function(){v=null,e()}),t))}function R(){"hidden"!==document.visibilityState&&(S("document","Trigger event: Visiblity change"),Q((function(){B("Tab Visable","resize")}),16))}function B(e,t){Object.keys(g).forEach((function(n){(function(e){return g[e]&&"parent"===g[e].resizeFrom&&g[e].autoResize&&!g[e].firstRun})(n)&&D(e,t,g[n].iframe,n)}))}function V(){w(window,"message",I),w(window,"resize",(function(){var e;S("window","Trigger event: "+(e="resize")),Q((function(){B("Window "+e,"resize")}),16)})),w(document,"visibilitychange",R),w(document,"-webkit-visibilitychange",R)}function H(){function e(e,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected
      • ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(W),x("BeforeChange",(function(e,t,n){t!==n&&(t===W?R():n===W&&R(!0))})),x(s+"."+W,(function(){R()}))},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,(function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1}));var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var B=function(e){var n=t.items.length;return e>n-1?e-n:e<0?n+e:e},V=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!n||!n.enabled)return!1;r+=" mfp-gallery",x(f+o,(function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",(function(){if(t.items.length>1)return t.next(),!1})),i.on("keydown"+o,(function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()}))})),x("UpdateStatus"+o,(function(e,n){n.text&&(n.text=V(n.text,t.currItem.index,t.items.length))})),x(u+o,(function(e,i,o,r){var a=t.items.length;o.counter=a>1?V(n.tCounter,r.index,a):""})),x("BuildControls"+o,(function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(_),r=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(_);o.click((function(){t.prev()})),r.click((function(){t.next()})),t.container.append(o.add(r))}})),x(h+o,(function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout((function(){t.preloadNearbyImages(),t._preloadTimeout=null}),16)})),x(s+o,(function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=B(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=B(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=B(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),C("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",(function(){i.hasSize=!0})).on("error.mfploader",(function(){i.hasSize=!0,i.loadError=!0,C("LazyLoadError",i)})).attr("src",i.src)),i.preloaded=!0}}}});var H="retina";e.magnificPopup.registerModule(H,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,(function(e){return"@2x"+e}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;(n=isNaN(n)?n():n)>1&&(x("ImageHasSize."+H,(function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})})),x("ElementParse."+H,(function(t,i){i.src=e.replaceSrc(i,n)})))}}}}),T()},void 0===(r="function"==typeof i?i.apply(t,o):i)||(e.exports=r)},62587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var r={};if("string"!=typeof e||0===e.length)return r;var a=/\+/g;e=e.split(n);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c=0?(d=p.substr(0,m),u=p.substr(m+1)):(d=p,u=""),f=decodeURIComponent(d),h=decodeURIComponent(u),t(r,f)?Array.isArray(r[f])?r[f].push(h):r[f]=[r[f],h]:r[f]=h}return r}},12361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,i,o){return n=n||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var r=encodeURIComponent(t(o))+i;return Array.isArray(e[o])?e[o].map((function(e){return r+encodeURIComponent(t(e))})).join(n):r+encodeURIComponent(t(e[o]))})).join(n):o?encodeURIComponent(t(o))+i+encodeURIComponent(t(e)):""}},17673:(e,t,n)=>{"use strict";t.decode=t.parse=n(62587),t.encode=t.stringify=n(12361)},35666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof g?t:g,r=Object.create(o.prototype),a=new E(i||[]);return r._invoke=function(e,t,n){var i=u;return function(o,r){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw r;return G()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===u)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var l=d(e,t,n);if("normal"===l.type){if(i=n.done?p:f,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u="suspendedStart",f="suspendedYield",h="executing",p="completed",m={};function g(){}function v(){}function _(){}var b={};b[r]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(I([])));w&&w!==n&&i.call(w,r)&&(b=w);var x=_.prototype=g.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,r,a,s){var l=d(e[o],e,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;this._invoke=function(e,i){function r(){return new t((function(t,o){n(e,i,t,o)}))}return o=o?o.then(r,r):r()}}function S(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(e){if(e){var n=e[r];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:I(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},65311:e=>{"use strict";e.exports=jQuery}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{GiveConfirmModal:()=>v,GiveErrorAlert:()=>h,GiveFormModal:()=>_,GiveModal:()=>f,GiveNoticeAlert:()=>m,GiveSuccessAlert:()=>g,GiveWarningAlert:()=>p});n(90858),n(32196),n(32164),n(59868),n(65962),n(28345),n(57729),n(69571);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}function a(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n\n\n\t\t\t\t
        \n\t\t\t\t\t').concat(this.config.modalContent.title?'

        '.concat(this.config.modalContent.title,"

        "):"","\n\t\t\t\t\t").concat(this.config.modalContent.desc?'

        '.concat(this.config.modalContent.desc,"

        "):"","\n\t\t\t\t\t").concat(this.config.modalContent.body?this.config.modalContent.body:"",'\n\t\t\t\t
        \n\n\t\t\t\t
        \n\n\t\t\t\t\t').concat("form"===this.config.type?'
        ':"","\n\t\t\t\t\t").concat("form"===this.config.type&&"undefined"!==this.config.modalContent.link?'
        ').concat(this.config.modalContent.link_text,""):"",'\n\n\t\t\t\t\t\n\n\t\t\t\t\t").concat("confirm"!==this.config.type&&"form"!==this.config.type?"":'"),"\n\t\t\t\t
        \n\n\t\t\t
        ")),e}},{key:"setupTemplate",value:function(){this.config.template=this.getTemplate()}},{key:"__setupClickEvent",value:function(){this.config.triggerSelector.length&&jQuery(this.config.triggerSelector).magnificPopup(this.config)}},{key:"popupConfig",value:function(){"magnificPopup"===this.config.externalPlugin&&(this.config.items=this.config.items||{src:this.config.template,type:"inline"},this.config=Object.assign({removalDelay:300,fixedContentPos:!0,fixedBgPos:!0,alignTop:!0,showCloseBtn:!1,closeOnBgClick:!1,enableEscapeKey:!0,focus:".give-popup-close-button"},this.config))}},{key:"render",value:function(){if("magnificPopup"===this.config.externalPlugin)this.config.triggerSelector||jQuery.magnificPopup.open(this.config);return this}}],[{key:"__closePopup",value:function(e){e.preventDefault(),jQuery.magnificPopup.instance.close()}},{key:"__ajaxModalHandle",value:function(e){var t=jQuery(e.target),n=t.attr("data-cache");if(e.preventDefault(),void 0!==n)return n=decodeURI(n),void new Give.modal.GiveSuccessAlert({modalContent:{title:t.attr("title"),desc:n},closeOnBgClick:!0}).render();jQuery.ajax({url:t.attr("href"),method:"GET",beforeSend:function(){new Give.modal.GiveSuccessAlert({modalContent:{desc:Give.fn.loader({},{show:null,loadingText:Give.fn.getGlobalVar("loader_translation").loading})},closeOnBgClick:!0}).render()},success:function(e){e.length&&t.attr("data-cache",encodeURI(e)),jQuery(".mfp-wrap").length&&new Give.modal.GiveSuccessAlert({modalContent:{title:t.attr("title"),desc:e},closeOnBgClick:!0}).render()}})}}]),e}(),h=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="alert",(i=t.call(this,e)).config.classes.modalWrapper="give-modal--error",i.init(),i}return n}(f),p=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="alert",(i=t.call(this,e)).config.classes.modalWrapper="give-modal--warning",i.init(),i}return n}(f),m=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="alert",(i=t.call(this,e)).config.classes.modalWrapper="give-modal--notice",i.init(),i}return n}(f),g=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="alert",(i=t.call(this,e)).config.classes.modalWrapper+=" give-modal--success",i.init(),i}return n}(f),v=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="confirm",i=t.call(this,e),void 0!==e.modalWrapper&&""!==e.modalWrapper&&(i.config.classes.modalWrapper=e.modalWrapper),i.init(),i}return d(n,null,[{key:"__confirmPopup",value:function(){"function"==typeof jQuery.magnificPopup.instance.st.successConfirm&&(jQuery.magnificPopup.instance.st.successConfirm({el:jQuery.magnificPopup.instance.st.el}),jQuery.magnificPopup.close())}}]),n}(f),_=function(e){i(n,e);var t=r(n);function n(e){var i;return l(this,n),e.type="form",i=t.call(this,e),void 0!==e.modalWrapper&&""!==e.modalWrapper&&(i.config.classes.modalWrapper=e.modalWrapper),i.init(),i}return d(n,null,[{key:"__submitPopup",value:function(){"function"==typeof jQuery.magnificPopup.instance.st.successConfirm&&jQuery.magnificPopup.instance.st.successConfirm({el:jQuery.magnificPopup.instance.st.el})}}]),n}(f);window.addDynamicEventListener(document,"click",".give-popup-close-button",f.__closePopup,{}),window.addDynamicEventListener(document,"click",".give-popup-confirm-button",v.__confirmPopup,{}),window.addDynamicEventListener(document,"click",".give-popup-form-button",_.__submitPopup,{}),window.addDynamicEventListener(document,"click",".give-ajax-modal",f.__ajaxModalHandle,{}),(u=jQuery).fn.repeatable_fields=function(e){var t={wrapper:".wrapper",container:".container",row:".row",add:".add",remove:".remove",confirm_before_remove_row:!1,confirm_before_remove_row_text:"",move:".move",template:".template",is_sortable:!0,before_add:null,after_add:o,before_remove:null,after_remove:null,sortable_options:null,row_count_placeholder:"{{row-count-placeholder}}"},n=u.extend({},t,e);function i(e,t){var i=e.parents(n.row).first();"function"==typeof n.before_remove&&n.before_remove(t,i),i.remove(),"function"==typeof n.after_remove&&n.after_remove(t)}function o(e,t){var i=u(e).attr("data-rf-row-count");i++,u("*",t).each((function(){u.each(this.attributes,(function(e,t){this.value=this.value.replace(n.row_count_placeholder,i-1)}))})),u(e).attr("data-rf-row-count",i)}!function e(t){u(n.wrapper,t).each((function(t,r){var a=this,s=u(a).children(n.container);u(s).children(n.template).hide().find(":input").each((function(){u(this).prop("disabled",!0)}));var l=u(s).children(n.row).filter((function(){return!u(this).hasClass(n.template.replace(".",""))})).length;if(u(s).attr("data-rf-row-count",l),u(a).on("click",n.add,(function(t){t.stopImmediatePropagation();var i=u(u(s).children(n.template).clone().removeClass(n.template.replace(".",""))[0].outerHTML);u(i).find(":input").each((function(){u(this).prop("disabled",!1)})),"function"==typeof n.before_add&&n.before_add(s);var r=u(i).show().appendTo(s);"function"==typeof n.after_add&&n.after_add(s,r,o),e(r)})),u(a).on("click",n.remove,(function(e){e.stopImmediatePropagation();var t=u(this);return n.confirm_before_remove_row&&n.confirm_before_remove_row_text||i(t,s),new v({modalWrapper:"give-modal--warning",modalContent:{desc:n.confirm_before_remove_row_text},successConfirm:function(){i(t,s)}}).render(),!1})),!0===n.is_sortable&&void 0!==u.ui&&void 0!==u.ui.sortable){var c=null!==n.sortable_options?n.sortable_options:{};c.handle=n.move,u(a).find(n.container).sortable(c)}}))}(this)};n(45099),n(10861);const b={fn:{renderNotice:function(e,t){var n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('
        '+this.getNotice(e,t)+"
        ");break;case"bad_maximum":n=jQuery('
        '+this.getNotice(e,t)+"
        ")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;var n,i,o;if(n=i=o="",t.length)switch(e){case"bad_minimum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==i&&(n=i+" "+Give.fn.formatCurrency(o,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dismissible:!0},i="undefined"!=typeof commonL10n?commonL10n.dismiss:wp.i18n.__("Dismiss this notice.");return'

        ').concat(e).concat(n.dismissible?' "):"","")}}};var y=n(87757),w=n.n(y);const x={fn:{showOverlay:function(e){var t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div");i.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(i),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}};function k(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}const C={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){var t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){x.fn.showOverlay(e)},hideProcessingState:function(){x.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){var n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:void 0!==(n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e))&&n.trim()}return n},setInfo:function(e,t,n,i){if(!n.length)return!1;if("nonce"===(e=void 0===e?"data":e))n.find('input[name="give-form-hash"]').val(t);if(void 0!==i&&!i.length)return!1;if("attr"===e)n.attr(i,t);else n.data(i,t);return!0},getGateway:function(e){var t="";return e.length?void 0!==(t=e.find('input[name="payment-mode"]:checked').val().trim())?t:"":t},getVariablePrices:function(e){var t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,i){i=i instanceof jQuery?i:jQuery(i);var o=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:i.data("price-id"),amount:Give.fn.unFormatCurrency(i.val(),o)})})),n):n},getPriceID:function(e,t){var n=this.getVariablePrices(e),i=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e)),o=Give.fn.getCache("amount_"+i,e)?Give.fn.getCache("amount_"+i,e):-1;return t=void 0===t||t,n.length&&-1===o&&(t?(jQuery.each(n,(function(e,t){if(t.amount===i)return o=t.price_id,!1})),-1===o&&this.getMinimumAmount(e)<=i&&this.getMaximumAmount(e)>=i&&this.getMinimumAmount(e)<=i&&(o="custom")):o=jQuery('input[name="give-price-id"]',e).val()),o},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;var t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";var t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){var t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise((function(t,n){jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(i){if(!i.success)return n(i);var o=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",i.data.give_form_hash,e,""),o.length&&o.val(i.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[i.data]),t(i)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){var t=e.parents("form"),n=e.val(),i=e.data("price-id");void 0===i&&(i=e.find("option:selected").data("price-id")),"custom"===i&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);var o=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),o)),"custom"!==i||n?t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,i]):t.find(".give-donation-amount .give-text-input").focus()},__sendBackToForm:function(){var e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;var n=jQuery("body").find("#give-form-"+e+"-wrap"),i=n.find("form.give-form"),o=n.hasClass("give-display-modal"),r=n.hasClass("give-display-button"),a=n.hasClass("give-display-reveal");i.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),i.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");var s=Give.fn.getParameterByName("level-id"),l=i.find('*[data-price-id="'+s+'"]');l.length>0&&this.autoSetMultiLevel(l),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):o||r?give_open_form_modal(n,i):a&&(i.find(".give-btn-reveal").hide(),i.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;var t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),i=this.getAmount(e),o=this.getPriceID(e,!0);return 0!==i&&(-1=t&&i<=n||-1!==o)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||!1!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:(S=function(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){k(r,i,o,a,s,"next",e)}function s(e){k(r,i,o,a,s,"throw",e)}a(void 0)}))}}(w().mark((function e(t){var n,i,o,r=arguments;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=r.length>1&&void 0!==r[1]?r[1]:{})instanceof FormData?n:new FormData(t)).append("action","give_process_donation"),n.append("give_ajax",!0),e.next=6,fetch("".concat(Give.fn.getGlobalVar("ajaxurl")),{method:"POST",body:n});case 6:return i=e.sent,e.next=9,i.text();case 9:return o=e.sent,e.abrupt("return",o.trim());case 11:case"end":return e.stop()}}),e)}))),function(e){return S.apply(this,arguments)}),addErrors:function(e,t){e.find('#give_purchase_submit input[type="submit"].give-submit').before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){var t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((function(e){var n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&this.addErrors(e,t),this.resetDonationButton(e)},resetDonationButton:function(e){var t=e.find('#give_purchase_submit input[type="submit"].give-submit'),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){var n=(t=jQuery(t)).find(".card-number"),i=t.find(".card-cvc"),o=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),i.payment("formatCardCVC"),o.payment("formatCardExpiry"))}))}}}};var S;const T={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},j={fn:{twitter:function(e,t){var n=parent.window?parent.window:window,i=n.innerHeight/2-126,o=n.innerWidth/2-280;n.open("https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(e),"&text=").concat(encodeURIComponent(t)),"newwindow","width=560,height=253,top=".concat(i,",left=").concat(o))},facebook:function(e){var t=parent.window?parent.window:window,n=t.innerHeight/2-365,i=t.innerWidth/2-280;window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(e)),"newwindow","width=560,height=730,top=".concat(n,",left=").concat(i))}}};var E=n(50743),I=n.n(E),G={init:function(){var e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t0&&(a=r.substring(r.indexOf("."),r.length)),s=(r=Math.floor(r).toString()).substring(r.length-3),""!==(l=r.substring(0,r.length-3))&&(s=i.thousand+s),o=(c=l.replace(/\B(?=(\d{2})+(?!\d))/g,i.thousand)+s+a).lastIndexOf("."),e=c=c.slice(0,o)+(c.slice(o)+"000000000000").substr(0,t.precision+1),void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=I().formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){var n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(I().unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){var t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?give_vars:give_global_vars},setCache:function(e,t,n){n.length?G.cache["form_"+G.form.fn.getInfo("form-id",n)][e]=t:G.cache[e]=t},getCache:function(e,t){var n,i=G.cache["form_"+G.form.fn.getInfo("form-id",t)];return n=void 0===(n=t.length?void 0!==i?i[e]:"":G.cache[e])?"":n},__getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"="),n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(i=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},i)).loadingAnimation?'':"",r=null!==i.loadingText?i.loadingText:G.fn.getGlobalVar("loader_translation").updating;return!1===i.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(t=o.length?"give-has-spinner":"",t=(t+=r.length?" give-has-text":"").length?" "+t.trim():"",n='

        ').concat((r+o).trim(),"
        "),null===i.show?n:(e.prepend(n),!0))},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var i=encodeURIComponent(t)+"=",o=n[1].split(/[&;]/g),r=o.length;r-- >0;)-1!==o[r].lastIndexOf(i,0)&&o.splice(r,1);return n[0]+(o.length>0?"?"+o.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};G.notice=b,G.form=C,G.donor=T,G.util=x,G.share=j;const M=G;var A=n(15303);n(96066),n(89953),n(4559),n(71018);function O(e,t){for(var n=0;n'.concat(this.buttonText,""):this.buttonText;var n=this.root.querySelector(".dashicons");n&&(this.iconClassName=n.className)}var t,n,i;return t=e,n=[{key:"enable",value:function(){this.root.disabled=!1}},{key:"disable",value:function(){this.root.disabled=!0}},{key:"setBusyState",value:function(){this.root.innerHTML="".concat(''," ").concat(this._buttonTextWithWrapper),this.disable()}},{key:"removeBusyState",value:function(){this.enable(),this.iconClassName&&this.updateIcon(this.iconClassName)}},{key:"updateIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"before",n='');this.root.innerHTML="after"===t?"".concat(this._buttonTextWithWrapper," ").concat(n):"".concat(n," ").concat(this._buttonTextWithWrapper),this.iconClassName=e,this.iconPosition=t}},{key:"updateButtonText",value:function(e){this.buttonText=e,this.iconClassName?this.updateIcon(this.iconClassName,this.iconPosition):this.root.textContent=e}}],n&&O(t.prototype,n),i&&O(t,i),e}();var L=n(42152),z=n.n(L);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function q(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n a:not(give-not-tab)"),a=[],s=[],l=0;if(600=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},i=function(){var t,n=e(".give-select-chosen");n.hasClass("give-chosen-settings")?n.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('").trigger("chosen:updated"),n.chosen.result_highlight=n.chosen.search_results.find("li.active-result").lasteturn,n.chosen.result_select(t))}))})):((t=n).on("chosen:ready",(function(){jQuery(this).next(".chosen-container").find("input.chosen-search-input").after('')})),t.chosen({inherit_select_classes:!0,placeholder_text_single:Give.fn.getGlobalVar("one_option"),placeholder_text_multiple:Give.fn.getGlobalVar("one_or_more_option")}),t.on("chosen:no_results",(function(){var e=jQuery(this).next(".chosen-container"),t=e.find("li.no-results"),n="",i=Give.fn.getGlobalVar("chosen");n=e.hasClass("give-select-chosen-ajax")&&t.length?i.ajax_search_msg.replace("{search_term}",'"'+jQuery("input",e).val()+'"'):i.no_results_msg.replace("{search_term}",'"'+jQuery("input",e).val()+'"'),t.html(n),jQuery(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",(function(e){var t=jQuery(this).val(),n=jQuery(this).closest(".give-select-chosen"),i=n.prev(),o=n.find('input[type="text"]'),r=(n.hasClass("variations"),e.which),a="give_form_search",s=this;if(n.prev().data("search-type")){if("no_ajax"===i.data("search-type"))return;a="give_"+i.data("search-type")+"_search"}t.length>0&&t.length<=3||!a.length||9===r||13===r||16===r||17===r||18===r||19===r||20===r||27===r||33===r||34===r||35===r||36===r||37===r||38===r||39===r||40===r||44===r||45===r||144===r||145===r||91===r||93===r||224===r||112<=r&&123>=r||(clearTimeout(Give.cache.chosenSearchTypingTimer),n.addClass("give-select-chosen-ajax"),Give.cache.chosenSearchTypingTimer=setTimeout((function(){jQuery.ajax({type:"POST",url:ajaxurl,data:{action:a,s:t,fields:jQuery(s).closest("form").serialize()},dataType:"json",beforeSend:function(){i.closest("ul.chosen-results").empty(),o.prop("disabled",!0)},success:function(e){n.removeClass("give-select-chosen-ajax"),jQuery("option:not(:selected)",i).remove(),e.length?(jQuery.each(e,(function(e,n){jQuery('option[value="'+n.id+'"]',i).length||(0===t.length?i.append('")):i.prepend('")))})),n.prev("select.give-select-chosen").trigger("chosen:updated")):n.prev("select.give-select-chosen").trigger("chosen:no_results"),o.prop("disabled",!1),o.val(t).focus()}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).done((function(e){o.prop("disabled",!1)}))}),342))})),jQuery(".give-select-chosen .chosen-search input").each((function(){var e=jQuery(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),t="";"form"===e?t=Give.fn.getGlobalVar("search_placeholder"):(e="search_placeholder_"+e,Give.fn.getGlobalVar(e)&&(t=Give.fn.getGlobalVar(e))),jQuery(this).attr("placeholder",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%")}))};function o(e,t){return e=I().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 r={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){new v({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 v({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"))}})}},a={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!==U(n.states_found)&&!0===n.states_found?(i.append(n.data),i.find("select").chosen()):(i.append(''),void 0!==U(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 v({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 v({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))}))}},s={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!==U(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!==U(i.show_field)&&0==i.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith(''))})),!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='

        '+Give.fn.getGlobalVar("matched_success_failure_page")+'

        ",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(Y)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();Y=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"),"-"))})))}},l={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('
        '),t.find(".notice-wrap").html('

        "),i.addClass("button-disabled").attr("disabled","disabled");else if("delete-test-donors"===n){t.append('
        '),t.find(".notice-wrap").html('

        "),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===n){t.append('
        '),t.find(".notice-wrap").html('

        "),i.addClass("button-disabled").attr("disabled","disabled")}else if("delete-donations"===n){r.show(),t.append('
        '),t.find(".notice-wrap").html('

        "),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('
        ');var r=i.find(".notice-wrap"),a=!1;(null!==n&&0!==n||(r.html('

        '+Give.fn.getGlobalVar("batch_export_no_class")+"

        "),a=!0),"recount-form"===o)&&(0==e('select[name="form_id"]').val()&&(r.html('

        '+Give.fn.getGlobalVar("batch_export_no_reqs")+"

        "),a=!0));if(a)return i.find(".button-disabled").removeClass("button-disabled"),!1}))}},c={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('
        '),t.process_step(1,o,t,this)}}))},process_step:function(t,n,i,o,r){Y=!0;var a=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:n,action:"give_do_ajax_export",step:t,file_name:r},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){Y=!1,a=!0;var r=e(o).parent().find(".notice-wrap");r.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;r.html('

        '+s+"

        ")}else if(t.success){var l=t.message;r.html('

        '+l+'

        ')}else r.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,t.file_name);!0===a&&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){Y=!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")}))}},d={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(d.start_db_update,1e3),window.setTimeout(d.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('

        '+Give.fn.getGlobalVar("db_update_confirmation_msg_button")+" "+Give.fn.getGlobalVar("db_update_confirmation_msg")+"

        ")})),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('
        '),t.el.progress_main_container.removeClass("give-hidden"),d.start_db_update(),window.setTimeout(d.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(d.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(""+n.data.heading+""),t.el.update_link.closest("p").remove(),i.html('

        '+n.data.message+'

        ')):(-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html(""+n.data.heading+""),n.data.message?(t.el.update_link.closest("p").remove(),i.html('

        '+n.data.message+'

        ')):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(""+n.data.heading+""),e(".give-progress div","#give-db-updates").animate({width:n.data.percentage+"%"},50,(function(){})),window.setTimeout(d.get_db_updates_info,1e3,t)):(i.html('

        '+Give.fn.getGlobal().updates.ajax_error+"

        "),setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3))}})},process_step:function(t,n,i){Y=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(n)},dataType:"json",success:function(t){Y=!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(""+t.data.heading+""),i.el.update_link.closest("p").remove(),n.html('

        '+t.data.message+'

        ')):(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html(""+t.data.heading+""),n.html('

        '+t.data.message+"

        "),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(""+t.data.heading.replace("{update_count}",i.el.heading.data("update-count"))+""),i.process_step(parseInt(t.data.step),t.data.update,i)):(n.html('

        '+Give.fn.getGlobal().updates.ajax_error+"

        "),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3))}}).fail((function(e){Y=!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")}))}},u={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 v({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 v({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 v({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_update")},successConfirm:function(){window.location.assign(jQuery(t).attr("href"))}}).render()}))}},f={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(),f.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("");i.attr("src",$.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 h({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 v({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('

        '+e.message+"

        "),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='
        X'+i+"
        ";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='
        X'+n+"
        ";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='
        X'+a;r.html(""),o.is(":checked")&&o.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),i.prop("checked",!0),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=f.onLoadPageNumber!==o,a=Give.fn.getGlobalVar("donors_bulk_action.no_action_selected"),s=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 p({modalContent:{title:a.title,desc:a.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1):parseInt(i)?("delete"===n&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(new p({modalContent:{title:s.title,desc:s.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1))}},m={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 v({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 v({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("regenerate_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))}},g={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={};if(n=e(this),"media"===e(this).data("field-type"))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"}};else 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:_,before_remove:null,after_remove:b,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 .give-handlediv",(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(){y(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);y(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());r0&&k.reorderItems(t,n),e(t).chosen().change((function(t,n){var i,o=t.target,r=[];n.deselected&&e(this).trigger("chosen:updated"),(null!==(i=document.querySelectorAll("#".concat(o.id,"_chosen li.search-choice")))&&void 0!==i?i:[]).forEach((function(e){var t=e.querySelector("span").textContent,n=Object.values(o.options).find((function(e){return e.textContent===t}));n&&r.push({text:n.textContent,value:n.value,selected:!0})})),Object.values(o.options).map((function(e){r.filter((function(t){return t.text===e.textContent})).length||r.push({text:e.textContent,value:e.value,selected:!1})})),k.rebuildDropDown(o,r)}))}))},reorderItems:function(t,n){var i=t.options,o=[];n.forEach((function(e,n){var r;(null!==(r=document.querySelectorAll("#".concat(t.id,"_chosen li.search-choice")))&&void 0!==r?r:[]).forEach((function(t,r){if(n===r){var a=Object.values(i).find((function(t){return t.value===e}));t.querySelector("span").textContent=a.text,o.push({value:a.value,text:a.text,selected:!0})}}))})),Object.values(i).map((function(e){o.filter((function(t){return t.value===e.value})).length||o.push({value:e.value,text:e.textContent,selected:e.selected})})),k.rebuildDropDown(t,o),e(this).trigger("chosen:updated")},rebuildDropDown:function(e,t){e.innerHTML="",t.map((function(t){var n=document.createElement("option");n.value=t.value,n.textContent=t.text,t.selected&&n.setAttribute("selected","true"),e.add(n)}))}};e((function(){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)})),i(),e.giveAjaxifyFields({type:"country_state",debug:!0}),r.init(),a.init(),s.init(),l.init(),f.init(),m.init(),c.init(),d.init(),u.init(),g.init(),w.init(),x(),k.init(),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,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 t=e("#poststuff"),h=Give.fn.getGlobalVar("thousands_separator"),p=Give.fn.getGlobalVar("decimal_separator"),v="",_="",b="",y=p===h?1:0;t.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(h,"g"))||[]).length,_=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(h)&&ye(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(),J()}))}(jQuery),jQuery(window).resize((function(){J()}));function X(){var e=jQuery("form.tools-setting-page-import");!0;var t=e.find(".give-progress"),n=jQuery(t).data("total_ajax"),i=jQuery(t).data("current"),o=jQuery(t).data("start"),r=jQuery(t).data("end"),a=jQuery(t).data("next"),s=jQuery(t).data("total"),l=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("give_donation_import"),total_ajax:n,current:i,start:o,end:r,next:a,total:s,per_page:l,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),X()):(!1,window.location=e.url)},error:function(){!1,new h({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}function K(){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}}document.addEventListener("DOMContentLoaded",(function(e){window.onload=function(){var e,t;K(),"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(){K()})),jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3").length>0&&X(),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 h({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()},error:function(){!1,new h({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(74241),n(49448),n(20252),n(36364);var Z=wp.i18n,ee=Z.__,te=Z.sprintf;function ne(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 ie(e){null!==e&&(ne(e,e.value),e.addEventListener("blur",(function(t){ne(e,t.target.value)})))}window.addEventListener("DOMContentLoaded",(function(){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"),a=document.getElementById("give-payment-status"),s=document.querySelectorAll('input[name="stripe_checkout_type"]'),l=Array.from(document.querySelectorAll(".stripe-checkout-field")),c=document.getElementById("give-stripe-connected"),d=Array.from(document.querySelectorAll('input[name="stripe_hide_icon"]')),u=document.querySelector(".stripe-icon-style"),f=Array.from(document.querySelectorAll(' input[name="stripe_mandate_acceptance_option"]')),h=document.querySelector(".stripe-mandate-acceptance-text"),p=Array.from(document.querySelectorAll('input[name="stripe_becs_hide_icon"]')),m=document.querySelector(".stripe-becs-icon-style"),g=Array.from(document.querySelectorAll(' input[name="stripe_becs_mandate_acceptance_option"]')),v=document.querySelector(".stripe-becs-mandate-acceptance-text"),_=Array.from(document.querySelectorAll('input[name="give_stripe_per_form_accounts"]')),b=document.querySelector(".give-stripe-manage-account-options"),y=document.querySelectorAll("#give-settings-section-group-credit-card .give-stripe-cc-option-field"),w=document.querySelectorAll("#give-settings-section-group-accounts .give-stripe-edit-statement-descriptor-btn");if(ie(t),ie(n),ie(i),ie(o),ie(r),null!==_){var x=document.querySelectorAll("#stripe_form_account_options .give-stripe-per-form-option-field");_.forEach((function(e){e.addEventListener("change",(function(e){x.forEach((function(e){e.classList.remove("give-stripe-boxshadow-option-wrap__selected"),e.querySelector('input[name="give_stripe_per_form_accounts"]').setAttribute("checked","")})),e.target.parentElement.parentElement.classList.add("give-stripe-boxshadow-option-wrap__selected"),e.target.setAttribute("checked","checked"),"enabled"===e.target.value?b.classList.remove("give-hidden"):b.classList.add("give-hidden")}))}))}if(null!==d&&d.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?u.classList.remove("give-hidden"):u.classList.add("give-hidden")}))})),null!==f&&f.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?h.classList.remove("give-hidden"):h.classList.add("give-hidden")}))})),null!==p&&p.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?m.classList.remove("give-hidden"):m.classList.add("give-hidden")}))})),null!==g&&g.forEach((function(e){e.addEventListener("change",(function(e){"enabled"===e.target.value?v.classList.remove("give-hidden"):v.classList.add("give-hidden")}))})),null!==c){var k=c.getAttribute("data-status"),C=c.getAttribute("data-redirect-url"),S=c.getAttribute("data-display"),T=c.getAttribute("data-title"),j=c.getAttribute("data-first-detail"),E=c.getAttribute("data-second-detail");"connected"===k&&"0"===S&&(new Give.modal.GiveConfirmModal({modalWrapper:"give-stripe-connected-modal give-modal--success",type:"confirm",modalContent:{title:T,desc:"".concat(j,'').concat(E,"")},successConfirm:function(e){window.location.href=C}}).render(),c.setAttribute("data-display","1"),history.pushState({urlPath:C},"",C))}if(null!==s&&s.forEach((function(e){e.addEventListener("change",(function(e){"modal"===e.target.value?l.map((function(e){return e.classList.remove("give-hidden")})):l.map((function(e){return e.classList.add("give-hidden")}))}))})),null!==a&&a.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")}))})),y.length&&y.forEach((function(e){e.addEventListener("click",(function(){y.forEach((function(e){e.classList.remove("give-stripe-boxshadow-option-wrap__selected"),e.querySelector('input[name="stripe_cc_fields_format"]').setAttribute("checked","")})),e.querySelector('input[name="stripe_cc_fields_format"]').setAttribute("checked","checked"),e.classList.add("give-stripe-boxshadow-option-wrap__selected")}))})),w.length){var I='\n \n \n ");w.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();var n=e.closest(".give-stripe-connect-data-field"),i=n.style.display;n.insertAdjacentHTML("afterend",I),n.style.display="none";var o=n.nextElementSibling,r=o.nextElementSibling,a=r.nextElementSibling;o.value=n.childNodes[0].nodeValue.trim(),o.style.display="block",o.style.marginBottom="10px",r.style.marginRight="5px",o.addEventListener("keyup",(function(e){var t=o.value.trim(),i=n.childNodes[0].nodeValue.trim();r.disabled=!t||t===i})),a.addEventListener("click",(function(e){e.preventDefault(),o.remove(),r.remove(),a.remove(),n.style.display=i})),r.addEventListener("click",(function(e){e.preventDefault();var t,i=o.value.trim(),r="".concat(n.getAttribute("data-action-url"),"&statement-descriptor=").concat(encodeURIComponent(i));22<(t=i).length||t.length<5||!isNaN(t)||0!==t.split("").filter((function(e){return["*","'",'"',"\\","<",">"].includes(e)})).length?new Give.modal.GiveErrorAlert({modalContent:{title:ee("Invalid Statement Descriptor Text","give"),desc:te('%s
        %s
        - %s
        - %s
        - %s
        - %s

        %s',ee("Please enter a valid Stripe statement descriptor.","give"),ee("List of important Stripe statement descriptor text requirements:","give"),ee("Contains only Latin characters.","give"),ee("Contains between 5 and 22 characters, inclusive.","give"),ee("Contains at least one letter.","give"),ee("Does not contain any of the special characters < > \\ ' \" *.","give"),"https://stripe.com/docs/statement-descriptors#requirements",ee("Read more about stripe statement descriptor text requirements.","give"))}}).render():fetch(r).then((function(e){return e.json()})).then((function(e){e.success?(n.childNodes[0].nodeValue=i,a.click()):new Give.modal.GiveErrorAlert({modalContent:{title:ee("Invalid Stripe Statement Descriptor Text","give"),desc:te('%s %s

        %s',ee("We are unable to update Stripe statement descriptor.","give"),e.data.errorMessage,"https://stripe.com/docs/statement-descriptors#requirements",ee("Read more about stripe statement descriptor text requirements.","give"))}}).render()}))}))}))}))}})),window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("give-payment-status"),t=document.getElementById("js-give-paypal-on-boarding-handler"),n=document.getElementById("js-give-paypal-disconnect-paypal-account"),i=document.querySelector("#give-paypal-commerce-account-manager-field-wrap .connection-setting"),o=document.querySelector("#give-paypal-commerce-account-manager-field-wrap .disconnection-setting"),r=document.getElementById("paypal_commerce_account_country"),a=new MutationObserver((function(e){e.forEach((function(e){e.removedNodes.forEach((function(e){if("PPMiniWin"===e.getAttribute("id")){var t=document.getElementById("give-paypal-onboarding-trouble-notice");t&&t.classList.remove("give-hidden")}}))}))}));if(e&&e.addEventListener("change",(function(e){var t=document.getElementById("give-paypal-commerce-opt-refund");null!==t&&(t.checked=!1,"refunded"===e.target.value?document.getElementById("give-paypal-commerce-opt-refund-wrap").style.display="block":document.getElementById("give-paypal-commerce-opt-refund-wrap").style.display="none")})),window.location.search.match(/paypal-commerce-account-connected=1/i)){var s=window.givePayPalCommerce.translations.pciComplianceInstructions.map((function(e){return"
      • ".concat(e,"
      • ")})).join(""),l=window.givePayPalCommerce.translations.liveWarning?'

        '.concat(window.givePayPalCommerce.translations.liveWarning,"

        "):"";new Give.modal.GiveSuccessAlert({classes:{modalWrapper:"paypal-commerce-connect",cancelBtn:"give-button--primary"},modalContent:{title:window.givePayPalCommerce.translations.connectSuccessTitle,body:'\n\t\t\t\t\t
        \n\t\t\t\t\t\t'.concat(l,"\n\t\t\t\t\t\t

        ").concat(window.givePayPalCommerce.translations.pciWarning,"

        \n\t\t\t\t\t\t
          ").concat(s,"
        \n\t\t\t\t\t
        \n\t\t\t\t").trim(),cancelBtnTitle:Give.fn.getGlobalVar("confirm")},closeOnBgClick:!0}).render();var c=Give.fn.removeURLParameter(window.location.href,"paypal-commerce-account-connected");history.pushState({},"",c)}function d(){var e=document.querySelector(".paypal-message-template");e&&e.parentElement.remove()}t&&t.addEventListener("click",(function(e){e.preventDefault(),d();var n=r.value,i=function(){t.disabled=!1,e.target.innerText=t.getAttribute("data-initial-label")};(function(){t.hasAttribute("data-initial-label")||t.setAttribute("data-initial-label",t.innerText),t.disabled=!0,e.target.innerText=Give.fn.getGlobalVar("loader_translation").processing})();var o=document.getElementById("give-paypal-onboarding-trouble-notice");return o&&o.classList.add("give-hidden"),fetch(ajaxurl+"?action=give_paypal_commerce_get_partner_url&countryCode=".concat(n)).then((function(e){return e.json()})).then((function(e){if(!0===e.success){var t=document.querySelector("[data-paypal-button]");t.href="".concat(e.data.partnerLink,"&displayMode=minibrowser"),t.click(),a.observe(document.querySelector("body"),{attributes:!0,childList:!0})}i()})).then((function(){fetch(ajaxurl+"?action=give_paypal_commerce_onboarding_trouble_notice").then((function(e){return e.json()})).then((function(e){if(!0===e.success){var t=document.querySelector(".connect-button-wrap");o&&o.remove(),t.append((n=e.data,(i=document.createElement("div")).innerHTML=n.trim(),i.firstChild))}var n,i}))})),!1})),n&&n.addEventListener("click",(function(e){return e.preventDefault(),d(),new v({modalContent:{title:givePayPalCommerce.translations.confirmPaypalAccountDisconnection,desc:givePayPalCommerce.translations.disconnectPayPalAccount},successConfirm:function(){i.classList.remove("give-hidden"),o.classList.add("give-hidden"),r.parentElement.parentElement.classList.remove("hide-with-position"),document.querySelector("label[for='paypal_commerce_collect_billing_details']").parentElement.parentElement.classList.add("give-hidden"),fetch(ajaxurl+"?action=give_paypal_commerce_disconnect_account")}}).render(),!1}))}));n(2601);M.modal=e;var oe=M.init,re=M.fn,ae=M.cache,se=M.modal,le=M.notice;window.Give={init:oe,fn:re,cache:ae,modal:se,notice:le,initializeIframeResize:function(e){return new A.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};break;case"giveScrollIframeInToView":e.scrollIntoView({behavior:"smooth",inline:"nearest"})}},onInit:function(){var t=e.parentElement;window.top.addEventListener("resize",(function(){e.style.width=window.top.innerWidth+"px"}));var 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)}}})()})();