### Cloning the repository
--> Clone the repository using the command below :
```bash
git clone https://github.com/divanov11/Django-React-NotesApp.git
```
--> Move into the directory where we have the project files :
```bash
cd Django-React-NotesApp
```
--> Create a virtual environment :
```bash
# If you are on Windows
virtualenv env
# If you are on Linux or Mac
python -m venv env
```
--> Activate the virtual environment :
```bash
# If you are on Windows
.\env\Scripts\activate
# If you are on Linux or Mac
source env/bin/activate
```
#
### Running the App
--> To run the Notes App, we use :
```bash
python manage.py runserver
```
> ⚠ Then, the development server will be started at http://127.0.0.1:8000/
#
### App Preview :
#
================================================
FILE: api/__init__.py
================================================
================================================
FILE: api/admin.py
================================================
from django.contrib import admin
# Register your models here.
from .models import Note
admin.site.register(Note)
================================================
FILE: api/apps.py
================================================
from django.apps import AppConfig
class ApiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'api'
================================================
FILE: api/migrations/0001_initial.py
================================================
# Generated by Django 3.2.7 on 2021-09-09 14:26
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Note',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('body', models.TextField(blank=True, null=True)),
('updated', models.DateTimeField(auto_now=True)),
('created', models.DateTimeField(auto_now_add=True)),
],
),
]
================================================
FILE: api/migrations/__init__.py
================================================
================================================
FILE: api/models.py
================================================
from django.db import models
# Create your models here.
class Note(models.Model):
body = models.TextField(null=True, blank=True)
updated = models.DateTimeField(auto_now=True)
created = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.body[0:50]
================================================
FILE: api/serializers.py
================================================
from rest_framework.serializers import ModelSerializer
from .models import Note
class NoteSerializer(ModelSerializer):
class Meta:
model = Note
fields = '__all__'
================================================
FILE: api/tests.py
================================================
from django.test import TestCase
# Create your tests here.
================================================
FILE: api/urls.py
================================================
from django.urls import path
from . import views
urlpatterns = [
path('', views.getRoutes, name="routes"),
path('notes/', views.getNotes, name="notes"),
# path('notes/create/', views.createNote, name="create-note"),
#path('notes//update/', views.updateNote, name="update-note"),
#path('notes//delete/', views.deleteNote, name="delete-note"),
path('notes//', views.getNote, name="note"),
]
================================================
FILE: api/utils.py
================================================
from rest_framework.response import Response
from .models import Note
from .serializers import NoteSerializer
def getNotesList(request):
notes = Note.objects.all().order_by('-updated')
serializer = NoteSerializer(notes, many=True)
return Response(serializer.data)
def getNoteDetail(request, pk):
notes = Note.objects.get(id=pk)
serializer = NoteSerializer(notes, many=False)
return Response(serializer.data)
def createNote(request):
data = request.data
note = Note.objects.create(
body=data['body']
)
serializer = NoteSerializer(note, many=False)
return Response(serializer.data)
def updateNote(request, pk):
data = request.data
note = Note.objects.get(id=pk)
serializer = NoteSerializer(instance=note, data=data)
if serializer.is_valid():
serializer.save()
return serializer.data
def deleteNote(request, pk):
note = Note.objects.get(id=pk)
note.delete()
return Response('Note was deleted!')
================================================
FILE: api/views.py
================================================
from django.http import response
from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework.serializers import Serializer
from .models import Note
from .serializers import NoteSerializer
from api import serializers
from .utils import updateNote, getNoteDetail, deleteNote, getNotesList, createNote
# Create your views here.
@api_view(['GET'])
def getRoutes(request):
routes = [
{
'Endpoint': '/notes/',
'method': 'GET',
'body': None,
'description': 'Returns an array of notes'
},
{
'Endpoint': '/notes/id',
'method': 'GET',
'body': None,
'description': 'Returns a single note object'
},
{
'Endpoint': '/notes/create/',
'method': 'POST',
'body': {'body': ""},
'description': 'Creates new note with data sent in post request'
},
{
'Endpoint': '/notes/id/update/',
'method': 'PUT',
'body': {'body': ""},
'description': 'Creates an existing note with data sent in post request'
},
{
'Endpoint': '/notes/id/delete/',
'method': 'DELETE',
'body': None,
'description': 'Deletes and exiting note'
},
]
return Response(routes)
# /notes GET
# /notes POST
# /notes/ GET
# /notes/ PUT
# /notes/ DELETE
@api_view(['GET', 'POST'])
def getNotes(request):
if request.method == 'GET':
return getNotesList(request)
if request.method == 'POST':
return createNote(request)
@api_view(['GET', 'PUT', 'DELETE'])
def getNote(request, pk):
if request.method == 'GET':
return getNoteDetail(request, pk)
if request.method == 'PUT':
return updateNote(request, pk)
if request.method == 'DELETE':
return deleteNote(request, pk)
# @api_view(['POST'])
# def createNote(request):
# data = request.data
# note = Note.objects.create(
# body=data['body']
# )
# serializer = NoteSerializer(note, many=False)
# return Response(serializer.data)
# @api_view(['PUT'])
# def updateNote(request, pk):
# data = request.data
# note = Note.objects.get(id=pk)
# serializer = NoteSerializer(instance=note, data=data)
# if serializer.is_valid():
# serializer.save()
# return Response(serializer.data)
# @api_view(['DELETE'])
# def deleteNote(request, pk):
# note = Note.objects.get(id=pk)
# note.delete()
# return Response('Note was deleted!')
================================================
FILE: frontend/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
================================================
FILE: frontend/README.md
================================================
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.\
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
================================================
FILE: frontend/build/asset-manifest.json
================================================
{
"files": {
"main.css": "/static/css/main.138a22f4.chunk.css",
"main.js": "/static/js/main.5b159992.chunk.js",
"main.js.map": "/static/js/main.5b159992.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.4eab1d6a.js",
"runtime-main.js.map": "/static/js/runtime-main.4eab1d6a.js.map",
"static/js/2.bbb5d1f5.chunk.js": "/static/js/2.bbb5d1f5.chunk.js",
"static/js/2.bbb5d1f5.chunk.js.map": "/static/js/2.bbb5d1f5.chunk.js.map",
"index.html": "/index.html",
"static/css/main.138a22f4.chunk.css.map": "/static/css/main.138a22f4.chunk.css.map",
"static/js/2.bbb5d1f5.chunk.js.LICENSE.txt": "/static/js/2.bbb5d1f5.chunk.js.LICENSE.txt",
"static/media/add.3ceadee7.svg": "/static/media/add.3ceadee7.svg",
"static/media/arrow-left.a94dd897.svg": "/static/media/arrow-left.a94dd897.svg"
},
"entrypoints": [
"static/js/runtime-main.4eab1d6a.js",
"static/js/2.bbb5d1f5.chunk.js",
"static/css/main.138a22f4.chunk.css",
"static/js/main.5b159992.chunk.js"
]
}
================================================
FILE: frontend/build/index.html
================================================
React App
================================================
FILE: frontend/build/manifest.json
================================================
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
================================================
FILE: frontend/build/robots.txt
================================================
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
================================================
FILE: frontend/build/static/css/main.138a22f4.chunk.css
================================================
@import url(https://fonts.googleapis.com/css2?family=Lexend:wght@400;600;700&display=swap);:root{--color-text:#383a3f;--color-dark:#1f2124;--color-gray:#677;--color-bg:#f3f6f9;--color-light:#acb4bd;--color-lighter:#f9f9f9;--color-white:#fff;--color-border:#e0e3e6}.dark,:root{--color-main:#f68657}.dark{--color-text:#d6d1d1;--color-dark:#f5f6f7;--color-gray:#999;--color-bg:#1f2124;--color-lighter:#292a2c;--color-white:#2e3235;--color-border:#252629}*{margin:0;padding:0;box-sizing:border-box;font-family:"Lexend",sans-serif;color:inherit;font-size:inherit;scroll-behavior:smooth}body{line-height:1.8em;font-weight:400;font-size:16px}a{text-decoration:none}.container{width:100%;height:100vh;color:#383a3f;color:var(--color-text);background-color:#f3f6f9;background-color:var(--color-bg);display:flex;align-items:center}.app{width:100%;max-width:480px;height:88vh;margin:0 auto;background-color:#fff;background-color:var(--color-white);box-shadow:1px 1px 6px rgba(0,0,0,.05);position:relative}.app-header{display:flex;align-items:center;padding:16px;justify-content:space-between;background-color:#f9f9f9;background-color:var(--color-lighter);box-shadow:0 1px 3px rgba(0,0,0,.1)}.app-header h1{font-size:30px;color:#1f2124;color:var(--color-dark);font-weight:800;text-align:center}.app-header button{border:0;background:transparent;cursor:pointer}.app-header button>svg{fill:#1f2124;fill:var(--color-dark);height:25px;width:25px;object-fit:cover}.app-body{padding:16px}.notes-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px}.notes-count,.notes-title{color:#f68657;color:var(--color-main);font-size:24px;font-weight:600}.notes-count{font-size:18px;color:#677;color:var(--color-gray)}.notes-list{padding:0;margin:16px 0;height:70vh;overflow-y:auto;scrollbar-width:none}.notes-list::-webkit-scrollbar{display:none}.notes-list-item{border-bottom:1px solid #e0e3e6;border-bottom:1px solid var(--color-border);margin-bottom:12px;padding:8px 16px;transition:all .2s ease-in-out}.notes-list-item:hover{background-color:#f3f6f9;background-color:var(--color-bg);cursor:pointer}.notes-list-item h3,.notes-list-item p span{font-weight:600}.notes-list-item p span{color:#677;color:var(--color-gray);display:inline-block;margin-right:8px}.notes-list-item p{font-size:14px;color:#acb4bd;color:var(--color-light)}.floating-button{font-size:48px;position:absolute;bottom:24px;right:16px;background:#f68657;background:var(--color-main);border:none;width:60px;height:60px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:1px 1px 10px rgba(0,0,0,.2)}.floating-button>svg{fill:#f3f6f9;fill:var(--color-bg)}.note-header{justify-content:space-between;color:#f68657;color:var(--color-main);padding:10px}.note-header,.note-header h3{display:flex;align-items:center}.note-header h3{font-size:24px;cursor:pointer}.note-header h3 svg{fill:#f68657;fill:var(--color-main);width:20px;margin-right:8px}.note-header button{border:none;outline:none;font-weight:600;background-color:transparent;font-size:18px;cursor:pointer}.note textarea{background-color:#fff;background-color:var(--color-white);border:none;padding:16px 12px;width:100%;height:70vh;resize:none;scrollbar-width:none}.note textarea:active,.note textarea:focus{outline:none;border:none}.note textarea::-webkit-scrollbar{display:none}
/*# sourceMappingURL=main.138a22f4.chunk.css.map */
================================================
FILE: frontend/build/static/js/2.bbb5d1f5.chunk.js
================================================
/*! For license information please see 2.bbb5d1f5.chunk.js.LICENSE.txt */
(this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";e.exports=n(26)},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return b}));var r=n(6),a=n(0),o=n.n(a),l=(n(11),n(4)),i=n(19),u=n(5),c=n(3),s=n(15),f=n.n(s),d=(n(17),n(10)),p=(n(20),function(e){var t=Object(i.a)();return t.displayName=e,t}),h=p("Router-History"),m=p("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.a.createElement(m.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(h.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;o.a.Component;var y={},g=0;function b(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,l=n.strict,i=void 0!==l&&l,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=y[n]||(y[n]={});if(r[e])return r[e];var a=[],o={regexp:f()(e,a,t),keys:a};return g<1e4&&(r[e]=o,g++),o}(n,{end:o,strict:i,sensitive:c}),a=r.regexp,l=r.keys,u=a.exec(e);if(!u)return null;var s=u[0],d=u.slice(1),p=e===s;return o&&!p?null:{path:n,url:"/"===n&&""===s?"/":s,isExact:p,params:l.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var w=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(m.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?b(n.pathname,e.props):t.match,a=Object(c.a)({},t,{location:n,match:r}),l=e.props,i=l.children,s=l.component,f=l.render;return Array.isArray(i)&&function(e){return 0===o.a.Children.count(e)}(i)&&(i=null),o.a.createElement(m.Provider,{value:a},a.match?i?"function"===typeof i?i(a):i:s?o.a.createElement(s,a):f?f(a):null:"function"===typeof i?i(a):null)}))},t}(o.a.Component);function k(e){return"/"===e.charAt(0)?e:"/"+e}function E(e,t){if(!e)return t;var n=k(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function S(e){return"string"===typeof e?e:Object(l.e)(e)}function x(e){return function(){Object(u.a)(!1)}}function _(){}o.a.Component;o.a.Component;o.a.useContext},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;d--){var p=l[d];"."===p?o(l,d):".."===p?(o(l,d),f++):f&&(o(l,d),f--)}if(!c)for(;f--;f)l.unshift("..");!c||""===l[0]||l[0]&&a(l[0])||l.unshift("");var h=l.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function i(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=i(t),a=i(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(5);function s(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function m(e,t,n,a){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(i){throw i instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):i}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=l(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),f({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=m(e,t,d(),w.location);s.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,f({action:r,location:a}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(a[n]=e[n]);return a}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(28)()},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nt}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(m,e)||!p.call(h,e)&&(d.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,x=60107,_=60108,C=60114,P=60109,O=60110,T=60112,L=60113,N=60120,R=60115,z=60116,j=60121,M=60128,I=60129,F=60130,D=60131;if("function"===typeof Symbol&&Symbol.for){var A=Symbol.for;E=A("react.element"),S=A("react.portal"),x=A("react.fragment"),_=A("react.strict_mode"),C=A("react.profiler"),P=A("react.provider"),O=A("react.context"),T=A("react.forward_ref"),L=A("react.suspense"),N=A("react.suspense_list"),R=A("react.memo"),z=A("react.lazy"),j=A("react.block"),A("react.scope"),M=A("react.opaque.id"),I=A("react.debug_trace_mode"),F=A("react.offscreen"),D=A("react.legacy_hidden")}var U,$="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=$&&e[$]||e["@@iterator"])?e:null}function B(e){if(void 0===U)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var W=!1;function H(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var a=u.stack.split("\n"),o=r.stack.split("\n"),l=a.length-1,i=o.length-1;1<=l&&0<=i&&a[l]!==o[i];)i--;for(;1<=l&&0<=i;l--,i--)if(a[l]!==o[i]){if(1!==l||1!==i)do{if(l--,0>--i||a[l]!==o[i])return"\n"+a[l].replace(" at new "," at ")}while(1<=l&&0<=i);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function Q(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case C:return"Profiler";case _:return"StrictMode";case L:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return q(e.type);case j:return q(e._render);case z:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function le(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a=n.length))throw Error(l(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ce(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ve,ye=(ve=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function ke(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ke(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(l(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(l(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(l(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Pe=null,Oe=null,Te=null;function Le(e){if(e=ea(e)){if("function"!==typeof Pe)throw Error(l(280));var t=e.stateNode;t&&(t=na(t),Pe(e.stateNode,e.type,t))}}function Ne(e){Oe?Te?Te.push(e):Te=[e]:Oe=e}function Re(){if(Oe){var e=Oe,t=Te;if(Te=Oe=null,Le(e),t)for(e=0;e(r=31-Wt(r))?0:1<n;n++)t.push(e);return t}function Bt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Wt(t)]=n}var Wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Qt|0)|0},Ht=Math.log,Qt=Math.LN2;var qt=o.unstable_UserBlockingPriority,Kt=o.unstable_runWithPriority,Yt=!0;function Gt(e,t,n,r){Fe||Me();var a=Jt,o=Fe;Fe=!0;try{je(a,e,t,n,r)}finally{(Fe=o)||Ae()}}function Xt(e,t,n,r){Kt(qt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var a;if(Yt)if((a=0===(4&t))&&0=Mn),Dn=String.fromCharCode(32),An=!1;function Un(e,t){switch(e){case"keyup":return-1!==zn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Bn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Bn[e.type]:"textarea"===t}function Hn(e,t,n,r){Ne(r),0<(t=jr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qn=null,qn=null;function Kn(e){Cr(e,0)}function Yn(e){if(X(ta(e)))return e}function Gn(e,t){if("change"===e)return t}var Xn=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Xn=Jn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mr=f&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,gr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==J(r)||("selectionStart"in(r=vr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&cr(gr,r)||(gr=r,0<(r=jr(yr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(jt,2);for(var kr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Eroa||(e.current=aa[oa],aa[oa]=null,oa--)}function ua(e,t){oa++,aa[oa]=e.current,e.current=t}var ca={},sa=la(ca),fa=la(!1),da=ca;function pa(e,t){var n=e.type.contextTypes;if(!n)return ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ha(e){return null!==(e=e.childContextTypes)&&void 0!==e}function ma(){ia(fa),ia(sa)}function va(e,t,n){if(sa.current!==ca)throw Error(l(168));ua(sa,t),ua(fa,n)}function ya(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(l(108,q(t)||"Unknown",o));return a({},n,r)}function ga(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ca,da=sa.current,ua(sa,e),ua(fa,fa.current),!0}function ba(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(e=ya(e,t,da),r.__reactInternalMemoizedMergedChildContext=e,ia(fa),ia(sa),ua(sa,e)):ia(fa),ua(fa,n)}var wa=null,ka=null,Ea=o.unstable_runWithPriority,Sa=o.unstable_scheduleCallback,xa=o.unstable_cancelCallback,_a=o.unstable_shouldYield,Ca=o.unstable_requestPaint,Pa=o.unstable_now,Oa=o.unstable_getCurrentPriorityLevel,Ta=o.unstable_ImmediatePriority,La=o.unstable_UserBlockingPriority,Na=o.unstable_NormalPriority,Ra=o.unstable_LowPriority,za=o.unstable_IdlePriority,ja={},Ma=void 0!==Ca?Ca:function(){},Ia=null,Fa=null,Da=!1,Aa=Pa(),Ua=1e4>Aa?Pa:function(){return Pa()-Aa};function $a(){switch(Oa()){case Ta:return 99;case La:return 98;case Na:return 97;case Ra:return 96;case za:return 95;default:throw Error(l(332))}}function Va(e){switch(e){case 99:return Ta;case 98:return La;case 97:return Na;case 96:return Ra;case 95:return za;default:throw Error(l(332))}}function Ba(e,t){return e=Va(e),Ea(e,t)}function Wa(e,t,n){return e=Va(e),Sa(e,t,n)}function Ha(){if(null!==Fa){var e=Fa;Fa=null,xa(e)}Qa()}function Qa(){if(!Da&&null!==Ia){Da=!0;var e=0;try{var t=Ia;Ba(99,(function(){for(;em?(v=f,f=null):v=f.sibling;var y=p(a,f,i[m],u);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(a,f),l=o(y,l,m),null===s?c=y:s.sibling=y,s=y,f=v}if(m===i.length)return n(a,f),c;if(null===f){for(;mv?(y=m,m=null):y=m.sibling;var b=p(a,m,g.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(a,m),i=o(b,i,v),null===f?s=b:f.sibling=b,f=b,m=y}if(g.done)return n(a,m),s;if(null===m){for(;!g.done;v++,g=u.next())null!==(g=d(a,g.value,c))&&(i=o(g,i,v),null===f?s=g:f.sibling=g,f=g);return s}for(m=r(a,m);!g.done;v++,g=u.next())null!==(g=h(m,a,v,g.value,c))&&(e&&null!==g.alternate&&m.delete(null===g.key?v:g.key),i=o(g,i,v),null===f?s=g:f.sibling=g,f=g);return e&&m.forEach((function(e){return t(a,e)})),s}return function(e,r,o,u){var c="object"===typeof o&&null!==o&&o.type===x&&null===o.key;c&&(o=o.props.children);var s="object"===typeof o&&null!==o;if(s)switch(o.$$typeof){case E:e:{for(s=o.key,c=r;null!==c;){if(c.key===s){switch(c.tag){case 7:if(o.type===x){n(e,c.sibling),(r=a(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=a(c,o.props)).ref=ko(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===x?((r=Hu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Wu(o.type,o.key,o.props,null,e.mode,u)).ref=ko(e,r,o),u.return=e,e=u)}return i(e);case S:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ku(o,e.mode,u)).return=e,e=r}return i(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=qu(o,e.mode,u)).return=e,e=r),i(e);if(wo(o))return m(e,r,o,u);if(V(o))return v(e,r,o,u);if(s&&Eo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(l(152,q(e.type)||"Component"))}return n(e,r)}}var xo=So(!0),_o=So(!1),Co={},Po=la(Co),Oo=la(Co),To=la(Co);function Lo(e){if(e===Co)throw Error(l(174));return e}function No(e,t){switch(ua(To,t),ua(Oo,e),ua(Po,Co),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ia(Po),ua(Po,t)}function Ro(){ia(Po),ia(Oo),ia(To)}function zo(e){Lo(To.current);var t=Lo(Po.current),n=he(t,e.type);t!==n&&(ua(Oo,e),ua(Po,n))}function jo(e){Oo.current===e&&(ia(Po),ia(Oo))}var Mo=la(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fo=null,Do=null,Ao=!1;function Uo(e,t){var n=$u(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function $o(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Vo(e){if(Ao){var t=Do;if(t){var n=t;if(!$o(e,t)){if(!(t=Hr(n.nextSibling))||!$o(e,t))return e.flags=-1025&e.flags|2,Ao=!1,void(Fo=e);Uo(Fo,n)}Fo=e,Do=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Ao=!1,Fo=e}}function Bo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Fo=e}function Wo(e){if(e!==Fo)return!1;if(!Ao)return Bo(e),Ao=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$r(t,e.memoizedProps))for(t=Do;t;)Uo(e,t),t=Hr(t.nextSibling);if(Bo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Do=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Do=null}}else Do=Fo?Hr(e.stateNode.nextSibling):null;return!0}function Ho(){Do=Fo=null,Ao=!1}var Qo=[];function qo(){for(var e=0;eo))throw Error(l(301));o+=1,Zo=Jo=null,t.updateQueue=null,Ko.current=Rl,e=n(r,a)}while(tl)}if(Ko.current=Tl,t=null!==Jo&&null!==Jo.next,Go=0,Zo=Jo=Xo=null,el=!1,t)throw Error(l(300));return e}function ol(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e,Zo}function ll(){if(null===Jo){var e=Xo.alternate;e=null!==e?e.memoizedState:null}else e=Jo.next;var t=null===Zo?Xo.memoizedState:Zo.next;if(null!==t)Zo=t,Jo=e;else{if(null===e)throw Error(l(310));e={memoizedState:(Jo=e).memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e}return Zo}function il(e,t){return"function"===typeof t?t(e):t}function ul(e){var t=ll(),n=t.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=e;var r=Jo,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var u=i=o=null,c=a;do{var s=c.lane;if((Go&s)===s)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:s,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(i=u=f,o=r):u=u.next=f,Xo.lanes|=s,Di|=s}c=c.next}while(null!==c&&c!==a);null===u?o=r:u.next=i,ir(r,t.memoizedState)||(jl=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function cl(e){var t=ll(),n=t.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{o=e(o,i.action),i=i.next}while(i!==a);ir(o,t.memoizedState)||(jl=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function sl(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(Go&e)===e)&&(t._workInProgressVersionPrimary=r,Qo.push(t))),e)return n(t._source);throw Qo.push(t),Error(l(350))}function fl(e,t,n,r){var a=Li;if(null===a)throw Error(l(349));var o=t._getVersion,i=o(t._source),u=Ko.current,c=u.useState((function(){return sl(a,t,n)})),s=c[1],f=c[0];c=Zo;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,m=d.source;d=d.subscribe;var v=Xo;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=s;var e=o(t._source);if(!ir(i,e)){e=n(t._source),ir(f,e)||(s(e),e=su(v),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,l=e;0n?98:n,(function(){e(!0)})),Ba(97<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Yr]=t,e[Gr]=r,Hl(e,t),t.stateNode=e,c=_e(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),o=r;break;case"iframe":case"object":case"embed":Pr("load",e),o=r;break;case"video":case"audio":for(o=0;oBi&&(t.flags|=64,i=!0,ri(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Io(c))){if(t.flags|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ri(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Ao)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ua()-r.renderingStartTime>Bi&&1073741824!==n&&(t.flags|=64,i=!0,ri(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ua(),n.sibling=null,t=Mo.current,ua(Mo,i?1&t|2:1&t),n):null;case 23:case 24:return wu(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(l(156,t.tag))}function oi(e){switch(e.tag){case 1:ha(e.type)&&ma();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ro(),ia(fa),ia(sa),qo(),0!==(64&(t=e.flags)))throw Error(l(285));return e.flags=-4097&t|64,e;case 5:return jo(e),null;case 13:return ia(Mo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ia(Mo),null;case 4:return Ro(),null;case 10:return eo(e),null;case 23:case 24:return wu(),null;default:return null}}function li(e,t){try{var n="",r=t;do{n+=Q(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a}}function ii(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Hl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ql=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Lo(Po.current);var l,i=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),i=[];break;case"option":o=oe(e,o),r=oe(e,r),i=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),i=[];break;case"textarea":o=ie(e,o),r=ie(e,r),i=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Fr)}for(f in xe(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(l in c)c.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var s=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&s!==c&&(null!=s||null!=c))if("style"===f)if(c){for(l in c)!c.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in s)s.hasOwnProperty(l)&&c[l]!==s[l]&&(n||(n={}),n[l]=s[l])}else n||(i||(i=[]),i.push(f,n)),n=s;else"dangerouslySetInnerHTML"===f?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(i=i||[]).push(f,s)):"children"===f?"string"!==typeof s&&"number"!==typeof s||(i=i||[]).push(f,""+s):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=s&&"onScroll"===f&&Pr("scroll",e),i||c===s||(i=[])):"object"===typeof s&&null!==s&&s.$$typeof===M?s.toString():(i=i||[]).push(f,s))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},ql=function(e,t,n,r){n!==r&&(t.flags|=4)};var ui="function"===typeof WeakMap?WeakMap:Map;function ci(e,t,n){(n=io(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qi||(qi=!0,Ki=r),ii(0,t)},n}function si(e,t,n){(n=io(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var a=t.value;n.payload=function(){return ii(0,t),r(a)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Yi?Yi=new Set([this]):Yi.add(this),ii(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fi="function"===typeof WeakSet?WeakSet:Set;function di(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Fu(e,n)}else t.current=null}function pi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ka(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(l(163))}function hi(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!==(4&(a=a.tag))&&0!==(1&a)&&(ju(n,e),zu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ka(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ur(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(l(163))}function mi(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=void 0!==a&&null!==a&&a.hasOwnProperty("display")?a.display:null,r.style.display=ke("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function vi(e,t){if(ka&&"function"===typeof ka.onCommitFiberUnmount)try{ka.onCommitFiberUnmount(wa,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!==(4&r))ju(t,n);else{r=t;try{a()}catch(o){Fu(r,o)}}n=n.next}while(n!==e)}break;case 1:if(di(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Fu(t,o)}break;case 5:di(t);break;case 4:Ei(e,t)}}function yi(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gi(e){return 5===e.tag||3===e.tag||4===e.tag}function bi(e){e:{for(var t=e.return;null!==t;){if(gi(t))break e;t=t.return}throw Error(l(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(l(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?wi(e,n,t):ki(e,n,t)}function wi(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Fr));else if(4!==r&&null!==(e=e.child))for(wi(e,t,n),e=e.sibling;null!==e;)wi(e,t,n),e=e.sibling}function ki(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ki(e,t,n),e=e.sibling;null!==e;)ki(e,t,n),e=e.sibling}function Ei(e,t){for(var n,r,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(l(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var i=e,u=a,c=u;;)if(vi(i,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(i=n,u=a.stateNode,8===i.nodeType?i.parentNode.removeChild(u):i.removeChild(u)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(vi(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Si(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Gr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,a),t=_e(e,r),a=0;aa&&(a=i),n&=~o}if(n=a,10<(n=(120>(n=Ua()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ci(n/1960))-n)){e.timeoutHandle=Vr(Tu.bind(null,e),n);break}Tu(e);break;case 5:Tu(e);break;default:throw Error(l(329))}}return pu(e,Ua()),e.callbackNode===t?hu.bind(null,e):null}function mu(e,t){for(t&=~Ui,t&=~Ai,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Mi&&(Mi=2),u=li(u,i),d=l;do{switch(d.tag){case 3:o=u,d.flags|=4096,t&=-t,d.lanes|=t,co(d,ci(0,o,t));break e;case 1:o=u;var k=d.type,E=d.stateNode;if(0===(64&d.flags)&&("function"===typeof k.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===Yi||!Yi.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,co(d,si(d,o,t));break e}}d=d.return}while(null!==d)}Ou(n)}catch(S){t=S,Ni===n&&null!==n&&(Ni=n=n.return);continue}break}}function Su(){var e=Pi.current;return Pi.current=Tl,null===e?Tl:e}function xu(e,t){var n=Ti;Ti|=16;var r=Su();for(Li===e&&Ri===t||ku(e,t);;)try{_u();break}catch(a){Eu(e,a)}if(Za(),Ti=n,Pi.current=r,null!==Ni)throw Error(l(261));return Li=null,Ri=0,Mi}function _u(){for(;null!==Ni;)Pu(Ni)}function Cu(){for(;null!==Ni&&!_a();)Pu(Ni)}function Pu(e){var t=Hi(e.alternate,e,zi);e.memoizedProps=e.pendingProps,null===t?Ou(e):Ni=t,Oi.current=null}function Ou(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ai(n,t,zi)))return void(Ni=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&zi)||0===(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1i&&(u=i,i=E,E=u),u=fr(b,E),o=fr(b,i),u&&o&&(1!==k.rangeCount||k.anchorNode!==u.node||k.anchorOffset!==u.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(u.node,u.offset),k.removeAllRanges(),E>i?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;bUa()-Vi?ku(e,0):Ui|=n),pu(e,t)}function Au(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===$a()?1:2:(0===ou&&(ou=Fi),0===(t=$t(62914560&~ou))&&(t=4194304))),n=cu(),null!==(e=du(e,t))&&(Bt(e,t,n),pu(e,n))}function Uu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function $u(e,t,n,r){return new Uu(e,t,n,r)}function Vu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bu(e,t){var n=e.alternate;return null===n?((n=$u(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wu(e,t,n,r,a,o){var i=2;if(r=e,"function"===typeof e)Vu(e)&&(i=1);else if("string"===typeof e)i=5;else e:switch(e){case x:return Hu(n.children,a,o,t);case I:i=8,a|=16;break;case _:i=8,a|=1;break;case C:return(e=$u(12,n,t,8|a)).elementType=C,e.type=C,e.lanes=o,e;case L:return(e=$u(13,n,t,a)).type=L,e.elementType=L,e.lanes=o,e;case N:return(e=$u(19,n,t,a)).elementType=N,e.lanes=o,e;case F:return Qu(n,a,o,t);case D:return(e=$u(24,n,t,a)).elementType=D,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case P:i=10;break e;case O:i=9;break e;case T:i=11;break e;case R:i=14;break e;case z:i=16,r=null;break e;case j:i=22;break e}throw Error(l(130,null==e?e:typeof e,""))}return(t=$u(i,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Hu(e,t,n,r){return(e=$u(7,e,r,t)).lanes=n,e}function Qu(e,t,n,r){return(e=$u(23,e,r,t)).elementType=F,e.lanes=n,e}function qu(e,t,n){return(e=$u(6,e,null,t)).lanes=n,e}function Ku(e,t,n){return(t=$u(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.mutableSourceEagerHydrationData=null}function Gu(e,t,n){var r=3=w},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0C(l,n))void 0!==u&&0>C(u,l)?(e[r]=u,e[i]=n,r=i):(e[r]=l,e[o]=n,r=o);else{if(!(void 0!==u&&0>C(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],O=[],T=1,L=null,N=3,R=!1,z=!1,j=!1;function M(e){for(var t=x(O);null!==t;){if(null===t.callback)_(O);else{if(!(t.startTime<=e))break;_(O),t.sortIndex=t.expirationTime,S(P,t)}t=x(O)}}function I(e){if(j=!1,M(e),!z)if(null!==x(P))z=!0,r(F);else{var t=x(O);null!==t&&a(I,t.startTime-e)}}function F(e,n){z=!1,j&&(j=!1,o()),R=!0;var r=N;try{for(M(n),L=x(P);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var l=L.callback;if("function"===typeof l){L.callback=null,N=L.priorityLevel;var i=l(L.expirationTime<=n);n=t.unstable_now(),"function"===typeof i?L.callback=i:L===x(P)&&_(P),M(n)}else _(P);L=x(P)}if(null!==L)var u=!0;else{var c=x(O);null!==c&&a(I,c.startTime-n),u=!1}return u}finally{L=null,N=r,R=!1}}var D=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){z||R||(z=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return x(P)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=D,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,l){var i=t.unstable_now();switch("object"===typeof l&&null!==l?l="number"===typeof(l=l.delay)&&0i?(e.sortIndex=l,S(O,e),null===x(P)&&e===x(O)&&(j?o():j=!0,a(I,l-i))):(e.sortIndex=u,S(P,e),z||R||(z=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},,function(e,t,n){"use strict";n(14);var r=n(0),a=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),t.Fragment=o("react.fragment")}var l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,s=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)i.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:s,props:o,_owner:l.current}}t.jsx=c,t.jsxs=c},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",i=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(N){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),l=new O(r||[]);return o._invoke=function(e,t,n){var r=f;return function(a,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===a)throw o;return L()}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var i=_(l,n);if(i){if(i===m)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=s(e,t,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,l),o}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(N){return{type:"throw",arg:N}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function v(){}function y(){}function g(){}var b={};u(b,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(T([])));k&&k!==n&&r.call(k,o)&&(b=k);var E=g.prototype=v.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(a,o,l,i){var u=s(e[a],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,l,i)}),(function(e){n("throw",e,l,i)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,i)}))}i(u.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=s(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(e){if(e){var n=e[o];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var a=-1,l=function n(){for(;++a=0;--o){var l=this.tryEntries[o],i=l.completion;if("root"===l.tryLoc)return a("end");if(l.tryLoc<=this.prev){var u=r.call(l,"catchLoc"),c=r.call(l,"finallyLoc");if(u&&c){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=r}catch(a){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";var r=n(29);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,l){if(l!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,l=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,k=r?Symbol.for("react.scope"):60119;function E(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case f:case d:case l:case u:case i:case h:return e;default:switch(e=e&&e.$$typeof){case s:case p:case y:case v:case c:return e;default:return t}}case o:return t}}}function S(e){return E(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=s,t.ContextProvider=c,t.Element=a,t.ForwardRef=p,t.Fragment=l,t.Lazy=y,t.Memo=v,t.Portal=o,t.Profiler=u,t.StrictMode=i,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||E(e)===f},t.isConcurrentMode=S,t.isContextConsumer=function(e){return E(e)===s},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===l},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===v},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===l||e===d||e===u||e===i||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===c||e.$$typeof===s||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===k||e.$$typeof===g)},t.typeOf=E}]]);
//# sourceMappingURL=2.bbb5d1f5.chunk.js.map
================================================
FILE: frontend/build/static/js/2.bbb5d1f5.chunk.js.LICENSE.txt
================================================
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
================================================
FILE: frontend/build/static/js/main.5b159992.chunk.js
================================================
(this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[0],{25:function(e,t,n){},33:function(e,t,n){"use strict";n.r(t);var r,c=n(0),a=n.n(c),o=n(18),i=n.n(o),s=n(8),l=n(2),u=(n(25),n(1)),d=function(){return Object(u.jsx)("div",{className:"app-header",children:Object(u.jsx)("h1",{children:"Note List"})})},f=n(7),j=n.n(f),p=n(9),h=n(12),b=function(e){return new Date(e.updated).toLocaleDateString()},O=function(e){var t=e.body.split("\n")[0];return t.length>45?t.slice(0,45):t},v=function(e){var t=O(e),n=e.body.replaceAll("\n"," ");return(n=n.replaceAll(t,"")).length>45?n.slice(0,45)+"...":n},x=function(e){var t=e.note;return Object(u.jsx)(s.b,{to:"/note/".concat(t.id),children:Object(u.jsxs)("div",{className:"notes-list-item",children:[Object(u.jsx)("h3",{children:O(t)}),Object(u.jsxs)("p",{children:[Object(u.jsx)("span",{children:b(t)}),v(t)]})]})})},m=["title","titleId"];function y(){return(y=Object.assign||function(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}function g(e,t){var n=e.title,a=e.titleId,o=w(e,m);return c.createElement("svg",y({xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",ref:t,"aria-labelledby":a},o),void 0===n?c.createElement("title",{id:a},"add"):n?c.createElement("title",{id:a},n):null,r||(r=c.createElement("path",{d:"M16.943 0.943h-1.885v14.115h-14.115v1.885h14.115v14.115h1.885v-14.115h14.115v-1.885h-14.115v-14.115z"})))}var E,N=c.forwardRef(g),k=(n.p,function(){return Object(u.jsx)(s.b,{to:"/note/new",className:"floating-button",children:Object(u.jsx)(N,{})})}),S=function(){var e=Object(c.useState)([]),t=Object(h.a)(e,2),n=t[0],r=t[1];Object(c.useEffect)((function(){a()}),[]);var a=function(){var e=Object(p.a)(j.a.mark((function e(){var t,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/notes/");case 2:return t=e.sent,e.next=5,t.json();case 5:n=e.sent,r(n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.jsxs)("div",{className:"notes",children:[Object(u.jsxs)("div",{className:"notes-header",children:[Object(u.jsx)("h2",{className:"notes-title",children:"\u2636 Notes"}),Object(u.jsx)("p",{className:"notes-count",children:n.length})]}),Object(u.jsx)("div",{className:"notes-list",children:n.map((function(e,t){return Object(u.jsx)(x,{note:e},t)}))}),Object(u.jsx)(k,{})]})},C=n(16),P=["title","titleId"];function I(){return(I=Object.assign||function(e){for(var t=1;t=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}function D(e,t){var n=e.title,r=e.titleId,a=T(e,P);return c.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 32 32",ref:t,"aria-labelledby":r},a),void 0===n?c.createElement("title",{id:r},"chevron-left"):n?c.createElement("title",{id:r},n):null,E||(E=c.createElement("path",{d:"M11 16l13-13v-3l-16 16 16 16v-3l-13-13z"})))}var J=c.forwardRef(D),B=(n.p,function(e){var t=e.match,n=e.history,r=t.params.id,a=Object(c.useState)(null),o=Object(h.a)(a,2),i=o[0],s=o[1];Object(c.useEffect)((function(){l()}),[r]);var l=function(){var e=Object(p.a)(j.a.mark((function e(){var t,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("new"!==r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,fetch("/api/notes/".concat(r,"/"));case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,s(n);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),d=function(){var e=Object(p.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fetch("/api/notes/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),f=function(){var e=Object(p.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fetch("/api/notes/".concat(r,"/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=Object(p.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fetch("/api/notes/".concat(r,"/"),{method:"DELETE",headers:{"Content-Type":"application/json"}}),n.push("/");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){console.log("NOTE:",i),"new"!==r&&""==i.body?b():"new"!==r?f():"new"===r&&null!==i.body&&d(),n.push("/")};return Object(u.jsxs)("div",{className:"note",children:[Object(u.jsxs)("div",{className:"note-header",children:[Object(u.jsx)("h3",{children:Object(u.jsx)(J,{onClick:O})}),"new"!==r?Object(u.jsx)("button",{onClick:b,children:"Delete"}):Object(u.jsx)("button",{onClick:O,children:"Done"})]}),Object(u.jsx)("textarea",{onChange:function(e){var t;t=e.target.value,s((function(e){return Object(C.a)(Object(C.a)({},e),{},{body:t})})),console.log("Handle Change:",i)},value:null===i||void 0===i?void 0:i.body})]})});var L=function(){return Object(u.jsx)(s.a,{children:Object(u.jsx)("div",{className:"container dark",children:Object(u.jsxs)("div",{className:"app",children:[Object(u.jsx)(d,{}),Object(u.jsx)(l.a,{path:"/",exact:!0,component:S}),Object(u.jsx)(l.a,{path:"/note/:id",component:B})]})})})};i.a.render(Object(u.jsx)(a.a.StrictMode,{children:Object(u.jsx)(L,{})}),document.getElementById("root"))}},[[33,1,2]]]);
//# sourceMappingURL=main.5b159992.chunk.js.map
================================================
FILE: frontend/build/static/js/runtime-main.4eab1d6a.js
================================================
!function(e){function r(r){for(var n,f,l=r[0],i=r[1],a=r[2],c=0,s=[];c0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
================================================
FILE: frontend/public/index.html
================================================
React App
================================================
FILE: frontend/public/manifest.json
================================================
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
================================================
FILE: frontend/public/robots.txt
================================================
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
================================================
FILE: frontend/src/App.css
================================================
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;600;700&display=swap');
:root {
--color-main: #f68657;
--color-text: #383a3f;
--color-dark: #1f2124;
--color-gray: #677;
--color-bg: #f3f6f9;
--color-light: #acb4bd;
--color-lighter: #f9f9f9;
--color-white: #fff;
--color-border:#e0e3e6;
}
.dark {
--color-main: #f68657;
--color-text: #d6d1d1;
--color-dark: #f5f6f7;
--color-gray: #999;
--color-bg: #1f2124;
--color-lighter: #292a2c;
--color-white: #2e3235;
--color-border:#252629;
}
/* BASE STYLES */
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Lexend', sans-serif;
color: inherit;
font-size: inherit;
scroll-behavior: smooth;
}
body{
line-height: 1.8em;
font-weight: 400;
font-size: 16px;
}
a {
text-decoration: none;
}
/* APP STYLES */
.container {
width: 100%;
height: 100vh;
color: var(--color-text);
background-color: var(--color-bg);
display: flex;
align-items: center;
}
.app {
width: 100%;
max-width: 480px;
height: 88vh;
margin: 0 auto;
background-color: var(--color-white);
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.05);
position: relative;
}
.app-header {
display: flex;
align-items: center;
padding: 16px;
justify-content: space-between;
background-color: var(--color-lighter);
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}
.app-header h1 {
font-size: 30px;
color: var(--color-dark);
font-weight: 800;
text-align: center;
}
.app-header button {
border: 0;
background: transparent;
cursor: pointer;
}
.app-header button > svg {
fill: var(--color-dark);
height: 25px;
width: 25px;
object-fit: cover;
}
.app-body {
padding: 16px;
}
/* NOTES STYLES */
.notes-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
}
.notes-title,
.notes-count {
color: var(--color-main);
font-size: 24px;
font-weight: 600;
}
.notes-count {
font-size: 18px;
color: var(--color-gray);
}
.notes-list {
padding: 0;
margin: 16px 0;
height: 70vh;
overflow-y: auto;
scrollbar-width: none; /* Firefox */
}
.notes-list::-webkit-scrollbar {
display: none;
}
.notes-list-item {
border-bottom: 1px solid var(--color-border);
margin-bottom: 12px;
padding: 8px 16px;
transition: all 0.2s ease-in-out;
}
.notes-list-item:hover {
background-color: var(--color-bg);
cursor: pointer;
}
.notes-list-item h3,
.notes-list-item p span {
font-weight: 600;
}
.notes-list-item p span {
color: var(--color-gray);
display: inline-block;
margin-right: 8px;
}
.notes-list-item p {
font-size: 14px;
color: var(--color-light);
}
.floating-button {
font-size: 48px;
position: absolute;
bottom: 24px;
right: 16px;
background: var(--color-main);
border: none;
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}
.floating-button > svg {
fill: var(--color-bg);
}
/*==============================
=> Note Styles
================================*/
.note-header {
display: flex;
align-items: center;
justify-content: space-between;
color: var(--color-main);
padding: 10px;
}
.note-header h3 {
display: flex;
align-items: center;
font-size: 24px;
cursor: pointer;
}
.note-header h3 svg {
fill: var(--color-main);
width: 20px;
margin-right: 8px;
}
.note-header button {
border: none;
outline: none;
font-weight: 600;
background-color: transparent;
font-size: 18px;
cursor: pointer;
}
.note textarea {
background-color: var(--color-white);
border: none;
padding: 16px 12px;
width: 100%;
height: 70vh;
resize: none;
scrollbar-width: none; /* Firefox */
}
.note textarea:active,
.note textarea:focus {
outline: none;
border: none;
}
.note textarea::-webkit-scrollbar {
display: none;
}
================================================
FILE: frontend/src/App.js
================================================
import {
HashRouter as Router,
Route
} from "react-router-dom";
import './App.css';
import Header from './components/Header'
import NotesListPage from './pages/NotesListPage'
import NotePage from './pages/NotePage'
function App() {
return (
);
}
export default App;
================================================
FILE: frontend/src/components/AddButton.js
================================================
import React from 'react'
import { Link } from 'react-router-dom'
import { ReactComponent as AddIcon } from '../assets/add.svg'
const AddButton = () => {
return (
)
}
export default AddButton
================================================
FILE: frontend/src/components/Header.js
================================================
import React from 'react'
const Header = () => {
return (
Note List
)
}
export default Header
================================================
FILE: frontend/src/components/ListItem.js
================================================
import React from 'react'
import { Link } from 'react-router-dom'
let getTime = (note) => {
return new Date(note.updated).toLocaleDateString()
}
let getTitle = (note) => {
let title = note.body.split('\n')[0]
if (title.length > 45) {
return title.slice(0, 45)
}
return title
}
let getContent = (note) => {
let title = getTitle(note)
let content = note.body.replaceAll('\n', ' ')
content = content.replaceAll(title, '')
if (content.length > 45) {
return content.slice(0, 45) + '...'
} else {
return content
}
}
const ListItem = ({ note }) => {
return (
{getTitle(note)}
{getTime(note)}{getContent(note)}
)
}
export default ListItem
================================================
FILE: frontend/src/index.js
================================================
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
,
document.getElementById('root')
);
================================================
FILE: frontend/src/pages/NotePage.js
================================================
import React, { useState, useEffect } from 'react'
import { ReactComponent as ArrowLeft } from '../assets/arrow-left.svg'
import { Link } from 'react-router-dom'
const NotePage = ({ match, history }) => {
let noteId = match.params.id
let [note, setNote] = useState(null)
useEffect(() => {
getNote()
}, [noteId])
let getNote = async () => {
if (noteId === 'new') return
let response = await fetch(`/api/notes/${noteId}/`)
let data = await response.json()
setNote(data)
}
let createNote = async () => {
fetch(`/api/notes/`, {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(note)
})
}
let updateNote = async () => {
fetch(`/api/notes/${noteId}/`, {
method: "PUT",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(note)
})
}
let deleteNote = async () => {
fetch(`/api/notes/${noteId}/`, {
method: 'DELETE',
'headers': {
'Content-Type': 'application/json'
}
})
history.push('/')
}
let handleSubmit = () => {
console.log('NOTE:', note)
if (noteId !== 'new' && note.body == '') {
deleteNote()
} else if (noteId !== 'new') {
updateNote()
} else if (noteId === 'new' && note.body !== null) {
createNote()
}
history.push('/')
}
let handleChange = (value) => {
setNote(note => ({ ...note, 'body': value }))
console.log('Handle Change:', note)
}
return (
{noteId !== 'new' ? (
) : (
)}
)
}
export default NotePage
================================================
FILE: frontend/src/pages/NotesListPage.js
================================================
import React, { useState, useEffect } from 'react'
import ListItem from '../components/ListItem'
import AddButton from '../components/AddButton'
const NotesListPage = () => {
let [notes, setNotes] = useState([])
useEffect(() => {
getNotes()
}, [])
let getNotes = async () => {
let response = await fetch('/api/notes/')
let data = await response.json()
setNotes(data)
}
return (
☶ Notes
{notes.length}
{notes.map((note, index) => (
))}
)
}
export default NotesListPage
================================================
FILE: manage.py
================================================
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mynotes.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
================================================
FILE: mynotes/__init__.py
================================================
================================================
FILE: mynotes/asgi.py
================================================
"""
ASGI config for mynotes project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mynotes.settings')
application = get_asgi_application()
================================================
FILE: mynotes/settings.py
================================================
"""
Django settings for mynotes project.
Generated by 'django-admin startproject' using Django 3.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-iciqweur=hp(xnyau)ev9d0@t)4orp)js8=t8qayvib05if0+3'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'api.apps.ApiConfig',
'rest_framework',
"corsheaders",
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
"corsheaders.middleware.CorsMiddleware",
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'mynotes.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
BASE_DIR / 'frontend/build'
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'mynotes.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.2/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
BASE_DIR / 'frontend/build/static'
]
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CORS_ALLOW_ALL_ORIGINS = True
================================================
FILE: mynotes/urls.py
================================================
"""mynotes URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('api.urls')),
path('', TemplateView.as_view(template_name='index.html')),
]
================================================
FILE: mynotes/wsgi.py
================================================
"""
WSGI config for mynotes project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mynotes.settings')
application = get_wsgi_application()
================================================
FILE: requirements.txt
================================================
asgiref==3.4.1
Django==3.2.7
django-cors-headers==3.8.0
djangorestframework==3.12.4
pytz==2021.1
sqlparse==0.4.2