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,6yBCAlBD,EAAAC,OAAA,EAAkB,4ICAlBD,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/../../packages/common/src/components/Confirmation/ConfirmationCode/Code/index.tsx","webpack://_N_E/../../packages/common/src/components/Confirmation/ConfirmationCode/index.tsx","webpack://_N_E/../../packages/common/src/components/PasswordInput/BarPasswordStrong/props.ts","webpack://_N_E/../../packages/common/src/components/PasswordInput/BarPasswordStrong/index.tsx","webpack://_N_E/../../packages/common/src/components/ResendCodeButton/index.tsx","webpack://_N_E/../../packages/common/src/components/TransTextWithDefault/index.tsx","webpack://_N_E/../../packages/common/src/components/ValidateCodeInput/index.tsx","webpack://_N_E/../../packages/common/src/components/Confirmation/ConfirmationCode/Code/styles.module.scss","webpack://_N_E/../../packages/common/src/components/Confirmation/ConfirmationCode/styles.module.scss","webpack://_N_E/../../packages/common/src/components/PasswordInput/BarPasswordStrong/styles.module.scss","webpack://_N_E/../../packages/common/src/components/ResendCodeButton/styles.module.scss","webpack://_N_E/../../packages/common/src/components/ValidateCodeInput/styles.module.scss"],"sourcesContent":["import styles from './styles.module.scss';\nimport { Grow } from '@mui/material';\nimport {\n ResendCodeButton,\n ValidateCodeInput,\n} from '@starsoft/common/components';\nimport { ConfirmationCodeProps } from '../props';\n\n/**\n * ConfirmationCodeContent component that displays a code validation input with resend button\n *\n * @component\n * @param {Object} props - Component props\n * @param {(code: string) => void} props.handleChangeCode - Callback when code input changes\n * @param {() => void} props.handleSendSms - Callback to resend verification code\n * @param {boolean} props.isLoadingValidationCode - Whether validation is in progress\n * @param {boolean} props.isSuccess - Whether code validation was successful\n * @returns {JSX.Element} Code validation input with resend button in a grow animation\n */\nexport default function ConfirmationCodeContent({\n handleChangeCode,\n handleSendSms,\n isLoadingValidationCode,\n isSuccess,\n}: Omit) {\n return (\n
\n \n
\n \n \n
\n
\n
\n );\n}\n","import styles from './styles.module.scss';\nimport { useLottiePlayer } from '@starsoft/common/hooks';\nimport { LottieOrImage } from '@starsoft/common/components';\nimport ConfirmationCodeContent from './Code';\nimport { ConfirmationCodeProps } from './props';\nimport { TransTextWithDefault } from '@starsoft/common/components';\nimport { CoreImageProps } from '../../Image/props';\nimport { SettingsService } from '@starsoft/common/services';\n\n/**\n * ConfirmationCode component that displays a confirmation code input with animation\n *\n * @component\n * @param {Object} props - Component props\n * @param {string} props.label - Label text to display below animation\n * @param {boolean} props.withoutPadding - Whether to remove padding from container\n * @param {...ConfirmationCodeProps} props - Additional props passed to ConfirmationCodeContent\n * @returns {JSX.Element} Confirmation code component with animation and input\n */\nexport function ConfirmationCode(\n { label, withoutPadding, ...props }: ConfirmationCodeProps,\n imageProps: CoreImageProps,\n) {\n // Initialize Lottie animation for email validation\n const lottiePlayer = useLottiePlayer({\n path: '/email-validated.json',\n });\n\n const url: string = imageProps.src.replace(\n String(SettingsService.env.S3_BUCKET_BASE_URL),\n String(SettingsService.env.CF_DISTRIBUTION),\n );\n\n return (\n
\n {/*
*/}\n \n

\n \n

\n \n
\n );\n}\n","export interface BarPasswordStrongProps {\n forceScore: 0 | 1 | 2 | 3 | 4;\n}\n\nexport enum PasswordStrengthLevel {\n Warning = 'warning',\n Danger = 'danger',\n Success = 'success',\n}\n","import styles from './styles.module.scss';\nimport { BarPasswordStrongProps, PasswordStrengthLevel } from './props';\nimport { useTranslation } from '../../../hooks';\n\nexport function BarPasswordStrong({ forceScore }: BarPasswordStrongProps) {\n const { t } = useTranslation('common');\n function getStregthLevel(): PasswordStrengthLevel {\n switch (Math.max(0, forceScore)) {\n case 0:\n case 1:\n return PasswordStrengthLevel.Danger;\n case 2:\n return PasswordStrengthLevel.Warning;\n case 3:\n case 4:\n return PasswordStrengthLevel.Success;\n default:\n return PasswordStrengthLevel.Danger;\n }\n }\n const stregthLevel: PasswordStrengthLevel = getStregthLevel();\n function getStep(): number {\n switch (stregthLevel) {\n case PasswordStrengthLevel.Danger:\n return 1;\n case PasswordStrengthLevel.Warning:\n return 2;\n case PasswordStrengthLevel.Success:\n return 3;\n default:\n return 0;\n }\n }\n const step: number = getStep();\n return (\n
\n
\n = 1 ? styles[`container__progress__force--${stregthLevel}`] : ''}`}\n />\n = 2 ? styles[`container__progress__force--${stregthLevel}`] : ''}`}\n />\n = 3 ? styles[`container__progress__force--${stregthLevel}`] : ''}`}\n />\n
\n\n \n {t(`label_${stregthLevel}`)}\n \n
\n );\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport styles from './styles.module.scss';\nimport { ResendCodeButtonProps } from './props';\nimport { useTranslation } from '../../hooks';\n\n/**\n * ResendCodeButton Component\n * A button component that handles resending verification codes with a countdown timer.\n * The button becomes disabled for 60 seconds after a successful code resend.\n *\n * @component\n * @param {Object} props - Component props\n * @param {() => void} props.onClick - Callback function when button is clicked\n * @param {boolean} props.isLoading - Whether the button is in loading state\n * @param {boolean} props.isSuccess - Whether the last resend attempt was successful\n * @param {boolean} props.isSkeleton - Whether to show a skeleton loading state\n * @returns {JSX.Element} Button component with countdown timer\n *\n * @example\n * handleResendCode()}\n * isLoading={false}\n * isSuccess={false}\n * isSkeleton={false}\n * />\n */\nexport function ResendCodeButton({\n onClick,\n isLoading,\n isSuccess,\n isSkeleton,\n}: ResendCodeButtonProps) {\n const { t } = useTranslation('common');\n\n // State to track when SMS was last sent (initialized to 60s from now)\n const [smsSendAt, setSmsSendAt] = useState(\n new Date(new Date().getTime() + 60000),\n );\n\n // State to track current time for countdown\n const [currentDate, setCurrentDate] = useState(new Date());\n\n // Disable button if countdown not finished\n const isButtonDisabled: boolean = smsSendAt > currentDate;\n\n // Calculate remaining seconds in countdown\n const difference: number = useMemo(\n () =>\n (smsSendAt &&\n Math.trunc(\n Math.abs(\n ((smsSendAt as Date).getTime() - currentDate.getTime()) as number,\n ) / 1000,\n )) ||\n 0,\n [smsSendAt, currentDate],\n );\n\n /**\n * Handles successful resend by resetting countdown timer\n * Called when isSuccess prop changes\n */\n function onSuccess() {\n if (!isSuccess) {\n return;\n }\n\n setSmsSendAt(new Date(new Date().getTime() + 60000));\n }\n\n useEffect(onSuccess, [isSuccess]);\n\n /**\n * Sets up interval to update current time every second\n * Cleans up interval on unmount\n * @returns {() => void} Cleanup function to clear interval\n */\n function onMount() {\n let intervalId: NodeJS.Timeout;\n\n intervalId = setInterval(() => setCurrentDate(new Date()), 1000);\n\n return () => {\n clearInterval(intervalId);\n };\n }\n\n useEffect(onMount, []);\n\n if (isSkeleton) {\n return
;\n }\n\n return (\n \n {t('resend_code')}{' '}\n {isButtonDisabled ? `- ${difference > 60 ? 60 : difference}` : ''}\n \n );\n}\n","import { TransText } from '@starsoft/common/interfaces/trans-text';\nimport { ComponentType } from 'react';\nimport { TransWithDefault } from '../TransWithDefault';\nimport { useSettingsStore } from '@starsoft/common/hooks/useSettingsStore';\nimport { CommonSettings } from '@starsoft/common/interfaces';\n\n/**\n * TransTextWithDefault Component\n * This component is responsible for rendering a translation text component with default fallback.\n * It utilizes the settings store to determine the appropriate translation component to use.\n *\n * @param {TransText} props - The properties for the component.\n * @param {object} props.components - Custom components to be used within the translation text.\n * @param {string} props.i18nKey - The internationalization key for the translation.\n * @param {object} props.values - The values to be interpolated in the translation string.\n *\n * @returns {JSX.Element} The rendered translation component or a default translation component if none is specified.\n *\n * @example\n * // Usage example:\n * , br:
}}\n * i18nKey=\"example_key\"\n * values={{ name: 'John' }}\n * />\n */\nexport function TransTextWithDefault({ components, ...props }: TransText) {\n const { state } = useSettingsStore();\n const settings: CommonSettings = state.settings;\n\n // Retrieve the TransText component from settings, if available\n const TransText: ComponentType =\n settings.translationComponents.TransText;\n\n // If no TransText component is found, use the default translation component\n if (!TransText) {\n return ;\n }\n\n // Render the TransText component with provided components and props\n return (\n ,\n br:
,\n p:

,\n div:

,\n span: ,\n ...components,\n }}\n {...props}\n />\n );\n}\n","import { useCallback, useEffect, useRef } from 'react';\nimport { ValidateCodeInputProps } from './props';\nimport styles from './styles.module.scss';\nimport { KeyboardKey } from '@starsoft/common/enums';\n\n/**\n * ValidateCodeInput component is responsible for rendering a series of input fields\n * that allow users to enter a code. It handles user interactions such as typing,\n * pasting, and navigating between inputs using arrow keys.\n *\n * @param {ValidateCodeInputProps} props - The properties for the component.\n * @param {Function} props.setValue - A function to set the value of the code entered.\n * @param {number} [props.maxLength=6] - The maximum length of the code.\n * @param {boolean} props.isContainerColor - Flag to apply container color style.\n * @param {boolean} props.isLoading - Flag to indicate loading state.\n * @param {boolean} props.withMaxWidth - Flag to apply max width style.\n * @param {boolean} props.isDefaultColor - Flag to apply default color style.\n *\n * @returns {JSX.Element} The rendered component.\n */\nexport function ValidateCodeInput({\n setValue,\n maxLength = 6,\n isContainerColor,\n isLoading,\n withMaxWidth,\n isDefaultColor,\n}: ValidateCodeInputProps) {\n // Ref to store references to input elements\n const inputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n // Effect to ensure inputRefs array matches the maxLength\n useEffect(() => {\n inputRefs.current = inputRefs.current.slice(0, maxLength);\n }, [maxLength]);\n\n /**\n * handleSetValue is a callback function that aggregates the values from all input fields\n * and sets the combined value using the setValue function.\n */\n const handleSetValue = useCallback(() => {\n const value = inputRefs.current\n .map(input => input?.value ?? '')\n .filter(value => value !== '')\n .join('');\n\n setValue(value);\n }, [setValue]);\n\n /**\n * handleArrowLeft moves the focus to the previous input field when the left arrow key is pressed.\n *\n * @param {any} e - The event object from the keydown event.\n */\n function handleArrowLeft(e: any) {\n const previousInput = e.target.previousElementSibling as HTMLInputElement;\n if (!previousInput) return;\n setTimeout(() => {\n previousInput.selectionStart = previousInput.selectionEnd =\n previousInput.value.length;\n previousInput.focus();\n }, 0);\n }\n\n /**\n * handleArrowRight moves the focus to the next input field when the right arrow key is pressed.\n *\n * @param {any} e - The event object from the keydown event.\n */\n function handleArrowRight(e: any) {\n const nextInput = e.target.nextElementSibling as HTMLInputElement;\n if (!nextInput) return;\n nextInput.focus();\n }\n\n /**\n * handleChange processes the input change event, ensuring only numeric values are entered,\n * and moves focus to the next input if applicable.\n *\n * @param {any} e - The event object from the change event.\n */\n function handleChange(e: any) {\n e.target.value = e.target.value.replace(/[^0-9]/g, '');\n\n handleSetValue();\n\n if (Object.values(KeyboardKey).includes(e?.code) || !e.target.value) {\n return;\n }\n\n handleArrowRight(e);\n }\n\n /**\n * handleBackspace moves the focus to the previous input field if the current input is empty\n * and the backspace key is pressed.\n *\n * @param {any} e - The event object from the keydown event.\n */\n function handleBackspace(e: any) {\n const input = e.target;\n\n if (input.value !== '') {\n return;\n }\n\n if (!input?.previousElementSibling) return;\n input.previousElementSibling.focus();\n }\n\n /**\n * handlePaste is a callback function that handles the paste event, ensuring only numeric\n * values are pasted into the input fields.\n *\n * @param {any} e - The event object from the paste event.\n */\n const handlePaste = useCallback(\n (e: any) => {\n e.preventDefault();\n const paste = e.clipboardData.getData('text')?.replace(/[^0-9]/g, '');\n inputRefs.current.forEach((input, i) => {\n if (!input) {\n return;\n }\n\n input.value = paste[i] || '';\n });\n\n handleSetValue();\n },\n [handleSetValue],\n );\n\n /**\n * handleMount sets up event listeners for paste and keydown events on the input fields\n * and ensures the first input is focused if none are focused.\n */\n function handleMount() {\n if (typeof window == 'undefined' || typeof document == 'undefined') {\n return;\n }\n\n const hasSomeInputFocused = inputRefs.current?.some(\n ref => ref == document.activeElement,\n );\n\n inputRefs.current.forEach((input, index) => {\n if (index == 0 && !hasSomeInputFocused) {\n input?.focus();\n }\n\n input?.addEventListener('paste', handlePaste);\n input?.addEventListener('keydown', e => {\n switch (e.code) {\n case KeyboardKey.BACKSPACE:\n handleBackspace(e);\n break;\n case KeyboardKey.ARROW_LEFT:\n handleArrowLeft(e);\n break;\n case KeyboardKey.ARROW_RIGHT:\n handleArrowRight(e);\n break;\n default:\n }\n });\n });\n }\n\n // Effect to handle component mount logic\n useEffect(handleMount, [handlePaste, inputRefs]);\n\n // Render loading skeleton if isLoading is true\n if (isLoading) {\n return (\n \n {Array.from({ length: maxLength }).map((_, index) => (\n \n ))}\n
\n );\n }\n\n // Render input fields for code entry\n return (\n \n {Array.from({ length: maxLength }).map((_, index) => (\n (inputRefs.current[index] = el)}\n />\n ))}\n
\n );\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__vmynk\",\"container__wrapper\":\"styles_container__wrapper__mt4Wv\",\"skeleton-animation\":\"styles_skeleton-animation__V_4_s\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container___9PEN\",\"container--no-padding\":\"styles_container--no-padding__P8fL2\",\"container__lottie\":\"styles_container__lottie__joJcH\",\"container__image\":\"styles_container__image__QqGJ8\",\"container__description\":\"styles_container__description__OtLbF\",\"skeleton-animation\":\"styles_skeleton-animation__18MTt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__joSuJ\",\"container__progress\":\"styles_container__progress___WS2B\",\"container__progress__force\":\"styles_container__progress__force__Gwv0i\",\"container__progress__force--danger\":\"styles_container__progress__force--danger__9EoMj\",\"container__progress__force--warning\":\"styles_container__progress__force--warning__TxOFb\",\"container__progress__force--success\":\"styles_container__progress__force--success__bqRx0\",\"container__label-force\":\"styles_container__label-force__YGJjA\",\"container__label-force--danger\":\"styles_container__label-force--danger__AWoTa\",\"container__label-force--warning\":\"styles_container__label-force--warning__J_KA3\",\"container__label-force--success\":\"styles_container__label-force--success__mjiWf\",\"skeleton-animation\":\"styles_skeleton-animation__qh3WW\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeleton\":\"styles_skeleton__XZRCs\",\"skeleton-animation\":\"styles_skeleton-animation__mp1uP\",\"button\":\"styles_button__D3i0q\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container__input__skeleton\":\"styles_container__input__skeleton__yfRIO\",\"skeleton-animation\":\"styles_skeleton-animation__YnQBM\",\"container\":\"styles_container__RrqWl\",\"container__input\":\"styles_container__input__fnGzI\",\"container__input--container-color\":\"styles_container__input--container-color__XD_OP\",\"container__input--default-color\":\"styles_container__input--default-color__mCOjL\",\"container__input--max-width\":\"styles_container__input--max-width___gcVZ\"};"],"names":["ConfirmationCodeContent","param","handleChangeCode","handleSendSms","isLoadingValidationCode","isSuccess","jsx_runtime","jsx","div","className","styles","Grow","in","timeout","jsxs","ResendCodeButton","onClick","isLoading","ValidateCodeInput","setValue","ConfirmationCode","imageProps","label","withoutPadding","props","lottiePlayer","useLottiePlayer","path","url","src","replace","String","SettingsService","env","S3_BUCKET_BASE_URL","CF_DISTRIBUTION","concat","LottieOrImage","image","lottie","classList","p","TransTextWithDefault","text","PasswordStrengthLevel","BarPasswordStrong","forceScore","t","useTranslation","stregthLevel","getStregthLevel","Math","max","Danger","Warning","Success","step","getStep","span","isSkeleton","smsSendAt","setSmsSendAt","useState","Date","getTime","currentDate","setCurrentDate","isButtonDisabled","difference","useMemo","trunc","abs","useEffect","intervalId","setInterval","clearInterval","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","button","disabled","type","components","state","useSettingsStore","TransText","settings","translationComponents","strong","br","TransWithDefault","i18nKey","maxLength","isContainerColor","withMaxWidth","isDefaultColor","inputRefs","useRef","current","slice","handleSetValue","useCallback","map","input","value","filter","join","handleArrowRight","e","nextInput","target","nextElementSibling","focus","handleChange","Object","values","KeyboardKey","includes","code","handlePaste","preventDefault","paste","clipboardData","getData","forEach","i","document","hasSomeInputFocused","some","ref","activeElement","index","addEventListener","BACKSPACE","handleBackspace","previousElementSibling","ARROW_LEFT","handleArrowLeft","previousInput","setTimeout","selectionStart","selectionEnd","length","ARROW_RIGHT","style","gridTemplateColumns","Array","from","_","onChange","el","module","exports"],"sourceRoot":""}