PageSourceSearch

https://topnanny.es/packs/js/2340-51d8128a0b8270d41fae.chunk.js

js topnanny.es collected 2026-10-03 21:32:36 UTC 4,387 bytes, 2 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="cda1e9c6-58c7-40d3-beea-d730af00b0a0",t._sentryDebugIdIdentifier="sentry-dbid-cda1e9c6-58c7-40d3-beea-d730af00b0a0")}catch(t){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6ffbd01cf0691a08705f62d968183afee02bdfcf"},(globalThis.webpackChunktop_webgroup=globalThis.webpackChunktop_webgroup||[]).push([[2340],{72340(t,e,i){i.d(e,{initStripeButton:()=>o,preloadStripe:()=>a});var n=i(95616);let s;class r{constructor(t,e="payment-form"){this.action=t,this.formId=e,this.form=document.getElementById(e),this.submitted=!1,this.paymentElement=null,this.handleSubmit=null,this.teardownBound=this.teardown.bind(this),this.stripeMethodMap={submitSetupIntent:null,submitPaymentIntent:null}}stripeConfiguration(){if(this.form){const t=n(this.form).find(".stripe-configuration");if(t.length)return t}return n(".stripe-configuration")}async ensureStripeLoaded(){if("function"!==typeof Stripe&&(s=s||n.cachedScript("https://js.stripe.com/v3/"),await s,"function"!==typeof Stripe))throw new Error("Stripe.js failed to load")}
1async init(){if(!this.form)return;try{await this.ensureStripeLoaded()}catch(i){return console.error(i),void this.addMessage("An unexpected error occurred.")}const t=this.stripeConfiguration().attr("data-key");if(!t)return void this.addMessage("Missing Stripe configuration.");if("true"===this.form.dataset.stripeElementsInitialized)return;this.form.dataset.stripeElementsInitialized="true",document.addEventListener("turbo:before-cache",this.teardownBound);const e=Stripe(t);this.stripeMethodMap={submitSetupIntent:e.confirmSetup,submitPaymentIntent:e.confirmPayment},this.initStripePayment(e)}initStripePayment(t){const e={clientSecret:this.form.dataset.secret,customerSessionClientSecret:this.form.dataset.customerSessionSecret,loader:"auto",appearance:{theme:"stripe"}},i=t.elements(e);"submitPaymentIntent"!==this.action&&"submitSetupIntent"!==this.action||(this.paymentElement=i.create("payment"),this.paymentElement.mount("#payment-element")),this.handleSubmit&&this.form.removeEventListener("submit",this.handleSubmit),this.handleSubmit=async t=>{if(t.preventDefault(),this.submitted)return;this.submitted=!0,n(".dimmer#payment-dimmer").css("visibility","inherit");const e=this.form.querySelector('button[type="submit"]')||this.form.querySelector("button");e&&(e.disabled=!0);try{const t=this.stripeMethodMap[this.action];if(!t)return this.addMessage("Unsupported Stripe action."),void this.resetForm();const e=await t({elements:i,confirmParams:{return_url:this.form.dataset.returnUrl,payment_method:this.form.dataset.paymentMethod,payment_method_data:{allow_redisplay:"always"}}});e.error?(this.addMessage(e.error.message),this.resetForm()):window.location.href=this.form.dataset.returnUrl}catch(s){console.error("Error processing payment:",s),this.addMessage("An unexpected error occurred."),this.resetForm()}},this.form.addEventListener("submit",this.handleSubmit)}teardown(){if(this.form){if(this.handleSubmit&&(this.form.removeEventListener("submit",this.handleSubmit),this.handleSubmit=null),this.paymentElement){try{this.paymentElement.unmount()}catch(t){}this.paymentElement=null}document.removeEventListener("turbo:before-cache",this.teardownBound)}}resetForm(){this.submitted=!1,n(".dimmer#payment-dimmer").css("visibility","hidden");const t=this.form.querySelector('button[type="submit"]')||this.form.querySelector("button");t&&(t.disabled=!1)}addMessage(t){const e=document.querySelector("#error-message");e.style.display="block";const i=this.addDashboardLinks(t);e.innerHTML=`> ${i}<br>`,console.log(`Debug: ${t}`)}addDashboardLinks(t){const e=`https://dashboard.stripe.com${(this.stripeConfiguration().attr("data-key")||"").startsWith("pk_live")?"":"/test"}/payments`;return t.replace(/(pi_(\S*)\b)/g,`<a href="${e}/$1" target="_blank">$1</a>`)}}const o=function(t,e="payment-form"){new r(t,e).init()},a=function(){n.cachedScript("https://js.stripe.com/v3/").then(function(t){console.log(t)})}}}]);
2//# sourceMappingURL=2340-51d8128a0b8270d41fae.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.