diff --git a/.DS_Store b/.DS_Store index 77f61907..181bd8ec 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/client/.gitignore b/client/.gitignore index f70f6e9e..da66d4d7 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -30,3 +30,4 @@ yarn-error.log* # firebase **/.firebase /.firebaserc +/firebase.json diff --git a/client/firebase.json b/client/firebase.json index 78a08cb7..f6682b2a 100644 --- a/client/firebase.json +++ b/client/firebase.json @@ -1,6 +1,6 @@ { "hosting": { - "site": "sofan-app", + "site": "staging-sofan-app", "public": "build", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ diff --git a/client/functions/generateAthleteClaimUtilityEmailHTML.js b/client/functions/generateAthleteClaimUtilityEmailHTML.js new file mode 100644 index 00000000..fff20205 --- /dev/null +++ b/client/functions/generateAthleteClaimUtilityEmailHTML.js @@ -0,0 +1,49 @@ +const generateAthleteClaimUtilityEmailHTML = ({ + athleteName, + userName, + nftId, + collectionName, + title, + description, + claimed_date, + }) => { + return ` + + + + + + Notification de Réclamation NFT + + +
+
+ Sofan Logo +
+
+ Bonjour ${athleteName}, +

+ Nous tenons à vous informer qu'un utilisateur a récemment réclamé une utilité de votre collection NFT. Voici les détails : + +
+
+

Détails de l'Utilité

+

Titre: ${title}

+

Description: ${description}

+
+
+ Si vous avez des questions ou besoin d'assistance, n'hésitez pas à nous contacter à support@sofan.com. +
+
+ + + `; + }; + + module.exports = generateAthleteClaimUtilityEmailHTML; + \ No newline at end of file diff --git a/client/functions/generateUserClaimUtilityEmailHTML.js b/client/functions/generateUserClaimUtilityEmailHTML.js new file mode 100644 index 00000000..221673f5 --- /dev/null +++ b/client/functions/generateUserClaimUtilityEmailHTML.js @@ -0,0 +1,54 @@ +const generateUserClaimUtilityEmailHTML = ({ + display_name, + nftId, + athleteName, + claimed_date, + collectionName, + title, + description, + utility_date, +}) => { + + return ` + + + + + + Confirmation de Réclamation NFT + + +
+
+ Sofan Logo +
+
+ Bonjour ${display_name}, +

+ Nous sommes heureux de vous confirmer que vous avez réussi à réclamer une utilité NFT pour ${collectionName}. +

+ Détails de l'utilité réclamée: + +
+

Détails de l'Utilité

+

Titre: ${title}

+

Description: ${description}

+

Date de l'Utilité: ${utility_date}

+
+ Vous pouvez vérifier l'état de votre utilité NFT à tout moment dans votre tableau de bord utilisateur. +
+ Voir Mon Profile +
+ Si vous avez des questions ou besoin d'assistance, n'hésitez pas à nous contacter à contact@sofan.app. +
+
+ + + `; +}; + +module.exports = generateUserClaimUtilityEmailHTML; diff --git a/client/functions/generateVerificationCodeEmailHTML.js b/client/functions/generateVerificationCodeEmailHTML.js index 9cff565a..668c70aa 100644 --- a/client/functions/generateVerificationCodeEmailHTML.js +++ b/client/functions/generateVerificationCodeEmailHTML.js @@ -29,7 +29,7 @@ const generateVerificationCodeEmailHTML = ({ code }) => {

Préparez-vous à vivre une expérience unique.

-

Si vous avez besoin d'aide, n'hésitez pas à contacter notre équipe de support dédiée à support@sofan.app.

+

Si vous avez besoin d'aide, n'hésitez pas à contacter notre équipe de support dédiée à contact@sofan.app.

Merci d'avoir choisi Sofan! Nous sommes impatients de vous servir.

diff --git a/client/functions/generateWelcomeEmailHTML.js b/client/functions/generateWelcomeEmailHTML.js index 5cd558d9..4d4e14f2 100644 --- a/client/functions/generateWelcomeEmailHTML.js +++ b/client/functions/generateWelcomeEmailHTML.js @@ -28,8 +28,8 @@ const generateWelcomeEmailHTML = () => {
Si vous avez des questions sur les sports, les athlètes ou les NFTs, n'hésitez pas à nous contacter à - - support@sofan.com + + contact@sofan.app
diff --git a/client/functions/index.js b/client/functions/index.js index eeeb3757..d8e61c8f 100644 --- a/client/functions/index.js +++ b/client/functions/index.js @@ -1,6 +1,6 @@ const functions = require("firebase-functions/v1"); -const cors = require('cors')({ origin: ['http://localhost:3000', 'https://www.sofan.app', 'https://staging.sofan.app'] }); -//.const cors = require('cors')({ origin: true }); +//const cors = require('cors')({ origin: ['http://localhost:3000', 'https://www.sofan.app', 'https://staging.sofan.app'] }); +const cors = require("cors")({ origin: true }); // // Create and deploy your first functions // // https://firebase.google.com/docs/functions/get-started @@ -8,6 +8,8 @@ const cors = require('cors')({ origin: ['http://localhost:3000', 'https://www.so const nodemailer = require("nodemailer"); const generateVerificationCodeEmailHTML = require("./generateVerificationCodeEmailHTML"); const generateWelcomeEmailHTML = require("./generateWelcomeEmailHTML"); +const generateUserClaimUtilityEmailHTML = require("./generateUserClaimUtilityEmailHTML"); +const generateAthleteClaimUtilityEmailHTML = require("./generateAthleteClaimUtilityEmailHTML"); const transporter = nodemailer.createTransport({ host: "mail.gandi.net", @@ -22,6 +24,8 @@ const transporter = nodemailer.createTransport({ // functions.logger.log(functions.config().email.user); exports.sendVerificationEmail = functions.https.onRequest((req, res) => { + // Return 204 for OPTIONS method (preflight request) + cors(req, res, async () => { if (req.method !== "POST") { return res.status(405).send("Method Not Allowed"); @@ -38,11 +42,12 @@ exports.sendVerificationEmail = functions.https.onRequest((req, res) => { subject: "Sign Up Verification Code", html: htmlContent, }; - + console.log("console.log mail Option -->", mailOptions); + functions.logger.log("functions logger mail Option -->",mailOptions); try { await transporter.sendMail(mailOptions); functions.logger.log("Email sent successfully"); - res.send({ success: "Email sent successfully" }); // Send success response + res.status(200).send({ success: "Email sent successfully" }); // Send success response } catch (err) { functions.logger.error("Error sending email:", err); res.status(500).send({ error: "Error sending email", details: err }); // Send error details @@ -50,7 +55,6 @@ exports.sendVerificationEmail = functions.https.onRequest((req, res) => { }); }); - exports.sendWelcomeEmail = functions.https.onRequest((req, res) => { cors(req, res, async () => { if (req.method !== "POST") { @@ -77,41 +81,135 @@ exports.sendWelcomeEmail = functions.https.onRequest((req, res) => { }); }); +exports.sendUserClaimUtilityEmail = functions.https.onRequest((req, res) => { + cors(req, res, async () => { + if (req.method !== "POST") { + return res.status(405).send("Method Not Allowed"); + } + + const { + email, + display_name, + nftId, + athleteName, + claimed_date, + collectionName, + title, + description, + utility_date, + } = req.body; + const htmlContent = generateUserClaimUtilityEmailHTML({ + display_name, + nftId, + athleteName, + claimed_date, + collectionName, + title, + description, + utility_date, + }); + + const mailOptions = { + from: `"Sofan" <${functions.config().email.user}>`, // Make sure the sender address is verified in your email service provider + to: email, + subject: "Confirmation de votre réclamation Utilité d'NFT - Sofan", + html: htmlContent, + }; + + try { + await transporter.sendMail(mailOptions); + functions.logger.log("Email sent successfully"); + res.send({ success: "Email sent successfully" }); // Send success response + } catch (err) { + functions.logger.error("Error sending email:", err); + res.status(500).send({ error: "Error sending email", details: err }); // Send error details + } + }); +}); + +exports.sendAthleteClaimUtilityEmail = functions.https.onRequest((req, res) => { + cors(req, res, async () => { + if (req.method !== "POST") { + return res.status(405).send("Method Not Allowed"); + } + + const { + athleteEmail, // Ensure to include the athlete's email in the request + athleteName, + userName, + nftId, + collectionName, + title, + description, + claimed_date, + } = req.body; + + const htmlContent = generateAthleteClaimUtilityEmailHTML({ + athleteName, + userName, + nftId, + collectionName, + title, + description, + claimed_date, + }); + const mailOptions = { + from: `"Sofan" <${functions.config().email.user}>`, + to: athleteEmail, // Send to the athlete's email + subject: + "Notification: Un utilisateur a réclamé une utilité de votre collection NFT - Sofan", + html: htmlContent, + }; + + try { + await transporter.sendMail(mailOptions); + functions.logger.log("Email sent to athlete successfully"); + res.send({ success: "Email sent to athlete successfully" }); + } catch (err) { + functions.logger.error("Error sending email to athlete:", err); + res + .status(500) + .send({ error: "Error sending email to athlete", details: err }); + } + }); +}); -const admin = require('firebase-admin'); +const admin = require("firebase-admin"); //const functions = require('firebase-functions'); admin.initializeApp(); -exports.scheduledPublish = functions.pubsub.schedule('every 60 minutes').onRun(async (context) => { - const now = admin.firestore.Timestamp.now(); - const scheduledPostsRef = admin.firestore().collection('scheduled_posts'); - const feedPostsRef = admin.firestore().collection('feed_post'); +exports.scheduledPublish = functions.pubsub + .schedule("every 60 minutes") + .onRun(async (context) => { + const now = admin.firestore.Timestamp.now(); + const scheduledPostsRef = admin.firestore().collection("scheduled_posts"); + const feedPostsRef = admin.firestore().collection("feed_post"); - console.log('Checking for scheduled posts to publish...'); + console.log("Checking for scheduled posts to publish..."); - const snapshot = await scheduledPostsRef.where('publish_timestamp', '<=', now).get(); + const snapshot = await scheduledPostsRef + .where("publish_timestamp", "<=", now) + .get(); - if (snapshot.empty) { - console.log('No posts to publish.'); - return null; - } + if (snapshot.empty) { + console.log("No posts to publish."); + return null; + } - const batch = admin.firestore().batch(); + const batch = admin.firestore().batch(); - snapshot.docs.forEach((doc) => { - const postData = doc.data(); - postData.createdAt = now; // Update the createdAt value to the current timestamp - const newPostRef = feedPostsRef.doc(); - - batch.set(newPostRef, postData); - batch.delete(doc.ref); - }); - - return batch.commit().then(() => { - console.log('Posts published successfully!'); - return null; - }); -}); + snapshot.docs.forEach((doc) => { + const postData = doc.data(); + postData.createdAt = now; // Update the createdAt value to the current timestamp + const newPostRef = feedPostsRef.doc(); + batch.set(newPostRef, postData); + batch.delete(doc.ref); + }); + return batch.commit().then(() => { + console.log("Posts published successfully!"); + return null; + }); + }); diff --git a/client/functions/package-lock.json b/client/functions/package-lock.json index 9718fad6..b1890fc0 100644 --- a/client/functions/package-lock.json +++ b/client/functions/package-lock.json @@ -10,7 +10,7 @@ "dotenv": "^16.3.1", "firebase-admin": "^11.5.0", "firebase-functions": "^4.2.0", - "nodemailer": "^6.9.4" + "nodemailer": "^6.9.12" }, "devDependencies": { "firebase-functions-test": "^3.0.0" @@ -4756,9 +4756,9 @@ "peer": true }, "node_modules/nodemailer": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.4.tgz", - "integrity": "sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA==", + "version": "6.9.12", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.12.tgz", + "integrity": "sha512-pnLo7g37Br3jXbF0bl5DekBJihm2q+3bB3l2o/B060sWmb5l+VqeScAQCBqaQ+5ezRZFzW5SciZNGdRDEbq89w==", "engines": { "node": ">=6.0.0" } diff --git a/client/functions/package.json b/client/functions/package.json index c59dd8c1..b2e8fe5b 100644 --- a/client/functions/package.json +++ b/client/functions/package.json @@ -17,7 +17,7 @@ "dotenv": "^16.3.1", "firebase-admin": "^11.5.0", "firebase-functions": "^4.2.0", - "nodemailer": "^6.9.4" + "nodemailer": "^6.9.12" }, "devDependencies": { "firebase-functions-test": "^3.0.0" diff --git a/client/package-lock.json b/client/package-lock.json index 8a516b44..8dc57554 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -24,6 +24,7 @@ "date-fns": "^2.30.0", "env-cmd": "^10.1.0", "firebase": "^9.22.1", + "firebase-functions": "^4.5.0", "libphonenumber-js": "^1.10.28", "opensea-js": "^4.0.24", "react": "^18.2.0", @@ -3867,6 +3868,18 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@fastify/busboy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-1.2.1.tgz", + "integrity": "sha512-7PQA7EH43S0CxcOa9OeAnaeA0oQ+e/DHNPZwSQM9CQHW76jle5+OvLdibRp/Aafs9KXbLhxyjOTkRjWUbQEd3Q==", + "peer": true, + "dependencies": { + "text-decoding": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@firebase/analytics": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", @@ -4585,6 +4598,131 @@ "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.1.tgz", "integrity": "sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==" }, + "node_modules/@google-cloud/firestore": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@google-cloud/firestore/-/firestore-6.8.0.tgz", + "integrity": "sha512-JRpk06SmZXLGz0pNx1x7yU3YhkUXheKgH5hbDZ4kMsdhtfV5qPLJLRI4wv69K0cZorIk+zTMOwptue7hizo0eA==", + "optional": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "functional-red-black-tree": "^1.0.1", + "google-gax": "^3.5.7", + "protobufjs": "^7.2.5" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@google-cloud/firestore/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/@google-cloud/firestore/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, + "optional": true, + "peer": 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/@google-cloud/paginator": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", + "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", + "optional": true, + "peer": true, + "dependencies": { + "arrify": "^2.0.0", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@google-cloud/projectify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-3.0.0.tgz", + "integrity": "sha512-HRkZsNmjScY6Li8/kb70wjGlDDyLkVk3KvoEo9uIoxSjYLJasGiCch9+PqRVDOCGUFvEIqyogl+BeqILL4OJHA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@google-cloud/promisify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-3.0.1.tgz", + "integrity": "sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@google-cloud/storage": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.12.0.tgz", + "integrity": "sha512-78nNAY7iiZ4O/BouWMWTD/oSF2YtYgYB3GZirn0To6eBOugjXVoK+GXgUXOl+HlqbAOyHxAVXOlsj3snfbQ1dw==", + "optional": true, + "peer": true, + "dependencies": { + "@google-cloud/paginator": "^3.0.7", + "@google-cloud/projectify": "^3.0.0", + "@google-cloud/promisify": "^3.0.0", + "abort-controller": "^3.0.0", + "async-retry": "^1.3.3", + "compressible": "^2.0.12", + "duplexify": "^4.0.0", + "ent": "^2.2.0", + "extend": "^3.0.2", + "fast-xml-parser": "^4.2.2", + "gaxios": "^5.0.0", + "google-auth-library": "^8.0.1", + "mime": "^3.0.0", + "mime-types": "^2.0.8", + "p-limit": "^3.0.1", + "retry-request": "^5.0.0", + "teeny-request": "^8.0.0", + "uuid": "^8.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@google-cloud/storage/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "optional": true, + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@grpc/grpc-js": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", @@ -5539,6 +5677,19 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, + "node_modules/@jsdoc/salty": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", + "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -7077,6 +7228,14 @@ "@types/node": "*" } }, + "node_modules/@types/cors": { + "version": "2.8.15", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.15.tgz", + "integrity": "sha512-n91JxbNLD8eQIuXDIChAN1tCKNWCEgpceU9b7ZMbFA+P+Q4yIeh80jizFLEvolRPc1ES0VdwFlGv+kJTSirogw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/debug": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", @@ -7130,6 +7289,17 @@ "@types/send": "*" } }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "optional": true, + "peer": true, + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", @@ -7230,6 +7400,15 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.4.tgz", + "integrity": "sha512-8UYapdmR0QlxgvJmyE8lP7guxD0UGVMfknsdtCFZh4ovShdBl3iOI4zdvqBHrB/IS+xUj3PSx73Qkey1fhWz+g==", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -7238,16 +7417,48 @@ "@types/node": "*" } }, + "node_modules/@types/linkify-it": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.4.tgz", + "integrity": "sha512-hPpIeeHb/2UuCw06kSNAOVWgehBLXEo0/fUs0mw3W2qhqX89PI2yvok83MnuctYGCPrabGIoi0fFso4DQ+sNUQ==", + "optional": true, + "peer": true + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "optional": true, + "peer": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.4.tgz", + "integrity": "sha512-ARVxjAEX5TARFRzpDRVC6cEk0hUIXCCwaMhz8y7S1/PxU6zZS1UMjyobz7q4w/D/R552r4++EhwmXK1N2rAy0A==", + "optional": true, + "peer": true + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "optional": true, + "peer": true + }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -7343,6 +7554,17 @@ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" }, + "node_modules/@types/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "optional": true, + "peer": true, + "dependencies": { + "@types/glob": "*", + "@types/node": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", @@ -9066,6 +9288,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -9160,6 +9392,16 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "optional": true, + "peer": true, + "dependencies": { + "retry": "0.13.1" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -9966,6 +10208,12 @@ "ieee754": "^1.2.1" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "peer": true + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -10166,6 +10414,19 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11763,6 +12024,15 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "peer": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -11921,6 +12191,13 @@ "node": ">=10.13.0" } }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "optional": true, + "peer": true + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -13755,6 +14032,36 @@ "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "optional": true, + "peer": true + }, + "node_modules/fast-xml-parser": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.2.tgz", + "integrity": "sha512-rmrXUXwbJedoXkStenj1kkljNF7ugn5ZjR9FJcwmCfcCbtOMDghPajbc+Tck6vE6F5XsDmx+Pr2le9fw8+pXBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "optional": true, + "peer": true, + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -13987,6 +14294,102 @@ "@firebase/util": "1.9.3" } }, + "node_modules/firebase-admin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-11.11.0.tgz", + "integrity": "sha512-lp784gXFAJgUEtjSdYNZGTWZqltqjBkoaPSQhDKnmWXJP/MCbWdiDY1hsdkl/6O4O4KFovTjUDLu26sojwdQvw==", + "peer": true, + "dependencies": { + "@fastify/busboy": "^1.2.1", + "@firebase/database-compat": "^0.3.4", + "@firebase/database-types": "^0.10.4", + "@types/node": ">=12.12.47", + "jsonwebtoken": "^9.0.0", + "jwks-rsa": "^3.0.1", + "node-forge": "^1.3.1", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "@google-cloud/firestore": "^6.6.0", + "@google-cloud/storage": "^6.9.5" + } + }, + "node_modules/firebase-admin/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/firebase-functions": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-4.5.0.tgz", + "integrity": "sha512-y6HsasHtGLfXCp3Pfrz+JA19lO9hSzYiNxFDIDMffrfcsG7UbXzv0zfi2ASadMVRoDCaox5ppZBa1QJxZbctPQ==", + "dependencies": { + "@types/cors": "^2.8.5", + "@types/express": "4.17.3", + "cors": "^2.8.5", + "express": "^4.17.1", + "node-fetch": "^2.6.7", + "protobufjs": "^7.2.2" + }, + "bin": { + "firebase-functions": "lib/bin/firebase-functions.js" + }, + "engines": { + "node": ">=14.10.0" + }, + "peerDependencies": { + "firebase-admin": "^10.0.0 || ^11.0.0" + } + }, + "node_modules/firebase-functions/node_modules/@types/express": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.3.tgz", + "integrity": "sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "node_modules/firebase-functions/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/firebase-functions/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/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -14289,12 +14692,42 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "node_modules/gaxios": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", + "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", + "optional": true, + "peer": true, + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9" + }, "engines": { - "node": ">=6.9.0" + "node": ">=12" + } + }, + "node_modules/gcp-metadata": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", + "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", + "optional": true, + "peer": true, + "dependencies": { + "gaxios": "^5.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" } }, "node_modules/get-caller-file": { @@ -14486,6 +14919,373 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-auth-library": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz", + "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==", + "optional": true, + "peer": true, + "dependencies": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^5.0.0", + "gcp-metadata": "^5.3.0", + "gtoken": "^6.1.0", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-auth-library/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "optional": true, + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/google-auth-library/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true, + "peer": true + }, + "node_modules/google-gax": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.1.tgz", + "integrity": "sha512-g/lcUjGcB6DSw2HxgEmCDOrI/CByOwqRvsuUvNalHUK2iPPPlmAIpbMbl62u0YufGMr8zgE3JL7th6dCb1Ry+w==", + "optional": true, + "peer": true, + "dependencies": { + "@grpc/grpc-js": "~1.8.0", + "@grpc/proto-loader": "^0.7.0", + "@types/long": "^4.0.0", + "@types/rimraf": "^3.0.2", + "abort-controller": "^3.0.0", + "duplexify": "^4.0.0", + "fast-text-encoding": "^1.0.3", + "google-auth-library": "^8.0.2", + "is-stream-ended": "^0.1.4", + "node-fetch": "^2.6.1", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^1.0.0", + "protobufjs": "7.2.4", + "protobufjs-cli": "1.1.1", + "retry-request": "^5.0.0" + }, + "bin": { + "compileProtos": "build/tools/compileProtos.js", + "minifyProtoJson": "build/tools/minify.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-gax/node_modules/@grpc/grpc-js": { + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz", + "integrity": "sha512-KeyQeZpxeEBSqFVTi3q2K7PiPXmgBfECc4updA1ejCLjYmoAlvvM3ZMp5ztTDUCUQmoY3CpDxvchjO1+rFkoHg==", + "optional": true, + "peer": true, + "dependencies": { + "@grpc/proto-loader": "^0.7.0", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/google-gax/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==", + "optional": true, + "peer": true, + "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/google-gax/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/google-gax/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==", + "optional": true, + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-gax/node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "optional": true, + "peer": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/google-gax/node_modules/escodegen/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "optional": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/google-gax/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-gax/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "optional": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/google-gax/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/google-gax/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "optional": true, + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/protobufjs": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", + "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "hasInstallScript": true, + "optional": true, + "peer": 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/google-gax/node_modules/protobufjs-cli": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.1.tgz", + "integrity": "sha512-VPWMgIcRNyQwWUv8OLPyGQ/0lQY/QTQAVN5fh+XzfDwsVw1FZ2L3DM/bcBf8WPiRz2tNpaov9lPZfNcmNo6LXA==", + "optional": true, + "peer": true, + "dependencies": { + "chalk": "^4.0.0", + "escodegen": "^1.13.0", + "espree": "^9.0.0", + "estraverse": "^5.1.0", + "glob": "^8.0.0", + "jsdoc": "^4.0.0", + "minimist": "^1.2.0", + "semver": "^7.1.2", + "tmp": "^0.2.1", + "uglify-js": "^3.7.7" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "protobufjs": "^7.0.0" + } + }, + "node_modules/google-gax/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/google-gax/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "optional": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "optional": true, + "peer": true, + "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/google-gax/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==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-p12-pem": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", + "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==", + "optional": true, + "peer": true, + "dependencies": { + "node-forge": "^1.3.1" + }, + "bin": { + "gp12-pem": "build/src/bin/gp12-pem.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -14533,6 +15333,21 @@ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, + "node_modules/gtoken": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz", + "integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==", + "optional": true, + "peer": true, + "dependencies": { + "gaxios": "^5.0.1", + "google-p12-pem": "^4.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -15590,6 +16405,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==", + "optional": true, + "peer": true + }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -17728,6 +18550,15 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jose": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", + "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-base64": { "version": "3.7.5", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", @@ -17755,11 +18586,74 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "optional": true, + "peer": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, + "node_modules/jsdoc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", + "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", + "optional": true, + "peer": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^12.2.3", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdoc/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "optional": true, + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -17840,6 +18734,16 @@ "node": ">=4" } }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "optional": true, + "peer": true, + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -17950,14 +18854,57 @@ "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "peer": true, + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" }, "engines": { - "node": "*" + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "peer": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "peer": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" } }, "node_modules/jsprim": { @@ -18140,6 +19087,46 @@ "node": ">=4.0" } }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "optional": true, + "peer": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jwks-rsa": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-3.1.0.tgz", + "integrity": "sha512-v7nqlfezb9YfHHzYII3ef2a2j1XnGeSE/bK3WfumaYCqONAIstJbrEGapz4kadScZzEt7zYCN7bucj8C0Mv/Rg==", + "peer": true, + "dependencies": { + "@types/express": "^4.17.17", + "@types/jsonwebtoken": "^9.0.2", + "debug": "^4.3.4", + "jose": "^4.14.6", + "limiter": "^1.1.5", + "lru-memoizer": "^2.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "optional": true, + "peer": true, + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -18180,6 +19167,16 @@ "node": ">=0.10.0" } }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "optional": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -18425,11 +19422,27 @@ "node": ">=10" } }, + "node_modules/limiter": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", + "peer": true + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "optional": true, + "peer": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -18475,16 +19488,58 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "peer": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "peer": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "peer": true + }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "peer": true + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "peer": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "peer": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "peer": true + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -18495,6 +19550,12 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "peer": true + }, "node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -18570,6 +19631,32 @@ "yallist": "^3.0.2" } }, + "node_modules/lru-memoizer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.2.0.tgz", + "integrity": "sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw==", + "peer": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "lru-cache": "~4.0.0" + } + }, + "node_modules/lru-memoizer/node_modules/lru-cache": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "integrity": "sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw==", + "peer": true, + "dependencies": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + } + }, + "node_modules/lru-memoizer/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "peer": true + }, "node_modules/ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", @@ -18621,6 +19708,64 @@ "tmpl": "1.0.5" } }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "optional": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "optional": true, + "peer": true, + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "optional": true, + "peer": true + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "optional": true, + "peer": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "optional": true, + "peer": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -18636,6 +19781,13 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "optional": true, + "peer": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -21406,6 +22558,51 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/proto3-json-serializer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-1.1.1.tgz", + "integrity": "sha512-AwAuY4g9nxx0u52DnSMkqqgyLHaW/XaPLtaAo3y/ZCfeaQB/g4YDH4kb8Wc/mWzWvu0YjOznVnfn373MVZZrgw==", + "optional": true, + "peer": true, + "dependencies": { + "protobufjs": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/proto3-json-serializer/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/proto3-json-serializer/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, + "optional": true, + "peer": 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/protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", @@ -21448,6 +22645,12 @@ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==" }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "peer": true + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -22286,6 +23489,16 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -22417,6 +23630,20 @@ "node": ">= 4" } }, + "node_modules/retry-request": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-5.0.2.tgz", + "integrity": "sha512-wfI3pk7EE80lCIXprqh7ym48IHYdwmAAzESdbU8Q9l7pnRCk9LEhpbOTNKjz6FARLm/Bl5m+4F0ABxOkYUujSQ==", + "optional": true, + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -23350,6 +24577,16 @@ "readable-stream": "^3.5.0" } }, + "node_modules/stream-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "optional": true, + "peer": true, + "dependencies": { + "stubs": "^3.0.0" + } + }, "node_modules/stream-http": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", @@ -23560,6 +24797,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "optional": true, + "peer": true + }, + "node_modules/stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "optional": true, + "peer": true + }, "node_modules/sturdy-websocket": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/sturdy-websocket/-/sturdy-websocket-0.2.1.tgz", @@ -24035,6 +25286,62 @@ "node": ">=4.5" } }, + "node_modules/teeny-request": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-8.0.3.tgz", + "integrity": "sha512-jJZpA5He2y52yUhA7pyAGZlgQpcB+xLjcN0eUFxr9c8hP/H7uOXbBNVo/O0C/xVfJLJs680jvkFgVJEEvk9+ww==", + "optional": true, + "peer": true, + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "stream-events": "^1.0.5", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/teeny-request/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/teeny-request/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "optional": true, + "peer": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/teeny-request/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "optional": true, + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -24154,6 +25461,12 @@ "node": ">=8" } }, + "node_modules/text-decoding": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-decoding/-/text-decoding-1.0.0.tgz", + "integrity": "sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA==", + "peer": true + }, "node_modules/text-encoding-utf-8": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", @@ -24236,6 +25549,19 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "optional": true, + "peer": true, + "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", @@ -24538,6 +25864,26 @@ "node": "*" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "optional": true, + "peer": true + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "peer": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/uint8arrays": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", @@ -24579,6 +25925,13 @@ "react": ">=15.0.0" } }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "optional": true, + "peer": true + }, "node_modules/unfetch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-3.1.2.tgz", @@ -25831,6 +27184,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workbox-background-sync": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.6.0.tgz", @@ -26309,6 +27672,13 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "optional": true, + "peer": true + }, "node_modules/xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", diff --git a/client/package.json b/client/package.json index 0e8ba624..01219f44 100644 --- a/client/package.json +++ b/client/package.json @@ -19,6 +19,7 @@ "date-fns": "^2.30.0", "env-cmd": "^10.1.0", "firebase": "^9.22.1", + "firebase-functions": "^4.5.0", "libphonenumber-js": "^1.10.28", "opensea-js": "^4.0.24", "react": "^18.2.0", diff --git a/client/src/App.js b/client/src/App.js index d56f9eae..0a0e1bec 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -272,6 +272,7 @@ function App() { // console.log("re rendu"); const [crossmintPayloadLocationdata, setCrossmintPayloadLocationdata] = useState(null); + const year = new Date().getFullYear(); return (
- © 2023 Sofan + © {year} Sofan {" "} Tout droits réservés
@@ -598,7 +599,7 @@ function App() { /> } + element={} /> } /> } /> @@ -616,7 +617,7 @@ function App() { /> } /> } diff --git a/client/src/Components/AthleteProfileHeader/AthleteProfileHeader.css b/client/src/Components/AthleteProfileHeader/AthleteProfileHeader.css index 287f1bcd..bba84f38 100644 --- a/client/src/Components/AthleteProfileHeader/AthleteProfileHeader.css +++ b/client/src/Components/AthleteProfileHeader/AthleteProfileHeader.css @@ -7,8 +7,10 @@ } .athleteprofileheader-bannerandprofilepicture-wrap { max-height: 300px; - max-width: 1246px; + width: 1246px; + max-width: 100%; position: relative; + /* background-color: red; */ } .athleteprofileheader-bannerandprofilepicture-wrap > img { width: 100%; @@ -217,7 +219,7 @@ } .athleteprofileheader-content-container-button-wrap > button:nth-child(2):active { - transform: scale(0.85); + transform: scale(0.85); } .athleteprofileheader-content-container-button-wrap > button:nth-child(4) { margin-left: 11px; diff --git a/client/src/Components/CreationPostPoll/CreationPostPoll.js b/client/src/Components/CreationPostPoll/CreationPostPoll.js index ac3867ac..dcf2fce0 100644 --- a/client/src/Components/CreationPostPoll/CreationPostPoll.js +++ b/client/src/Components/CreationPostPoll/CreationPostPoll.js @@ -11,7 +11,7 @@ import { uploadBytes, getDownloadURL, } from "../../Configs/firebase"; -import { collection, addDoc, getDoc, doc, updateDoc } from "firebase/firestore"; +import { collection, addDoc, getDoc, doc, updateDoc, Timestamp } from "firebase/firestore"; const CreationPostPoll = ({ userId }) => { const [file, setFile] = useState(null); @@ -25,7 +25,8 @@ const CreationPostPoll = ({ userId }) => { const [text, setText] = useState(""); const [loadingPublishPost, setLoadingPublishPost] = useState(false); const [validationPublishPost, setValidationPublishPost] = useState(false); - + const [dateTimeValue, setDateTimeValue] = useState(); + console.log(dateTimeValue); const [pollData, setPollData] = useState({ choices: [ { id: 1, text: "" }, @@ -103,6 +104,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, + ...(dateTimeValue && { publish_timestamp: Timestamp.fromMillis(dateTimeValue * 1000) }) }; } else { const postType = "poll"; @@ -116,6 +118,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, + ...(dateTimeValue && { publish_timestamp: Timestamp.fromMillis(dateTimeValue * 1000) }) }; } @@ -124,7 +127,8 @@ const CreationPostPoll = ({ userId }) => { try { // Upload the post object to Firestore // const postRef = collection(db, "scheduled_posts"); - const postRef = collection(db, "feed_post"); + const collectionName = dateTimeValue ? "scheduled_posts" : "feed_post"; + const postRef = collection(db, collectionName); let postUid; await addDoc(postRef, post).then((snapshot) => { postUid = snapshot.id; @@ -275,6 +279,7 @@ const CreationPostPoll = ({ userId }) => { handleTextChange={handleTextChange} pollData={pollData} setPollData={setPollData} + setDateTimeValue={setDateTimeValue} /> ) : loadingPublishPost ? ( <> diff --git a/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js b/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js index 497b2c89..c33a42ae 100644 --- a/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js +++ b/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js @@ -18,10 +18,10 @@ const PostPoll = ({ handleTextChange, pollData, setPollData, + setDateTimeValue, }) => { const [addOption, setAddOption] = useState(0); const [selectedDate, setSelectedDate] = useState(new Date()); - const [dateTimeValue, setDateTimeValue] = useState(); const [isProgrammedPostClicked, setIsProgrammedPostClicked] = useState(); const ref = useRef(); const handleAddPictureClick = () => { diff --git a/client/src/Components/FeedLaunchpad/FeedLaunchpad.js b/client/src/Components/FeedLaunchpad/FeedLaunchpad.js index 2389e2bf..888e522e 100644 --- a/client/src/Components/FeedLaunchpad/FeedLaunchpad.js +++ b/client/src/Components/FeedLaunchpad/FeedLaunchpad.js @@ -24,9 +24,9 @@ const FeedLaunchpad = () => { return { // launchpad: feedLaunchpad, launch_date: feedLaunchpad.launch_date, - collection_avatar: nftCollectionsData.collection_avatar, - collection_title: nftCollectionsData.collection_title, - collection_address: nftCollectionsData.collection_address, + collection_avatar: nftCollectionsData?.collection_avatar, + collection_title: nftCollectionsData?.collection_title, + collection_address: nftCollectionsData?.collection_address, athlete_id: userData.id, display_name: userData.display_name, profile_avatar: userData.profile_avatar, diff --git a/client/src/Components/Footer/Footer.js b/client/src/Components/Footer/Footer.js index 4c72f45c..37e10df7 100644 --- a/client/src/Components/Footer/Footer.js +++ b/client/src/Components/Footer/Footer.js @@ -8,13 +8,13 @@ const links = [ { icon: InstagramLogo, url: 'https://www.instagram.com/sofan_app/' }, { icon: LinkedInLogo, url: 'https://www.linkedin.com/company/sofan-app/' } ]; - + const year = new Date().getFullYear(); function Footer() { return (
-

© 2023 Copyright: Sofan

+

© {year} Copyright: Sofan

); diff --git a/client/src/Components/LaunchpadAllHeader/LaunchpadAllHeader.css b/client/src/Components/LaunchpadAllHeader/LaunchpadAllHeader.css index 0955f6a1..6333282d 100644 --- a/client/src/Components/LaunchpadAllHeader/LaunchpadAllHeader.css +++ b/client/src/Components/LaunchpadAllHeader/LaunchpadAllHeader.css @@ -35,10 +35,10 @@ flex-direction: column; align-items: flex-start; } -.launchpadallheader-data-wrap-img-and-name{ +.launchpadallheader-data-wrap-img-and-name { text-decoration: none; } -.launchpadallheader-data-wrap-img-and-name:hover{ +.launchpadallheader-data-wrap-img-and-name:hover { /* background-color: red; */ background-color: #ddc3c385; transition-duration: 300ms !important; @@ -47,10 +47,10 @@ padding: 5px; text-decoration: underline; text-decoration-color: #fffcfc; - text-underline-offset: 4px; + text-underline-offset: 4px; } -.launchpadallheader-data-wrap-img-and-name:active{ - transform: scale(0.80); +.launchpadallheader-data-wrap-img-and-name:active { + transform: scale(0.8); } .launchpadallheader-data-wrap-img { background-color: white; @@ -104,7 +104,21 @@ font-size: 20px; } .launchpadallheader-data-wrap > button:active { -transform: scale(0.80); -/* transition: 300s; */ -transition-duration:300ms ; -} \ No newline at end of file + transform: scale(0.8); + /* transition: 300s; */ + transition-duration: 300ms; +} +@media (max-width: 1300px) { + .launchpadallheader-component { + /* max-width: 90% !important; */ + /* width: 100%; */ + } + .launchpadallheader-component > img { + /* max-width: 80vw !important; */ + /* width: 100%; */ + /* background-color: blue; */ + min-width: 95vw !important; + width: 100% !important; + max-width: 95vw !important; + } +} diff --git a/client/src/Components/LaunchpadAllLiveLaunches/LaunchpadAllLiveLaunchesTemplate/LaunchpadAllLiveLaunchesTemplate.js b/client/src/Components/LaunchpadAllLiveLaunches/LaunchpadAllLiveLaunchesTemplate/LaunchpadAllLiveLaunchesTemplate.js index e1e325e7..4bd9aff5 100644 --- a/client/src/Components/LaunchpadAllLiveLaunches/LaunchpadAllLiveLaunchesTemplate/LaunchpadAllLiveLaunchesTemplate.js +++ b/client/src/Components/LaunchpadAllLiveLaunches/LaunchpadAllLiveLaunchesTemplate/LaunchpadAllLiveLaunchesTemplate.js @@ -125,7 +125,7 @@ const LaunchpadAllLiveLaunchesTemplate = ({ }, []); function redirectTo() { - window.location.href = `/collectionlive/${launchpadlive.nftCollection.athlete_id}/${launchpadlive.nftCollection.collection_address}`; + window.location.href = `/collectionlive/${launchpadlive?.nftCollection?.athlete_id}/${launchpadlive.nftCollection?.collection_address}`; } return (
Utilité
@@ -10,10 +11,13 @@ function LaunchpadCollectionLiveUtilities({ utilitiesArray }) { utilitiesArray.map((utility) => ( )) diff --git a/client/src/Components/LoginSignupPopUp/ConnectWallet/ConnectWallet.js b/client/src/Components/LoginSignupPopUp/ConnectWallet/ConnectWallet.js index 29c89b9c..39c7cfa0 100644 --- a/client/src/Components/LoginSignupPopUp/ConnectWallet/ConnectWallet.js +++ b/client/src/Components/LoginSignupPopUp/ConnectWallet/ConnectWallet.js @@ -82,6 +82,7 @@ function ConnectWallet({ }); } catch (error) { console.error(error); + setIsWeb3authConnectLoading(false); } setWeb3authProvider(web3authProvider); diff --git a/client/src/Components/Modal/Modal.js b/client/src/Components/Modal/Modal.js index 6d46c3b5..85d0aa0d 100644 --- a/client/src/Components/Modal/Modal.js +++ b/client/src/Components/Modal/Modal.js @@ -1,49 +1,56 @@ -import React, {useState ,useEffect} from "react"; +import React, { useState, useEffect } from "react"; import "./Modal.css"; import CrossBlack from "../../Assets/Image/cross.svg"; import CrossWhite from "../../Assets/Image/cross_white.svg"; // import { disableBodyScroll, enableBodyScroll, pixelScrolledAthleteProfilePage } from 'scroll-lock'; const Modal = (props) => { - // Need top pass setState and style - // setState is the function link to the state that render the Modal Component - // style is an object to position the cross with top, bottom, left and right - // by default the cross is black. To make it white pass a prop named color and write "white" - // If you want to lock scroll when clicked add document.querySelector('body').classList.add('scroll-lock') to your handle HTML Element that triggers the modal to pop + // Need top pass setState and style + // setState is the function link to the state that render the Modal Component + // style is an object to position the cross with top, bottom, left and right + // by default the cross is black. To make it white pass a prop named color and write "white" + // If you want to lock scroll when clicked add document.querySelector('body').classList.add('scroll-lock') to your handle HTML Element that triggers the modal to pop const handleModalClick = (e) => { if ( e.target.id === "modal-component" || - e.target.id === "modal-component-cross" || e.target.id === "custom-close-button" + e.target.id === "modal-component-cross" || + e.target.id === "custom-close-button" ) { - if(props.setState){ - props.setState(false); - } - if(props.setState2){ - props.setState2(false) - } - if(props.setState3){ - props.setState3(false) - } - if(props.setState4){ - props.setState4(false) - } - // retirer le scroll lock lorsque le modal n'est plus la - document.querySelector("body").classList.remove("scroll-lock"); - } + if (props.setState) { + props.setState(false); + } + if (props.setState2) { + props.setState2(false); + } + if (props.setState3) { + props.setState3(false); + } + if (props.setState4) { + props.setState4(false); + } + // retirer le scroll lock lorsque le modal n'est plus la + document.querySelector("body").classList.remove("scroll-lock"); + } }; useEffect(() => { - document.querySelector('body').classList.add('scroll-lock'); - }, []) + document.querySelector("body").classList.add("scroll-lock"); + }, []); // console.log(props.isPostClicked) return ( -
); }; diff --git a/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.css b/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.css index 8f0ecb41..4d7cb52a 100644 --- a/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.css +++ b/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.css @@ -4,7 +4,7 @@ display: flex; justify-content: space-between; flex-direction: column; - margin-top: 64px; + margin-top: 200px; } .nft-collection-overview-more-about-collection-title { max-width: 100%; @@ -19,7 +19,7 @@ width: 100%; height: 133px; display: flex; - align-items: center; + /* align-items: center; */ /* background-color: violet; */ text-align: justify; max-height: 133px; diff --git a/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.js b/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.js index 91e020fa..210da7f4 100644 --- a/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.js +++ b/client/src/Components/MoreAboutThisCollection/MoreAboutThisCollection.js @@ -32,8 +32,6 @@ function MoreAboutThisCollection({ } > {knowMoreAboutCollection} - {knowMoreAboutCollection} - {knowMoreAboutCollection}
); diff --git a/client/src/Components/NftCollectionHeader/NftCollectionHeader.js b/client/src/Components/NftCollectionHeader/NftCollectionHeader.js index 91ab768f..7381e080 100644 --- a/client/src/Components/NftCollectionHeader/NftCollectionHeader.js +++ b/client/src/Components/NftCollectionHeader/NftCollectionHeader.js @@ -70,7 +70,7 @@ function NftCollectionHeader({ let ethBidPriceConverted = (nftBidEth * ethPrice).toLocaleString("fr-FR", { maximumFractionDigits: 2, }); - console.log(currentOwnerInfo); + //console.log(currentOwnerInfo); return (
diff --git a/client/src/Components/NftCollectionMoreAboutAthlete/NftCollectionMoreAboutAthlete.css b/client/src/Components/NftCollectionMoreAboutAthlete/NftCollectionMoreAboutAthlete.css index a9f07814..9486cb18 100644 --- a/client/src/Components/NftCollectionMoreAboutAthlete/NftCollectionMoreAboutAthlete.css +++ b/client/src/Components/NftCollectionMoreAboutAthlete/NftCollectionMoreAboutAthlete.css @@ -74,7 +74,7 @@ height: 31px; position: absolute; left: 6.9591%; - bottom: 36.1064802%; + bottom: 17.1064802%; font-size: 19px; font-family: "britanica-heavy-expanded"; } @@ -82,7 +82,7 @@ border: none; cursor: pointer; left: 6.9591%; - bottom: 26.1231%; + bottom: 10.1231%; position: absolute; width: 166px; height: 44px; @@ -114,7 +114,29 @@ } .nft-collection-more-about-athlete-description { bottom: 50.25623%; + height: 200px !important; + /* background-color: red; */ + overflow-y: scroll; } + +/* */ +.nft-collection-more-about-athlete-description::-webkit-scrollbar { + width: 6px; /* Set the width of the scrollbar */ + border-radius: 10px; +} +.nft-collection-more-about-athlete-description::-webkit-track { + background: transparent; /* Set the track background */ +} +.nft-collection-more-about-athlete-description::-webkit-scrollbar-thumb { + background-color: #888; /* Set the color of the scrollbar */ + border-radius: 10px; /* Set the border-radius */ +} + +.nft-collection-more-about-athlete-description::-webkit-scrollbar-thumb:hover { + background-color: #555; /* Set the color when hovered */ +} + +/* */ .nft-collection-more-about-athlete-fans-count { left: 6.9591%; } diff --git a/client/src/Components/NftCollectionOverview/NftCollectionOverview.js b/client/src/Components/NftCollectionOverview/NftCollectionOverview.js index 64487fd5..f1121d02 100644 --- a/client/src/Components/NftCollectionOverview/NftCollectionOverview.js +++ b/client/src/Components/NftCollectionOverview/NftCollectionOverview.js @@ -10,18 +10,30 @@ function NftCollectionOverview({ knowMoreAboutCollection, latestBidsArray, ethPrice, + loggedInUser, + currentAthleteCollectionCreator, + collectionNameApi, + currentTokenIdOwner }) { + return (
Utilités
- {utilitiesArray.map((element) => ( + {utilitiesArray.map((utility) => ( ))}
diff --git a/client/src/Components/NftCollectionPageHeader/NftCollectionPageHeader.css b/client/src/Components/NftCollectionPageHeader/NftCollectionPageHeader.css index 5943b055..dd4926f7 100644 --- a/client/src/Components/NftCollectionPageHeader/NftCollectionPageHeader.css +++ b/client/src/Components/NftCollectionPageHeader/NftCollectionPageHeader.css @@ -10,6 +10,9 @@ } .nftcollectionheader-bannerandprofilepicture-wrap > img { width: 100%; + border-radius: 20px; + max-height: 300px; + object-fit: cover; } .nftcollectionheader-bannerandprofilepicture-no-img { width: 100%; diff --git a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js index 48059ac8..53638783 100644 --- a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js +++ b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js @@ -2,27 +2,28 @@ import React, { useState, useRef, useEffect, useCallback } from "react"; import Modal from "../Modal/Modal"; import Cropper from "react-easy-crop"; import { getCroppedImg } from "../LoginSignupPopUp/SetupProfile/CanvasUtils"; -// import { -// db, -// storage, -// ref, -// uploadBytes, -// getDownloadURL, -// } from "../../Configs/firebase"; -// import { -// collection, -// addDoc, -// updateDoc, -// query, -// where, -// getDocs, -// } from "firebase/firestore"; +import { + db, + storage, + ref, + uploadBytes, + getDownloadURL, +} from "../../Configs/firebase"; +import { + collection, + addDoc, + updateDoc, + query, + where, + getDocs, +} from "firebase/firestore"; import previousArrow from "../../Assets/Image/arrow-previous.svg"; import Img from "../../Assets/Image/img.svg"; import "./PopUpEditProfile.css"; import greenCross from "../../Assets/Image/greencross-offers.svg"; import redCross from "../../Assets/Image/redcross-offers.svg"; import LoadingAnimation from "../LoadingAnimation/LoadingAnimation"; +import { ImageUrlToFile } from "../../Utils/fileFunctions"; // import LoadingAnimation from "../LoadingEllipsisAnimation/LoadingAnimation"; // afficher les infos de la bdd en provenance de la page user/athlete + J'ai mis en commentaire les mêmes fonctions liés au backend que dans signup garde ce que tu as à garder et supprime le reste @@ -54,6 +55,8 @@ const PopUpEditProfile = ({ const [croppedAreaPixels, setCroppedAreaPixels] = useState(); const [croppedBanner, setCroppedBanner] = useState(); const [croppedAvatar, setCroppedAvatar] = useState(); + const [retrievedBanner, setRetrievedBanner] = useState(); + const [retrievedAvatar, setRetrievedAvatar] = useState(); const [loadingEditProfile, setLoadingEditProfile] = useState(); const [validationEditProfile, setValidationEditProfile] = useState(); const [errorEditProfile, setErrorEditProfile] = useState(false); @@ -61,113 +64,139 @@ const PopUpEditProfile = ({ isProfileEditPopupHasModifications, setIsProfileEditPopupHasModifications, ] = useState(false); + useEffect(() => { - if (!banner) return; + if (!retrievedBanner) return; // setCurrentlyCropping(true); - let tmp = URL.createObjectURL(banner); + let tmp = URL.createObjectURL(retrievedBanner); setPreviewBanner(tmp); setCurrentlyCroppingBanner(true); - URL.revokeObjectURL(banner); - setBanner(); - }, [banner]); + URL.revokeObjectURL(retrievedBanner); + }, [retrievedBanner]); // tambouriner le crop easy useEffect(() => { - if (!profile) return; - let tmp = URL.createObjectURL(profile); + if (!retrievedAvatar) return; + let tmp = URL.createObjectURL(retrievedAvatar); setPreviewProfile(tmp); setCurrentlyCroppingAvatar(true); - URL.revokeObjectURL(profile); - setProfile(); - }, [profile]); + URL.revokeObjectURL(retrievedAvatar); + }, [retrievedAvatar]); + function handlePreviousStepCroppClick() { setCurrentlyCroppingAvatar(false); setCurrentlyCroppingBanner(false); } - // const updateBannerPath = async (uid, path) => { - // try { - // const q = query(collection(db, "users"), where("id", "==", uid)); - // const querySnapshot = await getDocs(q); + const handleBannerUpload = async (file, croppedImage) => { + console.log(file); + if (file && file.type.substr(0, 5) === "image") { + try { + let newFile = await ImageUrlToFile(croppedImage, file.name); + // Upload the file to Firebase Storage + const createdAt = new Date(); + const imagePath = `user_profile/banners/sofan_user_#${ + allUserInfo.id + }#_banner_${createdAt.getTime()}_${file.name}`; + const imageRef = ref(storage, imagePath); + uploadBytes(imageRef, newFile).then(() => { + getDownloadURL(ref(storage, imagePath)).then((url) => { + updateBannerPath(allUserInfo.id, url); + }); + console.log("Uploaded a blob or file!"); + }); - // if (!querySnapshot.empty) { - // querySnapshot.forEach((doc) => { - // const userRef = doc.ref; - // const updatedData = { profile_banner: path }; + console.log("Image uploaded successfully!"); + } catch (error) { + console.error("Error uploading image:", error); + } + setBanner(file); + } else { + console.log("File is not an image."); + } + }; - // updateDoc(userRef, updatedData) - // .then(() => { - // console.log("Banner path updated successfully!"); - // }) - // .catch((error) => { - // console.error("Error updating banner path:", error); - // }); - // }); - // } else { - // console.log("No user found"); - // } - // } catch (err) { - // console.error(err); - // throw err; - // } - // }; + const handleAvatarUpload = async (file, croppedImage) => { + // Access the selected file(s) using fileInputRef.current.files + // Process the files as needed + if (file && file.type.substr(0, 5) === "image") { + try { + let newFile = await ImageUrlToFile(croppedImage, file.name); + const createdAt = new Date(); + const imagePath = `user_profile/avatars/sofan_user_#${ + allUserInfo.id + }#_avatar_${createdAt.getTime()}_${file.name}`; + const imageRef = ref(storage, imagePath); + uploadBytes(imageRef, newFile).then(() => { + getDownloadURL(ref(storage, imagePath)).then((url) => { + updateAvatarPath(allUserInfo.id, url); + }); + console.log("Uploaded a blob or file!"); + }); - // const updateAvatarPath = async (uid, path) => { - // try { - // const q = query(collection(db, "users"), where("id", "==", uid)); - // const querySnapshot = await getDocs(q); + console.log("Image uploaded successfully!"); + } catch (error) { + console.error("Error uploading image:", error); + } + setProfile(file); + } else { + console.log("profile is not an image."); + } + }; - // if (!querySnapshot.empty) { - // querySnapshot.forEach((doc) => { - // const userRef = doc.ref; - // const updatedData = { profile_avatar: path }; + const updateBannerPath = async (uid, path) => { + try { + const q = query(collection(db, "users"), where("id", "==", uid)); + const querySnapshot = await getDocs(q); - // updateDoc(userRef, updatedData) - // .then(() => { - // console.log("Avatar path updated successfully!"); - // }) - // .catch((error) => { - // console.error("Error updating Avatar path:", error); - // }); - // }); - // } else { - // console.log("No user found"); - // } - // } catch (err) { - // console.error(err); - // throw err; - // } - // }; + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { profile_banner: path }; - const handleBannerUpload = async (event) => { - const file = event.target.files[0]; - console.log(file); - if (file && file.type.substr(0, 5) === "image") { - // //const imagePath = file.name ? `user_profile/banners/` - // try { - // // Upload the file to Firebase Storage - // //shajeed - // const createdAt = new Date(); - // const imagePath = `user_profile/banners/sofan_user_#${ - // allUserInfo.id - // }#_banner_${createdAt.getTime()}_${file.name}`; - // const imageRef = ref(storage, imagePath); - // uploadBytes(imageRef, file).then(() => { - // getDownloadURL(ref(storage, imagePath)).then((url) => { - // updateBannerPath(allUserInfo.id, url); - // }); - // console.log("Uploaded a blob or file!"); - // }); + updateDoc(userRef, updatedData) + .then(() => { + console.log("Banner path updated successfully!"); + }) + .catch((error) => { + console.error("Error updating banner path:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; + } + }; - // // TODO: Save the image URL to Firestore or perform any additional actions + const updateAvatarPath = async (uid, path) => { + try { + const q = query(collection(db, "users"), where("id", "==", uid)); + const querySnapshot = await getDocs(q); - // console.log("Image uploaded successfully!"); - // } catch (error) { - // console.error("Error uploading image:", error); - // } - setBanner(file); - } else { - console.log("File is not an image."); + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { profile_avatar: path }; + + updateDoc(userRef, updatedData) + .then(() => { + console.log("Avatar path updated successfully!"); + }) + .catch((error) => { + console.error("Error updating Avatar path:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; } }; + + // console.log(allUserInfo); const handleProfileImageInputChange = () => { // Access the selected file(s) using fileInputRef.current.files @@ -258,8 +287,43 @@ const PopUpEditProfile = ({ } }, [previewProfile, croppedAreaPixels]); - function handleSaveProfile() { + async function handleSaveProfile() { setLoadingEditProfile(true); + try { + handleBannerUpload(retrievedBanner, croppedBanner); + handleAvatarUpload(retrievedAvatar, croppedAvatar); + } catch (err) { + console.error("Upload Image error Line 790: ", err); + } + + try { + const q = query( + collection(db, "users"), + where("id", "==", allUserInfo.id) + ); + const querySnapshot = await getDocs(q); + + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { bio: bioText ? bioText : "" }; + + updateDoc(userRef, updatedData) + .then(() => { + console.log("Bio updated successfully!"); + }) + .catch((error) => { + console.error("Error updating Bio:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; + } + } useEffect(() => { if (loadingEditProfile === true) { @@ -359,7 +423,7 @@ const PopUpEditProfile = ({ // classes={{containerClassName : "popup-edit-profile-cursor-container", mediaClassName: "", cropAreaClassName: ""}} />
-
+
setRetrievedBanner(e.target.files[0])} style={{ display: "none" }} id="image-upload" /> @@ -458,7 +522,7 @@ const PopUpEditProfile = ({
diff --git a/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js b/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js index b3a77aab..bac330e6 100644 --- a/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js +++ b/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js @@ -117,6 +117,7 @@ function AddCommentInput({