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AAC,EAAE,CAAG,MAASA,CAAC,CAAC,EAAE,CAG/C,SAASG,EAAiBC,CAAI,CAAEC,CAAI,EAEzC,IAAMC,EAAOZ,EAASU,GAChBG,EAAOb,EAASW,GAGhBG,EAAaT,EAAaO,CAAI,CAAC,EAAE,CAAEA,CAAI,CAAC,EAAE,CAAEA,CAAI,CAAC,EAAE,EACnDG,EAAaV,EAAaQ,CAAI,CAAC,EAAE,CAAEA,CAAI,CAAC,EAAE,CAAEA,CAAI,CAAC,EAAE,EAMzD,MAAO,CAHIzI,KAAKwF,GAAG,CAACkD,EAAYC,GAGnB,IAAG,EAFL3I,EAEW4I,GAFNrD,GAAG,CAACmD,EAAYC,GAEL,IAAG,AAChC","sources":["webpack://_N_E/?17b1","webpack://_N_E/./src/components/blog/post-body/index.jsx","webpack://_N_E/./src/components/ProfilePage/component/Modal/index.jsx","webpack://_N_E/./src/components/blog/post-modal/index.jsx","webpack://_N_E/./src/components/ProfilePage/Styles/Modal.module.scss?e7bb","webpack://_N_E/./src/styles/MarkdownRenderer.module.scss","webpack://_N_E/./src/constants/general.js","webpack://_N_E/./src/utils/Modal.js","webpack://_N_E/./src/utils/AuthErrors.js","webpack://_N_E/./src/utils/General.js","webpack://_N_E/./src/utils/Upload.js","webpack://_N_E/./src/utils/CustomDomain.js","webpack://_N_E/./src/utils/StoreAdmin.js","webpack://_N_E/./src/utils/Statistics.js","webpack://_N_E/./src/utils/Calendar.js","webpack://_N_E/./src/utils/Colors.js","webpack://_N_E/./src/utils/index.js"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src1503684179/src/downfor-webapp/node_modules/next/dist/client/app-dir/link.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src1503684179/src/downfor-webapp/node_modules/next/dist/client/image-component.js\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/codebuild/output/src1503684179/src/downfor-webapp/src/components/blog/post-body/index.jsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/codebuild/output/src1503684179/src/downfor-webapp/src/components/blog/post-modal/index.jsx\");\n","\"use client\"\n\nimport React, { useEffect, useRef } from 'react';\n\nimport markdownStyles from \"@/styles/MarkdownRenderer.module.scss\";\n\nfunction PostBody({ htmlContent }) {\n const contentRef = useRef(null);\n\n useEffect(() => {\n if (contentRef.current) {\n // Get all anchor tags within the ref's current node\n const anchors = contentRef.current.querySelectorAll('a');\n\n // Add custom attribute to each anchor tag\n anchors.forEach(anchor => {\n anchor.setAttribute('target', '_blank');\n });\n }\n }, [htmlContent]);\n\n return (\n
\n \n
\n );\n}\n\nexport default PostBody;\n","import React, { useEffect, useRef, useState } from \"react\";\nimport { FormattedMessage } from \"react-intl\";\nimport { FaEllipsisVertical } from \"react-icons/fa6\";\n\nimport styles from \"@profileStyles/Modal.module.scss\";\n\nexport default function Modal({\n popup,\n show,\n onClose,\n size,\n noBorder,\n title,\n subTitle,\n children,\n onShare\n}) {\n const [open, setOpen] = useState(false);\n const childRef = useRef(null);\n\n useEffect(() => {\n if (show) {\n document?.body.classList.add(\"no-scroll\");\n } else {\n document?.body.classList.remove(\"no-scroll\");\n }\n\n return () => document?.body.classList.remove(\"no-scroll\");\n }, [show]);\n\n useEffect(() => {\n if (childRef.current) {\n setTimeout(() => {\n setOpen(show);\n }, 200)\n }\n }, [children, show]);\n\n return (\n \n e.stopPropagation()} // Prevent closing when clicking inside\n >\n \n {!!onShare && (\n \n \n \n )}\n {title && (\n

{title}

\n )}\n {subTitle && (\n

{subTitle}

\n )}\n \n \n {children}\n \n {!popup && (\n \n \n \n \n \n )}\n \n \n );\n}\n","\"use client\";\n\nimport { useCallback, useEffect, useState } from \"react\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { usePathname } from 'next/navigation'\n\nimport Modal from \"@/components/ProfilePage/component/Modal\";\nimport { dayDiff } from \"@/utils\";\n\nfunction PostModal() {\n const [modalOpen, setModalOpen] = useState(false);\n const pathname = usePathname();\n\n const modalWasShown = useCallback(() => {\n const modalState = JSON.parse(window.localStorage.getItem(\"blog-modal\")) || {};\n\n if (Object.keys(modalState).includes(pathname)) {\n if (dayDiff(modalState[pathname]) < 1) {\n return true;\n }\n }\n\n window.localStorage.setItem(\"blog-modal\", JSON.stringify({\n ...modalState,\n [pathname]: new Date().toISOString()\n }));\n\n return false;\n }, [pathname]);\n\n useEffect(() => {\n // Create an Intersection Observer\n const observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) {\n observer.unobserve(currentElement);\n if (!modalWasShown()) {\n setModalOpen(true);\n }\n }\n }, { threshold: 0.2 });\n\n // Observe the referenced element\n const currentElement = document?.querySelector(`[alt=\"Signup Now\"]`);\n if (currentElement) {\n observer.observe(currentElement);\n }\n\n // Cleanup the observer when the component unmounts\n return () => {\n if (currentElement) {\n observer.unobserve(currentElement);\n }\n };\n }, [modalWasShown]);\n\n useEffect(() => {\n document?.documentElement.style.setProperty(\"--color-layout-background\", \"#0f1123\");\n document?.documentElement.style.setProperty(\"--color-background\", \"#0f1123\");\n document?.documentElement.style.setProperty(\"--heading\", \"#ffffff\");\n document?.documentElement.style.setProperty(\"--color-text\", \"#ffffff\");\n document?.documentElement.style.setProperty(\"--color-primary\", \"#ffffff\");\n document?.documentElement.style.setProperty(\"--color-secondary\", \"#0f1123\");\n }, [pathname]);\n\n return (\n setModalOpen(false)}\n show={!!modalOpen}\n size=\"md\"\n noBorder\n popup\n >\n \n \n \n \n );\n}\n\nexport default PostModal;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modalOverlay\":\"Modal_modalOverlay__Y0rQ0\",\"visible\":\"Modal_visible__yJtSz\",\"hidden\":\"Modal_hidden__YvmRa\",\"shareButton\":\"Modal_shareButton__dh_8w\",\"modalContent\":\"Modal_modalContent__6JWJE\",\"modalHeader\":\"Modal_modalHeader__xGSld\",\"modalBody\":\"Modal_modalBody__I4Mz9\",\"modalFooter\":\"Modal_modalFooter__jhndY\",\"modalTitle\":\"Modal_modalTitle__gOVU0\",\"modalSubTitle\":\"Modal_modalSubTitle__d5xtR\",\"sx\":\"Modal_sx__f0eWC\",\"md\":\"Modal_md___0wQW\",\"lg\":\"Modal_lg__HK8fg\",\"modalContentNoBorder\":\"Modal_modalContentNoBorder__xjjHF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"preStyle\":\"MarkdownRenderer_preStyle__tCbOD\",\"codeStyle\":\"MarkdownRenderer_codeStyle__kp3TW\",\"pStyle\":\"MarkdownRenderer_pStyle__Hix8L\",\"markdown\":\"MarkdownRenderer_markdown__Wy8Dd\"};","export const googleMapsURL = \"https://www.google.com/maps/search/?api=1&query=\";\n\nexport const measurementID = 'G-LVC4CBVBKM';\nexport const trackingID = 'AW-16662852817';\nexport const clarityId = 'nmuovpuslj';\n\nexport const dynamicManifest = {\n name: ``,\n short_name: ``,\n start_url: `/`,\n display: \"standalone\",\n background_color: \"#ffffff\",\n theme_color: \"#ff5722\",\n icons: [\n {\n src: \"/img/ios/192.png\",\n sizes: \"192x192\",\n type: \"image/png\",\n },\n {\n src: \"/img/ios/512.png\",\n sizes: \"512x512\",\n type: \"image/png\",\n },\n ],\n};\n\nexport const socialMediaDomains = [\n \"facebook.com\",\n \"instagram.com\",\n \"twitter.com\",\n \"linkedin.com\",\n \"tiktok.com\",\n \"pinterest.com\",\n \"snapchat.com\",\n \"reddit.com\",\n \"youtube.com\",\n \"tumblr.com\",\n \"weibo.com\",\n \"vk.com\",\n \"ok.ru\",\n \"xing.com\",\n \"mix.com\",\n \"gab.com\",\n \"mastodon.social\",\n \"flickr.com\",\n \"deviantart.com\",\n \"imgur.com\",\n \"medium.com\",\n \"quora.com\",\n \"vimeo.com\",\n \"dailymotion.com\",\n \"twitch.tv\",\n \"bilibili.com\",\n \"discord.com\",\n \"slack.com\",\n \"whatsapp.com\",\n \"telegram.org\",\n \"signal.org\",\n \"clubhouse.com\",\n \"caffeine.tv\",\n \"beacons.ai\",\n \"substack.com\",\n \"onlyfans.com\"\n];\n\nexport const searchEngineDomains = [\"google.com\", \"bing.com\", \"yahoo.com\"];\n\nexport const confirmEmailTemplateId = \"d-f0565683dafb493486781446ae3c7873\";\n\nexport const modules = {\n CONTENT_LINKS: \"module-order-content-links\",\n CONTENT: 'module-order-content',\n MULTISTREAM: 'module-order-multistream',\n EVENTS: 'module-order-events'\n}\n\nexport const TabSchema = {\n header: \"header\",\n theme: \"theme\",\n modules: {\n content: \"content\",\n links: \"links\",\n events: \"events\",\n multistream: \"multistream\"\n },\n dashboard: \"dashboard\",\n settings: \"settings\",\n}","export const modalTypes = {\n creating: \"CREATE\",\n editing: \"EDIT\",\n duplicating: \"DUPLICATE\"\n};\n\nexport const getModalTitle = (type, intl, intlPrefix, values) => {\n const { creating, editing, duplicating } = modalTypes;\n switch (type) {\n case creating:\n return intl.formatMessage({ id: `${intlPrefix}-create-title` }, values);\n case editing:\n return intl.formatMessage({ id: `${intlPrefix}-edit-title` }, values);\n case duplicating:\n return intl.formatMessage({ id: `${intlPrefix}-duplicate-title` }, values);\n default:\n return intl.formatMessage({ id: `${intlPrefix}-create-title` }, values);\n };\n};\n\nexport const getButtonText = (type, intl, intlPrefix) => {\n const { creating, editing, duplicating } = modalTypes;\n switch (type) {\n case creating:\n return intl.formatMessage({ id: `${intlPrefix}-create-text` });\n case editing:\n return intl.formatMessage({ id: `${intlPrefix}-update-text` });\n case duplicating:\n return intl.formatMessage({ id: `${intlPrefix}-duplicate-text` });\n default:\n return intl.formatMessage({ id: `${intlPrefix}-create-text` });\n };\n};\n","export const handleAuthenticationErrorMessage = (err, intl) => {\n const { error, code } = err || {};\n const errorType = error || code;\n\n switch (errorType) {\n case \"unauthorized\":\n case \"invalid username/password\":\n // Invalid email address or password\n return intl.formatMessage({ id: \"error-messages-unauthorized\" });\n case \"confirm email\":\n // Email is already registered\n return intl.formatMessage({ id: \"error-messages-confirm-email\" });\n case \"name already in use\":\n // Email is already registered\n return intl.formatMessage({ id: \"error-messages-name-already-in-use\" });\n case \"auth/too-many-requests\":\n return intl.formatMessage({ id: \"error-messages-too-many-requests\" });\n case \"password must be between 6 and 128 characters\":\n // Invalid password - must be between 6 and 128 characters\n return intl.formatMessage({ id: \"error-messages-password-must-be-between-6-and-128-characters\" });\n case \"user not found\":\n // Invalid password - must be between 6 and 128 characters\n return intl.formatMessage({ id: \"error-messages-user-not-found\" });\n default:\n // In theory you won't ever hit this default, but if an error message/code without a case ever comes up it will fall back to this.\n return `${intl.formatMessage({ id: \"error-messages-default\" })}${!!error ? `:\\n${error}` : \"\"}`;\n }\n};\n\nexport default handleAuthenticationErrorMessage;\n","import { isEqual } from \"lodash-es\";\nimport crypto from 'crypto';\n\nimport { modalTypes } from \"./Modal\";\nimport { socialMediaDomains, searchEngineDomains } from \"@/constants/general\";\n\nexport const SEOLink = \"https://en.wikipedia.org/wiki/Search_engine_optimization\";\n\nexport const uuid = () => {\n const block = () => Math.random().toString(36).replace(\"0.\", \"\");\n return new Array(4).fill(0).map(block).join(\"-\");\n};\n\nexport const shareRandomString = () => {\n const newShareId = `DF${(+new Date()).toString(36).slice(-8)}`;\n\n return newShareId\n};\n\nexport const isNumeric = (num) => {\n return (\n (typeof num === \"number\" ||\n (typeof num === \"string\" && num.trim() !== \"\")) &&\n !isNaN(num)\n );\n};\n\nexport function validatePhoneNumber(phoneNumber) {\n // Define a regular expression for a US phone number\n const phoneRegex = /^\\d{10,12}$/;\n // Test the input against the regex\n return phoneRegex.test(phoneNumber);\n}\n\nexport const isValidUrl = (urlString) => {\n const urlPattern = new RegExp(\n \"^(https?:\\\\/\\\\/)?\" + // Protocol (http, https)\n \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + // Domain name (www.example.com)\n \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR IP address (IPv4)\n \"(\\\\:\\\\d+)?\" + // Port (optional)\n \"(\\\\/[-a-z\\\\d%_.~+@]*)*\" + // Path, now includes @\n \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + // Query string\n \"(\\\\#[-a-z\\\\d_]*)?$\", // Fragment locator\n \"i\" // Case insensitive\n );\n\n return urlPattern.test(urlString);\n};\n\nexport const getUpdatedProps = (oldObj = {}, newObj = {}, type) => {\n const { duplicating } = modalTypes;\n const updatedProps = {};\n const propsToKeep = {};\n\n if (\"_id\" in oldObj) {\n propsToKeep[\"_id\"] = oldObj[\"_id\"] || null;\n }\n\n if (\"share_id\" in newObj) {\n propsToKeep[\"share_id\"] = newObj[\"share_id\"] || null;\n }\n\n if (type === duplicating) {\n return newObj;\n }\n\n // Check for updated properties\n for (const prop in newObj) {\n const areEqual = isEqual(oldObj[prop], newObj[prop]);\n\n if (!oldObj.hasOwnProperty(prop) || !areEqual) {\n updatedProps[prop] = newObj[prop];\n }\n }\n\n return ({\n ...propsToKeep,\n ...updatedProps\n });\n};\n\nexport class FormData {\n constructor(initData) {\n for (const key in initData) {\n this[key] = initData[key];\n }\n }\n\n append(prop, value) {\n this[prop] = value;\n }\n}\n\nexport const fetchTextFile = async (filePath) => {\n const response = await fetch(filePath);\n if (response.ok) {\n const text = await response.text();\n return text;\n }\n\n return null;\n};\n\nexport const getTrackUUID = () => {\n if (typeof window !== 'undefined') {\n // User ID management\n let userPrintFingerId = sessionStorage.getItem('uuid');\n if (!userPrintFingerId) {\n userPrintFingerId = uuid(); // Generate unique ID\n sessionStorage.setItem('uuid', userPrintFingerId);\n }\n\n // Session management\n const sessionKey = 'session';\n let sessionData = JSON.parse(sessionStorage.getItem(sessionKey)) || {};\n\n const now = Date.now();\n const sessionDuration = 30 * 60 * 1000; // 30 minutes\n\n if (!sessionData.sessionId || now - sessionData.lastActivity > sessionDuration) {\n // New session or expired session\n sessionData = {\n sessionId: `${userPrintFingerId}_${now}`, // Unique session ID\n lastActivity: now,\n };\n sessionStorage.setItem(sessionKey, JSON.stringify(sessionData));\n } else {\n // Update session activity\n sessionData.lastActivity = now;\n sessionStorage.setItem(sessionKey, JSON.stringify(sessionData));\n }\n\n return { clientId: userPrintFingerId, sessionId: sessionData.sessionId };\n }\n return null;\n};\n\nexport const getBrowserAndOSInfo = () => {\n if (typeof window !== 'undefined') {\n const userAgent = navigator.userAgent;\n const platform = navigator.platform;\n let browserName = 'Unknown';\n let os = 'Unknown';\n let deviceType = 'Unknown';\n\n // Detect browser\n if (userAgent.indexOf(\"Firefox\") > -1) {\n browserName = \"Mozilla Firefox\";\n } else if (userAgent.indexOf(\"SamsungBrowser\") > -1) {\n browserName = \"Samsung Internet\";\n } else if (userAgent.indexOf(\"Opera\") > -1 || userAgent.indexOf(\"OPR\") > -1) {\n browserName = \"Opera\";\n } else if (userAgent.indexOf(\"Trident\") > -1) {\n browserName = \"Microsoft Internet Explorer\";\n } else if (userAgent.indexOf(\"Edge\") > -1) {\n browserName = \"Microsoft Edge\";\n } else if (userAgent.indexOf(\"Chrome\") > -1) {\n browserName = \"Google Chrome\";\n } else if (userAgent.indexOf(\"Safari\") > -1) {\n browserName = \"Apple Safari\";\n }\n\n // Detect OS\n if (platform.indexOf(\"Win\") > -1) {\n os = \"Windows\";\n } else if (platform.indexOf(\"Mac\") > -1) {\n os = \"MacOS\";\n } else if (platform.indexOf(\"Linux\") > -1) {\n os = \"Linux\";\n } else if (platform.indexOf(\"iPhone\") > -1 || platform.indexOf(\"iPad\") > -1 || platform.indexOf(\"iPod\") > -1) {\n os = \"iOS\";\n } else if (userAgent.indexOf(\"Android\") > -1) {\n os = \"Android\";\n }\n\n // Detect device type\n if (/Mobi|Android/i.test(userAgent)) {\n deviceType = 'Mobile';\n } else {\n deviceType = 'Desktop';\n }\n\n return {\n browser: browserName,\n os: os,\n type: deviceType\n };\n }\n return {};\n}\n\n// Function to categorize referrer\nexport function getTrafficSource(referrer) {\n if (!referrer) {\n return ({\n domain: \"directTraffic\",\n type: \"Other\"\n });\n }\n\n const referrerDomain = new URL(referrer).hostname;\n\n if (socialMediaDomains.some(socialDomain => referrerDomain.includes(socialDomain))) {\n return ({\n domain: referrerDomain,\n type: \"Social Media\"\n });\n } else if (searchEngineDomains.some(searchDomain => referrerDomain.includes(searchDomain))) {\n return ({\n domain: referrerDomain,\n type: \"Search Engine\"\n });\n } else {\n return ({\n domain: (!referrerDomain.includes(\"downfor\") ? referrerDomain : \"unknown\"),\n type: \"Other\"\n });\n }\n}\n\nexport const removeEmojis = (str) => {\n if (typeof str === \"string\") {\n return str.replace(/[\\p{Emoji_Presentation}\\p{Extended_Pictographic}]/gu, '');\n }\n\n return null;\n}\n\nexport const dayDiff = (isoDateTime) => {\n // Parse the ISO datetime string\n const inputDate = new Date(isoDateTime);\n\n // Get the current time\n const now = new Date();\n\n // Calculate the difference in time (in milliseconds)\n const diffInMilliseconds = now - inputDate;\n\n // Convert the difference to days\n const diffInDays = diffInMilliseconds / (1000 * 60 * 60 * 24);\n\n // Check if the difference is approximately 1 day\n return diffInDays;\n};\n\nexport function generateKeyFromString(longString) {\n // Create a hash of the string\n const hash = crypto.createHash('sha256'); // Use the SHA-256 algorithm\n hash.update(longString); // Provide the input string\n return hash.digest('hex'); // Output the hash in hexadecimal format\n}\n\nexport function getDomainWithoutSubdomain(url) {\n try {\n const parsedUrl = new URL(url); // Parse the URL using the URL object\n const hostname = parsedUrl.hostname; // Get the full hostname\n\n // Split the hostname by periods (e.g., 'subdomain.example.com' -> ['subdomain', 'example', 'com'])\n const parts = hostname.split('.');\n\n // Check if the hostname has more than 2 parts (e.g., \"subdomain.example.com\")\n if (parts.length > 2) {\n // Return the last two parts (e.g., \"example.com\")\n return parts.slice(-2).join('.');\n } else {\n // If it's already a domain without a subdomain (e.g., \"example.com\")\n return hostname;\n }\n } catch (error) {\n console.error(\"Invalid URL:\", error);\n return null;\n }\n}\n\nexport function logApiRequest(req) {\n const logData = {\n timestamp: new Date().toISOString(),\n method: req.method,\n url: req.url,\n requestId: req.headers['x-amzn-requestid'] || req.headers['x-request-id'] || 'N/A',\n userAgent: req.headers['user-agent'] || 'Unknown',\n ip: req.headers['x-forwarded-for'] || req.connection?.remoteAddress || 'Unknown',\n query: req.query,\n body: req.method !== 'GET' ? req.body : undefined, // Avoid logging body for GET requests\n };\n\n console.log('[API LOG]', JSON.stringify(logData)); // Pretty-print JSON log\n}\n","import { initializeApp } from \"firebase/app\";\nimport {\n getStorage,\n uploadBytes,\n getDownloadURL,\n deleteObject,\n updateMetadata,\n ref,\n} from \"firebase/storage\";\n\nconst firebaseConfig = {\n apiKey: \"AIzaSyBnssma-tkbA_aWMnCY8nS6fSHMRlAfpHo\",\n authDomain: \"downfor-life.web.app\",\n databaseURL: \"https://downfor-life-default-rtdb.firebaseio.com\",\n projectId: \"downfor-life\",\n storageBucket: \"downfor-life.appspot.com\",\n messagingSenderId: \"711187192289\",\n appId: \"1:711187192289:web:fafc6d40d9115370bf9aa0\",\n measurementId: \"G-YWY283QDZ6\"\n};\n\ninitializeApp(firebaseConfig);\n\nconst getSourceRefFromDownloadURL = (downloadURL) => {\n try {\n // Parse the URL to extract the file path\n const url = new URL(downloadURL);\n const encodedPath = url.pathname.split(\"/o/\")[1]; // Extract the encoded file path\n const decodedPath = decodeURIComponent(encodedPath); // Decode the file path\n\n // Create and return the source reference\n return decodedPath;\n } catch (error) {\n console.error(\"Failed to parse the Download URL:\", error);\n throw error;\n }\n};\n\nexport const moveFileInFirebase = async (url, destinationPath) => {\n const storage = getStorage();\n const sourcePath = getSourceRefFromDownloadURL(url);\n const sourceRef = ref(storage, `/${sourcePath}`);\n const destinationRef = ref(storage, destinationPath);\n\n try {\n const response = await fetch(url);\n const fileBlob = await response.blob();\n\n const snapshot = await uploadBytes(destinationRef, fileBlob, \"data_url\");\n\n await deleteObject(sourceRef);\n\n const imageUrl = await getDownloadURL(snapshot.ref);\n\n return imageUrl;\n } catch (error) {\n console.error('Error moving file:', error);\n throw error;\n }\n};\n\nexport const uploadToFirebase = async (filePathAndName, file) => {\n if (file) {\n try {\n const storage = getStorage();\n\n // Define the path to the temp folder\n const folderPath = (filePathAndName + (!(String(filePathAndName).includes(\".png\")) && \".png\"));\n const storageRef = ref(storage, folderPath);\n\n // Upload the file to Firebase\n const snapshot = await uploadBytes(storageRef, file, \"data_url\");\n const expirationDate = new Date().getTime() + 24 * 60 * 60 * 1000; // Expire in 24 hours\n\n // Create file metadata to update\n const newMetadata = {\n cacheControl: 'public,max-age=300',\n contentType: 'image/png',\n customMetadata: {\n 'expirationDate': expirationDate\n }\n };\n\n // Update metadata properties\n await updateMetadata(storageRef, newMetadata)\n\n const imageUrl = await getDownloadURL(snapshot.ref);\n\n return imageUrl;\n } catch (error) {\n throw error;\n }\n }\n};\n\nexport const getBase64FromFile = (file) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = (error) => reject(error);\n });\n};","export function calculateHoverColor(themeColor, luminanceAdjustment) {\n if (!themeColor) {\n return;\n }\n // Parse the hexadecimal color string to RGB components\n var r = parseInt(themeColor.substring(1, 3), 16);\n var g = parseInt(themeColor.substring(3, 5), 16);\n var b = parseInt(themeColor.substring(5, 7), 16);\n\n // Calculate the luminance (brightness) of the theme color\n var luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\n\n // Define the amount by which to adjust the color for hover\n var adjustment = luminance > 0.5 ? -luminanceAdjustment : luminanceAdjustment; // Darken for light themes, lighten for dark themes\n\n // Calculate the hover color components\n var hoverR = Math.round(Math.min(Math.max(r + adjustment * 255, 0), 255));\n var hoverG = Math.round(Math.min(Math.max(g + adjustment * 255, 0), 255));\n var hoverB = Math.round(Math.min(Math.max(b + adjustment * 255, 0), 255));\n\n // Convert the hover color components back to hexadecimal\n var hoverColor = \"#\" + ((1 << 24) + (hoverR << 16) + (hoverG << 8) + hoverB).toString(16).slice(1);\n\n return hoverColor;\n}\n\nexport const getThemeColors = (config) => {\n let { theme, font_color, background_color } = config || {};\n\n if (theme === \"dark\") {\n background_color = \"#242424\"\n font_color = \"#FFFFFF\"\n } else if (theme === \"light\") {\n background_color = \"#FFFFFF\";\n font_color = \"#242424\"\n }\n\n return JSON.parse(JSON.stringify({\n colorBgLayout: `radial-gradient(circle,${background_color}, ${calculateHoverColor(background_color, 0.3)})`, // Example gradient from orange to yellow\n fontFamily: \"Roboto\",\n colorLink: font_color,\n colorLinkHover: calculateHoverColor(background_color, 0.5),\n backgroundColor: background_color,\n colorText: font_color\n }));\n}\n\nexport const getUrlFromImgObj = (header) => {\n if (Array.isArray(header)) {\n const firstImage = header[0];\n if (typeof firstImage === \"object\" && \"url\" in firstImage) {\n return firstImage[\"url\"];\n }\n return firstImage;\n }\n\n return header;\n}\n","import { generateKeyFromString, getDomainWithoutSubdomain } from \"@/utils\";\nimport { getFileHtml } from \"@/helpers/UrlToHtml\";\n\nexport async function getOgImageFromHTML(url) {\n try {\n const urlKey = generateKeyFromString(url);\n\n const urlFromStorage = window.sessionStorage.getItem(urlKey);\n\n if (!urlFromStorage) {\n const doc = await getFileHtml(url);\n\n // Find the og:image meta tag\n const ogImageMetaTag = doc.querySelector('meta[property=\"og:image\"]');\n if (ogImageMetaTag) {\n const ogImage = ogImageMetaTag.getAttribute('content');\n if (ogImage) {\n window.sessionStorage.setItem(urlKey, ogImage);\n }\n return ogImage;\n } else {\n const parsedDomain = getDomainWithoutSubdomain(url);\n return `https://${parsedDomain}/favicon.ico`;\n }\n } else {\n return urlFromStorage;\n }\n } catch (error) {\n console.error('Error fetching or parsing the URL:', error);\n return null;\n }\n}\n","import dayjs from \"dayjs\";\nimport weekOfYear from \"dayjs/plugin/weekOfYear\";\n\ndayjs.extend(weekOfYear);\n\nexport const buildStatisticsData = (data) => {\n const results = {};\n\n if (!data) {\n return null;\n }\n\n for (const item of data) {\n const week = dayjs(item.created_at).week(); // Adjust to get week/year\n const year = new Date(item.created_at).getFullYear();\n const key = `${year}-${week}`;\n\n if (!results[key]) {\n results[key] = {\n total_visits: 0,\n unique_visitors: new Set(), // Use Set to track unique visitors\n actions: [],\n traffic_source: {}\n };\n }\n\n // Aggregate visit counts\n results[key].total_visits += item.visit_count || 0;\n\n // Track unique visitors\n if (item.uuid) {\n results[key].unique_visitors.add(item.uuid);\n }\n\n // Track unique traffic source\n if (item.traffic_source) {\n const currentSource = results[key].traffic_source\n const currentSourceDomain = item.traffic_source?.domain\n let finaCount = 0;\n if (currentSourceDomain in (currentSource || {})){\n finaCount = currentSource[currentSourceDomain];\n } \n currentSource[currentSourceDomain] = finaCount + 1;\n results[key].traffic_source = currentSource;\n }\n\n // Aggregate actions\n const actions = item?.actions || [];\n for (const action of actions) {\n const actionKey = `${action.name} (${action?.event} ${action?.type})`;\n if (!results[key].actions[actionKey]) {\n results[key].actions[actionKey] = 0;\n }\n results[key].actions[actionKey] += 1; // Count actions\n };\n };\n\n // Step 3: Prepare final output\n const finalResults = Object.entries(results).map(([key, value]) => ({\n week: key.split('-')[1],\n year: key.split('-')[0],\n total_visits: value.total_visits,\n unique_visitors: value.unique_visitors.size,\n traffic_source: value?.traffic_source,\n actions: value?.actions\n }));\n\n // Calculate growth as a unique field\n finalResults.forEach((result, index) => {\n result.growth = index > 0 ? result.unique_visitors - finalResults[index - 1].unique_visitors : 0;\n });\n\n // Create a unique object for final output\n const output = {\n unique_visitors: finalResults.reduce((acc, res) => acc + res.unique_visitors, 0),\n total_visits: finalResults.reduce((acc, res) => acc + res.total_visits, 0),\n growth: finalResults.reduce((acc, res) => acc + res.growth, 0),\n data: finalResults\n };\n\n return output;\n}","import { getBrowserAndOSInfo } from \"@/utils\";\n\nexport function addToGoogleCalendarToAndroid(eventData) {\n const { name, date_init, date_end, description, address } = eventData;\n\n const formatDateForCalendar = (date) => date.replace(/[-:]/g, \"\").replace(\".000\", \"\");\n\n const googleCalendarUrl = `https://www.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(\n name || \"\"\n )}&dates=${encodeURIComponent(\n formatDateForCalendar(date_init)\n )}/${encodeURIComponent(\n formatDateForCalendar(date_end)\n )}&details=${encodeURIComponent(\n description || \"\"\n )}&location=${encodeURIComponent(\n address?.street || \"\"\n )}`;\n\n const intentUrl = `intent:${googleCalendarUrl}#Intent;scheme=https;package=com.google.android.calendar;end;`;\n\n // Open the intent URL\n window.location.href = intentUrl;\n}\n\nexport function addToOutlookCalendar(eventData) {\n const { os } = getBrowserAndOSInfo();\n\n if (os === \"Android\") {\n return addToGoogleCalendarToAndroid(eventData);\n }\n\n const { name, date_init, date_end, description, address } = eventData;\n\n const outlookCalendarUrl = `https://outlook.live.com/calendar/0/deeplink/compose?subject=${encodeURIComponent(\n name\n )}&startdt=${encodeURIComponent(\n date_init\n )}&enddt=${encodeURIComponent(\n date_end\n )}&body=${encodeURIComponent(\n description\n )}&location=${encodeURIComponent(\n address?.street\n )}`;\n\n window.open(outlookCalendarUrl, \"_blank\");\n}\n\nexport function addToGoogleCalendar(eventData) {\n const { name, date_init, date_end, description, address } = eventData;\n\n const googleCalendarUrl = `https://calendar.google.com/calendar/u/0/r/eventedit?text=${encodeURIComponent(\n name\n )}&dates=${encodeURIComponent(\n date_init?.replace(/[-:]/g, \"\")\n )}/${encodeURIComponent(\n date_end?.replace(/[-:]/g, \"\")\n )}&details=${encodeURIComponent(\n description\n )}&location=${encodeURIComponent(\n address?.street\n )}`;\n\n window.open(googleCalendarUrl, \"_blank\");\n}\n","function hexToRgb(hex) {\n // Remove the \"#\" if present\n hex = hex.replace(/^#/, '');\n\n // Parse into RGB values\n let bigint;\n if (hex.length === 3) { // Short form #RGB\n bigint = parseInt(hex.split('').map(c => c + c).join(''), 16);\n } else { // Full form #RRGGBB\n bigint = parseInt(hex, 16);\n }\n\n return [\n (bigint >> 16) & 255, // Red\n (bigint >> 8) & 255, // Green\n bigint & 255 // Blue\n ];\n}\n\nfunction getLuminance(r, g, b) {\n // Convert RGB to a luminance value\n const a = [r, g, b].map(v => {\n v /= 255; // Normalize to range [0, 1]\n return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n });\n return 0.2126 * a[0] + 0.7152 * a[1] + 0.0722 * a[2];\n}\n\nexport function getContrastRatio(hex1, hex2) {\n // Convert hex to RGB\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n\n // Calculate luminance\n const luminance1 = getLuminance(rgb1[0], rgb1[1], rgb1[2]);\n const luminance2 = getLuminance(rgb2[0], rgb2[1], rgb2[2]);\n\n // Ensure L1 is the lighter color\n const L1 = Math.max(luminance1, luminance2);\n const L2 = Math.min(luminance1, luminance2);\n\n return (L1 + 0.05) / (L2 + 0.05);\n}\n","export * from './AuthErrors'\nexport * from './General'\nexport * from './Upload'\nexport * from './CustomDomain'\nexport * from './StoreAdmin'\nexport * from './Statistics'\nexport * from './StoreState'\nexport * from './Calendar'\nexport * from './Colors'\n"],"names":["PostBody","htmlContent","contentRef","useRef","useEffect","current","querySelectorAll","forEach","anchor","setAttribute","div","className","ref","markdownStyles","dangerouslySetInnerHTML","__html","Modal","popup","show","onClose","size","noBorder","title","subTitle","children","onShare","open","setOpen","useState","childRef","document","body","classList","add","remove","styles","onClick","e","stopPropagation","FaEllipsisVertical","h2","h4","button","name","FormattedMessage","id","PostModal","modalOpen","setModalOpen","pathname","usePathname","modalWasShown","useCallback","modalState","JSON","parse","window","localStorage","getItem","Object","keys","includes","dayDiff","setItem","stringify","Date","toISOString","observer","IntersectionObserver","entry","isIntersecting","unobserve","currentElement","threshold","querySelector","observe","documentElement","style","setProperty","Link","marginBottom","href","target","Image","src","priority","width","height","alt","googleMapsURL","CONTENT_LINKS","CONTENT","MULTISTREAM","EVENTS","TabSchema","header","theme","modules","content","links","events","multistream","dashboard","settings","modalTypes","creating","editing","duplicating","getModalTitle","type","intl","intlPrefix","values","formatMessage","handleAuthenticationErrorMessage","err","error","code","errorType","SEOLink","Array","fill","map","Math","random","toString","replace","join","shareRandomString","slice","isValidUrl","RegExp","test","urlString","getUpdatedProps","oldObj","newObj","updatedProps","propsToKeep","prop","areEqual","isEqual","hasOwnProperty","filePath","response","fetch","ok","text","userPrintFingerId","sessionStorage","uuid","sessionKey","sessionData","now","sessionId","lastActivity","sessionDuration","clientId","inputDate","isoDateTime","diffInMilliseconds","initializeApp","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","appId","measurementId","uploadToFirebase","filePathAndName","file","storage","getStorage","folderPath","String","storageRef","snapshot","uploadBytes","expirationDate","getTime","updateMetadata","cacheControl","newMetadata","contentType","customMetadata","getDownloadURL","Promise","resolve","reject","reader","FileReader","readAsDataURL","onload","result","onerror","calculateHoverColor","themeColor","luminanceAdjustment","r","parseInt","substring","g","b","adjustment","luminance","hoverColor","hoverR","round","min","max","hoverG","hoverB","dayjs","weekOfYear","buildStatisticsData","results","data","item","week","created_at","year","getFullYear","key","total_visits","unique_visitors","Set","actions","traffic_source","visit_count","currentSource","currentSourceDomain","domain","finaCount","action","actionKey","event","finalResults","entries","value","split","index","growth","reduce","acc","res","hexToRgb","hex","bigint","length","c","getLuminance","a","v","pow","getContrastRatio","hex1","hex2","rgb1","rgb2","luminance1","luminance2","L2"],"sourceRoot":"","ignoreList":[]}