{"version":3,"sources":["Result.tsx","utils.tsx","Create.tsx","Error.tsx","Form.tsx","DisplaySecret.tsx","Download.tsx","Features.tsx","Upload.tsx","App.tsx","i18n.tsx","registerServiceWorker.ts","index.tsx"],"names":["CopyField","props","Clipboard","name","target","document","getElementById","FormGroup","Label","label","className","Button","color","id","icon","faCopy","Input","readOnly","value","Result","uuid","password","prefix","base","window","location","protocol","host","short","full","t","useTranslation","randomString","text","possible","i","charAt","randomInt","length","min","max","byteArray","Uint8Array","crypto","getRandomValues","range","Math","floor","BACKEND_DOMAIN","process","REACT_APP_BACKEND_URL","postSecret","body","a","post","uploadFile","url","fetch","JSON","stringify","method","request","json","status","data","decryptMessage","passwords","format","openpgp","readArmored","message","decrypt","r","encryptMessage","fromText","OneTime","onetime","setOnetime","type","onChange","checked","Lifetime","expiration","setExpiration","buttons","duration","push","key","check","inline","e","tag","FormText","Error","Alert","Create","useState","error","setError","secret","setSecret","loading","setLoading","setUUID","setPassword","submit","pw","one_time","onClick","rows","autoFocus","placeholder","disabled","size","block","display","Form","redirect","setRedirect","to","Col","sm","Secret","DisplaySecret","showError","useParams","useCallback","console","log","useEffect","DownloadSuccess","Download","file","saveAs","Blob","filename","Feature","title","children","Features","Container","Row","faLock","faBomb","faDownload","faShareAlt","faUserAltSlash","faCodeBranch","Upload","onDrop","React","acceptedFiles","reader","FileReader","onabort","onerror","onload","armor","fromBinary","result","forEach","readAsArrayBuffer","useDropzone","maxSize","minSize","getRootProps","getInputProps","rejectedFiles","isDragActive","isFileTooLarge","faFileUpload","App","Navbar","dark","expand","NavbarBrand","href","width","height","alt","src","Routes","path","exact","component","Attribution","i18n","use","initReactI18next","Backend","init","backend","loadPath","fallbackLng","lng","debug","ns","defaultNS","keySeparator","interpolation","escapeValue","formatSeparator","appendNamespaceToMissingKey","isLocalhost","Boolean","hostname","match","registerValidSW","swUrl","navigator","serviceWorker","register","then","registration","onupdatefound","installingWorker","installing","onstatechange","state","controller","catch","ReactDOM","fallback","URL","toString","origin","addEventListener","response","headers","get","indexOf","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"qVAmCMA,EAAY,SAChBC,GAUA,OAJA,IAAIC,IAAJ,WAAkBD,EAAME,KAAxB,MAAkC,CAChCC,OAAQ,kBAAMC,SAASC,eAAT,UAA2BL,EAAME,KAAjC,UAId,gBAACI,EAAA,EAAD,KACE,gBAACC,EAAA,EAAD,KAAQP,EAAMQ,OACd,uBAAKC,UAAU,oBACb,uBAAKA,UAAU,sBACb,gBAACC,EAAA,EAAD,CAAQC,MAAM,UAAUC,GAAE,UAAKZ,EAAME,KAAX,OACvB,IACD,gBAAC,IAAD,CAAiBW,KAAMC,QAG3B,gBAACC,EAAA,EAAD,CAAOC,UAAU,EAAMJ,GAAE,UAAKZ,EAAME,KAAX,MAAqBe,MAAOjB,EAAMiB,WAMpDC,EAvDA,SACblB,GAKI,IACImB,EAA2BnB,EAA3BmB,KAAMC,EAAqBpB,EAArBoB,SAAUC,EAAWrB,EAAXqB,OAClBC,EAAI,UAAMC,OAAOC,SAASC,SAAtB,aAAmCF,OAAOC,SAASE,KAAnD,cAA6DL,GACjEM,EAAK,UAAML,EAAN,YAAcH,GACnBS,EAAI,UAAMD,EAAN,YAAeP,GACjBS,EAAMC,cAAND,EAER,OACE,2BACE,0BAAKA,EAAE,8BACP,yBACGA,EAAE,0FACH,2BACCA,EAAE,qFAEL,gBAAC,EAAD,CAAW3B,KAAK,OAAOM,MAAOqB,EAAE,kBAAmBZ,MAAOW,IAC1D,gBAAC,EAAD,CAAW1B,KAAK,QAAQM,MAAOqB,EAAE,cAAeZ,MAAOU,IACvD,gBAAC,EAAD,CAAWzB,KAAK,MAAMM,MAAOqB,EAAE,kBAAmBZ,MAAOG,M,QC5BlDW,EAAe,WAI1B,IAHA,IAAIC,EAAO,GACLC,EACJ,iEACOC,EAAI,EAAGA,EAAI,GAAIA,IACtBF,GAAQC,EAASE,OAAOC,EAAU,EAAGH,EAASI,SAEhD,OAAOL,GAGHI,E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I,MAAK,SAAAe,GAGkB,MAApBA,EAASpK,SACwD,IAAjEoK,EAASC,QAAQC,IAAI,gBAAiBC,QAAQ,cAG9CrB,UAAUC,cAAcqB,MAAMnB,MAAK,SAAAC,GACjCA,EAAamB,aAAapB,MAAK,WAC7B5L,OAAOC,SAASgN,eAKpB1B,GAAgBC,MAGnBY,OAAM,WACL7F,QAAQC,IACN,oEAvEA0G,CAAwB1B,GAIxBC,UAAUC,cAAcqB,MAAMnB,MAAK,WACjCrF,QAAQC,IACN,gHAMJ+E,GAAgBC,OCtCxB2B,I","file":"static/js/main.0e1191eb.chunk.js","sourcesContent":["import { faCopy } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport Clipboard from 'clipboard';\nimport * as React from 'react';\nimport { Button, FormGroup, Input, Label } from 'reactstrap';\nimport { useTranslation } from 'react-i18next';\n\nconst Result = (\n props: {\n readonly uuid: string;\n readonly password: string;\n readonly prefix: string;\n } & React.HTMLAttributes,\n) => {\n const { uuid, password, prefix } = props;\n const base = `${window.location.protocol}//${window.location.host}/#/${prefix}`;\n const short = `${base}/${uuid}`;\n const full = `${short}/${password}`;\n const { t } = useTranslation();\n\n return (\n
\n

{t(\"Secret stored in database\")}

\n

\n {t(\"Remember that the secret can only be downloaded once so do not open the link yourself.\")}\n
\n {t(\"The cautious should send the decryption key in a separate communication channel.\")}\n

\n \n \n \n
\n );\n};\n\nconst CopyField = (\n props: {\n readonly label: string;\n readonly name: string;\n readonly value: string;\n } & React.HTMLAttributes,\n) => {\n new Clipboard(`#${props.name}-b`, {\n target: () => document.getElementById(`${props.name}-i`) as Element,\n });\n\n return (\n \n \n
\n
\n \n
\n \n
\n
\n );\n};\n\nexport default Result;\n","import * as openpgp from 'openpgp';\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 BACKEND_DOMAIN = process.env.REACT_APP_BACKEND_URL\n ? `${process.env.REACT_APP_BACKEND_URL}`\n : '';\n\nexport const postSecret = async (body: any) => {\n return post(BACKEND_DOMAIN + '/secret', body);\n};\n\nexport const uploadFile = async (body: any) => {\n return post(BACKEND_DOMAIN + '/file', body);\n};\n\nconst post = async (url: string, body: any) => {\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) => {\n const r = await openpgp.decrypt({\n message: await openpgp.message.readArmored(data),\n passwords,\n format,\n });\n return r;\n};\n\nexport const encryptMessage = async (data: string, passwords: string) => {\n const r = await openpgp.encrypt({\n message: openpgp.message.fromText(data),\n passwords,\n });\n return r.data as string;\n};\n\nexport default randomString;\n","import * as React from 'react';\nimport { useState } from 'react';\nimport {\n Alert,\n Button,\n Form,\n FormGroup,\n FormText,\n Input,\n Label,\n} from 'reactstrap';\nimport Result from './Result';\nimport { encryptMessage, postSecret, randomString } from './utils';\nimport { useTranslation } from 'react-i18next';\n\nconst Create = () => {\n const [expiration, setExpiration] = useState(3600);\n const [error, setError] = useState('');\n const [secret, setSecret] = useState('');\n const [onetime, setOnetime] = useState(true);\n const [loading, setLoading] = useState(false);\n const [uuid, setUUID] = useState('');\n const [password, setPassword] = useState('');\n\n const { t } = useTranslation();\n\n const submit = async () => {\n if (!secret) {\n return;\n }\n setLoading(true);\n setError('');\n try {\n const pw = randomString();\n const { data, status } = await postSecret({\n expiration,\n message: await encryptMessage(secret, pw),\n one_time: onetime,\n });\n if (status !== 200) {\n setError(data.message);\n } else {\n setUUID(data.message);\n setPassword(pw);\n }\n } catch (e) {\n setError(e.message);\n }\n setLoading(false);\n };\n\n return (\n
\n

{t(\"Encrypt message\")}

\n setError('')} />\n {uuid ? (\n \n ) : (\n
\n \n \n setSecret(e.target.value)}\n value={secret}\n />\n \n \n \n submit()}\n >\n {loading ? (\n {t(\"Encrypting message...\")}\n ) : (\n {t(\"Encrypt Message\")}\n )}\n \n \n )}\n
\n );\n};\n\nexport const OneTime = (\n props: {\n readonly onetime: boolean;\n readonly setOnetime: React.Dispatch>;\n } & React.HTMLAttributes,\n) => {\n const { t } = useTranslation();\n const { onetime, setOnetime } = props;\n return (\n \n setOnetime(!onetime)}\n checked={onetime}\n />\n {t(\"One-time download\")}\n \n );\n};\nexport const Lifetime = (\n props: {\n readonly expiration: number;\n readonly setExpiration: React.Dispatch>;\n } & React.HTMLAttributes,\n) => {\n const { expiration, setExpiration } = props;\n const { t } = useTranslation();\n const buttons = [];\n for (const i of [\n {\n duration: 3600,\n name: '1h',\n text: t(\"One Hour\"),\n },\n {\n duration: 86400,\n name: '1d',\n text: t(\"One Day\"),\n },\n {\n duration: 604800,\n name: '1w',\n text: t(\"One Week\"),\n },\n ]) {\n buttons.push(\n \n \n ,\n );\n }\n\n return (\n \n \n {t(\"The encrypted message will be deleted automatically after\")}\n \n {buttons}\n \n );\n};\n\nexport const Error = (\n props: { readonly message: string } & React.HTMLAttributes,\n) =>\n props.message ? (\n \n {props.message}\n \n ) : null;\n\nexport default Create;\n","import * as React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nconst Error = (\n props: { readonly display: boolean } & React.HTMLAttributes,\n) => {\n const { t } = useTranslation();\n\n return props.display ? (\n
\n

{t(\"Secret does not exist\")}

\n

\n {t(\"It might be caused by any of these reasons.\")}\n

\n

{t(\"Opened before\")}

{t(\"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 {t(\"The secret might have been compromised and read by someone else. You should contact the sender and request a new secret.\")}\n

\n

{t(\"Broken link\")}

\n

\n {t(\"The link must match perfectly in order for the decryption to work, it might be missing some magic digits.\")}\n

\n

{t(\"Expired\")}

\n

\n {t(\"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 ) : null;\n};\nexport default Error;\n","import * as React from 'react';\nimport { useState } from 'react';\nimport { Redirect } from 'react-router-dom';\nimport { Button, Col, FormGroup, Input, Label } from 'reactstrap';\nimport { useTranslation } from 'react-i18next';\n\nconst Form = (\n props: {\n readonly display: boolean;\n readonly uuid: string | undefined;\n readonly prefix: string;\n } & React.HTMLAttributes,\n) => {\n const [password, setPassword] = useState('');\n const [redirect, setRedirect] = useState(false);\n const { t } = useTranslation();\n\n const doRedirect = () => {\n if (password) {\n setRedirect(true);\n }\n };\n\n if (redirect) {\n return ;\n }\n return props.display ? (\n \n \n \n setPassword(e.target.value)}\n />\n \n \n \n ) : null;\n};\nexport default Form;\n","import * as React from 'react';\nimport { useEffect, useState, useCallback } from 'react';\nimport { useParams } from 'react-router-dom';\nimport Error from './Error';\nimport Form from './Form';\nimport { decryptMessage } from './utils';\nimport { useTranslation } from 'react-i18next';\n\nconst DisplaySecret = () => {\n const [loading, setLoading] = useState(false);\n const [error, showError] = useState(false);\n const [secret, setSecret] = useState('');\n const { key, password } = useParams();\n const { t } = useTranslation();\n\n const decrypt = useCallback(async () => {\n if (!password) {\n return;\n }\n setLoading(true);\n const url = process.env.REACT_APP_BACKEND_URL\n ? `${process.env.REACT_APP_BACKEND_URL}/secret`\n : '/secret';\n try {\n const request = await fetch(`${url}/${key}`);\n if (request.status === 200) {\n const data = await request.json();\n const r = await decryptMessage(data.message, password, 'utf8');\n setSecret(r.data as string);\n setLoading(false);\n return;\n }\n } catch (e) {\n console.log(e);\n }\n setLoading(false);\n showError(true);\n }, [password, key]);\n\n useEffect(() => {\n decrypt();\n }, [decrypt]);\n\n return (\n
\n {loading && (\n

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

\n )}\n \n \n
\n
\n );\n};\n\nconst Secret = (\n props: { readonly secret: string } & React.HTMLAttributes,\n) => {\n const { t } = useTranslation();\n\n return props.secret ? (\n
\n

{t(\"Decrypted Message\")}

\n {t(\"This secret might not be viewable again, make sure to save it now!\")}\n
{props.secret}
\n
\n ) : null;\n};\n\nexport default DisplaySecret;\n","import { saveAs } from 'file-saver';\nimport * as React from 'react';\nimport { useEffect, useState, useCallback } from 'react';\nimport { useParams } from 'react-router-dom';\nimport Error from './Error';\nimport Form from './Form';\nimport { decryptMessage } from './utils';\nimport { useTranslation } from 'react-i18next';\n\nconst Download = () => {\n const [loading, setLoading] = useState(false);\n const [error, showError] = useState(false);\n const { key, password } = useParams();\n const { t } = useTranslation();\n\n const decrypt = useCallback(async () => {\n if (!password) {\n return;\n }\n setLoading(true);\n const url = process.env.REACT_APP_BACKEND_URL\n ? `${process.env.REACT_APP_BACKEND_URL}/file`\n : '/file';\n try {\n const request = await fetch(`${url}/${key}`);\n if (request.status === 200) {\n const data = await request.json();\n const file = await decryptMessage(data.message, password, 'binary');\n saveAs(\n new Blob([file.data as string], {\n type: 'application/octet-stream',\n }),\n file.filename,\n );\n setLoading(false);\n return;\n }\n } catch (e) {\n console.log(e);\n }\n setLoading(false);\n showError(true);\n }, [password, key]);\n\n useEffect(() => {\n decrypt();\n }, [decrypt]);\n\n return (\n
\n {loading && (\n

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

\n )}\n {!loading && password && !error && }\n \n \n
\n );\n};\n\nconst DownloadSuccess = () => {\n const { t } = useTranslation();\n return (\n
\n

{t(\"Downloading file and decrypting in browser, please hold...\")}

\n

{t(\"Make sure to download the file since it is only available once\")}

\n
\n );\n};\nexport default Download;\n","import {\n faBomb,\n faCodeBranch,\n faDownload,\n faLock,\n faShareAlt,\n faUserAltSlash,\n IconDefinition,\n} from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport * as React from 'react';\nimport { Container, Row } from 'reactstrap';\nimport { useTranslation } from 'react-i18next';\n\nconst Features = () => {\n const { t } = useTranslation();\n return (\n \n
\n

{t(\"Share Secrets Securely With Ease\")}

\n

\n {t(\"Yopass is created to reduce the amount of clear text passwords stored in email and chat conversations by encrypting and generating a short lived link which can only be viewed once.\")}\n

\n

\n \n \n {t(\"Encryption and decryption are being made locally in the browser. The key is never stored with yopass.\")}\n \n \n {t(\"Encrypted messages have a fixed lifetime and will be deleted automatically after expiration.\")}\n \n \n {t(\"The encrypted message can only be downloaded once which reduces the risk of someone peaking your secrets.\")}\n \n \n {t(\"Yopass generates a unique one click link for the encrypted file or message. The decryption password can alternatively be sent separately.\")}\n \n \n {t(\"Sharing should be quick and easy; No additional information except the encrypted secret is stored in the database.\")}\n \n \n {t(\"Yopass encryption mechanism are built on open source software meaning full transparancy with the possibility to audit and submit features.\")}\n \n \n \n );\n};\n\nconst Feature = (\n props: {\n readonly title: string;\n readonly icon: IconDefinition;\n } & React.HTMLAttributes,\n) => {\n return (\n

\n
\n
\n \n
\n
\n

{props.title}

\n

{props.children}

\n
\n
\n
\n );\n};\nexport default Features;\n","import { faFileUpload } from '@fortawesome/free-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport * as openpgp from 'openpgp';\nimport * as React from 'react';\nimport { useState } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport { Error, Lifetime, OneTime } from './Create';\nimport Result from './Result';\nimport { randomString, uploadFile } from './utils';\nimport { useTranslation } from 'react-i18next';\n\nconst Upload = () => {\n const maxSize = 1024 * 500;\n const [password, setPassword] = useState('');\n const [onetime, setOnetime] = useState(true);\n const [expiration, setExpiration] = useState(3600);\n const [error, setError] = useState('');\n const [uuid, setUUID] = useState('');\n const { t } = useTranslation();\n\n const onDrop = React.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 const pw = randomString();\n const file = await openpgp.encrypt({\n armor: true,\n message: openpgp.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,\n message: file.data,\n one_time: onetime,\n });\n\n if (status !== 200) {\n setError(data.message);\n } else {\n setUUID(data.message);\n setPassword(pw);\n }\n };\n acceptedFiles.forEach(file => reader.readAsArrayBuffer(file));\n },\n [expiration, onetime],\n );\n\n const {\n getRootProps,\n getInputProps,\n rejectedFiles,\n isDragActive,\n } = useDropzone({\n maxSize,\n minSize: 0,\n onDrop,\n });\n\n const isFileTooLarge =\n rejectedFiles.length > 0 && rejectedFiles[0].size > maxSize;\n\n return (\n
\n {isFileTooLarge && }\n setError('')} />\n {uuid ? (\n \n ) : (\n
\n
\n \n
\n

{t(\"Drop file to upload\")}

\n

\n {t(\"File upload is limited to small files; Think ssh keys and similar.\")}\n

\n {' '}\n
\n
\n
\n \n \n
\n
\n )}\n
\n );\n};\n\nexport default Upload;\n","import * as React from 'react';\nimport { HashRouter as Router, Route } from 'react-router-dom';\nimport { Container, Navbar, NavbarBrand } from 'reactstrap';\n\nimport './App.scss';\nimport Create from './Create';\nimport DisplaySecret from './DisplaySecret';\nimport Download from './Download';\nimport Features from './Features';\nimport Upload from './Upload';\nimport { useTranslation } from 'react-i18next';\n\nclass App extends React.Component {\n public render() {\n return (\n \n \n \n Yopass \"\"\n \n \n \n \n \n \n \n \n );\n }\n}\n\nconst Routes = () => {\n return (\n
\n \n \n \n \n \n \n
\n );\n};\n\nconst Attribution = () => {\nconst { t } = useTranslation();\n return (\n \n
\n {t(\"Created by\")} {t(\"Johan Haals\")}\n
\n
\n );\n};\n\nexport default App;\n","import i18n from \"i18next\";\nimport { initReactI18next } from 'react-i18next';\n\n\nimport Backend from 'i18next-http-backend';\n\ni18n\n .use(initReactI18next)\n .use(Backend)\n .init({\n\n backend: {\n loadPath: '/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});\n\nexport default i18n;\n","// tslint:disable:no-console\n// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the 'N+1' visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL!,\n window.location.toString()\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Lets check if a service worker still exists or not.\n checkValidServiceWorker(swUrl);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker) {\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a 'New content is\n // available; please refresh.' message in your web app.\n console.log('New content is available; please refresh.');\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // 'Content is cached for offline use.' message.\n console.log('Content is cached for offline use.');\n }\n }\n };\n }\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type')!.indexOf('javascript') === -1\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import * as React from 'react';\nimport { Suspense } from 'react';\nimport * as ReactDOM from 'react-dom';\nimport App from './App';\nimport \"./i18n\";\nimport registerServiceWorker from './registerServiceWorker';\n\nReactDOM.render(\n Loading...}>\n \n ,\ndocument.getElementById('root') as HTMLElement\n);\n\nregisterServiceWorker();\n"],"sourceRoot":""}