1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6664],{86664:function(e,t,n){!function(e,t){"use strict";function ownKeys(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 _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _typeof(e){return(_typeof="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)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=o){var c=[],i=!0,u=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(c.push(n.value),!t||c.length!==t);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(u)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var n,r,o,c,i,u={exports:{}};u.exports=(function(){if(i)return c;i=1;var e=o?r:(o=1,r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function emptyFunction(){}function emptyFunctionWithReset(){}return emptyFunctionWithReset.resetWarningCache=emptyFunction,c=function(){function shim(t,n,r,o,c,i){if(i!==e){var u=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 u.name="Invariant Violation",u}}function getShim(){return shim}shim.isRequired=shim;var t={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return t.PropTypes=t,t}})()();var s=(n=u.exports)&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,useAttachEvent=function(e,n,r){var o=!!r,c=t.useRef(r);t.useEffect(function(){c.current=r},[r]),t.useEffect(function(){if(!o||!e)return function(){};var decoratedCb=function(){c.current&&c.current.apply(c,arguments)};return e.on(n,decoratedCb),function(){e.off(n,decoratedCb)}},[o,n,e,c])},usePrevious=function(e){var n=t.useRef(e);return t.useEffect(function(){n.current=e},[e]),n.current},isUnknownObject=function(e){return null!==e&&"object"===_typeof(e)},a="[object Object]",isEqual=function isEqual(e,t){if(!isUnknownObject(e)||!isUnknownObject(t))return e===t;var n=Array.isArray(e);if(n!==Array.isArray(t))return!1;var r=Object.prototype.toString.call(e)===a;if(r!==(Object.prototype.toString.call(t)===a))return!1;if(!r&&!n)return e===t;var o=Object.keys(e),c=Object.keys(t);if(o.length!==c.length)return!1;for(var i={},u=0;u<o.length;u+=1)i[o[u]]=!0;for(var s=0;s<c.length;s+=1)i[c[s]]=!0;var p=Object.keys(i);return p.length===o.length&&p.every(function(n){return isEqual(e[n],t[n])})},extractAllowedOptionsUpdates=function(e,t,n){return isUnknownObject(e)?Object.keys(e).reduce(function(r,o){var c=!isUnknownObject(t)||!isEqual(e[o],t[o]);return n.includes(o)?(c&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),r):c?_objectSpread2
1(_objectSpread2({},r||{}),{},_defineProperty({},o,e[o])):r},null):null},p="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.",validateStripe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if(null===e||isUnknownObject(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment)return e;throw Error(t)},parseStripeProp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;if(isUnknownObject(e)&&"function"==typeof e.then)return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return validateStripe(e,t)})};var n=validateStripe(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},registerWithStripeJs=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"3.1.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.1.0",url:"https://stripe.com/docs/stripe-js/react"}))},l=t.createContext(null);l.displayName="ElementsContext";var parseElementsContext=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},Elements=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return parseStripeProp(n)},[n]),i=_slicedToArray(t.useState(function(){return{stripe:"sync"===c.tag?c.stripe:null,elements:"sync"===c.tag?c.stripe.elements(r):null}}),2),u=i[0],s=i[1];t.useEffect(function(){var e=!0,safeSetContext=function(e){s(function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}})};return"async"!==c.tag||u.stripe?"sync"!==c.tag||u.stripe||safeSetContext(c.stripe):c.stripePromise.then(function(t){t&&e&&safeSetContext(t)}),function(){e=!1}},[c,u,r]);var a=usePrevious(n);t.useEffect(function(){null!==a&&a!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[a,n]);var p=usePrevious(r);return t.useEffect(function(){if(u.elements){var e=extractAllowedOptionsUpdates(r,p,["clientSecret","fonts"]);e&&u.elements.update(e)}},[r,p,u.elements]),t.useEffect(function(){registerWithStripeJs(u.stripe)},[u.stripe]),t.createElement(l.Provider,{value:u},o)};Elements.propTypes={stripe:s.any,options:s.object};var useElementsContextWithUseCase=function(e){return parseElementsContext(t.useContext(l),e)},ElementsConsumer=function(e){return(0,e.children)(useElementsContextWithUseCase("mounts <ElementsConsumer>"))};ElementsConsumer.propTypes={children:s.func.isRequired};var d=["on","session"],f=t.createContext(null);f.displayName="CheckoutSdkContext";var parseCheckoutSdkContext=function(e,t){if(!e)throw Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},m=t.createContext(null);m.displayName="CheckoutContext";var extractCheckoutContextValue=function(e,t){if(!e)return null;e.on,e.session;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,d);return t?_objectSpread2(_objectSpread2({},n),t):_objectSpread2(_objectSpread2({},n),e.session())},CheckoutProvider=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return parseStripeProp(n,"Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[n]),i=_slicedToArray(t.useState(null),2),u=i[0],s=i[1],a=_slicedToArray(t.useState(function(){return{stripe:"sync"===c.tag?c.stripe:null,checkoutSdk:null}}),2),p=a[0],l=a[1],safeSetContext=function(e,t){l(function(n){return n.stripe&&n.checkoutSdk?n:{stripe:e,checkoutSdk:t}})},d=t.useRef(!1);t.useEffect(function(){var e=!0;return"async"!==c.tag||p.stripe?"sync"===c.tag&&c.stripe&&!d.current&&(d.current=!0,
1c.stripe.initCheckout(r).then(function(e){e&&(safeSetContext(c.stripe,e),e.on("change",s))})):c.stripePromise.then(function(t){t&&e&&!d.current&&(d.current=!0,t.initCheckout(r).then(function(e){e&&(safeSetContext(t,e),e.on("change",s))}))}),function(){e=!1}},[c,p,r,s]);var h=usePrevious(n);t.useEffect(function(){null!==h&&h!==n&&console.warn("Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.")},[h,n]);var C=usePrevious(r);t.useEffect(function(){if(p.checkoutSdk){!r.clientSecret||isUnknownObject(C)||isEqual(r.clientSecret,C.clientSecret)||console.warn("Unsupported prop change: options.clientSecret is not a mutable property.");var e,t,n=null==C?void 0:null===(e=C.elementsOptions)||void 0===e?void 0:e.appearance,o=null==r?void 0:null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance;o&&!isEqual(o,n)&&p.checkoutSdk.changeAppearance(o)}},[r,C,p.checkoutSdk]),t.useEffect(function(){registerWithStripeJs(p.stripe)},[p.stripe]);var y=t.useMemo(function(){return extractCheckoutContextValue(p.checkoutSdk,u)},[p.checkoutSdk,u]);return p.checkoutSdk?t.createElement(f.Provider,{value:p},t.createElement(m.Provider,{value:y},o)):null};CheckoutProvider.propTypes={stripe:s.any,options:s.shape({clientSecret:s.string.isRequired,elementsOptions:s.object}).isRequired};var useElementsOrCheckoutSdkContextWithUseCase=function(e){var n=t.useContext(f),r=t.useContext(l);if(n&&r)throw Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return n?parseCheckoutSdkContext(n,e):parseElementsContext(r,e)},createElementComponent=function(e,n){var r="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Element"),o=n?function(e){useElementsOrCheckoutSdkContextWithUseCase("mounts <".concat(r,">"));var n=e.id,o=e.className;return t.createElement("div",{id:n,className:o})}:function(n){var o,c=n.id,i=n.className,u=n.options,s=void 0===u?{}:u,a=n.onBlur,p=n.onFocus,l=n.onReady,d=n.onChange,f=n.onEscape,m=n.onClick,h=n.onLoadError,C=n.onLoaderStart,y=n.onNetworksChange,E=n.onConfirm,v=n.onCancel,g=n.onShippingAddressChange,k=n.onShippingRateChange,b=useElementsOrCheckoutSdkContextWithUseCase("mounts <".concat(r,">")),S="elements"in b?b.elements:null,P="checkoutSdk"in b?b.checkoutSdk:null,O=_slicedToArray(t.useState(null),2),x=O[0],w=O[1],j=t.useRef(null),A=t.useRef(null);useAttachEvent(x,"blur",a),useAttachEvent(x,"focus",p),useAttachEvent(x,"escape",f),useAttachEvent(x,"click",m),useAttachEvent(x,"loaderror",h),useAttachEvent(x,"loaderstart",C),useAttachEvent(x,"networkschange",y),useAttachEvent(x,"confirm",E),useAttachEvent(x,"cancel",v),useAttachEvent(x,"shippingaddresschange",g),useAttachEvent(x,"shippingratechange",k),useAttachEvent(x,"change",d),l&&(o="expressCheckout"===e?l:function(){l(x)}),useAttachEvent(x,"ready",o),t.useLayoutEffect(function(){if(null===j.current&&null!==A.current&&(S||P)){var t=null;P?t=P.createElement(e,s):S&&(t=S.create(e,s)),j.current=t,w(t),t&&t.mount(A.current)}},[S,P,s]);var _=usePrevious(s);return t.useEffect(function(){if(j.current){var e=extractAllowedOptionsUpdates(s,_,["paymentRequest"]);e&&"update"in j.current&&j.current.update(e)}},[s,_]),t.useLayoutEffect(function(){return function(){if(j.current&&"function"==typeof j.current.destroy)try{j.current.destroy(),j.current=null}catch(e){}}},[]),t.createElement("div",{id:c,className:i,ref:A})};return o.propTypes={id:s.string,className:s.string,onChange:s.func,onBlur:s.func,onFocus:s.func,onReady:s.func,onEscape:s.func,onClick:s.func,onLoadError:s.func,onLoaderStart:s.func,onNetworksChange:s.func,onConfirm:s.func,onCancel:s.func,onShippingAddressChange:s.func,onShippingRateChange:s.func,options:s.object},o.displayName=r,o.__elementType=e,o},h="undefined"==typeof window,C=t.createContext(null);C.displayName="EmbeddedCheckoutProviderContext";var useEmbeddedCheckoutContext=function(){var e=t.useContext(C);if(!e)throw Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},y=h?function(e){var n=e.id,r=e.className;return useEmbeddedCheckoutContext(),t.createElement("div",{id:n,className:r})}:function(e){var n=e.id,r=e.className,o=useEmbeddedCheckoutContext().embeddedCheckout,c=t.useRef(!1),i=t.useRef(null);return t.useLayoutEffect(function(){return!c.current&&o&&null!==i.current&&(o.mount(i.current),c.current=!0),function(){if(c.current&&o)try{o.unmount(),c.current=!1}catch(e){}}},[o]),t.createElement("div",{ref:i,id:n,className:r})},E=createElementComponent("auBankAccount",h),v=createElementComponent("card",h),g=createElementComponent("cardNumber",h),k=createElementComponent("cardExpiry",h),b=createElementComponent("cardCvc",h),S=createElementComponent("fpxBank",h),P=createElementComponent("iban",h),O=createElementComponent("idealBank",h),x=createElementComponent("p24Bank",h),w=createElementComponent("epsBank",h),j=createElementComponent("payment",h),A=createElementComponent("expressCheckout",h),_=createElementComponent("currencySelector",h),U=createElementComponent("paymentRequestButton",h),R=createElementComponent("linkAuthentication",h),T=createElementComponent("address",h),I=createElementComponent("shippingAddress",h),W=createElementComponent("paymentMethodMessaging",h),N=createElementComponent("affirmMessage",h),L=createElementComponent("afterpayClearpayMessage",h);e.AddressElement=T,e.AffirmMessageElement=N,e.AfterpayClearpayMessageElement=L,e.AuBankAccountElement=E,e.CardCvcElement=b,e.CardElement=v,e.CardExpiryElement=k,e.CardNumberElement=g,e.CheckoutProvider=CheckoutProvider,e.CurrencySelectorElement=_,e.Elements=Elements,e.ElementsConsumer=ElementsConsumer,e.EmbeddedCheckout=y,e.EmbeddedCheckoutProvider=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return parseStripeProp(n,"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.")},[n]),i=t.useRef(null),u=t.useRef(null),s=_slicedToArray(t.useState({embeddedCheckout:null}),2),a=s[0],p=s[1];t.useEffect(function(){if(!u.current&&!i.current){var setStripeAndInitEmbeddedCheckout=function(e){u.current||i.current||(u.current=e,i.current=u.current.initEmbeddedCheckout(r).then(function(e){p({embeddedCheckout:e})}))};"async"===c.tag&&!u.current&&(r.clientSecret||r.fetchClientSecret)?c.stripePromise.then(function(e){e&&setStripeAndInitEmbeddedCheckout(e)}):"sync"===c.tag&&!u.current&&(r.clientSecret||r.fetchClientSecret)&&setStripeAndInitEmbeddedCheckout(c.stripe)}},[c,r,a,u]),t.useEffect(function(){return function(){a.embeddedCheckout?(i.current=null,a.embeddedCheckout.destroy()):i.current&&i.current.then(function(){i.current=null,a.embeddedCheckout&&a.embeddedCheckout.destroy()})}},[a.embeddedCheckout]),t.useEffect(function(){registerWithStripeJs(u)},[u]);var l=usePrevious(n);t.useEffect(function(){null!==l&&l!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[l,n]);var d=usePrevious(r);return t.useEffect(function(){if(null!=d){if(null==r){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}void 0===r.clientSecret&&void 0===r.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=d.clientSecret&&r.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."),null!=d.fetchClientSecret&&r.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."),null!=d.onComplete&&r.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=d.onShippingDetailsChange&&r.onShippingDetailsChange!==d.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=d.onLineItemsChange&&r.onLineItemsChange!==d.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[d,r]),t.createElement(C.Provider,{value:a},o)},e.EpsBankElement=w,e.ExpressCheckoutElement=A,e.FpxBankElement=S,e.IbanElement=P,e.IdealBankElement=O,e.LinkAuthenticationElement=R,e.P24BankElement=x,e.PaymentElement=j,e.PaymentMethodMessagingElement=W,e.PaymentRequestButtonElement=U,e.ShippingAddressElement=I,e.useCheckout=function(){parseCheckoutSdkContext(t.useContext(f),"calls useCheckout()");var e=t.useContext(m);if(!e)throw Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},e.useElements=function(){return useElementsContextWithUseCase("calls useElements()").elements},e.useStripe=function(){return useElementsOrCheckoutSdkContextWithUseCase("calls useStripe()").stripe}}(t,n(67294))}}]);
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.