From 00f036861c73f72f8863cbc2259b440ca1344df1 Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 30 Jan 2019 00:58:11 -0500 Subject: re-organize the code --- build/static/js/main.a4bfd80e.chunk.js.map | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/static/js/main.a4bfd80e.chunk.js.map (limited to 'build/static/js/main.a4bfd80e.chunk.js.map') diff --git a/build/static/js/main.a4bfd80e.chunk.js.map b/build/static/js/main.a4bfd80e.chunk.js.map new file mode 100644 index 0000000..2319d2a --- /dev/null +++ b/build/static/js/main.a4bfd80e.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["Logo.js","gapi.js","pattern.js","Chart.js","RegexField.js","App.js","serviceWorker.js","index.js"],"names":["Logo","props","react_default","a","createElement","xmlns","viewBox","version","style","id","transform","points","fill","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","gapi_base","to_params","dict","Object","entries","map","_ref","_ref2","slicedToArray","k","v","concat","encodeURIComponent","join","getCalendars","token","fetch","access_token","method","async","then","response","json","data","items","getColors","Pattern","isRegex","value","label","classCallCheck","this","createClass","key","get","RegExp","emptyPattern","anyPattern","PatternEntry","name","idx","calPattern","eventPattern","cal","event","defaultPatternEntry","customizedLabel","cx","cy","x","y","anchor","dx","dy","textAnchor","withStyles","theme","pieChart","margin","Grid_default","container","spacing","item","xs","lg","className","classes","patternTableWrapper","PieChart","width","height","Pie","patternGraphData","dataKey","outerRadius","deepOrange","Tooltip","formatter","toFixed","calendarGraphData","innerRadius","cyan","d","i","Cell","color","RegexField","_this","pitems","options","p0","push","MenuItem_default","isEmpty","palette","primary","dark","FormControl_default","Select_default","onChange","target","fieldStyles","regex","noRegex","TextField_default","React","Component","default_chart_data","createMuiTheme","light","orange","main","contrastText","typography","useNextVariants","Dashboard","state","open","patterns","page","rowsPerPage","timeRange","Promise","resolver","chrome","identity","getAuthToken","interactive","activePattern","cached","calendars","handleChangePage","setState","handleChangeRowsPerPage","updatePattern","field","removePattern","splice","length","newPattern","toConsumableArray","analyze","startDate","endDate","start","toISOString","end","event_pms","_loop","calId","timeMin","timeMax","status","catch","e","console","log","events","all","results","cal_results","_loop2","calName","filter","p","test","filterPatterns","forEach","summary","undefined","duration","Date","dateTime","background","alert","loadPatterns","colors","gapi","calendar","cals","colorId","_this2","_this$state","rows","nDummy","Math","min","styles","root","AppBar_default","position","appBar","Toolbar_default","disableGutters","toolbar","Typography_default","component","variant","noWrap","title","verticalAlign","marginRight","content","appBarSpacer","CssBaseline_default","md","fullWidth","FormGroup_default","gutterBottom","IconButton_default","marginBottom","marginLeft","onClick","AddCircle_default","Table_default","patternTable","TableHead_default","TableRow_default","patternHead","s","TableCell_default","TableBody_default","slice","onMouseOver","onMouseOut","CustomText","elem","fieldNoRegex","fieldRegex","right","display","DeleteOutlined_default","cursor","colSpan","TablePagination_default","rowsPerPageOptions","count","backIconButtonProps","aria-label","nextIconButtonProps","onChangePage","onChangeRowsPerPage","textAlign","react_dates","startDateId","endDateId","onDatesChange","_ref3","focusedInput","onFocusChange","isOutsideRange","buttonSpacer","Button_default","Chart","TextField","withTheme","RegexField_RegexField","any","zIndex","drawer","transition","transitions","create","easing","sharp","leavingScreen","flexGrow","sectionTitle","flex","mixins","padding","unit","overflow","overflowX","overflowY","minWidth","fab","Boolean","window","location","hostname","match","ReactDOM","render","App","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"snBACeA,GAAA,SAACC,GAAD,OACbC,EAAAC,EAAAC,cAAA,OACGC,MAAM,6BACNC,QAAQ,0BACRC,QAAQ,MACRC,MAAOP,EAAMO,OACdN,EAAAC,EAAAC,cAAA,KAAGK,GAAG,MACHC,UAAU,gCACXR,EAAAC,EAAAC,cAAA,KAAGK,GAAG,OACJP,EAAAC,EAAAC,cAAA,KACGK,GAAG,OACJP,EAAAC,EAAAC,cAAA,WACGK,GAAG,WACHE,OAAO,mGACPH,MAAO,CAACI,KAAM,aACjBV,EAAAC,EAAAC,cAAA,KACGK,GAAG,MACHC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EAAMK,QAAQkN,KACvBC,SAAU,QAEdrB,aAAc,CACVzC,aAAmC,EAArB1J,EAAMK,QAAQkN,MAEhC5M,oBAAqB,CACjB8M,UAAW,OACXC,UAAW,UAEf3D,aAAc,CACV4D,SAAU,KAEdC,IAAK,CACD1N,OAAQF,EAAMK,QAAQkN,MAE1B5C,aAAc,CACV9J,MAAO,KAEX+J,WAAY,CACR3B,YAAa,WAkQNlJ,CAAmB4D,ICzVdkK,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCbNC,IAASC,OAAO5S,EAAAC,EAAAC,cAAC2S,GAAD,MAASC,SAASC,eAAe,SD4H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM7Q,KAAK,SAAA8Q,GACjCA,EAAaC","file":"static/js/main.a4bfd80e.chunk.js","sourcesContent":["import React from 'react';\nexport default (props) =>\n \n \n \n \n \n \n Cr\n \n \n \n \n \n","/* global chrome */\nconst gapi_base = 'https://www.googleapis.com/calendar/v3';\n\nfunction to_params(dict) {\n return Object.entries(dict).map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join('&');\n}\n\nexport function getAuthToken() {\n return new Promise(resolver =>\n chrome.identity.getAuthToken(\n {interactive: true}, token => resolver(token)));\n}\n\nexport function getCalendars(token) {\n return fetch(gapi_base + '/users/me/calendarList?' + to_params({access_token: token}),\n { method: 'GET', async: true })\n .then(response => response.json())\n .then(data => data.items);\n}\n\nexport function genEventsGetter(calId, timeMin, timeMax) {\n return token => fetch(gapi_base + '/calendars/' + calId + '/events?' + to_params({\n access_token: token,\n timeMin,\n timeMax\n }), { method: 'GET', async: true })\n .then(response => {\n if (response.status === 200)\n return response.json()\n else throw `got response ${response.status}`;\n })\n .catch(e => { console.log(e); return []; })\n .then(data => data.items);\n}\n\nexport function getColors(token) {\n return fetch(gapi_base + '/colors?' + to_params({access_token: token}), { method: 'GET', async: true })\n .then(response => response.json());\n}\n","export class Pattern {\n constructor(id, isRegex, value, label) {\n this.id = id;\n this.isRegex = isRegex;\n this.value = value;\n this.label = label;\n }\n\n get regex() { return new RegExp(this.isRegex ? this.value : `^${this.value}$`); }\n get isEmpty() { return this.label === null; }\n static emptyPattern = () => new Pattern(0, true, '', null);\n static anyPattern = () => new Pattern('any', true, '.*', 'Any');\n}\n\nexport class PatternEntry {\n constructor(name, idx, calPattern, eventPattern) {\n this.name = name;\n this.idx = idx;\n this.cal = calPattern;\n this.event = eventPattern;\n }\n\n static defaultPatternEntry = (idx) => new PatternEntry('', idx, Pattern.emptyPattern(), Pattern.anyPattern());\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport deepOrange from '@material-ui/core/colors/deepOrange';\nimport cyan from '@material-ui/core/colors/cyan';\nimport { PieChart, Pie, Cell, Tooltip } from 'recharts';\n\nconst styles = theme => ({\n pieChart: {\n margin: '0 auto',\n }\n});\n\nfunction customizedLabel(props) {\n const {cx, cy, x, y, fill, name} = props;\n let anchor = \"middle\";\n const EPS = 2;\n let dx = 0;\n let dy = 0;\n if (x < cx - EPS) {\n dx = -5;\n anchor = \"end\"\n } else if (x > cx + EPS) {\n dx = 5;\n anchor = \"start\";\n }\n\n if (y < cy - EPS) {\n dy = -5;\n } else if (y > cy + EPS) {\n dy = 10;\n }\n\n return ({`${name}`});\n}\n\nfunction ChromiclePieChart(props) {\n return (\n \n \n
\n \n \n `${value.toFixed(2)} hr`}/>\n \n
\n
\n \n
\n \n \n {props.calendarGraphData.map((d, i) => )}\n \n `${value.toFixed(2)} hr`}/>\n \n
\n
\n
);\n}\n\nChromiclePieChart.propTypes = {\n patternGraphData: PropTypes.array.isRequired,\n calendarGraphData: PropTypes.array.isRequired,\n};\n\nexport default withStyles(styles)(ChromiclePieChart);\n","import React from 'react';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport TextField from '@material-ui/core/TextField';\nimport FormControl from '@material-ui/core/FormControl';\nimport { Pattern } from './pattern';\n\nclass RegexField extends React.Component {\n render() {\n var pitems = this.props.options;\n var p0 = new Pattern.emptyPattern();\n let items = [];\n pitems[p0.id] = p0;\n for (let id in pitems)\n items.push(\n \n {!pitems[id].isEmpty ?\n pitems[id].label :\n Custom}\n );\n return (\n \n \n {\n let value;\n if (pitems[event.target.value].label == null) {\n value = new Pattern(0, true,\n this.props.value.isRegex ?\n this.props.value.value :\n `^${this.props.value.value}$`, null);\n } else {\n value = pitems[event.target.value];\n }\n this.props.onChange({target: {value}});\n }}\n className={this.props.value.isRegex ?\n this.props.fieldStyles.regex :\n this.props.fieldStyles.noRegex}>{items}\n {this.props.value.label == null && (\n \n this.props.onChange({target: { value: new Pattern(0, true, event.target.value, null)}})} />\n )}\n \n );\n }\n}\n\nexport function CalendarField(props) {\n let options = {};\n for (let id in props.cached.calendars) {\n options[id] = new Pattern(id, false,\n props.cached.calendars[id].name,\n props.cached.calendars[id].name);\n }\n return (\n );\n}\n\nexport function EventField(props) {\n let any = Pattern.anyPattern();\n let options = {};\n options[any.id] = any;\n return (\n );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport 'typeface-roboto';\nimport 'react-dates/initialize';\nimport 'react-dates/lib/css/_datepicker.css';\nimport { DateRangePicker } from 'react-dates';\nimport { withStyles, withTheme } from '@material-ui/core/styles';\nimport { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';\nimport orange from '@material-ui/core/colors/orange';\nimport cyan from '@material-ui/core/colors/cyan';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TablePagination from '@material-ui/core/TablePagination';\nimport Paper from '@material-ui/core/Paper';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormGroup from '@material-ui/core/FormGroup';\nimport Grid from '@material-ui/core/Grid';\nimport DeleteOutlinedIcon from '@material-ui/icons/DeleteOutlined';\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport IconButton from '@material-ui/core/IconButton';\nimport Logo from './Logo';\nimport * as gapi from './gapi';\nimport { Pattern, PatternEntry } from './pattern';\nimport PieChart from './Chart';\nimport { CalendarField, EventField } from './RegexField';\n\nconst default_chart_data = [{name: 'Work', value: 10, color: cyan[300]},\n {name: 'Wasted', value: 10, color: cyan[300]}];\n\nconst theme = createMuiTheme({\n palette: {\n primary: {\n light: orange[300],\n main: orange[500],\n dark: orange[700],\n contrastText: \"#fff\"\n }\n },\n typography: {\n useNextVariants: true,\n }\n});\n\nfunction filterPatterns(patterns, calName) {\n return patterns.filter(p => {\n return p.cal.regex.test(calName);\n });\n}\n\nconst styles = theme => ({\n root: {\n display: 'flex',\n height: '100vh',\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create(['width', 'margin'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n title: {\n flexGrow: 1,\n },\n sectionTitle: {\n flex: '0 0 auto'\n },\n appBarSpacer: theme.mixins.toolbar,\n content: {\n flexGrow: 1,\n padding: theme.spacing.unit * 3,\n overflow: 'auto',\n },\n buttonSpacer: {\n marginBottom: theme.spacing.unit * 4,\n },\n patternTableWrapper: {\n overflowX: 'auto',\n overflowY: 'hidden'\n },\n patternTable: {\n minWidth: 600\n },\n fab: {\n margin: theme.spacing.unit,\n },\n fieldNoRegex: {\n width: 200\n },\n fieldRegex: {\n marginRight: '0.5em'\n }\n});\n\nclass Dashboard extends React.Component {\n state = {\n open: true,\n patterns: [],\n page: 0,\n rowsPerPage: 5,\n timeRange: null,\n token: gapi.getAuthToken(),\n patternGraphData: default_chart_data,\n calendarGraphData: default_chart_data,\n activePattern: null\n };\n\n cached = {\n calendars: {}\n };\n\n static patternHead = [\n {label: \"Name\", field: \"name\", elem: TextField},\n {label: \"Calendar\", field: \"cal\", elem: withTheme(theme)(CalendarField)},\n {label: \"Event\", field: 'event', elem: withTheme(theme)(EventField)}];\n\n handleChangePage = (event, page) => {\n this.setState({ page });\n };\n\n handleChangeRowsPerPage = event => {\n this.setState({ rowsPerPage: event.target.value });\n };\n\n updatePattern = (field, idx, value) => {\n let patterns = this.state.patterns;\n patterns[idx][field] = value;\n this.setState({ patterns });\n };\n\n removePattern = idx => {\n let patterns = this.state.patterns;\n patterns.splice(idx, 1);\n for (let i = 0; i < patterns.length; i++)\n patterns[i].idx = i;\n this.setState({ patterns });\n };\n\n newPattern = () => {\n let patterns = [PatternEntry.defaultPatternEntry(), ...this.state.patterns];\n for (let i = 1; i < patterns.length; i++)\n patterns[i].idx = i;\n \tthis.setState({ patterns });\n };\n\n analyze = () => {\n if (!(this.state.startDate && this.state.endDate)) {\n alert(\"Please choose a valid time range.\");\n return;\n }\n let start = this.state.startDate.toISOString();\n let end = this.state.endDate.toISOString();\n let event_pms = [];\n for (let id in this.cached.calendars) {\n event_pms.push(\n this.state.token\n .then(gapi.genEventsGetter(id, start, end))\n .then(items => this.cached.calendars[id].events = items));\n }\n\n Promise.all(event_pms).then(() => {\n let results = {}; // pattern idx => time\n let cal_results = {}; // cal id => time\n for (let i = 0; i < this.state.patterns.length; i++)\n results[i] = 0;\n for (let id in this.cached.calendars) {\n let patterns = filterPatterns(this.state.patterns, this.cached.calendars[id].name);\n if (!this.cached.calendars[id].events) continue;\n this.cached.calendars[id].events.forEach(event => {\n if (event.status !== \"confirmed\") return;\n patterns.forEach(p => {\n if (!p.event.regex.test(event.summary)) return;\n if (cal_results[id] === undefined) {\n cal_results[id] = 0;\n }\n let duration = (new Date(event.end.dateTime) - new Date(event.start.dateTime)) / 60000;\n results[p.idx] += duration;\n cal_results[id] += duration;\n });\n });\n }\n let patternGraphData = [];\n let calendarGraphData = [];\n for (let i = 0; i < this.state.patterns.length; i++) {\n patternGraphData.push({ name: this.state.patterns[i].name, value: results[i] / 60.0 });\n }\n for (let id in cal_results) {\n calendarGraphData.push({\n name: this.cached.calendars[id].name,\n value: (cal_results[id] / 60.0),\n color: this.cached.calendars[id].color.background});\n }\n this.setState({ patternGraphData, calendarGraphData });\n });\n };\n\n loadPatterns = () => {\n let token = this.state.token;\n let colors = token.then(gapi.getColors).then(color => {\n return color.calendar;\n });\n let cals = token.then(gapi.getCalendars);\n Promise.all([colors, cals]).then(([colors, items]) => {\n items.forEach(item => {\n this.cached.calendars[item.id] = {\n name: item.summary,\n events: {},\n color: colors[item.colorId]\n };\n });\n this.setState({ patterns: items.map((item, idx) => {\n return new PatternEntry(item.summary, idx,\n new Pattern(item.id, false, item.summary, item.summary),\n Pattern.anyPattern());\n })});\n });\n };\n\n render() {\n const { classes } = this.props;\n const { patterns, rows, rowsPerPage, page } = this.state;\n const nDummy = rowsPerPage - Math.min(rowsPerPage, patterns.length - page * rowsPerPage);\n\n return (\n \n
\n \n \n \n Chromicle\n \n \n \n
\n
\n \n \n \n \n \n \n Event Patterns\n this.newPattern()}>\n \n
\n \n \n {Dashboard.patternHead.map((s, i) => ({s.label}))}\n \n \n {patterns.slice(page * rowsPerPage, (page + 1) * rowsPerPage).map(p => (\n this.setState({ activePattern: p.idx })}\n onMouseOut={() => this.setState({ activePattern: null })}>\n {Dashboard.patternHead.map(s => {\n const CustomText = s.elem;\n return (\n \n this.updatePattern(s.field, p.idx, event.target.value)}/>\n )})}\n \n this.removePattern(p.idx)} />\n \n ))}\n {nDummy > 0 && (\n \n \n )}\n \n
\n
\n \n
\n \n \t \n \t Time Range\n \t \n
\n {\n //if (startDate && endDate)\n // this.setState({ timeRange: [startDate.toISOString(), endDate.toISOString()]});\n this.setState({ startDate, endDate });\n }} // PropTypes.func.isRequired,\n \t\t\t focusedInput={this.state.focusedInput} // PropTypes.oneOf([START_DATE, END_DATE]) or null,\n \t\t\t onFocusChange={focusedInput => this.setState({ focusedInput })} // PropTypes.func.isRequired,\n isOutsideRange={() => false}/>\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Graph\n \n \n \n \n
\n
\n
);\n }\n}\n\nDashboard.propTypes = {\n classes: PropTypes.object.isRequired,\n};\n\nexport default withStyles(styles)(Dashboard);\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 http://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 http://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 http://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 App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, 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: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file -- cgit v1.2.3-70-g09d2