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AA8BJ,GAAe,YACxE,IAAKtK,EACH,OAGF,MAAM2I,EAAU4B,EAAW9O,QAO3B,OANIlC,GACFoP,EAAQsB,UAAUU,IAAIpR,GAGxByG,EAAU4K,YAAYjC,GAEf,KACLkC,EAAAA,EAAAA,YAAgBlR,EAAWgP,GAC3B3I,EAAU8K,YAAYnC,MAEvB,CAACpP,EAAW+Q,IAERO,EAAAA,EAAAA,OAAgB5C,EAAUsC,EAAW9O,W,8CChC/B,SAAS8F,EACtBwJ,EACAC,IAEA/R,EAAAA,EAAAA,KAAU,KACJ8R,IAAWxF,SAAS0F,YACtBF,IAGEA,GACF1G,OAAOqF,iBAAiB,OAAQqB,GAG9BC,GACF3G,OAAOqF,iBAAiB,QAASsB,GAG5B,KACDA,GACF3G,OAAOsF,oBAAoB,QAASqB,GAGlCD,GACF1G,OAAOsF,oBAAoB,OAAQoB,MAGtC,CAACA,EAAQC,M","sources":["webpack://telegram-t/./src/components/common/TrackingMonkey.tsx","webpack://telegram-t/./src/components/auth/AuthCode.tsx","webpack://telegram-t/./src/components/auth/AuthPassword.tsx","webpack://telegram-t/./src/components/auth/AuthRegister.tsx","webpack://telegram-t/./src/components/common/AnimatedSticker.tsx","webpack://telegram-t/./src/components/common/PasswordForm.tsx","webpack://telegram-t/./src/components/common/PasswordMonkey.tsx","webpack://telegram-t/./src/components/common/helpers/animatedAssets.ts","webpack://telegram-t/./src/components/ui/CropModal.tsx","webpack://telegram-t/./src/components/ui/AvatarEditable.tsx","webpack://telegram-t/./src/components/ui/Modal.tsx","webpack://telegram-t/./src/util/trapFocus.ts","webpack://telegram-t/./src/components/ui/Portal.ts","webpack://telegram-t/./src/hooks/useBackgroundMode.ts"],"sourcesContent":["import React, {\n FC, useState, useEffect, useCallback, memo,\n} from '../../lib/teact/teact';\n\nimport { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config';\nimport { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport getAnimationData from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\nimport './PasswordMonkey.scss';\n\ntype OwnProps = {\n code: string;\n codeLength: number;\n trackingDirection: number;\n isTracking: boolean;\n isBig?: boolean;\n};\n\nconst TRACKING_START_FRAME = 15;\nconst TRACKING_END_FRAME = 180;\nconst STICKER_SIZE = IS_SINGLE_COLUMN_LAYOUT ? STICKER_SIZE_AUTH_MOBILE : STICKER_SIZE_AUTH;\n\nconst TrackingMonkey: FC = ({\n code,\n codeLength,\n trackingDirection,\n isTracking,\n isBig,\n}) => {\n const [idleMonkeyData, setIdleMonkeyData] = useState();\n const [trackingMonkeyData, setTrackingMonkeyData] = useState();\n const [isFirstMonkeyLoaded, setIsFirstMonkeyLoaded] = useState(false);\n const TRACKING_FRAMES_PER_SYMBOL = (TRACKING_END_FRAME - TRACKING_START_FRAME) / codeLength;\n\n useEffect(() => {\n if (!idleMonkeyData) {\n getAnimationData('MonkeyIdle').then(setIdleMonkeyData);\n }\n }, [idleMonkeyData]);\n\n useEffect(() => {\n if (!trackingMonkeyData) {\n getAnimationData('MonkeyTracking').then(setTrackingMonkeyData);\n }\n }, [trackingMonkeyData]);\n\n const handleFirstMonkeyLoad = useCallback(() => setIsFirstMonkeyLoaded(true), []);\n\n function getTrackingFrames(): [number, number] {\n const startFrame = (code && code.length > 1) || trackingDirection < 0\n ? TRACKING_START_FRAME + TRACKING_FRAMES_PER_SYMBOL * (code.length - 1)\n : 0;\n const endFrame = code.length === codeLength\n ? TRACKING_END_FRAME\n : TRACKING_START_FRAME + TRACKING_FRAMES_PER_SYMBOL * code.length;\n\n if (trackingDirection < 1) {\n return [\n endFrame,\n startFrame,\n ];\n }\n\n return [\n startFrame,\n endFrame,\n ];\n }\n\n return (\n
\n {!isFirstMonkeyLoaded && (\n
\n )}\n {idleMonkeyData && (\n \n )}\n {trackingMonkeyData && (\n \n )}\n
\n );\n};\n\nexport default memo(TrackingMonkey);\n","import { FormEvent } from 'react';\nimport React, {\n FC, useState, useEffect, useCallback, memo, useRef,\n} from '../../lib/teact/teact';\nimport { getDispatch, withGlobal } from '../../lib/teact/teactn';\nimport { GlobalState } from '../../global/types';\n\nimport { IS_TOUCH_ENV } from '../../util/environment';\nimport { pick } from '../../util/iteratees';\nimport renderText from '../common/helpers/renderText';\nimport useHistoryBack from '../../hooks/useHistoryBack';\nimport useLang from '../../hooks/useLang';\n\nimport InputText from '../ui/InputText';\nimport Loading from '../ui/Loading';\nimport TrackingMonkey from '../common/TrackingMonkey';\n\ntype StateProps = Pick;\n\nconst CODE_LENGTH = 5;\n\nconst AuthCode: FC = ({\n authPhoneNumber,\n authIsCodeViaApp,\n authIsLoading,\n authError,\n}) => {\n const {\n setAuthCode,\n returnToAuthPhoneNumber,\n clearAuthError,\n } = getDispatch();\n\n const lang = useLang();\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef(null);\n\n const [code, setCode] = useState('');\n const [isTracking, setIsTracking] = useState(false);\n const [trackingDirection, setTrackingDirection] = useState(1);\n\n useEffect(() => {\n if (!IS_TOUCH_ENV) {\n inputRef.current!.focus();\n }\n }, []);\n\n useHistoryBack(true, returnToAuthPhoneNumber);\n\n const onCodeChange = useCallback((e: FormEvent) => {\n if (authError) {\n clearAuthError();\n }\n\n const { currentTarget: target } = e;\n target.value = target.value.replace(/[^\\d]+/, '').substr(0, CODE_LENGTH);\n\n if (target.value === code) {\n return;\n }\n\n setCode(target.value);\n\n if (!isTracking) {\n setIsTracking(true);\n } else if (!target.value.length) {\n setIsTracking(false);\n }\n\n if (code && code.length > target.value.length) {\n setTrackingDirection(-1);\n } else {\n setTrackingDirection(1);\n }\n\n if (target.value.length === CODE_LENGTH) {\n setAuthCode({ code: target.value });\n }\n }, [authError, clearAuthError, code, isTracking, setAuthCode]);\n\n return (\n
\n
\n \n

\n {authPhoneNumber}\n \n \n

\n \n

\n {renderText(lang(authIsCodeViaApp ? 'SentAppCode' : 'Login.JustSentSms'), ['simple_markdown'])}\n

\n \n {authIsLoading && }\n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authPhoneNumber', 'authIsCodeViaApp', 'authIsLoading', 'authError']),\n)(AuthCode));\n","import React, {\n FC, memo, useCallback, useState,\n} from '../../lib/teact/teact';\nimport { getDispatch, withGlobal } from '../../lib/teact/teactn';\n\nimport { GlobalState } from '../../global/types';\n\nimport { pick } from '../../util/iteratees';\nimport useLang from '../../hooks/useLang';\n\nimport MonkeyPassword from '../common/PasswordMonkey';\nimport PasswordForm from '../common/PasswordForm';\n\ntype StateProps = Pick;\n\nconst AuthPassword: FC = ({\n authIsLoading, authError, authHint,\n}) => {\n const { setAuthPassword, clearAuthError } = getDispatch();\n\n const lang = useLang();\n const [showPassword, setShowPassword] = useState(false);\n\n const handleChangePasswordVisibility = useCallback((isVisible) => {\n setShowPassword(isVisible);\n }, []);\n\n const handleSubmit = useCallback((password: string) => {\n setAuthPassword({ password });\n }, [setAuthPassword]);\n\n return (\n
\n
\n \n

{lang('Login.Header.Password')}

\n

{lang('Login.EnterPasswordDescription')}

\n \n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authIsLoading', 'authError', 'authHint']),\n)(AuthPassword));\n","import { ChangeEvent } from 'react';\nimport React, { FC, useState, memo } from '../../lib/teact/teact';\nimport { getDispatch, withGlobal } from '../../lib/teact/teactn';\n\nimport { GlobalState } from '../../global/types';\n\nimport { pick } from '../../util/iteratees';\nimport useLang from '../../hooks/useLang';\n\nimport Button from '../ui/Button';\nimport InputText from '../ui/InputText';\nimport AvatarEditable from '../ui/AvatarEditable';\n\ntype StateProps = Pick;\n\nconst AuthRegister: FC = ({\n authIsLoading, authError,\n}) => {\n const { signUp, clearAuthError, uploadProfilePhoto } = getDispatch();\n\n const lang = useLang();\n const [isButtonShown, setIsButtonShown] = useState(false);\n const [croppedFile, setCroppedFile] = useState();\n const [firstName, setFirstName] = useState('');\n const [lastName, setLastName] = useState('');\n\n function handleFirstNameChange(event: ChangeEvent) {\n if (authError) {\n clearAuthError();\n }\n\n const { target } = event;\n\n setFirstName(target.value);\n setIsButtonShown(target.value.length > 0);\n }\n\n function handleLastNameChange(event: ChangeEvent) {\n const { target } = event;\n\n setLastName(target.value);\n }\n\n function handleSubmit(event: React.FormEvent) {\n event.preventDefault();\n\n signUp({ firstName, lastName });\n\n if (croppedFile) {\n uploadProfilePhoto({ file: croppedFile });\n }\n }\n\n return (\n
\n
\n
\n \n

{lang('YourName')}

\n

{lang('Login.Register.Desc')}

\n \n \n {isButtonShown && (\n \n )}\n \n
\n
\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => pick(global, ['authIsLoading', 'authError']),\n)(AuthRegister));\n","import React, {\n FC, useEffect, useRef, memo, useCallback, useState,\n} from '../../lib/teact/teact';\n\nimport { fastRaf } from '../../util/schedulers';\nimport buildClassName from '../../util/buildClassName';\nimport useHeavyAnimationCheck from '../../hooks/useHeavyAnimationCheck';\nimport useBackgroundMode from '../../hooks/useBackgroundMode';\n\ntype OwnProps = {\n className?: string;\n id: string;\n animationData?: string;\n play?: boolean | string;\n playSegment?: [number, number];\n speed?: number;\n noLoop?: boolean;\n size: number;\n quality?: number;\n isLowPriority?: boolean;\n onLoad?: NoneToVoidFunction;\n forceOnHeavyAnimation?: boolean;\n color?: [number, number, number];\n onEnded?: NoneToVoidFunction;\n};\n\ntype RLottieClass = typeof import('../../lib/rlottie/RLottie').default;\ntype RLottieInstance = import('../../lib/rlottie/RLottie').default;\nlet lottiePromise: Promise;\nlet RLottie: RLottieClass;\n\n// Time supposed for judges to measure \"Transferred Size\" in Dev Tools\nconst LOTTIE_LOAD_DELAY = 5000;\n\nasync function ensureLottie() {\n if (!lottiePromise) {\n lottiePromise = import('../../lib/rlottie/RLottie') as unknown as Promise;\n RLottie = (await lottiePromise as any).default;\n }\n\n return lottiePromise;\n}\n\nsetTimeout(ensureLottie, LOTTIE_LOAD_DELAY);\n\nconst AnimatedSticker: FC = ({\n className,\n id,\n animationData,\n play,\n playSegment,\n speed,\n noLoop,\n size,\n quality,\n isLowPriority,\n color,\n forceOnHeavyAnimation,\n onLoad,\n onEnded,\n}) => {\n const [animation, setAnimation] = useState();\n // eslint-disable-next-line no-null/no-null\n const container = useRef(null);\n const wasPlaying = useRef(false);\n const isFrozen = useRef(false);\n const isFirstRender = useRef(true);\n\n const playRef = useRef();\n playRef.current = play;\n const playSegmentRef = useRef<[number, number]>();\n playSegmentRef.current = playSegment;\n\n useEffect(() => {\n if (animation || !animationData) {\n return;\n }\n\n const exec = () => {\n if (!container.current) {\n return;\n }\n\n const newAnimation = new RLottie(\n id,\n container.current,\n animationData,\n {\n noLoop,\n size,\n quality,\n isLowPriority,\n },\n onLoad,\n color,\n onEnded,\n );\n\n if (speed) {\n newAnimation.setSpeed(speed);\n }\n\n setAnimation(newAnimation);\n };\n\n if (RLottie) {\n exec();\n } else {\n ensureLottie().then(() => {\n fastRaf(() => {\n if (container.current) {\n exec();\n }\n });\n });\n }\n }, [color, animation, animationData, id, isLowPriority, noLoop, onLoad, quality, size, speed, onEnded]);\n\n useEffect(() => {\n if (!animation) return;\n\n animation.setColor(color);\n }, [color, animation]);\n\n useEffect(() => {\n return () => {\n if (animation) {\n animation.destroy();\n }\n };\n }, [animation]);\n\n const playAnimation = useCallback((shouldRestart = false) => {\n if (animation && (playRef.current || playSegmentRef.current)) {\n if (playSegmentRef.current) {\n animation.playSegment(playSegmentRef.current);\n } else if (shouldRestart) {\n animation.goToAndPlay(0);\n } else {\n animation.play();\n }\n }\n }, [animation]);\n\n const pauseAnimation = useCallback(() => {\n if (!animation) {\n return;\n }\n\n animation.pause();\n }, [animation]);\n\n const freezeAnimation = useCallback(() => {\n isFrozen.current = true;\n\n if (!animation) {\n return;\n }\n\n if (!wasPlaying.current) {\n wasPlaying.current = animation.isPlaying();\n }\n\n pauseAnimation();\n }, [animation, pauseAnimation]);\n\n const unfreezeAnimation = useCallback(() => {\n if (wasPlaying.current) {\n playAnimation();\n }\n\n wasPlaying.current = false;\n isFrozen.current = false;\n }, [playAnimation]);\n\n const unfreezeAnimationOnRaf = useCallback(() => {\n fastRaf(unfreezeAnimation);\n }, [unfreezeAnimation]);\n\n useEffect(() => {\n if (!animation) {\n return;\n }\n\n if (play || playSegment) {\n if (isFrozen.current) {\n wasPlaying.current = true;\n } else {\n playAnimation(noLoop);\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (isFrozen.current) {\n wasPlaying.current = false;\n } else {\n pauseAnimation();\n }\n }\n }, [animation, play, playSegment, noLoop, playAnimation, pauseAnimation]);\n\n useEffect(() => {\n if (animation) {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n } else if (animationData) {\n animation.changeData(animationData);\n playAnimation();\n }\n }\n }, [playAnimation, animation, animationData]);\n\n useHeavyAnimationCheck(freezeAnimation, unfreezeAnimation, forceOnHeavyAnimation);\n // Pausing frame may not happen in background\n // so we need to make sure it happens right after focusing,\n // then we can play again.\n useBackgroundMode(freezeAnimation, unfreezeAnimationOnRaf);\n\n const fullClassName = buildClassName('AnimatedSticker', className);\n\n const style = size ? `width: ${size}px; height: ${size}px;` : undefined;\n\n return (\n \n );\n};\n\nexport default memo(AnimatedSticker);\n","import { ChangeEvent } from 'react';\nimport React, {\n FC, memo, useEffect, useRef, useState,\n} from '../../lib/teact/teact';\n\nimport { MIN_PASSWORD_LENGTH } from '../../config';\nimport { IS_TOUCH_ENV, IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport buildClassName from '../../util/buildClassName';\nimport useLang from '../../hooks/useLang';\n\nimport Button from '../ui/Button';\n\ntype OwnProps = {\n submitLabel?: string;\n error?: string;\n hint?: string;\n placeholder?: string;\n isLoading?: boolean;\n isPasswordVisible?: boolean;\n clearError: NoneToVoidFunction;\n onChangePasswordVisibility: (state: boolean) => void;\n onInputChange?: (password: string) => void;\n onSubmit: (password: string) => void;\n};\n\nconst FOCUS_DELAY_TIMEOUT_MS = IS_SINGLE_COLUMN_LAYOUT ? 550 : 400;\n\nconst PasswordForm: FC = ({\n isLoading = false,\n isPasswordVisible,\n error,\n hint,\n placeholder = 'Password',\n submitLabel = 'Next',\n clearError,\n onChangePasswordVisibility,\n onInputChange,\n onSubmit,\n}) => {\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef(null);\n const lang = useLang();\n\n const [password, setPassword] = useState('');\n const [canSubmit, setCanSubmit] = useState(false);\n\n useEffect(() => {\n if (!IS_TOUCH_ENV) {\n setTimeout(() => {\n inputRef.current!.focus();\n }, FOCUS_DELAY_TIMEOUT_MS);\n }\n }, []);\n\n useEffect(() => {\n if (error) {\n requestAnimationFrame(() => {\n inputRef.current!.focus();\n inputRef.current!.select();\n });\n }\n }, [error]);\n\n function onPasswordChange(e: ChangeEvent) {\n if (error) {\n clearError();\n }\n\n const { target } = e;\n setPassword(target.value);\n setCanSubmit(target.value.length >= MIN_PASSWORD_LENGTH);\n if (onInputChange) {\n onInputChange(target.value);\n }\n }\n\n function togglePasswordVisibility() {\n onChangePasswordVisibility(!isPasswordVisible);\n }\n\n function handleSubmit(event: React.FormEvent) {\n event.preventDefault();\n\n if (isLoading) {\n return;\n }\n\n if (canSubmit) {\n onSubmit(password);\n }\n }\n\n return (\n
\n \n \n \n \n \n \n \n {canSubmit && (\n \n )}\n \n );\n};\n\nexport default memo(PasswordForm);\n","import React, {\n FC, useState, useEffect, useCallback, memo,\n} from '../../lib/teact/teact';\n\nimport { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config';\nimport { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';\nimport getAnimationData from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\nimport './PasswordMonkey.scss';\n\ntype OwnProps = {\n isPasswordVisible: boolean;\n isBig?: boolean;\n};\n\nconst PEEK_MONKEY_SHOW_DELAY = 2000;\nconst SEGMENT_COVER_EYES: [number, number] = [0, 50];\nconst SEGMENT_UNCOVER_EYE: [number, number] = [0, 20];\nconst SEGMENT_COVER_EYE: [number, number] = [20, 0];\nconst STICKER_SIZE = IS_SINGLE_COLUMN_LAYOUT ? STICKER_SIZE_AUTH_MOBILE : STICKER_SIZE_AUTH;\n\nconst PasswordMonkey: FC = ({ isPasswordVisible, isBig }) => {\n const [closeMonkeyData, setCloseMonkeyData] = useState();\n const [peekMonkeyData, setPeekMonkeyData] = useState();\n const [isFirstMonkeyLoaded, setIsFirstMonkeyLoaded] = useState(false);\n const [isPeekShown, setIsPeekShown] = useState(false);\n\n useEffect(() => {\n if (!closeMonkeyData) {\n getAnimationData('MonkeyClose').then(setCloseMonkeyData);\n } else {\n setTimeout(() => setIsPeekShown(true), PEEK_MONKEY_SHOW_DELAY);\n }\n }, [closeMonkeyData]);\n\n useEffect(() => {\n if (!peekMonkeyData) {\n getAnimationData('MonkeyPeek').then(setPeekMonkeyData);\n }\n }, [peekMonkeyData]);\n\n const handleFirstMonkeyLoad = useCallback(() => setIsFirstMonkeyLoaded(true), []);\n\n return (\n
\n {!isFirstMonkeyLoaded && (\n
\n )}\n {closeMonkeyData && (\n \n )}\n {peekMonkeyData && (\n \n )}\n
\n );\n};\n\nexport default memo(PasswordMonkey);\n","import { ApiMediaFormat } from '../../../api/types';\n\nimport * as mediaLoader from '../../../util/mediaLoader';\n\n// @ts-ignore\nimport MonkeyIdle from '../../../assets/tgs/monkeys/TwoFactorSetupMonkeyIdle.tgs';\n// @ts-ignore\nimport MonkeyTracking from '../../../assets/tgs/monkeys/TwoFactorSetupMonkeyTracking.tgs';\n// @ts-ignore\nimport MonkeyClose from '../../../assets/tgs/monkeys/TwoFactorSetupMonkeyClose.tgs';\n// @ts-ignore\nimport MonkeyPeek from '../../../assets/tgs/monkeys/TwoFactorSetupMonkeyPeek.tgs';\n// @ts-ignore\nimport FoldersAll from '../../../assets/tgs/settings/FoldersAll.tgs';\n// @ts-ignore\nimport FoldersNew from '../../../assets/tgs/settings/FoldersNew.tgs';\n// @ts-ignore\nimport DiscussionGroups from '../../../assets/tgs/settings/DiscussionGroupsDucks.tgs';\n// @ts-ignore\nimport CameraFlip from '../../../assets/tgs/calls/CameraFlip.tgs';\n// @ts-ignore\nimport HandFilled from '../../../assets/tgs/calls/HandFilled.tgs';\n// @ts-ignore\nimport HandOutline from '../../../assets/tgs/calls/HandOutline.tgs';\n// @ts-ignore\nimport Speaker from '../../../assets/tgs/calls/Speaker.tgs';\n// @ts-ignore\nimport VoiceAllowTalk from '../../../assets/tgs/calls/VoiceAllowTalk.tgs';\n// @ts-ignore\nimport VoiceMini from '../../../assets/tgs/calls/VoiceMini.tgs';\n// @ts-ignore\nimport VoiceMuted from '../../../assets/tgs/calls/VoiceMuted.tgs';\n// @ts-ignore\nimport VoiceOutlined from '../../../assets/tgs/calls/VoiceOutlined.tgs';\n// @ts-ignore\nimport Peach from '../../../assets/tgs/animatedEmojis/Peach.tgs';\n// @ts-ignore\nimport Eggplant from '../../../assets/tgs/animatedEmojis/Eggplant.tgs';\n// @ts-ignore\nimport Cumshot from '../../../assets/tgs/animatedEmojis/Cumshot.tgs';\n\nexport const ANIMATED_STICKERS_PATHS = {\n MonkeyIdle,\n MonkeyTracking,\n MonkeyClose,\n MonkeyPeek,\n FoldersAll,\n FoldersNew,\n DiscussionGroups,\n CameraFlip,\n HandFilled,\n HandOutline,\n Speaker,\n VoiceAllowTalk,\n VoiceMini,\n VoiceMuted,\n VoiceOutlined,\n Peach,\n Eggplant,\n Cumshot,\n};\n\nexport default function getAnimationData(name: keyof typeof ANIMATED_STICKERS_PATHS) {\n const path = ANIMATED_STICKERS_PATHS[name].replace(window.location.origin, '');\n\n return mediaLoader.fetch(`file${path}`, ApiMediaFormat.Lottie);\n}\n","import React, {\n FC, useEffect, useState, memo,\n} from '../../lib/teact/teact';\n\nimport { DEBUG } from '../../config';\nimport { blobToFile, blobToDataUri } from '../../util/files';\nimport useLang from '../../hooks/useLang';\n\nimport Button from './Button';\nimport Modal from './Modal';\nimport Loading from './Loading';\n\nimport './CropModal.scss';\n\n// Change to 'base64' to get base64-encoded string\nconst cropperResultOptions: Croppie.ResultOptions & { type: 'blob' } = {\n type: 'blob',\n quality: 1,\n format: 'jpeg',\n circle: false,\n size: { width: 1024, height: 1024 },\n};\n\ntype ICroppie = typeof import('croppie');\nlet Croppie: ICroppie;\nlet croppiePromise: Promise<{ default: ICroppie }>;\n\nasync function ensureCroppie() {\n if (!croppiePromise) {\n croppiePromise = import('../../lib/croppie') as unknown as Promise<{ default: ICroppie }>;\n Croppie = (await croppiePromise).default;\n }\n\n return croppiePromise;\n}\n\nlet cropper: Croppie;\n\nasync function initCropper(imgFile: File) {\n try {\n const cropContainer = document.getElementById('avatar-crop');\n if (!cropContainer) {\n return;\n }\n\n const { offsetWidth, offsetHeight } = cropContainer;\n\n cropper = new Croppie(cropContainer, {\n enableZoom: true,\n boundary: {\n width: offsetWidth,\n height: offsetHeight,\n },\n viewport: {\n width: offsetWidth - 16,\n height: offsetHeight - 16,\n type: 'circle',\n },\n });\n\n const dataUri = await blobToDataUri(imgFile);\n await cropper.bind({ url: dataUri });\n } catch (err) {\n if (DEBUG) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n }\n}\n\ntype OwnProps = {\n file?: File;\n onChange: (file: File) => void;\n onClose: () => void;\n};\n\nconst CropModal: FC = ({ file, onChange, onClose }: OwnProps) => {\n const [isCroppieReady, setIsCroppieReady] = useState(false);\n\n useEffect(() => {\n if (!file) {\n return;\n }\n\n if (!isCroppieReady) {\n ensureCroppie().then(() => setIsCroppieReady(true));\n\n return;\n }\n\n initCropper(file);\n }, [file, isCroppieReady]);\n\n const lang = useLang();\n\n async function handleCropClick() {\n if (!cropper) {\n return;\n }\n\n const result: Blob | string = await cropper.result(cropperResultOptions);\n const croppedImg = typeof result === 'string' ? result : blobToFile(result, 'avatar.jpg');\n\n onChange(croppedImg);\n }\n\n return (\n \n {isCroppieReady ? (\n
\n ) : (\n \n )}\n \n \n \n \n );\n};\n\nexport default memo(CropModal);\n","import { ChangeEvent } from 'react';\nimport React, {\n FC, useState, useEffect, memo,\n} from '../../lib/teact/teact';\n\nimport buildClassName from '../../util/buildClassName';\n\nimport CropModal from './CropModal';\n\nimport './AvatarEditable.scss';\n\ninterface OwnProps {\n title?: string;\n disabled?: boolean;\n currentAvatarBlobUrl?: string;\n onChange: (file: File) => void;\n}\n\nconst AvatarEditable: FC = ({\n title = 'Change your profile picture',\n disabled,\n currentAvatarBlobUrl,\n onChange,\n}) => {\n const [selectedFile, setSelectedFile] = useState();\n const [croppedBlobUrl, setCroppedBlobUrl] = useState(currentAvatarBlobUrl);\n\n useEffect(() => {\n setCroppedBlobUrl(currentAvatarBlobUrl);\n }, [currentAvatarBlobUrl]);\n\n function handleSelectFile(event: ChangeEvent) {\n const target = event.target as HTMLInputElement;\n\n if (!target || !target.files || !target.files[0]) {\n return;\n }\n\n setSelectedFile(target.files[0]);\n target.value = '';\n }\n\n function handleAvatarCrop(croppedImg: File) {\n setSelectedFile(undefined);\n onChange(croppedImg);\n\n if (croppedBlobUrl) {\n URL.revokeObjectURL(croppedBlobUrl);\n }\n setCroppedBlobUrl(URL.createObjectURL(croppedImg));\n }\n\n function handleModalClose() {\n setSelectedFile(undefined);\n }\n\n const labelClassName = buildClassName(\n croppedBlobUrl && 'filled',\n disabled && 'disabled',\n );\n\n return (\n
\n \n \n \n {croppedBlobUrl && \"Avatar\"}\n \n \n
\n );\n};\n\nexport default memo(AvatarEditable);\n","import { RefObject } from 'react';\nimport React, {\n FC, useEffect, useRef,\n} from '../../lib/teact/teact';\n\nimport { TextPart } from '../common/helpers/renderMessageText';\n\nimport captureKeyboardListeners from '../../util/captureKeyboardListeners';\nimport trapFocus from '../../util/trapFocus';\nimport buildClassName from '../../util/buildClassName';\nimport { dispatchHeavyAnimationEvent } from '../../hooks/useHeavyAnimationCheck';\nimport useShowTransition from '../../hooks/useShowTransition';\nimport useEffectWithPrevDeps from '../../hooks/useEffectWithPrevDeps';\nimport useLang from '../../hooks/useLang';\nimport useHistoryBack from '../../hooks/useHistoryBack';\n\nimport Button from './Button';\nimport Portal from './Portal';\n\nimport './Modal.scss';\n\nconst ANIMATION_DURATION = 200;\n\ntype OwnProps = {\n title?: string | TextPart[];\n className?: string;\n isOpen?: boolean;\n header?: any;\n hasCloseButton?: boolean;\n noBackdrop?: boolean;\n children: any;\n onClose: () => void;\n onCloseAnimationEnd?: () => void;\n onEnter?: () => void;\n dialogRef?: RefObject;\n};\n\ntype StateProps = {\n shouldSkipHistoryAnimations?: boolean;\n};\n\nconst Modal: FC = ({\n dialogRef,\n title,\n className,\n isOpen,\n header,\n hasCloseButton,\n noBackdrop,\n children,\n onClose,\n onCloseAnimationEnd,\n onEnter,\n shouldSkipHistoryAnimations,\n}) => {\n const {\n shouldRender,\n transitionClassNames,\n } = useShowTransition(\n isOpen, onCloseAnimationEnd, shouldSkipHistoryAnimations, undefined, shouldSkipHistoryAnimations,\n );\n // eslint-disable-next-line no-null/no-null\n const modalRef = useRef(null);\n\n useEffect(() => (isOpen\n ? captureKeyboardListeners({ onEsc: onClose, onEnter })\n : undefined), [isOpen, onClose, onEnter]);\n useEffect(() => (isOpen && modalRef.current ? trapFocus(modalRef.current) : undefined), [isOpen]);\n\n const { forceClose } = useHistoryBack(isOpen, onClose);\n\n // For modals that are closed by unmounting without changing `isOpen` to `false`\n useEffect(() => {\n return () => {\n if (isOpen) {\n forceClose();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffectWithPrevDeps(([prevIsOpen]) => {\n document.body.classList.toggle('has-open-dialog', isOpen);\n if (isOpen || (!isOpen && prevIsOpen !== undefined)) {\n dispatchHeavyAnimationEvent(ANIMATION_DURATION);\n }\n\n return () => {\n document.body.classList.remove('has-open-dialog');\n };\n }, [isOpen]);\n\n const lang = useLang();\n\n if (!shouldRender) {\n return undefined;\n }\n\n function renderHeader() {\n if (header) {\n return header;\n }\n\n if (!title) {\n return undefined;\n }\n\n return (\n
\n {hasCloseButton && (\n \n \n \n )}\n
{title}
\n
\n );\n }\n\n const fullClassName = buildClassName(\n 'Modal',\n className,\n transitionClassNames,\n noBackdrop && 'transparent-backdrop',\n );\n\n return (\n \n \n
\n
\n
\n {renderHeader()}\n
\n {children}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Modal;\n","export default function trapFocus(element: HTMLElement) {\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key !== 'Tab') {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n const focusableElements = Array.from(\n element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'),\n ) as HTMLElement[];\n if (!focusableElements.length) {\n return;\n }\n\n const currentFocusedIndex = focusableElements.findIndex((em) => em.isSameNode(document.activeElement));\n let newFocusedIndex = 0;\n if (currentFocusedIndex >= 0) {\n if (e.shiftKey) {\n newFocusedIndex = currentFocusedIndex > 0\n ? currentFocusedIndex - 1\n : focusableElements.length - 1;\n } else {\n newFocusedIndex = currentFocusedIndex < focusableElements.length - 1\n ? currentFocusedIndex + 1\n : 0;\n }\n }\n\n focusableElements[newFocusedIndex].focus();\n }\n\n document.addEventListener('keydown', handleKeyDown, false);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown, false);\n };\n}\n","import { FC, useRef, useLayoutEffect } from '../../lib/teact/teact';\nimport TeactDOM from '../../lib/teact/teact-dom';\n\ntype OwnProps = {\n containerId?: string;\n className?: string;\n children: any;\n};\n\nconst Portal: FC = ({ containerId, className, children }) => {\n const elementRef = useRef();\n if (!elementRef.current) {\n elementRef.current = document.createElement('div');\n }\n\n useLayoutEffect(() => {\n const container = document.querySelector(containerId || '#portals');\n if (!container) {\n return undefined;\n }\n\n const element = elementRef.current!;\n if (className) {\n element.classList.add(className);\n }\n\n container.appendChild(element);\n\n return () => {\n TeactDOM.render(undefined, element);\n container.removeChild(element);\n };\n }, [className, containerId]);\n\n return TeactDOM.render(children, elementRef.current);\n};\n\nexport default Portal;\n","import { useEffect } from '../lib/teact/teact';\n\nexport default function useBackgroundMode(\n onBlur?: AnyToVoidFunction,\n onFocus?: AnyToVoidFunction,\n) {\n useEffect(() => {\n if (onBlur && !document.hasFocus()) {\n onBlur();\n }\n\n if (onBlur) {\n window.addEventListener('blur', onBlur);\n }\n\n if (onFocus) {\n window.addEventListener('focus', onFocus);\n }\n\n return () => {\n if (onFocus) {\n window.removeEventListener('focus', onFocus);\n }\n\n if (onBlur) {\n window.removeEventListener('blur', onBlur);\n }\n };\n }, [onBlur, onFocus]);\n}\n"],"names":["STICKER_SIZE","IS_SINGLE_COLUMN_LAYOUT","STICKER_SIZE_AUTH_MOBILE","STICKER_SIZE_AUTH","memo","code","codeLength","trackingDirection","isTracking","isBig","idleMonkeyData","setIdleMonkeyData","useState","trackingMonkeyData","setTrackingMonkeyData","isFirstMonkeyLoaded","setIsFirstMonkeyLoaded","TRACKING_FRAMES_PER_SYMBOL","useEffect","getAnimationData","then","handleFirstMonkeyLoad","useCallback","id","className","AnimatedSticker","size","STICKER_SIZE_TWO_FA","undefined","animationData","play","onLoad","playSegment","startFrame","length","endFrame","getTrackingFrames","speed","noLoop","withGlobal","global","pick","authPhoneNumber","authIsCodeViaApp","authIsLoading","authError","setAuthCode","returnToAuthPhoneNumber","clearAuthError","getDispatch","lang","useLang","inputRef","useRef","setCode","setIsTracking","setTrackingDirection","IS_TOUCH_ENV","current","focus","useHistoryBack","onCodeChange","e","currentTarget","target","value","replace","substr","onClick","role","tabIndex","title","renderText","InputText","ref","label","onInput","error","autoComplete","inputMode","Loading","authHint","setAuthPassword","showPassword","setShowPassword","handleChangePasswordVisibility","isVisible","handleSubmit","password","isPasswordVisible","PasswordForm","clearError","hint","isLoading","onChangePasswordVisibility","onSubmit","signUp","uploadProfilePhoto","isButtonShown","setIsButtonShown","croppedFile","setCroppedFile","firstName","setFirstName","lastName","setLastName","action","method","event","preventDefault","file","AvatarEditable","onChange","Button","type","ripple","lottiePromise","RLottie","async","ensureLottie","default","setTimeout","quality","isLowPriority","color","forceOnHeavyAnimation","onEnded","animation","setAnimation","container","wasPlaying","isFrozen","isFirstRender","playRef","playSegmentRef","exec","newAnimation","setSpeed","fastRaf","setColor","destroy","playAnimation","shouldRestart","goToAndPlay","pauseAnimation","pause","freezeAnimation","isPlaying","unfreezeAnimation","unfreezeAnimationOnRaf","changeData","useHeavyAnimationCheck","useBackgroundMode","fullClassName","buildClassName","style","FOCUS_DELAY_TIMEOUT_MS","placeholder","submitLabel","onInputChange","setPassword","canSubmit","setCanSubmit","requestAnimationFrame","select","dir","isRtl","MIN_PASSWORD_LENGTH","SEGMENT_COVER_EYES","SEGMENT_UNCOVER_EYE","SEGMENT_COVER_EYE","closeMonkeyData","setCloseMonkeyData","peekMonkeyData","setPeekMonkeyData","isPeekShown","setIsPeekShown","ANIMATED_STICKERS_PATHS","MonkeyIdle","MonkeyTracking","MonkeyClose","MonkeyPeek","FoldersAll","FoldersNew","DiscussionGroups","CameraFlip","HandFilled","HandOutline","Speaker","VoiceAllowTalk","VoiceMini","VoiceMuted","VoiceOutlined","Peach","Eggplant","Cumshot","name","path","window","location","origin","mediaLoader","ApiMediaFormat","cropperResultOptions","format","circle","width","height","Croppie","croppiePromise","cropper","onClose","isCroppieReady","setIsCroppieReady","imgFile","cropContainer","document","getElementById","offsetWidth","offsetHeight","enableZoom","boundary","viewport","dataUri","blobToDataUri","bind","url","err","DEBUG","console","initCropper","ensureCroppie","Modal","isOpen","Boolean","hasCloseButton","round","result","croppedImg","blobToFile","ariaLabel","disabled","currentAvatarBlobUrl","selectedFile","setSelectedFile","croppedBlobUrl","setCroppedBlobUrl","labelClassName","files","accept","src","alt","URL","revokeObjectURL","createObjectURL","dialogRef","header","noBackdrop","children","onCloseAnimationEnd","onEnter","shouldSkipHistoryAnimations","shouldRender","transitionClassNames","useShowTransition","modalRef","captureKeyboardListeners","onEsc","element","handleKeyDown","key","stopPropagation","focusableElements","Array","from","querySelectorAll","currentFocusedIndex","findIndex","em","isSameNode","activeElement","newFocusedIndex","shiftKey","addEventListener","removeEventListener","trapFocus","forceClose","useEffectWithPrevDeps","prevIsOpen","body","classList","toggle","dispatchHeavyAnimationEvent","remove","Portal","containerId","elementRef","createElement","useLayoutEffect","querySelector","add","appendChild","TeactDOM","removeChild","onBlur","onFocus","hasFocus"],"sourceRoot":""}