1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7944],{77944:function(e,t,n){n.d(t,{Up:function(){return N},Vv:function(){return I},ch:function(){return b}});var r,a,o,i,c,s,u=n(20132);(r=i||(i={})).INITIAL="initial",r.PENDING="pending",r.REJECTED="rejected",r.RESOLVED="resolved",(a=c||(c={})).LOADING_STATUS="setLoadingStatus",a.RESET_OPTIONS="resetOptions",a.SET_BRAINTREE_INSTANCE="braintreeInstance",(o=s||(s={})).NUMBER="number",o.CVV="cvv",o.EXPIRATION_DATE="expirationDate",o.EXPIRATION_MONTH="expirationMonth",o.EXPIRATION_YEAR="expirationYear",o.POSTAL_CODE="postalCode";var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function d(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function f(e,t,n){if(n||2==arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var p="data-react-paypal-script-id",E={DATA_JS_SDK_LIBRARY:"dataJsSdkLibrary",DATA_LIBRARY_VALUE:"react-paypal-js",DATA_NAMESPACE:"dataNamespace",DATA_SDK_INTEGRATION_SOURCE:"dataSdkIntegrationSource"},v="paypal";function m(e){return void 0===e&&(e=v),window[e]}function A(e){var t=e.reactComponentName,n=e.sdkComponentKey,r=e.sdkRequestedComponents,a=void 0===r?"":r,o=e.sdkDataNamespace,i=n.charAt(0).toUpperCase().concat(n.substring(1)),c="Unable to render <".concat(t," /> because window.").concat(void 0===o?v:o,".").concat(i," is undefined."),s="string"==typeof a?a:a.join(",");if(!s.includes(n)){var u=[s,n].filter(Boolean).join();c+="\nTo fix the issue, add '".concat(n,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(u,"'}}>`.")}return c}function h(e){e[p];var t=d(e,[p+""]);return"react-paypal-js-".concat(function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].charCodeAt(0)*n;e[n+1]&&(r+=e[n+1].charCodeAt(0)*(n-1)),t+=String.fromCharCode(97+Math.abs(r)%26)}return t}(JSON.stringify(t)))}function y(e,t){var n,r,a,o;switch(t.type){case c.LOADING_STATUS:if("object"==typeof t.value)return l(l({},e),{loadingStatus:t.value.state,loadingStatusErrorMessage:t.value.message});return l(l({},e),{loadingStatus:t.value});case c.RESET_OPTIONS:return a=e.options[p],(null==(o=self.document.querySelector("script[".concat(p,'="').concat(a,'"]')))?void 0:o.parentNode)&&o.parentNode.removeChild(o),l(l({},e),{loadingStatus:i.PENDING,options:l(l(((n={})[E.DATA_SDK_INTEGRATION_SOURCE]=E.DATA_LIBRARY_VALUE,n),t.value),((r={})[p]="".concat(h(t.value)),r))});case c.SET_BRAINTREE_INSTANCE:return l(l({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var S=(0,u.createContext)(null);function N(){var e=function(e){if("function"==typeof(null==e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}((0,u.useContext)(S));return[l(l({},e),{isInitial:e.loadingStatus===i.INITIAL,isPending:e.loadingStatus===i.PENDING,isResolved:e.loadingStatus===i.RESOLVED,isRejected:e.loadingStatus===i.REJECTED}),e.dispatch]}(0,u.createContext)({});var b=function(e){var t=e.className,n=e.disabled,r=void 0!==n&&n,a=e.children,o=e.forceReRender,i=d(e,["className","disabled","children","forceReRender"]),c="".concat(void 0===t?"":t," ").concat(r?"paypal-buttons-disabled":"").trim(),s=(0,u.useRef)(null),p=(0,u.useRef)(null),v=N()[0],h=v.isResolved,y=v.options,S=(0,u.useState)(null),P=S[0],g=S[1],T=(0,u.useState)(!0),R=T[0],I=T[1],C=(0,u.useState)(null)[1];function _(){null!==p.current&&p.current.close().catch(function(){})}return(0,u.useEffect)(function(){if(!1===h)return _;var e=m(y.dataNamespace);if(void 0===e||void 0===e.Buttons)return C(function(){throw Error(A({reactComponentName:b.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:y.components,sdkDataNamespace:y[E.DATA_NAMESPACE]}))}),_;try{p.current=e.Buttons(l(l({},i),{onInit:function(e,t){g(t),"function"==typeof i.onInit&&i.onInit(e,t)}}))}catch(e){return C(function(){throw Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(e))})}return!1===p.current.isEligible()?I(!1):s.current&&p.current.render(s.current).catch(function(e){null!==s.current&&0!==s.current.children.length&&C(function(){throw Error("Failed to render <PayPalButtons /> component. ".concat(e))})}),_},f(f([h],void 0===o?[]:o,!0),[i.fundingSource],!1)),(0,u.useEffect)(function(){null!==P&&(!0===r?P.disable().catch(function(){}):P.enable().catch(function(){}))},[r,P]),u.createElement(u.Fragment,null,R?u.createElement("div",{ref:s,style:r?{opacity:.38}:{},className:c}):a)};function P(e,t){void 0===t&&(t={});var n=document.createElement("script");return n.src=e,Object.keys(t).forEach(function(e){n.setAttribute(e,t[e]),"data-csp-nonce"===e&&n.setAttribute("nonce",t["data-csp-nonce"])}),n}function g(e,t){if("object"!=typeof e||null===e)throw Error("Expected an options object.");if(void 0!==t&&"function"!=typeof t)throw Error("Expected PromisePonyfill to be a function.")}b.displayName="PayPalButtons";var T=function(e){var t=e.className,n=e.children,r=d(e,["className","children"]),a=N()[0],o=a.isResolved,i=a.options,c=(0,u.useRef)(null),s=(0,u.useState)(!0),f=s[0],p=s[1],v=(0,u.useState)(null)[1],h=function(e){var t=c.current;if(!t||!e.isEligible())return p(!1);t.firstChild&&t.removeChild(t.firstChild),e.render(t).catch(function(e){null!==t&&0!==t.children.length&&v(function(){throw Error("Failed to render <PayPalMarks /> component. ".concat(e))})})};return(0,u.useEffect)(function(){if(!1!==o){var e=m(i[E.DATA_NAMESPACE]);if(void 0===e||void 0===e.Marks)return v(function(){throw Error(A({reactComponentName:T.dis
1playName,sdkComponentKey:"marks",sdkRequestedComponents:i.components,sdkDataNamespace:i[E.DATA_NAMESPACE]}))});h(e.Marks(l({},r)))}},[o,r.fundingSource]),u.createElement(u.Fragment,null,f?u.createElement("div",{ref:c,className:void 0===t?"":t}):n)};T.displayName="PayPalMarks";var R=function(e){var t=e.className,n=e.forceReRender,r=d(e,["className","forceReRender"]),a=N()[0],o=a.isResolved,i=a.options,c=(0,u.useRef)(null),s=(0,u.useRef)(null),p=(0,u.useState)(null)[1];return(0,u.useEffect)(function(){if(!1!==o){var e=m(i[E.DATA_NAMESPACE]);if(void 0===e||void 0===e.Messages)return p(function(){throw Error(A({reactComponentName:R.displayName,sdkComponentKey:"messages",sdkRequestedComponents:i.components,sdkDataNamespace:i[E.DATA_NAMESPACE]}))});s.current=e.Messages(l({},r)),s.current.render(c.current).catch(function(e){null!==c.current&&0!==c.current.children.length&&p(function(){throw Error("Failed to render <PayPalMessages /> component. ".concat(e))})})}},f([o],void 0===n?[]:n,!0)),u.createElement("div",{ref:c,className:void 0===t?"":t})};R.displayName="PayPalMessages";var I=function(e){var t,n=e.options,r=void 0===n?{clientId:"test"}:n,a=e.children,o=e.deferLoading,s=void 0!==o&&o,d=(0,u.useReducer)(y,{options:l(l({},r),((t={})[E.DATA_JS_SDK_LIBRARY]=E.DATA_LIBRARY_VALUE,t[E.DATA_SDK_INTEGRATION_SOURCE]=E.DATA_LIBRARY_VALUE,t[p]="".concat(h(r)),t)),loadingStatus:s?i.INITIAL:i.PENDING}),f=d[0],v=d[1];return(0,u.useEffect)(function(){if(!1===s&&f.loadingStatus===i.INITIAL)return v({type:c.LOADING_STATUS,value:i.PENDING});if(f.loadingStatus===i.PENDING){var e=!0;return(function(e,t){if(void 0===t&&(t=Promise),g(e,t),"undefined"==typeof document)return t.resolve(null);var n,r,a,o,i,c=(r="https://www.paypal.com/sdk/js",e.sdkBaseUrl&&(r=e.sdkBaseUrl,delete e.sdkBaseUrl),o=(a=Object.keys(e).filter(function(t){return void 0!==e[t]&&null!==e[t]&&""!==e[t]}).reduce(function(t,n){var r=e[n].toString();return"data"===(n=n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()})).substring(0,4)||"crossorigin"===n?t.attributes[n]=r:t.queryParams[n]=r,t},{queryParams:{},attributes:{}})).queryParams,i=a.attributes,o["merchant-id"]&&-1!==o["merchant-id"].indexOf(",")&&(i["data-merchant-id"]=o["merchant-id"],o["merchant-id"]="*"),{url:"".concat(r,"?").concat((n="",Object.keys(o).forEach(function(e){0!==n.length&&(n+="&"),n+=e+"="+o[e]}),n)),attributes:i}),s=c.url,u=c.attributes,l=u["data-namespace"]||"paypal",d=window[l];return(u["data-js-sdk-library"]||(u["data-js-sdk-library"]="paypal-js"),function(e,t){var n=document.querySelector('script[src="'.concat(e,'"]'));if(null===n)return null;var r=P(e,t),a=n.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(r.dataset).length)return null;var o=!0;return Object.keys(a.dataset).forEach(function(e){a.dataset[e]!==r.dataset[e]&&(o=!1)}),o?n:null}(s,u)&&d)?t.resolve(d):(function(e,t){void 0===t&&(t=Promise),g(e,t);var n=e.url,r=e.attributes;if("string"!=typeof n||0===n.length)throw Error("Invalid url.");if(void 0!==r&&"object"!=typeof r)throw Error("Expected attributes to be an object.");return new t(function(e,t){var a,o,i,c,s,u;if("undefined"==typeof document)return e();o=(a={url:n,attributes:r,onSuccess:function(){return e()},onError:function(){return t(Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}}).url,i=a.attributes,c=a.onSuccess,s=a.onError,(u=P(o,i)).onerror=s,u.onload=c,document.head.insertBefore(u,document.head.firstElementChild)})})({url:s,attributes:u},t).then(function(){var e=window[l];if(e)return e;throw Error("The window.".concat(l," global variable is not available."))})})(f.options).then(function(){e&&v({type:c.LOADING_STATUS,value:i.RESOLVED})}).catch(function(t){console.error("".concat("Failed to load the PayPal JS SDK script."," ").concat(t)),e&&v({type:c.LOADING_STATUS,value:{state:i.REJECTED,message:String(t)}})}),function(){e=!1}}},[f.options,s,f.loadingStatus]),u.createElement(S.Provider,{value:l(l({},f),{dispatch:v})},a)};function C(){}(0,u.createContext)({cardFieldsForm:null,fields:{},registerField:C,unregisterField:C})}}]);
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.