vendor: 9,845 bytes, lines 1-2
1import{O as xe,R as a}from"./index-Dgv2xMGN.js";function _(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(r)}var re="dahlia",Ie=function(e){return e===3?"v3":e},ne="https://js.stripe.com",Ae="".concat(ne,"/").concat(re,"/stripe.js"),Te=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Le=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,K="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Ne=function(e){return Te.test(e)||Le.test(e)},Ue=function(){for(var e=document.querySelectorAll('script[src^="'.concat(ne,'"]')),t=0;t<e.length;t++){var n=e[t];if(Ne(n.src))return n}return null},z=function(e){var t="",n=document.createElement("script");n.src="".concat(Ae).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},_e=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:t})},I=null,N=null,U=null,De=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}},We=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},Me=function(e){return I!==null?I:(I=new Promise(function(t,n){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe&&e&&console.warn(K),window.Stripe){t(window.Stripe);return}try{var o=Ue();if(o&&e)console.warn(K);else if(!o)o=z(e);else if(o&&U!==null&&N!==null){var i;o.removeEventListener("load",U),o.removeEventListener("error",N),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=z(e)}U=We(t,n),N=De(n),o.addEventListener("load",U),o.addEventListener("error",N)}catch(c){n(c);return}}),I.catch(function(t){return I=null,Promise.reject(t)}))},Fe=function(e,t,n){if(e===null)return null;var o=t[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(_(o)," instead."));var i=o.match(/^pk_test/),c=Ie(e.version),u=re;i&&c!==u&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(u,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var v=e.apply(void 0,t);return _e(v,n),v},A,oe=!1,ie=function(){return A||(A=Me(null).catch(function(e){return A=null,Promise.reject(e)}),A)};Promise.resolve().then(function(){return ie()}).catch(function(r){oe||console.warn(r)});var qe=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 ie().then(function(i){return Fe(i,t,o)})};const D="pk_live_51UDSyfPZIyKIlGuVHHIlzpu6nj5llX4SB6jdKZJFeXWS2se3Zy8Di5y3QC6McQ0qzHgaUdDKeoIdG3qWRGqdoSaA00ZRMwdgv4",Ye=D!=null&&D.startsWith("pk_test_")?"sandbox":"live";let q=null;function ft(){return q||(q=qe(D)),q}function mt(){return Ye}var ae={exports:{}},Be="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",$e=Be,Ve=$e;function ce(){}function ue(){}ue.resetWarningCache=ce;var Ge=function(){function r(n,o,i,c,u,v){if(v!==Ve){var s=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 s.name="Invariant Violation",s}}r.isRequired=r;function e(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ue,resetWarningCache:ce};return t.PropTypes=t,t};ae.exports=Ge();var Je=ae.exports;const l=xe(Je);function H(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 X(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H(Object(t),!0).forEach(function(n){se(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function W(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W=function(e){return typeof e}:W=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(r)}function se(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ke(r,e){if(r==null)return{};var t={},n=Object.keys(r),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(t[o]=r[o]);return t}function ze(r,e){if(r==null)return{};var t=Ke(r,e),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function de(r,e){return He(r)||Xe(r,e)||Ze(r,e)||Qe()}function He(r){if(Array.isArray(r))return r}function Xe(r,e){var t=r&&(typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"]);if(t!=null){var n=[],o=!0,i=!1,c,u;try{for(t=t.call(r);!(o=(c=t.next()).done)&&(n.push(c.value),!(e&&n.length===e));o=!0);}catch(v){i=!0,u=v}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw u}}return n}}function Ze(r,e){if(r){if(typeof r=="string")return Z(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 Z(r,e)}}function Z(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 Qe(){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 g=function(e,t,n){var o=!!n,i=a.useRef(n);a.useEffect(function(){i.current=n},[n]),a.useEffect(function(){if(!o||!e)return function(){};var c=function(){i.current&&i.current.apply(i,arguments)};return e.on(t,c),function(){e.off(t,c)}},[o,t,e,i])},Y=function(e){var t=a.useRef(e);return a.useEffect(function(){t.current=e},[e]),t.current},x=function(e){return e!==null&&W(e)==="object"},et=function(e){return x(e)&&typeof e.then=="function"},tt=function(e){return x(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},Q="[object Object]",rt=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 i=Object.prototype.toString.call(e)===Q,c=Object.prototype.toString.call(t)===Q;if(i!==c)return!1;if(!i&&!n)return e===t;var u=Object.keys(e),v=Object.keys(t);if(u.length!==v.length)return!1;for(var s={},y=0;y<u.length;y+=1)s[u[y]]=!0;for(var C=0;C<v.length;C+=1)s[v[C]]=!0;var b=Object.keys(s);if(b.length!==u.length)return!1;var d=e,k=t,E=function(R){return r(d[R],k[R])};return b.every(E)},nt=function(e,t,n){return x(e)?Object.keys(e).reduce(function(o,i){var c=!x(t)||!rt(e[i],t[i]);return n.includes(i)?(c&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):c?X(X({},o||{}),{},se({},i,e[i])):o},null):null},le="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.",ee=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;if(e===null||tt(e))return e;throw new Error(t)},ot=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le;if(et(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(o){return ee(o,t)})};var n=ee(e,t);return n===null?{tag:"empty"}:{tag:"sync",stripe:n}},it=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"6.2.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.2.0",url:"https://stripe.com/docs/stripe-js/react"}))},pe=a.createContext(null);pe.displayName="ElementsContext";var at=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};l.any,l.object;l.func.isRequired;var fe=a.createContext(null);fe.displayName="CheckoutContext";var te=function(e){var t=a.useContext(fe),n=a.useContext(pe);if(t){if(n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."));return t}else return at(n,e)},ct=["mode"],ut=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},f=function(e,t,n){var o="".concat(ut(e),"Element"),i=function(s){var y=s.id,C=s.className,b=s.options,d=b===void 0?{}:b,k=s.onBlur,E=s.onFocus,w=s.onReady,R=s.onChange,he=s.onEscape,ve=s.onClick,ye=s.onLoadError,ge=s.onLoaderStart,Ce=s.onNetworksChange,be=s.onConfirm,Se=s.onCancel,Ee=s.onShippingAddressChange,Pe=s.onShippingRateChange,ke=s.onSavedPaymentMethodRemove,we=s.onSavedPaymentMethodUpdate,T=te("mounts <".concat(o,">")),L="elements"in T?T.elements:null,P="checkoutState"in T?T.checkoutState:null,O=(P==null?void 0:P.type)==="success"||(P==null?void 0:P.type)==="loading"?P.sdk:null,Re=a.useState(null),$=de(Re,2),h=$[0],Oe=$[1],S=a.useRef(null),M=a.useRef(null);g(h,"blur",k),g(h,"focus",E),g(h,"escape",he),g(h,"click",ve),g(h,"loaderror",ye),g(h,"loaderstart",ge),g(h,"networksch
2ange",Ce),g(h,"confirm",be),g(h,"cancel",Se),g(h,"shippingaddresschange",Ee),g(h,"shippingratechange",Pe),g(h,"savedpaymentmethodremove",ke),g(h,"savedpaymentmethodupdate",we),g(h,"change",R);var F;w&&(e==="expressCheckout"?F=w:F=function(){w(h)}),g(h,"ready",F),a.useLayoutEffect(function(){if(S.current===null&&M.current!==null&&(L||O)){var m=null;if(O){var j=O,je=O;switch(e){case"paymentForm":m=je.createForm(d);break;case"payment":m=j.createPaymentElement(d);break;case"address":if("mode"in d){var G=d.mode,J=ze(d,ct);if(G==="shipping")m=j.createShippingAddressElement(J);else if(G==="billing")m=j.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":m=j.createExpressCheckoutElement(d);break;case"currencySelector":m=O.createCurrencySelectorElement();break;case"taxId":m=j.createTaxIdElement(d);break;case"contactDetails":m=j.createContactDetailsElement();break;default:throw new Error("<".concat(o,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else L&&(m=L.create(e,d));S.current=m,Oe(m),m&&m.mount(M.current)}},[L,O,d]);var V=Y(d);return a.useEffect(function(){if(S.current){var m=nt(d,V,["paymentRequest"]);m&&"update"in S.current&&S.current.update(m)}},[d,V]),a.useLayoutEffect(function(){return function(){if(S.current&&typeof S.current.destroy=="function")try{S.current.destroy(),S.current=null}catch{}}},[]),a.createElement("div",{id:y,className:C,ref:M})},c=function(s){te("mounts <".concat(o,">"));var y=s.id,C=s.className;return a.createElement("div",{id:y,className:C})},u=t?c:i;return u.propTypes={id:l.string,className:l.string,onChange:l.func,onBlur:l.func,onFocus:l.func,onReady:l.func,onEscape:l.func,onClick:l.func,onLoadError:l.func,onLoaderStart:l.func,onNetworksChange:l.func,onConfirm:l.func,onCancel:l.func,onShippingAddressChange:l.func,onShippingRateChange:l.func,onSavedPaymentMethodRemove:l.func,onSavedPaymentMethodUpdate:l.func,options:l.object},u.displayName=o,u.__elementType=e,u},p=typeof window>"u",B=a.createContext(null);B.displayName="EmbeddedCheckoutProviderContext";var me=function(){var e=a.useContext(B);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},st="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ht=function(e){var t=e.stripe,n=e.options,o=e.children,i=a.useMemo(function(){return ot(t,st)},[t]),c=a.useRef(null),u=a.useRef(null),v=a.useState({embeddedCheckout:null}),s=de(v,2),y=s[0],C=s[1];a.useEffect(function(){if(!(u.current||c.current)){var k=function(w){u.current||c.current||(u.current=w,c.current=u.current.createEmbeddedCheckoutPage(n).then(function(R){C({embeddedCheckout:R})}))};i.tag==="async"&&!u.current&&(n.clientSecret||n.fetchClientSecret)?i.stripePromise.then(function(E){E&&k(E)}):i.tag==="sync"&&!u.current&&(n.clientSecret||n.fetchClientSecret)&&k(i.stripe)}},[i,n,y,u]),a.useEffect(function(){return function(){y.embeddedCheckout?(c.current=null,y.embeddedCheckout.destroy()):c.current&&c.current.then(function(){c.current=null,y.embeddedCheckout&&y.embeddedCheckout.destroy()})}},[y.embeddedCheckout]),a.useEffect(function(){it(u)},[u]);var b=Y(t);a.useEffect(function(){b!==null&&b!==t&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[b,t]);var d=Y(n);return a.useEffect(function(){if(d!=null){if(n==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}n.clientSecret===void 0&&n.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),d.clientSecret!=null&&n.clientSecret!==d.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),d.fetchClientSecret!=null&&n.fetchClientSecret!==d.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),d.onComplete!=null&&n.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),d.onShippingDetailsChange!=null&&n.onShippingDetailsChange!==d.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),d.onLineItemsChange!=null&&n.onLineItemsChange!==d.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[d,n]),a.createElement(B.Provider,{value:y},o)},dt=function(e){var t=e.id,n=e.className,o=me(),i=o.embeddedCheckout,c=a.useRef(!1),u=a.useRef(null);return a.useLayoutEffect(function(){return!c.current&&i&&u.current!==null&&(i.mount(u.current),c.current=!0),function(){if(c.current&&i)try{i.unmount(),c.current=!1}catch{}}},[i]),a.createElement("div",{ref:u,id:t,className:n})},lt=function(e){var t=e.id,n=e.className;return me(),a.createElement("div",{id:t,className:n})},vt=p?lt:dt;f("auBankAccount",p);f("card",p);f("cardNumber",p);f("cardExpiry",p);f("cardCvc",p);f("iban",p);f("payment",p);f("expressCheckout",p);f("paymentRequestButton",p);f("linkAuthentication",p);f("contactDetails",p);f("address",p);f("shippingAddress",p);f("paymentMethodMessaging",p);
2f("taxId",p);f("issuingCardNumberDisplay",p);f("issuingCardCvcDisplay",p);f("issuingCardExpiryDisplay",p);f("issuingCardPinDisplay",p);f("issuingCardCopyButton",p);export{ht as E,l as P,ft as a,vt as b,mt as g};
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.