PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 2.33.3
GiveWP – Donation Plugin and Fundraising Platform v2.33.3
4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / assets / dist / js / give-stripe.js
give / assets / dist / js Last commit date
admin-add-ons.asset.php 3 years ago admin-add-ons.js 4 years ago admin-onboarding-wizard.asset.php 3 years ago admin-onboarding-wizard.js 3 years ago admin-reports-widget.asset.php 3 years ago admin-reports-widget.js 3 years ago admin-reports.asset.php 3 years ago admin-reports.js 3 years ago admin-setup.asset.php 3 years ago admin-setup.js 4 years ago admin-shortcodes.asset.php 3 years ago admin-shortcodes.js 4 years ago admin-upsell-addons-page.asset.php 3 years ago admin-upsell-addons-page.js 3 years ago admin-upsell-sale-banner.asset.php 3 years ago admin-upsell-sale-banner.js 4 years ago admin-widgets.asset.php 3 years ago admin-widgets.js 4 years ago admin.asset.php 2 years ago admin.js 2 years ago donation-options.asset.php 3 years ago donation-options.js 3 years ago donor-dashboards-app.asset.php 3 years ago donor-dashboards-app.js 3 years ago donor-dashboards-block.asset.php 3 years ago donor-dashboards-block.js 3 years ago give-admin-donation-forms.asset.php 3 years ago give-admin-donation-forms.js 3 years ago give-admin-donations.asset.php 3 years ago give-admin-donations.js 3 years ago give-admin-donors.asset.php 3 years ago give-admin-donors.js 3 years ago give-admin-subscriptions.asset.php 3 years ago give-admin-subscriptions.js 3 years ago give-classic-template.asset.php 3 years ago give-classic-template.js 3 years ago give-donation-summary.asset.php 3 years ago give-donation-summary.js 3 years ago give-log-list-table-app.asset.php 3 years ago give-log-list-table-app.js 3 years ago give-migrations-list-table-app.asset.php 3 years ago give-migrations-list-table-app.js 3 years ago give-sequoia-template.asset.php 3 years ago give-sequoia-template.js 4 years ago give-stripe-becs.asset.php 3 years ago give-stripe-becs.js 3 years ago give-stripe-sepa.asset.php 3 years ago give-stripe-sepa.js 3 years ago give-stripe.asset.php 3 years ago give-stripe.js 3 years ago give.asset.php 2 years ago give.js 2 years ago gutenberg.asset.php 3 years ago gutenberg.js 3 years ago payment-gateway.asset.php 3 years ago payment-gateway.js 3 years ago paypal-commerce.asset.php 2 years ago paypal-commerce.js 2 years ago plugin-deactivation-survey.asset.php 2 years ago plugin-deactivation-survey.js 2 years ago
give-stripe.js
1 lines
1 (()=>{"use strict";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(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(n=a.key,l=void 0,l=function(t,r){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(n,"string"),"symbol"===e(l)?l:String(l)),a)}var n,l}var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.formElement=t,this.publishableKey=t.getAttribute("data-publishable-key"),this.accountId=t.getAttribute("data-account")?t.getAttribute("data-account"):"",this.idPrefix=t.getAttribute("data-id")?t.getAttribute("data-id"):"",this.locale=give_stripe_vars.preferred_locale,this.fieldsFormat=give_stripe_vars.cc_fields_format,this.isSingleInputField="single"===this.fieldsFormat,this.isMounted=!1,this.fontStyles=[],0!==Object.keys(give_stripe_vars.element_font_styles).length&&this.fontStyles.push(give_stripe_vars.element_font_styles))}var r,i,a;return r=e,(i=[{key:"setupStripeElement",value:function(){var e={};return 0!==this.accountId.trim().length&&(e={stripeAccount:this.accountId}),Stripe(this.publishableKey,e)}},{key:"getElements",value:function(e){var t={locale:this.locale};return this.fontStyles.length>0&&(t={fonts:this.fontStyles,locale:this.locale}),e.elements(t)}},{key:"createElement",value:function(e,t){var r=[],i=this.getElementsToMountOn(),a={style:this.getElementStyles(),classes:this.getElementClasses()};return i.forEach((function(t,i){"card"===t[0]?a.hidePostalCode=!!give_stripe_vars.checkout_address:"cardNumber"===t[0]?a.placeholder=give_stripe_vars.card_number_placeholder_text:"cardCvc"===t[0]?a.placeholder=give_stripe_vars.card_cvc_placeholder_text:delete a.placeholder,r.push(e.create(t[0],a))})),"cardNumber"===i[0][0]&&r[0].addEventListener("change",(function(e){var r="diners"===e.brand?"dinersclub":e.brand;t.querySelector(".card-type").className="card-type "+r})),r}},{key:"destroyElement",value:function(e){e.forEach((function(e,t){e.destroy()}))}},{key:"getElementStyles",value:function(){return{base:give_stripe_vars.element_base_styles,complete:give_stripe_vars.element_complete_styles,empty:give_stripe_vars.element_empty_styles,invalid:give_stripe_vars.element_invalid_styles}}},{key:"getElementClasses",value:function(){return{focus:"focus",empty:"empty",invalid:"invalid"}}},{key:"getElementsToMountOn",value:function(){var e={cardNumber:"#give-card-number-field-".concat(this.idPrefix),cardCvc:"#give-card-cvc-field-".concat(this.idPrefix),cardExpiry:"#give-card-expiration-field-".concat(this.idPrefix)};return this.isSingleInputField&&(e={card:"#give-stripe-single-cc-fields-".concat(this.idPrefix)}),Object.entries(e)}},{key:"mountElement",value:function(e){var t=this.getElementsToMountOn();Array.from(e).forEach((function(e,r){e.mount(t[r][1])}))}},{key:"unMountElement",value:function(e){var t=this.getElementsToMountOn();Array.from(e).forEach((function(e,r){e.unmount(t[r][1])}))}},{key:"createPaymentMethod",value:function(e,t,r){var i={};if(this.isSingleInputField||(i.name=e.querySelector('input[name="card_name"]').value),!give_stripe_vars.stripe_card_update){var a=e.querySelector('input[name="give_first"]').value,n=e.querySelector('input[name="give_last"]').value,l=e.querySelector('input[name="give_email"]').value;i.name="".concat(a," ").concat(n),i.email=l,e.querySelector("[id^=give-purchase-button]").setAttribute("disabled","disabled")}if(give_stripe_vars.checkout_address&&!give_stripe_vars.stripe_card_update){var o=e.querySelector(".card-address").value,c=e.querySelector(".card-address-2").value,s=e.querySelector(".card-city").value,u=e.querySelector(".card_state").value,d=e.querySelector(".card-zip").value,v=e.querySelector(".billing-country").value;i.address={line1:o||"",line2:c||"",city:s||"",state:u||"",postal_code:d||"",country:v||""}}t.createPaymentMethod({type:"card",card:r[0],billing_details:i}).then((function(t){if(t.error){var r=jQuery(e),i='<div class="give_errors"><p class="give_error">'.concat(t.error.message,"</p></div>"),a=e.getAttribute("data-id");return Give.form.fn.resetDonationButton(r),void(e.querySelector("#give-stripe-payment-errors-".concat(a)).innerHTML=i)}e.querySelector('input[name="give_stripe_payment_method"]').value=t.paymentMethod.id,e.submit()}))}},{key:"triggerStripeModal",value:function(e,t,r,i){var a=e.querySelector('input[name="give-form-id-prefix"]'),n=e.querySelector("#give-stripe-checkout-modal-donate-button-".concat(a.value)),l=e.querySelector('input[name="card_name"]'),o=document.querySelector(".give-stripe-checkout-modal-container"),c=document.querySelector("#give-purchase-button"),s={};c.addEventListener("click",(function(){o.scrollIntoView({behavior:"smooth"})})),i.forEach((function(e){s.cardName=!1,e.addEventListener("ready",(function(e){s[e.elementType]=!1,s.cardName="card"===e.elementType})),e.addEventListener("change",(function(e){s[e.elementType]=e.complete,Object.values(s).every((function(e){return!0===e}))?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}))})),null!==l&&l.addEventListener("keyup",(function(e){s.cardName=""!==e.target.value,Object.values(s).every((function(e){return!0===e}))?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")})),null!==n&&n.addEventListener("click",(function(a){var l=a.target,o=l.nextElementSibling;n.getAttribute("data-is_legacy_form")?(l.value=give_global_vars.purchase_loading,o.style.display="inline-block"):(l.value="",o.classList.add("sequoia-loader"),o.classList.add("spinning"),o.classList.remove("give-loading-animation")),t.createPaymentMethod(e,r,i),a.preventDefault()}))}}])&&t(r.prototype,i),a&&t(r,a),Object.defineProperty(r,"prototype",{writable:!1}),e}();document.addEventListener("DOMContentLoaded",(function(e){Array.from(document.querySelectorAll(".give-form-wrap")).forEach((function(e){var t=e.querySelector(".give-form");if(null!==t&&t.getAttribute("data-publishable-key")){var i=give_stripe_vars.hasOwnProperty("stripe_card_update")&&parseInt(give_stripe_vars.stripe_card_update),a=t.querySelector('input[name="give-form-id-prefix"]'),n=new r(t),l=n.setupStripeElement(),o=n.getElements(l),c=n.createElement(o,t),s=Give.form.fn.getInfo("stripe-checkout-type",t);d(!1),document.addEventListener("give_gateway_loaded",d),t.onsubmit=function(e){var r=u(),o=r.selectedGatewayId,s=r.isStripeModalCheckoutGateway;if((i||"stripe"===o)&&(n.createPaymentMethod(t,l,c),e.preventDefault()),s){var d=t.querySelector(".give-stripe-checkout-modal"),v=d.querySelector(".give-stripe-checkout-donation-amount"),m=d.querySelector(".give-stripe-checkout-donor-email"),p=t.querySelector(".give-final-total-amount").textContent,y=t.querySelector('input[name="give_email"]').value,f=t.querySelector('input[name="give_validate_stripe_payment_fields"]');d.classList.add("give-stripe-checkout-show-modal"),null!==v&&(v.innerHTML=p),null!==m&&(m.innerHTML=y),f.setAttribute("value","1");var g=t.querySelector(".give-stripe-checkout-modal-close");null!==g&&g.addEventListener("click",(function(e){t.querySelector("#give-stripe-checkout-modal-".concat(a.value)).classList.remove("give-stripe-checkout-show-modal");var r=t.querySelector(".give-submit");null!==r&&(r.value=r.getAttribute("data-before-validation-label"),r.nextElementSibling.style.display="none",r.removeAttribute("disabled"),t.querySelector('input[name="give_validate_stripe_payment_fields"]').setAttribute("value","0")),e.preventDefault()})),e.preventDefault()}}}function u(){var e=t.querySelector('input[name="give-gateway"]'),r=e?e.value:"",i="modal"===s;return{formGateway:e,selectedGatewayId:r,isCheckoutTypeModal:i,isStripeModalCheckoutGateway:e&&"stripe_checkout"===r&&i}}function d(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=u(),a=r.selectedGatewayId,o=r.isStripeModalCheckoutGateway;i||"stripe"===a||o?n.mountElement(c):e&&n.unMountElement(c),o&&n.triggerStripeModal(t,n,l,c)}}))}))})();