vendor: 12,292 bytes, lines 1-2
1import{s as u,o as s}from"./-1RkBR9N.js";function V(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,n)}return t}function Y(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?V(Object(t),!0).forEach(function(n){X(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function U(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U=function(e){return typeof e}:U=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(r)}function X(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Se(r,e){if(r==null)return{};var t={},n=Object.keys(r),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(t[o]=r[o]);return t}function ge(r,e){if(r==null)return{};var t=Se(r,e),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(o=0;o<a.length;o++)n=a[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function H(r,e){return Ee(r)||Ce(r,e)||be(r,e)||ke()}function Ee(r){if(Array.isArray(r))return r}function Ce(r,e){var t=r&&(typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"]);if(t!=null){var n=[],o=!0,a=!1,c,d;try{for(t=t.call(r);!(o=(c=t.next()).done)&&(n.push(c.value),!(e&&n.length===e));o=!0);}catch(i){a=!0,d=i}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw d}}return n}}function be(r,e){if(r){if(typeof r=="string")return F(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(r,e)}}function F(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function ke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=function(e,t,n){var o=!!n,a=s.useRef(n);s.useEffect(function(){a.current=n},[n]),s.useEffect(function(){if(!o||!e)return function(){};var c=function(){a.current&&a.current.apply(a,arguments)};return e.on(t,c),function(){e.off(t,c)}},[o,t,e,a])},W=function(e){var t=s.useRef(e);return s.useEffect(function(){t.current=e},[e]),t.current},x=function(e){return e!==null&&U(e)==="object"},Pe=function(e){return x(e)&&typeof e.then=="function"},xe=function(e){return x(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},G="[object Object]",je=function r(e,t){if(!x(e)||!x(t))return e===t;var n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;var a=Object.prototype.toString.call(e)===G,c=Object.prototype.toString.call(t)===G;if(a!==c)return!1;if(!a&&!n)return e===t;var d=Object.keys(e),i=Object.keys(t);if(d.length!==i.length)return!1;for(var S={},y=0;y<d.length;y+=1)S[d[y]]=!0;for(var g=0;g<i.length;g+=1)S[i[g]]=!0;var f=Object.keys(S);if(f.length!==d.length)return!1;var P=e,k=t,b=function(R){return r(P[R],k[R])};return f.every(b)},Q=function(e,t,n){return x(e)?Object.keys(e).reduce(function(o,a){var c=!x(t)||!je(e[a],t[a]);return n.includes(a)?(c&&console.warn("Unsupported prop change: options.".concat(a," is not a mutable property.")),o):c?Y(Y({},o||{}),{},X({},a,e[a])):o},null):null},Z="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.",K=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z;if(e===null||xe(e))return e;throw new Error(t)},we=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z;if(Pe(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(o){return K(o,t)})};var n=K(e,t);return n===null?{tag:"empty"}:{tag:"sync",stripe:n}},Oe=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"3.10.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.10.0",url:"https://stripe.com/docs/stripe-js/react"}))},N=s.createContext(null);N.displayName="ElementsContext";var ee=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},Re=function(e){var t=e.stripe,n=e.options,o=e.children,a=s.useMemo(function(){return we(t)},[t]),c=s.useState(function(){return{stripe:a.tag==="sync"?a.stripe:null,elements:a.tag==="sync"?a.stripe.elements(n):null}}),d=H(c,2),i=d[0],S=d[1];s.useEffect(function(){var f=!0,P=function(b){S(function(j){return j.stripe?j:{stripe:b,elements:b.elements(n)}})};return a.tag==="async"&&!i.stripe?a.stripePromise.then(function(k){k&&f&&P(k)}):a.tag==="sync"&&!i.stripe&&P(a.stripe),function(){f=!1}},[a,i,n]);var y=W(t);s.useEffect(function(){y!==null&&y!==t&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[y,t]);var g=W(n);return s.useEffect(function(){if(i.elements){var f=Q(n,g,["clientSecret","fonts"]);f&&i.elements.update(f)}},[n,g,i.elements]),s.useEffect(function(){Oe(i.stripe)},[i.stripe]),s.createElement(N.Provider,{value:i},o)};Re.propTypes={stripe:u.any,options:u.object};var Ae=function(e){var t=s.useContext(N);return ee(t,e)},Ke=function(){var e=Ae("calls useElements()"),t=e.elements;return t};u.func.isRequired;var te=s.createContext(null);te.displayName="CheckoutSdkContext";var Le=function(e,t){if(!e)throw new Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},Ie=s.createContext(null);Ie.displayName="CheckoutContext";u.any,u.shape({fetchClientSecret:u.func.isRequired,elementsOptions:u.object}).isRequired;var B=function(e){var t=s.useContext(te),n=s.useContext(N);if(t&&n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return t?Le(t,e):ee(n,e)},Te=["mode"],Ue=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},l=function(e,t){var n="".concat(Ue(e),"Element"),o=function(i){var S=i.id,y=i.className,g=i.options,f=g===void 0?{}:g,P=i.onBlur,k=i.onFocus,b=i.onReady,j=i.onChange,R=i.onEscape,ie=i.onClick,se=i.onLoadError,ue=i.onLoaderStart,ce=i.onNetworksChange,le=i.onConfirm,pe=i.onCancel,fe=i.onShippingAddressChange,de=i.onShippingRateChange,me=i.onSavedPaymentMethodRemove,ve=i.onSavedPaymentMethodUpdate,A=B("mounts <".concat(n,">")),L="elements"in A?A.elements:null,E="checkoutSdk"in A?A.checkoutSdk:null,he=s.useState(null),q=H(he,2),m=q[0],ye=q[1],C=s.useRef(null),_=s.useRef(null);h(m,"blur",P),h(m,"focus",k),h(m,"escape",R),h(m,"click",ie),h(m,"loaderror",se),h(m,"loaderstart",ue),h(m,"networkschange",ce),h(m,"confirm",le),h(m,"cancel",pe),h(m,"shippingaddresschange",fe),h(m,"shippingratechange",de),h(m,"savedpaymentmethodremove",me),h(m,"savedpaymentmethodupdate",ve),h(m,"change",j);var M;b&&(e==="expressCheckout"?M=b:M=function(){b(m)}),h(m,"ready",M),s.useLayoutEffect(function(){if(C.current===null&&_.current!==null&&(L||E)){var v=null;if(E)switch(e){case"payment":v=E.createPaymentElement(f);break;case"address":if("mode"in f){var D=f.mode,J=ge(f,Te);if(D==="shipping")v=E.createShippingAddressElement(J);else if(D==="billing")v=E.createBillingAddressElement(J);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":v=E.createExpressCheckoutElement(f);break;case"currencySelector":v=E.createCurrencySelectorElement();break;case"taxId":v=E.createTaxIdElement(f);break;default:throw new Error("Invalid Element type ".concat(n,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else L&&(v=L.create(e,f));C.current=v,ye(v),v&&v.mount(_.current)}},[L,E,f]);var $=W(f);return s.useEffect(function(){if(C.current){var v=Q(f,$,["paymentRequest"]);v&&"update"in C.current&&C.current.update(v)}},[f,$]),s.useLayoutEffect(function(){return function(){if(C.current&&typeof C.current.destroy=="function")try{C.current.destroy(),C.current=null}catch{}}},[]),s.createElement("div",{id:S,className:y,ref:_})},a=function(i){B("mounts <".concat(n,">"));var S=i.id,y=i.className;return s.createElement("div",{id:S,className:y})},c=t?a:o;return c.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onEscape:u.func,onClick:u.func,onLoadError:u.func,onLoaderStart:u.func,onNetworksChange:u.func,onConfirm:u.func,onCancel:u.func,onShippingAddressChange:u.func,onShippingRateChange:u.func,onSavedPaymentMethodRemove:u.func,onSavedPaymentMethodUpdate:u.func,options:u.object},c.displayName=n,c.__elementType=e,c},p=typeof window>"u",Ne=s.createContext(null);Ne.displayName="EmbeddedCheckoutProviderContext";var ze=function(){var e=B("calls useStripe()"),t=e.stripe;return t};l("auBankAccount",p);var Xe=l("card",p);l("cardNumber",p);l("cardExpiry",p);l("cardCvc",p);l("fpxBank",p);l("iban",p);l("idealBank",p);l("p24Bank",p);l("epsBank",p);l("payment",p);l("expressCheckout",p);l("currencySelector",p);l("paymentRequestButton",p);l("linkAuthentication",p);l("address",p);l("shippingAddress",p);l("paymentMethodMessaging",p);l("affirmMessage",p);l("afterpayClearpayMessage",p);l("taxId",p);var re="acacia",_e=function(e){return e===3?"v3":e},ne="https://js.stripe.com",Me="".concat(ne,"/").concat(re,"/stripe.js"),We=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Be=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var qe=function(e){return We.test(e)||Be.test(e)},$e=function(){for(var e=document.querySelectorAll('script[src^="'.concat(ne,'"]')),t=0;t<e.length;t++){var n=e[t];if(qe(n.src))return n}return null},z=function(e){var t="",n=document.createElement("script");n.src="".concat(Me).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(n),n},De=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"6.1.0",startTime:t})},w=null,I=null,T=null,Je=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}},Ve=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},Ye=function(e){return w!==null?w:(w=new Promise(function(t,n){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var o=$e();if(!(o&&e)){if(!o)o=z(e);else if(o&&T!==null&&I!==null){var a;o.removeEventListener("load",T),o.removeEventListener("error",I),(a=o.parentNode)===null||a===void 0||a.removeChild(o),o=z(e)}}T=Ve(t,n),I=Je(n),o.addEventListener("load",T),o.addEventListener("error",I)}catch(c){n(c);return}}),w.catch(function(t){return w=null,Promise.reject(t)}))},Fe=function(e,t,n){if(e===null)return null;var o=t[0],a=o.match(/^pk_test/),c=_e(e.version),d=re;a&&c!==d&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("6.1.0"," expected Stripe.js@").concat(d,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var i=e.apply(void 0,t);return De(i,n),i},O,oe=!1,ae=function(){return O||(O=Ye(null).catch(function(e){return O=null,Promise.reject(e)}),O)};Promise.resolve().then(function(){return ae()}).catch(function(r){oe||console.warn(r)});var He=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oe=!0;var o=Date.now();return ae().then(function(a){return Fe(a,t,o)})};export{Xe as C,Re as E,Ke as a,He as l,ze as u};
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.