Sid Gifari File Manager
🏠Root
/
home
/
genremedia08
/
musicjukebox.overlookedtracks.com
/
public
/
build
/
assets
/
Editing: checkout-routes-ac4923a4.js.map
{"version":3,"file":"checkout-routes-ac4923a4.js","sources":["../../../common/resources/client/auth/guards/not-subscribed-route.tsx","../../../common/resources/client/billing/checkout/checkout-layout.tsx","../../../common/resources/client/billing/requests/use-checkout-product.ts","../../../common/resources/client/billing/checkout/checkout-product-summary.tsx","../../../node_modules/@paypal/paypal-js/dist/esm/paypal-js.js","../../../common/resources/client/billing/checkout/paypal/use-paypal.ts","../../../common/resources/client/billing/checkout/checkout.tsx","../../../common/resources/client/billing/checkout/stripe/checkout-stripe-done.tsx","../../../common/resources/client/billing/checkout/paypal/checkout-paypal-done.tsx","../../../common/resources/client/billing/checkout/checkout-routes.tsx"],"sourcesContent":["import {useAuth} from '../use-auth';\nimport {ReactElement} from 'react';\nimport {Navigate, Outlet} from 'react-router-dom';\n\ninterface GuestRouteProps {\n children: ReactElement;\n}\nexport function NotSubscribedRoute({children}: GuestRouteProps) {\n const {isLoggedIn, isSubscribed} = useAuth();\n\n if (!isLoggedIn) {\n return <Navigate to=\"/register\" replace />;\n }\n\n if (isLoggedIn && isSubscribed) {\n return <Navigate to=\"/billing\" replace />;\n }\n\n return children || <Outlet />;\n}\n","import {ReactElement, useEffect} from 'react';\nimport {Navbar} from '../../ui/navigation/navbar/navbar';\nimport {CustomMenu} from '../../menus/custom-menu';\nimport {LocaleSwitcher} from '../../i18n/locale-switcher';\nimport {removeFromLocalStorage} from '../../utils/hooks/local-storage';\nimport {StaticPageTitle} from '../../seo/static-page-title';\nimport {Trans} from '../../i18n/trans';\n\ninterface CheckoutLayoutProps {\n children: [ReactElement, ReactElement];\n}\nexport function CheckoutLayout({children}: CheckoutLayoutProps) {\n const [left, right] = children;\n\n useEffect(() => {\n removeFromLocalStorage('be.onboarding.selected');\n }, []);\n\n return (\n <div className=\"flex flex-col h-full overflow-y-auto\">\n <StaticPageTitle>\n <Trans message=\"Checkout\" />\n </StaticPageTitle>\n <Navbar\n size=\"sm\"\n color=\"transparent\"\n className=\"flex-shrink-0 z-10 mb-20 md:mb-0\"\n textColor=\"text-main\"\n logoColor=\"dark\"\n darkModeColor=\"transparent\"\n menuPosition=\"checkout-page-navbar\"\n />\n <div className=\"flex-auto md:flex w-full mx-auto justify-between px-20 md:px-0 md:pt-128 md:max-w-950\">\n <div className=\"hidden md:block fixed right-0 top-0 w-1/2 h-full bg-alt shadow-[15px_0_30px_0_rgb(0_0_0_/_18%)]\" />\n <div className=\"md:w-400 overflow-hidden\">\n {left}\n <CustomMenu\n menu=\"checkout-page-footer\"\n className=\"text-xs mt-50 text-muted overflow-x-auto\"\n />\n <div className=\"mt-40\">\n <LocaleSwitcher />\n </div>\n </div>\n <div className=\"hidden md:block w-384\">\n <div className=\"relative z-10\">{right}</div>\n </div>\n </div>\n </div>\n );\n}\n","import {useQuery} from '@tanstack/react-query';\nimport {apiClient} from '../../http/query-client';\nimport {BackendResponse} from '../../http/backend-response/backend-response';\nimport {Product} from '../product';\nimport {useParams} from 'react-router-dom';\n\nconst endpoint = (productId: string | number) =>\n `billing/products/${productId}`;\n\nexport interface FetchProductResponse extends BackendResponse {\n product: Product;\n}\n\nexport function useCheckoutProduct() {\n const {productId, priceId} = useParams();\n const query = useQuery(\n [endpoint(productId!)],\n () => fetchProduct(productId!),\n {\n keepPreviousData: true,\n enabled: productId != null && priceId != null,\n }\n );\n\n const product = query.data?.product;\n const price =\n product?.prices.find(p => p.id === parseInt(priceId!)) ||\n product?.prices[0];\n\n return {status: query.status, product, price};\n}\n\nfunction fetchProduct(\n productId: string | number\n): Promise<FetchProductResponse> {\n return apiClient.get(endpoint(productId)).then(response => response.data);\n}\n","import {Trans} from '../../i18n/trans';\nimport {FormattedPrice} from '../../i18n/formatted-price';\nimport {useCheckoutProduct} from '../requests/use-checkout-product';\nimport {m} from 'framer-motion';\nimport {Skeleton} from '../../ui/skeleton/skeleton';\nimport {Product} from '../product';\nimport {Price} from '../price';\nimport {FormattedCurrency} from '../../i18n/formatted-currency';\nimport {ProductFeatureList} from '../pricing-table/product-feature-list';\nimport {opacityAnimation} from '../../ui/animation/opacity-animation';\n\ninterface CheckoutProductSummaryProps {\n showBillingLine?: boolean;\n}\nexport function CheckoutProductSummary({\n showBillingLine = true,\n}: CheckoutProductSummaryProps) {\n const {status, product, price} = useCheckoutProduct();\n\n if (status === 'error' || (status !== 'loading' && (!product || !price))) {\n return null;\n }\n\n return (\n <div>\n <h2 className=\"text-2xl mb-30\">\n <Trans message=\"Summary\" />\n </h2>\n {status === 'loading' ? (\n <LoadingSkeleton key=\"loading-skeleton\" />\n ) : (\n <ProductSummary\n product={product!}\n price={price!}\n showBillingLine={showBillingLine}\n />\n )}\n </div>\n );\n}\n\ninterface ProductSummaryProps {\n product: Product;\n price: Price;\n showBillingLine: boolean;\n}\nfunction ProductSummary({\n product,\n price,\n showBillingLine,\n}: ProductSummaryProps) {\n return (\n <m.div>\n <div className=\"text-xl font-semibold mb-6\">{product.name}</div>\n {product.description && (\n <div className=\"text-sm text-muted\">{product.description}</div>\n )}\n <FormattedPrice\n priceClassName=\"font-bold text-4xl\"\n periodClassName=\"text-muted text-xs\"\n variant=\"separateLine\"\n price={price}\n className=\"mt-32\"\n />\n <ProductFeatureList product={product} />\n {showBillingLine && (\n <div className=\"flex items-center justify-between gap-24 border-t pt-24 mt-32 font-medium\">\n <div>\n <Trans message=\"Billed today\" />\n </div>\n <div>\n <FormattedCurrency value={price.amount} currency={price.currency} />\n </div>\n </div>\n )}\n </m.div>\n );\n}\n\nfunction LoadingSkeleton() {\n return (\n <m.div {...opacityAnimation} className=\"max-w-180\">\n <Skeleton className=\"text-xl mb-6\" />\n <Skeleton className=\"text-sm\" />\n <Skeleton className=\"text-4xl mt-32\" />\n </m.div>\n );\n}\n","/*!\n * paypal-js v5.1.4 (2022-11-29T23:08:21.847Z)\n * Copyright 2020-present, PayPal, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction findScript(url, attributes) {\n var currentScript = document.querySelector(\"script[src=\\\"\".concat(url, \"\\\"]\"));\n if (currentScript === null)\n return null;\n var nextScript = createScriptElement(url, attributes);\n // ignore the data-uid-auto attribute that gets auto-assigned to every script tag\n var currentScriptClone = currentScript.cloneNode();\n delete currentScriptClone.dataset.uidAuto;\n // check if the new script has the same number of data attributes\n if (Object.keys(currentScriptClone.dataset).length !==\n Object.keys(nextScript.dataset).length) {\n return null;\n }\n var isExactMatch = true;\n // check if the data attribute values are the same\n Object.keys(currentScriptClone.dataset).forEach(function (key) {\n if (currentScriptClone.dataset[key] !== nextScript.dataset[key]) {\n isExactMatch = false;\n }\n });\n return isExactMatch ? currentScript : null;\n}\nfunction insertScriptElement(_a) {\n var url = _a.url, attributes = _a.attributes, onSuccess = _a.onSuccess, onError = _a.onError;\n var newScript = createScriptElement(url, attributes);\n newScript.onerror = onError;\n newScript.onload = onSuccess;\n document.head.insertBefore(newScript, document.head.firstElementChild);\n}\nfunction processOptions(options) {\n var sdkBaseURL = \"https://www.paypal.com/sdk/js\";\n if (options.sdkBaseURL) {\n sdkBaseURL = options.sdkBaseURL;\n delete options.sdkBaseURL;\n }\n processMerchantID(options);\n var _a = Object.keys(options)\n .filter(function (key) {\n return (typeof options[key] !== \"undefined\" &&\n options[key] !== null &&\n options[key] !== \"\");\n })\n .reduce(function (accumulator, key) {\n var value = options[key].toString();\n if (key.substring(0, 5) === \"data-\") {\n accumulator.dataAttributes[key] = value;\n }\n else {\n accumulator.queryParams[key] = value;\n }\n return accumulator;\n }, {\n queryParams: {},\n dataAttributes: {},\n }), queryParams = _a.queryParams, dataAttributes = _a.dataAttributes;\n return {\n url: \"\".concat(sdkBaseURL, \"?\").concat(objectToQueryString(queryParams)),\n dataAttributes: dataAttributes,\n };\n}\nfunction objectToQueryString(params) {\n var queryString = \"\";\n Object.keys(params).forEach(function (key) {\n if (queryString.length !== 0)\n queryString += \"&\";\n queryString += key + \"=\" + params[key];\n });\n return queryString;\n}\n/**\n * Parse the error message code received from the server during the script load.\n * This function search for the occurrence of this specific string \"/* Original Error:\".\n *\n * @param message the received error response from the server\n * @returns the content of the message if the string string was found.\n * The whole message otherwise\n */\nfunction parseErrorMessage(message) {\n var originalErrorText = message.split(\"/* Original Error:\")[1];\n return originalErrorText\n ? originalErrorText.replace(/\\n/g, \"\").replace(\"*/\", \"\").trim()\n : message;\n}\nfunction createScriptElement(url, attributes) {\n if (attributes === void 0) { attributes = {}; }\n var newScript = document.createElement(\"script\");\n newScript.src = url;\n Object.keys(attributes).forEach(function (key) {\n newScript.setAttribute(key, attributes[key]);\n if (key === \"data-csp-nonce\") {\n newScript.setAttribute(\"nonce\", attributes[\"data-csp-nonce\"]);\n }\n });\n return newScript;\n}\nfunction processMerchantID(options) {\n var merchantID = options[\"merchant-id\"], dataMerchantID = options[\"data-merchant-id\"];\n var newMerchantID = \"\";\n var newDataMerchantID = \"\";\n if (Array.isArray(merchantID)) {\n if (merchantID.length > 1) {\n newMerchantID = \"*\";\n newDataMerchantID = merchantID.toString();\n }\n else {\n newMerchantID = merchantID.toString();\n }\n }\n else if (typeof merchantID === \"string\" && merchantID.length > 0) {\n newMerchantID = merchantID;\n }\n else if (typeof dataMerchantID === \"string\" &&\n dataMerchantID.length > 0) {\n newMerchantID = \"*\";\n newDataMerchantID = dataMerchantID;\n }\n options[\"merchant-id\"] = newMerchantID;\n options[\"data-merchant-id\"] = newDataMerchantID;\n return options;\n}\n\n/**\n * Load the Paypal JS SDK script asynchronously.\n *\n * @param {Object} options - used to configure query parameters and data attributes for the JS SDK.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<Object>} paypalObject - reference to the global window PayPal object.\n */\nfunction loadScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = getDefaultPromiseImplementation(); }\n validateArguments(options, PromisePonyfill);\n // resolve with null when running in Node\n if (typeof window === \"undefined\")\n return PromisePonyfill.resolve(null);\n var _a = processOptions(options), url = _a.url, dataAttributes = _a.dataAttributes;\n var namespace = dataAttributes[\"data-namespace\"] || \"paypal\";\n var existingWindowNamespace = getPayPalWindowNamespace(namespace);\n // resolve with the existing global paypal namespace when a script with the same params already exists\n if (findScript(url, dataAttributes) && existingWindowNamespace) {\n return PromisePonyfill.resolve(existingWindowNamespace);\n }\n return loadCustomScript({\n url: url,\n attributes: dataAttributes,\n }, PromisePonyfill).then(function () {\n var newWindowNamespace = getPayPalWindowNamespace(namespace);\n if (newWindowNamespace) {\n return newWindowNamespace;\n }\n throw new Error(\"The window.\".concat(namespace, \" global variable is not available.\"));\n });\n}\n/**\n * Load a custom script asynchronously.\n *\n * @param {Object} options - used to set the script url and attributes.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<void>} returns a promise to indicate if the script was successfully loaded.\n */\nfunction loadCustomScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = getDefaultPromiseImplementation(); }\n validateArguments(options, PromisePonyfill);\n var url = options.url, attributes = options.attributes;\n if (typeof url !== \"string\" || url.length === 0) {\n throw new Error(\"Invalid url.\");\n }\n if (typeof attributes !== \"undefined\" && typeof attributes !== \"object\") {\n throw new Error(\"Expected attributes to be an object.\");\n }\n return new PromisePonyfill(function (resolve, reject) {\n // resolve with undefined when running in Node\n if (typeof window === \"undefined\")\n return resolve();\n insertScriptElement({\n url: url,\n attributes: attributes,\n onSuccess: function () { return resolve(); },\n onError: function () {\n var defaultError = new Error(\"The script \\\"\".concat(url, \"\\\" failed to load.\"));\n if (!window.fetch) {\n return reject(defaultError);\n }\n // Fetch the error reason from the response body for validation errors\n return fetch(url)\n .then(function (response) {\n if (response.status === 200) {\n reject(defaultError);\n }\n return response.text();\n })\n .then(function (message) {\n var parseMessage = parseErrorMessage(message);\n reject(new Error(parseMessage));\n })\n .catch(function (err) {\n reject(err);\n });\n },\n });\n });\n}\nfunction getDefaultPromiseImplementation() {\n if (typeof Promise === \"undefined\") {\n throw new Error(\"Promise is undefined. To resolve the issue, use a Promise polyfill.\");\n }\n return Promise;\n}\nfunction getPayPalWindowNamespace(namespace) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return window[namespace];\n}\nfunction validateArguments(options, PromisePonyfill) {\n if (typeof options !== \"object\" || options === null) {\n throw new Error(\"Expected an options object.\");\n }\n if (typeof PromisePonyfill !== \"undefined\" &&\n typeof PromisePonyfill !== \"function\") {\n throw new Error(\"Expected PromisePonyfill to be a function.\");\n }\n}\n\n// replaced with the package.json version at build time\nvar version = \"5.1.4\";\n\nexport { loadCustomScript, loadScript, version };\n","import {useEffect, useRef, useState} from 'react';\nimport {loadScript} from '@paypal/paypal-js';\nimport {useProducts} from '../../pricing-table/use-products';\nimport {useSettings} from '../../../core/settings/use-settings';\n\ninterface UsePaypalProps {\n productId?: string;\n priceId?: string;\n}\nexport function usePaypal({productId, priceId}: UsePaypalProps) {\n const {data} = useProducts();\n const paypalLoadStarted = useRef<boolean>(false);\n const paypalButtonsRendered = useRef<boolean>(false);\n const [paypalIsLoaded, setPaypalIsLoaded] = useState(false);\n const paypalElementRef = useRef<HTMLDivElement>(null);\n const {\n base_url,\n billing: {\n stripe: {enable: stripeEnabled},\n paypal: {enable: paypalEnabled, public_key},\n },\n } = useSettings();\n\n useEffect(() => {\n if (!paypalEnabled || !public_key || paypalLoadStarted.current) return;\n loadScript({\n 'client-id': public_key,\n intent: 'subscription',\n vault: true,\n 'disable-funding': stripeEnabled ? 'card' : undefined,\n }).then(() => {\n setPaypalIsLoaded(true);\n });\n paypalLoadStarted.current = true;\n }, [public_key, paypalEnabled, stripeEnabled]);\n\n useEffect(() => {\n if (\n !paypalIsLoaded ||\n !window.paypal?.Buttons ||\n !paypalElementRef.current ||\n !data?.products.length ||\n !productId ||\n !priceId ||\n paypalButtonsRendered.current\n )\n return;\n\n const product = data.products.find(p => p.id === parseInt(productId));\n const price = product?.prices.find(p => p.id === parseInt(priceId));\n\n window.paypal\n .Buttons({\n style: {\n label: 'pay',\n },\n createSubscription: (data, actions) => {\n return actions.subscription.create({\n application_context: {\n shipping_preference: 'NO_SHIPPING',\n },\n plan_id: price?.paypal_id!,\n });\n },\n onApprove: (data, actions) => {\n actions.redirect(\n `${base_url}/checkout/${productId}/${priceId}/paypal/done?subscriptionId=${data.subscriptionID}&status=success`\n );\n return Promise.resolve();\n },\n onError: e => {\n location.href = `${base_url}/checkout/${productId}/${priceId}/paypal/done?status=error`;\n },\n })\n .render(paypalElementRef.current)\n .then(() => {\n paypalButtonsRendered.current = true;\n });\n }, [productId, priceId, data, paypalIsLoaded, base_url]);\n\n return {\n paypalElementRef,\n stripeIsEnabled: public_key != null && paypalEnabled,\n };\n}\n","import {Navigate, useParams} from 'react-router-dom';\nimport {Trans} from '../../i18n/trans';\nimport {CheckoutLayout} from './checkout-layout';\nimport {CheckoutProductSummary} from './checkout-product-summary';\nimport {usePaypal} from './paypal/use-paypal';\nimport {StripeElementsForm} from './stripe/stripe-elements-form';\nimport {Fragment} from 'react';\nimport {useProducts} from '../pricing-table/use-products';\nimport {FullPageLoader} from '../../ui/progress/full-page-loader';\nimport {useSettings} from '../../core/settings/use-settings';\n\nexport function Checkout() {\n const {productId, priceId} = useParams();\n const productQuery = useProducts();\n const {paypalElementRef} = usePaypal({\n productId,\n priceId,\n });\n const {\n base_url,\n billing: {stripe},\n } = useSettings();\n\n if (productQuery.isLoading) {\n return <FullPageLoader />;\n }\n\n const product = productQuery.data?.products.find(\n p => p.id === parseInt(productId!)\n );\n const price = product?.prices.find(p => p.id === parseInt(priceId!));\n\n // make sure product and price exists in backend\n if (!product || !price || productQuery.status === 'error') {\n return <Navigate to=\"/pricing\" replace />;\n }\n\n return (\n <CheckoutLayout>\n <Fragment>\n <h1 className=\"text-4xl mb-40\">\n <Trans message=\"Checkout\" />\n </h1>\n {stripe.enable ? (\n <Fragment>\n <StripeElementsForm\n productId={productId}\n submitLabel={<Trans message=\"Upgrade\" />}\n type=\"subscription\"\n returnUrl={`${base_url}/checkout/${productId}/${priceId}/stripe/done`}\n />\n <Separator />\n </Fragment>\n ) : null}\n <div ref={paypalElementRef} />\n <div className=\"text-xs text-muted mt-30\">\n <Trans message=\"You’ll be charged until you cancel your subscription. Previous charges won’t be refunded when you cancel unless it’s legally required. Your payment data is encrypted and secure. By subscribing your agree to our terms of service and privacy policy.\" />\n </div>\n </Fragment>\n <CheckoutProductSummary />\n </CheckoutLayout>\n );\n}\n\nfunction Separator() {\n return (\n <div className=\"relative text-center my-20 before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-1 before:w-full before:bg-divider\">\n <span className=\"bg relative z-10 px-10 text-sm text-muted\">\n <Trans message=\"or\" />\n </span>\n </div>\n );\n}\n","import {CheckoutLayout} from '../checkout-layout';\nimport {useParams, useSearchParams} from 'react-router-dom';\nimport {loadStripe, PaymentIntent} from '@stripe/stripe-js';\nimport {useEffect, useRef, useState} from 'react';\nimport {message} from '../../../i18n/message';\nimport {CheckoutProductSummary} from '../checkout-product-summary';\nimport {\n BillingRedirectMessage,\n BillingRedirectMessageConfig,\n} from '../../billing-redirect-message';\nimport {useNavigate} from '../../../utils/hooks/use-navigate';\nimport {apiClient} from '../../../http/query-client';\nimport {useSettings} from '../../../core/settings/use-settings';\nimport {useBootstrapData} from '../../../core/bootstrap-data/bootstrap-data-context';\n\nexport function CheckoutStripeDone() {\n const {invalidateBootstrapData} = useBootstrapData();\n const {productId, priceId} = useParams();\n const navigate = useNavigate();\n const {\n billing: {stripe_public_key},\n } = useSettings();\n\n const [params] = useSearchParams();\n const clientSecret = params.get('payment_intent_client_secret');\n\n const [messageConfig, setMessageConfig] =\n useState<BillingRedirectMessageConfig>();\n\n const stripeInitiated = useRef<boolean>();\n\n useEffect(() => {\n if (stripeInitiated.current) return;\n loadStripe(stripe_public_key!).then(async stripe => {\n if (!stripe || !clientSecret) {\n setMessageConfig(getRedirectMessageConfig());\n return;\n }\n stripe.retrievePaymentIntent(clientSecret).then(({paymentIntent}) => {\n if (paymentIntent?.status === 'succeeded') {\n storeSubscriptionDetailsLocally(paymentIntent.id).then(() => {\n invalidateBootstrapData();\n });\n }\n setMessageConfig(\n getRedirectMessageConfig(paymentIntent?.status, productId, priceId)\n );\n });\n });\n stripeInitiated.current = true;\n }, [\n stripe_public_key,\n clientSecret,\n priceId,\n productId,\n invalidateBootstrapData,\n ]);\n\n if (!clientSecret) {\n navigate('/');\n return null;\n }\n\n return (\n <CheckoutLayout>\n <BillingRedirectMessage config={messageConfig} />\n <CheckoutProductSummary showBillingLine={false} />\n </CheckoutLayout>\n );\n}\n\nfunction getRedirectMessageConfig(\n status?: PaymentIntent.Status,\n productId?: string,\n priceId?: string\n): BillingRedirectMessageConfig {\n switch (status) {\n case 'succeeded':\n return {\n message: message('Subscription successful!'),\n status: 'success',\n buttonLabel: message('Return to site'),\n link: '/billing',\n };\n case 'processing':\n return {\n message: message(\n \"Payment processing. We'll update you when payment is received.\"\n ),\n status: 'success',\n buttonLabel: message('Return to site'),\n link: '/billing',\n };\n case 'requires_payment_method':\n return {\n message: message('Payment failed. Please try another payment method.'),\n status: 'error',\n buttonLabel: message('Go back'),\n link: errorLink(productId, priceId),\n };\n default:\n return {\n message: message('Something went wrong'),\n status: 'error',\n buttonLabel: message('Go back'),\n link: errorLink(productId, priceId),\n };\n }\n}\n\nfunction errorLink(productId?: string, priceId?: string): string {\n return productId && priceId ? `/buy/${productId}/${priceId}` : '/';\n}\n\nfunction storeSubscriptionDetailsLocally(paymentIntentId: string) {\n return apiClient.post('billing/stripe/store-subscription-details-locally', {\n payment_intent_id: paymentIntentId,\n });\n}\n","import {CheckoutLayout} from '../checkout-layout';\nimport {useParams, useSearchParams} from 'react-router-dom';\nimport {useEffect, useState} from 'react';\nimport {message} from '@common/i18n/message';\nimport {CheckoutProductSummary} from '../checkout-product-summary';\nimport {\n BillingRedirectMessage,\n BillingRedirectMessageConfig,\n} from '../../billing-redirect-message';\nimport {apiClient} from '@common/http/query-client';\nimport {useBootstrapData} from '@common/core/bootstrap-data/bootstrap-data-context';\n\nexport function CheckoutPaypalDone() {\n const {invalidateBootstrapData} = useBootstrapData();\n const {productId, priceId} = useParams();\n const [params] = useSearchParams();\n\n const [messageConfig, setMessageConfig] =\n useState<BillingRedirectMessageConfig>();\n\n useEffect(() => {\n const subscriptionId = params.get('subscriptionId');\n const status = params.get('status');\n setMessageConfig(getRedirectMessageConfig(status, productId, priceId));\n if (subscriptionId && status === 'success') {\n storeSubscriptionDetailsLocally(subscriptionId).then(() => {\n invalidateBootstrapData();\n });\n }\n }, [priceId, productId, params, invalidateBootstrapData]);\n\n return (\n <CheckoutLayout>\n <BillingRedirectMessage config={messageConfig} />\n <CheckoutProductSummary showBillingLine={false} />\n </CheckoutLayout>\n );\n}\n\nfunction getRedirectMessageConfig(\n status?: 'success' | 'error' | string | null,\n productId?: string,\n priceId?: string\n): BillingRedirectMessageConfig {\n switch (status) {\n case 'success':\n return {\n message: message('Subscription successful!'),\n status: 'success',\n buttonLabel: message('Return to site'),\n link: '/billing',\n };\n default:\n return {\n message: message('Something went wrong. Please try again.'),\n status: 'error',\n buttonLabel: message('Go back'),\n link: errorLink(productId, priceId),\n };\n }\n}\n\nfunction errorLink(productId?: string, priceId?: string): string {\n return productId && priceId ? `/buy/${productId}/${priceId}` : '/';\n}\n\nfunction storeSubscriptionDetailsLocally(subscriptionId: string) {\n return apiClient.post('billing/paypal/store-subscription-details-locally', {\n paypal_subscription_id: subscriptionId,\n });\n}\n","import {Route, Routes} from 'react-router-dom';\nimport {NotSubscribedRoute} from '../../auth/guards/not-subscribed-route';\nimport {Checkout} from './checkout';\nimport React from 'react';\nimport {CheckoutStripeDone} from './stripe/checkout-stripe-done';\nimport {CheckoutPaypalDone} from './paypal/checkout-paypal-done';\n\nexport default function CheckoutRoutes() {\n return (\n <Routes>\n <Route\n path=\":productId/:priceId\"\n element={\n <NotSubscribedRoute>\n <Checkout />\n </NotSubscribedRoute>\n }\n />\n <Route\n path=\":productId/:priceId/stripe/done\"\n element={\n <NotSubscribedRoute>\n <CheckoutStripeDone />\n </NotSubscribedRoute>\n }\n />\n <Route\n path=\":productId/:priceId/paypal/done\"\n element={\n <NotSubscribedRoute>\n <CheckoutPaypalDone />\n </NotSubscribedRoute>\n }\n />\n </Routes>\n );\n}\n"],"names":["NotSubscribedRoute","children","isLoggedIn","isSubscribed","useAuth","jsx","Navigate","Outlet","CheckoutLayout","left","right","useEffect","removeFromLocalStorage","jsxs","StaticPageTitle","Trans","Navbar","CustomMenu","LocaleSwitcher","endpoint","productId","useCheckoutProduct","priceId","useParams","query","useQuery","fetchProduct","product","_a","price","p","apiClient","response","CheckoutProductSummary","showBillingLine","status","LoadingSkeleton","ProductSummary","m","FormattedPrice","ProductFeatureList","FormattedCurrency","opacityAnimation","Skeleton","findScript","url","attributes","currentScript","nextScript","createScriptElement","currentScriptClone","isExactMatch","key","insertScriptElement","onSuccess","onError","newScript","processOptions","options","sdkBaseURL","processMerchantID","accumulator","value","queryParams","dataAttributes","objectToQueryString","params","queryString","parseErrorMessage","message","originalErrorText","merchantID","dataMerchantID","newMerchantID","newDataMerchantID","loadScript","PromisePonyfill","getDefaultPromiseImplementation","validateArguments","namespace","existingWindowNamespace","getPayPalWindowNamespace","loadCustomScript","newWindowNamespace","resolve","reject","defaultError","parseMessage","err","usePaypal","data","useProducts","paypalLoadStarted","useRef","paypalButtonsRendered","paypalIsLoaded","setPaypalIsLoaded","useState","paypalElementRef","base_url","stripeEnabled","paypalEnabled","public_key","useSettings","actions","e","Checkout","productQuery","stripe","FullPageLoader","Fragment","StripeElementsForm","Separator","CheckoutStripeDone","invalidateBootstrapData","useBootstrapData","navigate","useNavigate","stripe_public_key","useSearchParams","clientSecret","messageConfig","setMessageConfig","stripeInitiated","loadStripe","getRedirectMessageConfig","paymentIntent","storeSubscriptionDetailsLocally","BillingRedirectMessage","errorLink","paymentIntentId","CheckoutPaypalDone","subscriptionId","CheckoutRoutes","Routes","Route"],"mappings":"sWAOgB,SAAAA,EAAmB,CAAC,SAAAC,GAA4B,CAC9D,KAAM,CAAC,WAAAC,EAAY,aAAAC,CAAY,EAAIC,EAAQ,EAE3C,OAAKF,EAIDA,GAAcC,EACRE,EAAAA,IAAAC,EAAA,CAAS,GAAG,WAAW,QAAO,EAAC,CAAA,EAGlCL,SAAaM,EAAO,CAAA,CAAA,EAPjBF,EAAAA,IAAAC,EAAA,CAAS,GAAG,YAAY,QAAO,EAAC,CAAA,CAQ5C,CCRgB,SAAAE,EAAe,CAAC,SAAAP,GAAgC,CACxD,KAAA,CAACQ,EAAMC,CAAK,EAAIT,EAEtBU,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAuB,wBAAwB,CACjD,EAAG,CAAE,CAAA,EAGHC,EAAA,KAAC,MAAI,CAAA,UAAU,uCACb,SAAA,CAAAR,MAACS,EACC,CAAA,SAAAT,EAAA,IAACU,EAAM,CAAA,QAAQ,UAAW,CAAA,EAC5B,EACAV,EAAA,IAACW,EAAA,CACC,KAAK,KACL,MAAM,cACN,UAAU,mCACV,UAAU,YACV,UAAU,OACV,cAAc,cACd,aAAa,sBAAA,CACf,EACAH,EAAAA,KAAC,MAAI,CAAA,UAAU,wFACb,SAAA,CAACR,EAAAA,IAAA,MAAA,CAAI,UAAU,iGAAkG,CAAA,EACjHQ,EAAAA,KAAC,MAAI,CAAA,UAAU,2BACZ,SAAA,CAAAJ,EACDJ,EAAA,IAACY,EAAA,CACC,KAAK,uBACL,UAAU,0CAAA,CACZ,QACC,MAAI,CAAA,UAAU,QACb,SAAAZ,MAACa,GAAe,CAAA,EAClB,CAAA,EACF,EAC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