{"version":3,"sources":["App.js","serviceWorker.js","index.js"],"names":["App","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","componentWillMount","checkIfPlainTypeEnabled","checkIfGradientTypeEnabled","setState","appClass","bgStyle","prepareGradientStyleSheets","checkIfImageTypeEnabled","prepareBackgroundImageStyle","checkIfNightModeEnabled","state","backgroundType","checkIfDayModeEnabled","Configs","gradientColors","background","backgroundSize","backgroundImageUrl","getDefaultModeBasedOnBackgroundType","lightBackgroundModes","darkBackgroundModes","changeThemeMode","e","backgroundIndex","backgroundMode","changeBackgroundBasedonMode","length","plainBackgroundMode","devIntro","devDesc","icons","_this$state","react_default","a","createElement","className","style","onClick","id","class","target","rel","href","Typist_default","map","icon","concat","url","image","Component","isLocalhost","Boolean","window","location","hostname","match","registerValidSW","swUrl","config","navigator","serviceWorker","register","then","registration","onupdatefound","installingWorker","installing","onstatechange","controller","console","log","onUpdate","onSuccess","catch","error","ReactDOM","render","src_App_0","document","getElementById","URL","process","origin","addEventListener","fetch","response","contentType","headers","get","status","indexOf","ready","unregister","reload","checkValidServiceWorker"],"mappings":"g7BAwNeA,cAlNb,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACjBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KAgCRQ,mBAAqB,WACnB,GAAIP,EAAKQ,0BACP,OAAO,EACER,EAAKS,6BACdT,EAAKU,SAAS,CACZC,SAAU,WACVC,QAASZ,EAAKa,+BAEPb,EAAKc,2BACdd,EAAKU,SAAS,CACZC,SAAU,gBACVC,QAASZ,EAAKe,iCA5CDf,EAiDnBgB,wBAA0B,WACxB,MACgC,UAA9BhB,EAAKiB,MAAMC,gBACa,eAAxBlB,EAAKiB,MAAMN,UApDIX,EAwDnBmB,sBAAwB,WACtB,MACgC,UAA9BnB,EAAKiB,MAAMC,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AAW,CAGzE,GADkB,IAAIqB,IAAIC,GAAwB7B,OAAOC,SAASX,MACpDwC,SAAW9B,OAAOC,SAAS6B,OAIvC,OAGF9B,OAAO+B,iBAAiB,OAAQ,WAC9B,IAAM1B,EAAK,GAAAX,OAAMmC,GAAN,sBAEP/B,GAgEV,SAAiCO,EAAOC,GAEtC0B,MAAM3B,GACHK,KAAK,SAAAuB,GAEJ,IAAMC,EAAcD,EAASE,QAAQC,IAAI,gBAEnB,MAApBH,EAASI,QACO,MAAfH,IAA8D,IAAvCA,EAAYI,QAAQ,cAG5C/B,UAAUC,cAAc+B,MAAM7B,KAAK,SAAAC,GACjCA,EAAa6B,aAAa9B,KAAK,WAC7BV,OAAOC,SAASwC,aAKpBrC,EAAgBC,EAAOC,KAG1Be,MAAM,WACLJ,QAAQC,IACN,mEArFAwB,CAAwBrC,EAAOC,GAI/BC,UAAUC,cAAc+B,MAAM7B,KAAK,WACjCO,QAAQC,IACN,gHAMJd,EAAgBC,EAAOC,MCvC/BE","file":"static/js/main.721f5a18.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport Typist from 'react-typist';\nimport './App.css';\nimport Configs from './configurations.json';\n\nclass App extends Component {\n constructor(props) {\n super(props);\n this.state = {\n darkBackgroundModes: [\n 'day',\n 'terminal',\n 'torquoise',\n 'alizarin',\n 'amythyst',\n 'carrot',\n 'peterriver'\n ],\n lightBackgroundModes: [\n 'night',\n 'lightred',\n 'lightpurple',\n 'lightgreen',\n 'lightblue',\n 'lightyellow'\n ],\n backgroundType: Configs.backgroundType || 'plain',\n appClass: Configs.plainBackgroundMode || 'daylight',\n devIntro: Configs.devIntro || 'Lorem Ipsum',\n devDesc:\n Configs.devDesc ||\n 'Aute veniam ut deserunt cillum irure pariatur Lorem dolore anim nostrud quis veniam elit culpa.',\n backgroundMode: 'default',\n backgroundIndex: 0,\n bgStyle: {},\n icons: Configs.icons || []\n };\n }\n\n componentWillMount = () => {\n if (this.checkIfPlainTypeEnabled()) {\n return true;\n } else if (this.checkIfGradientTypeEnabled()) {\n this.setState({\n appClass: 'gradient',\n bgStyle: this.prepareGradientStyleSheets()\n });\n } else if (this.checkIfImageTypeEnabled()) {\n this.setState({\n appClass: 'full-bg-image',\n bgStyle: this.prepareBackgroundImageStyle()\n });\n }\n };\n\n checkIfNightModeEnabled = () => {\n return (\n this.state.backgroundType === 'plain' &&\n this.state.appClass === 'nightlight'\n );\n };\n\n checkIfDayModeEnabled = () => {\n return (\n this.state.backgroundType === 'plain' &&\n this.state.appClass === 'daylight'\n );\n };\n\n checkIfGradientTypeEnabled = () => {\n return this.state.backgroundType === 'gradient';\n };\n\n checkIfPlainTypeEnabled = () => {\n return this.state.backgroundType === 'plain';\n };\n\n checkIfImageTypeEnabled = () => {\n return this.state.backgroundType === 'image';\n };\n\n prepareGradientStyleSheets = () => {\n if (Configs.gradientColors) {\n return {\n background: 'linear-gradient(-45deg, ' + Configs.gradientColors + ')',\n backgroundSize: '400% 400%'\n };\n } else {\n return {\n background:\n 'linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB)',\n backgroundSize: '400% 400%'\n };\n }\n };\n\n prepareBackgroundImageStyle = () => {\n if (Configs.backgroundImageUrl) {\n return {\n background:\n 'url(\"' +\n Configs.backgroundImageUrl +\n '\") no-repeat center center fixed',\n backgroundSize: 'cover'\n };\n } else {\n return {\n background:\n 'url(\"/images/sample-background.jpg\") no-repeat center center fixed',\n backgroundSize: 'cover'\n };\n }\n };\n\n getDefaultModeBasedOnBackgroundType = () => {\n if (this.checkIfNightModeEnabled()) {\n return this.state.lightBackgroundModes[0];\n } else if (this.checkIfDayModeEnabled()) {\n return this.state.darkBackgroundModes[0];\n }\n };\n\n changeThemeMode = e => {\n if (this.checkIfNightModeEnabled()) {\n this.setState({\n appClass: 'daylight',\n backgroundIndex: 0,\n backgroundMode: this.state.darkBackgroundModes[0]\n });\n } else if (this.checkIfDayModeEnabled()) {\n this.setState({\n appClass: 'nightlight',\n backgroundIndex: 0,\n backgroundMode: this.state.lightBackgroundModes[0]\n });\n }\n };\n\n changeBackgroundBasedonMode = () => {\n if (\n this.checkIfNightModeEnabled() &&\n this.state.backgroundIndex < this.state.lightBackgroundModes.length - 1\n ) {\n this.setState({\n backgroundIndex: this.state.backgroundIndex + 1,\n backgroundMode: this.state.lightBackgroundModes[\n this.state.backgroundIndex + 1\n ]\n });\n } else if (\n this.checkIfDayModeEnabled() &&\n this.state.backgroundIndex < this.state.darkBackgroundModes.length - 1\n ) {\n this.setState({\n backgroundIndex: this.state.backgroundIndex + 1,\n backgroundMode: this.state.darkBackgroundModes[\n this.state.backgroundIndex + 1\n ]\n });\n } else {\n this.setState({\n backgroundIndex: 0,\n backgroundMode: this.getDefaultModeBasedOnBackgroundType()\n });\n }\n };\n\n render() {\n const {\n appClass, bgStyle, backgroundMode, devIntro, devDesc, icons\n } = this.state;\n return (\n
\n
\n \n
\n

{ devIntro }

\n
PGP Fingerprint
\n
0679 F7E2 7BD5 D1E2 0127 6B44 B4DC BC38 73DD 5DA9
\n \n
\n \n \n
\n
\n \n \n
\n
\n
\n { devDesc }\n
\n
\n {icons.map(icon => (\n \n \n \n ))}\n
\n
\n
\n
\n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\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 subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\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 function register(config) {\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(process.env.PUBLIC_URL, window.location.href);\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/facebook/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. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\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://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\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 // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\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 const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.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, config);\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 React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render( < App / > , document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.register();"],"sourceRoot":""}