PageSourceSearch

https://cdn.vialibri.net/static/assets/react-stripe.umd-iBAbHEmD.js

js vialibri.net collected 2026-09-24 09:36:58 UTC 12,031 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d3bafebc-6e61-4a9f-aaea-53f23724116b",e._sentryDebugIdIdentifier="sentry-dbid-d3bafebc-6e61-4a9f-aaea-53f23724116b")}catch(e){}}();import{t as e}from"./rolldown-runtime-BBzOAo5_.js";import{t}from"./react-DuV36FPs.js";var n="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,i=function(e){return null!==a||(a=new Promise((function(t,a){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(o),window.Stripe)t(window.Stripe);else try{var i=function(){for(var e=document.querySelectorAll('script[src^="'.concat(n,'"]')),t=0;t<e.length;t++){var o=e[t];if(r.test(o.src))return o}return null}();i&&e?console.warn(o):i||(i=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(n).concat(t);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r}(e)),i.addEventListener("load",(function(){window.Stripe?t(window.Stripe):a(new Error("Stripe.js not available"))})),i.addEventListener("error",(function(){a(new Error("Failed to load Stripe.js"))}))}catch(c){return void a(c)}else t(null)}))),a},c=Promise.resolve().then((function(){return i(null)})),u=!1;c.catch((function(e){u||console.warn(e)}));var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u=!0;var r=Date.now();return c.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})}(r,n),r}(e,t,r)}))},l=e(((e,n)=>{!function(r,o){"object"==typeof e&&void 0!==n?o(e,t()):"function"==typeof define&&define.amd?define(["exports","react"],o):o((r=r||self).ReactStripe={},r.React)}(e,(function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="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},o(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){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 r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function u(){}function s(){}s.resetWarningCache=u;
1var l,f=(function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:u};return n.PropTypes=n,n}()}(l={exports:{}},l.exports),l.exports),p=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},d=function(e){return null!==e&&"object"===o(e)},m="[object Object]",y=function e(t,n){if(!d(t)||!d(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===m;if(o!==(Object.prototype.toString.call(n)===m))return!1;if(!o&&!r)return t===n;var a=Object.keys(t),i=Object.keys(n);if(a.length!==i.length)return!1;for(var c={},u=0;u<a.length;u+=1)c[a[u]]=!0;for(var s=0;s<i.length;s+=1)c[i[s]]=!0;var l=Object.keys(c);if(l.length!==a.length)return!1;var f=t,p=n;return l.every((function(t){return e(f[t],p[t])}))},h=function(e,t,n){return d(e)?Object.keys(e).reduce((function(o,i){var c=!d(t)||!y(e[i],t[i]);return n.includes(i)?(c&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):c?r(r({},o||{}),{},a({},i,e[i])):o}),null):null},g=function(e){if(null===e||d(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},v=function(e){if(function(e){return d(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(g)};var t=g(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},b=t.createContext(null);b.displayName="ElementsContext";var E=t.createContext(null);E.displayName="CartElementContext";var w=function(e){var n=e.stripe,r=e.options,o=e.children,a=t.useMemo((function(){return v(n)}),[n]),c=i(t.useState(null),2),u=c[0],s=c[1],l=i(t.useState(null),2),f=l[0],d=l[1],m=i(t.useState((function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(r):null}})),2),y=m[0],g=m[1];t.useEffect((function(){var e=!0,t=function(e){g((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==a.tag||y.stripe?"sync"!==a.tag||y.stripe||t(a.stripe):a.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[a,y,r]);var w=p(n);t.useEffect((function(){null!==w&&w!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[w,n]);var C=p(r);return t.useEffect((function(){if(y.elements){var e=h(r,C,["clientSecret","fonts"]);e&&y.elements.update(e)}}),[r,C,y.elements]),t.useEffect((function(){var e=y.stripe;e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"1.16.5"}),e.registerAppInfo({name:"react-stripe-js",version:"1.16.5",url:"https://stripe.com/docs/stripe-js/react"}))}),[y.stripe]),t.createElement(b.Provider,{value:y},t.createElement(E.Provider,{value:{cart:u,setCart:s,cartState:f,setCartState:d}},o))};w.propTypes={stripe:f.any,options:f.object};var C=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(b),e)},S=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(E),e)},j=function(e){return(0,e.children)(C("mounts <ElementsConsumer>"))};j.propTypes={children:f.func.isRequired};var O=function(e,n,r){var o=!!r,a=t.useRef(r);t.useEffect((function(){a.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,a])},k=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),a=n?function(e){C("mounts <".concat(o,">")),S("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r,a=n.id,c=n.className,u=n.options,s=void 0===u?{}:u,l=n.onBlur,f=n.onFocus,d=n.onReady,m=n.onChange,y=n.onEscape,g=n.onClick,v=n.onLoadError,b=n.onLoaderStart,E=n.onNetworksChange,w=n.onCheckout,j=n.onLineItemClick,k=n.onConfirm,P=n.onCancel,A=n.onShippingAddressChange,x=n.onShippingRateChange,_=C("mounts <".concat(o,">")).elements,I=i(t.useState(null),2),R=I[0],T=I[1],B=t.useRef(null),L=t.useRef(null),N=S("mounts <".concat(o,">")),M=N.setCart,D=N.setCartState;O(R,"blur",l),O(R,"focus",f),O(R,"escape",y),O(R,"click",g),O(R,"loaderror",v),O(R,"loaderstart",b),O(R,"networksch
1ange",E),O(R,"lineitemclick",j),O(R,"confirm",k),O(R,"cancel",P),O(R,"shippingaddresschange",A),O(R,"shippingratechange",x),"cart"===e?r=function(e){D(e),d&&d(e)}:d&&(r="payButton"===e?d:function(){d(R)}),O(R,"ready",r),O(R,"change","cart"===e?function(e){D(e),m&&m(e)}:m),O(R,"checkout","cart"===e?function(e){D(e),w&&w(e)}:w),t.useLayoutEffect((function(){if(null===B.current&&_&&null!==L.current){var t=_.create(e,s);"cart"===e&&M&&M(t),B.current=t,T(t),t.mount(L.current)}}),[_,s,M]);var W=p(s);return t.useEffect((function(){if(B.current){var e=h(s,W,["paymentRequest"]);e&&B.current.update(e)}}),[s,W]),t.useLayoutEffect((function(){return function(){B.current&&(B.current.destroy(),B.current=null)}}),[]),t.createElement("div",{id:a,className:c,ref:L})};return a.propTypes={id:f.string,className:f.string,onChange:f.func,onBlur:f.func,onFocus:f.func,onReady:f.func,onEscape:f.func,onClick:f.func,onLoadError:f.func,onLoaderStart:f.func,onNetworksChange:f.func,onCheckout:f.func,onLineItemClick:f.func,onConfirm:f.func,onCancel:f.func,onShippingAddressChange:f.func,onShippingRateChange:f.func,options:f.object},a.displayName=o,a.__elementType=e,a},P="undefined"==typeof window,A=k("auBankAccount",P),x=k("card",P),_=k("cardNumber",P),I=k("cardExpiry",P),R=k("cardCvc",P),T=k("fpxBank",P),B=k("iban",P),L=k("idealBank",P),N=k("p24Bank",P),M=k("epsBank",P),D=k("payment",P),W=k("payButton",P),q=k("paymentRequestButton",P),F=k("linkAuthentication",P),U=k("address",P),Y=k("shippingAddress",P),$=k("cart",P),H=k("paymentMethodMessaging",P),V=k("affirmMessage",P),z=k("afterpayClearpayMessage",P);e.AddressElement=U,e.AffirmMessageElement=V,e.AfterpayClearpayMessageElement=z,e.AuBankAccountElement=A,e.CardCvcElement=R,e.CardElement=x,e.CardExpiryElement=I,e.CardNumberElement=_,e.CartElement=$,e.Elements=w,e.ElementsConsumer=j,e.EpsBankElement=M,e.FpxBankElement=T,e.IbanElement=B,e.IdealBankElement=L,e.LinkAuthenticationElement=F,e.P24BankElement=N,e.PayButtonElement=W,e.PaymentElement=D,e.PaymentMethodMessagingElement=H,e.PaymentRequestButtonElement=q,e.ShippingAddressElement=Y,e.useCartElement=function(){return S("calls useCartElement()").cart},e.useCartElementState=function(){return S("calls useCartElementState()").cartState},e.useElements=function(){return C("calls useElements()").elements},e.useStripe=function(){return C("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}))}));export{s as n,l as t};
2//# sourceMappingURL=react-stripe.umd-iBAbHEmD.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.