{"version":3,"sources":["App.tsx","serviceWorker.ts","index.tsx","App.module.scss"],"names":["App","state","enValue","deValue","keyStr","openSnackBar","canCopy","handleInputChange","event","key","setState","target","value","decryptStr","enStr","crypto","createHash","update","digest","decipher","createDecipheriv","Uint8Array","setAutoPadding","decrypted","lastIndex","lastIndexOf","substr","JSON","stringify","parse","copyStr","copy","className","style","root","AppBar","position","Toolbar","IconButton","edge","color","aria-label","Typography","variant","contentContainer","decryptContainer","TextField","label","decryptField","fullWidth","multiline","rows","this","onChange","e","keyField","Button","decryptButton","onClick","disabled","InputProps","readOnly","encryptdField","Snackbar","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","elevation","severity","React","Component","Boolean","window","location","hostname","match","theme","createMuiTheme","palette","primary","main","blue","secondary","green","ReactDOM","render","StrictMode","ThemeProvider","path","exact","component","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","console","message","module","exports"],"mappings":"sdA4IeA,E,4MAjIbC,MAAQ,CACNC,QAAS,GACTC,QAAS,GACTC,OAAQ,mCACRC,cAAc,EACdC,SAAS,G,EAGXC,kBAAoB,SAACC,EAAYC,GAC/B,EAAKC,SAAL,eAAiBD,EAAMD,EAAMG,OAAOC,S,EA6FtCC,WAAa,WACX,IAAIC,EAAQ,EAAKb,MAAMC,QACnBO,EAAMM,IAAOC,WAAW,UAAUC,OAAO,EAAKhB,MAAMG,QAAQc,SAC5DC,EAAWJ,IAAOK,iBACpB,cACAX,EACA,IAAIY,WAAW,KAEjBF,EAASG,gBAAe,GACxB,IAAIC,EAAYJ,EAASF,OAAOH,EAAO,SAAU,QACjD,GAA0B,qCAAtB,EAAKb,MAAMG,OAA+C,CAC5D,IAAIoB,EAAYD,EAAUE,YAAY,KACtCF,EAAYA,EAAUG,OAAO,EAAGF,EAAY,GAC5CD,EAAYI,KAAKC,UAAUD,KAAKE,MAAMN,GAAY,KAAM,GAE1D,EAAKb,SAAS,CACZP,QAASoB,EACTjB,SAAS,K,EAIbwB,QAAU,WAC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AAMI,aACjB4D,iBAAkB,IAClBC,aAAc,CACZC,SAAU,SACVC,WAAY,QAEdC,QAAS,kBAAM,EAAK3D,SAAS,CAAEL,cAAc,MAE7C,kBAAC,IAAD,CACEiE,UAAW,EACX3B,QAAQ,SACR0B,QAAS,kBAAM,EAAK3D,SAAS,CAAEL,cAAc,KAC7CkE,SAAS,WAJX,kF,GA1FQC,IAAMC,WCEJC,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2D,2ECPAC,EAAQC,YAAe,CAC3BC,QAAS,CACPC,QAAS,CACPC,KAAMC,IAAK,MAEbC,UAAW,CACTF,KAAMG,IAAM,SAKlBC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAACC,EAAA,EAAD,CAAeX,MAAOA,GACpB,kBAAC,IAAD,KACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOY,KAAK,IAAIC,OAAK,EAACC,UAAW7F,QAKzC8F,SAASC,eAAe,SD2GpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBC,MAAK,SAAAC,GACJA,EAAaC,gBAEdC,OAAM,SAAAC,GACLC,QAAQD,MAAMA,EAAME,a,mBEhJ5BC,EAAOC,QAAU,CAAC,KAAO,kBAAkB,MAAQ,mBAAmB,iBAAmB,8BAA8B,iBAAmB,8BAA8B,SAAW,sBAAsB,cAAgB,2BAA2B,cAAgB,8B","file":"static/js/main.fc338b46.chunk.js","sourcesContent":["import React from \"react\";\nimport style from \"./App.module.scss\";\nimport { AppBar, TextField, Button, Snackbar } from \"@material-ui/core\";\nimport MuiAlert from \"@material-ui/lab/Alert\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Typography from \"@material-ui/core/Typography\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport crypto from \"crypto\";\nimport copy from \"copy-to-clipboard\";\n\nclass App extends React.Component {\n state = {\n enValue: \"\",\n deValue: \"\",\n keyStr: \"zG2nSeEfSHfvTCHy5LCcqtBbQehKNLXn\",\n openSnackBar: false,\n canCopy: false,\n };\n\n handleInputChange = (event: any, key: string) => {\n this.setState({ [key]: event.target.value });\n };\n render() {\n return (\n
\n \n \n \n \n \n \n 刺猬猫解密\n \n \n \n
\n
\n this.handleInputChange(e, \"enValue\")}\n />\n this.handleInputChange(e, \"keyStr\")}\n />\n \n 解密\n \n \n 复制\n \n
\n \n
\n this.setState({ openSnackBar: false })}\n >\n this.setState({ openSnackBar: false })}\n severity=\"success\"\n >\n 解密结果已复制到剪切板!\n \n \n
\n );\n }\n\n decryptStr = () => {\n let enStr = this.state.enValue;\n let key = crypto.createHash(\"sha256\").update(this.state.keyStr).digest();\n let decipher = crypto.createDecipheriv(\n \"aes-256-cbc\",\n key,\n new Uint8Array(16)\n );\n decipher.setAutoPadding(false);\n let decrypted = decipher.update(enStr, \"base64\", \"utf8\");\n if (this.state.keyStr === \"zG2nSeEfSHfvTCHy5LCcqtBbQehKNLXn\") {\n let lastIndex = decrypted.lastIndexOf(\"}\");\n decrypted = decrypted.substr(0, lastIndex + 1);\n decrypted = JSON.stringify(JSON.parse(decrypted), null, 2);\n }\n this.setState({\n deValue: decrypted,\n canCopy: true,\n });\n };\n\n copyStr = () => {\n copy(this.state.deValue, {});\n this.setState({ openSnackBar: true });\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.0/8 are 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\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: 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(\n process.env.PUBLIC_URL,\n window.location.href\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/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: string, config?: 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: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\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\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\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\";\nimport { Route, Switch, HashRouter } from \"react-router-dom\";\nimport { ThemeProvider } from \"@material-ui/core\";\nimport { createMuiTheme } from \"@material-ui/core/styles\";\nimport blue from \"@material-ui/core/colors/blue\";\nimport green from \"@material-ui/core/colors/green\";\n\nconst theme = createMuiTheme({\n palette: {\n primary: {\n main: blue[500],\n },\n secondary: {\n main: green[500],\n },\n },\n});\n\nReactDOM.render(\n \n \n \n \n \n \n \n \n ,\n document.getElementById(\"root\")\n);\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.unregister();\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"App_root__2CSG3\",\"title\":\"App_title__2oBiX\",\"contentContainer\":\"App_contentContainer__3BvVB\",\"decryptContainer\":\"App_decryptContainer__3IqFN\",\"keyField\":\"App_keyField__chIPf\",\"decryptButton\":\"App_decryptButton__3zpn-\",\"encryptdField\":\"App_encryptdField__3ekUT\"};"],"sourceRoot":""}