{"version":3,"sources":["components/Footer/Footer.tsx","i18n.ts","enum/merchants.ts","layout/Navigation/Navbar.tsx","app/hooks.ts","app/environments/environment-configuration.ts","app/constants.ts","app/voucherSlice.ts","app/models/sliceStatusResult.ts","app/services/errorCodeTranslator.ts","app/hooks/merchantIdentifier.ts","pages/Home/PhoneNumberGetter.tsx","components/VideoTutorial/VideoTutorial.tsx","pages/Home/Tutorials.tsx","components/MerchantOption/MerchantOption.tsx","components/Loading/Loading.tsx","pages/Home/BuyVoucher.tsx","components/Steps/StepCard.tsx","pages/Home/HowItWorks.tsx","pages/Home/Home.tsx","components/AmountOption/AmountOption.tsx","layout/PurchaseFlowHeader/PurchaseFlowHeader.tsx","pages/ChooseAmount/ChooseAmount.tsx","pages/Confirm/PurchaseSummary.tsx","components/Alerts/Alert.tsx","components/Checkbox/Checkbox.tsx","pages/Confirm/Confirm.tsx","pages/PurchaseResult/Success.tsx","pages/PurchaseResult/Error.tsx","components/AcceptanceTutorial/AcceptanceTutorial.tsx","pages/PurchaseResult/ConfirmationModal.tsx","pages/PurchaseResult/SendingRequest.tsx","pages/PurchaseResult/FailedPayment.tsx","pages/PurchaseResult/PurchaseResult.tsx","components/GoogleAnalytics/GoogleAnalytics.tsx","components/SmartLook/SmartLook.tsx","App.tsx","app/store.ts","serviceWorker.ts","index.tsx"],"names":["Footer","className","href","target","rel","src","alt","i18n","use","Backend","I18nextBrowserLanguageDetector","initReactI18next","init","fallbackLng","debug","interpolation","escapeValue","react","useSuspense","MerchantIdentifier","Navbar","t","useTranslation","useState","menuIsOpen","setMenuIsOpen","hasFadeIn","setHasFadeIn","hasFadeOut","setHasFadeOut","currentLanguage","language","slice","handleLanguageChange","e","currentTarget","getAttribute","changeLanguage","toggleMenu","onClick","items","currentClassName","type","id","useAppDispatch","useDispatch","useAppSelector","useSelector","ProductionEnvironmentConfig","ApiEndpoint","GoogleAnalyticsKey","SmartLookKey","getEnvironmentConfiguration","BASE_URL","MERCHANTS_URL","BUY_URL","REDEEM_URL","CANCEL_URL","RESEND_NOTIFICATION_URL","redeemPoll","SliceStatusResultExtentions","code","description","errorCodeTranslations","PCS101","LOCAL01","LOCAL02","translateErrorCode","translation","failed","canTranslateErrorCode","merchantIdentifierToName","merchantIdentifier","DigIn","replace","voucherSlice","createSlice","name","initialState","status","isLoading","result","merchants","chosenMerchant","vouchers","guid","amount","count","classAppend","logo","appIcon","sendsVoucherCodes","chosenGuid","chosenPaymentId","phoneNumber","purchaseCompleted","completed","reducers","start","state","stop","action","payload","availableMerchants","merchantChoice","amountChoice","voucherReservation","setPhoneNumber","clearResultStatus","completePurchase","cancelPurchase","requestBody","dispatch","a","clearInterval","fetch","headers","accept","body","JSON","stringify","method","response","ok","json","data","actions","PhoneNumberGetter","location","useLocation","getPhoneNumberFromQueryString","newPhoneNumber","URLSearchParams","search","toLowerCase","get","isValidPhoneNumber","formatPhoneNumberIntl","useEffect","videoTutorialsLinks","video","playStore","appStore","appGallery","VideoTutorial","props","merchantApp","merchantInfo","find","merchant","title","width","height","frameBorder","allow","allowFullScreen","viewBox","fill","xmlns","d","opacity","stroke","x1","y1","x2","y2","gradientUnits","offset","Tutorials","MerchantOption","history","useHistory","onChooseMerchant","push","merchantClass","Loading","content","BuyVoucher","voucher","loading","error","errorMessage","Error","toKebabCase","str","merchantsList","map","minimumExpirationDays","succeeded","console","log","selectMerchant","StepCard","illustration","stepNumber","paragraph","stepsContent","titlePT","titleEN","paragraphPT","paragraphEN","HowItWorks","step","Home","AmountOption","active","linkClass","to","onChooseAmount","PurchaseFlowHeader","goBack","header","ChooseAmount","selectAmount","PurchaseSummary","icon","Alert","message","Checkbox","htmlFor","checkboxType","label","onChange","checkHandler","chosenVoucher","expirationDate","numberIsValid","setNumberIsValid","wasTouched","setWasTouched","expirationIsChecked","setExpirationIsChecked","redeemIsChecked","setRedeemIsChecked","redeemCheckboxHandler","checked","onSubmit","preventDefault","isPossiblePhoneNumber","voucherGuid","parsePhoneNumber","number","failedPayment","paymentId","attempts","setInterval","REDEEM_TIMEOUT_SECONDS","localStorage","removeItem","sleepIntervalSeconds","placeholder","value","defaultCountry","Success","purchaseStatus","purchaseResult","window","addEventListener","removeEventListener","AcceptanceTutorial","resendingNotification","setResendingNotification","disabled","setTimeout","ConfirmationModal","onStay","onCancel","SendingRequest","modalIsShowing","setModalIsShowing","setIsLoading","purchaseIsCanceled","onBackPage","event","pushState","pathname","onChangePage","sendCancelRequest","length","capture","FailedPayment","PurchaseResult","success","GoogleAnalytics","apiConfiguration","scriptToAppend","script","document","createElement","async","appendChild","appendScript","text","SmartLook","environmentConfiguration","App","fallback","path","exact","Confirm","store","configureStore","reducer","voucherReducer","Boolean","hostname","match","ReactDOM","render","StrictMode","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch"],"mappings":"6OAgBeA,EAhBA,WACX,OACI,sBAAKC,UAAU,SAAf,UACI,mBAAGA,UAAU,OAAOC,KAAK,oBAAoBC,OAAO,SAASC,IAAI,aAAjE,oCAGA,sBAAKH,UAAU,gCAAf,UACI,+CACA,mBAAGC,KAAK,2BAA2BC,OAAO,SAASC,IAAI,aAAaH,UAAU,iBAA9E,SACI,qBAAKI,IAAI,oCAAoCC,IAAI,yB,wDCJrEC,IACKC,IAAIC,KACJD,IAAIE,KACJF,IAAIG,KACJC,KAAK,CACFC,YAAa,KACbC,OAAO,EAEPC,cAAe,CACXC,aAAa,GAGjBC,MAAO,CACHC,aAAa,KAIVX,ICtBHY,EDsBGZ,IAAf,E,QEqFea,EArGA,WACX,IAAQC,EAAMC,cAAND,EAER,EAAoCE,oBAAS,GAA7C,mBAAOC,EAAP,KAAmBC,EAAnB,KACA,EAAkCF,oBAAS,GAA3C,mBAAOG,EAAP,KAAkBC,EAAlB,KACA,EAAoCJ,oBAAS,GAA7C,mBAAOK,EAAP,KAAmBC,EAAnB,KAEMC,EAAkBvB,EAAKwB,SAASC,MAAM,EAAG,GAEzCC,EAAuB,SAACC,GAC1B,IAAMH,EAAWG,EAAEC,cAAcC,aAAa,MAC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CAAOF,KAAK,mBAAZ,SACI,cAAC,GAAD,MAGJ,cAAC,IAAD,CAAOA,KAAK,IAAZ,SACI,cAAC,IAAD,CAAU1F,GAAG,WAGrB,cAAC,EAAD,IACA,cAAC,GAAD,IACA,cAAC,GAAD,QCzCC6F,GAAQC,YAAe,CAClCC,QAAS,CACH5H,QAAS6H,MCOGC,QACW,cAA7BhD,OAAOhI,SAASiL,UAEe,UAA7BjD,OAAOhI,SAASiL,UAEhBjD,OAAOhI,SAASiL,SAASC,MACvB,2DCRNC,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,IAAD,CAAUT,MAAOA,GAAjB,SACE,cAAC,KAAD,UACE,cAAC,GAAD,UAINb,SAASuB,eAAe,SDsHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBC,MAAK,SAACC,GACLA,EAAaC,gBAEdC,OAAM,SAACzI,GACNS,QAAQT,MAAMA,EAAMqC,c","file":"static/js/main.a19dee56.chunk.js","sourcesContent":["const Footer = () => {\r\n return (\r\n
\r\n \r\n TICKET SERVIÇOS®\r\n \r\n
\r\n

Powered by 

\r\n \r\n \"Paycritical\"\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import i18n from \"i18next\";\r\nimport { initReactI18next } from \"react-i18next\";\r\nimport Backend from 'i18next-http-backend';\r\nimport I18nextBrowserLanguageDetector from \"i18next-browser-languagedetector\";\r\n\r\ni18n\r\n .use(Backend)\r\n .use(I18nextBrowserLanguageDetector)\r\n .use(initReactI18next) // passes i18n down to react-i18next\r\n .init({\r\n fallbackLng: 'pt',\r\n debug: false,\r\n\r\n interpolation: {\r\n escapeValue: false // react already safes from xss\r\n },\r\n\r\n react: {\r\n useSuspense: true\r\n }\r\n });\r\n\r\nexport default i18n;","export enum MerchantIdentifier {\r\n DigIn = 1,\r\n Glovo = 2,\r\n BoltFood = 3,\r\n TooGoodToGo = 4,\r\n Takeaway = 5,\r\n UberEats = 6,\r\n AMarmita = 7,\r\n}","import React, { useState } from \"react\";\r\nimport Scrollspy from \"react-scrollspy\";\r\nimport { Link } from \"react-router-dom\";\r\nimport i18n from \"../../i18n\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst Navbar = () => {\r\n const { t } = useTranslation();\r\n\r\n const [menuIsOpen, setMenuIsOpen] = useState(false);\r\n const [hasFadeIn, setHasFadeIn] = useState(false);\r\n const [hasFadeOut, setHasFadeOut] = useState(false);\r\n\r\n const currentLanguage = i18n.language.slice(0, 2);\r\n\r\n const handleLanguageChange = (e: React.MouseEvent) => {\r\n const language = e.currentTarget.getAttribute(\"id\");\r\n if (language) {\r\n i18n.changeLanguage(language);\r\n }\r\n };\r\n\r\n const toggleMenu = () => {\r\n if (menuIsOpen) {\r\n setMenuIsOpen(false);\r\n setHasFadeIn(false);\r\n setHasFadeOut(true);\r\n } else {\r\n setMenuIsOpen(true);\r\n setHasFadeIn(true);\r\n setHasFadeOut(false);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Navbar;\r\n","import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';\r\nimport type { RootState, AppDispatch } from './store';\r\n\r\n// Use throughout your app instead of plain `useDispatch` and `useSelector`\r\nexport const useAppDispatch = () => useDispatch();\r\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\r\n","interface IEnvironmentConfig {\r\n ApiEndpoint: string;\r\n GoogleAnalyticsKey: string;\r\n SmartLookKey: string;\r\n}\r\n\r\nclass DevelopmentEnvironmentConfig implements IEnvironmentConfig {\r\n ApiEndpoint: string = 'https://localhost:44311/';\r\n GoogleAnalyticsKey: string = '';\r\n SmartLookKey: string = '';\r\n}\r\n\r\nclass SandboxEnvironmentConfig implements IEnvironmentConfig {\r\n ApiEndpoint: string = 'https://pcsapisbx.paycritical.com/';\r\n GoogleAnalyticsKey: string = '';\r\n SmartLookKey: string = '';\r\n\r\n}\r\n\r\nclass ProductionEnvironmentConfig implements IEnvironmentConfig {\r\n ApiEndpoint: string = 'https://pcsapi.paycritical.com/';\r\n GoogleAnalyticsKey: string = 'G-5RZGJKHPHZ';\r\n SmartLookKey: string = 'e5a15cb2ac7e2956a1b753669d8dabfc46325e6e';\r\n\r\n}\r\n\r\nexport const getEnvironmentConfiguration = (): IEnvironmentConfig => {\r\n switch (process.env.REACT_APP_ENV) {\r\n case 'production':\r\n return new ProductionEnvironmentConfig();\r\n case 'sandbox':\r\n return new SandboxEnvironmentConfig();\r\n default:\r\n break;\r\n }\r\n\r\n return new DevelopmentEnvironmentConfig();\r\n}","import { getEnvironmentConfiguration } from \"./environments/environment-configuration\";\r\n\r\n//API\r\nexport const BASE_URL: string = getEnvironmentConfiguration().ApiEndpoint;\r\nexport const MERCHANTS_URL: string = BASE_URL + 'Merchant';\r\nexport const BUY_URL: string = BASE_URL + 'Voucher/Buy';\r\nexport const REDEEM_URL: string = BASE_URL + 'Voucher/Redeem';\r\nexport const CANCEL_URL: string = BASE_URL + 'Voucher/Cancel';\r\nexport const RESEND_NOTIFICATION_URL: string = BASE_URL + 'Voucher/ResendPaymentNotification';\r\nexport const REDEEM_TIMEOUT_SECONDS: number = 150;\r\n\r\n// Video tutorials\r\nexport const GLOVO_VIDEO: string = 'https://www.youtube.com/embed/68wnmaC4ogs';\r\nexport const GLOVO_PLAY_STORE: string = 'https://play.google.com/store/apps/details?id=com.glovo';\r\nexport const GLOVO_APP_STORE: string = 'https://apps.apple.com/pt/app/glovo-entrega-de-comida-e-mais/id951812684';\r\nexport const GLOVO_APP_GALLERY: string = 'https://appgallery.huawei.com/#/app/C8314317';\r\n\r\nexport const DIGIN_VIDEO: string = 'https://www.youtube.com/embed/A3vZNIweSPQ';\r\nexport const DIGIN_PLAY_STORE: string = 'https://play.google.com/store/apps/details?id=com.outdarelab.zomato';\r\nexport const DIGIN_APP_STORE: string = 'https://apps.apple.com/pt/app/zomato-delivery-takeaway/id1579325286?l=en&fbclid=IwAR2AEwu8enEaTCrWLepiuN5WNG-56as1h38iXaW4IokDrekiuwbYdjUdwyw';\r\nexport const DIGIN_APP_GALLERY: string = 'https://appgallery.huawei.com/#/app/C101529369';\r\n\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\nimport {\r\n BUY_URL,\r\n MERCHANTS_URL,\r\n REDEEM_URL,\r\n REDEEM_TIMEOUT_SECONDS,\r\n RESEND_NOTIFICATION_URL,\r\n CANCEL_URL\r\n} from \"./constants\";\r\nimport { MerchantIdentifier } from \"../enum/merchants\";\r\nimport { AppThunk } from \"./store\";\r\nimport { canTranslateErrorCode, translateErrorCode } from \"./services/errorCodeTranslator\";\r\nimport { SliceStatusResult, SliceStatusResultExtentions } from \"./models/sliceStatusResult\";\r\nimport { merchantIdentifierToName } from \"./hooks/merchantIdentifier\";\r\n\r\nexport interface AvailableMerchants {\r\n name: string;\r\n vouchers: { guid: string; amount: number; count: number }[];\r\n minimumExpirationDays?: number;\r\n id: number;\r\n classAppend: string;\r\n logo: string;\r\n appIcon: string;\r\n sendsVoucherCodes: boolean;\r\n}\r\n\r\nexport interface VoucherState {\r\n status: {\r\n isLoading: boolean;\r\n result: SliceStatusResult;\r\n };\r\n merchants: AvailableMerchants[];\r\n chosenMerchant: AvailableMerchants;\r\n chosenGuid: { guid: string; amount: number };\r\n chosenPaymentId: string;\r\n phoneNumber: string;\r\n purchaseCompleted: { completed: boolean; result: string };\r\n}\r\n\r\nconst initialState: VoucherState = {\r\n status: { isLoading: false, result: { type: \"\", code: \"\", description: \"\" } },\r\n merchants: [],\r\n chosenMerchant: {\r\n name: \"\",\r\n vouchers: [{ guid: \"\", amount: 0, count: 0 }],\r\n id: 0,\r\n classAppend: \"\",\r\n logo: \"\",\r\n appIcon: \"\",\r\n sendsVoucherCodes: false\r\n },\r\n chosenGuid: { guid: \"\", amount: 0 },\r\n chosenPaymentId: \"\",\r\n phoneNumber: \"\",\r\n purchaseCompleted: { completed: false, result: \"\" }\r\n};\r\n\r\nexport const voucherSlice = createSlice({\r\n name: \"voucher\",\r\n initialState,\r\n reducers: {\r\n start: state => {\r\n state.status.isLoading = true;\r\n state.status.result = { type: \"\", code: \"\", description: \"\" };\r\n },\r\n\r\n stop(state, action) {\r\n state.status.isLoading = false;\r\n state.status.result = action.payload;\r\n },\r\n\r\n availableMerchants(state, action) {\r\n state.merchants = action.payload;\r\n },\r\n\r\n merchantChoice(state, action) {\r\n state.chosenMerchant = action.payload;\r\n },\r\n\r\n amountChoice(state, action) {\r\n state.chosenGuid = action.payload;\r\n },\r\n\r\n voucherReservation(state, action) {\r\n state.chosenPaymentId = action.payload;\r\n },\r\n\r\n setPhoneNumber(state, action) {\r\n state.phoneNumber = action.payload;\r\n },\r\n\r\n clearResultStatus: state => {\r\n state.status.result = { type: \"\", code: \"\", description: \"\" };\r\n\r\n },\r\n\r\n completePurchase(state, action) {\r\n state.purchaseCompleted = action.payload;\r\n }\r\n }\r\n});\r\n\r\nexport const fetchMerchants = (): AppThunk => {\r\n return async dispatch => {\r\n dispatch(start());\r\n try {\r\n const response = await fetch(MERCHANTS_URL);\r\n\r\n if (!response.ok) {\r\n throw new Error();\r\n }\r\n const data = await response.json();\r\n\r\n const toKebabCase = function (str: string) {\r\n return str\r\n .replace(/([A-Z])/g, \"-$1\")\r\n .slice(1)\r\n .toLowerCase();\r\n };\r\n\r\n let merchantsList: AvailableMerchants[] = data.map(\r\n (merchant: {\r\n merchantIdentifier: number;\r\n minimumExpirationDays?: number;\r\n vouchers: { guid: string; amount: number; count: number; }[];\r\n sendsVoucherCodes: boolean;\r\n }) => {\r\n let availableMerchant = {\r\n name: merchantIdentifierToName(merchant.merchantIdentifier),\r\n vouchers: merchant.vouchers,\r\n id: merchant.merchantIdentifier,\r\n minimumExpirationDays: merchant.minimumExpirationDays,\r\n classAppend: toKebabCase(\r\n MerchantIdentifier[merchant.merchantIdentifier]\r\n ),\r\n logo: `/assets/logos/${toKebabCase(\r\n MerchantIdentifier[merchant.merchantIdentifier]\r\n )}-logo.svg`,\r\n appIcon: `/assets/app-icons/${toKebabCase(\r\n MerchantIdentifier[merchant.merchantIdentifier]\r\n )}-app.png`,\r\n sendsVoucherCodes: merchant.sendsVoucherCodes\r\n };\r\n return availableMerchant;\r\n }\r\n );\r\n\r\n dispatch(availableMerchants(merchantsList));\r\n dispatch(stop(SliceStatusResultExtentions.succeeded()));\r\n return;\r\n } catch (err) {\r\n dispatch(\r\n stop(translateErrorCode('LOCAL02'))\r\n );\r\n console.log(err);\r\n }\r\n };\r\n};\r\n\r\nlet redeemPoll: NodeJS.Timeout;\r\n\r\nexport const sendVoucherRequest = (requestBody: {\r\n voucherGuid: string;\r\n phoneNumber: string;\r\n}): AppThunk => {\r\n return async dispatch => {\r\n dispatch(start());\r\n try {\r\n const response = await fetch(BUY_URL, {\r\n headers: { \"Content-Type\": \"application/json\", accept: \"text/plain\" },\r\n body: JSON.stringify(requestBody),\r\n method: \"POST\"\r\n });\r\n\r\n if (!response.ok) {\r\n const data = await response.json();\r\n if (canTranslateErrorCode(data.code)) {\r\n dispatch(stop(translateErrorCode(data.code)));\r\n }\r\n else {\r\n dispatch(stop(SliceStatusResultExtentions.failedPayment()));\r\n }\r\n return;\r\n }\r\n\r\n const data = await response.json();\r\n\r\n dispatch(voucherReservation(data.paymentId));\r\n\r\n let attempts: number = 0;\r\n const sleepIntervalSeconds = 5;\r\n const maxAttempts: number = REDEEM_TIMEOUT_SECONDS / sleepIntervalSeconds;\r\n\r\n const redeemRequest = async () => {\r\n const response = await fetch(REDEEM_URL, {\r\n headers: { \"Content-Type\": \"application/json\", accept: \"text/plain\" },\r\n body: JSON.stringify(data),\r\n method: \"POST\"\r\n });\r\n\r\n attempts++;\r\n if (response.ok) {\r\n dispatch(completePurchase({ completed: true, result: \"success\" }));\r\n dispatch(stop(SliceStatusResultExtentions.succeeded()));\r\n clearInterval(redeemPoll);\r\n return;\r\n }\r\n\r\n if (attempts >= maxAttempts) {\r\n dispatch(completePurchase({ completed: true, result: \"failed\" }));\r\n dispatch(stop(SliceStatusResultExtentions.failedPayment()));\r\n clearInterval(redeemPoll);\r\n return;\r\n } else {\r\n const data = await response.json();\r\n\r\n if (data.code === \"PCS103\") {\r\n return;\r\n } else if (canTranslateErrorCode(data.code)) {\r\n dispatch(completePurchase({ completed: true, result: \"failed\" }));\r\n localStorage.removeItem('paymentId');\r\n dispatch(stop(translateErrorCode(data.code)));\r\n clearInterval(redeemPoll);\r\n } else {\r\n dispatch(completePurchase({ completed: true, result: \"failed\" }));\r\n dispatch(stop(SliceStatusResultExtentions.failedPayment()));\r\n clearInterval(redeemPoll);\r\n return;\r\n }\r\n }\r\n };\r\n redeemPoll = setInterval(redeemRequest, sleepIntervalSeconds * 1000);\r\n } catch (err) {\r\n console.log(err);\r\n dispatch(completePurchase({ completed: true, result: \"failed\" }))\r\n dispatch(stop(translateErrorCode(err)));\r\n }\r\n };\r\n};\r\n\r\nexport const cancelPurchase = (requestBody: { paymentId: string }): AppThunk => {\r\n return async dispatch => {\r\n clearInterval(redeemPoll);\r\n dispatch(stop({ type: \"\", code: \"\", description: \"\" }));\r\n try {\r\n const response = await fetch(CANCEL_URL, {\r\n headers: { \"Content-Type\": \"application/json\", accept: \"text/plain\" },\r\n body: JSON.stringify(requestBody),\r\n method: \"POST\"\r\n });\r\n if (!response.ok) {\r\n const data = await response.json();\r\n dispatch(stop({ type: \"error\", code: data.code, description: data.description }));\r\n }\r\n dispatch(completePurchase({ completed: false, result: \"\" }))\r\n dispatch(voucherReservation(\"\"));\r\n dispatch(merchantChoice({\r\n name: \"\",\r\n vouchers: [{ guid: \"\", amount: 0, count: 0 }],\r\n id: 0,\r\n classAppend: \"\",\r\n logo: \"\",\r\n appIcon: \"\"\r\n }));\r\n dispatch(amountChoice({ guid: \"\", amount: 0 }));\r\n\r\n } catch (err) {\r\n dispatch(stop({ type: \"error\", code: err, description: err }));\r\n }\r\n }\r\n}\r\n\r\nexport const resendPaymentNotification = (paymentId: string): AppThunk => {\r\n return async dispatch => {\r\n await fetch(RESEND_NOTIFICATION_URL, {\r\n headers: { \"Content-Type\": \"application/json\", accept: \"text/plain\" },\r\n body: JSON.stringify({ paymentId: paymentId }),\r\n method: \"POST\"\r\n });\r\n }\r\n};\r\n\r\nexport const {\r\n start,\r\n stop,\r\n availableMerchants,\r\n amountChoice,\r\n voucherReservation,\r\n merchantChoice,\r\n setPhoneNumber,\r\n clearResultStatus,\r\n completePurchase\r\n} = voucherSlice.actions;\r\n\r\nexport default voucherSlice.reducer;\r\n","export interface SliceStatusResult {\r\n type: string;\r\n code: string;\r\n description: string;\r\n}\r\n\r\nexport class SliceStatusResultExtentions {\r\n public static succeeded(): SliceStatusResult {\r\n return { type: 'success', code: '', description: '' };\r\n }\r\n\r\n public static failed(code: string, description: string): SliceStatusResult {\r\n return { type: 'error', code: code, description: description };\r\n }\r\n\r\n public static failedPayment(): SliceStatusResult {\r\n return { type: 'failed-payment', code: '', description: '' };\r\n }\r\n}","import { SliceStatusResult, SliceStatusResultExtentions } from \"../models/sliceStatusResult\";\r\n\r\nconst errorCodeTranslations: { [key: string]: string} = {\r\n PCS101: 'O voucher escolhido esgotou.',\r\n LOCAL01: 'Erro Inesperado. Por favor, tente novamente mais tarde.',\r\n LOCAL02: 'Não foram encontrados comerciantes. Por favor, tente novamente mais tarde.'\r\n};\r\n\r\nexport const translateErrorCode = (code: string) : SliceStatusResult => {\r\n const translation: string = errorCodeTranslations[code] || errorCodeTranslations.LOCAL01;\r\n return SliceStatusResultExtentions.failed(code, translation);\r\n}\r\n\r\nexport const canTranslateErrorCode = (code: string): boolean => !!errorCodeTranslations[code];","import { MerchantIdentifier } from \"../../enum/merchants\";\r\n\r\nexport const merchantIdentifierToName = (merchantIdentifier: MerchantIdentifier) => {\r\n switch (merchantIdentifier) {\r\n case MerchantIdentifier.DigIn:\r\n return 'DIGin';\r\n default: return MerchantIdentifier[merchantIdentifier].replace(\r\n /([A-Z])/g,\r\n \" $1\"\r\n ).slice(1);\r\n }\r\n}","import { useEffect } from \"react\";\r\nimport { formatPhoneNumberIntl, isValidPhoneNumber } from \"react-phone-number-input\";\r\nimport { useLocation } from \"react-router-dom\";\r\nimport { useAppDispatch } from \"../../app/hooks\";\r\nimport { setPhoneNumber } from \"../../app/voucherSlice\";\r\n\r\n\r\nconst PhoneNumberGetter = () => {\r\n const dispatch = useAppDispatch();\r\n const location = useLocation();\r\n\r\n useEffect(() => {\r\n getPhoneNumberFromQueryString();\r\n }, [getPhoneNumberFromQueryString])\r\n\r\n function getPhoneNumberFromQueryString() {\r\n const newPhoneNumber = new URLSearchParams(location.search.toLowerCase()).get('phonenumber') || '';\r\n if (isValidPhoneNumber(newPhoneNumber))\r\n dispatch(setPhoneNumber(formatPhoneNumberIntl(newPhoneNumber)));\r\n }\r\n\r\n //getPhoneNumberFromQueryString();\r\n\r\n return null;\r\n};\r\n\r\nexport default PhoneNumberGetter;\r\n","import { GLOVO_VIDEO, GLOVO_PLAY_STORE, GLOVO_APP_STORE, DIGIN_VIDEO, DIGIN_PLAY_STORE, DIGIN_APP_STORE, GLOVO_APP_GALLERY, DIGIN_APP_GALLERY } from '../../app/constants';\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst videoTutorialsLinks = [\r\n {\r\n name: 'Glovo',\r\n video: GLOVO_VIDEO,\r\n playStore: GLOVO_PLAY_STORE,\r\n appStore: GLOVO_APP_STORE,\r\n appGallery: GLOVO_APP_GALLERY,\r\n },\r\n {\r\n name: 'DIGin',\r\n video: DIGIN_VIDEO,\r\n playStore: DIGIN_PLAY_STORE,\r\n appStore: DIGIN_APP_STORE,\r\n appGallery: DIGIN_APP_GALLERY,\r\n },\r\n]\r\n\r\nconst VideoTutorial = (props: { name: string; title: boolean }) => {\r\n const { t } = useTranslation();\r\n\r\n const merchantApp = props.name;\r\n const merchantInfo = videoTutorialsLinks.find(merchant => merchant.name === merchantApp);\r\n const video = merchantInfo?.video;\r\n const playStore = merchantInfo?.playStore;\r\n const appStore = merchantInfo?.appStore;\r\n const appGallery = merchantInfo?.appGallery;\r\n\r\n if (!merchantInfo) return null;\r\n \r\n return (\r\n
\r\n {props.title && \r\n
\r\n {t(\"video.title\")}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n
\r\n {t(\"video.download\")}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n};\r\n\r\nexport default VideoTutorial;\r\n","import VideoTutorial from \"../../components/VideoTutorial/VideoTutorial\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst Tutorials = () => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n

{t(\"home.howToUse\")}

\r\n
\r\n
\r\n

\r\n {t(\"home.glovoApp\")}\r\n

\r\n \r\n
\r\n
\r\n

\r\n {t(\"home.digInApp\")}\r\n

\r\n \r\n
\r\n
\r\n \r\n {t(\"home.buyVoucher\")}\r\n \"\"\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Tutorials;\r\n","import { useHistory } from \"react-router-dom\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst MerchantOption = (props: {\r\n key: number;\r\n merchantClass: string;\r\n logo: string;\r\n name: string;\r\n onChooseMerchant: () => void;\r\n}) => {\r\n const { t } = useTranslation();\r\n\r\n const history = useHistory();\r\n\r\n const onMerchantClick = () => {\r\n props.onChooseMerchant();\r\n history.push(\"/choose-amount\");\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {t(\"buy\")}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MerchantOption;\r\n","const Loading = (props: { content: string }) => {\r\n return (\r\n
\r\n
\r\n
 
\r\n
 
\r\n
 
\r\n
 
\r\n
\r\n

{props.content}

\r\n
\r\n );\r\n};\r\n\r\nexport default Loading;\r\n","import MerchantOption from \"../../components/MerchantOption/MerchantOption\";\r\nimport { useAppSelector, useAppDispatch } from \"../../app/hooks\";\r\nimport { fetchMerchants } from \"../../app/voucherSlice\";\r\nimport { merchantChoice } from \"../../app/voucherSlice\";\r\nimport { useEffect } from \"react\";\r\nimport Loading from \"../../components/Loading/Loading\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport i18n from \"../../i18n\";\r\n\r\n\r\nconst BuyVoucher = () => {\r\n const { t } = useTranslation();\r\n\r\n const currentLanguage = i18n.language.slice(0, 2);\r\n\r\n const dispatch = useAppDispatch();\r\n const merchants = useAppSelector(state => state.voucher.merchants);\r\n const loading = useAppSelector(state => state.voucher.status.isLoading);\r\n const status = useAppSelector(state => state.voucher.status.result);\r\n\r\n const error = status.type === \"error\";\r\n const errorMessage = status.description;\r\n\r\n useEffect(\r\n () => {\r\n dispatch(fetchMerchants());\r\n },\r\n [dispatch]\r\n );\r\n\r\n const selectMerchant = (id: number) => {\r\n const chosenMerchant = merchants.find(merchant => merchant.id === id);\r\n dispatch(merchantChoice(chosenMerchant));\r\n };\r\n\r\n return (\r\n
\r\n\r\n

{t(\"home.title\")}

\r\n

\r\n {t(\"home.description\")}\r\n \r\n  {t(\"home.howItWorks\")}\r\n \r\n

\r\n
\r\n {loading && (\r\n \r\n )}\r\n\r\n {!loading && error && (\r\n

{errorMessage}

\r\n )}\r\n\r\n {!loading && !error && (\r\n merchants.map(merchant => (\r\n selectMerchant(merchant.id)}\r\n />\r\n ))\r\n )}\r\n
\r\n
\r\n {t(\"moreSoon\")}/\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default BuyVoucher;\r\n","import { useTranslation } from \"react-i18next\";\r\n\r\nconst StepCard = (props: {\r\n key: string;\r\n illustration: string;\r\n stepNumber: number;\r\n title: string;\r\n paragraph: string;\r\n}) => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n \r\n
\r\n

{t(\"step\")}{props.stepNumber}

\r\n

{props.title}

\r\n

{props.paragraph}

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default StepCard;\r\n","import StepCard from \"../../components/Steps/StepCard\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport i18n from \"../../i18n\";\r\n\r\nconst stepsContent = [\r\n {\r\n id: \"step-1\",\r\n illustration: \"assets/illustrations/step-1.svg\",\r\n stepNumber: 1,\r\n titlePT: \"Escolha a app\",\r\n titleEN: \"Choose the app\",\r\n paragraphPT: \"Escolha a app sobre a qual gostaria de obter um voucher.\",\r\n paragraphEN:\"Choose the app you would like to get a voucher for.\"\r\n },\r\n {\r\n id: \"step-2\",\r\n illustration: \"assets/illustrations/step-2.svg\",\r\n stepNumber: 2,\r\n titlePT: \"Escolha o valor\",\r\n titleEN: \"Choose the amount\",\r\n paragraphPT: \"Escolha o valor do voucher que deseja obter.\",\r\n paragraphEN: \"Choose the voucher amount you want to get \"\r\n },\r\n {\r\n id: \"step-3\",\r\n illustration: \"assets/illustrations/step-3.svg\",\r\n stepNumber: 3,\r\n titlePT: \"Insira o seu número\",\r\n titleEN: \"Enter your number\",\r\n paragraphPT:\r\n \"Para concluir a compra, insira o número de telemóvel da sua conta My Ticket® e aceite o pagamento.\",\r\n paragraphEN: \"To complete the purchase, enter your My Ticket® account mobile number and accept payment. \"\r\n },\r\n {\r\n id: \"step-4\",\r\n illustration: \"assets/illustrations/step-4.svg\",\r\n stepNumber: 4,\r\n titlePT: \"Utilize o voucher\",\r\n titleEN: \"Use the voucher\",\r\n paragraphPT:\r\n \"Clique no link ou utilize o código gerado na app que escolheu. O valor do voucher já está disponível!\",\r\n paragraphEN: \"Click on the link or use the code generated in the app you chose. The amount is now available! \"\r\n }\r\n];\r\n\r\nconst HowItWorks = () => {\r\n const { t } = useTranslation();\r\n const currentLanguage = i18n.language.slice(0, 2);\r\n\r\n return (\r\n
\r\n

{t(\"home.howItWorks\")}

\r\n

{t(\"home.stepsTitle\")}

\r\n {stepsContent.map(step => (\r\n \r\n ))}\r\n \r\n {t(\"home.buyVoucher\")}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default HowItWorks;\r\n","import { Fragment } from \"react\";\r\nimport PhoneNumberGetter from \"./PhoneNumberGetter\";\r\nimport Tutorials from \"./Tutorials\";\r\nimport BuyVoucher from \"./BuyVoucher\";\r\nimport HowItWorks from \"./HowItWorks\";\r\n\r\n\r\nconst Home = () => {\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Home;\r\n","import { Link } from 'react-router-dom';\r\nimport i18n from \"../../i18n\";\r\n\r\nconst AmountOption = (props: {\r\n key: string;\r\n merchantClass: string;\r\n logo: string;\r\n name: string;\r\n amount: number;\r\n count: number;\r\n onChooseAmount: () => void;\r\n\r\n}) => {\r\n const currentLanguage = i18n.language.slice(0, 2);\r\n\r\n const active = props.count > 0;\r\n\r\n const onChooseAmount = () => {\r\n if (active) props.onChooseAmount();\r\n }\r\n\r\n const linkClass = active\r\n ? \"amount__option\"\r\n : `amount__option disabled-${currentLanguage}`\r\n\r\n return (\r\n \r\n
\r\n {`${props.name}`}\r\n
\r\n
\r\n

{props.amount},00 €

\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AmountOption;\r\n","import { useHistory } from \"react-router-dom\";\r\n\r\n\r\nconst PurchaseFlowHeader = (props: { header: string }) => {\r\n const history = useHistory();\r\n const goBackHandle = () => {\r\n history.goBack();\r\n }\r\n\r\n return (\r\n
\r\n \r\n \"\"\r\n \r\n

{ props.header }

\r\n
\r\n );\r\n};\r\n\r\nexport default PurchaseFlowHeader;\r\n","import AmountOption from \"../../components/AmountOption/AmountOption\";\r\nimport { amountChoice } from \"../../app/voucherSlice\";\r\nimport { useAppSelector, useAppDispatch } from \"../../app/hooks\";\r\nimport PurchaseFlowHeader from \"../../layout/PurchaseFlowHeader/PurchaseFlowHeader\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst ChooseAmount = () => {\r\n const { t } = useTranslation();\r\n\r\n const chosenMerchant = useAppSelector(\r\n state => state.voucher.chosenMerchant\r\n );\r\n const dispatch = useAppDispatch();\r\n\r\n const selectAmount = (voucher: { guid: string; amount: number }) => {\r\n dispatch(amountChoice(voucher));\r\n };\r\n\r\n if (!chosenMerchant.id) return ;\r\n\r\n return (\r\n
\r\n
\r\n \r\n {chosenMerchant.vouchers.map(voucher => (\r\n \r\n selectAmount({\r\n guid: voucher.guid,\r\n amount: voucher.amount\r\n })\r\n }\r\n />\r\n ))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ChooseAmount;\r\n","import { useTranslation } from \"react-i18next\";\r\n\r\nconst PurchaseSummary = (props: {\r\n icon: string;\r\n name: string;\r\n amount: number;\r\n}) => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n
\r\n

App

\r\n

{t(\"confirm.voucherAmount\")}

\r\n
\r\n\r\n
\r\n
\r\n \r\n

{props.name}

\r\n
\r\n

{props.amount},00 €

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default PurchaseSummary;\r\n","const Alert = (props: { message: string, type?: string }) => {\r\n return (\r\n
\r\n

{props.message}

\r\n
\r\n );\r\n};\r\n\r\nexport default Alert;\r\n","const Checkbox = (props: {\r\n label: string;\r\n checkHandler: (e: React.ChangeEvent) => void;\r\n checkboxType: string\r\n}) => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Checkbox;\r\n","import { useAppSelector, useAppDispatch } from \"../../app/hooks\";\r\nimport React, { Fragment, useState } from \"react\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport PhoneInput, { parsePhoneNumber } from \"react-phone-number-input\";\r\nimport { isPossiblePhoneNumber } from \"react-phone-number-input\";\r\nimport \"react-phone-number-input/style.css\";\r\nimport { sendVoucherRequest, setPhoneNumber } from \"../../app/voucherSlice\";\r\nimport PurchaseSummary from \"./PurchaseSummary\";\r\nimport PurchaseFlowHeader from \"../../layout/PurchaseFlowHeader/PurchaseFlowHeader\";\r\nimport Alert from \"../../components/Alerts/Alert\";\r\nimport Checkbox from \"../../components/Checkbox/Checkbox\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst ChooseAmount = () => {\r\n const { t } = useTranslation();\r\n\r\n const chosenMerchant = useAppSelector(state => state.voucher.chosenMerchant);\r\n const chosenVoucher = useAppSelector(state => state.voucher.chosenGuid);\r\n const phoneNumber = useAppSelector(state => state.voucher.phoneNumber);\r\n const expirationDate = useAppSelector(state => state.voucher.chosenMerchant.minimumExpirationDays);\r\n\r\n const name = chosenMerchant.name;\r\n\r\n const [numberIsValid, setNumberIsValid] = useState(false);\r\n const [wasTouched, setWasTouched] = useState(false);\r\n const [expirationIsChecked, setExpirationIsChecked] = useState();\r\n const [redeemIsChecked, setRedeemIsChecked] = useState();\r\n const dispatch = useAppDispatch();\r\n const history = useHistory();\r\n\r\n const expirationCheckboxHandler = (e: React.ChangeEvent) => {\r\n setExpirationIsChecked(e.target.checked);\r\n }\r\n\r\n const redeemCheckboxHandler = (e: React.ChangeEvent) => {\r\n setRedeemIsChecked(e.target.checked);\r\n }\r\n\r\n const submitHandler = (e: React.FormEvent) => {\r\n e.preventDefault();\r\n setNumberIsValid(isPossiblePhoneNumber(phoneNumber));\r\n\r\n if (isPossiblePhoneNumber(phoneNumber)) {\r\n if (\r\n (expirationDate && !expirationIsChecked) ||\r\n (chosenMerchant.name === 'DIGin' && !redeemIsChecked) ||\r\n (chosenMerchant.name === 'A Marmita' && !redeemIsChecked)\r\n ) {\r\n setWasTouched(true);\r\n return;\r\n }\r\n dispatch(\r\n sendVoucherRequest({\r\n voucherGuid: chosenVoucher.guid,\r\n phoneNumber: parsePhoneNumber(phoneNumber)?.number || '',\r\n })\r\n );\r\n history.replace(\"/purchase-result\");\r\n } else {\r\n setWasTouched(true);\r\n }\r\n };\r\n\r\n const onPhoneNumberChange = (value: string) => {\r\n dispatch(setPhoneNumber(value));\r\n }\r\n\r\n if (!chosenMerchant.id)\r\n return \r\n\r\n\r\n return (\r\n
\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n

\r\n {t(\"confirm.descriptionFirst\")}\r\n My Ticket®\r\n {t(\"confirm.descriptionSecond\")}

\r\n
\r\n \r\n {wasTouched && !numberIsValid && }\r\n\r\n {expirationDate &&\r\n \r\n \r\n {wasTouched && !expirationIsChecked && }\r\n \r\n }\r\n\r\n {chosenMerchant.name === 'DIGin' &&\r\n \r\n \r\n {wasTouched && !redeemIsChecked && }\r\n \r\n }\r\n\r\n {chosenMerchant.name === 'A Marmita' &&\r\n \r\n \r\n {wasTouched && !redeemIsChecked && }\r\n \r\n }\r\n\r\n (\"confirm.buyVoucher\")}\r\n className=\"primary-button w-100 mt-7\"\r\n />\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ChooseAmount;\r\n","import { Fragment, useState, useEffect } from \"react\";\r\nimport { Redirect, useHistory } from \"react-router-dom\";\r\nimport { useAppSelector } from \"../../app/hooks\";\r\nimport VideoTutorial from \"../../components/VideoTutorial/VideoTutorial\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst Success = () => {\r\n const { t } = useTranslation();\r\n\r\n const chosenMerchant = useAppSelector(\r\n state => state.voucher.chosenMerchant\r\n );\r\n const purchaseStatus = useAppSelector(\r\n state => state.voucher.purchaseCompleted\r\n );\r\n const history = useHistory();\r\n const purchaseCompleted = purchaseStatus.completed;\r\n const purchaseResult = purchaseStatus.result;\r\n\r\n const name = chosenMerchant.name;\r\n\r\n useEffect(() => {\r\n window.addEventListener(\"popstate\", () => {\r\n history.replace(\"/\");\r\n });\r\n return () => {\r\n window.removeEventListener(\"popstate\", () => {\r\n history.replace(\"/\");\r\n });\r\n };\r\n }, []);\r\n\r\n if (purchaseResult === \"failed\" || !purchaseCompleted)\r\n return ;\r\n\r\n return chosenMerchant.sendsVoucherCodes ? (\r\n \r\n \r\n

{t(\"result.successSendTitle\")}

\r\n\r\n

{t(\"result.successSendDescription\", { name })}

\r\n\r\n \r\n
\r\n ) : (\r\n \r\n \r\n

{t(\"result.successTitle\")}

\r\n\r\n

{t(\"result.successDescription\", { name })}

\r\n\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Success;\r\n","import { Fragment } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport Alert from \"../../components/Alerts/Alert\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst Error = (props: { message: string }) => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n \r\n

{t(\"result.errorTitle\")}

\r\n

{t(\"result.errorDescription\")}

\r\n \r\n {t(\"result.back\")}\r\n
\r\n );\r\n};\r\n\r\nexport default Error;\r\n","import { useState } from \"react\";\r\nimport { useAppDispatch, useAppSelector } from \"../../app/hooks\";\r\nimport { resendPaymentNotification } from \"../../app/voucherSlice\";\r\nimport Alert from \"../Alerts/Alert\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst AcceptanceTutorial = () => {\r\n const { t } = useTranslation();\r\n\r\n const dispatch = useAppDispatch();\r\n const chosenPaymentId = useAppSelector(state => state.voucher.chosenPaymentId);\r\n\r\n const [resendingNotification, setResendingNotification] = useState(false);\r\n\r\n const onResentPaymentNotification = () => {\r\n if (resendingNotification)\r\n return;\r\n\r\n dispatch(resendPaymentNotification(chosenPaymentId));\r\n setResendingNotification(true);\r\n setTimeout(() => { setResendingNotification(false) }, 5000);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n 1\r\n

{t(\"tutorial.step1\")}MyTicket®

\r\n
\r\n
\r\n 2\r\n

{t(\"tutorial.step2\")}

\r\n
\r\n
\r\n
\r\n

{t(\"tutorial.didNotReceive\")}

\r\n \r\n {resendingNotification && }\r\n
\r\n
\r\n
\r\n \"\"\r\n

{t(\"tutorial.important\")}

\r\n
\r\n

\r\n {t(\"tutorial.importantDescriptionPt1\")}\r\n Ticket Restaurant Mobile®\r\n {t(\"tutorial.importantDescriptionPt2\")}\r\n

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default AcceptanceTutorial;\r\n","import Loading from \"../../components/Loading/Loading\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst ConfirmationModal = (props: {\r\n onStay: () => void;\r\n onCancel: () => void;\r\n isLoading: boolean;\r\n}) => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

{t(\"result.modalTitle\")}

\r\n

{t(\"result.modalDescription\")}

\r\n \r\n {t(\"result.modalStay\")}\r\n \r\n \r\n {t(\"result.modalCancel\")}\r\n \r\n {props.isLoading && }\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ConfirmationModal;\r\n","import { Fragment, useEffect, useState } from \"react\";\r\nimport { useAppDispatch, useAppSelector } from \"../../app/hooks\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { completePurchase, cancelPurchase, voucherReservation } from \"../../app/voucherSlice\";\r\nimport Loading from \"../../components/Loading/Loading\";\r\nimport AcceptanceTutorial from \"../../components/AcceptanceTutorial/AcceptanceTutorial\";\r\nimport ConfirmationModal from \"./ConfirmationModal\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst SendingRequest = () => {\r\n const { t } = useTranslation();\r\n\r\n const chosenPaymentId = useAppSelector(state => state.voucher.chosenPaymentId);\r\n const dispatch = useAppDispatch();\r\n const history = useHistory();\r\n const [modalIsShowing, setModalIsShowing] = useState(false);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const purchaseIsCanceled = useAppSelector(state => state.voucher.purchaseCompleted.result);\r\n\r\n const onBackPage = (event: any) => {\r\n event.preventDefault();\r\n setModalIsShowing(true);\r\n window.history.pushState(null, \"\", window.location.pathname);\r\n };\r\n\r\n const onChangePage = (event: any) => {\r\n event.preventDefault();\r\n dispatch(completePurchase({ completed: false, result: \"canceled\" }))\r\n dispatch(cancelPurchase({ paymentId: chosenPaymentId }));\r\n dispatch(voucherReservation(\"\"));\r\n history.replace('/');\r\n return null;\r\n }\r\n\r\n const sendCancelRequest = () => {\r\n dispatch(completePurchase({ completed: false, result: \"canceled\" }))\r\n setIsLoading(true);\r\n if (chosenPaymentId.length > 0) {\r\n dispatch(cancelPurchase({ paymentId: chosenPaymentId }));\r\n setIsLoading(false);\r\n dispatch(voucherReservation(\"\"));\r\n history.replace('/');\r\n }\r\n \r\n }\r\n\r\n const hideModal = () => {\r\n setModalIsShowing(false);\r\n }\r\n\r\n useEffect(() => {\r\n if (purchaseIsCanceled === 'canceled') {\r\n sendCancelRequest()\r\n };\r\n window.history.pushState(null, \"\", window.location.pathname);\r\n window.addEventListener('popstate', onBackPage);\r\n window.addEventListener('beforeunload', onChangePage, { capture: true });\r\n \r\n return () => {\r\n window.removeEventListener('beforeunload', onChangePage, { capture: true });\r\n window.removeEventListener('popstate', onBackPage);\r\n\r\n }\r\n\r\n }, [chosenPaymentId, purchaseIsCanceled]);\r\n\r\n return (\r\n \r\n {modalIsShowing && }\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SendingRequest;\r\n","import { Fragment, useEffect } from \"react\";\r\nimport { Link, useHistory } from \"react-router-dom\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst FailedPayment = () => {\r\n const { t } = useTranslation();\r\n\r\n const history = useHistory();\r\n useEffect(() => {\r\n window.addEventListener('popstate', () => { history.replace(\"/\") });\r\n return () => {\r\n window.removeEventListener('popstate', () => { history.replace(\"/\") });\r\n };\r\n }, []);\r\n\r\n return (\r\n \r\n

{t(\"result.failedTitle\")}

\r\n

{t(\"result.failedDescription\")}

\r\n {t(\"result.back\")}\r\n
\r\n );\r\n};\r\n\r\nexport default FailedPayment;\r\n","import { useAppSelector } from \"../../app/hooks\";\r\nimport Success from \"./Success\";\r\nimport Error from \"./Error\";\r\nimport SendingRequest from \"./SendingRequest\";\r\nimport FailedPayment from \"./FailedPayment\";\r\nimport { Fragment } from \"react\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport Navbar from \"../../layout/Navigation/Navbar\";\r\n\r\nconst PurchaseResult = () => {\r\n const loading = useAppSelector(state => state.voucher.status.isLoading);\r\n const chosenGuid = useAppSelector(state => state.voucher.chosenGuid);\r\n const status = useAppSelector(state => state.voucher.status.result.type);\r\n const errorMessage = useAppSelector(\r\n state => state.voucher.status.result.description\r\n );\r\n\r\n const success = status === \"success\";\r\n const error = status === \"error\";\r\n const failedPayment = status === \"failed-payment\";\r\n\r\n if (!chosenGuid.guid) return ;\r\n\r\n return (\r\n \r\n {!loading && }\r\n
\r\n
\r\n {loading && }\r\n {success && }\r\n {error && }\r\n {failedPayment && }\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default PurchaseResult;\r\n","import { useEffect } from 'react';\r\nimport { getEnvironmentConfiguration } from '../../app/environments/environment-configuration';\r\n\r\nconst GoogleAnalytics = () => {\r\n const apiConfiguration = getEnvironmentConfiguration();\r\n\r\n const appendScript = (scriptToAppend: string) => {\r\n const script = document.createElement(\"script\");\r\n script.src = scriptToAppend;\r\n script.async = true;\r\n document.body.appendChild(script);\r\n }\r\n\r\n useEffect(() => {\r\n if (apiConfiguration.GoogleAnalyticsKey) {\r\n appendScript(`https://www.googletagmanager.com/gtag/js?id=${apiConfiguration.GoogleAnalyticsKey}`);\r\n const script = document.createElement(\"script\");\r\n script.text = `window.dataLayer = window.dataLayer || [];\r\nfunction gtag(){dataLayer.push(arguments);}\r\ngtag('js', new Date());\r\ngtag('config', '${apiConfiguration.GoogleAnalyticsKey}');`;\r\n document.body.appendChild(script);\r\n }\r\n });\r\n \r\n\r\n return null;\r\n};\r\n\r\nexport default GoogleAnalytics;\r\n","import { useEffect } from 'react';\r\nimport { getEnvironmentConfiguration } from '../../app/environments/environment-configuration';\r\n\r\nconst SmartLook = () => {\r\n const environmentConfiguration = getEnvironmentConfiguration();\r\n\r\n useEffect(() => {\r\n if (environmentConfiguration.SmartLookKey) {\r\n const script = document.createElement(\"script\");\r\n script.text = `\r\n window.smartlook||(function(d) {\r\n var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];\r\n var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';\r\n c.charset='utf-8';c.src='https://rec.smartlook.com/recorder.js';h.appendChild(c);\r\n })(document);\r\n smartlook('init', '${environmentConfiguration.SmartLookKey}');`;\r\n\r\n document.body.appendChild(script);\r\n }\r\n },[]);\r\n\r\n return null;\r\n};\r\n\r\nexport default SmartLook;\r\n","import { Suspense } from \"react\";\r\nimport { Redirect, Route, Switch } from \"react-router-dom\";\r\nimport \"./App.scss\";\r\nimport Footer from \"./components/Footer/Footer\";\r\nimport Navbar from \"./layout/Navigation/Navbar\";\r\nimport Home from \"./pages/Home/Home\";\r\nimport ChooseAmount from \"./pages/ChooseAmount/ChooseAmount\";\r\nimport Confirm from \"./pages/Confirm/Confirm\";\r\nimport PurchaseResult from \"./pages/PurchaseResult/PurchaseResult\";\r\nimport GoogleAnalytics from \"./components/GoogleAnalytics/GoogleAnalytics\";\r\nimport SmartLook from \"./components/SmartLook/SmartLook\";\r\nimport Loading from \"./components/Loading/Loading\";\r\n\r\nfunction App() {\r\n return (\r\n \r\n \r\n
}>\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n