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BCAlWM,EAAOC,QAAU,EAAjB,M,kBCAAD,EAAOC,QAAU,EAAjB,M,kBCAAD,EAAOC,QAAU,EAAjB,M,kBCAAD,EAAOC,QAAU,EAAjB,K","sources":["webpack://pcloud-site/./src/components/ModalManager/Containers/ExitIntentLifetimeSecureStorage.js","webpack://pcloud-site/./src/components/ModalManager/hooks/useModalManager.js","webpack://pcloud-site/./node_modules/clsx/dist/clsx.m.js","webpack://pcloud-site/./node_modules/@babel/runtime-corejs2/core-js/array/from.js","webpack://pcloud-site/./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js","webpack://pcloud-site/./node_modules/@babel/runtime-corejs2/core-js/symbol.js","webpack://pcloud-site/./node_modules/@babel/runtime-corejs2/core-js/symbol/iterator.js"],"sourcesContent":["import React, {useEffect, useState} from \"react\";\nimport useModalManager from \"../hooks/useModalManager\";\nimport {\n CloseBtn, Content,\n ModalHolder, ModalInner,\n ModalWrap,\n ModalWrapper\n} from \"../styles\";\nimport styled from \"styled-components\";\nimport {rcookie, setcookie} from \"@pcloud/web-utilities/dist/lib/utils\";\n\ntype Props = {\n closeInstance: () => void,\n options: Object\n};\n\nconst ExitIntentLifetimeSecureStorage = ({\n closeInstance = () => {},\n options = {},\n}: Props) => {\n const [modalIsActive, setModalIsActive] = useState(false);\n\n const {\n show,\n onClose\n } = useModalManager({\n closeInstance,\n animated: false,\n disablePreventScroll: true\n });\n\n useEffect(() => {\n if (modalIsActive) {\n document.body.classList.add('overlayed');\n }\n }, [modalIsActive]);\n\n // Watch about needed for exit intent modal\n useEffect(() => {\n document.onmouseout = (e) => {\n // If this is an autocomplete element.\n if (e.target && e.target.tagName && e.target.tagName.toLowerCase() === \"input\") {\n return;\n }\n\n // Get the current viewport width.\n const vpWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n\n // If the current mouse X position is within 50px of the right edge of the viewport, return.\n if (e.clientX >= (vpWidth - 50)) {\n return;\n }\n\n // If the current mouse Y position is not within 50px of the top edge of the viewport, return.\n if (e.clientY >= 50) {\n return;\n }\n\n if (modalIsActive || options.preventExitIntentFromShowing()) {\n return;\n }\n\n if (!rcookie(\"openedExitIntentModal\")) {\n setcookie(\"openedExitIntentModal\", true, 1);\n\n setModalIsActive(true);\n // if (typeof ga4 == 'function') {\n // ga4({\n // eventname: \"view_promotion\",\n // ecommerce: {\n // items: [{\n // promotion_name: getPromoParam(\"label\") || currentPageClass,\n // creative_slot: \"exit_intent\",\n // item_id: getPromoParam(\"channelid\") || \"\",\n // affiliation: rcookie(\"ref\")\n // }]\n // }\n // });\n // }\n }\n\n };\n\n return () => {\n document.onmouseout = () => {};\n }\n }, []);\n\n const getCurrencyValue = () => {\n let latestCurrency;\n if (typeof (Storage) !== 'undefined') {\n if (sessionStorage.pclCurrency) {\n latestCurrency = sessionStorage.pclCurrency;\n }\n }\n if (!latestCurrency) {\n return '$';\n }\n\n return signToCurrency[latestCurrency];\n };\n\n const clickHandler = () => {\n // if (typeof ga4 == 'function') {\n // ga4({\n // eventname: \"select_promotion\",\n // ecommerce: {\n // items: [{\n // promotion_name: getPromoParam(\"label\") || currentPageClass,\n // creative_slot: \"exit_intent\",\n // item_id: getPromoParam(\"channelid\") || \"\",\n // affiliation: $.cookie('ref')\n // }]\n // }\n // });\n // }\n $.cookie('refcode', 'kZQq2Q7Z5agbk8PEmUfU92zhrecORhEhbNqV');\n }\n\n if (!show || !modalIsActive) {\n return null;\n }\n\n return (\n \n \n \n \n \n {__(\"dont_leave_good_thing_behind\")}\n {__(\"exit_intent_monthly_explore_pcloud\")}\n \n {__(\"plan_name_1\")}\n {getCurrencyValue()} 4.99 / {__(\"month\")}\n \n \n \n 500{__(\"GB\")}\n \n \n \n {__(\"exit_intent_monthly_start_now\")}\n \n \n {\n setModalIsActive(false);\n onClose();\n }} />\n \n \n \n \n )\n}\n\nexport default ExitIntentLifetimeSecureStorage;\n\nconst ModalInnerExt = styled(ModalInner)`\n width: 100%;\n max-width: 720px;\n box-sizing: border-box;\n text-align: center;\n border-radius: 25px;\n -webkit-box-shadow: 0 8px 30px rgba(0,0,0,0.2);\n -moz-box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);\n box-shadow: 0 8px 30px rgba(0,0,0,0.2);\n`;\n\nconst closeBtnExtImg = (typeof cdnPath !== 'undefined' ? cdnPath : '/') + 'images/rounded_close.png';\nconst CloseBtnExt = styled(CloseBtn)`\n width: 36px;\n height: 36px;\n padding: 20px 20px 0 0;\n background: url(${closeBtnExtImg}) left bottom no-repeat;\n background-size: 36px;\n`;\n\nconst Button = styled.a`\n display: table;\n font-size: 17px;\n font-weight: 500;\n min-width: 240px;\n margin: 30px auto 15px auto;\n padding: 0 10px;\n text-transform: uppercase;\n height: 44px;\n line-height: 44px;\n border-radius: 22px;\n background: none;\n background-color: #17bed0;\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.07);\n box-shadow: 0 1px 1px rgba(0,0,0,0.07);\n`;\n\nconst Title = styled.div`\n font-size: 30px;\n font-weight: 500;\n letter-spacing: -0.7px;\n margin: 15px 0 0 0;\n`;\n\nconst SubTitle = styled.div`\n font-size: 20px;\n margin: 8px 0 0 0;\n letter-spacing: -0.5px;\n color: #17bed0;\n`;\n\nconst PlanInfo = styled.div`\n display: inline-block;\n margin-top: 30px;\n width: 545px;\n text-align: left;\n text-indent: 5px;\n font-family: \"Roboto\", sans-serif;\n font-size: 20px;\n color: #000;\n`;\n\nconst PlanName = styled.div`\n display: inline-block;\n margin-right: 15px;\n font-family: \"Roboto\", sans-serif;\n font-size: 21px;\n font-weight: bold;\n text-transform: uppercase;\n color: #17bed0;\n`;\n\nconst BarCont = styled.div`\n width: 545px;\n height: 40px;\n line-height: 40px;\n border-radius: 25px;\n border: solid 0.5px #17bed0;\n background-color: #f9f9f9;\n text-align: left;\n margin: 5px auto 0 auto;\n`;\n\nconst BarFill = styled.div`display: inline-block;\n text-align: center;\n min-width: 139.5px;\n height: 40px;\n line-height: 40px;\n background-image: linear-gradient(to right, #17bed0, #2aacee);\n font-family: \"Roboto\", sans-serif;\n font-size: 22px;\n font-weight: bold;\n color: #fff;\n border-radius: 25px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n`;","import {useState, useEffect, useRef} from 'react';\n\nconst useModalManager = ({animated = false, closeInstance = () => {}, disablePreventScroll = false}) => {\n const [show, setShow] = useState(false);\n\n useEffect(() => {\n setShow(true);\n if (!disablePreventScroll) {\n document.body.classList.add('overlayed');\n }\n }, []);\n\n const onClose = () => {\n setShow(false);\n document.body.classList.remove('overlayed');\n if (!animated) {\n closeInstance();\n }\n }\n\n return {\n show,\n onClose\n }\n}\n\nexport default useModalManager;","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t