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AEzBC,uBAAuB,EACvBC,gBAAgB,EAChBC,gBAAgB,EAEhBC,oBAAqB,OACrBC,4BAA4B,EAE5BC,qBAAsB,CAAC,OAAQ,QAAS,WAAY,iBAEpDC,mBAAoB,CAClB,SAACC,GAAG,QAEAA,EAAIvD,SAAS,QACbuD,EAAIvD,SAAS,SACbuD,EAAIvD,SAAS,kBACbuD,EAAIvD,SAAS,iBACVuD,EAAIvD,SAAS,aAAa,GAEnCwD,WAAU,SAAC5B,EAAOE,GAGhB,GAAmB,aAAfF,EAAM6B,KAAqB,KAAAC,EAE7B,GACE,aAAc5B,GAAd,MACAA,GAAAA,EAAS6B,UADT,MAEA7B,GAAiB,QAAV4B,EAAP5B,EAAS6B,gBAAQ,IAAAD,GAAjBA,EAAmBE,QAGnBjC,EAA0BC,EADJE,EAAQ6B,SAASC,QAAQC,IAAI,oBAIrD,GACE,QAAS/B,GACTA,EAAQgC,KACR,sBAAuBhC,EAAQgC,KACU,mBAAlChC,EAAQgC,IAAIC,kBAInBpC,EAA0BC,EADxBE,EAAQgC,IAAIC,kBAAkB,mBAGpC,CACA,OAAO,CACT","sources":["webpack:///./components/withWorldReady.js","webpack:///./pages/error/landingerror.js","webpack:///./vendor/datadog.js"],"sourcesContent":["import React from 'react';\nimport { ContextProvider as WorldReadyContextProvider } from '@paypalcorp/worldready-react';\nimport { WorldReadyProvider } from '@paypalcorp/pp-react-worldready';\nimport templateData from './../utility/getTemplateData';\nimport { initializeWorldReady } from '../utility/worldReadyUtils';\n\ninitializeWorldReady();\n\nfunction withWorldReady(\n WrappedComponent,\n locale = `${templateData?.language || 'en'}-${templateData?.country || 'US'}`\n) {\n return (props) => {\n return (\n \n \n \n \n \n );\n };\n}\n\nexport default withWorldReady;\n","import 'consumerweb-shim';\nimport 'core-js/stable'; // If imports from pp-react are required, please test this component on IE\nimport 'regenerator-runtime/runtime';\nimport React, { useEffect, useContext } from 'react';\nimport ReactDOM from 'react-dom';\nimport * as AppActions from '../../actions/AppActions';\nimport { hideSpinnerOverlay } from '../../utility/helper';\nimport Footer from '../../components/footer/footer';\nimport '../../../css/ppvx-app.less';\nimport withTheme from '../../components/withTheme';\nimport FullPageError from './FullPageError';\nimport {\n Context as WorldReadyContext,\n Message,\n} from '@paypalcorp/worldready-react';\nimport withWorldReady from '../../components/withWorldReady';\nimport { MessageFormat } from '@paypalcorp/worldready';\nimport '../../vendor/datadog';\nfunction LandingErrorPage() {\n const worldReady = useContext(WorldReadyContext);\n const isGiftaid = window.location.href.includes('giftaid');\n useEffect(() => {\n AppActions.updateCurrentPage({ currentPage: 'landingError' });\n hideSpinnerOverlay();\n }, []);\n const handleReturn = () => {\n window.location.pathname = new MessageFormat(worldReady, {\n id: 'errors.landingerror.link.paypal',\n }).format();\n };\n\n return (\n <>\n }\n body={\n isGiftaid ? (\n \n ) : (\n \n )\n }\n linkLabel={}\n handleLinkClick={handleReturn}\n showCloseButton={true}\n />\n \n >\n );\n}\n\nconst LandingErrorWithTheme = withWorldReady(withTheme(LandingErrorPage));\n\nReactDOM.render(\n ,\n document.getElementById('donateWrapper')\n);\n","import { datadogRum } from '@datadog/browser-rum';\n\nconst packageJson = require('../../../package.json');\n\nconst SERVICE_NAME = 'donatenodeweb';\nconst APPLICATION_ID = {\n PRODUCTION: 'ea0d0f72-7e9c-4439-93d1-bdfd24a8a58b',\n SANDBOX: '4ee30f74-f5c6-42b4-a4df-006566b81b6d',\n QA: '689e1559-2dca-41ab-b6b3-9f587c025cbc',\n};\nconst CLIENT_ID = {\n PRODUCTION: 'pub5f2f9c1a22512ec8c3669abb873b07c8',\n SANDBOX: 'pubdb2edd9c3e87719370e624ef2bba7a54',\n QA: 'pubc5e2f2d78230c796fbe543e12ff75e1f',\n};\n\nconst DATADOG_RUM_SITE = 'us5.datadoghq.com';\n\nfunction getClientEnvironment() {\n const hostname = typeof window !== 'undefined' ? window.location.host : '';\n if (hostname.includes('localhost')) return 'DEVELOPMENT';\n if (hostname.includes('qa.paypal.com')) return 'STAGE';\n if (hostname.includes('sandbox.paypal.com')) return 'SANDBOX';\n if (hostname.includes('paypal.com')) return 'PRODUCTION';\n}\n\nfunction getDDTraceLink(correlationId) {\n const environment = getClientEnvironment();\n switch (environment) {\n case 'PRODUCTION':\n return `https://go/ddprod/trace?${correlationId}`;\n case 'SANDBOX':\n return `https://go/ddsb/trace?${correlationId}`;\n default:\n return `https://go/ddqa/trace?${correlationId}`;\n }\n}\n\nfunction getCalLogLink(correlationId) {\n const environment = getClientEnvironment();\n switch (environment) {\n case 'PRODUCTION':\n return `https://go/ddprod/tocal?${correlationId}`;\n case 'SANDBOX':\n return `https://go/ddsb/tocal?${correlationId}`;\n default:\n return `https://go/ddqa/tocal?${correlationId}`;\n }\n}\n\nexport function getApplicationId() {\n const environment = getClientEnvironment();\n switch (environment) {\n case 'PRODUCTION':\n return APPLICATION_ID.PRODUCTION;\n case 'SANDBOX':\n return APPLICATION_ID.SANDBOX;\n default:\n return APPLICATION_ID.QA;\n }\n}\n\nexport function getClientToken() {\n const environment = getClientEnvironment();\n switch (environment) {\n case 'PRODUCTION':\n return CLIENT_ID.PRODUCTION;\n case 'SANDBOX':\n return CLIENT_ID.SANDBOX;\n default:\n return CLIENT_ID.QA;\n }\n}\n\nexport function addCorrelationIdToContext(event, correlationId) {\n if (correlationId && typeof correlationId === 'string') {\n event.context.correlationId = correlationId;\n\n const ddTraceLink = getDDTraceLink(correlationId);\n const calLogLink = getCalLogLink(correlationId);\n event.context['dd-trace-url'] = ddTraceLink;\n event.context['external-cal-url'] = calLogLink;\n }\n}\n\n/* istanbul ignore next */\nif (typeof window !== 'undefined') {\n // init Datadog RUM\n /* istanbul ignore next */\n datadogRum.init({\n // properties for idntifying and authenticating the application with RUM\n applicationId: getApplicationId(),\n clientToken: getClientToken(),\n site: DATADOG_RUM_SITE,\n service: SERVICE_NAME,\n version: packageJson.version,\n env: process.env.NODE_ENV,\n // sampling must be set at 100 for session and 0 for recording. retention will be controlled on the backend in Datadog\n sessionSampleRate: 100,\n sessionReplaySampleRate: 0,\n // auto-instrumentations\n trackUserInteractions: true,\n trackResources: true,\n trackLongTasks: true,\n // privacy defaults to prevent leaking PII\n defaultPrivacyLevel: 'mask',\n enablePrivacyForActionName: true,\n // exclude log, tealeaf, and fpti endpoints which are not tied to user interactions from activity tracking\n excludedActivityUrls: [/log/i, /fpti/i, /tealeaf/i, /tracking\\/ts/i],\n // exclude log, tealeaf, and fpti endpoints which are not tied to user interactions from universal tracing\n allowedTracingUrls: [\n (url) =>\n !(\n url.includes('log') ||\n url.includes('fpti') ||\n url.includes('tealeaftarget') ||\n url.includes('tracking/ts')\n ) && url.includes('paypal.com'),\n ],\n beforeSend(event, context) {\n // modify RUM events to include the correlationId and links to logs and traces\n // for the request because we don't yet have universal tracing\n if (event.type === 'resource') {\n // handle fetch\n if (\n 'response' in context &&\n context?.response &&\n context?.response?.headers\n ) {\n const correlationId = context.response.headers.get('Paypal-Debug-Id');\n addCorrelationIdToContext(event, correlationId);\n }\n // handle XHR\n if (\n 'xhr' in context &&\n context.xhr &&\n 'getResponseHeader' in context.xhr &&\n typeof context.xhr.getResponseHeader === 'function'\n ) {\n const correlationId =\n context.xhr.getResponseHeader('Paypal-Debug-Id');\n addCorrelationIdToContext(event, correlationId);\n }\n }\n return true;\n },\n });\n}\n"],"names":["initializeWorldReady","WrappedComponent","locale","arguments","length","undefined","concat","templateData","language","country","props","React","WorldReadyContextProvider","WorldReadyProvider","LandingErrorWithTheme","withWorldReady","withTheme","worldReady","useContext","WorldReadyContext","isGiftaid","window","location","href","includes","useEffect","AppActions","currentPage","hideSpinnerOverlay","FullPageError","title","Message","id","body","linkLabel","handleLinkClick","pathname","MessageFormat","format","showCloseButton","Footer","ReactDOM","document","getElementById","packageJson","require","APPLICATION_ID","CLIENT_ID","getClientEnvironment","hostname","host","addCorrelationIdToContext","event","correlationId","context","ddTraceLink","getDDTraceLink","calLogLink","getCalLogLink","datadogRum","init","applicationId","getApplicationId","clientToken","getClientToken","site","service","version","env","process","sessionSampleRate","sessionReplaySampleRate","trackUserInteractions","trackResources","trackLongTasks","defaultPrivacyLevel","enablePrivacyForActionName","excludedActivityUrls","allowedTracingUrls","url","beforeSend","type","_context$response","response","headers","get","xhr","getResponseHeader"],"sourceRoot":""}