From fd30fd763752dadaaacc1bef4a95bc3e88fe7704 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 Sep 2023 08:12:43 +0800 Subject: [PATCH 01/11] Instagram-Bootcamp --- .gitignore | 1 + package-lock.json | 1609 +++++++++++++++++++++++---------------------- package.json | 3 +- src/App.css | 94 ++- src/App.js | 217 ++++-- src/firebase.js | 15 +- 6 files changed, 1078 insertions(+), 861 deletions(-) diff --git a/.gitignore b/.gitignore index 4d29575..cc964cb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /build # misc +.env .DS_Store .env.local .env.development.local diff --git a/package-lock.json b/package-lock.json index bfca13d..2f8dfde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "name": "instagram-bootcamp", "version": "0.1.0", "dependencies": { - "firebase": "^9.8.0", + "bootstrap": "^5.3.2", + "firebase": "^9.23.0", "react": "^18.1.0", "react-dom": "^18.1.0", "react-scripts": "5.0.1" @@ -2059,14 +2060,14 @@ } }, "node_modules/@firebase/analytics": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.9.tgz", - "integrity": "sha512-h/2L2q4/+mmV9EdvVC3XwFFbKSh8bvaYu4DMJIKnPAuGze6W5ALBLkK2GcVti6Kz1NTMJ3puxTRWE9XxRGZipQ==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", + "integrity": "sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2074,14 +2075,14 @@ } }, "node_modules/@firebase/analytics-compat": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.10.tgz", - "integrity": "sha512-7zfB+BBO5RbF7RSHOA4ZPyLvOEEvMOhRbfIjh5ZmizAQY2J6tZB8t+dwQ/q4hqZVGgw4ds4g0JYuRKZKYsWADg==", - "dependencies": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-types": "0.7.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz", + "integrity": "sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==", + "dependencies": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-types": "0.8.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2089,30 +2090,30 @@ } }, "node_modules/@firebase/analytics-types": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.7.0.tgz", - "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.0.tgz", + "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" }, "node_modules/@firebase/app": { - "version": "0.7.23", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.23.tgz", - "integrity": "sha512-l4lWct3DrCGwwUtNzoKmOVGkWrbULGwPvV63888xuPppScd0VN/W7iOWJIOye6kEPuwrazTWGa+YQZYTaQK49g==", + "version": "0.9.13", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.13.tgz", + "integrity": "sha512-GfiI1JxJ7ecluEmDjPzseRXk/PX31hS7+tjgBopL7XjB2hLUdR+0FTMXy2Q3/hXezypDvU6or7gVFizDESrkXw==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "idb": "7.0.1", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "idb": "7.1.1", "tslib": "^2.1.0" } }, "node_modules/@firebase/app-check": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.8.tgz", - "integrity": "sha512-DgrXnrJT0S5csa5CsvmWWSWqy61T3rOE2iZ/L4Q8+xZsjU2McpUj8g/lU8NDa4qc5mGRZ/Qjozqog1H3pwPgGw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.0.tgz", + "integrity": "sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2120,15 +2121,15 @@ } }, "node_modules/@firebase/app-check-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.8.tgz", - "integrity": "sha512-EAqFa0juE2xc52IGh2nv8E+avTLsZfbO7fkJnhPu07e5FU39pptcsRckTdHU7v1/DuWuigUVFcOD5iic9I8TQw==", - "dependencies": { - "@firebase/app-check": "0.5.8", - "@firebase/app-check-types": "0.4.0", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz", + "integrity": "sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw==", + "dependencies": { + "@firebase/app-check": "0.8.0", + "@firebase/app-check-types": "0.5.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2136,47 +2137,46 @@ } }, "node_modules/@firebase/app-check-interop-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.1.0.tgz", - "integrity": "sha512-uZfn9s4uuRsaX5Lwx+gFP3B6YsyOKUE+Rqa6z9ojT4VSRAsZFko9FRn6OxQUA1z5t5d08fY4pf+/+Dkd5wbdbA==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.0.tgz", + "integrity": "sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg==" }, "node_modules/@firebase/app-check-types": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.4.0.tgz", - "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.0.tgz", + "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" }, "node_modules/@firebase/app-compat": { - "version": "0.1.24", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.24.tgz", - "integrity": "sha512-qDDo9vvFzpVoE4EpgzSMYOJ7wsy6cwh4lfz2/RqeNpmJniybcDNaxEVO52ejCNqIQ2yVo6yBbK8D0b5FrO8P2w==", - "dependencies": { - "@firebase/app": "0.7.23", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.13.tgz", + "integrity": "sha512-j6ANZaWjeVy5zg6X7uiqh6lM6o3n3LD1+/SJFNs9V781xyryyZWXe+tmnWNWPkP086QfJoNkWN9pMQRqSG4vMg==", + "dependencies": { + "@firebase/app": "0.9.13", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "node_modules/@firebase/app-types": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.7.0.tgz", - "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz", + "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" }, "node_modules/@firebase/app/node_modules/idb": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", - "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" }, "node_modules/@firebase/auth": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.0.tgz", - "integrity": "sha512-OiuNLrnsewxO9IbsUVon++sjezRfGcy+ddvYmNpwOEmqnquF2K6nEePty7mcQ+2CrTyndHTwYyTeP471iAOU+A==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.23.2.tgz", + "integrity": "sha512-dM9iJ0R6tI1JczuGSxXmQbXAgtYie0K4WvKcuyuSTCu9V8eEDiz4tfa1sO3txsfvwg7nOY3AjoCyMYEdqZ8hdg==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", - "selenium-webdriver": " 4.1.1", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2184,16 +2184,15 @@ } }, "node_modules/@firebase/auth-compat": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.13.tgz", - "integrity": "sha512-erJF7+4FXztGGgJtELL+x3g0x3l8+JNvTcnIm3RbecXnq5ZlrPyMMhE0OwEICFBAQi0NLltVQigY/2IWHsHmlA==", - "dependencies": { - "@firebase/auth": "0.20.0", - "@firebase/auth-types": "0.11.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.4.2.tgz", + "integrity": "sha512-Q30e77DWXFmXEt5dg5JbqEDpjw9y3/PcP9LslDPR7fARmAOTIY9MM6HXzm9KC+dlrKH/+p6l8g9ifJiam9mc4A==", + "dependencies": { + "@firebase/auth": "0.23.2", + "@firebase/auth-types": "0.12.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", - "selenium-webdriver": " 4.1.1", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2201,81 +2200,74 @@ } }, "node_modules/@firebase/auth-interop-types": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz", - "integrity": "sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==", - "peerDependencies": { - "@firebase/app-types": "0.x", - "@firebase/util": "1.x" - } + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz", + "integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg==" }, "node_modules/@firebase/auth-types": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.11.0.tgz", - "integrity": "sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.0.tgz", + "integrity": "sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==", "peerDependencies": { "@firebase/app-types": "0.x", "@firebase/util": "1.x" } }, "node_modules/@firebase/component": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.14.tgz", - "integrity": "sha512-ct2p1MTMV5P/nGIlkC3XjAVwHwjsIZaeo8JVyDAkJCNTROu5mYX3FBK16hjIUIIVJDpgnnzFh9nP74gciL4WrA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz", + "integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==", "dependencies": { - "@firebase/util": "1.6.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "node_modules/@firebase/database": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.0.tgz", - "integrity": "sha512-lskyf5+FDnytrPJt3MLjkTDxYxutKtaYL7j/Z/De2DSVZJSR+weE/D/r47iK/+tyzMaew2v3joSgZOHvVlWshw==", - "dependencies": { - "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.14.4.tgz", + "integrity": "sha512-+Ea/IKGwh42jwdjCyzTmeZeLM3oy1h0mFPsTy6OqCWzcu/KFqRAr5Tt1HRCOBlNOdbh84JPZC47WLU18n2VbxQ==", + "dependencies": { + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "faye-websocket": "0.11.4", "tslib": "^2.1.0" } }, "node_modules/@firebase/database-compat": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.0.tgz", - "integrity": "sha512-t2HVI1RrMz8cbmhyo2LQGSInhRN9DZTDKXm55iFQgSihcnCbfoMAFyRv/FFa1Y+iERgcDI8LaOMS/LTjpYVz4g==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/database": "0.13.0", - "@firebase/database-types": "0.9.8", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.3.4.tgz", + "integrity": "sha512-kuAW+l+sLMUKBThnvxvUZ+Q1ZrF/vFJ58iUY9kAcbX48U03nVzIF6Tmkf0p3WVQwMqiXguSgtOPIB6ZCeF+5Gg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/database": "0.14.4", + "@firebase/database-types": "0.10.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" } }, "node_modules/@firebase/database-types": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.8.tgz", - "integrity": "sha512-bI7bwF5xc0nPi6Oa3JVt6JJdfhVAnEpCwgfTNILR4lYDPtxdxlRXhZzQ5lfqlCj7PR+drKh9RvMu6C24N1q04w==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.10.4.tgz", + "integrity": "sha512-dPySn0vJ/89ZeBac70T+2tWWPiJXWbmRygYv0smT5TfE3hDrQ09eKMF3Y+vMlTdrMWq7mUdYW5REWPSGH4kAZQ==", "dependencies": { - "@firebase/app-types": "0.7.0", - "@firebase/util": "1.6.0" + "@firebase/app-types": "0.9.0", + "@firebase/util": "1.9.3" } }, "node_modules/@firebase/firestore": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.9.tgz", - "integrity": "sha512-EiSG/uYDyUmrrHlwrsP9WqWI8ChD0hUW/+0MS3NDh8Cfo1Dfb/sM3YWKzgnIZ3wKTxn/nbe9oidHZp5cqI9G+w==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "@firebase/webchannel-wrapper": "0.6.1", - "@grpc/grpc-js": "^1.3.2", - "@grpc/proto-loader": "^0.6.0", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.13.0.tgz", + "integrity": "sha512-NwcnU+madJXQ4fbLkGx1bWvL612IJN/qO6bZ6dlPmyf7QRyu5azUosijdAN675r+bOOJxMtP1Bv981bHBXAbUg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "@firebase/webchannel-wrapper": "0.10.1", + "@grpc/grpc-js": "~1.7.0", + "@grpc/proto-loader": "^0.6.13", "node-fetch": "2.6.7", "tslib": "^2.1.0" }, @@ -2287,14 +2279,14 @@ } }, "node_modules/@firebase/firestore-compat": { - "version": "0.1.18", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.18.tgz", - "integrity": "sha512-D6VXudL/B2jlZ6MGpsDPHHm/DSpfKuUOnEb5wwH89Sw0nW5snSMNG8QfYTQYKUxrX35ma+nWUnaa18LlVTUMXQ==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-types": "2.5.0", - "@firebase/util": "1.6.0", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.12.tgz", + "integrity": "sha512-mazuNGAx5Kt9Nph0pm6ULJFp/+j7GSsx+Ncw1GrnKl+ft1CQ4q2LcUssXnjqkX2Ry0fNGqUzC1mfIUrk9bYtjQ==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/firestore": "3.13.0", + "@firebase/firestore-types": "2.5.1", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2302,24 +2294,24 @@ } }, "node_modules/@firebase/firestore-types": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.0.tgz", - "integrity": "sha512-I6c2m1zUhZ5SH0cWPmINabDyH5w0PPFHk2UHsjBpKdZllzJZ2TwTkXbDtpHUZNmnc/zAa0WNMNMvcvbb/xJLKA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.1.tgz", + "integrity": "sha512-xG0CA6EMfYo8YeUxC8FeDzf6W3FX1cLlcAGBYV6Cku12sZRI81oWcu61RSKM66K6kUENP+78Qm8mvroBcm1whw==", "peerDependencies": { "@firebase/app-types": "0.x", "@firebase/util": "1.x" } }, "node_modules/@firebase/functions": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.1.tgz", - "integrity": "sha512-UF5187TPn1Q1sFmAUU1oZdKub1t0Z6MAjcskGS6CV4OwAkILZQ9v38LIbo3wnA62R5hr3IFpdEJxKkqHojMwSg==", - "dependencies": { - "@firebase/app-check-interop-types": "0.1.0", - "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.10.0.tgz", + "integrity": "sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==", + "dependencies": { + "@firebase/app-check-interop-types": "0.3.0", + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", "tslib": "^2.1.0" }, @@ -2328,14 +2320,14 @@ } }, "node_modules/@firebase/functions-compat": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.1.tgz", - "integrity": "sha512-1epI+TGb3CxpQrnoSJnKMUqBLn9b6KA1Rro6ISmZIEkaDEi8p8q3UI917XP+OewiPG71xvpySiEIIxWyktcl+A==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/functions": "0.8.1", - "@firebase/functions-types": "0.5.0", - "@firebase/util": "1.6.0", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.5.tgz", + "integrity": "sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/functions": "0.10.0", + "@firebase/functions-types": "0.6.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2343,17 +2335,17 @@ } }, "node_modules/@firebase/functions-types": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.5.0.tgz", - "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz", + "integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==" }, "node_modules/@firebase/installations": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.9.tgz", - "integrity": "sha512-0XvF9ig8Zj7MWP4Aq5/Wcyjq9f/cDtD6DKFJhp3BT1AjmACdmq7WD72xok8UBhkOiqymIiGd5eQf7rX225D2Sw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz", + "integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -2361,28 +2353,51 @@ "@firebase/app": "0.x" } }, + "node_modules/@firebase/installations-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz", + "integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/installations-types": "0.5.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/installations-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.0.tgz", + "integrity": "sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==", + "peerDependencies": { + "@firebase/app-types": "0.x" + } + }, "node_modules/@firebase/installations/node_modules/idb": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" }, "node_modules/@firebase/logger": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.2.tgz", - "integrity": "sha512-lzLrcJp9QBWpo40OcOM9B8QEtBw2Fk1zOZQdvv+rWS6gKmhQBCEMc4SMABQfWdjsylBcDfniD1Q+fUX1dcBTXA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz", + "integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/@firebase/messaging": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.13.tgz", - "integrity": "sha512-wR/SGYGG/bmz1gRqm6/eGI6zRg/X3qNP0BCk0Oa6xVDKK04UCE9zNRgQYgCSKNP+zuLfDhpHbXvvXQp9/vBYVA==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz", + "integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -2391,13 +2406,13 @@ } }, "node_modules/@firebase/messaging-compat": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.13.tgz", - "integrity": "sha512-kGuzjpl+pcTRmEgGDjyOKQnxxQgC7wIJIIHhLMIpfxHHL5+ysN1Tjq0Ztr1t/gcdHKErtnD/n9To5eoGZHqpzA==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz", + "integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/messaging": "0.9.13", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/messaging": "0.12.4", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2405,9 +2420,9 @@ } }, "node_modules/@firebase/messaging-interop-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.1.0.tgz", - "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz", + "integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==" }, "node_modules/@firebase/messaging/node_modules/idb": { "version": "7.0.1", @@ -2415,14 +2430,14 @@ "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" }, "node_modules/@firebase/performance": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.9.tgz", - "integrity": "sha512-cA1pea1hkIZt0FG0a42tjKQNBhdY7q4apqHML92vBCS9QOOR0SHBui44IGQJRfRBGiVICHW03Q+ikSZv08g+jw==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz", + "integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2430,15 +2445,15 @@ } }, "node_modules/@firebase/performance-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.9.tgz", - "integrity": "sha512-EBX4u/uK76ikJSyoWZ2cEMj63G01w1DA68KDpSypSMhKPJE2eiCtWABRTSXhcaisq/FDwZzl4XhNjDyfzArwhA==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/performance": "0.5.9", - "@firebase/performance-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz", + "integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/performance": "0.6.4", + "@firebase/performance-types": "0.2.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2446,44 +2461,19 @@ } }, "node_modules/@firebase/performance-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.1.0.tgz", - "integrity": "sha512-6p1HxrH0mpx+622Ql6fcxFxfkYSBpE3LSuwM7iTtYU2nw91Hj6THC8Bc8z4nboIq7WvgsT/kOTYVVZzCSlXl8w==" - }, - "node_modules/@firebase/polyfill": { - "version": "0.3.36", - "resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.36.tgz", - "integrity": "sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg==", - "dependencies": { - "core-js": "3.6.5", - "promise-polyfill": "8.1.3", - "whatwg-fetch": "2.0.4" - } - }, - "node_modules/@firebase/polyfill/node_modules/core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/@firebase/polyfill/node_modules/whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.0.tgz", + "integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA==" }, "node_modules/@firebase/remote-config": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.8.tgz", - "integrity": "sha512-z5HYrjrgzkR25nlvQqiPowDGatlEJirA5sN1B6rOy+KYMLsb6IXLVOdKjj/Tg/uHAErwd0DblGxwBUZKTCuo1g==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz", + "integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2491,15 +2481,15 @@ } }, "node_modules/@firebase/remote-config-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.9.tgz", - "integrity": "sha512-ud4yINy8cegE82KoBDXS4fOp6qwy0+7zl0k587kMXHSWHbWVRZ/uKMQGJQc7kG0EQp0tZhM20CxVwtcCGsABBA==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-types": "0.2.0", - "@firebase/util": "1.6.0", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz", + "integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-types": "0.3.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2507,17 +2497,17 @@ } }, "node_modules/@firebase/remote-config-types": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.2.0.tgz", - "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz", + "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" }, "node_modules/@firebase/storage": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.6.tgz", - "integrity": "sha512-q8/s3qFbFl+AlKbyEtGA7FRVhcMu3NKPqHueBTn5XSI0B3bfxptBcDJMb9txs69ppve6P3jrK1//TEWpjTGJUg==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz", + "integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", "tslib": "^2.1.0" }, @@ -2526,14 +2516,14 @@ } }, "node_modules/@firebase/storage-compat": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.14.tgz", - "integrity": "sha512-/Fey1n+ryIeAEyd/qXPXh32ReFZUhzE5W0z/+LDA+3yyMGw/a6wCzQqe7wBiGiCRhjd+5XiV++jkCXTflun3Dg==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/storage": "0.9.6", - "@firebase/storage-types": "0.6.0", - "@firebase/util": "1.6.0", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz", + "integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==", + "dependencies": { + "@firebase/component": "0.6.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-types": "0.8.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" }, "peerDependencies": { @@ -2541,48 +2531,131 @@ } }, "node_modules/@firebase/storage-types": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.6.0.tgz", - "integrity": "sha512-1LpWhcCb1ftpkP/akhzjzeFxgVefs6eMD2QeKiJJUGH1qOiows2w5o0sKCUSQrvrRQS1lz3SFGvNR1Ck/gqxeA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.0.tgz", + "integrity": "sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==", "peerDependencies": { "@firebase/app-types": "0.x", "@firebase/util": "1.x" } }, "node_modules/@firebase/util": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.0.tgz", - "integrity": "sha512-6+hhqb4Zzjoo12xofTDHPkgW3FnN4ydBsjd5X2KuQI268DR3W3Ld64W/gkKPZrKRgUxeNeb+pykfP3qRe7q+vA==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz", + "integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/@firebase/webchannel-wrapper": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.1.tgz", - "integrity": "sha512-9FqhNjKQWpQ3fGnSOCovHOm+yhhiorKEqYLAfd525jWavunDJcx8rOW6i6ozAh+FbwcYMkL7b+3j4UR/30MpoQ==" + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.1.tgz", + "integrity": "sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==" }, "node_modules/@grpc/grpc-js": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.7.tgz", - "integrity": "sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", + "integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==", "dependencies": { - "@grpc/proto-loader": "^0.6.4", + "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" }, "engines": { "node": "^8.13.0 || >=10.10.0" } }, + "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", + "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@grpc/grpc-js/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@grpc/grpc-js/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/@grpc/grpc-js/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@grpc/grpc-js/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@grpc/grpc-js/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/@grpc/proto-loader": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.12.tgz", - "integrity": "sha512-filTVbETFnxb9CyRX98zN18ilChTuf/C5scZ2xyaOTp0EHGq0/ufX8rjqXUcSb1Gpv7eZq4M2jDvbh9BogKnrg==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", "dependencies": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^6.10.0", + "protobufjs": "^6.11.3", "yargs": "^16.2.0" }, "bin": { @@ -3401,10 +3474,20 @@ } } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, "node_modules/@protobufjs/base64": { "version": "1.1.2", @@ -3419,12 +3502,12 @@ "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "node_modules/@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", "dependencies": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -3433,27 +3516,27 @@ "node_modules/@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" }, "node_modules/@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" }, "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" }, "node_modules/@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" }, "node_modules/@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", @@ -5229,6 +5312,24 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, + "node_modules/bootstrap": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.2.tgz", + "integrity": "sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7748,36 +7849,36 @@ } }, "node_modules/firebase": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.0.tgz", - "integrity": "sha512-9du2Rvb+gvc4laqnazwmhzJyhw6slQ67ciP98MD/IGO1NmDNhu3cOohqxVm8P4LWYLTcBxlRL9puyXu0AIcspw==", - "dependencies": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-compat": "0.1.10", - "@firebase/app": "0.7.23", - "@firebase/app-check": "0.5.8", - "@firebase/app-check-compat": "0.2.8", - "@firebase/app-compat": "0.1.24", - "@firebase/app-types": "0.7.0", - "@firebase/auth": "0.20.0", - "@firebase/auth-compat": "0.2.13", - "@firebase/database": "0.13.0", - "@firebase/database-compat": "0.2.0", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-compat": "0.1.18", - "@firebase/functions": "0.8.1", - "@firebase/functions-compat": "0.2.1", - "@firebase/installations": "0.5.9", - "@firebase/messaging": "0.9.13", - "@firebase/messaging-compat": "0.1.13", - "@firebase/performance": "0.5.9", - "@firebase/performance-compat": "0.1.9", - "@firebase/polyfill": "0.3.36", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-compat": "0.1.9", - "@firebase/storage": "0.9.6", - "@firebase/storage-compat": "0.1.14", - "@firebase/util": "1.6.0" + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.23.0.tgz", + "integrity": "sha512-/4lUVY0lUvBDIaeY1q6dUYhS8Sd18Qb9CgWkPZICUo9IXpJNCEagfNZXBBFCkMTTN5L5gx2Hjr27y21a9NzUcA==", + "dependencies": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-compat": "0.2.6", + "@firebase/app": "0.9.13", + "@firebase/app-check": "0.8.0", + "@firebase/app-check-compat": "0.3.7", + "@firebase/app-compat": "0.2.13", + "@firebase/app-types": "0.9.0", + "@firebase/auth": "0.23.2", + "@firebase/auth-compat": "0.4.2", + "@firebase/database": "0.14.4", + "@firebase/database-compat": "0.3.4", + "@firebase/firestore": "3.13.0", + "@firebase/firestore-compat": "0.3.12", + "@firebase/functions": "0.10.0", + "@firebase/functions-compat": "0.3.5", + "@firebase/installations": "0.6.4", + "@firebase/installations-compat": "0.2.4", + "@firebase/messaging": "0.12.4", + "@firebase/messaging-compat": "0.2.4", + "@firebase/performance": "0.6.4", + "@firebase/performance-compat": "0.2.4", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-compat": "0.2.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-compat": "0.3.2", + "@firebase/util": "1.9.3" } }, "node_modules/flat-cache": { @@ -8594,11 +8695,6 @@ "node": ">= 4" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" - }, "node_modules/immer": { "version": "9.0.12", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", @@ -11203,39 +11299,6 @@ "node": ">=4.0" } }, - "node_modules/jszip": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz", - "integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" - } - }, - "node_modules/jszip/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/jszip/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11293,14 +11356,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dependencies": { - "immediate": "~3.0.5" - } - }, "node_modules/lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -11357,7 +11412,7 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -11733,17 +11788,17 @@ "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -12069,11 +12124,6 @@ "node": ">=6" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -13494,11 +13544,6 @@ "asap": "~2.0.6" } }, - "node_modules/promise-polyfill": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", - "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==" - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -13527,9 +13572,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -14446,19 +14491,6 @@ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, - "node_modules/selenium-webdriver": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.1.1.tgz", - "integrity": "sha512-Fr9e9LC6zvD6/j7NO8M1M/NVxFX67abHcxDJoP5w2KN/Xb1SyYLjMVPGgD14U2TOiKe4XKHf42OmFw9g2JgCBQ==", - "dependencies": { - "jszip": "^3.6.0", - "tmp": "^0.2.1", - "ws": ">=7.4.6" - }, - "engines": { - "node": ">= 10.15.0" - } - }, "node_modules/selfsigned": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz", @@ -14617,14 +14649,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -15393,17 +15417,6 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, - "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -18020,258 +18033,255 @@ } }, "@firebase/analytics": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.9.tgz", - "integrity": "sha512-h/2L2q4/+mmV9EdvVC3XwFFbKSh8bvaYu4DMJIKnPAuGze6W5ALBLkK2GcVti6Kz1NTMJ3puxTRWE9XxRGZipQ==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", + "integrity": "sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/analytics-compat": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.10.tgz", - "integrity": "sha512-7zfB+BBO5RbF7RSHOA4ZPyLvOEEvMOhRbfIjh5ZmizAQY2J6tZB8t+dwQ/q4hqZVGgw4ds4g0JYuRKZKYsWADg==", - "requires": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-types": "0.7.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz", + "integrity": "sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==", + "requires": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-types": "0.8.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/analytics-types": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.7.0.tgz", - "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.8.0.tgz", + "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" }, "@firebase/app": { - "version": "0.7.23", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.23.tgz", - "integrity": "sha512-l4lWct3DrCGwwUtNzoKmOVGkWrbULGwPvV63888xuPppScd0VN/W7iOWJIOye6kEPuwrazTWGa+YQZYTaQK49g==", + "version": "0.9.13", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.13.tgz", + "integrity": "sha512-GfiI1JxJ7ecluEmDjPzseRXk/PX31hS7+tjgBopL7XjB2hLUdR+0FTMXy2Q3/hXezypDvU6or7gVFizDESrkXw==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "idb": "7.0.1", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "idb": "7.1.1", "tslib": "^2.1.0" }, "dependencies": { "idb": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", - "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==" } } }, "@firebase/app-check": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.8.tgz", - "integrity": "sha512-DgrXnrJT0S5csa5CsvmWWSWqy61T3rOE2iZ/L4Q8+xZsjU2McpUj8g/lU8NDa4qc5mGRZ/Qjozqog1H3pwPgGw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.0.tgz", + "integrity": "sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/app-check-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.8.tgz", - "integrity": "sha512-EAqFa0juE2xc52IGh2nv8E+avTLsZfbO7fkJnhPu07e5FU39pptcsRckTdHU7v1/DuWuigUVFcOD5iic9I8TQw==", - "requires": { - "@firebase/app-check": "0.5.8", - "@firebase/app-check-types": "0.4.0", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz", + "integrity": "sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw==", + "requires": { + "@firebase/app-check": "0.8.0", + "@firebase/app-check-types": "0.5.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/app-check-interop-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.1.0.tgz", - "integrity": "sha512-uZfn9s4uuRsaX5Lwx+gFP3B6YsyOKUE+Rqa6z9ojT4VSRAsZFko9FRn6OxQUA1z5t5d08fY4pf+/+Dkd5wbdbA==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.0.tgz", + "integrity": "sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg==" }, "@firebase/app-check-types": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.4.0.tgz", - "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.5.0.tgz", + "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" }, "@firebase/app-compat": { - "version": "0.1.24", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.24.tgz", - "integrity": "sha512-qDDo9vvFzpVoE4EpgzSMYOJ7wsy6cwh4lfz2/RqeNpmJniybcDNaxEVO52ejCNqIQ2yVo6yBbK8D0b5FrO8P2w==", - "requires": { - "@firebase/app": "0.7.23", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.13.tgz", + "integrity": "sha512-j6ANZaWjeVy5zg6X7uiqh6lM6o3n3LD1+/SJFNs9V781xyryyZWXe+tmnWNWPkP086QfJoNkWN9pMQRqSG4vMg==", + "requires": { + "@firebase/app": "0.9.13", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/app-types": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.7.0.tgz", - "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz", + "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" }, "@firebase/auth": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.0.tgz", - "integrity": "sha512-OiuNLrnsewxO9IbsUVon++sjezRfGcy+ddvYmNpwOEmqnquF2K6nEePty7mcQ+2CrTyndHTwYyTeP471iAOU+A==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.23.2.tgz", + "integrity": "sha512-dM9iJ0R6tI1JczuGSxXmQbXAgtYie0K4WvKcuyuSTCu9V8eEDiz4tfa1sO3txsfvwg7nOY3AjoCyMYEdqZ8hdg==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", - "selenium-webdriver": " 4.1.1", "tslib": "^2.1.0" } }, "@firebase/auth-compat": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.13.tgz", - "integrity": "sha512-erJF7+4FXztGGgJtELL+x3g0x3l8+JNvTcnIm3RbecXnq5ZlrPyMMhE0OwEICFBAQi0NLltVQigY/2IWHsHmlA==", - "requires": { - "@firebase/auth": "0.20.0", - "@firebase/auth-types": "0.11.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.4.2.tgz", + "integrity": "sha512-Q30e77DWXFmXEt5dg5JbqEDpjw9y3/PcP9LslDPR7fARmAOTIY9MM6HXzm9KC+dlrKH/+p6l8g9ifJiam9mc4A==", + "requires": { + "@firebase/auth": "0.23.2", + "@firebase/auth-types": "0.12.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", - "selenium-webdriver": " 4.1.1", "tslib": "^2.1.0" } }, "@firebase/auth-interop-types": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz", - "integrity": "sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==", - "requires": {} + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz", + "integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg==" }, "@firebase/auth-types": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.11.0.tgz", - "integrity": "sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.0.tgz", + "integrity": "sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==", "requires": {} }, "@firebase/component": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.14.tgz", - "integrity": "sha512-ct2p1MTMV5P/nGIlkC3XjAVwHwjsIZaeo8JVyDAkJCNTROu5mYX3FBK16hjIUIIVJDpgnnzFh9nP74gciL4WrA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz", + "integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==", "requires": { - "@firebase/util": "1.6.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/database": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.0.tgz", - "integrity": "sha512-lskyf5+FDnytrPJt3MLjkTDxYxutKtaYL7j/Z/De2DSVZJSR+weE/D/r47iK/+tyzMaew2v3joSgZOHvVlWshw==", - "requires": { - "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.14.4.tgz", + "integrity": "sha512-+Ea/IKGwh42jwdjCyzTmeZeLM3oy1h0mFPsTy6OqCWzcu/KFqRAr5Tt1HRCOBlNOdbh84JPZC47WLU18n2VbxQ==", + "requires": { + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "faye-websocket": "0.11.4", "tslib": "^2.1.0" } }, "@firebase/database-compat": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.0.tgz", - "integrity": "sha512-t2HVI1RrMz8cbmhyo2LQGSInhRN9DZTDKXm55iFQgSihcnCbfoMAFyRv/FFa1Y+iERgcDI8LaOMS/LTjpYVz4g==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/database": "0.13.0", - "@firebase/database-types": "0.9.8", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.3.4.tgz", + "integrity": "sha512-kuAW+l+sLMUKBThnvxvUZ+Q1ZrF/vFJ58iUY9kAcbX48U03nVzIF6Tmkf0p3WVQwMqiXguSgtOPIB6ZCeF+5Gg==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/database": "0.14.4", + "@firebase/database-types": "0.10.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/database-types": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.8.tgz", - "integrity": "sha512-bI7bwF5xc0nPi6Oa3JVt6JJdfhVAnEpCwgfTNILR4lYDPtxdxlRXhZzQ5lfqlCj7PR+drKh9RvMu6C24N1q04w==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.10.4.tgz", + "integrity": "sha512-dPySn0vJ/89ZeBac70T+2tWWPiJXWbmRygYv0smT5TfE3hDrQ09eKMF3Y+vMlTdrMWq7mUdYW5REWPSGH4kAZQ==", "requires": { - "@firebase/app-types": "0.7.0", - "@firebase/util": "1.6.0" + "@firebase/app-types": "0.9.0", + "@firebase/util": "1.9.3" } }, "@firebase/firestore": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.9.tgz", - "integrity": "sha512-EiSG/uYDyUmrrHlwrsP9WqWI8ChD0hUW/+0MS3NDh8Cfo1Dfb/sM3YWKzgnIZ3wKTxn/nbe9oidHZp5cqI9G+w==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "@firebase/webchannel-wrapper": "0.6.1", - "@grpc/grpc-js": "^1.3.2", - "@grpc/proto-loader": "^0.6.0", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.13.0.tgz", + "integrity": "sha512-NwcnU+madJXQ4fbLkGx1bWvL612IJN/qO6bZ6dlPmyf7QRyu5azUosijdAN675r+bOOJxMtP1Bv981bHBXAbUg==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", + "@firebase/webchannel-wrapper": "0.10.1", + "@grpc/grpc-js": "~1.7.0", + "@grpc/proto-loader": "^0.6.13", "node-fetch": "2.6.7", "tslib": "^2.1.0" } }, "@firebase/firestore-compat": { - "version": "0.1.18", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.18.tgz", - "integrity": "sha512-D6VXudL/B2jlZ6MGpsDPHHm/DSpfKuUOnEb5wwH89Sw0nW5snSMNG8QfYTQYKUxrX35ma+nWUnaa18LlVTUMXQ==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-types": "2.5.0", - "@firebase/util": "1.6.0", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.12.tgz", + "integrity": "sha512-mazuNGAx5Kt9Nph0pm6ULJFp/+j7GSsx+Ncw1GrnKl+ft1CQ4q2LcUssXnjqkX2Ry0fNGqUzC1mfIUrk9bYtjQ==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/firestore": "3.13.0", + "@firebase/firestore-types": "2.5.1", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/firestore-types": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.0.tgz", - "integrity": "sha512-I6c2m1zUhZ5SH0cWPmINabDyH5w0PPFHk2UHsjBpKdZllzJZ2TwTkXbDtpHUZNmnc/zAa0WNMNMvcvbb/xJLKA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.1.tgz", + "integrity": "sha512-xG0CA6EMfYo8YeUxC8FeDzf6W3FX1cLlcAGBYV6Cku12sZRI81oWcu61RSKM66K6kUENP+78Qm8mvroBcm1whw==", "requires": {} }, "@firebase/functions": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.1.tgz", - "integrity": "sha512-UF5187TPn1Q1sFmAUU1oZdKub1t0Z6MAjcskGS6CV4OwAkILZQ9v38LIbo3wnA62R5hr3IFpdEJxKkqHojMwSg==", - "requires": { - "@firebase/app-check-interop-types": "0.1.0", - "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.10.0.tgz", + "integrity": "sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==", + "requires": { + "@firebase/app-check-interop-types": "0.3.0", + "@firebase/auth-interop-types": "0.2.1", + "@firebase/component": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", "tslib": "^2.1.0" } }, "@firebase/functions-compat": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.1.tgz", - "integrity": "sha512-1epI+TGb3CxpQrnoSJnKMUqBLn9b6KA1Rro6ISmZIEkaDEi8p8q3UI917XP+OewiPG71xvpySiEIIxWyktcl+A==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/functions": "0.8.1", - "@firebase/functions-types": "0.5.0", - "@firebase/util": "1.6.0", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.5.tgz", + "integrity": "sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/functions": "0.10.0", + "@firebase/functions-types": "0.6.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/functions-types": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.5.0.tgz", - "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz", + "integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==" }, "@firebase/installations": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.9.tgz", - "integrity": "sha512-0XvF9ig8Zj7MWP4Aq5/Wcyjq9f/cDtD6DKFJhp3BT1AjmACdmq7WD72xok8UBhkOiqymIiGd5eQf7rX225D2Sw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz", + "integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -18283,23 +18293,41 @@ } } }, + "@firebase/installations-compat": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz", + "integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/installations-types": "0.5.0", + "@firebase/util": "1.9.3", + "tslib": "^2.1.0" + } + }, + "@firebase/installations-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/installations-types/-/installations-types-0.5.0.tgz", + "integrity": "sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==", + "requires": {} + }, "@firebase/logger": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.2.tgz", - "integrity": "sha512-lzLrcJp9QBWpo40OcOM9B8QEtBw2Fk1zOZQdvv+rWS6gKmhQBCEMc4SMABQfWdjsylBcDfniD1Q+fUX1dcBTXA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz", + "integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==", "requires": { "tslib": "^2.1.0" } }, "@firebase/messaging": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.13.tgz", - "integrity": "sha512-wR/SGYGG/bmz1gRqm6/eGI6zRg/X3qNP0BCk0Oa6xVDKK04UCE9zNRgQYgCSKNP+zuLfDhpHbXvvXQp9/vBYVA==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz", + "integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/messaging-interop-types": "0.2.0", + "@firebase/util": "1.9.3", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -18312,163 +18340,207 @@ } }, "@firebase/messaging-compat": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.13.tgz", - "integrity": "sha512-kGuzjpl+pcTRmEgGDjyOKQnxxQgC7wIJIIHhLMIpfxHHL5+ysN1Tjq0Ztr1t/gcdHKErtnD/n9To5eoGZHqpzA==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz", + "integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/messaging": "0.9.13", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/messaging": "0.12.4", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/messaging-interop-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.1.0.tgz", - "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz", + "integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==" }, "@firebase/performance": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.9.tgz", - "integrity": "sha512-cA1pea1hkIZt0FG0a42tjKQNBhdY7q4apqHML92vBCS9QOOR0SHBui44IGQJRfRBGiVICHW03Q+ikSZv08g+jw==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz", + "integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/performance-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.9.tgz", - "integrity": "sha512-EBX4u/uK76ikJSyoWZ2cEMj63G01w1DA68KDpSypSMhKPJE2eiCtWABRTSXhcaisq/FDwZzl4XhNjDyfzArwhA==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/performance": "0.5.9", - "@firebase/performance-types": "0.1.0", - "@firebase/util": "1.6.0", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz", + "integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/performance": "0.6.4", + "@firebase/performance-types": "0.2.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/performance-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.1.0.tgz", - "integrity": "sha512-6p1HxrH0mpx+622Ql6fcxFxfkYSBpE3LSuwM7iTtYU2nw91Hj6THC8Bc8z4nboIq7WvgsT/kOTYVVZzCSlXl8w==" - }, - "@firebase/polyfill": { - "version": "0.3.36", - "resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.36.tgz", - "integrity": "sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg==", - "requires": { - "core-js": "3.6.5", - "promise-polyfill": "8.1.3", - "whatwg-fetch": "2.0.4" - }, - "dependencies": { - "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" - }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - } - } + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.2.0.tgz", + "integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA==" }, "@firebase/remote-config": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.8.tgz", - "integrity": "sha512-z5HYrjrgzkR25nlvQqiPowDGatlEJirA5sN1B6rOy+KYMLsb6IXLVOdKjj/Tg/uHAErwd0DblGxwBUZKTCuo1g==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz", + "integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/installations": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/remote-config-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.9.tgz", - "integrity": "sha512-ud4yINy8cegE82KoBDXS4fOp6qwy0+7zl0k587kMXHSWHbWVRZ/uKMQGJQc7kG0EQp0tZhM20CxVwtcCGsABBA==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-types": "0.2.0", - "@firebase/util": "1.6.0", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz", + "integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/logger": "0.4.0", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-types": "0.3.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/remote-config-types": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.2.0.tgz", - "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz", + "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" }, "@firebase/storage": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.6.tgz", - "integrity": "sha512-q8/s3qFbFl+AlKbyEtGA7FRVhcMu3NKPqHueBTn5XSI0B3bfxptBcDJMb9txs69ppve6P3jrK1//TEWpjTGJUg==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz", + "integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.6.4", + "@firebase/util": "1.9.3", "node-fetch": "2.6.7", "tslib": "^2.1.0" } }, "@firebase/storage-compat": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.14.tgz", - "integrity": "sha512-/Fey1n+ryIeAEyd/qXPXh32ReFZUhzE5W0z/+LDA+3yyMGw/a6wCzQqe7wBiGiCRhjd+5XiV++jkCXTflun3Dg==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/storage": "0.9.6", - "@firebase/storage-types": "0.6.0", - "@firebase/util": "1.6.0", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz", + "integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==", + "requires": { + "@firebase/component": "0.6.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-types": "0.8.0", + "@firebase/util": "1.9.3", "tslib": "^2.1.0" } }, "@firebase/storage-types": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.6.0.tgz", - "integrity": "sha512-1LpWhcCb1ftpkP/akhzjzeFxgVefs6eMD2QeKiJJUGH1qOiows2w5o0sKCUSQrvrRQS1lz3SFGvNR1Ck/gqxeA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.8.0.tgz", + "integrity": "sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==", "requires": {} }, "@firebase/util": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.0.tgz", - "integrity": "sha512-6+hhqb4Zzjoo12xofTDHPkgW3FnN4ydBsjd5X2KuQI268DR3W3Ld64W/gkKPZrKRgUxeNeb+pykfP3qRe7q+vA==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz", + "integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==", "requires": { "tslib": "^2.1.0" } }, "@firebase/webchannel-wrapper": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.1.tgz", - "integrity": "sha512-9FqhNjKQWpQ3fGnSOCovHOm+yhhiorKEqYLAfd525jWavunDJcx8rOW6i6ozAh+FbwcYMkL7b+3j4UR/30MpoQ==" + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.1.tgz", + "integrity": "sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==" }, "@grpc/grpc-js": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.7.tgz", - "integrity": "sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", + "integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==", "requires": { - "@grpc/proto-loader": "^0.6.4", + "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" + }, + "dependencies": { + "@grpc/proto-loader": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", + "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "requires": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + } } }, "@grpc/proto-loader": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.12.tgz", - "integrity": "sha512-filTVbETFnxb9CyRX98zN18ilChTuf/C5scZ2xyaOTp0EHGq0/ufX8rjqXUcSb1Gpv7eZq4M2jDvbh9BogKnrg==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", "requires": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^6.10.0", + "protobufjs": "^6.11.3", "yargs": "^16.2.0" } }, @@ -19051,10 +19123,16 @@ "source-map": "^0.7.3" } }, + "@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" }, "@protobufjs/base64": { "version": "1.1.2", @@ -19069,12 +19147,12 @@ "@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", "requires": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -19083,27 +19161,27 @@ "@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" }, "@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" }, "@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" }, "@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" }, "@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "@rollup/plugin-babel": { "version": "5.3.1", @@ -20442,6 +20520,12 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, + "bootstrap": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.2.tgz", + "integrity": "sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==", + "requires": {} + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -22271,36 +22355,36 @@ } }, "firebase": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.0.tgz", - "integrity": "sha512-9du2Rvb+gvc4laqnazwmhzJyhw6slQ67ciP98MD/IGO1NmDNhu3cOohqxVm8P4LWYLTcBxlRL9puyXu0AIcspw==", - "requires": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-compat": "0.1.10", - "@firebase/app": "0.7.23", - "@firebase/app-check": "0.5.8", - "@firebase/app-check-compat": "0.2.8", - "@firebase/app-compat": "0.1.24", - "@firebase/app-types": "0.7.0", - "@firebase/auth": "0.20.0", - "@firebase/auth-compat": "0.2.13", - "@firebase/database": "0.13.0", - "@firebase/database-compat": "0.2.0", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-compat": "0.1.18", - "@firebase/functions": "0.8.1", - "@firebase/functions-compat": "0.2.1", - "@firebase/installations": "0.5.9", - "@firebase/messaging": "0.9.13", - "@firebase/messaging-compat": "0.1.13", - "@firebase/performance": "0.5.9", - "@firebase/performance-compat": "0.1.9", - "@firebase/polyfill": "0.3.36", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-compat": "0.1.9", - "@firebase/storage": "0.9.6", - "@firebase/storage-compat": "0.1.14", - "@firebase/util": "1.6.0" + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.23.0.tgz", + "integrity": "sha512-/4lUVY0lUvBDIaeY1q6dUYhS8Sd18Qb9CgWkPZICUo9IXpJNCEagfNZXBBFCkMTTN5L5gx2Hjr27y21a9NzUcA==", + "requires": { + "@firebase/analytics": "0.10.0", + "@firebase/analytics-compat": "0.2.6", + "@firebase/app": "0.9.13", + "@firebase/app-check": "0.8.0", + "@firebase/app-check-compat": "0.3.7", + "@firebase/app-compat": "0.2.13", + "@firebase/app-types": "0.9.0", + "@firebase/auth": "0.23.2", + "@firebase/auth-compat": "0.4.2", + "@firebase/database": "0.14.4", + "@firebase/database-compat": "0.3.4", + "@firebase/firestore": "3.13.0", + "@firebase/firestore-compat": "0.3.12", + "@firebase/functions": "0.10.0", + "@firebase/functions-compat": "0.3.5", + "@firebase/installations": "0.6.4", + "@firebase/installations-compat": "0.2.4", + "@firebase/messaging": "0.12.4", + "@firebase/messaging-compat": "0.2.4", + "@firebase/performance": "0.6.4", + "@firebase/performance-compat": "0.2.4", + "@firebase/remote-config": "0.4.4", + "@firebase/remote-config-compat": "0.2.4", + "@firebase/storage": "0.11.2", + "@firebase/storage-compat": "0.3.2", + "@firebase/util": "1.9.3" } }, "flat-cache": { @@ -22869,11 +22953,6 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" - }, "immer": { "version": "9.0.12", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", @@ -24752,41 +24831,6 @@ "object.assign": "^4.1.2" } }, - "jszip": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.9.1.tgz", - "integrity": "sha512-H9A60xPqJ1CuC4Ka6qxzXZeU8aNmgOeP5IFqwJbQQwtu2EUYxota3LdsiZWplF7Wgd9tkAd0mdu36nceSaPuYw==", - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -24829,14 +24873,6 @@ "type-check": "~0.4.0" } }, - "lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "requires": { - "immediate": "~3.0.5" - } - }, "lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -24878,7 +24914,7 @@ "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, "lodash.debounce": { "version": "4.0.8", @@ -25160,17 +25196,17 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -25396,11 +25432,6 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -26291,11 +26322,6 @@ "asap": "~2.0.6" } }, - "promise-polyfill": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", - "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==" - }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -26323,9 +26349,9 @@ } }, "protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -26970,16 +26996,6 @@ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, - "selenium-webdriver": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.1.1.tgz", - "integrity": "sha512-Fr9e9LC6zvD6/j7NO8M1M/NVxFX67abHcxDJoP5w2KN/Xb1SyYLjMVPGgD14U2TOiKe4XKHf42OmFw9g2JgCBQ==", - "requires": { - "jszip": "^3.6.0", - "tmp": "^0.2.1", - "ws": ">=7.4.6" - } - }, "selfsigned": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz", @@ -27117,11 +27133,6 @@ "send": "0.18.0" } }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -27703,14 +27714,6 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "requires": { - "rimraf": "^3.0.0" - } - }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", diff --git a/package.json b/package.json index 2dc401e..5b2c1a2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { - "firebase": "^9.8.0", + "bootstrap": "^5.3.2", + "firebase": "^9.23.0", "react": "^18.1.0", "react-dom": "^18.1.0", "react-scripts": "5.0.1" diff --git a/src/App.css b/src/App.css index 97b7c57..560b231 100644 --- a/src/App.css +++ b/src/App.css @@ -1,3 +1,4 @@ +/* Use your existing base styles */ .App { text-align: center; } @@ -15,5 +16,96 @@ align-items: center; justify-content: center; font-size: calc(10px + 2vmin); - color: white; + color: red; +} + +.chat-container { + display: flex; + flex-direction: column; +} + +/* New styles for the message structure */ +.message { + border-radius: 10px; + margin-bottom: 20px; /* Adjust the margin for spacing */ + max-width: 70%; /* Limit the width of the message */ + position: relative; + padding: 10px; /* Add padding for space around content */ +} + +.incoming { + background-color: rgb(79, 91, 213); + color: rgb(236, 229, 221); + align-self: flex-start; + margin-left: 200px; +} + +.outgoing { + background-color: rgb(250, 126, 30); + color: rgb(236, 229, 221); + align-self: flex-end; + margin-right: 200px; +} +.incoming button { + top: 5px; + right: 1px; /* Move the "X" button to the top left for incoming messages */ + margin-left: 0; /* Remove margin-left for the "X" button */ +} + +.outgoing button { + top: 5px; + left: 1px; /* Move the "X" button to the top right for outgoing messages */ + margin-right: 0; /* Remove margin-right for the "X" button */ +} + +.message button { + position: absolute; + font-size: 10px; /* Adjust the font size for buttons */ + background: none; + border: none; +} + +/* Adjust the date and time size and position */ +.message .message-metadata { + display: flex; + justify-content: flex-end; + font-size: 8px; /* Adjust the font size for metadata */ + margin-top: 5px; /* Add spacing between the message content and metadata */ +} + +.message .message-metadata .datetime { + margin-left: 5px; + color: black; +} + +.message .message-metadata .user { + font-size: 8px; /* Adjust the font size for username */ + margin-left: 5px; + color: black; +} + +/* Reduce the input box size */ +form input { + width: 100px; /* Adjust the width as needed */ + padding: 5px; /* Adjust the padding for the input */ +} + +/* Reduce the button size */ +form button { + font-size: 10px; /* Adjust the font size for buttons */ + padding: 5px 10px; /* Adjust the padding for buttons */ +} +form input { + width: 150px; /* Adjust the width as needed */ +} + +/* Adjust padding for the input boxes */ +form input[type="text"] { + padding: 1px; /* Adjust the padding as needed */ +} + +/* Reduce the width of the buttons */ +form button { + font-size: 10px; /* Adjust the font size for buttons */ + padding: 5px 8px; /* Adjust the padding for buttons */ } diff --git a/src/App.js b/src/App.js index 559142f..10b6b9c 100644 --- a/src/App.js +++ b/src/App.js @@ -1,60 +1,181 @@ -import React from "react"; -import { onChildAdded, push, ref, set } from "firebase/database"; -import { database } from "./firebase"; -import logo from "./logo.png"; +import React, { useState, useEffect } from "react"; import "./App.css"; +import { + onChildAdded, + onChildChanged, + onChildRemoved, + push, + ref, + set, + remove, +} from "firebase/database"; +import { database } from "./firebase"; -// Save the Firebase message folder name as a constant to avoid bugs due to misspelling const DB_MESSAGES_KEY = "messages"; -class App extends React.Component { - constructor(props) { - super(props); - // Initialise empty messages array in state to keep local state in sync with Firebase - // When Firebase changes, update local state, which will update local UI - this.state = { - messages: [], - }; - } +const App = () => { + const [messages, setMessages] = useState([]); + const [newMessage, setNewMessage] = useState(""); + const [incomingUsername, setIncomingUsername] = useState(""); + const [outgoingUsername, setOutgoingUsername] = useState(""); + const [isInputEnabled, setIsInputEnabled] = useState(false); - componentDidMount() { + useEffect(() => { + if (incomingUsername && outgoingUsername) { + setIsInputEnabled(true); + } else { + setIsInputEnabled(false); + } + }, [incomingUsername, outgoingUsername]); + + useEffect(() => { const messagesRef = ref(database, DB_MESSAGES_KEY); - // onChildAdded will return data for every child at the reference and every subsequent new child - onChildAdded(messagesRef, (data) => { - // Add the subsequent child to local component state, initialising a new array to trigger re-render - this.setState((state) => ({ - // Store message key so we can use it as a key in our list items when rendering messages - messages: [...state.messages, { key: data.key, val: data.val() }], - })); + const messagesAddedListener = onChildAdded(messagesRef, (data) => { + setMessages((prevMessages) => [ + ...prevMessages, + { + key: data.key, + message: data.val().message, + datetime: data.val().datetime, + user: data.val().user, + }, + ]); + }); + + const messagesChangedListener = onChildChanged(messagesRef, (data) => { + setMessages((prevMessages) => + prevMessages.map((message) => + message.key === data.key + ? { + key: data.key, + message: data.val().message, + datetime: data.val().datetime, + user: data.val().user, + } + : message + ) + ); }); - } - // Note use of array fields syntax to avoid having to manually bind this method to the class - writeData = () => { - const messageListRef = ref(database, DB_MESSAGES_KEY); - const newMessageRef = push(messageListRef); - set(newMessageRef, "abc"); + const messagesRemovedListener = onChildRemoved(messagesRef, (data) => { + setMessages((prevMessages) => + prevMessages.filter((message) => message.key !== data.key) + ); + }); + + return () => { + messagesAddedListener(); + messagesChangedListener(); + messagesRemovedListener(); + }; + }, []); + + const writeData = () => { + if (newMessage.trim() !== "") { + const messageListRef = ref(database, DB_MESSAGES_KEY); + const newMessageRef = push(messageListRef); + const datetime = new Date().toLocaleString(); + set(newMessageRef, { + message: newMessage, + datetime, + user: incomingUsername, + }); + setNewMessage(""); + } + }; + + const handleInputChange = (event) => { + setNewMessage(event.target.value); }; - render() { - // Convert messages in state to message JSX elements to render - let messageListItems = this.state.messages.map((message) => ( -
  • {message.val}
  • - )); - return ( -
    -
    - logo -

    - Edit src/App.js and save to reload. -

    - {/* TODO: Add input field and add text input as messages in Firebase */} - -
      {messageListItems}
    -
    -
    - ); - } -} + const handleIncomingUsernameChange = (event) => { + setIncomingUsername(event.target.value); + }; + + const handleOutgoingUsernameChange = (event) => { + setOutgoingUsername(event.target.value); + }; + + const handleSubmit = (event) => { + event.preventDefault(); + if (incomingUsername && outgoingUsername) { + writeData(); + } + }; + + const handleDeleteMessage = (messageKey) => { + const messageRef = ref(database, `${DB_MESSAGES_KEY}/${messageKey}`); + remove(messageRef); + }; + + const handleClearLog = () => { + // Clear all messages + setMessages([]); + }; + + return ( +
    +
    +

    Instagram Chat Rocket Academy Bootcamp

    + +
    + +
    + +
    + +
    + + +
    + +
    + {messages.map((message, index) => ( +
    + +
    {message.message}
    +
    + {message.datetime} + + {index % 2 === 0 ? incomingUsername : outgoingUsername} + +
    +
    + ))} +
    +
    +
    + ); +}; export default App; diff --git a/src/firebase.js b/src/firebase.js index 6855616..25a4c36 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -4,14 +4,13 @@ import { getDatabase } from "firebase/database"; // TODO: Replace with your app's Firebase project configuration const firebaseConfig = { - apiKey: "API_KEY", - authDomain: "PROJECT_ID.firebaseapp.com", - // The value of `databaseURL` depends on the location of the database - databaseURL: "https://DATABASE_NAME.REGION.firebasedatabase.app", - projectId: "PROJECT_ID", - storageBucket: "PROJECT_ID.appspot.com", - messagingSenderId: "SENDER_ID", - appId: "APP_ID", + apiKey: process.env.REACT_APP_API_KEY, + authDomain: process.env.REACT_APP_AUTH_DOMAIN, + databaseURL: process.env.REACT_APP_DATABASE_URL, + projectId: process.env.REACT_APP_PROJEC_ID, + storageBucket: process.env.REACT_APP_STORAGE_BUCKET, + messagingSenderId: process.env.REACT_APP_MESSAGING_SEANDER_ID, + appId: process.env.REACT_APP_APP_ID, }; // Initialize Firebase From 9b2c617a56112c409f353a6bff18030288e02a4b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Sep 2023 13:53:21 +0800 Subject: [PATCH 02/11] Add Username,password,button and authentication. --- src/App.css | 1 - src/App.js | 279 ++++++++++++++++++++++++++++++++++-------------- src/firebase.js | 6 +- 3 files changed, 202 insertions(+), 84 deletions(-) diff --git a/src/App.css b/src/App.css index 560b231..afd109a 100644 --- a/src/App.css +++ b/src/App.css @@ -1,4 +1,3 @@ -/* Use your existing base styles */ .App { text-align: center; } diff --git a/src/App.js b/src/App.js index 10b6b9c..eea6e28 100644 --- a/src/App.js +++ b/src/App.js @@ -8,25 +8,29 @@ import { ref, set, remove, + get, } from "firebase/database"; -import { database } from "./firebase"; +import { database, auth } from "./firebase"; +import { + createUserWithEmailAndPassword, + signInWithEmailAndPassword, + onAuthStateChanged, + signOut, + sendPasswordResetEmail as sendPasswordResetEmailFirebase, +} from "firebase/auth"; const DB_MESSAGES_KEY = "messages"; const App = () => { const [messages, setMessages] = useState([]); - const [newMessage, setNewMessage] = useState(""); - const [incomingUsername, setIncomingUsername] = useState(""); - const [outgoingUsername, setOutgoingUsername] = useState(""); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [newMessage, setNewMessage] = useState(""); // Define newMessage state const [isInputEnabled, setIsInputEnabled] = useState(false); - - useEffect(() => { - if (incomingUsername && outgoingUsername) { - setIsInputEnabled(true); - } else { - setIsInputEnabled(false); - } - }, [incomingUsername, outgoingUsername]); + const [user, setUser] = useState(null); + const [isLoggedIn, setIsLoggedIn] = useState(false); + const [showChat, setShowChat] = useState(false); // Control visibility of the chat + const [nickname, setNickname] = useState(""); // State for user's nickname useEffect(() => { const messagesRef = ref(database, DB_MESSAGES_KEY); @@ -63,13 +67,96 @@ const App = () => { ); }); + const authStateChangedListener = onAuthStateChanged(auth, async (user) => { + if (user) { + // Retrieve the user's nickname from the database + const userNicknameRef = ref(database, `users/${user.uid}/nickname`); + const userNicknameSnapshot = await get(userNicknameRef); + if (userNicknameSnapshot.exists()) { + setNickname(userNicknameSnapshot.val()); + } + + setUser(user); + setIsLoggedIn(true); + setIsInputEnabled(true); // Enable input when user is authenticated + setShowChat(true); // Show chat when user is authenticated + } else { + setUser(null); + setIsLoggedIn(false); + setIsInputEnabled(false); // Disable input when user is not authenticated + setShowChat(false); // Hide chat when user is not authenticated + } + }); + return () => { messagesAddedListener(); messagesChangedListener(); messagesRemovedListener(); + authStateChangedListener(); }; }, []); + const handleLogin = async () => { + try { + // Check if email and password are provided + if (!email || !password) { + throw new Error("Error: Please type in your username and password."); + } + + const userCredential = await signInWithEmailAndPassword( + auth, + email, + password + ); + const user = userCredential.user; + + // Retrieve the user's nickname from the database + const userNicknameRef = ref(database, `users/${user.uid}/nickname`); + const userNicknameSnapshot = await get(userNicknameRef); + if (userNicknameSnapshot.exists()) { + setNickname(userNicknameSnapshot.val()); + } + + alert("You have signed in."); + } catch (error) { + alert("Error Wrong Username or Password was typed in."); + } + }; + const handleLogout = async () => { + try { + await signOut(auth); + alert("User signed out"); // Change to alert + } catch (error) { + alert("Error signing out: " + error.message); // Change to alert + } + }; + + const handleSignup = async () => { + try { + const userCredential = await createUserWithEmailAndPassword( + auth, + email, + password + ); + const user = userCredential.user; + + // Set the user's nickname in the database + const userNicknameRef = ref(database, `users/${user.uid}/nickname`); + await set(userNicknameRef, nickname); + + alert("User signed up:", user); + } catch (error) { + alert("Error signing up:", error.message); + } + }; + + const handleSubmit = (event) => { + event.preventDefault(); + if (email && password) { + writeData(); + } + }; + const writeData = () => { if (newMessage.trim() !== "") { const messageListRef = ref(database, DB_MESSAGES_KEY); @@ -78,29 +165,22 @@ const App = () => { set(newMessageRef, { message: newMessage, datetime, - user: incomingUsername, + user: email, }); setNewMessage(""); } }; const handleInputChange = (event) => { - setNewMessage(event.target.value); + setNewMessage(event.target.value); // Update newMessage state }; - const handleIncomingUsernameChange = (event) => { - setIncomingUsername(event.target.value); + const handleEmailChange = (event) => { + setEmail(event.target.value); }; - const handleOutgoingUsernameChange = (event) => { - setOutgoingUsername(event.target.value); - }; - - const handleSubmit = (event) => { - event.preventDefault(); - if (incomingUsername && outgoingUsername) { - writeData(); - } + const handlePasswordChange = (event) => { + setPassword(event.target.value); }; const handleDeleteMessage = (messageKey) => { @@ -109,70 +189,107 @@ const App = () => { }; const handleClearLog = () => { - // Clear all messages + // Clear messages from the local state setMessages([]); + + // Clear messages from the Firebase Realtime Database + const messageListRef = ref(database, DB_MESSAGES_KEY); + remove(messageListRef); + }; + + const handleResetPassword = async () => { + try { + await sendPasswordResetEmailFirebase(auth, email); + alert("Password reset email sent to: " + email); + } catch (error) { + alert("Error sending password reset email:", error.message); + } }; return (

    Instagram Chat Rocket Academy Bootcamp

    - -
    - -
    - -
    - -
    - - -
    - -
    - {messages.map((message, index) => ( -
    + + {showChat && ( + <> +
    + {messages.map((message, index) => ( +
    + +
    {message.message}
    +
    + {message.datetime} + + {index % 2 === 0 ? nickname || email : password} + +
    +
    + ))} +
    +
    + + +
    +
    + + + )} + + ) : ( + <> + + +
    + setNickname(e.target.value)} + placeholder="Enter Nickname" + /> +
    + + + -
    {message.message}
    -
    - {message.datetime} - - {index % 2 === 0 ? incomingUsername : outgoingUsername} - -
    -
    - ))} -
    + Forget Password + + + )}
    ); diff --git a/src/firebase.js b/src/firebase.js index 25a4c36..0c6cc58 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -1,15 +1,16 @@ // Import the functions you need from the SDKs you need import { initializeApp } from "firebase/app"; import { getDatabase } from "firebase/database"; +import { getAuth } from "firebase/auth"; // TODO: Replace with your app's Firebase project configuration const firebaseConfig = { apiKey: process.env.REACT_APP_API_KEY, authDomain: process.env.REACT_APP_AUTH_DOMAIN, databaseURL: process.env.REACT_APP_DATABASE_URL, - projectId: process.env.REACT_APP_PROJEC_ID, + projectId: process.env.REACT_APP_PROJECT_ID, storageBucket: process.env.REACT_APP_STORAGE_BUCKET, - messagingSenderId: process.env.REACT_APP_MESSAGING_SEANDER_ID, + messagingSenderId: process.env.REACT_APP_MESSAGING_SENDER_ID, appId: process.env.REACT_APP_APP_ID, }; @@ -18,3 +19,4 @@ const firebaseApp = initializeApp(firebaseConfig); // Get a reference to the database service and export the reference for other modules export const database = getDatabase(firebaseApp); +export const auth = getAuth(firebaseApp); From 7266cdeea987e4dbd31d8912503be7726f8deb4a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Sep 2023 15:18:59 +0800 Subject: [PATCH 03/11] bug fixed --- src/App.css | 121 +++++++++++++----------- src/App.js | 260 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 216 insertions(+), 165 deletions(-) diff --git a/src/App.css b/src/App.css index afd109a..a9e2449 100644 --- a/src/App.css +++ b/src/App.css @@ -1,12 +1,9 @@ +/* Your existing styles */ + .App { text-align: center; } -.App-logo { - height: 40vmin; - pointer-events: none; -} - .App-header { background-color: #282c34; min-height: 100vh; @@ -23,88 +20,106 @@ flex-direction: column; } -/* New styles for the message structure */ +/* Your existing styles */ +/* Your existing styles */ + +body { + background-color: #f9f9f9; +} + +.chat-container { + max-width: 600px; + margin: 20px auto; +} + .message { + padding: 10px 15px; + margin: 5px; border-radius: 10px; - margin-bottom: 20px; /* Adjust the margin for spacing */ - max-width: 70%; /* Limit the width of the message */ + max-width: 70%; + word-wrap: break-word; position: relative; - padding: 10px; /* Add padding for space around content */ } .incoming { - background-color: rgb(79, 91, 213); - color: rgb(236, 229, 221); + background-color: #efefef; align-self: flex-start; - margin-left: 200px; } .outgoing { - background-color: rgb(250, 126, 30); - color: rgb(236, 229, 221); + background-color: #0084ff; + color: white; align-self: flex-end; - margin-right: 200px; } -.incoming button { + +.message .delete-button { + position: absolute; top: 5px; - right: 1px; /* Move the "X" button to the top left for incoming messages */ - margin-left: 0; /* Remove margin-left for the "X" button */ + right: 5px; + background: none; + border: none; + font-size: 12px; + cursor: pointer; } -.outgoing button { +.message .edit-button { + position: absolute; top: 5px; - left: 1px; /* Move the "X" button to the top right for outgoing messages */ - margin-right: 0; /* Remove margin-right for the "X" button */ + right: 25px; + background: none; + border: none; + font-size: 12px; + cursor: pointer; } .message button { - position: absolute; - font-size: 10px; /* Adjust the font size for buttons */ background: none; border: none; + font-size: 12px; + cursor: pointer; } -/* Adjust the date and time size and position */ -.message .message-metadata { +.message .metadata { display: flex; - justify-content: flex-end; - font-size: 8px; /* Adjust the font size for metadata */ - margin-top: 5px; /* Add spacing between the message content and metadata */ -} - -.message .message-metadata .datetime { - margin-left: 5px; - color: black; + justify-content: space-between; + align-items: center; + margin-top: 5px; } -.message .message-metadata .user { - font-size: 8px; /* Adjust the font size for username */ - margin-left: 5px; - color: black; +.message .metadata .datetime { + font-size: 10px; + color: #999; } -/* Reduce the input box size */ -form input { - width: 100px; /* Adjust the width as needed */ - padding: 5px; /* Adjust the padding for the input */ +.message .metadata .user { + font-size: 10px; + color: #999; } -/* Reduce the button size */ -form button { - font-size: 10px; /* Adjust the font size for buttons */ - padding: 5px 10px; /* Adjust the padding for buttons */ -} -form input { - width: 150px; /* Adjust the width as needed */ +form { + display: flex; + margin-top: 20px; } -/* Adjust padding for the input boxes */ form input[type="text"] { - padding: 1px; /* Adjust the padding as needed */ + flex: 1; + padding: 10px; + border-radius: 25px; + border: 1px solid #ccc; + font-size: 14px; } -/* Reduce the width of the buttons */ form button { - font-size: 10px; /* Adjust the font size for buttons */ - padding: 5px 8px; /* Adjust the padding for buttons */ + background-color: #0084ff; + border: none; + color: white; + padding: 10px 20px; + border-radius: 25px; + margin-left: 10px; + font-size: 14px; + cursor: pointer; +} + +form button:disabled { + background-color: #ccc; } diff --git a/src/App.js b/src/App.js index eea6e28..e4ece01 100644 --- a/src/App.js +++ b/src/App.js @@ -25,12 +25,13 @@ const App = () => { const [messages, setMessages] = useState([]); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); - const [newMessage, setNewMessage] = useState(""); // Define newMessage state + const [newMessage, setNewMessage] = useState(""); const [isInputEnabled, setIsInputEnabled] = useState(false); const [user, setUser] = useState(null); const [isLoggedIn, setIsLoggedIn] = useState(false); - const [showChat, setShowChat] = useState(false); // Control visibility of the chat - const [nickname, setNickname] = useState(""); // State for user's nickname + const [showChat, setShowChat] = useState(false); + const [nickname, setNickname] = useState(""); + const [isNicknameSet, setIsNicknameSet] = useState(false); useEffect(() => { const messagesRef = ref(database, DB_MESSAGES_KEY); @@ -69,22 +70,22 @@ const App = () => { const authStateChangedListener = onAuthStateChanged(auth, async (user) => { if (user) { - // Retrieve the user's nickname from the database const userNicknameRef = ref(database, `users/${user.uid}/nickname`); const userNicknameSnapshot = await get(userNicknameRef); if (userNicknameSnapshot.exists()) { setNickname(userNicknameSnapshot.val()); + setIsNicknameSet(true); } setUser(user); setIsLoggedIn(true); - setIsInputEnabled(true); // Enable input when user is authenticated - setShowChat(true); // Show chat when user is authenticated + setIsInputEnabled(true); + setShowChat(true); } else { setUser(null); setIsLoggedIn(false); - setIsInputEnabled(false); // Disable input when user is not authenticated - setShowChat(false); // Hide chat when user is not authenticated + setIsInputEnabled(false); + setShowChat(false); } }); @@ -96,9 +97,28 @@ const App = () => { }; }, []); + const handleSignup = async () => { + try { + const userCredential = await createUserWithEmailAndPassword( + auth, + email, + password + ); + const user = userCredential.user; + + const userNicknameRef = ref(database, `users/${user.uid}/nickname`); + await set(userNicknameRef, nickname); + + setIsNicknameSet(true); + + alert("User signed up:", user); + } catch (error) { + alert("Error signing up:", error.message); + } + }; + const handleLogin = async () => { try { - // Check if email and password are provided if (!email || !password) { throw new Error("Error: Please type in your username and password."); } @@ -110,11 +130,11 @@ const App = () => { ); const user = userCredential.user; - // Retrieve the user's nickname from the database const userNicknameRef = ref(database, `users/${user.uid}/nickname`); const userNicknameSnapshot = await get(userNicknameRef); if (userNicknameSnapshot.exists()) { setNickname(userNicknameSnapshot.val()); + setIsNicknameSet(true); } alert("You have signed in."); @@ -122,32 +142,17 @@ const App = () => { alert("Error Wrong Username or Password was typed in."); } }; - const handleLogout = async () => { - try { - await signOut(auth); - alert("User signed out"); // Change to alert - } catch (error) { - alert("Error signing out: " + error.message); // Change to alert - } - }; - const handleSignup = async () => { - try { - const userCredential = await createUserWithEmailAndPassword( - auth, - email, - password - ); - const user = userCredential.user; + const handleNicknameEdit = () => { + setIsNicknameSet(false); + }; - // Set the user's nickname in the database - const userNicknameRef = ref(database, `users/${user.uid}/nickname`); - await set(userNicknameRef, nickname); + const handleNicknameSave = () => { + setIsNicknameSet(true); - alert("User signed up:", user); - } catch (error) { - alert("Error signing up:", error.message); - } + // Save the nickname to the database + const userNicknameRef = ref(database, `users/${user.uid}/nickname`); + set(userNicknameRef, nickname); }; const handleSubmit = (event) => { @@ -172,7 +177,7 @@ const App = () => { }; const handleInputChange = (event) => { - setNewMessage(event.target.value); // Update newMessage state + setNewMessage(event.target.value); }; const handleEmailChange = (event) => { @@ -189,14 +194,21 @@ const App = () => { }; const handleClearLog = () => { - // Clear messages from the local state setMessages([]); - // Clear messages from the Firebase Realtime Database const messageListRef = ref(database, DB_MESSAGES_KEY); remove(messageListRef); }; + const handleLogout = async () => { + try { + await signOut(auth); + alert("User signed out"); + } catch (error) { + alert("Error signing out: " + error.message); + } + }; + const handleResetPassword = async () => { try { await sendPasswordResetEmailFirebase(auth, email); @@ -206,90 +218,114 @@ const App = () => { } }; + const handleEditMessage = (messageKey, editedMessage) => { + const messageRef = ref( + database, + `${DB_MESSAGES_KEY}/${messageKey}/message` + ); + set(messageRef, editedMessage); + }; + return (

    Instagram Chat Rocket Academy Bootcamp

    - {isLoggedIn ? ( - <> - - {showChat && ( - <> -
    - {messages.map((message, index) => ( -
    - -
    {message.message}
    -
    - {message.datetime} - - {index % 2 === 0 ? nickname || email : password} - +
    + {isLoggedIn ? ( + <> + {isNicknameSet ? ( + <> + +
    + {messages.map((message, index) => ( +
    +
    + + +
    +
    + {message.message} +
    + + {message.datetime} +   + {index % 2 === 0 ? nickname || email : password} + +
    -
    - ))} -
    -
    + ))} +
    + + + +
    + + + + ) : ( + <> setNickname(e.target.value)} + placeholder="Enter Nickname" /> - -
    - - - - )} - - ) : ( - <> - - -
    - setNickname(e.target.value)} - placeholder="Enter Nickname" - /> -
    - - - - - )} + + + )} + + ) : ( + <> + + +
    + + +
    + + + + + )} +
    ); From da3055309370e229dd5f444a9985898e387506f9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Sep 2023 15:56:30 +0800 Subject: [PATCH 04/11] edit Nickname --- src/App.js | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index e4ece01..3cb77e8 100644 --- a/src/App.js +++ b/src/App.js @@ -1,3 +1,4 @@ +// Import necessary modules and functions import React, { useState, useEffect } from "react"; import "./App.css"; import { @@ -19,9 +20,12 @@ import { sendPasswordResetEmail as sendPasswordResetEmailFirebase, } from "firebase/auth"; +// Key for messages in the database const DB_MESSAGES_KEY = "messages"; +// Define the main component const App = () => { + // State variables to manage different aspects of the app const [messages, setMessages] = useState([]); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -33,8 +37,12 @@ const App = () => { const [nickname, setNickname] = useState(""); const [isNicknameSet, setIsNicknameSet] = useState(false); + // Effect hook to handle component mounting and unmounting useEffect(() => { + // Firebase database reference for messages const messagesRef = ref(database, DB_MESSAGES_KEY); + + // Event listeners for database changes const messagesAddedListener = onChildAdded(messagesRef, (data) => { setMessages((prevMessages) => [ ...prevMessages, @@ -89,14 +97,16 @@ const App = () => { } }); + // Clean up event listeners on component unmount return () => { messagesAddedListener(); messagesChangedListener(); messagesRemovedListener(); authStateChangedListener(); }; - }, []); + }, []); // Empty dependency array means this effect runs only once on mount + // Handler for user signup const handleSignup = async () => { try { const userCredential = await createUserWithEmailAndPassword( @@ -117,6 +127,7 @@ const App = () => { } }; + // Handler for user login const handleLogin = async () => { try { if (!email || !password) { @@ -143,10 +154,12 @@ const App = () => { } }; + // Handler to enable nickname editing const handleNicknameEdit = () => { setIsNicknameSet(false); }; + // Handler to save edited nickname const handleNicknameSave = () => { setIsNicknameSet(true); @@ -155,6 +168,7 @@ const App = () => { set(userNicknameRef, nickname); }; + // Handler for message submission const handleSubmit = (event) => { event.preventDefault(); if (email && password) { @@ -162,6 +176,7 @@ const App = () => { } }; + // Write new message data to the database const writeData = () => { if (newMessage.trim() !== "") { const messageListRef = ref(database, DB_MESSAGES_KEY); @@ -176,23 +191,28 @@ const App = () => { } }; + // Handler for input change in the new message input field const handleInputChange = (event) => { setNewMessage(event.target.value); }; + // Handler for input change in the email input field const handleEmailChange = (event) => { setEmail(event.target.value); }; + // Handler for input change in the password input field const handlePasswordChange = (event) => { setPassword(event.target.value); }; + // Handler to delete a message const handleDeleteMessage = (messageKey) => { const messageRef = ref(database, `${DB_MESSAGES_KEY}/${messageKey}`); remove(messageRef); }; + // Handler to clear the message log const handleClearLog = () => { setMessages([]); @@ -200,6 +220,7 @@ const App = () => { remove(messageListRef); }; + // Handler to log out the user const handleLogout = async () => { try { await signOut(auth); @@ -209,6 +230,7 @@ const App = () => { } }; + // Handler to send a password reset email const handleResetPassword = async () => { try { await sendPasswordResetEmailFirebase(auth, email); @@ -218,6 +240,7 @@ const App = () => { } }; + // Handler to edit a message const handleEditMessage = (messageKey, editedMessage) => { const messageRef = ref( database, @@ -226,6 +249,7 @@ const App = () => { set(messageRef, editedMessage); }; + // Render the main component return (
    @@ -236,6 +260,10 @@ const App = () => { {isNicknameSet ? ( <> + {" "} + {/* Moved here */}
    {messages.map((message, index) => (
    @@ -258,7 +286,7 @@ const App = () => { className="delete-button" onClick={() => handleDeleteMessage(message.key)} > - X + ❌
    From 52c78c9e4182a99dbb13c7562fc83ad5901c94ff Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Sep 2023 16:03:08 +0800 Subject: [PATCH 05/11] bug fixed --- src/App.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/App.js b/src/App.js index 3cb77e8..ec5bad6 100644 --- a/src/App.js +++ b/src/App.js @@ -33,7 +33,6 @@ const App = () => { const [isInputEnabled, setIsInputEnabled] = useState(false); const [user, setUser] = useState(null); const [isLoggedIn, setIsLoggedIn] = useState(false); - const [showChat, setShowChat] = useState(false); const [nickname, setNickname] = useState(""); const [isNicknameSet, setIsNicknameSet] = useState(false); @@ -88,12 +87,12 @@ const App = () => { setUser(user); setIsLoggedIn(true); setIsInputEnabled(true); - setShowChat(true); + // Removed setShowChat as it was not being used } else { setUser(null); setIsLoggedIn(false); setIsInputEnabled(false); - setShowChat(false); + // Removed setShowChat as it was not being used } }); @@ -175,19 +174,22 @@ const App = () => { writeData(); } }; - - // Write new message data to the database const writeData = () => { if (newMessage.trim() !== "") { const messageListRef = ref(database, DB_MESSAGES_KEY); const newMessageRef = push(messageListRef); const datetime = new Date().toLocaleString(); - set(newMessageRef, { - message: newMessage, - datetime, - user: email, - }); - setNewMessage(""); + + try { + set(newMessageRef, { + message: newMessage, + datetime, + user: email, + }); + setNewMessage(""); + } catch (error) { + console.error("Error writing message:", error); + } } }; From 20eb3b1e86a6d10278c0738d7b27d24ef5702b53 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Sep 2023 16:16:42 +0800 Subject: [PATCH 06/11] bug fix --- src/App.css | 1 - src/App.js | 21 +++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/App.css b/src/App.css index a9e2449..5e5db10 100644 --- a/src/App.css +++ b/src/App.css @@ -20,7 +20,6 @@ flex-direction: column; } -/* Your existing styles */ /* Your existing styles */ body { diff --git a/src/App.js b/src/App.js index ec5bad6..cb6c1b8 100644 --- a/src/App.js +++ b/src/App.js @@ -36,6 +36,9 @@ const App = () => { const [nickname, setNickname] = useState(""); const [isNicknameSet, setIsNicknameSet] = useState(false); + // Assuming you have the UID of the current user + const currentUserUID = "uid_of_current_user"; // Replace this with the actual UID + // Effect hook to handle component mounting and unmounting useEffect(() => { // Firebase database reference for messages @@ -170,10 +173,11 @@ const App = () => { // Handler for message submission const handleSubmit = (event) => { event.preventDefault(); - if (email && password) { + if (newMessage.trim() !== "") { writeData(); } }; + const writeData = () => { if (newMessage.trim() !== "") { const messageListRef = ref(database, DB_MESSAGES_KEY); @@ -184,7 +188,7 @@ const App = () => { set(newMessageRef, { message: newMessage, datetime, - user: email, + user: currentUserUID, // Modified to use currentUserUID }); setNewMessage(""); } catch (error) { @@ -268,7 +272,14 @@ const App = () => { {/* Moved here */}
    {messages.map((message, index) => ( -
    +
    From d57007f6e368104a6db9ab3862fdc9e02263c205 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Oct 2023 14:09:13 +0800 Subject: [PATCH 07/11] bug fixed --- src/App.css | 6 ++++-- src/App.js | 11 +++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/App.css b/src/App.css index 5e5db10..4d10403 100644 --- a/src/App.css +++ b/src/App.css @@ -20,7 +20,7 @@ flex-direction: column; } -/* Your existing styles */ +/* New styles for the chat application */ body { background-color: #f9f9f9; @@ -41,7 +41,9 @@ body { } .incoming { - background-color: #efefef; + color: #0084ff; + background-color: white; + align-self: flex-start; } diff --git a/src/App.js b/src/App.js index cb6c1b8..0462c70 100644 --- a/src/App.js +++ b/src/App.js @@ -36,9 +36,6 @@ const App = () => { const [nickname, setNickname] = useState(""); const [isNicknameSet, setIsNicknameSet] = useState(false); - // Assuming you have the UID of the current user - const currentUserUID = "uid_of_current_user"; // Replace this with the actual UID - // Effect hook to handle component mounting and unmounting useEffect(() => { // Firebase database reference for messages @@ -188,7 +185,7 @@ const App = () => { set(newMessageRef, { message: newMessage, datetime, - user: currentUserUID, // Modified to use currentUserUID + user: user.uid, // Modified to use user.uid }); setNewMessage(""); } catch (error) { @@ -275,9 +272,7 @@ const App = () => {
    @@ -308,7 +303,7 @@ const App = () => { {message.datetime}   - {message.user === currentUserUID + {message.user === user.uid ? nickname || email : "Other User"} From c677dd5dfabfceb02f93aceb0268bdcecae55b73 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 4 Oct 2023 10:23:26 +0800 Subject: [PATCH 08/11] bug fixed and completed --- src/App.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/App.js b/src/App.js index 0462c70..497ea6a 100644 --- a/src/App.js +++ b/src/App.js @@ -266,7 +266,6 @@ const App = () => { {" "} - {/* Moved here */}
    {messages.map((message, index) => (
    Date: Thu, 5 Oct 2023 15:07:15 +0800 Subject: [PATCH 09/11] Split code into components --- package-lock.json | 61 ++++++++++++++++ package.json | 1 + src/App.css | 116 +----------------------------- src/App.js | 127 ++++++++------------------------- src/ChatContainer.css | 10 +++ src/ChatInput.css | 28 ++++++++ src/Component/ChatContainer.js | 21 ++++++ src/Component/ChatInput.js | 22 ++++++ src/Component/Message.js | 38 ++++++++++ src/Message.css | 64 +++++++++++++++++ 10 files changed, 277 insertions(+), 211 deletions(-) create mode 100644 src/ChatContainer.css create mode 100644 src/ChatInput.css create mode 100644 src/Component/ChatContainer.js create mode 100644 src/Component/ChatInput.js create mode 100644 src/Component/Message.js create mode 100644 src/Message.css diff --git a/package-lock.json b/package-lock.json index 2f8dfde..7ae9a86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "firebase": "^9.23.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-router-dom": "^6.16.0", "react-scripts": "5.0.1" } }, @@ -3538,6 +3539,14 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@remix-run/router": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.9.0.tgz", + "integrity": "sha512-bV63itrKBC0zdT27qYm6SDZHlkXwFL1xMBuhkn+X7l0+IIhNaH5wuuvZKp6eKhCD4KFhujhfhCT1YxXW6esUIA==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -13913,6 +13922,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz", + "integrity": "sha512-VT4Mmc4jj5YyjpOi5jOf0I+TYzGpvzERy4ckNSvSh2RArv8LLoCxlsZ2D+tc7zgjxcY34oTz2hZaeX5RVprKqA==", + "dependencies": { + "@remix-run/router": "1.9.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.16.0.tgz", + "integrity": "sha512-aTfBLv3mk/gaKLxgRDUPbPw+s4Y/O+ma3rEN1u8EgEpLpPe6gNjIsWt9rxushMHHMb7mSwxRGdGlGdvmFsyPIg==", + "dependencies": { + "@remix-run/router": "1.9.0", + "react-router": "6.16.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -19183,6 +19222,11 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "@remix-run/router": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.9.0.tgz", + "integrity": "sha512-bV63itrKBC0zdT27qYm6SDZHlkXwFL1xMBuhkn+X7l0+IIhNaH5wuuvZKp6eKhCD4KFhujhfhCT1YxXW6esUIA==" + }, "@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -26595,6 +26639,23 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" }, + "react-router": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz", + "integrity": "sha512-VT4Mmc4jj5YyjpOi5jOf0I+TYzGpvzERy4ckNSvSh2RArv8LLoCxlsZ2D+tc7zgjxcY34oTz2hZaeX5RVprKqA==", + "requires": { + "@remix-run/router": "1.9.0" + } + }, + "react-router-dom": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.16.0.tgz", + "integrity": "sha512-aTfBLv3mk/gaKLxgRDUPbPw+s4Y/O+ma3rEN1u8EgEpLpPe6gNjIsWt9rxushMHHMb7mSwxRGdGlGdvmFsyPIg==", + "requires": { + "@remix-run/router": "1.9.0", + "react-router": "6.16.0" + } + }, "react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 5b2c1a2..498735a 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "firebase": "^9.23.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-router-dom": "^6.16.0", "react-scripts": "5.0.1" }, "scripts": { diff --git a/src/App.css b/src/App.css index 4d10403..6824d74 100644 --- a/src/App.css +++ b/src/App.css @@ -1,126 +1,14 @@ -/* Your existing styles */ - +/* App.css */ .App { text-align: center; } .App-header { - background-color: #282c34; + background-color: skyblue; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); - color: red; -} - -.chat-container { - display: flex; - flex-direction: column; -} - -/* New styles for the chat application */ - -body { - background-color: #f9f9f9; -} - -.chat-container { - max-width: 600px; - margin: 20px auto; -} - -.message { - padding: 10px 15px; - margin: 5px; - border-radius: 10px; - max-width: 70%; - word-wrap: break-word; - position: relative; -} - -.incoming { - color: #0084ff; - background-color: white; - - align-self: flex-start; -} - -.outgoing { - background-color: #0084ff; - color: white; - align-self: flex-end; -} - -.message .delete-button { - position: absolute; - top: 5px; - right: 5px; - background: none; - border: none; - font-size: 12px; - cursor: pointer; -} - -.message .edit-button { - position: absolute; - top: 5px; - right: 25px; - background: none; - border: none; - font-size: 12px; - cursor: pointer; -} - -.message button { - background: none; - border: none; - font-size: 12px; - cursor: pointer; -} - -.message .metadata { - display: flex; - justify-content: space-between; - align-items: center; - margin-top: 5px; -} - -.message .metadata .datetime { - font-size: 10px; - color: #999; -} - -.message .metadata .user { - font-size: 10px; - color: #999; -} - -form { - display: flex; - margin-top: 20px; -} - -form input[type="text"] { - flex: 1; - padding: 10px; - border-radius: 25px; - border: 1px solid #ccc; - font-size: 14px; -} - -form button { - background-color: #0084ff; - border: none; - color: white; - padding: 10px 20px; - border-radius: 25px; - margin-left: 10px; - font-size: 14px; - cursor: pointer; -} - -form button:disabled { - background-color: #ccc; } diff --git a/src/App.js b/src/App.js index 497ea6a..519e6f6 100644 --- a/src/App.js +++ b/src/App.js @@ -1,16 +1,10 @@ -// Import necessary modules and functions +// App.js import React, { useState, useEffect } from "react"; import "./App.css"; -import { - onChildAdded, - onChildChanged, - onChildRemoved, - push, - ref, - set, - remove, - get, -} from "firebase/database"; +import "./ChatContainer.css"; +import "./ChatInput.css"; +import "./Message.css"; +import { get, push, ref, remove, set } from "firebase/database"; import { database, auth } from "./firebase"; import { createUserWithEmailAndPassword, @@ -19,13 +13,18 @@ import { signOut, sendPasswordResetEmail as sendPasswordResetEmailFirebase, } from "firebase/auth"; +import Message from "./Component/Message"; +import ChatContainer from "./Component/ChatContainer"; +import ChatInput from "./Component/ChatInput"; +import { + onChildAdded, + onChildChanged, + onChildRemoved, +} from "firebase/database"; -// Key for messages in the database const DB_MESSAGES_KEY = "messages"; -// Define the main component const App = () => { - // State variables to manage different aspects of the app const [messages, setMessages] = useState([]); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -36,12 +35,9 @@ const App = () => { const [nickname, setNickname] = useState(""); const [isNicknameSet, setIsNicknameSet] = useState(false); - // Effect hook to handle component mounting and unmounting useEffect(() => { - // Firebase database reference for messages const messagesRef = ref(database, DB_MESSAGES_KEY); - // Event listeners for database changes const messagesAddedListener = onChildAdded(messagesRef, (data) => { setMessages((prevMessages) => [ ...prevMessages, @@ -87,25 +83,21 @@ const App = () => { setUser(user); setIsLoggedIn(true); setIsInputEnabled(true); - // Removed setShowChat as it was not being used } else { setUser(null); setIsLoggedIn(false); setIsInputEnabled(false); - // Removed setShowChat as it was not being used } }); - // Clean up event listeners on component unmount return () => { messagesAddedListener(); messagesChangedListener(); messagesRemovedListener(); authStateChangedListener(); }; - }, []); // Empty dependency array means this effect runs only once on mount + }, []); - // Handler for user signup const handleSignup = async () => { try { const userCredential = await createUserWithEmailAndPassword( @@ -126,7 +118,6 @@ const App = () => { } }; - // Handler for user login const handleLogin = async () => { try { if (!email || !password) { @@ -153,21 +144,17 @@ const App = () => { } }; - // Handler to enable nickname editing const handleNicknameEdit = () => { setIsNicknameSet(false); }; - // Handler to save edited nickname const handleNicknameSave = () => { setIsNicknameSet(true); - // Save the nickname to the database const userNicknameRef = ref(database, `users/${user.uid}/nickname`); set(userNicknameRef, nickname); }; - // Handler for message submission const handleSubmit = (event) => { event.preventDefault(); if (newMessage.trim() !== "") { @@ -185,7 +172,7 @@ const App = () => { set(newMessageRef, { message: newMessage, datetime, - user: user.uid, // Modified to use user.uid + user: user.uid, }); setNewMessage(""); } catch (error) { @@ -194,28 +181,23 @@ const App = () => { } }; - // Handler for input change in the new message input field const handleInputChange = (event) => { setNewMessage(event.target.value); }; - // Handler for input change in the email input field const handleEmailChange = (event) => { setEmail(event.target.value); }; - // Handler for input change in the password input field const handlePasswordChange = (event) => { setPassword(event.target.value); }; - // Handler to delete a message const handleDeleteMessage = (messageKey) => { const messageRef = ref(database, `${DB_MESSAGES_KEY}/${messageKey}`); remove(messageRef); }; - // Handler to clear the message log const handleClearLog = () => { setMessages([]); @@ -223,7 +205,6 @@ const App = () => { remove(messageListRef); }; - // Handler to log out the user const handleLogout = async () => { try { await signOut(auth); @@ -233,7 +214,6 @@ const App = () => { } }; - // Handler to send a password reset email const handleResetPassword = async () => { try { await sendPasswordResetEmailFirebase(auth, email); @@ -243,7 +223,6 @@ const App = () => { } }; - // Handler to edit a message const handleEditMessage = (messageKey, editedMessage) => { const messageRef = ref( database, @@ -252,7 +231,6 @@ const App = () => { set(messageRef, editedMessage); }; - // Render the main component return (
    @@ -263,66 +241,21 @@ const App = () => { {isNicknameSet ? ( <> - {" "} -
    - {messages.map((message, index) => ( -
    -
    - - -
    -
    - {message.message} -
    - - {message.datetime} -   - {message.user === user.uid - ? nickname || email - : "Other User"} - -
    -
    - ))} -
    -
    - - -
    -
    + + + + ) : ( diff --git a/src/ChatContainer.css b/src/ChatContainer.css new file mode 100644 index 0000000..b6687bb --- /dev/null +++ b/src/ChatContainer.css @@ -0,0 +1,10 @@ +/* ChatContainer.css */ +.chat-container { + max-width: 600px; + margin: 20px auto; +} + +.chat-container { + display: flex; + flex-direction: column; +} diff --git a/src/ChatInput.css b/src/ChatInput.css new file mode 100644 index 0000000..f47b0ca --- /dev/null +++ b/src/ChatInput.css @@ -0,0 +1,28 @@ +/* ChatInput.css */ +form { + display: flex; + margin-top: 20px; +} + +form input[type="text"] { + flex: 1; + padding: 10px; + border-radius: 25px; + border: 1px solid white; + font-size: 14px; +} + +form button { + background-color: #0084ff; + border: none; + color: white; + padding: 10px 20px; + border-radius: 25px; + margin-left: 10px; + font-size: 14px; + cursor: pointer; +} + +form button:disabled { + background-color: white; +} diff --git a/src/Component/ChatContainer.js b/src/Component/ChatContainer.js new file mode 100644 index 0000000..ce7bf23 --- /dev/null +++ b/src/Component/ChatContainer.js @@ -0,0 +1,21 @@ +// ChatContainer.js +import React from "react"; +import Message from "./Message"; + +const ChatContainer = ({ messages, user, onDeleteMessage, onEditMessage }) => { + return ( +
    + {messages.map((message) => ( + + ))} +
    + ); +}; + +export default ChatContainer; diff --git a/src/Component/ChatInput.js b/src/Component/ChatInput.js new file mode 100644 index 0000000..4a1401d --- /dev/null +++ b/src/Component/ChatInput.js @@ -0,0 +1,22 @@ +// ChatInput.js +import React from "react"; + +const ChatInput = ({ newMessage, onInputChange, onSubmit, isInputEnabled }) => { + return ( +
    + + +
    +
    + ); +}; + +export default ChatInput; diff --git a/src/Component/Message.js b/src/Component/Message.js new file mode 100644 index 0000000..913d34f --- /dev/null +++ b/src/Component/Message.js @@ -0,0 +1,38 @@ +// Message.js +import React from "react"; + +const Message = ({ message, user, onDelete, onEdit }) => { + return ( +
    +
    +
    + + +
    +
    {message.message}
    +
    + {message.datetime}   + {message.user === user.uid + ? user.nickname || user.email + : "Other User"} +
    +
    +
    + ); +}; + +export default Message; diff --git a/src/Message.css b/src/Message.css new file mode 100644 index 0000000..43ffd4e --- /dev/null +++ b/src/Message.css @@ -0,0 +1,64 @@ +/* Styles for the message container */ +.message { + display: flex; + align-items: center; + margin: 10px 0; +} + +/* Styles for the message content */ +.message-content { + display: flex; + flex-direction: column; + padding: 10px; + border-radius: 10px; + max-width: 70%; + word-wrap: break-word; + background-color: #f0f0f0; + border: 1px solid #e0e0e0; +} + +/* Styles for the delete and edit buttons */ +.message .message-content .message-buttons { + display: flex; + justify-content: flex-end; + margin-bottom: 5px; +} + +.message .message-content .delete-button { + margin-left: 10px; + background: none; + border: none; + font-size: 14px; + color: white; + cursor: pointer; +} + +.message .message-content .delete-button:hover { + color: #ff0000; +} + +.message .message-content .edit-button { + background: none; + border: none; + font-size: 14px; + color: #808080; + cursor: pointer; +} + +.message .message-content .edit-button:hover { + color: #0084ff; +} + +/* Styles for the message text */ +.message .message-content .message-text { + margin-bottom: 5px; +} + +/* Styles for the message metadata */ +.message .message-content .message-metadata { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 12px; + color: #808080; +} From dbe5dfba933a8bcdb5a10830b2753d829f1b5c45 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Oct 2023 15:39:14 +0800 Subject: [PATCH 10/11] Add router --- src/App.js | 182 ++++++++++++--------------------- src/Component/DeleteAccount.js | 28 +++++ 2 files changed, 92 insertions(+), 118 deletions(-) create mode 100644 src/Component/DeleteAccount.js diff --git a/src/App.js b/src/App.js index 519e6f6..9f2e828 100644 --- a/src/App.js +++ b/src/App.js @@ -1,9 +1,5 @@ -// App.js import React, { useState, useEffect } from "react"; -import "./App.css"; -import "./ChatContainer.css"; -import "./ChatInput.css"; -import "./Message.css"; +import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { get, push, ref, remove, set } from "firebase/database"; import { database, auth } from "./firebase"; import { @@ -21,6 +17,10 @@ import { onChildChanged, onChildRemoved, } from "firebase/database"; +import "./App.css"; +import "./ChatContainer.css"; +import "./ChatInput.css"; +import "./Message.css"; const DB_MESSAGES_KEY = "messages"; @@ -32,8 +32,6 @@ const App = () => { const [isInputEnabled, setIsInputEnabled] = useState(false); const [user, setUser] = useState(null); const [isLoggedIn, setIsLoggedIn] = useState(false); - const [nickname, setNickname] = useState(""); - const [isNicknameSet, setIsNicknameSet] = useState(false); useEffect(() => { const messagesRef = ref(database, DB_MESSAGES_KEY); @@ -73,13 +71,6 @@ const App = () => { const authStateChangedListener = onAuthStateChanged(auth, async (user) => { if (user) { - const userNicknameRef = ref(database, `users/${user.uid}/nickname`); - const userNicknameSnapshot = await get(userNicknameRef); - if (userNicknameSnapshot.exists()) { - setNickname(userNicknameSnapshot.val()); - setIsNicknameSet(true); - } - setUser(user); setIsLoggedIn(true); setIsInputEnabled(true); @@ -100,19 +91,8 @@ const App = () => { const handleSignup = async () => { try { - const userCredential = await createUserWithEmailAndPassword( - auth, - email, - password - ); - const user = userCredential.user; - - const userNicknameRef = ref(database, `users/${user.uid}/nickname`); - await set(userNicknameRef, nickname); - - setIsNicknameSet(true); - - alert("User signed up:", user); + await createUserWithEmailAndPassword(auth, email, password); + alert("User signed up successfully!"); } catch (error) { alert("Error signing up:", error.message); } @@ -124,37 +104,13 @@ const App = () => { throw new Error("Error: Please type in your username and password."); } - const userCredential = await signInWithEmailAndPassword( - auth, - email, - password - ); - const user = userCredential.user; - - const userNicknameRef = ref(database, `users/${user.uid}/nickname`); - const userNicknameSnapshot = await get(userNicknameRef); - if (userNicknameSnapshot.exists()) { - setNickname(userNicknameSnapshot.val()); - setIsNicknameSet(true); - } - + await signInWithEmailAndPassword(auth, email, password); alert("You have signed in."); } catch (error) { - alert("Error Wrong Username or Password was typed in."); + alert("Error: Wrong Username or Password was typed in."); } }; - const handleNicknameEdit = () => { - setIsNicknameSet(false); - }; - - const handleNicknameSave = () => { - setIsNicknameSet(true); - - const userNicknameRef = ref(database, `users/${user.uid}/nickname`); - set(userNicknameRef, nickname); - }; - const handleSubmit = (event) => { event.preventDefault(); if (newMessage.trim() !== "") { @@ -200,7 +156,6 @@ const App = () => { const handleClearLog = () => { setMessages([]); - const messageListRef = ref(database, DB_MESSAGES_KEY); remove(messageListRef); }; @@ -233,70 +188,61 @@ const App = () => { return (
    -
    -

    Instagram Chat Rocket Academy Bootcamp

    -
    - {isLoggedIn ? ( - <> - {isNicknameSet ? ( - <> - - - - - - - - ) : ( - <> - setNickname(e.target.value)} - placeholder="Enter Nickname" - /> - - - )} - - ) : ( - <> - - -
    - - -
    - - - - - )} -
    -
    + +
    + + + + + +

    + + + ) : ( + <> + + +
    + + +
    + + + + + ) + } + /> +
    +
    +
    ); }; diff --git a/src/Component/DeleteAccount.js b/src/Component/DeleteAccount.js new file mode 100644 index 0000000..24f86d5 --- /dev/null +++ b/src/Component/DeleteAccount.js @@ -0,0 +1,28 @@ +// DeleteAccount.js +import React, { useState } from "react"; + +const DeleteAccount = ({ onDeleteAccount }) => { + const [isConfirmationVisible, setIsConfirmationVisible] = useState(false); + + const handleDelete = () => { + onDeleteAccount(); + }; + + return ( +
    + {isConfirmationVisible ? ( +
    + Are you sure you want to delete your account? + + +
    + ) : ( + + )} +
    + ); +}; + +export default DeleteAccount; From 3a291e30fb4ff4a736a3ef91b4720dec9467637b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 6 Oct 2023 07:45:09 +0800 Subject: [PATCH 11/11] minor adjustment --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 9f2e828..9f147e9 100644 --- a/src/App.js +++ b/src/App.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; -import { get, push, ref, remove, set } from "firebase/database"; +import { push, ref, remove, set } from "firebase/database"; import { database, auth } from "./firebase"; import { createUserWithEmailAndPassword,