{"version":3,"sources":["shared/FlixHeader.tsx","createSecret/CreateSecret.tsx","displaySecret/Error.tsx","createSecret/Form.tsx","utils/utils.tsx","shared/Loading.tsx","displaySecret/Secret.tsx","displaySecret/DisplaySecret.tsx","displaySecret/Download.tsx","shared/Expiration.tsx","displaySecret/Result.tsx","createSecret/Upload.tsx","Routes.tsx","shared/Attribution.tsx","theme.ts","App.tsx","i18n.tsx","index.tsx"],"names":["FlixHeader","fixed","brand","alt","image","href","process","navigation","Error","props","message","appearance","OneTime","t","useTranslation","control","name","defaultValue","render","onChange","value","id","defaultChecked","event","target","checked","label","small","SpecifyPasswordInput","autoComplete","SpecifyPasswordToggle","handleChange","CreateSecret","size","error","Elem","Form","uuid","prefix","useState","password","setPassword","redirect","setRedirect","to","btoa","Container","maxWidth","Grid","container","direction","spacing","item","xs","TextField","fullWidth","autoFocus","placeholder","e","onClick","randomString","text","possible","i","charAt","randomInt","length","min","max","byteArray","Uint8Array","window","crypto","getRandomValues","range","Math","floor","backendDomain","REACT_APP_BACKEND_URL","uploadFile","body","a","post","url","fetch","JSON","stringify","method","request","json","status","data","decryptMessage","passwords","format","decrypt","readArmored","r","Loading","useStyles","makeStyles","pre","backgroundColor","padding","border","display","fontSize","borderRadius","wordWrap","wordBreak","Secret","copyToClipboard","useCopyToClipboard","classes","secret","InlineIcon","IconCopy","style","fill","className","DisplaySecret","useParams","key","isEncoded","useLocation","pathname","match","useAsync","atob","loading","DownloadSuccess","Typography","variant","Download","file","saveAs","Blob","type","filename","Expiration","FormControl","component","FormLabel","rules","required","as","RadioGroup","row","FormControlLabel","labelPlacement","Radio","SecretLinks","alignItems","width","fontWeight","Result","base","short","full","isCustomPassword","extraClasses","Upload","setError","generateDecryptionKey","setGenerateDecryptionKey","result","setResult","useForm","defaultValues","expiration","onetime","handleSubmit","form","watch","onDrop","useCallback","acceptedFiles","reader","FileReader","onabort","console","log","onerror","onload","onSubmit","pw","encrypt","armor","fromBinary","parseInt","one_time","forEach","readAsArrayBuffer","useDropzone","maxSize","minSize","getRootProps","getInputProps","fileRejections","isFileTooLarge","errors","code","justifyContent","IconUpload","mt","Routes","path","exact","Attribution","position","bottom","right","left","textAlign","theme","createMuiTheme","palette","primary","main","secondary","App","ThemeProvider","i18n","use","initReactI18next","Backend","init","backend","loadPath","fallbackLng","lng","debug","ns","defaultNS","keySeparator","interpolation","escapeValue","formatSeparator","appendNamespaceToMissingKey","ReactDOM","fallback","document","getElementById"],"mappings":"iMAEaA,EAAa,WAOxB,OAAO,cAAC,IAAD,CAAQC,OAAO,EAAOC,MANf,CACZC,IAAK,YACLC,MAAO,WACPC,KAAMC,IAGmCC,WAAY,M,qECG5CC,G,MAAQ,SAACC,GAKpB,OAAOA,EAAMC,QACX,cAAC,IAAD,yBAASC,WAAW,UAAaF,GAAjC,aACGA,EAAMC,WAEP,OAGOE,EAAU,SAACH,GAAmD,IACjEI,EAAMC,cAAND,EAER,OACE,cAAC,IAAD,CACEE,QAASN,EAAMM,QACfC,KAAK,UACLC,cAAc,EACdC,OAAQ,YAA0B,IAAvBC,EAAsB,EAAtBA,SAAUC,EAAY,EAAZA,MACnB,OACE,cAAC,IAAD,CACEC,GAAG,iBACHD,MAAM,iBACNJ,KAAK,UACLM,eAAgBF,EAChBD,SAAU,SAACI,GAAD,OAAWJ,EAASI,EAAMC,OAAOC,UAC3CC,MAAOb,EAAE,qBACTc,OAAK,QAQJC,EAAuB,SAACnB,GAE9B,IACGI,EAAMC,cAAND,EACR,OACE,cAAC,IAAD,CACEE,QAASN,EAAMM,QACfC,KAAK,WACLC,aAAa,GACbC,OAAQ,gBAAGC,EAAH,EAAGA,SAAH,OACN,cAAC,IAAD,CACEO,MAAOb,EAAE,yBACTQ,GAAG,WACHL,KAAK,WACLa,aAAa,MACbV,SAAUA,QAOPW,EAAwB,SAACrB,GAG/B,IACGI,EAAMC,cAAND,EAER,OACE,cAAC,IAAD,CACEQ,GAAG,2BACHL,KAAK,wBACLI,MAAM,wBACNE,eAAgBb,EAAMa,eAC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C,IAAIC,MACJD,IAAIE,MACJC,KAAK,CACJC,QAAS,CACPC,SAAmC,yBAGrCC,YAAa,KACbC,IAAK,KACLC,OAAO,EAGPC,GAAI,CAAC,gBACLC,UAAW,eAEXC,cAAc,EAEdC,cAAe,CACbC,aAAa,EACbC,gBAAiB,KAGnBC,6BAA6B,IAGlBhB,GAAf,EC1BAiB,IAAS7N,OACP,cAAC,WAAD,CAAU8N,SAAU,6CAApB,SACE,cAAC,GAAD,MAEFC,SAASC,eAAe,W","file":"static/js/main.4a5726ae.chunk.js","sourcesContent":["import { Header } from '@flixbus/honeycomb-react';\n\nexport const FlixHeader = () => {\n const brand = {\n alt: 'Flixvault',\n image: 'logo.svg',\n href: process.env.PUBLIC_URL,\n };\n\n return
;\n};\n","import { useTranslation } from 'react-i18next';\nimport { Controller, UseFormMethods } from 'react-hook-form';\nimport { Heading, Infobox, Input, Checkbox } from '@flixbus/honeycomb-react';\n\nimport '@flixbus/honeycomb-react/dist/css/honeycomb-helpers.css';\n\nconst CreateSecret = () => {\n const { t } = useTranslation();\n\n return {t('Nothing to show!')};\n};\n\nexport const Error = (props: {\n errors?: any;\n message?: string;\n onClick?: () => void;\n}) => {\n return props.message ? (\n \n {props.message}\n \n ) : null;\n};\n\nexport const OneTime = (props: { control: UseFormMethods['control'] }) => {\n const { t } = useTranslation();\n\n return (\n {\n return (\n onChange(event.target.checked)}\n label={t('One-time download')}\n small\n />\n );\n }}\n />\n );\n};\n\nexport const SpecifyPasswordInput = (props: {\n control: UseFormMethods['control'];\n}) => {\n const { t } = useTranslation();\n return (\n (\n \n )}\n />\n );\n};\n\nexport const SpecifyPasswordToggle = (props: {\n defaultChecked: boolean;\n handleChange: any;\n}) => {\n const { t } = useTranslation();\n\n return (\n \n );\n};\n\nexport default CreateSecret;\n","import { useTranslation } from 'react-i18next';\nimport { Heading, Text } from '@flixbus/honeycomb-react';\n\nconst Error = (props: { error?: Error }) => {\n const { t } = useTranslation();\n\n if (!props.error) {\n return null;\n }\n\n return (\n
\n {t('Secret does not exist')}\n \n {t('It might be caused by any of these reasons.')}\n \n
\n {t('Opened before')}\n \n {t(\n 'A secret can be restricted to a single download. It might be lost because the sender clicked this link before you viewed it.',\n )}\n
\n {t(\n 'The secret might have been compromised and read by someone else. You should contact the sender and request a new secret.',\n )}\n\n {t('Broken link')}\n {t(\n 'The link must match perfectly in order for the decryption to work, it might be missing some magic digits.',\n )}\n {t('Expired')}\n {t(\n 'No secret last forever. All stored secrets will expires and self destruct automatically. Lifetime varies from one hour up to one week.',\n )}\n
\n
\n );\n};\nexport default Error;\n","import { useState } from 'react';\nimport { Redirect } from 'react-router-dom';\nimport { Button } from '@flixbus/honeycomb-react';\nimport { Container, Grid, TextField } from '@material-ui/core';\nimport { useTranslation } from 'react-i18next';\n\ntype FormProps = {\n readonly uuid: string;\n readonly prefix: string;\n};\n\nconst Form = ({ uuid, prefix }: FormProps) => {\n const [password, setPassword] = useState('');\n const [redirect, setRedirect] = useState(false);\n const { t } = useTranslation();\n\n const doRedirect = (): void => {\n if (password) {\n setRedirect(true);\n }\n };\n\n if (redirect) {\n if (prefix === 'c' || prefix === 'd') {\n // Base64 encode the password to support special characters\n return ;\n }\n return ;\n }\n\n return (\n \n \n \n setPassword(e.target.value)}\n />\n \n \n \n \n \n \n );\n};\nexport default Form;\n","import { message, encrypt, decrypt, DecryptResult } from 'openpgp';\n\ntype Response = {\n // TODO: this shouldn't be any\n data: any;\n status: number;\n};\n\nexport const randomString = (): string => {\n let text = '';\n const possible =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (let i = 0; i < 22; i++) {\n text += possible.charAt(randomInt(0, possible.length));\n }\n return text;\n};\n\nconst randomInt = (min: number, max: number): number => {\n const byteArray = new Uint8Array(1);\n window.crypto.getRandomValues(byteArray);\n\n const range = max - min;\n const maxRange = 256;\n if (byteArray[0] >= Math.floor(maxRange / range) * range) {\n return randomInt(min, max);\n }\n return min + (byteArray[0] % range);\n};\n\nexport const backendDomain = process.env.REACT_APP_BACKEND_URL\n ? `${process.env.REACT_APP_BACKEND_URL}`\n : '';\n\nexport const postSecret = async (body: any): Promise => {\n return post(backendDomain + '/secret', body);\n};\n\nexport const uploadFile = async (body: any): Promise => {\n return post(backendDomain + '/file', body);\n};\n\nconst post = async (url: string, body: any): Promise => {\n const request = await fetch(url, {\n body: JSON.stringify(body),\n method: 'POST',\n });\n return { data: await request.json(), status: request.status };\n};\n\nexport const decryptMessage = async (\n data: string,\n passwords: string,\n format: 'utf8' | 'binary',\n): Promise => {\n const r = await decrypt({\n message: await message.readArmored(data),\n passwords,\n format,\n });\n return r;\n};\n\nexport const encryptMessage = async (\n data: string,\n passwords: string,\n): Promise => {\n const r = await encrypt({\n message: message.fromText(data),\n passwords,\n });\n return r.data as string;\n};\n\nexport default randomString;\n","import { useTranslation } from 'react-i18next';\n\nconst Loading = () => {\n const { t } = useTranslation();\n return (\n

\n {t('Fetching from database and decrypting in browser, please hold...')}\n

\n );\n};\n\nexport default Loading;\n","import { useTranslation } from 'react-i18next';\nimport {\n Button,\n Heading,\n Icon,\n IconCopy,\n Text,\n} from '@flixbus/honeycomb-react';\nimport { makeStyles } from '@material-ui/core';\nimport { useCopyToClipboard } from 'react-use';\n\nconst useStyles = makeStyles(() => ({\n pre: {\n backgroundColor: '#ecf0f1',\n padding: '15px',\n border: '1px solid #cccccc',\n display: 'block',\n fontSize: '14px',\n borderRadius: '4px',\n wordWrap: 'break-word',\n wordBreak: 'break-all',\n },\n}));\n\nconst Secret = (props: { readonly secret?: string }) => {\n const { t } = useTranslation();\n const copyToClipboard = useCopyToClipboard()[1];\n const classes = useStyles();\n const { secret } = props;\n if (!secret) {\n return null;\n }\n\n return (\n
\n {t('Decrypted Message')}\n \n {t(\n 'This secret might not be viewable again, make sure to save it now!',\n )}\n \n \n
\n        {secret}\n      
\n
\n );\n};\n\nexport default Secret;\n","import { useLocation, useParams } from 'react-router-dom';\nimport Error from './Error';\nimport Form from '../createSecret/Form';\nimport { backendDomain, decryptMessage } from '../utils/utils';\nimport { useAsync } from 'react-use';\nimport Loading from '../shared/Loading';\nimport Secret from './Secret';\n\nexport type DisplayParams = {\n key: string;\n password: string;\n};\n\nconst DisplaySecret = () => {\n const { key, password } = useParams();\n const location = useLocation();\n const isEncoded = null !== location.pathname.match(/\\/c\\//);\n\n const { value, error, loading } = useAsync(async () => {\n if (!password) {\n return;\n }\n const request = await fetch(`${backendDomain}/secret/${key}`);\n const data = await request.json();\n const r = await decryptMessage(\n data.message,\n isEncoded ? atob(password) : password,\n 'utf8',\n );\n return r.data as string;\n }, [isEncoded, password, key]);\n\n return (\n
\n {loading && }\n \n \n {!password &&
}\n
\n );\n};\n\nexport default DisplaySecret;\n","import { saveAs } from 'file-saver';\nimport { useParams, useLocation } from 'react-router-dom';\nimport Error from './Error';\nimport Form from '../createSecret/Form';\nimport { backendDomain, decryptMessage } from '../utils/utils';\nimport { useTranslation } from 'react-i18next';\nimport Loading from '../shared/Loading';\nimport { useAsync } from 'react-use';\nimport { DisplayParams } from './DisplaySecret';\nimport { Typography } from '@material-ui/core';\n\nconst Download = () => {\n const { key, password } = useParams();\n const location = useLocation();\n const isEncoded = null !== location.pathname.match(/\\/d\\//);\n\n const { loading, value, error } = useAsync(async () => {\n if (!password) {\n return;\n }\n const request = await fetch(`${backendDomain}/file/${key}`);\n const data = await request.json();\n const file = await decryptMessage(\n data.message,\n isEncoded ? atob(password) : password,\n 'binary',\n );\n saveAs(\n new Blob([file.data as string], {\n type: 'application/octet-stream',\n }),\n file.filename,\n );\n return true;\n }, [password, key, isEncoded]);\n\n return (\n
\n {loading && }\n {value && }\n \n {!password && }\n
\n );\n};\n\nconst DownloadSuccess = () => {\n const { t } = useTranslation();\n return (\n
\n \n {t('Downloading file and decrypting in browser, please hold...')}\n \n \n {t('Make sure to download the file since it is only available once')}\n \n
\n );\n};\nexport default Download;\n","import { Controller, UseFormMethods } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport {\n FormControl,\n FormControlLabel,\n FormLabel,\n Radio,\n RadioGroup,\n} from '@material-ui/core';\n\nexport const Expiration = (props: { control: UseFormMethods['control'] }) => {\n const { t } = useTranslation();\n\n return (\n \n \n {t('The encrypted message will be deleted automatically after')}\n \n \n }\n label={t('One Hour')}\n />\n }\n label={t('One Day')}\n />\n }\n label={t('One Week')}\n />\n \n }\n />\n \n );\n};\nexport default Expiration;\n","import { useCopyToClipboard } from 'react-use';\nimport { Button, Heading, Text, IconCopy } from '@flixbus/honeycomb-react';\nimport { useTranslation } from 'react-i18next';\n\nimport '@flixbus/honeycomb-react/dist/css/honeycomb-helpers.css';\n\ntype ResultProps = {\n readonly uuid: string;\n readonly password: string;\n readonly prefix: string;\n};\n\nconst Result = ({ uuid, password, prefix }: ResultProps) => {\n const base = `https://flixvault.security.flix.tech/#/${prefix}`;\n const short = `${base}/${uuid}`;\n const full = `${short}/${password}`;\n const isCustomPassword = prefix === 'c' || prefix === 'd';\n const { t } = useTranslation();\n\n return (\n
\n \n {t('Secret stored in database')}\n \n \n {t(\n 'Remember that the secret can only be downloaded once so do not open the link yourself.',\n )}\n
\n {t(\n 'The cautious should send the decryption key in a separate communication channel.',\n )}\n
\n {!isCustomPassword && (\n \n )}\n \n \n
\n );\n};\n\ntype SecretLinksProps = {\n readonly label: string;\n readonly value: string;\n};\n\nconst SecretLinks = ({ label, value }: SecretLinksProps) => {\n const copyToClipboard = useCopyToClipboard()[1];\n\n return (\n \n copyToClipboard(value)}\n />\n \n {label}\n \n {value}\n \n );\n};\n\nexport default Result;\n","import { encrypt, message } from 'openpgp';\nimport { useCallback, useState } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport {\n Error,\n SpecifyPasswordToggle,\n SpecifyPasswordInput,\n OneTime,\n} from './CreateSecret';\nimport Expiration from '../shared/Expiration';\nimport Result from '../displaySecret/Result';\nimport { randomString, uploadFile } from '../utils/utils';\nimport { useTranslation } from 'react-i18next';\nimport { useForm } from 'react-hook-form';\nimport { Heading, Icon, IconUpload, Text } from '@flixbus/honeycomb-react';\nimport { Grid } from '@material-ui/core';\n\nconst Upload = () => {\n const maxSize = 1024 * 500;\n const [error, setError] = useState('');\n const { t } = useTranslation();\n const [generateDecryptionKey, setGenerateDecryptionKey] = useState(true);\n const [result, setResult] = useState({\n password: '',\n prefix: '',\n uuid: '',\n });\n\n const { control, handleSubmit, watch } = useForm({\n defaultValues: {\n secret: '',\n password: '',\n expiration: '3600',\n onetime: true,\n },\n });\n\n const form = watch();\n const onDrop = useCallback(\n (acceptedFiles: File[]) => {\n const reader = new FileReader();\n reader.onabort = () => console.log('file reading was aborted');\n reader.onerror = () => console.log('file reading has failed');\n reader.onload = async () => {\n handleSubmit(onSubmit)();\n const pw = form.password ? form.password : randomString();\n const file = await encrypt({\n armor: true,\n message: message.fromBinary(\n new Uint8Array(reader.result as ArrayBuffer),\n acceptedFiles[0].name,\n ),\n passwords: pw,\n });\n const { data, status } = await uploadFile({\n expiration: parseInt(form.expiration),\n message: file.data,\n one_time: form.onetime,\n });\n\n if (status !== 200) {\n setError(data.message);\n } else {\n setResult({\n uuid: data.message,\n password: pw,\n prefix: form.password ? 'd' : 'f',\n });\n }\n };\n acceptedFiles.forEach((file) => reader.readAsArrayBuffer(file));\n },\n [form, handleSubmit],\n );\n\n const { getRootProps, getInputProps, fileRejections } = useDropzone({\n maxSize,\n minSize: 0,\n onDrop,\n });\n\n const onSubmit = () => {};\n\n const isFileTooLarge =\n fileRejections.length > 0 &&\n fileRejections[0].errors[0].code === 'file-too-large';\n\n if (result.uuid) {\n return (\n \n );\n }\n return (\n \n {isFileTooLarge && }\n setError('')} />\n \n
\n \n \n {t('Drop file to upload')}\n \n \n \n {t(\n 'File upload is designed for small files like ssh keys and certificates.',\n )}\n \n \n \n \n \n
\n\n \n \n \n \n \n {\n setGenerateDecryptionKey(event.target.checked)\n }}\n />\n \n {!generateDecryptionKey && (\n \n )}\n \n \n \n
\n );\n};\n\nexport default Upload;\n","import { Route } from 'react-router-dom';\n\nimport CreateSecret from './createSecret/CreateSecret';\nimport DisplaySecret from './displaySecret/DisplaySecret';\nimport Download from './displaySecret/Download';\nimport Upload from './createSecret/Upload';\n\nexport const Routes = () => {\n return (\n
\n \n \n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Link, Fineprint } from '@flixbus/honeycomb-react';\nimport { useTranslation } from 'react-i18next';\n\nexport const Attribution = () => {\n const { t } = useTranslation();\n return (\n
\n \n {t('Powered By Yopass Created By')}{' '}\n Johan Haals\n \n
\n );\n};\n","import { createMuiTheme } from '@material-ui/core/styles';\n\nexport const theme = createMuiTheme({\n palette: {\n primary: {\n main: \"#73d700\"\n },\n secondary: {\n main: \"#ffad00\"\n },\n },\n});\n","import { HashRouter as Router } from 'react-router-dom';\nimport { ThemeProvider } from '@material-ui/core/styles';\nimport {\n ThemeWrapper,\n MainWrapper,\n PageContainer,\n} from '@flixbus/honeycomb-react';\n\nimport { FlixHeader } from './shared/FlixHeader';\nimport { Routes } from './Routes';\nimport { Attribution } from './shared/Attribution';\nimport { theme } from './theme';\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nimport Backend from 'i18next-http-backend';\n\ni18n\n .use(initReactI18next)\n .use(Backend)\n .init({\n backend: {\n loadPath: process.env.PUBLIC_URL + '/locales/{{lng}}.json',\n },\n\n fallbackLng: 'en',\n lng: 'en',\n debug: false,\n\n // have a common namespace used around the full app\n ns: ['translations'],\n defaultNS: 'translations',\n\n keySeparator: false, // we use content as keys\n\n interpolation: {\n escapeValue: false, // not needed for react!!\n formatSeparator: ',',\n },\n\n appendNamespaceToMissingKey: true,\n });\n\nexport default i18n;\n","import ReactDOM from 'react-dom';\nimport { Suspense } from 'react';\nimport App from './App';\nimport './i18n';\n\nReactDOM.render(\n Loading...}>\n \n ,\n document.getElementById('root'),\n);\n"],"sourceRoot":""}