{"version":3,"sources":["redux/auth/actions.js","helpers/Utils.js","redux/contants.js","components/common/react-notifications/Notification.js","components/common/react-notifications/Notifications.js","components/common/react-notifications/NotificationManager.js","components/common/react-notifications/NotificationContainer.js","firebase.js","index.js","constants/defaultValues.js","assets/css/sass/themes lazy /^/gogo/..*/.scss$/ groupOptions: {} namespace object","redux/settings/reducer.js","redux/menu/reducer.js","redux/auth/reducer.js","redux/reducers.js","redux/auth/saga.js","redux/sagas.js","redux/store.js","reportWebVitals.js","AppRenderer.js"],"names":["loginUserSuccess","user","type","LOGIN_USER_SUCCESS","payload","loginUserError","message","LOGIN_USER_ERROR","forgotPasswordSuccess","forgotUserMail","FORGOT_PASSWORD_SUCCESS","forgotPasswordError","FORGOT_PASSWORD_ERROR","resetPassword","_ref","resetPasswordCode","newPassword","history","RESET_PASSWORD","resetPasswordSuccess","RESET_PASSWORD_SUCCESS","resetPasswordError","RESET_PASSWORD_ERROR","registerUserSuccess","REGISTER_USER_SUCCESS","registerUserError","REGISTER_USER_ERROR","logoutUser","LOGOUT_USER","getDirection","direction","defaultDirection","localStorage","getItem","localValue","error","console","log","isRtl","setDirection","setItem","getCurrentColor","currentColor","defaultColor","themeColorStorageKey","setCurrentColor","color","setCurrentRadius","radius","themeRadiusStorageKey","getCurrentLanguage","language","defaultLocale","localeOptions","filter","x","id","length","setCurrentLanguage","locale","getCurrentUser","JSON","parse","setCurrentUser","stringify","service","removeItem","CHANGE_LOCALE","LOGIN_USER","REGISTER_USER","FORGOT_PASSWORD","MENU_SET_CLASSNAMES","MENU_CONTAINER_ADD_CLASSNAME","MENU_CLICK_MOBILE_MENU","MENU_CHANGE_DEFAULT_CLASSES","MENU_CHANGE_HAS_SUB_ITEM_STATUS","Notification","title","customClassName","timeOut","onClick","onRequestHide","requestHide","useEffect","timer","setTimeout","clearTimeout","className","classnames","concat","titleHtml","_jsx","children","_jsxs","role","defaultProps","Notifications","React","Component","constructor","arguments","handleRequestHide","notification","this","props","render","notifications","enterTimeout","leaveTimeout","TransitionGroup","map","key","Date","getTime","CSSTransition","classNames","timeout","exit","enter","Constants","NotificationManager","EventEmitter","super","listNotify","create","notify","defaultNotify","replace","c","r","Math","random","toString","priority","unshift","Object","assign","push","emitChange","primary","secondary","info","success","warning","remove","n","emit","addChangeListener","callback","addListener","removeChangeListener","removeListener","NotificationContainer","componentWillUnmount","handleStoreChange","setState","state","app","initializeApp","apiKey","authDomain","projectId","storageBucket","messagingSenderId","appId","measurementId","messaging","Capacitor","isNativePlatform","getMessaging","requestForToken","async","PushNotifications","requestPermissions","register","Promise","resolve","reject","token","value","getToken","vapidKey","showWebNotification","window","requestPermission","then","permission","body","icon","listenForMessages","showAndroidAlert","onMessage","isMultiColorActive","isDarkSwitchActive","require","UserRole","defaultMenuType","subHiddenBreakpoint","menuHiddenBreakpoint","name","adminRoot","buyUrl","currentUser","img","date","userData","userRole","getRole","isAuthGuardActive","webpackAsyncContext","req","__webpack_require__","o","e","Error","code","ids","t","keys","module","exports","INIT_STATE","containerClassnames","menuClickCount","selectedMenuHasSubItems","loading","reducers","combineReducers","menu","undefined","action","settings","authUser","watchLoginUser","takeEvery","loginWithEmailPassword","loginWithEmailPasswordAsync","email","password","auth","signInWithEmailAndPassword","catch","loginUser","call","put","item","uid","watchRegisterUser","registerWithEmailPassword","registerWithEmailPasswordAsync","createUserWithEmailAndPassword","_ref2","registerUser","watchLogoutUser","logout","logoutAsync","signOut","_ref3","watchForgotPassword","forgotPassword","forgotPasswordAsync","sendPasswordResetEmail","_ref4","forgotPasswordStatus","watchResetPassword","resetPasswordAsync","confirmPasswordReset","_ref5","resetPasswordStatus","rootSaga","all","fork","authSagas","sagaMiddleware","createSagaMiddleware","middlewares","configureStore","initialState","store","createStore","compose","applyMiddleware","run","sagas","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","App","lazy","Main","script","document","createElement","gtag","dataLayer","src","head","appendChild","Provider","Suspense","fallback","translate","ReactDOM","getElementById"],"mappings":"gHAAA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XnN,qBAAU,KACR,MAAMoN,EAASC,SAASC,cAAc,UAMtC,SAASC,IACPC,UAAUlK,KAAKrC,UACjB,CAPAmM,EAAOK,IAAM,2DACbL,EAAO5H,OAAQ,EACf6H,SAASK,KAAKC,YAAYP,GAE1BhH,OAAOoH,UAAYpH,OAAOoH,WAAa,GAIvCD,EAAK,KAAM,IAAI1L,MACf0L,EAAK,SAAU,gBAEfA,EAAK,QAAS,kBAAmB,CAC/B,GAGF7G,aAAmB,GAClB,IAGDlG,cAACoN,IAAQ,CAACzB,MAAOF,IAAiBxL,SAChCD,cAACqN,WAAQ,CAACC,SAAUtN,cAAA,OAAKJ,UAAU,YAAaK,SAC9CD,cAAA,OAAKJ,UAAU,QAAQ2N,UAAU,KAAItN,SACnCD,cAACyM,EAAG,WAgBde,IAAS1M,OAAOd,cAAC2M,EAAI,IAAKE,SAASY,eAAe,SAKlDxB,G","file":"static/js/main.dd3c5dfb.chunk.js","sourcesContent":["import {\r\n LOGIN_USER,\r\n LOGIN_USER_SUCCESS,\r\n LOGOUT_USER,\r\n REGISTER_USER,\r\n REGISTER_USER_SUCCESS,\r\n LOGIN_USER_ERROR,\r\n REGISTER_USER_ERROR,\r\n FORGOT_PASSWORD,\r\n FORGOT_PASSWORD_SUCCESS,\r\n FORGOT_PASSWORD_ERROR,\r\n RESET_PASSWORD,\r\n RESET_PASSWORD_SUCCESS,\r\n RESET_PASSWORD_ERROR,\r\n} from '../contants';\r\n\r\nexport const loginUser = (user, history) => ({\r\n type: LOGIN_USER,\r\n payload: { user, history },\r\n});\r\nexport const loginUserSuccess = (user) => ({\r\n type: LOGIN_USER_SUCCESS,\r\n payload: user,\r\n});\r\nexport const loginUserError = (message) => ({\r\n type: LOGIN_USER_ERROR,\r\n payload: { message },\r\n});\r\n\r\nexport const forgotPassword = (forgotUserMail, history) => ({\r\n type: FORGOT_PASSWORD,\r\n payload: { forgotUserMail, history },\r\n});\r\nexport const forgotPasswordSuccess = (forgotUserMail) => ({\r\n type: FORGOT_PASSWORD_SUCCESS,\r\n payload: forgotUserMail,\r\n});\r\nexport const forgotPasswordError = (message) => ({\r\n type: FORGOT_PASSWORD_ERROR,\r\n payload: { message },\r\n});\r\n\r\nexport const resetPassword = ({ resetPasswordCode, newPassword, history }) => ({\r\n type: RESET_PASSWORD,\r\n payload: { resetPasswordCode, newPassword, history },\r\n});\r\nexport const resetPasswordSuccess = (newPassword) => ({\r\n type: RESET_PASSWORD_SUCCESS,\r\n payload: newPassword,\r\n});\r\nexport const resetPasswordError = (message) => ({\r\n type: RESET_PASSWORD_ERROR,\r\n payload: { message },\r\n});\r\n\r\nexport const registerUser = (user, history) => ({\r\n type: REGISTER_USER,\r\n payload: { user, history },\r\n});\r\nexport const registerUserSuccess = (user) => ({\r\n type: REGISTER_USER_SUCCESS,\r\n payload: user,\r\n});\r\nexport const registerUserError = (message) => ({\r\n type: REGISTER_USER_ERROR,\r\n payload: { message },\r\n});\r\n\r\nexport const logoutUser = (history) => ({\r\n type: LOGOUT_USER,\r\n payload: { history },\r\n});\r\n","/* eslint-disable */\r\nimport {\r\n defaultDirection,\r\n defaultLocale,\r\n defaultColor,\r\n localeOptions,\r\n themeColorStorageKey,\r\n themeRadiusStorageKey,\r\n} from 'constants/defaultValues';\r\n\r\nexport const mapOrder = (array, order, key) => {\r\n // eslint-disable-next-line func-names\r\n array.sort(function (a, b) {\r\n const A = a[key];\r\n const B = b[key];\r\n if (order.indexOf(`${A}`) > order.indexOf(`${B}`)) {\r\n return 1;\r\n }\r\n return -1;\r\n });\r\n return array;\r\n};\r\n\r\nexport const getDateWithFormat = () => {\r\n const today = new Date();\r\n let dd = today.getDate();\r\n let mm = today.getMonth() + 1; // January is 0!\r\n\r\n const yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = `0${dd}`;\r\n }\r\n if (mm < 10) {\r\n mm = `0${mm}`;\r\n }\r\n return `${dd}.${mm}.${yyyy}`;\r\n};\r\n\r\nexport const getCurrentTime = () => {\r\n const now = new Date();\r\n return `${now.getHours()}:${now.getMinutes()}`;\r\n};\r\n\r\nexport const getDirection = () => {\r\n let direction = defaultDirection;\r\n\r\n try {\r\n if (localStorage.getItem('direction')) {\r\n const localValue = localStorage.getItem('direction');\r\n if (localValue === 'rtl' || localValue === 'ltr') {\r\n direction = localValue;\r\n }\r\n }\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : getDirection -> error', error);\r\n direction = defaultDirection;\r\n }\r\n return {\r\n direction,\r\n isRtl: direction === 'rtl',\r\n };\r\n};\r\nexport const setDirection = (localValue) => {\r\n let direction = 'ltr';\r\n if (localValue === 'rtl' || localValue === 'ltr') {\r\n direction = localValue;\r\n }\r\n try {\r\n localStorage.setItem('direction', direction);\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : setDirection -> error', error);\r\n }\r\n};\r\n\r\nexport const getCurrentColor = () => {\r\n let currentColor = defaultColor;\r\n try {\r\n if (localStorage.getItem(themeColorStorageKey)) {\r\n currentColor = localStorage.getItem(themeColorStorageKey);\r\n }\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : getCurrentColor -> error', error);\r\n currentColor = defaultColor;\r\n }\r\n return currentColor;\r\n};\r\n\r\nexport const setCurrentColor = (color) => {\r\n try {\r\n localStorage.setItem(themeColorStorageKey, color);\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : setCurrentColor -> error', error);\r\n }\r\n};\r\n\r\nexport const getCurrentRadius = () => {\r\n let currentRadius = 'rounded';\r\n try {\r\n if (localStorage.getItem(themeRadiusStorageKey)) {\r\n currentRadius = localStorage.getItem(themeRadiusStorageKey);\r\n }\r\n } catch (error) {\r\n console.log(\r\n '>>>>: src/helpers/Utils.js : getCurrentRadius -> error',\r\n error\r\n );\r\n currentRadius = 'rounded';\r\n }\r\n return currentRadius;\r\n};\r\nexport const setCurrentRadius = (radius) => {\r\n try {\r\n localStorage.setItem(themeRadiusStorageKey, radius);\r\n } catch (error) {\r\n console.log(\r\n '>>>>: src/helpers/Utils.js : setCurrentRadius -> error',\r\n error\r\n );\r\n }\r\n};\r\n\r\nexport const getCurrentLanguage = () => {\r\n let language = defaultLocale;\r\n try {\r\n language =\r\n localStorage.getItem('currentLanguage') &&\r\n localeOptions.filter(\r\n (x) => x.id === localStorage.getItem('currentLanguage')\r\n ).length > 0\r\n ? localStorage.getItem('currentLanguage')\r\n : defaultLocale;\r\n } catch (error) {\r\n console.log(\r\n '>>>>: src/helpers/Utils.js : getCurrentLanguage -> error',\r\n error\r\n );\r\n language = defaultLocale;\r\n }\r\n return language;\r\n};\r\nexport const setCurrentLanguage = (locale) => {\r\n try {\r\n //localStorage.setItem('currentLanguage', locale);\r\n localStorage.setItem('currentLanguage', 'es');\r\n } catch (error) {\r\n console.log(\r\n '>>>>: src/helpers/Utils.js : setCurrentLanguage -> error',\r\n error\r\n );\r\n }\r\n};\r\n\r\nexport const getCurrentUser = () => {\r\n let user = null;\r\n try {\r\n user =\r\n localStorage.getItem('gogo_current_user') != null\r\n ? JSON.parse(localStorage.getItem('gogo_current_user'))\r\n : null;\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : getCurrentUser -> error', error);\r\n user = null;\r\n }\r\n return user;\r\n};\r\n\r\nexport const setCurrentUser = (user) => {\r\n try {\r\n if (user) {\r\n localStorage.setItem('gogo_current_user', JSON.stringify(user));\r\n localStorage.setItem('role', JSON.stringify(user.service));\r\n } else {\r\n localStorage.removeItem('gogo_current_user');\r\n localStorage.removeItem('role');\r\n }\r\n } catch (error) {\r\n console.log('>>>>: src/helpers/Utils.js : setCurrentUser -> error', error);\r\n }\r\n};\r\n","/* SETTINGS */\r\nexport const CHANGE_LOCALE = 'CHANGE_LOCALE';\r\n\r\n/* AUTH */\r\nexport const LOGIN_USER = 'LOGIN_USER';\r\nexport const LOGIN_USER_SUCCESS = 'LOGIN_USER_SUCCESS';\r\nexport const LOGIN_USER_ERROR = 'LOGIN_USER_ERROR';\r\nexport const REGISTER_USER = 'REGISTER_USER';\r\nexport const REGISTER_USER_SUCCESS = 'REGISTER_USER_SUCCESS';\r\nexport const REGISTER_USER_ERROR = 'REGISTER_USER_ERROR';\r\nexport const LOGOUT_USER = 'LOGOUT_USER';\r\nexport const FORGOT_PASSWORD = 'FORGOT_PASSWORD';\r\nexport const FORGOT_PASSWORD_SUCCESS = 'FORGOT_PASSWORD_SUCCESS';\r\nexport const FORGOT_PASSWORD_ERROR = 'FORGOT_PASSWORD_ERROR';\r\nexport const RESET_PASSWORD = 'RESET_PASSWORD';\r\nexport const RESET_PASSWORD_SUCCESS = 'RESET_PASSWORD_SUCCESS';\r\nexport const RESET_PASSWORD_ERROR = 'RESET_PASSWORD_ERROR';\r\n\r\n/* MENU */\r\nexport const MENU_SET_CLASSNAMES = 'MENU_SET_CLASSNAMES';\r\nexport const MENU_CONTAINER_ADD_CLASSNAME = 'MENU_CONTAINER_ADD_CLASSNAME';\r\nexport const MENU_CLICK_MOBILE_MENU = 'MENU_CLICK_MOBILE_MENU';\r\nexport const MENU_CHANGE_DEFAULT_CLASSES = 'MENU_CHANGE_DEFAULT_CLASSES';\r\nexport const MENU_CHANGE_HAS_SUB_ITEM_STATUS =\r\n 'MENU_CHANGE_HAS_SUB_ITEM_STATUS';\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable jsx-a11y/click-events-have-key-events */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nconst Notification = ({\r\n title,\r\n type,\r\n message,\r\n customClassName,\r\n timeOut,\r\n onClick,\r\n onRequestHide,\r\n}) => {\r\n const requestHide = () => {\r\n if (onRequestHide) {\r\n onRequestHide();\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n let timer = null;\r\n if (timeOut !== 0) {\r\n timer = setTimeout(requestHide, timeOut);\r\n }\r\n return () => {\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n };\r\n }, []);\r\n\r\n const handleClick = () => {\r\n if (onClick) {\r\n onClick();\r\n }\r\n requestHide();\r\n };\r\n\r\n const className = classnames([\r\n 'notification',\r\n `notification-${type}`,\r\n customClassName,\r\n ]);\r\n const titleHtml = title ? <h4 className=\"title\">{title}</h4> : null;\r\n return (\r\n <div className={className} onClick={() => handleClick()}>\r\n <div className=\"notification-message\" role=\"alert\">\r\n {titleHtml}\r\n <div className=\"message\">{message}</div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nNotification.propTypes = {\r\n type: PropTypes.oneOf([\r\n 'info',\r\n 'success',\r\n 'warning',\r\n 'error',\r\n 'primary',\r\n 'secondary',\r\n ]),\r\n title: PropTypes.node,\r\n message: PropTypes.node,\r\n timeOut: PropTypes.number,\r\n onClick: PropTypes.func,\r\n onRequestHide: PropTypes.func,\r\n customClassName: PropTypes.string,\r\n};\r\n\r\nNotification.defaultProps = {\r\n type: 'info',\r\n title: null,\r\n message: null,\r\n timeOut: 5000,\r\n onClick: () => {},\r\n onRequestHide: () => {},\r\n customClassName: '',\r\n};\r\n\r\nexport default Notification;\r\n","/* eslint-disable react/forbid-prop-types */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TransitionGroup, CSSTransition } from 'react-transition-group';\r\nimport classnames from 'classnames';\r\nimport Notification from './Notification';\r\n\r\nclass Notifications extends React.Component {\r\n handleRequestHide = (notification) => () => {\r\n const { onRequestHide } = this.props;\r\n if (onRequestHide) {\r\n onRequestHide(notification);\r\n }\r\n };\r\n\r\n render() {\r\n const { notifications, enterTimeout, leaveTimeout } = this.props;\r\n const className = classnames('notification-container', {\r\n 'notification-container-empty': notifications.length === 0,\r\n });\r\n return (\r\n <div className={className}>\r\n <TransitionGroup>\r\n {notifications.map((notification) => {\r\n const key = notification.id || new Date().getTime();\r\n return (\r\n <CSSTransition\r\n classNames=\"notification\"\r\n key={key}\r\n timeout={{ exit: leaveTimeout, enter: enterTimeout }}\r\n >\r\n <Notification\r\n key={key}\r\n type={notification.type}\r\n title={notification.title}\r\n message={notification.message}\r\n timeOut={notification.timeOut}\r\n onClick={notification.onClick}\r\n onRequestHide={this.handleRequestHide(notification)}\r\n customClassName={notification.customClassName}\r\n />\r\n </CSSTransition>\r\n );\r\n })}\r\n </TransitionGroup>\r\n </div>\r\n );\r\n }\r\n}\r\nNotifications.propTypes = {\r\n notifications: PropTypes.array,\r\n onRequestHide: PropTypes.func,\r\n enterTimeout: PropTypes.number,\r\n leaveTimeout: PropTypes.number,\r\n};\r\n\r\nNotifications.defaultProps = {\r\n notifications: [],\r\n onRequestHide: () => {},\r\n enterTimeout: 400,\r\n leaveTimeout: 400,\r\n};\r\nexport default Notifications;\r\n","/* eslint-disable no-bitwise */\r\nimport { EventEmitter } from 'events';\r\n\r\nconst createUUID = () => {\r\n const pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\r\n return pattern.replace(/[xy]/g, (c) => {\r\n const r = (Math.random() * 16) | 0;\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n};\r\n\r\nconst Constants = {\r\n CHANGE: 'change',\r\n PRIMARY: 'primary',\r\n SECONDARY: 'secondary',\r\n INFO: 'info',\r\n SUCCESS: 'success',\r\n WARNING: 'warning',\r\n ERROR: 'error',\r\n};\r\n\r\nclass NotificationManager extends EventEmitter {\r\n constructor() {\r\n super();\r\n this.listNotify = [];\r\n }\r\n\r\n create(notify) {\r\n const defaultNotify = {\r\n id: createUUID(),\r\n type: 'info',\r\n title: null,\r\n message: null,\r\n timeOut: 5000,\r\n customClassName: '',\r\n };\r\n if (notify.priority) {\r\n this.listNotify.unshift(Object.assign(defaultNotify, notify));\r\n } else {\r\n this.listNotify.push(Object.assign(defaultNotify, notify));\r\n }\r\n this.emitChange();\r\n }\r\n\r\n primary(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.PRIMARY,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n secondary(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.SECONDARY,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n info(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.INFO,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n success(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.SUCCESS,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n warning(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.WARNING,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n error(message, title, timeOut, onClick, priority, customClassName) {\r\n this.create({\r\n type: Constants.ERROR,\r\n message,\r\n title,\r\n timeOut,\r\n onClick,\r\n priority,\r\n customClassName,\r\n });\r\n }\r\n\r\n remove(notification) {\r\n this.listNotify = this.listNotify.filter((n) => notification.id !== n.id);\r\n this.emitChange();\r\n }\r\n\r\n emitChange() {\r\n this.emit(Constants.CHANGE, this.listNotify);\r\n }\r\n\r\n addChangeListener(callback) {\r\n this.addListener(Constants.CHANGE, callback);\r\n }\r\n\r\n removeChangeListener(callback) {\r\n this.removeListener(Constants.CHANGE, callback);\r\n }\r\n}\r\n\r\nexport default new NotificationManager();\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport NotificationManager from './NotificationManager';\r\nimport Notifications from './Notifications';\r\n\r\nclass NotificationContainer extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n NotificationManager.addChangeListener(this.handleStoreChange);\r\n this.state = {\r\n notifications: [],\r\n };\r\n }\r\n\r\n componentWillUnmount = () => {\r\n NotificationManager.removeChangeListener(this.handleStoreChange);\r\n };\r\n\r\n handleStoreChange = (notifications) => {\r\n this.setState({\r\n notifications,\r\n });\r\n };\r\n\r\n handleRequestHide = (notification) => {\r\n NotificationManager.remove(notification);\r\n };\r\n\r\n render() {\r\n const { notifications } = this.state;\r\n const { enterTimeout, leaveTimeout } = this.props;\r\n return (\r\n <Notifications\r\n enterTimeout={enterTimeout}\r\n leaveTimeout={leaveTimeout}\r\n notifications={notifications}\r\n onRequestHide={this.handleRequestHide}\r\n />\r\n );\r\n }\r\n}\r\n\r\nNotificationContainer.propTypes = {\r\n enterTimeout: PropTypes.number,\r\n leaveTimeout: PropTypes.number,\r\n};\r\n\r\nNotificationContainer.defaultProps = {\r\n enterTimeout: 400,\r\n leaveTimeout: 400,\r\n};\r\n\r\nexport default NotificationContainer;\r\n","// Import the functions you need from the SDKs you need\r\n// prettier-ignore\r\n/* eslint-disable prettier/prettier */\r\n// firebase.js\r\nimport { initializeApp } from 'firebase/app';\r\nimport { getMessaging, getToken, onMessage } from 'firebase/messaging';\r\n// Importa getAnalytics solo si estás utilizando Google Analytics\r\nimport { Capacitor } from '@capacitor/core';\r\nimport { PushNotifications } from '@capacitor/push-notifications';\r\nimport { NotificationManager } from 'components/common/react-notifications';\r\n\r\nconst firebaseConfig = {\r\n apiKey: 'AIzaSyDXpIqhIdM4O4_Na2z0-B8-rxLXdF8mUxI',\r\n authDomain: 'cpxapp-320623.firebaseapp.com',\r\n projectId: 'cpxapp-320623',\r\n storageBucket: 'cpxapp-320623.appspot.com',\r\n messagingSenderId: '705212848261',\r\n appId: '1:705212848261:web:f1737324529f5b37e2b1ec',\r\n measurementId: 'G-CN4EPY7K9B', // Solo si utilizas Google Analytics\r\n};\r\n\r\n// Inicializa Firebase\r\nconst app = initializeApp(firebaseConfig);\r\n// Inicializa Firebase Cloud Messaging solo si estás en web\r\nlet messaging;\r\nif (!Capacitor.isNativePlatform()) {\r\n messaging = getMessaging(app);\r\n}\r\n\r\n// Si usas Google Analytics, inicializa aquÃ\r\n\r\n// Solicitar el token para las notificaciones\r\nexport const requestForToken = async () => {\r\n try {\r\n if (Capacitor.isNativePlatform()) {\r\n // Si es Android, usa Capacitor para obtener el token\r\n await PushNotifications.requestPermissions();\r\n await PushNotifications.register();\r\n \r\n return new Promise((resolve, reject) => {\r\n PushNotifications.addListener('registration', (token) => {\r\n /* console.log('Token de registro en Android: ', token.value); */\r\n resolve(token.value); // Resuelve la promesa con el token\r\n });\r\n \r\n PushNotifications.addListener('registrationError', (error) => {\r\n console.error('Error al registrar en Android: ', error);\r\n reject(error); // Rechaza la promesa en caso de error\r\n });\r\n });\r\n } \r\n const token = await getToken(messaging, { vapidKey: 'BAmSlRdPUXRE4FS3UUowBcPQQ-gSBY7uRyox7YkOXr-diG99WK64KdALceiJnqz-xAnhVGaV3-XwixImXprcSLA' });\r\n /* console.log('Token de registro en Web: ', token); */\r\n return token;\r\n } catch (error) {\r\n console.error('Error al obtener el token en android wcampos:', error);\r\n return null;\r\n }\r\n};\r\n\r\nconst showWebNotification = (notification) => {\r\n // Verificar si el navegador soporta notificaciones\r\n if (\"Notification\" in window) {\r\n // Solicitar permiso para notificaciones si no está concedido\r\n Notification.requestPermission().then((permission) => {\r\n if (permission === \"granted\") {\r\n // Mostrar la notificación\r\n // eslint-disable-next-line no-new\r\n new Notification(notification.title, {\r\n body: notification.body,\r\n icon: '/icon.png' // Puedes reemplazar con tu propio Ãcono\r\n });\r\n } else {\r\n console.log(\"Permiso de notificación denegado\");\r\n }\r\n });\r\n } else {\r\n console.log(\"Este navegador no soporta notificaciones.\");\r\n }\r\n};\r\n// Mostrar alerta para Android\r\nconst showAndroidAlert = (notification) => {\r\n // Mostrar una alerta simple con el tÃtulo y el cuerpo de la notificación\r\n NotificationManager.success(`${notification.title}\\n${notification.body}`, \"\", 5000, null, null, 'filled');\r\n};\r\n// Escuchar mensajes en primer plano\r\nexport const listenForMessages = () => {\r\n if (!Capacitor.isNativePlatform()) {\r\n onMessage(messaging, (payload) => {\r\n /* console.log('Mensaje recibido en Web: Escuchar mensajes en primer plano', payload); */\r\n // Aquà puedes manejar la notificación en la UI\r\n if (payload.notification) {\r\n showWebNotification(payload.notification);\r\n }\r\n });\r\n } else {\r\n // Aquà puedes manejar las notificaciones de Android si es necesario\r\n // Aquà manejamos las notificaciones de Android\r\n PushNotifications.addListener('pushNotificationReceived', (notification) => {\r\n console.log('Notificación recibida en Android: Escuchar mensajes en primer plano', notification);\r\n // Mostrar alerta en Android\r\n if (notification.title && notification.body) {\r\n showAndroidAlert(notification);\r\n }\r\n });\r\n }\r\n};\r\n\r\nexport const onMessageListener = () =>\r\n new Promise((resolve) => {\r\n if (!Capacitor.isNativePlatform()) {\r\n onMessage(messaging, (payload) => {\r\n console.log(\"Mensaje recibido en Web: \", payload);\r\n // Mostrar notificación en la UI\r\n if (payload.notification) {\r\n showWebNotification(payload.notification);\r\n }\r\n resolve(payload);\r\n });\r\n } else {\r\n PushNotifications.addListener('pushNotificationReceived', (notification) => {\r\n console.log('Notificación recibida en Android: ', notification);\r\n resolve(notification);\r\n });\r\n }\r\n });\r\n","/* eslint-disable */\r\nimport './assets/css/vendor/bootstrap.min.css';\r\nimport './assets/css/vendor/bootstrap.rtl.only.min.css';\r\nimport 'react-circular-progressbar/dist/styles.css';\r\nimport 'react-perfect-scrollbar/dist/css/styles.css';\r\nimport 'react-big-calendar/lib/css/react-big-calendar.css';\r\nimport 'react-image-lightbox/style.css';\r\nimport 'video.js/dist/video-js.css';\r\nimport {\r\n isMultiColorActive,\r\n defaultColor,\r\n isDarkSwitchActive,\r\n} from './constants/defaultValues';\r\nimport { getCurrentColor, setCurrentColor } from './helpers/Utils';\r\n\r\nconst color =\r\n isMultiColorActive || isDarkSwitchActive ? getCurrentColor() : defaultColor;\r\nsetCurrentColor(color);\r\n\r\nconst render = () => {\r\n import(`./assets/css/sass/themes/gogo.${color}.scss`).then(() => {\r\n require('./AppRenderer');\r\n });\r\n};\r\nrender();\r\n","/* eslint-disable */\r\nexport const UserRole = {\r\n Admin: 0,\r\n Editor: 1,\r\n BBO: 2,\r\n BBPLUS: 3,\r\n OTHER: 4,\r\n};\r\n\r\n/*\r\nMenu Types:\r\n\"menu-default\", \"menu-sub-hidden\", \"menu-hidden\"\r\n*/\r\nexport const defaultMenuType = 'menu-default';\r\n\r\nexport const subHiddenBreakpoint = 1440;\r\nexport const menuHiddenBreakpoint = 768;\r\nexport const defaultLocale = 'es';\r\nexport const localeOptions = [\r\n { id: 'es', name: 'Español', direction: 'ltr' },\r\n { id: 'en', name: 'English', direction: 'ltr' },\r\n // { id: 'en', name: 'English - LTR', direction: 'ltr' },\r\n // { id: 'enrtl', name: 'English - RTL', direction: 'rtl' },\r\n];\r\n\r\nexport const firebaseConfig = {\r\n apiKey: 'AIzaSyBBksq-Asxq2M4Ot-75X19IyrEYJqNBPcg',\r\n authDomain: 'gogo-react-login.firebaseapp.com',\r\n databaseURL: 'https://gogo-react-login.firebaseio.com',\r\n projectId: 'gogo-react-login',\r\n storageBucket: 'gogo-react-login.appspot.com',\r\n messagingSenderId: '216495999563',\r\n};\r\n\r\nexport const adminRoot = '/app';\r\nexport const buyUrl = 'https://1.envato.market/k4z0';\r\nexport const searchPath = `${adminRoot}/#`;\r\nexport const servicePath = 'https://api.coloredstrategies.com';\r\n\r\nfunction getRole() {\r\n const userData = localStorage.getItem('gogo_current_user');\r\n if (userData) {\r\n const { service } = JSON.parse(userData);\r\n\r\n let userRole = UserRole.OTHER;\r\n switch (service) {\r\n case 'BBO':\r\n userRole = UserRole.BBO;\r\n break;\r\n case 'BBPLUS':\r\n userRole = UserRole.BBPLUS;\r\n break;\r\n default:\r\n userRole = UserRole.OTHER;\r\n }\r\n return userRole;\r\n }\r\n return UserRole.OTHER;\r\n}\r\n\r\nexport const currentUser = {\r\n id: 1,\r\n title: 'Sarah Kortney',\r\n img: '/assets/img/profiles/l-1.jpg',\r\n date: 'Last seen today 15:24',\r\n role: getRole(),\r\n};\r\n\r\nexport const themeColorStorageKey = '__theme_selected_color';\r\nexport const isMultiColorActive = true;\r\nexport const defaultColor = 'light.orangecarrot';\r\nexport const isDarkSwitchActive = true;\r\nexport const defaultDirection = 'ltr';\r\nexport const themeRadiusStorageKey = '__theme_radius';\r\nexport const isAuthGuardActive = true;\r\nexport const colors = [\r\n 'bluenavy',\r\n 'blueyale',\r\n 'blueolympic',\r\n 'greenmoss',\r\n 'greenlime',\r\n 'purplemonster',\r\n 'orangecarrot',\r\n 'redruby',\r\n 'yellowgranola',\r\n 'greysteel',\r\n];\r\n","var map = {\n\t\"./gogo.dark.bluenavy.scss\": [\n\t\t65,\n\t\t52\n\t],\n\t\"./gogo.dark.blueolympic.scss\": [\n\t\t66,\n\t\t53\n\t],\n\t\"./gogo.dark.blueyale.scss\": [\n\t\t67,\n\t\t54\n\t],\n\t\"./gogo.dark.greenlime.scss\": [\n\t\t68,\n\t\t55\n\t],\n\t\"./gogo.dark.greenmoss.scss\": [\n\t\t69,\n\t\t56\n\t],\n\t\"./gogo.dark.greysteel.scss\": [\n\t\t70,\n\t\t57\n\t],\n\t\"./gogo.dark.orangecarrot.scss\": [\n\t\t71,\n\t\t58\n\t],\n\t\"./gogo.dark.purplemonster.scss\": [\n\t\t72,\n\t\t59\n\t],\n\t\"./gogo.dark.redruby.scss\": [\n\t\t73,\n\t\t60\n\t],\n\t\"./gogo.dark.yellowgranola.scss\": [\n\t\t74,\n\t\t61\n\t],\n\t\"./gogo.light.bluenavy.scss\": [\n\t\t75,\n\t\t62\n\t],\n\t\"./gogo.light.blueolympic.scss\": [\n\t\t76,\n\t\t63\n\t],\n\t\"./gogo.light.blueyale.scss\": [\n\t\t77,\n\t\t64\n\t],\n\t\"./gogo.light.greenlime.scss\": [\n\t\t78,\n\t\t65\n\t],\n\t\"./gogo.light.greenmoss.scss\": [\n\t\t79,\n\t\t66\n\t],\n\t\"./gogo.light.greysteel.scss\": [\n\t\t80,\n\t\t67\n\t],\n\t\"./gogo.light.orangecarrot.scss\": [\n\t\t81,\n\t\t68\n\t],\n\t\"./gogo.light.purplemonster.scss\": [\n\t\t82,\n\t\t69\n\t],\n\t\"./gogo.light.redruby.scss\": [\n\t\t83,\n\t\t70\n\t],\n\t\"./gogo.light.yellowgranola.scss\": [\n\t\t84,\n\t\t71\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__.t(id, 7);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 55;\nmodule.exports = webpackAsyncContext;","/* eslint-disable */\r\nimport { getCurrentLanguage } from 'helpers/Utils';\r\nimport { CHANGE_LOCALE } from '../contants';\r\n\r\nconst INIT_STATE = {\r\n locale: getCurrentLanguage(),\r\n};\r\n\r\nexport default (state = INIT_STATE, action) => {\r\n switch (action.type) {\r\n case CHANGE_LOCALE:\r\n return { ...state, locale: action.payload };\r\n\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","import {\r\n defaultMenuType,\r\n subHiddenBreakpoint,\r\n menuHiddenBreakpoint,\r\n} from 'constants/defaultValues';\r\nimport {\r\n MENU_SET_CLASSNAMES,\r\n MENU_CONTAINER_ADD_CLASSNAME,\r\n MENU_CLICK_MOBILE_MENU,\r\n MENU_CHANGE_DEFAULT_CLASSES,\r\n MENU_CHANGE_HAS_SUB_ITEM_STATUS,\r\n} from '../contants';\r\n\r\nconst INIT_STATE = {\r\n containerClassnames: defaultMenuType,\r\n subHiddenBreakpoint,\r\n menuHiddenBreakpoint,\r\n menuClickCount: 0,\r\n selectedMenuHasSubItems: defaultMenuType === 'menu-default', // if you use menu-sub-hidden as default menu type, set value of this variable to false\r\n};\r\n\r\nexport default (state = INIT_STATE, action) => {\r\n switch (action.type) {\r\n case MENU_CHANGE_HAS_SUB_ITEM_STATUS:\r\n return { ...state, selectedMenuHasSubItems: action.payload };\r\n\r\n case MENU_SET_CLASSNAMES:\r\n return {\r\n ...state,\r\n containerClassnames: action.payload.containerClassnames,\r\n menuClickCount: action.payload.menuClickCount,\r\n };\r\n\r\n case MENU_CLICK_MOBILE_MENU:\r\n return {\r\n ...state,\r\n containerClassnames: action.payload.containerClassnames,\r\n menuClickCount: action.payload.menuClickCount,\r\n };\r\n\r\n case MENU_CONTAINER_ADD_CLASSNAME:\r\n return { ...state, containerClassnames: action.payload };\r\n\r\n case MENU_CHANGE_DEFAULT_CLASSES:\r\n return { ...state, containerClassnames: action.payload };\r\n\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","/* eslint-disable import/no-unresolved */\r\nimport { getCurrentUser } from 'helpers/Utils';\r\nimport { isAuthGuardActive, currentUser } from 'constants/defaultValues';\r\nimport {\r\n LOGIN_USER,\r\n LOGIN_USER_SUCCESS,\r\n LOGIN_USER_ERROR,\r\n REGISTER_USER,\r\n REGISTER_USER_SUCCESS,\r\n REGISTER_USER_ERROR,\r\n LOGOUT_USER,\r\n FORGOT_PASSWORD,\r\n FORGOT_PASSWORD_SUCCESS,\r\n FORGOT_PASSWORD_ERROR,\r\n RESET_PASSWORD,\r\n RESET_PASSWORD_SUCCESS,\r\n RESET_PASSWORD_ERROR,\r\n} from '../contants';\r\n\r\nconst INIT_STATE = {\r\n currentUser: isAuthGuardActive ? currentUser : getCurrentUser(),\r\n forgotUserMail: '',\r\n newPassword: '',\r\n resetPasswordCode: '',\r\n loading: false,\r\n error: '',\r\n};\r\n\r\nexport default (state = INIT_STATE, action) => {\r\n switch (action.type) {\r\n case LOGIN_USER:\r\n return { ...state, loading: true, error: '' };\r\n case LOGIN_USER_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n currentUser: action.payload,\r\n error: '',\r\n };\r\n case LOGIN_USER_ERROR:\r\n return {\r\n ...state,\r\n loading: false,\r\n currentUser: null,\r\n error: action.payload.message,\r\n };\r\n case FORGOT_PASSWORD:\r\n return { ...state, loading: true, error: '' };\r\n case FORGOT_PASSWORD_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n forgotUserMail: action.payload,\r\n error: '',\r\n };\r\n case FORGOT_PASSWORD_ERROR:\r\n return {\r\n ...state,\r\n loading: false,\r\n forgotUserMail: '',\r\n error: action.payload.message,\r\n };\r\n case RESET_PASSWORD:\r\n return { ...state, loading: true, error: '' };\r\n case RESET_PASSWORD_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n newPassword: action.payload,\r\n resetPasswordCode: '',\r\n error: '',\r\n };\r\n case RESET_PASSWORD_ERROR:\r\n return {\r\n ...state,\r\n loading: false,\r\n newPassword: '',\r\n resetPasswordCode: '',\r\n error: action.payload.message,\r\n };\r\n case REGISTER_USER:\r\n return { ...state, loading: true, error: '' };\r\n case REGISTER_USER_SUCCESS:\r\n return {\r\n ...state,\r\n loading: false,\r\n currentUser: action.payload,\r\n error: '',\r\n };\r\n case REGISTER_USER_ERROR:\r\n return {\r\n ...state,\r\n loading: false,\r\n currentUser: null,\r\n error: action.payload.message,\r\n };\r\n case LOGOUT_USER:\r\n return { ...state, currentUser: null, error: '' };\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport settings from './settings/reducer';\r\nimport menu from './menu/reducer';\r\nimport authUser from './auth/reducer';\r\n\r\nconst reducers = combineReducers({\r\n menu,\r\n settings,\r\n authUser,\r\n});\r\n\r\nexport default reducers;\r\n","/* eslint-disable import/no-unresolved */\r\nimport { all, call, fork, put, takeEvery } from 'redux-saga/effects';\r\nimport { auth } from 'helpers/Firebase';\r\nimport { adminRoot, currentUser } from 'constants/defaultValues';\r\nimport { setCurrentUser } from 'helpers/Utils';\r\nimport {\r\n LOGIN_USER,\r\n REGISTER_USER,\r\n LOGOUT_USER,\r\n FORGOT_PASSWORD,\r\n RESET_PASSWORD,\r\n} from '../contants';\r\n\r\nimport {\r\n loginUserSuccess,\r\n loginUserError,\r\n registerUserSuccess,\r\n registerUserError,\r\n forgotPasswordSuccess,\r\n forgotPasswordError,\r\n resetPasswordSuccess,\r\n resetPasswordError,\r\n} from './actions';\r\n\r\nexport function* watchLoginUser() {\r\n // eslint-disable-next-line no-use-before-define\r\n yield takeEvery(LOGIN_USER, loginWithEmailPassword);\r\n}\r\n\r\nconst loginWithEmailPasswordAsync = async (email, password) =>\r\n // eslint-disable-next-line no-return-await\r\n await auth\r\n .signInWithEmailAndPassword(email, password)\r\n .then((user) => user)\r\n .catch((error) => error);\r\n\r\nfunction* loginWithEmailPassword({ payload }) {\r\n const { email, password } = payload.user;\r\n const { history } = payload;\r\n try {\r\n const loginUser = yield call(loginWithEmailPasswordAsync, email, password);\r\n if (!loginUser.message) {\r\n const item = { uid: loginUser.user.uid, ...currentUser };\r\n setCurrentUser(item);\r\n yield put(loginUserSuccess(item));\r\n history.push(adminRoot);\r\n } else {\r\n yield put(loginUserError(loginUser.message));\r\n }\r\n } catch (error) {\r\n yield put(loginUserError(error));\r\n }\r\n}\r\n\r\nexport function* watchRegisterUser() {\r\n // eslint-disable-next-line no-use-before-define\r\n yield takeEvery(REGISTER_USER, registerWithEmailPassword);\r\n}\r\n\r\nconst registerWithEmailPasswordAsync = async (email, password) =>\r\n // eslint-disable-next-line no-return-await\r\n await auth\r\n .createUserWithEmailAndPassword(email, password)\r\n .then((user) => user)\r\n .catch((error) => error);\r\n\r\nfunction* registerWithEmailPassword({ payload }) {\r\n const { email, password } = payload.user;\r\n const { history } = payload;\r\n try {\r\n const registerUser = yield call(\r\n registerWithEmailPasswordAsync,\r\n email,\r\n password\r\n );\r\n if (!registerUser.message) {\r\n const item = { uid: registerUser.user.uid, ...currentUser };\r\n setCurrentUser(item);\r\n yield put(registerUserSuccess(item));\r\n history.push(adminRoot);\r\n } else {\r\n yield put(registerUserError(registerUser.message));\r\n }\r\n } catch (error) {\r\n yield put(registerUserError(error));\r\n }\r\n}\r\n\r\nexport function* watchLogoutUser() {\r\n // eslint-disable-next-line no-use-before-define\r\n yield takeEvery(LOGOUT_USER, logout);\r\n}\r\n\r\nconst logoutAsync = async (history) => {\r\n await auth\r\n .signOut()\r\n .then((user) => user)\r\n .catch((error) => error);\r\n history.push(adminRoot);\r\n};\r\n\r\nfunction* logout({ payload }) {\r\n const { history } = payload;\r\n setCurrentUser();\r\n yield call(logoutAsync, history);\r\n}\r\n\r\nexport function* watchForgotPassword() {\r\n // eslint-disable-next-line no-use-before-define\r\n yield takeEvery(FORGOT_PASSWORD, forgotPassword);\r\n}\r\n\r\nconst forgotPasswordAsync = async (email) => {\r\n // eslint-disable-next-line no-return-await\r\n return await auth\r\n .sendPasswordResetEmail(email)\r\n .then((user) => user)\r\n .catch((error) => error);\r\n};\r\n\r\nfunction* forgotPassword({ payload }) {\r\n const { email } = payload.forgotUserMail;\r\n try {\r\n const forgotPasswordStatus = yield call(forgotPasswordAsync, email);\r\n if (!forgotPasswordStatus) {\r\n yield put(forgotPasswordSuccess('success'));\r\n } else {\r\n yield put(forgotPasswordError(forgotPasswordStatus.message));\r\n }\r\n } catch (error) {\r\n yield put(forgotPasswordError(error));\r\n }\r\n}\r\n\r\nexport function* watchResetPassword() {\r\n // eslint-disable-next-line no-use-before-define\r\n yield takeEvery(RESET_PASSWORD, resetPassword);\r\n}\r\n\r\nconst resetPasswordAsync = async (resetPasswordCode, newPassword) => {\r\n // eslint-disable-next-line no-return-await\r\n return await auth\r\n .confirmPasswordReset(resetPasswordCode, newPassword)\r\n .then((user) => user)\r\n .catch((error) => error);\r\n};\r\n\r\nfunction* resetPassword({ payload }) {\r\n const { newPassword, resetPasswordCode } = payload;\r\n try {\r\n const resetPasswordStatus = yield call(\r\n resetPasswordAsync,\r\n resetPasswordCode,\r\n newPassword\r\n );\r\n if (!resetPasswordStatus) {\r\n yield put(resetPasswordSuccess('success'));\r\n } else {\r\n yield put(resetPasswordError(resetPasswordStatus.message));\r\n }\r\n } catch (error) {\r\n yield put(resetPasswordError(error));\r\n }\r\n}\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchLoginUser),\r\n fork(watchLogoutUser),\r\n fork(watchRegisterUser),\r\n fork(watchForgotPassword),\r\n fork(watchResetPassword),\r\n ]);\r\n}\r\n","import { all } from 'redux-saga/effects';\r\nimport authSagas from './auth/saga';\r\n\r\nexport default function* rootSaga() {\r\n yield all([authSagas()]);\r\n}\r\n","import { createStore, applyMiddleware, compose } from 'redux';\r\nimport createSagaMiddleware from 'redux-saga';\r\nimport reducers from './reducers';\r\nimport sagas from './sagas';\r\n\r\nconst sagaMiddleware = createSagaMiddleware();\r\n\r\nconst middlewares = [sagaMiddleware];\r\n\r\n// eslint-disable-next-line import/prefer-default-export\r\nexport function configureStore(initialState) {\r\n const store = createStore(\r\n reducers,\r\n initialState,\r\n compose(applyMiddleware(...middlewares))\r\n );\r\n\r\n sagaMiddleware.run(sagas);\r\n\r\n if (module.hot) {\r\n module.hot.accept('./reducers', () => {\r\n // eslint-disable-next-line global-require\r\n const nextRootReducer = require('./reducers');\r\n store.replaceReducer(nextRootReducer);\r\n });\r\n }\r\n\r\n return store;\r\n}\r\n","const reportWebVitals = (onPerfEntry) => {\r\n if (onPerfEntry && onPerfEntry instanceof Function) {\r\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\r\n getCLS(onPerfEntry);\r\n getFID(onPerfEntry);\r\n getFCP(onPerfEntry);\r\n getLCP(onPerfEntry);\r\n getTTFB(onPerfEntry);\r\n });\r\n }\r\n};\r\n\r\nexport default reportWebVitals;\r\n","/* eslint-disable */\r\nimport React, { Suspense, useEffect } from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { configureStore } from './redux/store';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport { listenForMessages } from './firebase';\r\n\r\nconst App = React.lazy(() => import('./App'));\r\n\r\nconst Main = () => {\r\n useEffect(() => {\r\n const script = document.createElement('script');\r\n script.src = 'https://www.googletagmanager.com/gtag/js?id=G-CMR7JRMNKY';\r\n script.async = true;\r\n document.head.appendChild(script);\r\n\r\n window.dataLayer = window.dataLayer || [];\r\n function gtag() {\r\n dataLayer.push(arguments);\r\n }\r\n gtag('js', new Date());\r\n gtag('config', 'G-CMR7JRMNKY');\r\n // Agregar el evento de Google Tag (gtag.js)\r\n gtag('event', 'apertura_piobox', {\r\n // <event_parameters>\r\n }); \r\n //consulta a firebase\r\n listenForMessages();\r\n }, []);\r\n\r\n return (\r\n <Provider store={configureStore()}>\r\n <Suspense fallback={<div className=\"loading\" />}>\r\n <div className=\"h-100\" translate=\"no\">\r\n <App />\r\n </div>\r\n </Suspense>\r\n </Provider>\r\n );\r\n return (\r\n <Provider store={configureStore()}>\r\n <Suspense fallback={<div className=\"loading\" />}>\r\n <div className=\"h-100\" translate=\"no\">\r\n <App />\r\n </div>\r\n </Suspense>\r\n </Provider>\r\n );\r\n};\r\n\r\nReactDOM.render(<Main />, document.getElementById('root'));\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n"],"sourceRoot":""}