├── README.md
├── postcss.config.js
├── src
├── index.css
├── main.jsx
├── App.jsx
├── context
│ ├── AppReducer.jsx
│ └── GlobalState.jsx
└── components
│ ├── Heading.jsx
│ ├── TaskList.jsx
│ └── TaskForm.jsx
├── vite.config.js
├── tailwind.config.js
├── .gitignore
├── index.html
├── dist
├── index.html
├── vite.svg
└── assets
│ ├── index-0bb75f0b.css
│ └── index-ad7795e9.js
├── package.json
└── public
└── vite.svg
/README.md:
--------------------------------------------------------------------------------
1 | # React Context CRUD
2 |
3 | This is a simple CRUD application using React Context API.
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | background: #202124;
7 | }
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | export default {
3 | content: [
4 | "./index.html",
5 | "./src/**/*.{js,ts,jsx,tsx}",
6 | ],
7 | theme: {
8 | extend: {},
9 | },
10 | plugins: [],
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/src/main.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from 'react-dom/client'
3 | import { BrowserRouter } from "react-router-dom";
4 | import "./index.css";
5 | import App from "./App";
6 |
7 | ReactDOM.createRoot(document.getElementById('root')).render(
8 |
9 |
10 |
11 |
12 | ,
13 | )
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite + React
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite + React
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "preview": "vite preview"
10 | },
11 | "dependencies": {
12 | "react": "^18.2.0",
13 | "react-dom": "^18.2.0",
14 | "react-router-dom": "^6.10.0",
15 | "uuid": "^9.0.0"
16 | },
17 | "devDependencies": {
18 | "@types/react": "^18.0.35",
19 | "@types/react-dom": "^18.0.11",
20 | "@vitejs/plugin-react": "^3.1.0",
21 | "autoprefixer": "^10.4.14",
22 | "postcss": "^8.4.21",
23 | "tailwindcss": "^3.3.1",
24 | "vite": "^4.2.1"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/App.jsx:
--------------------------------------------------------------------------------
1 | import { Route, Routes } from "react-router-dom";
2 | import { GlobalProvider } from "./context/GlobalState";
3 |
4 | import TaskList from "./components/TaskList";
5 | import TaskForm from "./components/TaskForm";
6 | import Heading from "./components/Heading";
7 |
8 | function App() {
9 | return (
10 |
11 |
12 | {/*

*/}
13 |
14 |
15 |
16 | } />
17 | } />
18 | } />
19 |
20 |
21 |
22 |
23 | );
24 | }
25 |
26 | export default App;
27 |
--------------------------------------------------------------------------------
/src/context/AppReducer.jsx:
--------------------------------------------------------------------------------
1 | export default function appReducer(state, action) {
2 | switch (action.type) {
3 | case "ADD_TASK":
4 | return {
5 | ...state,
6 | tasks: [...state.tasks, action.payload],
7 | };
8 | case "UPDATE_TASK": {
9 | const updatedTask = action.payload;
10 |
11 | const updatedTasks = state.tasks.map((task) => {
12 | if (task.id === updatedTask.id) {
13 | updatedTask.done = task.done;
14 | return updatedTask;
15 | }
16 | return task;
17 | });
18 | return {
19 | ...state,
20 | tasks: updatedTasks,
21 | };
22 | }
23 | case "DELETE_TASK":
24 | return {
25 | ...state,
26 | tasks: state.tasks.filter((task) => task.id !== action.payload),
27 | };
28 | case "TOGGLE_TASK_DONE":
29 | const updatedTasks = state.tasks.map((task) => {
30 | if (task.id === action.payload) {
31 | return { ...task, done: !task.done };
32 | }
33 | return task;
34 | });
35 | return {
36 | ...state,
37 | tasks: updatedTasks,
38 | };
39 | default:
40 | return state;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/components/Heading.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Link } from "react-router-dom";
3 |
4 | export const Heading = () => {
5 | return (
6 |
7 |
8 |
9 |
Employee Listing
10 |
11 |
12 |
13 |
32 |
33 |
34 |
35 |
36 | );
37 | };
38 |
39 | export default Heading;
40 |
--------------------------------------------------------------------------------
/dist/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/context/GlobalState.jsx:
--------------------------------------------------------------------------------
1 | import { createContext, useReducer } from "react";
2 | import { v4 } from "uuid";
3 |
4 | import appReducer from "./AppReducer";
5 |
6 | const initialState = {
7 | tasks: [
8 | {
9 | id: "1",
10 | title: "some title",
11 | description: "some description",
12 | done: false,
13 | },
14 | {
15 | id: "2",
16 | title: "some title",
17 | description: "some description",
18 | done: false,
19 | },
20 | ],
21 | };
22 |
23 | export const GlobalContext = createContext(initialState);
24 |
25 | export const GlobalProvider = ({ children }) => {
26 | const [state, dispatch] = useReducer(appReducer, initialState);
27 |
28 | function addTask(task) {
29 | dispatch({
30 | type: "ADD_TASK",
31 | payload: { ...task, id: v4(), done: false },
32 | });
33 | }
34 |
35 | function updateTask(updatedTask) {
36 | dispatch({
37 | type: "UPDATE_TASK",
38 | payload: updatedTask,
39 | });
40 | }
41 |
42 | function deleteTask(id) {
43 | dispatch({
44 | type: "DELETE_TASK",
45 | payload: id,
46 | });
47 | }
48 |
49 | function toggleTaskDone(id) {
50 | dispatch({
51 | type: "TOGGLE_TASK_DONE",
52 | payload: id,
53 | });
54 | }
55 |
56 | return (
57 |
66 | {children}
67 |
68 | );
69 | };
70 |
--------------------------------------------------------------------------------
/src/components/TaskList.jsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from "react";
2 | import { GlobalContext } from "../context/GlobalState";
3 | import { Link } from "react-router-dom";
4 |
5 | const TaskList = () => {
6 | const { tasks, deleteTask, toggleTaskDone } = useContext(GlobalContext);
7 |
8 | return (
9 |
10 | {tasks.length > 0 ? (
11 |
12 | {tasks.map((task) => (
13 |
17 |
18 |
{task.title}
19 |
{task.id}
20 |
{task.description}
21 |
27 |
28 |
29 |
33 | Edit
34 |
35 |
36 |
42 |
43 |
44 | ))}
45 |
46 | ) : (
47 |
No Tasks yet
48 | )}
49 |
50 | );
51 | };
52 |
53 | export default TaskList;
54 |
--------------------------------------------------------------------------------
/src/components/TaskForm.jsx:
--------------------------------------------------------------------------------
1 | import { useContext, useState, useEffect } from "react";
2 | import { useNavigate, useParams } from "react-router-dom";
3 | import { GlobalContext } from "../context/GlobalState";
4 |
5 | const TaskForm = () => {
6 | const [task, setTask] = useState({
7 | id: "",
8 | title: "",
9 | description: "",
10 | });
11 | const { addTask, updateTask, tasks } = useContext(GlobalContext);
12 |
13 | const navigate = useNavigate();
14 | const params = useParams();
15 |
16 | const handleChange = (e) =>
17 | setTask({ ...task, [e.target.name]: e.target.value });
18 |
19 | const handleSubmit = (e) => {
20 | e.preventDefault();
21 | if (!task.id) {
22 | addTask(task);
23 | } else {
24 | updateTask(task);
25 | }
26 | navigate("/");
27 | };
28 |
29 | useEffect(() => {
30 | const taskFound = tasks.find((task) => task.id === params.id);
31 | if (taskFound) {
32 | setTask({
33 | id: taskFound.id,
34 | title: taskFound.title,
35 | description: taskFound.description,
36 | });
37 | }
38 | }, [params.id, tasks]);
39 |
40 | return (
41 |
72 | );
73 | };
74 |
75 | export default TaskForm;
76 |
--------------------------------------------------------------------------------
/dist/assets/index-0bb75f0b.css:
--------------------------------------------------------------------------------
1 | *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-10{margin-bottom:2.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-7{margin-bottom:1.75rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.inline-flex{display:inline-flex}.h-3\/4{height:75%}.h-full{height:100%}.h-screen{height:100vh}.w-6\/12{width:50%}.w-full{width:100%}.flex-grow{flex-grow:1}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded{border-radius:.25rem}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(147 51 234 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.p-10{padding:2.5rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-20{padding-left:5rem;padding-right:5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body{background:#202124}.hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\:bg-green-500:hover{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.hover\:bg-purple-500:hover{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.focus\:text-gray-100:focus{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}
2 |
--------------------------------------------------------------------------------
/dist/assets/index-ad7795e9.js:
--------------------------------------------------------------------------------
1 | function Xc(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vr={},Jc={get exports(){return Vr},set exports(e){Vr=e}},ml={},k={},qc={get exports(){return k},set exports(e){k=e}},O={};/**
2 | * @license React
3 | * react.production.min.js
4 | *
5 | * Copyright (c) Facebook, Inc. and its affiliates.
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE file in the root directory of this source tree.
9 | */var nr=Symbol.for("react.element"),bc=Symbol.for("react.portal"),ef=Symbol.for("react.fragment"),tf=Symbol.for("react.strict_mode"),nf=Symbol.for("react.profiler"),rf=Symbol.for("react.provider"),lf=Symbol.for("react.context"),of=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),sf=Symbol.for("react.memo"),af=Symbol.for("react.lazy"),cu=Symbol.iterator;function cf(e){return e===null||typeof e!="object"?null:(e=cu&&e[cu]||e["@@iterator"],typeof e=="function"?e:null)}var Ls={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zs=Object.assign,Rs={};function fn(e,t,n){this.props=e,this.context=t,this.refs=Rs,this.updater=n||Ls}fn.prototype.isReactComponent={};fn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Os(){}Os.prototype=fn.prototype;function di(e,t,n){this.props=e,this.context=t,this.refs=Rs,this.updater=n||Ls}var pi=di.prototype=new Os;pi.constructor=di;zs(pi,fn.prototype);pi.isPureReactComponent=!0;var fu=Array.isArray,Ds=Object.prototype.hasOwnProperty,hi={current:null},Is={key:!0,ref:!0,__self:!0,__source:!0};function Ms(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Ds.call(t,r)&&!Is.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,J=C[Q];if(0>>1;Ql(Ml,z))Etl(cr,Ml)?(C[Q]=cr,C[Et]=z,Q=Et):(C[Q]=Ml,C[kt]=z,Q=kt);else if(Etl(cr,z))C[Q]=cr,C[Et]=z,Q=Et;else break e}}return L}function l(C,L){var z=C.sortIndex-L.sortIndex;return z!==0?z:C.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],a=[],p=1,m=null,h=3,w=!1,S=!1,y=!1,T=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=C)r(a),L.sortIndex=L.expirationTime,t(s,L);else break;L=n(a)}}function v(C){if(y=!1,d(C),!S)if(n(s)!==null)S=!0,Dl(x);else{var L=n(a);L!==null&&Il(v,L.startTime-C)}}function x(C,L){S=!1,y&&(y=!1,f(N),N=-1),w=!0;var z=h;try{for(d(L),m=n(s);m!==null&&(!(m.expirationTime>L)||C&&!Le());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,h=m.priorityLevel;var J=Q(m.expirationTime<=L);L=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(s)&&r(s),d(L)}else r(s);m=n(s)}if(m!==null)var ar=!0;else{var kt=n(a);kt!==null&&Il(v,kt.startTime-L),ar=!1}return ar}finally{m=null,h=z,w=!1}}var _=!1,P=null,N=-1,H=5,D=-1;function Le(){return!(e.unstable_now()-DC||125Q?(C.sortIndex=z,t(a,C),n(s)===null&&C===n(a)&&(y?(f(N),N=-1):y=!0,Il(v,z-Q))):(C.sortIndex=J,t(s,C),S||w||(S=!0,Dl(x))),C},e.unstable_shouldYield=Le,e.unstable_wrapCallback=function(C){var L=h;return function(){var z=h;h=L;try{return C.apply(this,arguments)}finally{h=z}}}})(Fs);(function(e){e.exports=Fs})(Ef);/**
26 | * @license React
27 | * react-dom.production.min.js
28 | *
29 | * Copyright (c) Facebook, Inc. and its affiliates.
30 | *
31 | * This source code is licensed under the MIT license found in the
32 | * LICENSE file in the root directory of this source tree.
33 | */var $s=k,Se=ho;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mo=Object.prototype.hasOwnProperty,xf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pu={},hu={};function Cf(e){return mo.call(hu,e)?!0:mo.call(pu,e)?!1:xf.test(e)?hu[e]=!0:(pu[e]=!0,!1)}function _f(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pf(e,t,n,r){if(t===null||typeof t>"u"||_f(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){re[e]=new fe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];re[t]=new fe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){re[e]=new fe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){re[e]=new fe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){re[e]=new fe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){re[e]=new fe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){re[e]=new fe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){re[e]=new fe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){re[e]=new fe(e,5,!1,e.toLowerCase(),null,!1,!1)});var vi=/[\-:]([a-z])/g;function yi(e){return e[1].toUpperCase()}"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(vi,yi);re[t]=new fe(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(vi,yi);re[t]=new fe(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(vi,yi);re[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){re[e]=new fe(e,1,!1,e.toLowerCase(),null,!1,!1)});re.xlinkHref=new fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){re[e]=new fe(e,1,!1,e.toLowerCase(),null,!0,!0)});function gi(e,t,n,r){var l=re.hasOwnProperty(t)?re[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=`
37 | `+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Fl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_n(e):""}function Nf(e){switch(e.tag){case 5:return _n(e.type);case 16:return _n("Lazy");case 13:return _n("Suspense");case 19:return _n("SuspenseList");case 0:case 2:case 15:return e=$l(e.type,!1),e;case 11:return e=$l(e.type.render,!1),e;case 1:return e=$l(e.type,!0),e;default:return""}}function wo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bt:return"Fragment";case $t:return"Portal";case vo:return"Profiler";case wi:return"StrictMode";case yo:return"Suspense";case go:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vs:return(e.displayName||"Context")+".Consumer";case As:return(e._context.displayName||"Context")+".Provider";case Si:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ki:return t=e.displayName||null,t!==null?t:wo(e.type)||"Memo";case et:t=e._payload,e=e._init;try{return wo(e(t))}catch{}}return null}function Tf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wo(t);case 8:return t===wi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lf(e){var t=Hs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pr(e){e._valueTracker||(e._valueTracker=Lf(e))}function Qs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function So(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ks(e,t){t=t.checked,t!=null&&gi(e,"checked",t,!1)}function ko(e,t){Ks(e,t);var n=vt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Eo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Eo(e,t.type,vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Eo(e,t,n){(t!=="number"||Wr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pn=Array.isArray;function Jt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=hr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ln={animationIterationCount:!0,aspectRatio:!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},zf=["Webkit","ms","Moz","O"];Object.keys(Ln).forEach(function(e){zf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ln[t]=Ln[e]})});function Zs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ln.hasOwnProperty(e)&&Ln[e]?(""+t).trim():t+"px"}function Js(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Zs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Rf=V({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 _o(e,t){if(t){if(Rf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(g(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(g(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(g(61))}if(t.style!=null&&typeof t.style!="object")throw Error(g(62))}}function Po(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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}}var No=null;function Ei(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var To=null,qt=null,bt=null;function Su(e){if(e=or(e)){if(typeof To!="function")throw Error(g(280));var t=e.stateNode;t&&(t=Sl(t),To(e.stateNode,e.type,t))}}function qs(e){qt?bt?bt.push(e):bt=[e]:qt=e}function bs(){if(qt){var e=qt,t=bt;if(bt=qt=null,Su(e),t)for(e=0;e>>=0,e===0?32:31-(Vf(e)/Wf|0)|0}var mr=64,vr=4194304;function Nn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Yr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Nn(u):(o&=i,o!==0&&(r=Nn(o)))}else i=n&~l,i!==0?r=Nn(i):o!==0&&(r=Nn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Me(t),e[t]=n}function Yf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Rn),Lu=String.fromCharCode(32),zu=!1;function wa(e,t){switch(e){case"keyup":return kd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var At=!1;function xd(e,t){switch(e){case"compositionend":return Sa(t);case"keypress":return t.which!==32?null:(zu=!0,Lu);case"textInput":return e=t.data,e===Lu&&zu?null:e;default:return null}}function Cd(e,t){if(At)return e==="compositionend"||!zi&&wa(e,t)?(e=ya(),Or=Ni=lt=null,At=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Iu(n)}}function Ca(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ca(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _a(){for(var e=window,t=Wr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Dd(e){var t=_a(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ca(n.ownerDocument.documentElement,n)){if(r!==null&&Ri(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Mu(n,o);var i=Mu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vt=null,Io=null,Dn=null,Mo=!1;function Uu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mo||Vt==null||Vt!==Wr(r)||(r=Vt,"selectionStart"in r&&Ri(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Dn&&Qn(Dn,r)||(Dn=r,r=Zr(Io,"onSelect"),0Qt||(e.current=Ao[Qt],Ao[Qt]=null,Qt--)}function U(e,t){Qt++,Ao[Qt]=e.current,e.current=t}var yt={},ue=wt(yt),he=wt(!1),zt=yt;function ln(e,t){var n=e.type.contextTypes;if(!n)return yt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function me(e){return e=e.childContextTypes,e!=null}function qr(){F(he),F(ue)}function Wu(e,t,n){if(ue.current!==yt)throw Error(g(168));U(ue,t),U(he,n)}function Ia(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(g(108,Tf(e)||"Unknown",l));return V({},n,r)}function br(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yt,zt=ue.current,U(ue,e),U(he,he.current),!0}function Hu(e,t,n){var r=e.stateNode;if(!r)throw Error(g(169));n?(e=Ia(e,t,zt),r.__reactInternalMemoizedMergedChildContext=e,F(he),F(ue),U(ue,e)):F(he),U(he,n)}var He=null,kl=!1,bl=!1;function Ma(e){He===null?He=[e]:He.push(e)}function Qd(e){kl=!0,Ma(e)}function St(){if(!bl&&He!==null){bl=!0;var e=0,t=M;try{var n=He;for(M=1;e>=i,l-=i,Qe=1<<32-Me(t)+l|n<N?(H=P,P=null):H=P.sibling;var D=h(f,P,d[N],v);if(D===null){P===null&&(P=H);break}e&&P&&D.alternate===null&&t(f,P),c=o(D,c,N),_===null?x=D:_.sibling=D,_=D,P=H}if(N===d.length)return n(f,P),$&&xt(f,N),x;if(P===null){for(;NN?(H=P,P=null):H=P.sibling;var Le=h(f,P,D.value,v);if(Le===null){P===null&&(P=H);break}e&&P&&Le.alternate===null&&t(f,P),c=o(Le,c,N),_===null?x=Le:_.sibling=Le,_=Le,P=H}if(D.done)return n(f,P),$&&xt(f,N),x;if(P===null){for(;!D.done;N++,D=d.next())D=m(f,D.value,v),D!==null&&(c=o(D,c,N),_===null?x=D:_.sibling=D,_=D);return $&&xt(f,N),x}for(P=r(f,P);!D.done;N++,D=d.next())D=w(P,f,N,D.value,v),D!==null&&(e&&D.alternate!==null&&P.delete(D.key===null?N:D.key),c=o(D,c,N),_===null?x=D:_.sibling=D,_=D);return e&&P.forEach(function(mn){return t(f,mn)}),$&&xt(f,N),x}function T(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===Bt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case dr:e:{for(var x=d.key,_=c;_!==null;){if(_.key===x){if(x=d.type,x===Bt){if(_.tag===7){n(f,_.sibling),c=l(_,d.props.children),c.return=f,f=c;break e}}else if(_.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===et&&Ju(x)===_.type){n(f,_.sibling),c=l(_,d.props),c.ref=En(f,_,d),c.return=f,f=c;break e}n(f,_);break}else t(f,_);_=_.sibling}d.type===Bt?(c=Lt(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=Br(d.type,d.key,d.props,null,f.mode,v),v.ref=En(f,c,d),v.return=f,f=v)}return i(f);case $t:e:{for(_=d.key;c!==null;){if(c.key===_)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=l(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=uo(d,f.mode,v),c.return=f,f=c}return i(f);case et:return _=d._init,T(f,c,_(d._payload),v)}if(Pn(d))return S(f,c,d,v);if(yn(d))return y(f,c,d,v);xr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,d),c.return=f,f=c):(n(f,c),c=io(d,f.mode,v),c.return=f,f=c),i(f)):n(f,c)}return T}var un=Wa(!0),Ha=Wa(!1),ir={},Ve=wt(ir),Xn=wt(ir),Zn=wt(ir);function Nt(e){if(e===ir)throw Error(g(174));return e}function Bi(e,t){switch(U(Zn,t),U(Xn,e),U(Ve,ir),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Co(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Co(t,e)}F(Ve),U(Ve,t)}function sn(){F(Ve),F(Xn),F(Zn)}function Qa(e){Nt(Zn.current);var t=Nt(Ve.current),n=Co(t,e.type);t!==n&&(U(Xn,e),U(Ve,n))}function Ai(e){Xn.current===e&&(F(Ve),F(Xn))}var B=wt(0);function ol(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=[];function Vi(){for(var e=0;en?n:4,e(!0);var r=to.transition;to.transition={};try{e(!1),t()}finally{M=n,to.transition=r}}function uc(){return Te().memoizedState}function Xd(e,t,n){var r=pt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sc(e))ac(t,n);else if(n=$a(e,t,n,r),n!==null){var l=ae();Ue(n,e,r,l),cc(n,t,r)}}function Zd(e,t,n){var r=pt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sc(e))ac(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,je(u,i)){var s=t.interleaved;s===null?(l.next=l,Fi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=$a(e,t,l,r),n!==null&&(l=ae(),Ue(n,e,r,l),cc(n,t,r))}}function sc(e){var t=e.alternate;return e===A||t!==null&&t===A}function ac(e,t){In=il=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ci(e,n)}}var ul={readContext:Ne,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useInsertionEffect:le,useLayoutEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useMutableSource:le,useSyncExternalStore:le,useId:le,unstable_isNewReconciler:!1},Jd={readContext:Ne,useCallback:function(e,t){return $e().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:bu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ur(4194308,4,nc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ur(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ur(4,2,e,t)},useMemo:function(e,t){var n=$e();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$e();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xd.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var t=$e();return e={current:e},t.memoizedState=e},useState:qu,useDebugValue:Yi,useDeferredValue:function(e){return $e().memoizedState=e},useTransition:function(){var e=qu(!1),t=e[0];return e=Gd.bind(null,e[1]),$e().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=A,l=$e();if($){if(n===void 0)throw Error(g(407));n=n()}else{if(n=t(),b===null)throw Error(g(349));Ot&30||Ga(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,bu(Za.bind(null,r,o,e),[e]),r.flags|=2048,bn(9,Xa.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$e(),t=b.identifierPrefix;if($){var n=Ke,r=Qe;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Be]=t,e[Gn]=r,wc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Po(n,r),n){case"dialog":j("cancel",e),j("close",e),l=r;break;case"iframe":case"object":case"embed":j("load",e),l=r;break;case"video":case"audio":for(l=0;lcn&&(t.flags|=128,r=!0,xn(o,!1),t.lanes=4194304)}else{if(!r)if(e=ol(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!$)return oe(t),null}else 2*K()-o.renderingStartTime>cn&&n!==1073741824&&(t.flags|=128,r=!0,xn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=K(),t.sibling=null,n=B.current,U(B,r?n&1|2:n&1),t):(oe(t),null);case 22:case 23:return bi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ye&1073741824&&(oe(t),t.subtreeFlags&6&&(t.flags|=8192)):oe(t),null;case 24:return null;case 25:return null}throw Error(g(156,t.tag))}function op(e,t){switch(Di(t),t.tag){case 1:return me(t.type)&&qr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sn(),F(he),F(ue),Vi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ai(t),null;case 13:if(F(B),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(g(340));on()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(B),null;case 4:return sn(),null;case 10:return ji(t.type._context),null;case 22:case 23:return bi(),null;case 24:return null;default:return null}}var _r=!1,ie=!1,ip=typeof WeakSet=="function"?WeakSet:Set,E=null;function Xt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){W(e,t,r)}else n.current=null}function bo(e,t,n){try{n()}catch(r){W(e,t,r)}}var ss=!1;function up(e,t){if(Uo=Gr,e=_a(),Ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,a=0,p=0,m=e,h=null;t:for(;;){for(var w;m!==n||l!==0&&m.nodeType!==3||(u=i+l),m!==o||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(w=m.firstChild)!==null;)h=m,m=w;for(;;){if(m===e)break t;if(h===n&&++a===l&&(u=i),h===o&&++p===r&&(s=i),(w=m.nextSibling)!==null)break;m=h,h=m.parentNode}m=w}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(jo={focusedElem:e,selectionRange:n},Gr=!1,E=t;E!==null;)if(t=E,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,E=e;else for(;E!==null;){t=E;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var y=S.memoizedProps,T=S.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?y:Re(t.type,y),T);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(v){W(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,E=e;break}E=t.return}return S=ss,ss=!1,S}function Mn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&bo(t,n,o)}l=l.next}while(l!==r)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ei(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ec(e){var t=e.alternate;t!==null&&(e.alternate=null,Ec(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Be],delete t[Gn],delete t[Bo],delete t[Wd],delete t[Hd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xc(e){return e.tag===5||e.tag===3||e.tag===4}function as(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ti(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jr));else if(r!==4&&(e=e.child,e!==null))for(ti(e,t,n),e=e.sibling;e!==null;)ti(e,t,n),e=e.sibling}function ni(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ni(e,t,n),e=e.sibling;e!==null;)ni(e,t,n),e=e.sibling}var te=null,Oe=!1;function be(e,t,n){for(n=n.child;n!==null;)Cc(e,t,n),n=n.sibling}function Cc(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(vl,n)}catch{}switch(n.tag){case 5:ie||Xt(n,t);case 6:var r=te,l=Oe;te=null,be(e,t,n),te=r,Oe=l,te!==null&&(Oe?(e=te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):te.removeChild(n.stateNode));break;case 18:te!==null&&(Oe?(e=te,n=n.stateNode,e.nodeType===8?ql(e.parentNode,n):e.nodeType===1&&ql(e,n),Wn(e)):ql(te,n.stateNode));break;case 4:r=te,l=Oe,te=n.stateNode.containerInfo,Oe=!0,be(e,t,n),te=r,Oe=l;break;case 0:case 11:case 14:case 15:if(!ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&bo(n,t,i),l=l.next}while(l!==r)}be(e,t,n);break;case 1:if(!ie&&(Xt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){W(n,t,u)}be(e,t,n);break;case 21:be(e,t,n);break;case 22:n.mode&1?(ie=(r=ie)||n.memoizedState!==null,be(e,t,n),ie=r):be(e,t,n);break;default:be(e,t,n)}}function cs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ip),t.forEach(function(r){var l=vp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ap(r/1960))-r,10e?16:e,ot===null)var r=!1;else{if(e=ot,ot=null,cl=0,I&6)throw Error(g(331));var l=I;for(I|=4,E=e.current;E!==null;){var o=E,i=o.child;if(E.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sK()-Ji?Tt(e,0):Zi|=n),ve(e,t)}function Oc(e,t){t===0&&(e.mode&1?(t=vr,vr<<=1,!(vr&130023424)&&(vr=4194304)):t=1);var n=ae();e=Ze(e,t),e!==null&&(rr(e,t,n),ve(e,n))}function mp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Oc(e,n)}function vp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(t),Oc(e,n)}var Dc;Dc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||he.current)pe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pe=!1,rp(e,t,n);pe=!!(e.flags&131072)}else pe=!1,$&&t.flags&1048576&&Ua(t,tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;jr(e,t),e=t.pendingProps;var l=ln(t,ue.current);tn(t,n),l=Hi(null,t,r,e,l,n);var o=Qi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,me(r)?(o=!0,br(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,$i(t),l.updater=El,t.stateNode=l,l._reactInternals=t,Ko(t,r,e,n),t=Xo(null,t,r,!0,o,n)):(t.tag=0,$&&o&&Oi(t),se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(jr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=gp(r),e=Re(r,e),l){case 0:t=Go(null,t,r,e,n);break e;case 1:t=os(null,t,r,e,n);break e;case 11:t=rs(null,t,r,e,n);break e;case 14:t=ls(null,t,r,Re(r.type,e),n);break e}throw Error(g(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Go(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),os(e,t,r,l,n);case 3:e:{if(vc(t),e===null)throw Error(g(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ba(e,t),ll(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=an(Error(g(423)),t),t=is(e,t,r,n,l);break e}else if(r!==l){l=an(Error(g(424)),t),t=is(e,t,r,n,l);break e}else for(ge=ct(t.stateNode.containerInfo.firstChild),we=t,$=!0,De=null,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(on(),r===l){t=Je(e,t,n);break e}se(e,t,r,n)}t=t.child}return t;case 5:return Qa(t),e===null&&Wo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Fo(r,l)?i=null:o!==null&&Fo(r,o)&&(t.flags|=32),mc(e,t),se(e,t,i,n),t.child;case 6:return e===null&&Wo(t),null;case 13:return yc(e,t,n);case 4:return Bi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=un(t,null,r,n):se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),rs(e,t,r,l,n);case 7:return se(e,t,t.pendingProps,n),t.child;case 8:return se(e,t,t.pendingProps.children,n),t.child;case 12:return se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,U(nl,r._currentValue),r._currentValue=i,o!==null)if(je(o.value,i)){if(o.children===l.children&&!he.current){t=Je(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Ye(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var p=a.pending;p===null?s.next=s:(s.next=p.next,p.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Ho(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(g(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ho(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,tn(t,n),l=Ne(l),r=r(l),t.flags|=1,se(e,t,r,n),t.child;case 14:return r=t.type,l=Re(r,t.pendingProps),l=Re(r.type,l),ls(e,t,r,l,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),jr(e,t),t.tag=1,me(r)?(e=!0,br(t)):e=!1,tn(t,n),Va(t,r,l),Ko(t,r,l,n),Xo(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 22:return hc(e,t,n)}throw Error(g(156,t.tag))};function Ic(e,t){return ia(e,t)}function yp(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _e(e,t,n,r){return new yp(e,t,n,r)}function tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gp(e){if(typeof e=="function")return tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Si)return 11;if(e===ki)return 14}return 2}function ht(e,t){var n=e.alternate;return n===null?(n=_e(e.tag,t,e.key,e.mode),n.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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Br(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")tu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Bt:return Lt(n.children,l,o,t);case wi:i=8,l|=8;break;case vo:return e=_e(12,n,t,l|2),e.elementType=vo,e.lanes=o,e;case yo:return e=_e(13,n,t,l),e.elementType=yo,e.lanes=o,e;case go:return e=_e(19,n,t,l),e.elementType=go,e.lanes=o,e;case Ws:return Pl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case As:i=10;break e;case Vs:i=9;break e;case Si:i=11;break e;case ki:i=14;break e;case et:i=16,r=null;break e}throw Error(g(130,e==null?e:typeof e,""))}return t=_e(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Lt(e,t,n,r){return e=_e(7,e,r,t),e.lanes=n,e}function Pl(e,t,n,r){return e=_e(22,e,r,t),e.elementType=Ws,e.lanes=n,e.stateNode={isHidden:!1},e}function io(e,t,n){return e=_e(6,e,null,t),e.lanes=n,e}function uo(e,t,n){return t=_e(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Al(0),this.expirationTimes=Al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,l,o,i,u,s){return e=new wp(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=_e(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(o),e}function Sp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ke})(kf);var gs=po;fo.createRoot=gs.createRoot,fo.hydrateRoot=gs.hydrateRoot;/**
41 | * @remix-run/router v1.5.0
42 | *
43 | * Copyright (c) Remix Software Inc.
44 | *
45 | * This source code is licensed under the MIT license found in the
46 | * LICENSE.md file in the root directory of this source tree.
47 | *
48 | * @license MIT
49 | */function tr(){return tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function iu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Pp(){return Math.random().toString(36).substr(2,8)}function Ss(e,t){return{usr:e.state,key:e.key,idx:t}}function ui(e,t,n,r){return n===void 0&&(n=null),tr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hn(t):t,{state:n,key:t&&t.key||r||Pp()})}function pl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function hn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Np(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,u=it.Pop,s=null,a=p();a==null&&(a=0,i.replaceState(tr({},i.state,{idx:a}),""));function p(){return(i.state||{idx:null}).idx}function m(){u=it.Pop;let T=p(),f=T==null?null:T-a;a=T,s&&s({action:u,location:y.location,delta:f})}function h(T,f){u=it.Push;let c=ui(y.location,T,f);n&&n(c,T),a=p()+1;let d=Ss(c,a),v=y.createHref(c);try{i.pushState(d,"",v)}catch{l.location.assign(v)}o&&s&&s({action:u,location:y.location,delta:1})}function w(T,f){u=it.Replace;let c=ui(y.location,T,f);n&&n(c,T),a=p();let d=Ss(c,a),v=y.createHref(c);i.replaceState(d,"",v),o&&s&&s({action:u,location:y.location,delta:0})}function S(T){let f=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof T=="string"?T:pl(T);return Z(f,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,f)}let y={get action(){return u},get location(){return e(l,i)},listen(T){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(ws,m),s=T,()=>{l.removeEventListener(ws,m),s=null}},createHref(T){return t(l,T)},createURL:S,encodeLocation(T){let f=S(T);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:h,replace:w,go(T){return i.go(T)}};return y}var ks;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ks||(ks={}));function Tp(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?hn(t):t,l=uu(r.pathname||"/",n);if(l==null)return null;let o=Fc(e);Lp(o);let i=null;for(let u=0;i==null&&u{let s={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(Z(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let a=mt([r,s.relativePath]),p=n.concat(s);o.children&&o.children.length>0&&(Z(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),Fc(o.children,t,p,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:Up(a,o.index),routesMeta:p})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))l(o,i);else for(let s of $c(o.path))l(o,i,s)}),t}function $c(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=$c(r.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),l&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Lp(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jp(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const zp=/^:\w+$/,Rp=3,Op=2,Dp=1,Ip=10,Mp=-2,Es=e=>e==="*";function Up(e,t){let n=e.split("/"),r=n.length;return n.some(Es)&&(r+=Mp),t&&(r+=Op),n.filter(l=>!Es(l)).reduce((l,o)=>l+(zp.test(o)?Rp:o===""?Dp:Ip),r)}function jp(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Fp(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{if(p==="*"){let h=u[m]||"";i=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}return a[p]=Vp(u[m]||"",p),a},{}),pathname:o,pathnameBase:i,pattern:e}}function Bp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),iu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,u)=>(r.push(u),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Ap(e){try{return decodeURI(e)}catch(t){return iu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Vp(e,t){try{return decodeURIComponent(e)}catch(n){return iu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function uu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Wp(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?hn(e):e;return{pathname:n?n.startsWith("/")?n:Hp(n,t):t,search:Kp(r),hash:Yp(l)}}function Hp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function so(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Bc(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ac(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=hn(e):(l=tr({},e),Z(!l.pathname||!l.pathname.includes("?"),so("?","pathname","search",l)),Z(!l.pathname||!l.pathname.includes("#"),so("#","pathname","hash",l)),Z(!l.search||!l.search.includes("#"),so("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,u;if(r||i==null)u=n;else{let m=t.length-1;if(i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),m-=1;l.pathname=h.join("/")}u=m>=0?t[m]:"/"}let s=Wp(l,u),a=i&&i!=="/"&&i.endsWith("/"),p=(o||i===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(a||p)&&(s.pathname+="/"),s}const mt=e=>e.join("/").replace(/\/\/+/g,"/"),Qp=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kp=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yp=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Gp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}/**
50 | * React Router v6.10.0
51 | *
52 | * Copyright (c) Remix Software Inc.
53 | *
54 | * This source code is licensed under the MIT license found in the
55 | * LICENSE.md file in the root directory of this source tree.
56 | *
57 | * @license MIT
58 | */function Xp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Zp=typeof Object.is=="function"?Object.is:Xp,{useState:Jp,useEffect:qp,useLayoutEffect:bp,useDebugValue:eh}=co;function th(e,t,n){const r=t(),[{inst:l},o]=Jp({inst:{value:r,getSnapshot:t}});return bp(()=>{l.value=r,l.getSnapshot=t,ao(l)&&o({inst:l})},[e,r,t]),qp(()=>(ao(l)&&o({inst:l}),e(()=>{ao(l)&&o({inst:l})})),[e]),eh(r),r}function ao(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!Zp(n,r)}catch{return!0}}function nh(e,t,n){return t()}const rh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lh=!rh,oh=lh?nh:th;"useSyncExternalStore"in co&&(e=>e.useSyncExternalStore)(co);const Vc=k.createContext(null),Wc=k.createContext(null),ur=k.createContext(null),Rl=k.createContext(null),jt=k.createContext({outlet:null,matches:[]}),Hc=k.createContext(null);function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.pathnameBase)),o=k.useRef(!1);return k.useEffect(()=>{o.current=!0}),k.useCallback(function(u,s){if(s===void 0&&(s={}),!o.current)return;if(typeof u=="number"){t.go(u);return}let a=Ac(u,JSON.parse(l),r,s.relative==="path");e!=="/"&&(a.pathname=a.pathname==="/"?e:mt([e,a.pathname])),(s.replace?t.replace:t.push)(a,s.state,s)},[e,t,l,r])}function uh(){let{matches:e}=k.useContext(jt),t=e[e.length-1];return t?t.params:{}}function Kc(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=k.useContext(jt),{pathname:l}=Ol(),o=JSON.stringify(Bc(r).map(i=>i.pathnameBase));return k.useMemo(()=>Ac(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function sh(e,t){sr()||Z(!1);let{navigator:n}=k.useContext(ur),r=k.useContext(Wc),{matches:l}=k.useContext(jt),o=l[l.length-1],i=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let s=Ol(),a;if(t){var p;let y=typeof t=="string"?hn(t):t;u==="/"||(p=y.pathname)!=null&&p.startsWith(u)||Z(!1),a=y}else a=s;let m=a.pathname||"/",h=u==="/"?m:m.slice(u.length)||"/",w=Tp(e,{pathname:h}),S=dh(w&&w.map(y=>Object.assign({},y,{params:Object.assign({},i,y.params),pathname:mt([u,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:mt([u,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),l,r||void 0);return t&&S?k.createElement(Rl.Provider,{value:{location:si({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:it.Pop}},S):S}function ah(){let e=vh(),t=Gp(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:l},n):null,o)}class ch extends k.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?k.createElement(jt.Provider,{value:this.props.routeContext},k.createElement(Hc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fh(e){let{routeContext:t,match:n,children:r}=e,l=k.useContext(Vc);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(jt.Provider,{value:t},r)}function dh(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,l=n==null?void 0:n.errors;if(l!=null){let o=r.findIndex(i=>i.route.id&&(l==null?void 0:l[i.route.id]));o>=0||Z(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,i,u)=>{let s=i.route.id?l==null?void 0:l[i.route.id]:null,a=null;n&&(i.route.ErrorBoundary?a=k.createElement(i.route.ErrorBoundary,null):i.route.errorElement?a=i.route.errorElement:a=k.createElement(ah,null));let p=t.concat(r.slice(0,u+1)),m=()=>{let h=o;return s?h=a:i.route.Component?h=k.createElement(i.route.Component,null):i.route.element&&(h=i.route.element),k.createElement(fh,{match:i,routeContext:{outlet:o,matches:p},children:h})};return n&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?k.createElement(ch,{location:n.location,component:a,error:s,children:m(),routeContext:{outlet:null,matches:p}}):m()},null)}var xs;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(xs||(xs={}));var hl;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(hl||(hl={}));function ph(e){let t=k.useContext(Wc);return t||Z(!1),t}function hh(e){let t=k.useContext(jt);return t||Z(!1),t}function mh(e){let t=hh(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function vh(){var e;let t=k.useContext(Hc),n=ph(hl.UseRouteError),r=mh(hl.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function Ar(e){Z(!1)}function yh(e){let{basename:t="/",children:n=null,location:r,navigationType:l=it.Pop,navigator:o,static:i=!1}=e;sr()&&Z(!1);let u=t.replace(/^\/*/,"/"),s=k.useMemo(()=>({basename:u,navigator:o,static:i}),[u,o,i]);typeof r=="string"&&(r=hn(r));let{pathname:a="/",search:p="",hash:m="",state:h=null,key:w="default"}=r,S=k.useMemo(()=>{let y=uu(a,u);return y==null?null:{location:{pathname:y,search:p,hash:m,state:h,key:w},navigationType:l}},[u,a,p,m,h,w,l]);return S==null?null:k.createElement(ur.Provider,{value:s},k.createElement(Rl.Provider,{children:n,value:S}))}function gh(e){let{children:t,location:n}=e,r=k.useContext(Vc),l=r&&!t?r.router.routes:ai(t);return sh(l,n)}var Cs;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Cs||(Cs={}));new Promise(()=>{});function ai(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,l)=>{if(!k.isValidElement(r))return;let o=[...t,l];if(r.type===k.Fragment){n.push.apply(n,ai(r.props.children,o));return}r.type!==Ar&&Z(!1),!r.props.index||!r.props.children||Z(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=ai(r.props.children,o)),n.push(i)}),n}/**
59 | * React Router DOM v6.10.0
60 | *
61 | * Copyright (c) Remix Software Inc.
62 | *
63 | * This source code is licensed under the MIT license found in the
64 | * LICENSE.md file in the root directory of this source tree.
65 | *
66 | * @license MIT
67 | */function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Sh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kh(e,t){return e.button===0&&(!t||t==="_self")&&!Sh(e)}const Eh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function xh(e){let{basename:t,children:n,window:r}=e,l=k.useRef();l.current==null&&(l.current=_p({window:r,v5Compat:!0}));let o=l.current,[i,u]=k.useState({action:o.action,location:o.location});return k.useLayoutEffect(()=>o.listen(u),[o]),k.createElement(yh,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o})}const Ch=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_h=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fi=k.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:u,target:s,to:a,preventScrollReset:p}=t,m=wh(t,Eh),{basename:h}=k.useContext(ur),w,S=!1;if(typeof a=="string"&&_h.test(a)&&(w=a,Ch)){let c=new URL(window.location.href),d=a.startsWith("//")?new URL(c.protocol+a):new URL(a),v=uu(d.pathname,h);d.origin===c.origin&&v!=null?a=v+d.search+d.hash:S=!0}let y=ih(a,{relative:l}),T=Ph(a,{replace:i,state:u,target:s,preventScrollReset:p,relative:l});function f(c){r&&r(c),c.defaultPrevented||T(c)}return k.createElement("a",ci({},m,{href:w||y,onClick:S||o?r:f,ref:n,target:s}))});var _s;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(_s||(_s={}));var Ps;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ps||(Ps={}));function Ph(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i}=t===void 0?{}:t,u=Qc(),s=Ol(),a=Kc(e,{relative:i});return k.useCallback(p=>{if(kh(p,n)){p.preventDefault();let m=r!==void 0?r:pl(s)===pl(a);u(e,{replace:m,state:l,preventScrollReset:o,relative:i})}},[s,u,a,r,l,n,e,o,i])}let Tr;const Nh=new Uint8Array(16);function Th(){if(!Tr&&(Tr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Tr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tr(Nh)}const ee=[];for(let e=0;e<256;++e)ee.push((e+256).toString(16).slice(1));function Lh(e,t=0){return(ee[e[t+0]]+ee[e[t+1]]+ee[e[t+2]]+ee[e[t+3]]+"-"+ee[e[t+4]]+ee[e[t+5]]+"-"+ee[e[t+6]]+ee[e[t+7]]+"-"+ee[e[t+8]]+ee[e[t+9]]+"-"+ee[e[t+10]]+ee[e[t+11]]+ee[e[t+12]]+ee[e[t+13]]+ee[e[t+14]]+ee[e[t+15]]).toLowerCase()}const zh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ns={randomUUID:zh};function Rh(e,t,n){if(Ns.randomUUID&&!t&&!e)return Ns.randomUUID();e=e||{};const r=e.random||(e.rng||Th)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let l=0;l<16;++l)t[n+l]=r[l];return t}return Lh(r)}function Oh(e,t){switch(t.type){case"ADD_TASK":return{...e,tasks:[...e.tasks,t.payload]};case"UPDATE_TASK":{const r=t.payload,l=e.tasks.map(o=>o.id===r.id?(r.done=o.done,r):o);return{...e,tasks:l}}case"DELETE_TASK":return{...e,tasks:e.tasks.filter(r=>r.id!==t.payload)};case"TOGGLE_TASK_DONE":const n=e.tasks.map(r=>r.id===t.payload?{...r,done:!r.done}:r);return{...e,tasks:n};default:return e}}const Yc={tasks:[{id:"1",title:"some title",description:"some description",done:!1},{id:"2",title:"some title",description:"some description",done:!1}]},su=k.createContext(Yc),Dh=({children:e})=>{const[t,n]=k.useReducer(Oh,Yc);function r(u){n({type:"ADD_TASK",payload:{...u,id:Rh(),done:!1}})}function l(u){n({type:"UPDATE_TASK",payload:u})}function o(u){n({type:"DELETE_TASK",payload:u})}function i(u){n({type:"TOGGLE_TASK_DONE",payload:u})}return R(su.Provider,{value:{tasks:t.tasks,addTask:r,updateTask:l,deleteTask:o,toggleTaskDone:i},children:e})},Ih=()=>{const{tasks:e,deleteTask:t,toggleTaskDone:n}=k.useContext(su);return R("div",{className:"flex justify-center",children:e.length>0?R("div",{className:"w-6/12",children:e.map(r=>Ie("div",{className:"bg-gray-900 px-20 py-5 text-white shadow-2xl mb-4 flex justify-between",children:[Ie("div",{className:"text-left",children:[R("h1",{className:"text-2xl uppercase",children:r.title}),R("h6",{className:"text-gray-500",children:r.id}),R("p",{children:r.description}),R("button",{className:"bg-purple-600 hover:bg-purple-500 py-1 px-3 mt-2 ",onClick:()=>n(r.id),children:r.done?"Undone":"Done"})]}),Ie("div",{children:[R(fi,{to:`/edit/${r.id}`,className:"bg-gray-600 hover:bg-gray-500 py-2 px-4 mr-2",children:"Edit"}),R("button",{className:"bg-red-600 hover:bg-red-500 py-2 px-4 mr-2",onClick:()=>t(r.id),children:"Delete"})]})]},r.id))}):R("p",{className:"bg-gray-600 text-gray-100 py-5 px-10",children:"No Tasks yet"})})},Ts=()=>{const[e,t]=k.useState({id:"",title:"",description:""}),{addTask:n,updateTask:r,tasks:l}=k.useContext(su),o=Qc(),i=uh(),u=a=>t({...e,[a.target.name]:a.target.value}),s=a=>{a.preventDefault(),e.id?r(e):n(e),o("/")};return k.useEffect(()=>{const a=l.find(p=>p.id===i.id);a&&t({id:a.id,title:a.title,description:a.description})},[i.id,l]),R("div",{className:"flex justify-center items-center h-3/4",children:Ie("form",{onSubmit:s,className:"bg-gray-900 p-10",children:[Ie("h2",{className:"text-3xl mb-7",children:[e.id?"Update ":"Create ","A Task"]}),R("div",{className:"mb-5",children:R("input",{type:"text",name:"title",value:e.title,onChange:u,placeholder:"Write a title",className:"py-3 px-4 focus:outline-none focus:text-gray-100 bg-gray-700 w-full",autoFocus:!0})}),Ie("div",{className:"mb-5",children:[R("textarea",{value:e.description,name:"description",rows:"2",placeholder:"write a description",onChange:u,className:"py-3 px-4 focus:outline-none focus:text-gray-100 bg-gray-700 w-full"}),R("button",{className:"bg-green-600 w-full hover:bg-green-500 py-2 px-4 mt-5",children:e.id?"Update Task":"Create Task"})]})]})})},Mh=()=>R("div",{children:Ie("div",{className:"flex items-center mb-10",children:[R(fi,{to:"/",children:R("h5",{className:"text-gray-100 font-bold text-2xl",children:"Employee Listing"})}),R("div",{className:"flex-grow text-right px-4 py-2 m-2",children:R(fi,{to:"/add",children:Ie("button",{className:"bg-green-400 hover:bg-green-500 text-white font-semibold py-2 px-4 rounded inline-flex items-center",children:[Ie("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-plus-circle",children:[R("circle",{cx:"12",cy:"12",r:"10"}),R("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),R("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),R("span",{className:"pl-2",children:"Add Employee"})]})})})]})});function Uh(){return R(Dh,{children:R("div",{className:"h-screen text-white text-center p-10",children:Ie("div",{className:"container mx-auto h-full",children:[R(Mh,{}),Ie(gh,{children:[R(Ar,{path:"/",element:R(Ih,{})}),R(Ar,{path:"/add",element:R(Ts,{})}),R(Ar,{path:"/edit/:id",element:R(Ts,{})})]})]})})})}fo.createRoot(document.getElementById("root")).render(R(Us.StrictMode,{children:R(xh,{children:R(Uh,{})})}));
68 |
--------------------------------------------------------------------------------