From 9bd9ded1a9f3a00fb34f465a1d3c62051b867946 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 19:06:23 +0200 Subject: [PATCH 01/80] added committe card --- components/committee/CommitteApplicants.tsx | 25 ++- components/committee/CommitteeCard.tsx | 22 +++ .../[period-id]/[committee]/index.tsx | 140 +++++++++++++++++ pages/committee/[period-id]/index.tsx | 143 +++++------------- 4 files changed, 220 insertions(+), 110 deletions(-) create mode 100644 components/committee/CommitteeCard.tsx create mode 100644 pages/committee/[period-id]/[committee]/index.tsx diff --git a/components/committee/CommitteApplicants.tsx b/components/committee/CommitteApplicants.tsx index 2a4cd078..1cf377f3 100644 --- a/components/committee/CommitteApplicants.tsx +++ b/components/committee/CommitteApplicants.tsx @@ -28,6 +28,29 @@ const CommitteeApplicants: NextPage = ({ routeString }) => { setPeriods( filteredPeriods.map((period: periodType) => { + const userCommittees = session?.user?.committees?.map((committee) => + committee.toLowerCase() + ); + const periodCommittees = period.committees.map((committee) => + committee.toLowerCase() + ); + + period.optionalCommittees.forEach((committee) => { + periodCommittees.push(committee.toLowerCase()); + }); + + const commonCommittees = userCommittees!.filter((committee) => + periodCommittees.includes(committee) + ); + + let uriLink = ""; + + if (commonCommittees.length > 1) { + uriLink = `committee/${period._id}`; + } else { + uriLink = `committee/${period._id}/${commonCommittees[0]}`; + } + return { name: period.name, preparation: @@ -43,7 +66,7 @@ const CommitteeApplicants: NextPage = ({ routeString }) => { " til " + formatDate(period.interviewPeriod.end), committees: period.committees, - link: `committee/${period._id}`, + link: uriLink, }; }) ); diff --git a/components/committee/CommitteeCard.tsx b/components/committee/CommitteeCard.tsx new file mode 100644 index 00000000..774ff464 --- /dev/null +++ b/components/committee/CommitteeCard.tsx @@ -0,0 +1,22 @@ +import router from "next/router"; +import React from "react"; + +interface Props { + committee: string; + link: string; +} + +const CommitteeCard = ({ committee, link }: Props) => { + return ( + + ); +}; + +export default CommitteeCard; diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx new file mode 100644 index 00000000..d4b4f133 --- /dev/null +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -0,0 +1,140 @@ +import { NextPage } from "next"; +import { useEffect, useState } from "react"; +import { useSession } from "next-auth/react"; +import { applicantType, periodType } from "../../../../lib/types/types"; +import { useRouter } from "next/router"; +import ApplicantsOverview from "../../../../components/applicantoverview/ApplicantsOverview"; +import { + CalendarIcon, + InboxIcon, + UserGroupIcon, +} from "@heroicons/react/24/solid"; +import { Tabs } from "../../../../components/Tabs"; +import SendCommitteeMessage from "../../../../components/committee/SendCommitteeMessage"; +import CommitteeInterviewTimes from "../../../../components/committee/CommitteeInterviewTimes"; +import LoadingPage from "../../../../components/LoadingPage"; + +const CommitteeApplicantOverView: NextPage = () => { + const { data: session } = useSession(); + const [loading, setLoading] = useState(true); + + const router = useRouter(); + const periodId = router.query["period-id"] as string; + const [committees, setCommittees] = useState(null); + const [period, setPeriod] = useState(null); + const [activeTab, setActiveTab] = useState(0); + const [tabClicked, setTabClicked] = useState(0); + + useEffect(() => { + if (!session || !periodId) return; + + const fetchPeriod = async () => { + try { + const res = await fetch(`/api/periods/${periodId}`); + const data = await res.json(); + setPeriod(data.period); + } catch (error) { + console.error("Failed to fetch interview periods:", error); + } finally { + setLoading(false); + } + }; + + fetchPeriod(); + }, [session, periodId]); + + useEffect(() => { + if (period && session) { + const userCommittees = session.user!.committees; + const periodCommittees = period.committees; + + if (period.optionalCommittees != null) { + periodCommittees.push(...period.optionalCommittees); + } + + const filteredCommittees = periodCommittees.filter( + (committee) => userCommittees?.includes(committee.toLowerCase()) + ); + setCommittees(filteredCommittees); + } + }, [period, session]); + + if (!session || !session.user?.isCommitee) { + return

Ingen Tilgang!

; + } + + if (loading) { + return ; + } + + const interviewPeriodEnd = period?.interviewPeriod.end + ? new Date(period.interviewPeriod.end) + : null; + + //Satt frist til 14 dager etter intervju perioden, så får man ikke tilgang + if ( + interviewPeriodEnd && + interviewPeriodEnd.getTime() + 14 * 24 * 60 * 60 * 1000 < + new Date().getTime() + ) { + return ( +
+

Opptaket er ferdig!

+
+

+ Du kan ikke lenger se søkere eller planlegge intervjuer. +

+

+ {" "} + Har det skjedd noe feil eller trenger du tilgang til informasjonen? Ta + kontakt med{" "} + + Appkom + {" "} +

+
+ ); + } + + return ( +
+ { + setActiveTab(index); + setTabClicked(index); + }} + content={[ + { + title: "Intervjutider", + icon: , + content: , + }, + { + title: "Melding", + icon: , + content: ( + + ), + }, + { + title: "Søkere", + icon: , + content: ( + + ), + }, + ]} + /> +
+ ); +}; + +export default CommitteeApplicantOverView; diff --git a/pages/committee/[period-id]/index.tsx b/pages/committee/[period-id]/index.tsx index 38bdd53c..3519c0ce 100644 --- a/pages/committee/[period-id]/index.tsx +++ b/pages/committee/[period-id]/index.tsx @@ -1,140 +1,65 @@ -import { NextPage } from "next"; +import { useRouter } from "next/router"; import { useEffect, useState } from "react"; +import { periodType } from "../../../lib/types/types"; import { useSession } from "next-auth/react"; -import { applicantType, periodType } from "../../../lib/types/types"; -import { useRouter } from "next/router"; -import ApplicantsOverview from "../../../components/applicantoverview/ApplicantsOverview"; -import { - CalendarIcon, - InboxIcon, - UserGroupIcon, -} from "@heroicons/react/24/solid"; -import { Tabs } from "../../../components/Tabs"; -import SendCommitteeMessage from "../../../components/committee/SendCommitteeMessage"; -import CommitteeInterviewTimes from "../../../components/committee/CommitteeInterviewTimes"; import LoadingPage from "../../../components/LoadingPage"; +import CommitteeCard from "../../../components/committee/CommitteeCard"; -const CommitteeApplicantOverView: NextPage = () => { +const ChooseCommittee = () => { const { data: session } = useSession(); - const [loading, setLoading] = useState(true); - const router = useRouter(); - const periodId = router.query["period-id"] as string; - const [committees, setCommittees] = useState(null); + const periodId = router.query["period-id"]; const [period, setPeriod] = useState(null); - const [activeTab, setActiveTab] = useState(0); - const [tabClicked, setTabClicked] = useState(0); + const [committees, setCommittees] = useState(null); + const [loading, setLoading] = useState(true); useEffect(() => { - if (!session || !periodId) return; - const fetchPeriod = async () => { + if (!session || !periodId) return; + try { const res = await fetch(`/api/periods/${periodId}`); const data = await res.json(); setPeriod(data.period); + + if (data.period) { + const userCommittees = session!.user!.committees; + const periodCommittees = data.period.committees; + + if (data.period.optionalCommittees != null) { + periodCommittees.push(...data.period.optionalCommittees); + } + + const filteredCommittees = periodCommittees.filter( + (committee: string) => + userCommittees?.includes(committee.toLowerCase()) + ); + setCommittees(filteredCommittees); + } } catch (error) { console.error("Failed to fetch interview periods:", error); } finally { setLoading(false); } }; - fetchPeriod(); - }, [session, periodId]); - - useEffect(() => { - if (period && session) { - const userCommittees = session.user!.committees; - const periodCommittees = period.committees; - - if (period.optionalCommittees != null) { - periodCommittees.push(...period.optionalCommittees); - } - - const filteredCommittees = periodCommittees.filter( - (committee) => userCommittees?.includes(committee.toLowerCase()) - ); - setCommittees(filteredCommittees); - } - }, [period, session]); - - if (!session || !session.user?.isCommitee) { - return

Ingen Tilgang!

; - } + }, [periodId, session]); if (loading) { return ; } - const interviewPeriodEnd = period?.interviewPeriod.end - ? new Date(period.interviewPeriod.end) - : null; - - //Satt frist til 14 dager etter intervju perioden, så får man ikke tilgang - if ( - interviewPeriodEnd && - interviewPeriodEnd.getTime() + 14 * 24 * 60 * 60 * 1000 < - new Date().getTime() - ) { - return ( -
-

Opptaket er ferdig!

-
-

- Du kan ikke lenger se søkere eller planlegge intervjuer. -

-

- {" "} - Har det skjedd noe feil eller trenger du tilgang til informasjonen? Ta - kontakt med{" "} - - Appkom - {" "} -

-
- ); - } - return ( -
- { - setActiveTab(index); - setTabClicked(index); - }} - content={[ - { - title: "Intervjutider", - icon: , - content: , - }, - { - title: "Melding", - icon: , - content: ( - - ), - }, - { - title: "Søkere", - icon: , - content: ( - - ), - }, - ]} - /> +
+

Velg komite

+ {committees?.map((committee) => + CommitteeCard({ + committee, + link: `${periodId}/${committee.toLowerCase()}`, + }) + )}
); }; -export default CommitteeApplicantOverView; +export default ChooseCommittee; From 6ae878f96e01aec4b2e16c268644460a54b692f6 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 19:59:11 +0200 Subject: [PATCH 02/80] remove committee selection in committeeInterviewTimes --- .../applicantoverview/ApplicantsOverview.tsx | 19 +----- .../committee/CommitteeInterviewTimes.tsx | 61 +++--------------- .../[period-id]/[committee]/index.tsx | 63 ++++++++++++------- 3 files changed, 49 insertions(+), 94 deletions(-) diff --git a/components/applicantoverview/ApplicantsOverview.tsx b/components/applicantoverview/ApplicantsOverview.tsx index bf05c862..264d2c72 100644 --- a/components/applicantoverview/ApplicantsOverview.tsx +++ b/components/applicantoverview/ApplicantsOverview.tsx @@ -11,7 +11,7 @@ import ApplicantOverviewSkeleton from "./ApplicantOverviewSkeleton"; interface Props { period: periodType | null; - committees: string[] | null; + committees: string; includePreferences: boolean; } @@ -206,23 +206,6 @@ const ApplicantsOverview = ({ ref={filterMenuRef} className="absolute right-0 top-10 w-48 bg-white dark:bg-online-darkBlue border border-gray-300 dark:border-gray-600 p-4 rounded shadow-lg z-10" > - {committees && ( -
- - -
- )}
- {filteredCommittees.map((committee) => ( - - ))} - -
-

Velg ledige tider ved å trykke på eller dra over flere celler.

Intervjuene vil bli satt opp etter hverandre fra første ledige diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index d4b4f133..4e9e5ad6 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -13,6 +13,8 @@ import { Tabs } from "../../../../components/Tabs"; import SendCommitteeMessage from "../../../../components/committee/SendCommitteeMessage"; import CommitteeInterviewTimes from "../../../../components/committee/CommitteeInterviewTimes"; import LoadingPage from "../../../../components/LoadingPage"; +import { changeDisplayName } from "../../../../lib/utils/toString"; +import Custom404 from "../../../404"; const CommitteeApplicantOverView: NextPage = () => { const { data: session } = useSession(); @@ -20,11 +22,13 @@ const CommitteeApplicantOverView: NextPage = () => { const router = useRouter(); const periodId = router.query["period-id"] as string; - const [committees, setCommittees] = useState(null); + const committee = router.query["committee"] as string; const [period, setPeriod] = useState(null); const [activeTab, setActiveTab] = useState(0); const [tabClicked, setTabClicked] = useState(0); + const [hasAccess, setHasAccess] = useState(false); + useEffect(() => { if (!session || !periodId) return; @@ -35,38 +39,48 @@ const CommitteeApplicantOverView: NextPage = () => { setPeriod(data.period); } catch (error) { console.error("Failed to fetch interview periods:", error); - } finally { - setLoading(false); } }; - fetchPeriod(); - }, [session, periodId]); + const checkAccess = () => { + if (!period) { + return; + } - useEffect(() => { - if (period && session) { - const userCommittees = session.user!.committees; - const periodCommittees = period.committees; + const userCommittees = session?.user?.committees?.map((committee) => + committee.toLowerCase() + ); + const periodCommittees = period.committees.map((committee) => + committee.toLowerCase() + ); - if (period.optionalCommittees != null) { - periodCommittees.push(...period.optionalCommittees); - } + period.optionalCommittees.forEach((committee) => { + periodCommittees.push(committee.toLowerCase()); + }); - const filteredCommittees = periodCommittees.filter( - (committee) => userCommittees?.includes(committee.toLowerCase()) + const commonCommittees = userCommittees!.filter((committee) => + periodCommittees.includes(committee) ); - setCommittees(filteredCommittees); - } - }, [period, session]); + if (commonCommittees.includes(committee)) { + setHasAccess(true); + setLoading(false); + } else { + setLoading(false); + } + }; - if (!session || !session.user?.isCommitee) { - return

Ingen Tilgang!

; - } + fetchPeriod(); + checkAccess(); + }, [session, periodId, period]); if (loading) { return ; } + if (!session || !hasAccess) { + return ; + } + const interviewPeriodEnd = period?.interviewPeriod.end ? new Date(period.interviewPeriod.end) : null; @@ -101,6 +115,9 @@ const CommitteeApplicantOverView: NextPage = () => { return (
+ +

{`${period?.name} --> ${changeDisplayName(committee)}`}

+
{ @@ -111,7 +128,9 @@ const CommitteeApplicantOverView: NextPage = () => { { title: "Intervjutider", icon: , - content: , + content: ( + + ), }, { title: "Melding", @@ -126,7 +145,7 @@ const CommitteeApplicantOverView: NextPage = () => { content: ( ), From f7eeec7e3aa5c719fa8cbd1d3e37ed025e8e6801 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 20:26:28 +0200 Subject: [PATCH 03/80] refactored the API --- .../committee/CommitteeInterviewTimes.tsx | 33 ++++++++--------- lib/mongo/committees.ts | 21 +++++------ .../[period-id]/{index.ts => [committee].ts} | 25 +++++-------- .../[period-id]/[committee]/index.tsx | 36 +++++++++---------- 4 files changed, 53 insertions(+), 62 deletions(-) rename pages/api/committees/times/[period-id]/{index.ts => [committee].ts} (82%) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index 3bc33bbd..c8142b44 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -32,9 +32,8 @@ const CommitteeInterviewTimes = ({ period, committee }: Props) => { const [selectedTimeslot, setSelectedTimeslot] = useState("15"); const [isLoading, setIsLoading] = useState(true); - const [committeeInterviewTimes, setCommitteeInterviewTimes] = useState< - committeeInterviewType[] - >([]); + const [committeeInterviewTimes, setCommitteeInterviewTimes] = + useState(); const [calendarEvents, setCalendarEvents] = useState([]); const [hasAlreadySubmitted, setHasAlreadySubmitted] = useState(false); @@ -51,28 +50,33 @@ const CommitteeInterviewTimes = ({ period, committee }: Props) => { useEffect(() => { const fetchCommitteeInterviewTimes = async () => { + if (!period) return; + try { - const res = await fetch(`/api/committees/times/${period?._id}`); + const res = await fetch( + `/api/committees/times/${period?._id}/${committee}` + ); const data = await res.json(); - if (data && Array.isArray(data.committees)) { + if (data) { setCommitteeInterviewTimes(data.committees); - setIsLoading(false); } else { console.error( - "Fetched data does not contain an 'committees' array:", + "Fetched data does not contain a 'committees' array:", data ); - setCommitteeInterviewTimes([]); } } catch (error) { console.error("Error fetching committee interview times:", error); - setCommitteeInterviewTimes([]); + } finally { + setIsLoading(false); } }; - fetchCommitteeInterviewTimes(); - }, []); + if (period && committee) { + fetchCommitteeInterviewTimes(); + } + }, [period, committee]); useEffect(() => { if (committee && Array.isArray(committeeInterviewTimes)) { @@ -91,7 +95,7 @@ const CommitteeInterviewTimes = ({ period, committee }: Props) => { if (relevantTimes.length > 0) { setHasAlreadySubmitted(true); const events = relevantTimes.flatMap((time) => - time.availabletimes.map((at) => ({ + time.availabletimes.map((at: any) => ({ start: new Date(at.start).toISOString(), end: new Date(at.end).toISOString(), })) @@ -226,13 +230,10 @@ const CommitteeInterviewTimes = ({ period, committee }: Props) => { const deleteSubmission = async (e: BaseSyntheticEvent) => { e.preventDefault(); - const queryParams = new URLSearchParams({ - committee: committee, //TODO fjernes - }).toString(); try { const response = await fetch( - `/api/committees/times/${period?._id}?${queryParams}`, + `/api/committees/times/${period?._id}/${committee}`, { method: "DELETE", } diff --git a/lib/mongo/committees.ts b/lib/mongo/committees.ts index 5f9ccdd2..0e57d1c1 100644 --- a/lib/mongo/committees.ts +++ b/lib/mongo/committees.ts @@ -70,12 +70,17 @@ export const updateCommitteeMessage = async ( export const getCommittees = async ( periodId: string, + selectedCommittee: string, userCommittees: string[] ) => { try { if (!committees) await init(); + if (!userHasAccessCommittee(userCommittees, selectedCommittee)) { + return { error: "User is unauthenticated" }; + } + const result = await committees - .find({ committee: { $in: userCommittees }, periodId: periodId }) + .find({ committee: selectedCommittee, periodId: periodId }) .toArray(); return { committees: result }; } catch (error) { @@ -141,26 +146,18 @@ export const deleteCommittee = async ( return { error: "User does not have access to this committee" }; } - let validPeriodId = periodId; - if (typeof periodId === "string") { - if (!ObjectId.isValid(periodId)) { - console.error("Invalid ObjectId:", periodId); - return { error: "Invalid ObjectId format" }; - } - validPeriodId = periodId; - } - const count = await committees.countDocuments({ committee: committee, - periodId: validPeriodId, + periodId: periodId, }); + if (count === 0) { return { error: "Committee not found or already deleted" }; } const result = await committees.deleteOne({ committee: committee, - periodId: validPeriodId, + periodId: periodId, }); if (result.deletedCount === 1) { diff --git a/pages/api/committees/times/[period-id]/index.ts b/pages/api/committees/times/[period-id]/[committee].ts similarity index 82% rename from pages/api/committees/times/[period-id]/index.ts rename to pages/api/committees/times/[period-id]/[committee].ts index a5f317d7..62716157 100644 --- a/pages/api/committees/times/[period-id]/index.ts +++ b/pages/api/committees/times/[period-id]/[committee].ts @@ -15,6 +15,11 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { if (!isInCommitee(res, session)) return; const periodId = req.query["period-id"]; + const selectedCommittee = req.query.committee; + + if (typeof selectedCommittee !== "string") { + return res.status(400).json({ error: "Invalid committee parameter" }); + } if (!periodId || typeof periodId !== "string") { return res @@ -26,6 +31,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { try { const { committees, error } = await getCommittees( periodId, + selectedCommittee, session!.user?.committees ?? [] ); @@ -38,18 +44,11 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { } if (req.method === "PUT") { - const { committee, message } = req.body; - - if (!committee) { - console.error("Missing or invalid parameters", { - committee, - }); - return res.status(400).json({ error: "Missing or invalid parameters" }); - } + const { message } = req.body; try { const { updatedMessage, error } = await updateCommitteeMessage( - committee, + selectedCommittee, periodId, message, session!.user?.committees ?? [] @@ -63,15 +62,9 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { } if (req.method === "DELETE") { - const committee = req.query.committee as string; - - if (!committee || !periodId) { - return res.status(400).json({ error: "Missing or invalid parameters" }); - } - try { const { error } = await deleteCommittee( - committee, + selectedCommittee, periodId, session!.user?.committees ?? [] ); diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index 4e9e5ad6..36eed713 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -132,24 +132,24 @@ const CommitteeApplicantOverView: NextPage = () => { ), }, - { - title: "Melding", - icon: , - content: ( - - ), - }, - { - title: "Søkere", - icon: , - content: ( - - ), - }, + // { + // title: "Melding", + // icon: , + // content: ( + // + // ), + // }, + // { + // title: "Søkere", + // icon: , + // content: ( + // + // ), + // }, ]} />
From 9bb0a2ca22b0a64adf835cdebba7760878b826f9 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 21:21:31 +0200 Subject: [PATCH 04/80] refactoring --- .../applicantoverview/ApplicantsOverview.tsx | 19 ++- .../committee/CommitteeInterviewTimes.tsx | 46 +----- components/committee/SendCommitteeMessage.tsx | 132 ++++++------------ lib/mongo/committees.ts | 17 ++- .../times/{ => [period-id]}/index.ts | 18 ++- .../[period-id]/[committee]/index.tsx | 56 +++++++- 6 files changed, 144 insertions(+), 144 deletions(-) rename pages/api/committees/times/{ => [period-id]}/index.ts (66%) diff --git a/components/applicantoverview/ApplicantsOverview.tsx b/components/applicantoverview/ApplicantsOverview.tsx index 264d2c72..bf05c862 100644 --- a/components/applicantoverview/ApplicantsOverview.tsx +++ b/components/applicantoverview/ApplicantsOverview.tsx @@ -11,7 +11,7 @@ import ApplicantOverviewSkeleton from "./ApplicantOverviewSkeleton"; interface Props { period: periodType | null; - committees: string; + committees: string[] | null; includePreferences: boolean; } @@ -206,6 +206,23 @@ const ApplicantsOverview = ({ ref={filterMenuRef} className="absolute right-0 top-10 w-48 bg-white dark:bg-online-darkBlue border border-gray-300 dark:border-gray-600 p-4 rounded shadow-lg z-10" > + {committees && ( +
+ + +
+ )}
- {userCommittees.map((committee) => ( - - ))} - -
-
- {!committeeHasSubmitedTimes && (

For å sende en egendefinert melding må du først fylle ut intervju @@ -195,7 +145,7 @@ const SendCommitteeMessage = ({ period, tabClicked }: Props) => {

diff --git a/lib/mongo/committees.ts b/lib/mongo/committees.ts index 0e57d1c1..3aece6ec 100644 --- a/lib/mongo/committees.ts +++ b/lib/mongo/committees.ts @@ -1,6 +1,7 @@ import { Collection, Db, MongoClient, ObjectId, UpdateResult } from "mongodb"; import clientPromise from "./mongodb"; import { commiteeType } from "../types/types"; +import { co } from "@fullcalendar/core/internal-common"; let client: MongoClient; let db: Db; @@ -104,7 +105,8 @@ export const getCommittee = async (id: string) => { export const createCommittee = async ( committeeData: commiteeType, - userCommittes: string[] + userCommittes: string[], + periodId: string ) => { try { if (!committees) await init(); @@ -112,11 +114,24 @@ export const createCommittee = async ( return { error: "User does not have access to this committee" }; } + if (!ObjectId.isValid(periodId)) { + return { error: "Invalid periodId" }; + } + const parsedCommitteeData = typeof committeeData === "string" ? JSON.parse(committeeData) : committeeData; + const count = await committees.countDocuments({ + periodId: periodId, + committee: committeeData.committee, + }); + + if (count > 0) { + return { error: "Committee Times already exists" }; + } + const result = await committees.insertOne(parsedCommitteeData); if (result.insertedId) { const insertedCommittee = await committees.findOne({ diff --git a/pages/api/committees/times/index.ts b/pages/api/committees/times/[period-id]/index.ts similarity index 66% rename from pages/api/committees/times/index.ts rename to pages/api/committees/times/[period-id]/index.ts index 39d8ed47..ba8f91da 100644 --- a/pages/api/committees/times/index.ts +++ b/pages/api/committees/times/[period-id]/index.ts @@ -4,14 +4,21 @@ import { createCommittee, deleteCommittee, updateCommitteeMessage, -} from "../../../../lib/mongo/committees"; +} from "../../../../../lib/mongo/committees"; import { getServerSession } from "next-auth"; -import { authOptions } from "../../auth/[...nextauth]"; -import { hasSession, isInCommitee } from "../../../../lib/utils/apiChecks"; -import { isCommitteeType } from "../../../../lib/utils/validators"; +import { authOptions } from "../../../auth/[...nextauth]"; +import { hasSession, isInCommitee } from "../../../../../lib/utils/apiChecks"; +import { isCommitteeType } from "../../../../../lib/utils/validators"; const handler = async (req: NextApiRequest, res: NextApiResponse) => { const session = await getServerSession(req, res, authOptions); + const periodId = req.query["period-id"]; + + if (!periodId || typeof periodId !== "string") { + return res + .status(400) + .json({ error: "Invalid or missing periodId parameter" }); + } if (!hasSession(res, session)) return; if (!isInCommitee(res, session)) return; @@ -26,7 +33,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { try { const { committee, error } = await createCommittee( committeeData, - session!.user?.committees ?? [] + session!.user?.committees ?? [], + periodId ); if (error) throw new Error(error); diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index 36eed713..33e3c4b8 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -1,7 +1,11 @@ import { NextPage } from "next"; import { useEffect, useState } from "react"; import { useSession } from "next-auth/react"; -import { applicantType, periodType } from "../../../../lib/types/types"; +import { + applicantType, + committeeInterviewType, + periodType, +} from "../../../../lib/types/types"; import { useRouter } from "next/router"; import ApplicantsOverview from "../../../../components/applicantoverview/ApplicantsOverview"; import { @@ -28,6 +32,8 @@ const CommitteeApplicantOverView: NextPage = () => { const [tabClicked, setTabClicked] = useState(0); const [hasAccess, setHasAccess] = useState(false); + const [committeeInterviewTimes, setCommitteeInterviewTimes] = + useState(null); useEffect(() => { if (!session || !periodId) return; @@ -42,11 +48,40 @@ const CommitteeApplicantOverView: NextPage = () => { } }; + fetchPeriod(); + }, [periodId]); + + useEffect(() => { + if (!session || !periodId || !committee) return; + + const fetchCommitteeInterviewTimes = async () => { + if (!session || committeeInterviewTimes) { + return; + } + if (period?._id === undefined) return; + + try { + const response = await fetch( + `/api/committees/times/${period?._id}/${committee}` + ); + const data = await response.json(); + console.log(data); + if (response.ok) { + setCommitteeInterviewTimes(data.period); + } else { + throw new Error(data.error || "Unknown error"); + } + } catch (error) { + console.error("Error checking period:", error); + } finally { + setLoading(false); + } + }; + const checkAccess = () => { if (!period) { return; } - const userCommittees = session?.user?.committees?.map((committee) => committee.toLowerCase() ); @@ -63,15 +98,14 @@ const CommitteeApplicantOverView: NextPage = () => { ); if (commonCommittees.includes(committee)) { setHasAccess(true); - setLoading(false); + fetchCommitteeInterviewTimes(); } else { setLoading(false); } }; - fetchPeriod(); checkAccess(); - }, [session, periodId, period]); + }, [period]); if (loading) { return ; @@ -129,14 +163,22 @@ const CommitteeApplicantOverView: NextPage = () => { title: "Intervjutider", icon: , content: ( - + ), }, // { // title: "Melding", // icon: , // content: ( - // + // // ), // }, // { From f6b04e3c5628ddfad21e79f1e9e0142a890e0583 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 21:36:57 +0200 Subject: [PATCH 05/80] refactored sendCommitteeMessage --- .../committee/CommitteeInterviewTimes.tsx | 21 +++---- components/committee/SendCommitteeMessage.tsx | 56 +++++-------------- .../[period-id]/[committee]/index.tsx | 28 +++++----- 3 files changed, 37 insertions(+), 68 deletions(-) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index 1a7df891..5bfbc37f 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -51,37 +51,34 @@ const CommitteeInterviewTimes = ({ }, [period]); useEffect(() => { - if (committee && Array.isArray(committeeInterviewTimes)) { + if (committee && committeeInterviewTimes) { const cleanString = (input: string) => input .replace(/[\x00-\x1F\x7F-\x9F]/g, "") .trim() .toLowerCase(); - const relevantTimes = committeeInterviewTimes.filter((time) => { - const cleanCommittee = cleanString(time.committee); - const cleanSelectedCommittee = cleanString(committee); - return cleanCommittee === cleanSelectedCommittee; - }); + const cleanCommittee = cleanString(committeeInterviewTimes.committee); + const cleanSelectedCommittee = cleanString(committee); - if (relevantTimes.length > 0) { + if (cleanCommittee === cleanSelectedCommittee) { setHasAlreadySubmitted(true); - const events = relevantTimes.flatMap((time) => - time.availabletimes.map((at: any) => ({ + const events = committeeInterviewTimes.availabletimes.map( + (at: any) => ({ start: new Date(at.start).toISOString(), end: new Date(at.end).toISOString(), - })) + }) ); setCalendarEvents(events); - setSelectedTimeslot(relevantTimes[0].timeslot); + setSelectedTimeslot(committeeInterviewTimes.timeslot); } else { setHasAlreadySubmitted(false); setCalendarEvents([]); setSelectedTimeslot("15"); } } - }, [period, committee, committeeInterviewTimes]); + }, [committeeInterviewTimes]); const createInterval = (selectionInfo: any) => { const event = { diff --git a/components/committee/SendCommitteeMessage.tsx b/components/committee/SendCommitteeMessage.tsx index 2cf5073d..9db56c1e 100644 --- a/components/committee/SendCommitteeMessage.tsx +++ b/components/committee/SendCommitteeMessage.tsx @@ -10,16 +10,17 @@ import toast from "react-hot-toast"; interface Props { period: periodType | null; committee: string; + committeeInterviewTimes: committeeInterviewType | null; tabClicked: number; } -const SendCommitteeMessage = ({ period, committee, tabClicked }: Props) => { - const { data: session } = useSession(); - const [isLoading, setIsLoading] = useState(true); +const SendCommitteeMessage = ({ + committee, + committeeInterviewTimes, +}: Props) => { const router = useRouter(); const periodId = router.query["period-id"] as string; - const [committeeInterviewTimes, setCommitteeInterviewTimes] = - useState(); + const [committeeHasSubmitedTimes, setCommitteeHasSubmitedTimes] = useState(false); @@ -27,52 +28,25 @@ const SendCommitteeMessage = ({ period, committee, tabClicked }: Props) => { useState(false); const [message, setMessage] = useState(""); - useEffect(() => { - const fetchCommitteeInterviewTimes = async () => { - if (!session) { - return; - } - if (period?._id === undefined) return; - - try { - const response = await fetch( - `/api/committees/times/${period?._id}/${committee}` - ); - const data = await response.json(); - console.log(data); - if (response.ok) { - setCommitteeInterviewTimes(data); - } else { - throw new Error(data.error || "Unknown error"); - } - } catch (error) { - console.error("Error checking period:", error); - } finally { - setIsLoading(false); - } - }; - - fetchCommitteeInterviewTimes(); - }, [tabClicked]); + const [updatedCommitteeInterviewTimes, setUpdatedCommitteeInterviewTimes] = + useState(committeeInterviewTimes); useEffect(() => { - if (committeeInterviewTimes) { + if (updatedCommitteeInterviewTimes) { setCommitteeHasSubmitedTimes(true); - if (committeeInterviewTimes.message === "") { + if (updatedCommitteeInterviewTimes.message === "") { setCommitteeHasSubmitedMessage(false); } else { setCommitteeHasSubmitedMessage(true); - setMessage(committeeInterviewTimes.message); + setMessage(updatedCommitteeInterviewTimes.message); } - setMessage(committeeInterviewTimes.message || ""); + setMessage(updatedCommitteeInterviewTimes.message || ""); } else { setCommitteeHasSubmitedTimes(false); setCommitteeHasSubmitedMessage(false); setMessage(""); } - - console.log(message); - }, [committeeInterviewTimes]); + }, [updatedCommitteeInterviewTimes]); const handleMessageChange = (value: string) => { setMessage(value); @@ -99,7 +73,7 @@ const SendCommitteeMessage = ({ period, committee, tabClicked }: Props) => { } const updatedData = await res.json(); - setCommitteeInterviewTimes(updatedData); + setUpdatedCommitteeInterviewTimes(updatedData); toast.success("Innsending er vellykket!"); } catch (error) { toast.error("Det skjede en feil under innsendingen!"); @@ -107,8 +81,6 @@ const SendCommitteeMessage = ({ period, committee, tabClicked }: Props) => { } }; - if (isLoading) return ; - return (

diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index 33e3c4b8..ba70f69f 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -65,9 +65,8 @@ const CommitteeApplicantOverView: NextPage = () => { `/api/committees/times/${period?._id}/${committee}` ); const data = await response.json(); - console.log(data); if (response.ok) { - setCommitteeInterviewTimes(data.period); + setCommitteeInterviewTimes(data.committees[0]); } else { throw new Error(data.error || "Unknown error"); } @@ -105,7 +104,7 @@ const CommitteeApplicantOverView: NextPage = () => { }; checkAccess(); - }, [period]); + }, [period, tabClicked]); if (loading) { return ; @@ -170,17 +169,18 @@ const CommitteeApplicantOverView: NextPage = () => { /> ), }, - // { - // title: "Melding", - // icon: , - // content: ( - // - // ), - // }, + { + title: "Melding", + icon: , + content: ( + + ), + }, // { // title: "Søkere", // icon: , From 0cf6f74824f177cac90dfadba6a2e211662c6f7c Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 21:50:33 +0200 Subject: [PATCH 06/80] refactored sendCommitteeMessage --- components/committee/SendCommitteeMessage.tsx | 16 +++++++--------- .../committee/[period-id]/[committee]/index.tsx | 11 ++++++++--- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/components/committee/SendCommitteeMessage.tsx b/components/committee/SendCommitteeMessage.tsx index 9db56c1e..8e1e85b4 100644 --- a/components/committee/SendCommitteeMessage.tsx +++ b/components/committee/SendCommitteeMessage.tsx @@ -28,25 +28,22 @@ const SendCommitteeMessage = ({ useState(false); const [message, setMessage] = useState(""); - const [updatedCommitteeInterviewTimes, setUpdatedCommitteeInterviewTimes] = - useState(committeeInterviewTimes); - useEffect(() => { - if (updatedCommitteeInterviewTimes) { + if (committeeInterviewTimes) { setCommitteeHasSubmitedTimes(true); - if (updatedCommitteeInterviewTimes.message === "") { + if (committeeInterviewTimes.message === "") { setCommitteeHasSubmitedMessage(false); } else { setCommitteeHasSubmitedMessage(true); - setMessage(updatedCommitteeInterviewTimes.message); + setMessage(committeeInterviewTimes.message); } - setMessage(updatedCommitteeInterviewTimes.message || ""); + setMessage(committeeInterviewTimes.message || ""); } else { setCommitteeHasSubmitedTimes(false); setCommitteeHasSubmitedMessage(false); setMessage(""); } - }, [updatedCommitteeInterviewTimes]); + }, [committeeInterviewTimes]); const handleMessageChange = (value: string) => { setMessage(value); @@ -73,7 +70,8 @@ const SendCommitteeMessage = ({ } const updatedData = await res.json(); - setUpdatedCommitteeInterviewTimes(updatedData); + setMessage(updatedData.message); + setCommitteeHasSubmitedMessage(true); toast.success("Innsending er vellykket!"); } catch (error) { toast.error("Det skjede en feil under innsendingen!"); diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index ba70f69f..b710f909 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -55,7 +55,7 @@ const CommitteeApplicantOverView: NextPage = () => { if (!session || !periodId || !committee) return; const fetchCommitteeInterviewTimes = async () => { - if (!session || committeeInterviewTimes) { + if (!session) { return; } if (period?._id === undefined) return; @@ -77,6 +77,12 @@ const CommitteeApplicantOverView: NextPage = () => { } }; + fetchCommitteeInterviewTimes(); + }, [tabClicked, period]); + + useEffect(() => { + if (!session || !periodId || !committee) return; + const checkAccess = () => { if (!period) { return; @@ -97,14 +103,13 @@ const CommitteeApplicantOverView: NextPage = () => { ); if (commonCommittees.includes(committee)) { setHasAccess(true); - fetchCommitteeInterviewTimes(); } else { setLoading(false); } }; checkAccess(); - }, [period, tabClicked]); + }, [period]); if (loading) { return ; From 62191c8c535d8d38588882d795116cb73a02e9f1 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sat, 20 Jul 2024 22:06:22 +0200 Subject: [PATCH 07/80] refactored ApplicantOverview --- .../applicantoverview/ApplicantsOverview.tsx | 8 ++++--- lib/mongo/applicants.ts | 6 ++++- .../[period-id]/[committee].ts} | 18 ++++++++++----- .../[period-id]/[committee]/index.tsx | 22 +++++++++---------- 4 files changed, 34 insertions(+), 20 deletions(-) rename pages/api/committees/{[period-id]/index.ts => applicants/[period-id]/[committee].ts} (67%) diff --git a/components/applicantoverview/ApplicantsOverview.tsx b/components/applicantoverview/ApplicantsOverview.tsx index bf05c862..a95674d9 100644 --- a/components/applicantoverview/ApplicantsOverview.tsx +++ b/components/applicantoverview/ApplicantsOverview.tsx @@ -11,7 +11,8 @@ import ApplicantOverviewSkeleton from "./ApplicantOverviewSkeleton"; interface Props { period: periodType | null; - committees: string[] | null; + committees?: string[] | null; + committee?: string; includePreferences: boolean; } @@ -24,6 +25,7 @@ const isPreferencesType = ( const ApplicantsOverview = ({ period, committees, + committee, includePreferences, }: Props) => { const [filteredApplicants, setFilteredApplicants] = useState( @@ -47,7 +49,7 @@ const ApplicantsOverview = ({ const apiUrl = includePreferences ? `/api/applicants/${period?._id}` - : `/api/committees/${period?._id}`; + : `/api/committees/applicants/${period?._id}/${committee}`; useEffect(() => { const fetchApplicants = async () => { @@ -206,7 +208,7 @@ const ApplicantsOverview = ({ ref={filterMenuRef} className="absolute right-0 top-10 w-48 bg-white dark:bg-online-darkBlue border border-gray-300 dark:border-gray-600 p-4 rounded shadow-lg z-10" > - {committees && ( + {Array.isArray(committees) && (
Date: Sun, 21 Jul 2024 13:54:00 +0200 Subject: [PATCH 11/80] . --- components/committee/CommitteeInterviewTimes.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index 5bfbc37f..4ec28e3c 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -104,7 +104,7 @@ const CommitteeInterviewTimes = ({ const dataToSend = { periodId: period!._id, period_name: period!.name, - committee: committee, //TODO FJERN + committee: committee, availabletimes: formattedEvents, timeslot: `${selectedTimeslot}`, message: "", From b646ad5f17cbd61e47d0f894e482616e420d1cf9 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sun, 21 Jul 2024 13:58:36 +0200 Subject: [PATCH 12/80] refactoring --- components/committee/CommitteApplicants.tsx | 105 -------------------- pages/committee/index.tsx | 93 ++++++++++++++++- 2 files changed, 88 insertions(+), 110 deletions(-) delete mode 100644 components/committee/CommitteApplicants.tsx diff --git a/components/committee/CommitteApplicants.tsx b/components/committee/CommitteApplicants.tsx deleted file mode 100644 index 1cf377f3..00000000 --- a/components/committee/CommitteApplicants.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { NextPage } from "next"; -import { useEffect, useState } from "react"; -import { useSession } from "next-auth/react"; -import Table from "../Table"; -import { formatDate } from "../../lib/utils/dateUtils"; -import { periodType } from "../../lib/types/types"; - -interface Props { - routeString: string; -} - -const CommitteeApplicants: NextPage = ({ routeString }) => { - const { data: session } = useSession(); - const [periods, setPeriods] = useState([]); - - const fetchPeriods = async () => { - try { - const response = await fetch("/api/periods"); - const data = await response.json(); - const userCommittees = session?.user?.committees || []; - - // Viser bare aktuelle perioder - const filteredPeriods = data.periods.filter((period: periodType) => - period.committees.some((committee: string) => - userCommittees.includes(committee.toLowerCase()) - ) - ); - - setPeriods( - filteredPeriods.map((period: periodType) => { - const userCommittees = session?.user?.committees?.map((committee) => - committee.toLowerCase() - ); - const periodCommittees = period.committees.map((committee) => - committee.toLowerCase() - ); - - period.optionalCommittees.forEach((committee) => { - periodCommittees.push(committee.toLowerCase()); - }); - - const commonCommittees = userCommittees!.filter((committee) => - periodCommittees.includes(committee) - ); - - let uriLink = ""; - - if (commonCommittees.length > 1) { - uriLink = `committee/${period._id}`; - } else { - uriLink = `committee/${period._id}/${commonCommittees[0]}`; - } - - return { - name: period.name, - preparation: - formatDate(period.preparationPeriod.start) + - " til " + - formatDate(period.preparationPeriod.end), - application: - formatDate(period.applicationPeriod.start) + - " til " + - formatDate(period.applicationPeriod.end), - interview: - formatDate(period.interviewPeriod.start) + - " til " + - formatDate(period.interviewPeriod.end), - committees: period.committees, - link: uriLink, - }; - }) - ); - } catch (error) { - console.error("Failed to fetch application periods:", error); - } - }; - - useEffect(() => { - fetchPeriods(); - }, []); - - const periodsColumns = [ - { label: "Navn", field: "name" }, - { label: "Forberedelse", field: "preparation" }, - { label: "Søknad", field: "application" }, - { label: "Intervju", field: "interview" }, - ]; - - if (!session || !session.user?.isCommitee) { - return

Ingen tilgang!

; - } - - return ( -
-

Velg opptak

-
- {periods.length > 0 && ( - - )} - - - ); -}; - -export default CommitteeApplicants; diff --git a/pages/committee/index.tsx b/pages/committee/index.tsx index 8702b245..25fbd279 100644 --- a/pages/committee/index.tsx +++ b/pages/committee/index.tsx @@ -1,12 +1,90 @@ import type { NextPage } from "next"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useSession } from "next-auth/react"; -import CommitteeInterViewTimes from "../../components/committee/CommitteeInterviewTimes"; -import CommitteeApplicants from "../../components/committee/CommitteApplicants"; +import Table from "../../components/Table"; +import { formatDate } from "../../lib/utils/dateUtils"; +import { periodType } from "../../lib/types/types"; const Committee: NextPage = () => { const { data: session } = useSession(); - const [activeTab, setActiveTab] = useState(0); + const [periods, setPeriods] = useState([]); + + const fetchPeriods = async () => { + try { + const response = await fetch("/api/periods"); + const data = await response.json(); + const userCommittees = session?.user?.committees || []; + + // Viser bare aktuelle perioder + const filteredPeriods = data.periods.filter((period: periodType) => + period.committees.some((committee: string) => + userCommittees.includes(committee.toLowerCase()) + ) + ); + + setPeriods( + filteredPeriods.map((period: periodType) => { + const userCommittees = session?.user?.committees?.map((committee) => + committee.toLowerCase() + ); + const periodCommittees = period.committees.map((committee) => + committee.toLowerCase() + ); + + period.optionalCommittees.forEach((committee) => { + periodCommittees.push(committee.toLowerCase()); + }); + + const commonCommittees = userCommittees!.filter((committee) => + periodCommittees.includes(committee) + ); + + let uriLink = ""; + + if (commonCommittees.length > 1) { + uriLink = `committee/${period._id}`; + } else { + uriLink = `committee/${period._id}/${commonCommittees[0]}`; + } + + return { + name: period.name, + preparation: + formatDate(period.preparationPeriod.start) + + " til " + + formatDate(period.preparationPeriod.end), + application: + formatDate(period.applicationPeriod.start) + + " til " + + formatDate(period.applicationPeriod.end), + interview: + formatDate(period.interviewPeriod.start) + + " til " + + formatDate(period.interviewPeriod.end), + committees: period.committees, + link: uriLink, + }; + }) + ); + } catch (error) { + console.error("Failed to fetch application periods:", error); + } + }; + + useEffect(() => { + fetchPeriods(); + }, []); + + const periodsColumns = [ + { label: "Navn", field: "name" }, + { label: "Forberedelse", field: "preparation" }, + { label: "Søknad", field: "application" }, + { label: "Intervju", field: "interview" }, + ]; + + if (!session || !session.user?.isCommitee) { + return

Ingen tilgang!

; + } if (!session || !session.user?.isCommitee) { return

Ingen tilgang!

; @@ -14,7 +92,12 @@ const Committee: NextPage = () => { return (
- +

Velg opptak

+
+ {periods.length > 0 && ( +
+ )} + ); }; From b0ebea79f812326a4735f691235a4cac592092d8 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sun, 21 Jul 2024 14:01:47 +0200 Subject: [PATCH 13/80] loading page --- pages/committee/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/committee/index.tsx b/pages/committee/index.tsx index 25fbd279..651aaf93 100644 --- a/pages/committee/index.tsx +++ b/pages/committee/index.tsx @@ -4,10 +4,12 @@ import { useSession } from "next-auth/react"; import Table from "../../components/Table"; import { formatDate } from "../../lib/utils/dateUtils"; import { periodType } from "../../lib/types/types"; +import LoadingPage from "../../components/LoadingPage"; const Committee: NextPage = () => { const { data: session } = useSession(); const [periods, setPeriods] = useState([]); + const [isLoading, setIsLoading] = useState(true); const fetchPeriods = async () => { try { @@ -68,6 +70,8 @@ const Committee: NextPage = () => { ); } catch (error) { console.error("Failed to fetch application periods:", error); + } finally { + setIsLoading(false); } }; @@ -86,8 +90,8 @@ const Committee: NextPage = () => { return

Ingen tilgang!

; } - if (!session || !session.user?.isCommitee) { - return

Ingen tilgang!

; + if (isLoading) { + return ; } return ( From e3090ea070158acf189c591d38f30be2c9dc4260 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 14:32:12 +0200 Subject: [PATCH 14/80] merged the two utils folders, and deleted unused types.ts file --- components/committee/Schedule.tsx | 2 +- components/committee/ScheduleColumn.tsx | 2 +- {utils => lib/utils}/capitalizeFirstLetter.ts | 0 {utils => lib/utils}/getBaseUrl.ts | 0 {utils => lib/utils}/getTimeSlots.ts | 0 {utils => lib/utils}/sendEmail.ts | 0 pages/api/applicants/index.ts | 4 ++-- types.ts | 23 ------------------- 8 files changed, 4 insertions(+), 27 deletions(-) rename {utils => lib/utils}/capitalizeFirstLetter.ts (100%) rename {utils => lib/utils}/getBaseUrl.ts (100%) rename {utils => lib/utils}/getTimeSlots.ts (100%) rename {utils => lib/utils}/sendEmail.ts (100%) delete mode 100644 types.ts diff --git a/components/committee/Schedule.tsx b/components/committee/Schedule.tsx index 23d4f491..bdb18461 100644 --- a/components/committee/Schedule.tsx +++ b/components/committee/Schedule.tsx @@ -1,5 +1,5 @@ import ScheduleColumn from "./ScheduleColumn"; -import getTimeSlots from "../../utils/getTimeSlots"; +import getTimeSlots from "../../lib/utils/getTimeSlots"; import { useState, useEffect } from "react"; import { DeepPartial, applicantType } from "../../lib/types/types"; diff --git a/components/committee/ScheduleColumn.tsx b/components/committee/ScheduleColumn.tsx index bb572414..eb5973aa 100644 --- a/components/committee/ScheduleColumn.tsx +++ b/components/committee/ScheduleColumn.tsx @@ -1,6 +1,6 @@ import ScheduleCell from "./ScheduleCell"; import { useState } from "react"; -import getTimeSlots from "../../utils/getTimeSlots"; +import getTimeSlots from "../../lib/utils/getTimeSlots"; interface Props { date: string; diff --git a/utils/capitalizeFirstLetter.ts b/lib/utils/capitalizeFirstLetter.ts similarity index 100% rename from utils/capitalizeFirstLetter.ts rename to lib/utils/capitalizeFirstLetter.ts diff --git a/utils/getBaseUrl.ts b/lib/utils/getBaseUrl.ts similarity index 100% rename from utils/getBaseUrl.ts rename to lib/utils/getBaseUrl.ts diff --git a/utils/getTimeSlots.ts b/lib/utils/getTimeSlots.ts similarity index 100% rename from utils/getTimeSlots.ts rename to lib/utils/getTimeSlots.ts diff --git a/utils/sendEmail.ts b/lib/utils/sendEmail.ts similarity index 100% rename from utils/sendEmail.ts rename to lib/utils/sendEmail.ts diff --git a/pages/api/applicants/index.ts b/pages/api/applicants/index.ts index c324db4a..da40e134 100644 --- a/pages/api/applicants/index.ts +++ b/pages/api/applicants/index.ts @@ -7,8 +7,8 @@ import { emailDataType } from "../../../lib/types/types"; import { isApplicantType } from "../../../lib/utils/validators"; import { isAdmin, hasSession, checkOwId } from "../../../lib/utils/apiChecks"; import { SESClient, SendEmailCommand } from "@aws-sdk/client-ses"; -import capitalizeFirstLetter from "../../../utils/capitalizeFirstLetter"; -import sendEmail from "../../../utils/sendEmail"; +import capitalizeFirstLetter from "../../../lib/utils/capitalizeFirstLetter"; +import sendEmail from "../../../lib/utils/sendEmail"; import { changeDisplayName } from "../../../lib/utils/toString"; const handler = async (req: NextApiRequest, res: NextApiResponse) => { diff --git a/types.ts b/types.ts deleted file mode 100644 index e266ba41..00000000 --- a/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -export interface IUser { - name: string; - email: string; -} - -export interface DBapplicant { - id: String; - feminit: Boolean; - about: String; - bankkom: Boolean; - committeechoice1: String; - committeechoice2: String; - committeechoice3: String; - email: String; - informatikkyear: Number; - name: String; - phone: String; -} - -export interface ValidDates { - year: string; - dates: string[][]; -} From 0765c77894e302fc0b3ce12de34ce97234737caf Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 14:37:43 +0200 Subject: [PATCH 15/80] Removed preparation period --- components/committee/CommitteApplicants.tsx | 5 ---- lib/mongo/periods.ts | 5 ---- lib/types/types.ts | 4 ---- lib/utils/PeriodValidator.ts | 20 ++-------------- lib/utils/validators.ts | 10 +------- pages/admin/index.tsx | 5 ---- pages/admin/new-period.tsx | 26 +-------------------- 7 files changed, 4 insertions(+), 71 deletions(-) diff --git a/components/committee/CommitteApplicants.tsx b/components/committee/CommitteApplicants.tsx index 2a4cd078..18bd65ef 100644 --- a/components/committee/CommitteApplicants.tsx +++ b/components/committee/CommitteApplicants.tsx @@ -30,10 +30,6 @@ const CommitteeApplicants: NextPage = ({ routeString }) => { filteredPeriods.map((period: periodType) => { return { name: period.name, - preparation: - formatDate(period.preparationPeriod.start) + - " til " + - formatDate(period.preparationPeriod.end), application: formatDate(period.applicationPeriod.start) + " til " + @@ -58,7 +54,6 @@ const CommitteeApplicants: NextPage = ({ routeString }) => { const periodsColumns = [ { label: "Navn", field: "name" }, - { label: "Forberedelse", field: "preparation" }, { label: "Søknad", field: "application" }, { label: "Intervju", field: "interview" }, ]; diff --git a/lib/mongo/periods.ts b/lib/mongo/periods.ts index 2be006e2..d677a4d0 100644 --- a/lib/mongo/periods.ts +++ b/lib/mongo/periods.ts @@ -63,11 +63,6 @@ export const getCurrentPeriods = async () => { const filter = { $or: [ - { - // Check if current ISO date string is within the preparation period - "preparationPeriod.start": { $lte: currentDate }, - "preparationPeriod.end": { $gte: currentDate }, - }, { // Check if current ISO date string is within the application period "applicationPeriod.start": { $lte: currentDate }, diff --git a/lib/types/types.ts b/lib/types/types.ts index f1e28104..79807105 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -66,10 +66,6 @@ export type periodType = { _id: ObjectId; name: string; description: string; - preparationPeriod: { - start: Date; - end: Date; - }; applicationPeriod: { start: Date; end: Date; diff --git a/lib/utils/PeriodValidator.ts b/lib/utils/PeriodValidator.ts index 7d4e43d3..2f343b90 100644 --- a/lib/utils/PeriodValidator.ts +++ b/lib/utils/PeriodValidator.ts @@ -4,8 +4,6 @@ import { DeepPartial, periodType } from "../types/types"; export const validatePeriod = ( periodData: DeepPartial ): boolean => { - const prepStart = periodData.preparationPeriod?.start; - const prepEnd = periodData.preparationPeriod?.end; const appStart = periodData.applicationPeriod?.start; const appEnd = periodData.applicationPeriod?.end; const intStart = periodData.interviewPeriod?.start; @@ -14,32 +12,18 @@ export const validatePeriod = ( const optionalCommittees = periodData.optionalCommittees; // Check for undefined or empty fields - if ( - !periodData.name || - !prepStart || - !prepEnd || - !appStart || - !appEnd || - !intStart || - !intEnd - ) { + if (!periodData.name || !appStart || !appEnd || !intStart || !intEnd) { toast.error("Alle feltene må fylles ut."); return false; } - // Check date sequence and overlaps - if (prepEnd > appStart) { - toast.error("Forberedelsesperioden må slutte før søknadsperioden starter."); - return false; - } - if (appEnd > intStart) { toast.error("Søknadsperioden må slutte før intervju perioden starter."); return false; } // Check for overlapping dates within the same period - if (prepStart > prepEnd || appStart > appEnd || intStart > intEnd) { + if (appStart > appEnd || intStart > intEnd) { toast.error("Startdatoer må være før sluttdatoer."); return false; } diff --git a/lib/utils/validators.ts b/lib/utils/validators.ts index eaf1d6c3..845ff253 100644 --- a/lib/utils/validators.ts +++ b/lib/utils/validators.ts @@ -84,15 +84,12 @@ export const isPeriodType = (data: any): data is periodType => { }; const arePeriodsValid = ( - preparationPeriod: any, applicationPeriod: any, interviewPeriod: any ): boolean => { return ( - isChronological(preparationPeriod.start, preparationPeriod.end) && isChronological(applicationPeriod.start, applicationPeriod.end) && isChronological(interviewPeriod.start, interviewPeriod.end) && - new Date(preparationPeriod.end) <= new Date(applicationPeriod.start) && new Date(applicationPeriod.end) <= new Date(interviewPeriod.start) ); }; @@ -100,16 +97,11 @@ export const isPeriodType = (data: any): data is periodType => { const hasBasicFields = typeof data.name === "string" && typeof data.description === "string" && - isValidPeriod(data.preparationPeriod) && isValidPeriod(data.applicationPeriod) && isValidPeriod(data.interviewPeriod) && Array.isArray(data.committees) && data.committees.every((committee: any) => typeof committee === "string") && - arePeriodsValid( - data.preparationPeriod, - data.applicationPeriod, - data.interviewPeriod - ); + arePeriodsValid(data.applicationPeriod, data.interviewPeriod); return hasBasicFields; }; diff --git a/pages/admin/index.tsx b/pages/admin/index.tsx index e7836035..8d5160e5 100644 --- a/pages/admin/index.tsx +++ b/pages/admin/index.tsx @@ -22,10 +22,6 @@ const Admin = () => { return { id: period._id, name: period.name, - preparation: - formatDate(period.preparationPeriod.start) + - " til " + - formatDate(period.preparationPeriod.end), application: formatDate(period.applicationPeriod.start) + " til " + @@ -66,7 +62,6 @@ const Admin = () => { const periodsColumns = [ { label: "Navn", field: "name" }, - { label: "Forberedelse", field: "preparation" }, { label: "Søknad", field: "application" }, { label: "Intervju", field: "interview" }, { label: "Delete", field: "delete" }, diff --git a/pages/admin/new-period.tsx b/pages/admin/new-period.tsx index 768cd4f2..b465b8b7 100644 --- a/pages/admin/new-period.tsx +++ b/pages/admin/new-period.tsx @@ -18,10 +18,6 @@ const NewPeriod = () => { const [periodData, setPeriodData] = useState>({ name: "", description: "", - preparationPeriod: { - start: undefined, - end: undefined, - }, applicationPeriod: { start: undefined, end: undefined, @@ -34,22 +30,6 @@ const NewPeriod = () => { optionalCommittees: [], }); - const updatePreparationPeriodDates = ({ - start, - end, - }: { - start: string; - end: string; - }) => { - setPeriodData((prevData) => ({ - ...prevData, - preparationPeriod: { - start: start ? new Date(start) : undefined, - end: end ? new Date(end) : undefined, - }, - })); - }; - const updateApplicationPeriodDates = ({ start, end, @@ -159,7 +139,7 @@ const NewPeriod = () => { }) } /> -
+
Date: Sun, 21 Jul 2024 16:37:57 +0200 Subject: [PATCH 16/80] removed unused imports and types --- pages/committee/[period-id]/[committee]/index.tsx | 1 - pages/committee/[period-id]/index.tsx | 3 --- 2 files changed, 4 deletions(-) diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index a48e7430..f12571ec 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -2,7 +2,6 @@ import { NextPage } from "next"; import { useEffect, useState } from "react"; import { useSession } from "next-auth/react"; import { - applicantType, committeeInterviewType, periodType, } from "../../../../lib/types/types"; diff --git a/pages/committee/[period-id]/index.tsx b/pages/committee/[period-id]/index.tsx index 3519c0ce..73637161 100644 --- a/pages/committee/[period-id]/index.tsx +++ b/pages/committee/[period-id]/index.tsx @@ -1,6 +1,5 @@ import { useRouter } from "next/router"; import { useEffect, useState } from "react"; -import { periodType } from "../../../lib/types/types"; import { useSession } from "next-auth/react"; import LoadingPage from "../../../components/LoadingPage"; import CommitteeCard from "../../../components/committee/CommitteeCard"; @@ -9,7 +8,6 @@ const ChooseCommittee = () => { const { data: session } = useSession(); const router = useRouter(); const periodId = router.query["period-id"]; - const [period, setPeriod] = useState(null); const [committees, setCommittees] = useState(null); const [loading, setLoading] = useState(true); @@ -20,7 +18,6 @@ const ChooseCommittee = () => { try { const res = await fetch(`/api/periods/${periodId}`); const data = await res.json(); - setPeriod(data.period); if (data.period) { const userCommittees = session!.user!.committees; From 355d5b03a18a1439d4bb34d44e5e84912c3af897 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:16:19 +0200 Subject: [PATCH 17/80] beginning of committes page --- pages/api/periods/ow-committees.ts | 4 ++ pages/committees.tsx | 62 ++++++++++++++++++++++++++++++ pages/index.tsx | 5 ++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 pages/committees.tsx diff --git a/pages/api/periods/ow-committees.ts b/pages/api/periods/ow-committees.ts index dae6dfdf..0359aa33 100644 --- a/pages/api/periods/ow-committees.ts +++ b/pages/api/periods/ow-committees.ts @@ -71,10 +71,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { name_short: string; name_long: string; email?: string; + application_description?: string; + image?: { xs: string }; }) => ({ name_short: group.name_short, name_long: group.name_long, email: group.email || "No email provided", + description: group.application_description || "", + image: group?.image?.xs || "", }) ) ); diff --git a/pages/committees.tsx b/pages/committees.tsx new file mode 100644 index 00000000..ec1ca879 --- /dev/null +++ b/pages/committees.tsx @@ -0,0 +1,62 @@ +import { useEffect, useState } from "react"; + +const Committees = () => { + const [isLoading, setIsLoading] = useState(true); + const [committees, setCommittees] = useState([]); + + const fetchCommittees = async () => { + try { + const response = await fetch("/api/periods/ow-committees"); + const data = await response.json(); + setCommittees(data); + console.log(data); + } catch (error) { + console.error("Failed to fetch committees:", error); + } finally { + setIsLoading(false); + } + }; + + useEffect(() => { + fetchCommittees(); + }, []); + + if (isLoading) return
Vent litt...
; + + return ( +
+
+
+

+ Onlines komiteer +

+

+ blabla her skal det stå noe om hva en komite er og at man kan se her + alle komiteer man kan søke på osv. +

+
+
+ {committees?.map((committee) => { + return ( +
+
+ {committee.name_long} +
+

+ {committee.name_long}{" "} + {committee.name_long != committee.name_short && + "(" + committee.name_short + ")"} +

+

+ {committee.description || "Ingen beskrivelse :("} +

+
+ ); + })} +
+
+
+ ); +}; + +export default Committees; diff --git a/pages/index.tsx b/pages/index.tsx index 7f514445..5196407a 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -12,10 +12,10 @@ const Home = () => { return (
-

+

Vennligst logg inn for å få tilgang til opptakssystemet

-
+
@@ -41,6 +41,7 @@ const Home = () => { href="/apply" />
From b9e4cc01f92441edc50aa48c22583f5663e0f0d8 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:19:46 +0200 Subject: [PATCH 18/80] added key --- pages/committees.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index ec1ca879..952287c4 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -36,9 +36,9 @@ const Committees = () => {

- {committees?.map((committee) => { + {committees?.map((committee, index) => { return ( -
+
{committee.name_long}
From 30963c2979df1bfe13433ca2f95b0703b033fe4b Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:21:44 +0200 Subject: [PATCH 19/80] add loading page --- pages/committees.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index 952287c4..fe86caa2 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from "react"; +import LoadingPage from "../components/LoadingPage"; const Committees = () => { const [isLoading, setIsLoading] = useState(true); @@ -21,7 +22,7 @@ const Committees = () => { fetchCommittees(); }, []); - if (isLoading) return
Vent litt...
; + if (isLoading) return ; return (
From c338195931fbe744a6e131e65be9bf8c46bbc7fe Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:23:12 +0200 Subject: [PATCH 20/80] max 2 cols --- pages/committees.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index fe86caa2..396fffbc 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -36,7 +36,7 @@ const Committees = () => { alle komiteer man kan søke på osv.

-
+
{committees?.map((committee, index) => { return (
From 1c45abcfe1a83a2422cd4753b0be0d0186654c29 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:29:12 +0200 Subject: [PATCH 21/80] add owCommitteeType --- lib/types/types.ts | 8 ++++++++ pages/api/periods/ow-committees.ts | 23 ++++++++--------------- pages/committees.tsx | 7 ++++--- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/types/types.ts b/lib/types/types.ts index f1e28104..80b725d7 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -95,3 +95,11 @@ export type committeeInterviewType = { timeslot: string; message: string; }; + +export type owCommitteeType = { + name_short: string; + name_long: string; + email?: string; + application_description?: string; + image?: { xs: string }; +}; diff --git a/pages/api/periods/ow-committees.ts b/pages/api/periods/ow-committees.ts index 0359aa33..e541c5cf 100644 --- a/pages/api/periods/ow-committees.ts +++ b/pages/api/periods/ow-committees.ts @@ -2,6 +2,7 @@ import { NextApiRequest, NextApiResponse } from "next"; import { authOptions } from "../auth/[...nextauth]"; import { getServerSession } from "next-auth"; import { hasSession } from "../../../lib/utils/apiChecks"; +import { owCommitteeType } from "../../../lib/types/types"; const handler = async (req: NextApiRequest, res: NextApiResponse) => { const session = await getServerSession(req, res, authOptions); @@ -66,21 +67,13 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { (group: { name_short: string }) => !excludedCommitteeNames.includes(group.name_short) // Exclude committees by name_short ) - .map( - (group: { - name_short: string; - name_long: string; - email?: string; - application_description?: string; - image?: { xs: string }; - }) => ({ - name_short: group.name_short, - name_long: group.name_long, - email: group.email || "No email provided", - description: group.application_description || "", - image: group?.image?.xs || "", - }) - ) + .map((group: owCommitteeType) => ({ + name_short: group.name_short, + name_long: group.name_long, + email: group.email, + application_description: group.application_description, + image: group?.image, + })) ); hasMorePages = !!data.next; diff --git a/pages/committees.tsx b/pages/committees.tsx index 396fffbc..c9c9ae7a 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -1,9 +1,10 @@ import { useEffect, useState } from "react"; import LoadingPage from "../components/LoadingPage"; +import { owCommitteeType } from "../lib/types/types"; const Committees = () => { const [isLoading, setIsLoading] = useState(true); - const [committees, setCommittees] = useState([]); + const [committees, setCommittees] = useState([]); const fetchCommittees = async () => { try { @@ -41,7 +42,7 @@ const Committees = () => { return (
- {committee.name_long} + {committee.name_long}

{committee.name_long}{" "} @@ -49,7 +50,7 @@ const Committees = () => { "(" + committee.name_short + ")"}

- {committee.description || "Ingen beskrivelse :("} + {committee.application_description || "Ingen beskrivelse :("}

); From e3cbf3d701f0a4b6ab638d38c032fe33e0b5db06 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:40:51 +0200 Subject: [PATCH 22/80] added email --- pages/committees.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index c9c9ae7a..28a69efe 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -44,11 +44,14 @@ const Committees = () => {
{committee.name_long}
-

+

{committee.name_long}{" "} {committee.name_long != committee.name_short && "(" + committee.name_short + ")"}

+

+ {committee.email} +

{committee.application_description || "Ingen beskrivelse :("}

From e47a97f08ae43929ae171cc4d0adf888dcb66724 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 17:54:20 +0200 Subject: [PATCH 23/80] CommitteeAboutCard --- components/CommitteeAboutCard.tsx | 27 +++++++++++++++++++++++++++ lib/types/types.ts | 2 ++ pages/committees.tsx | 20 ++------------------ 3 files changed, 31 insertions(+), 18 deletions(-) create mode 100644 components/CommitteeAboutCard.tsx diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx new file mode 100644 index 00000000..f9b1a8f0 --- /dev/null +++ b/components/CommitteeAboutCard.tsx @@ -0,0 +1,27 @@ +import { owCommitteeType } from "../lib/types/types"; + +const CommitteeAboutCard = ({ + image, + name_long, + name_short, + email, + description_short, + desctiption_long, +}: owCommitteeType) => { + return ( +
+
+ {name_long} +
+

+ {name_long} {name_long != name_short && "(" + name_short + ")"} +

+

{email}

+

+ {description_short || "Ingen beskrivelse :("} +

+
+ ); +}; + +export default CommitteeAboutCard; diff --git a/lib/types/types.ts b/lib/types/types.ts index 80b725d7..02259915 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -100,6 +100,8 @@ export type owCommitteeType = { name_short: string; name_long: string; email?: string; + desctiption_long?: string; + description_short?: string; application_description?: string; image?: { xs: string }; }; diff --git a/pages/committees.tsx b/pages/committees.tsx index 28a69efe..3081a532 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -1,6 +1,7 @@ import { useEffect, useState } from "react"; import LoadingPage from "../components/LoadingPage"; import { owCommitteeType } from "../lib/types/types"; +import CommitteeAboutCard from "../components/CommitteeAboutCard"; const Committees = () => { const [isLoading, setIsLoading] = useState(true); @@ -39,24 +40,7 @@ const Committees = () => {
{committees?.map((committee, index) => { - return ( -
-
- {committee.name_long} -
-

- {committee.name_long}{" "} - {committee.name_long != committee.name_short && - "(" + committee.name_short + ")"} -

-

- {committee.email} -

-

- {committee.application_description || "Ingen beskrivelse :("} -

-
- ); + return ; })}
From bf1d3fdae67da8532bfedf75938241b89d218373 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 18:08:14 +0200 Subject: [PATCH 24/80] updated card --- components/CommitteeAboutCard.tsx | 24 ++++++++++++++++++++---- lib/types/types.ts | 3 +-- pages/api/periods/ow-committees.ts | 3 ++- public/Online_svart_o.svg | 18 ++++++++++++++++++ 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 public/Online_svart_o.svg diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index f9b1a8f0..c9f590b8 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -1,3 +1,4 @@ +import { useState } from "react"; import { owCommitteeType } from "../lib/types/types"; const CommitteeAboutCard = ({ @@ -6,20 +7,35 @@ const CommitteeAboutCard = ({ name_short, email, description_short, - desctiption_long, + description_long, }: owCommitteeType) => { + const [showMore, setShowMore] = useState(false); + return (
- {name_long} + {name_long}

- {name_long} {name_long != name_short && "(" + name_short + ")"} + {name_long} {name_long !== name_short && `(${name_short})`}

{email}

- {description_short || "Ingen beskrivelse :("} + {(showMore ? description_long : description_short) || + "Ingen beskrivelse :("}

+ {description_long && description_long != description_short && ( + + )}
); }; diff --git a/lib/types/types.ts b/lib/types/types.ts index 02259915..08354d09 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -100,8 +100,7 @@ export type owCommitteeType = { name_short: string; name_long: string; email?: string; - desctiption_long?: string; + description_long?: string; description_short?: string; - application_description?: string; image?: { xs: string }; }; diff --git a/pages/api/periods/ow-committees.ts b/pages/api/periods/ow-committees.ts index e541c5cf..bc32052a 100644 --- a/pages/api/periods/ow-committees.ts +++ b/pages/api/periods/ow-committees.ts @@ -71,7 +71,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { name_short: group.name_short, name_long: group.name_long, email: group.email, - application_description: group.application_description, + description_short: group.description_short, + description_long: group.description_long, image: group?.image, })) ); diff --git a/public/Online_svart_o.svg b/public/Online_svart_o.svg new file mode 100644 index 00000000..dbb76e13 --- /dev/null +++ b/public/Online_svart_o.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + From 5dbeb385982eca11f79865e4ca64b70cf2e5c19e Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 18:15:30 +0200 Subject: [PATCH 25/80] pre-wrap and title description --- components/CommitteeAboutCard.tsx | 2 +- pages/committees.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index c9f590b8..9078a068 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -24,7 +24,7 @@ const CommitteeAboutCard = ({ {name_long} {name_long !== name_short && `(${name_short})`}

{email}

-

+

{(showMore ? description_long : description_short) || "Ingen beskrivelse :("}

diff --git a/pages/committees.tsx b/pages/committees.tsx index 3081a532..bf133a16 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -34,8 +34,8 @@ const Committees = () => { Onlines komiteer

- blabla her skal det stå noe om hva en komite er og at man kan se her - alle komiteer man kan søke på osv. + Komitémedlemmer får Online til å gå rundt, og arbeider for at alle + informatikkstudenter skal ha en flott studiehverdag.

From 2cc25cdba4cba1ecdb5302fb4caec2bd929986c1 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 18:19:32 +0200 Subject: [PATCH 26/80] make landing page more responsive with 3 buttons --- pages/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 5196407a..935255f3 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -33,7 +33,7 @@ const Home = () => { Her skal det stå masse kult om komitéopptak og sånn og om at man må bli med i komité og at dette er det bra opptakssystem og sånn.

-
+
From 75dbb457822e7e014619966833e61186f1ae9ca4 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 19:46:25 +0200 Subject: [PATCH 27/80] Fetch all ow-committees with one request --- pages/api/periods/ow-committees.ts | 57 ++++++++++++------------------ 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/pages/api/periods/ow-committees.ts b/pages/api/periods/ow-committees.ts index dae6dfdf..e0848ec8 100644 --- a/pages/api/periods/ow-committees.ts +++ b/pages/api/periods/ow-committees.ts @@ -14,10 +14,9 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { } try { - const baseUrl = "https://old.online.ntnu.no/api/v1/group/online-groups/"; - let groups = []; - let page = 1; - let hasMorePages = true; + const baseUrl = + "https://old.online.ntnu.no/api/v1/group/online-groups/?page_size=999"; + const excludedCommitteeNames = [ "HS", "Komiteledere", @@ -48,41 +47,29 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { "X-Sport", ]; - while (hasMorePages) { - const response = await fetch(`${baseUrl}?page=${page}`); + const response = await fetch(baseUrl); - if (!response.ok) { - throw new Error("Failed to fetch data"); - } + if (!response.ok) { + throw new Error("Failed to fetch data"); + } - const data = await response.json(); + const data = await response.json(); - groups.push( - ...data.results - // .filter( - // (group: { group_type: string }) => group.group_type === "committee" - // ) - .filter( - (group: { name_short: string }) => - !excludedCommitteeNames.includes(group.name_short) // Exclude committees by name_short - ) - .map( - (group: { - name_short: string; - name_long: string; - email?: string; - }) => ({ - name_short: group.name_short, - name_long: group.name_long, - email: group.email || "No email provided", - }) - ) + const groups = data.results + // .filter( + // (group: { group_type: string }) => group.group_type === "committee" + // ) + .filter( + (group: { name_short: string }) => + !excludedCommitteeNames.includes(group.name_short) // Exclude committees by name_short + ) + .map( + (group: { name_short: string; name_long: string; email?: string }) => ({ + name_short: group.name_short, + name_long: group.name_long, + email: group.email || "No email provided", + }) ); - - hasMorePages = !!data.next; - page++; - } - return res.status(200).json(groups); } catch (error) { console.error(error); From afa5402a9acebc74ac50909289cf8225d40b83b4 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 20:29:28 +0200 Subject: [PATCH 28/80] Created new ImportantNote component --- components/ImportantNote.tsx | 38 +++++++++++++++++++ .../committee/CommitteeInterviewTimes.tsx | 30 ++++----------- components/committee/Schedule.tsx | 32 ++++++---------- 3 files changed, 57 insertions(+), 43 deletions(-) create mode 100644 components/ImportantNote.tsx diff --git a/components/ImportantNote.tsx b/components/ImportantNote.tsx new file mode 100644 index 00000000..9ade2dcf --- /dev/null +++ b/components/ImportantNote.tsx @@ -0,0 +1,38 @@ +import React from "react"; + +const ImportantNote = ({ + prefix, + text, + isLoading, +}: { + prefix: string; + text: string | React.ReactNode; + isLoading?: boolean; +}) => { + return ( +
+ + + + {isLoading ? ( +
+ ) : ( +
+ {prefix} + {text} +
+ )} +
+ ); +}; + +export default ImportantNote; diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index 4ec28e3c..d08b0d04 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -8,7 +8,7 @@ import { periodType, committeeInterviewType } from "../../lib/types/types"; import toast from "react-hot-toast"; import NotFound from "../../pages/404"; import Button from "../Button"; -import LoadingPage from "../LoadingPage"; +import ImportantNote from "../ImportantNote"; interface Interview { start: string; @@ -224,9 +224,9 @@ const CommitteeInterviewTimes = ({ useEffect(() => { if (period) { + setCountdown(getSubmissionDeadline()); const intervalId = setInterval(() => { - const deadline = getSubmissionDeadline(); - setCountdown(deadline); + setCountdown(getSubmissionDeadline()); }, 1000); return () => clearInterval(intervalId); } @@ -280,27 +280,13 @@ const CommitteeInterviewTimes = ({ return (
-
+
Legg inn ledige tider for intervjuer
-
- - - -
- NB! - Fristen for å legge inn tider er {countdown} -
-
+

Velg ledige tider ved å trykke på eller dra over flere celler. diff --git a/components/committee/Schedule.tsx b/components/committee/Schedule.tsx index 23d4f491..b89210eb 100644 --- a/components/committee/Schedule.tsx +++ b/components/committee/Schedule.tsx @@ -2,6 +2,7 @@ import ScheduleColumn from "./ScheduleColumn"; import getTimeSlots from "../../utils/getTimeSlots"; import { useState, useEffect } from "react"; import { DeepPartial, applicantType } from "../../lib/types/types"; +import ImportantNote from "../ImportantNote"; interface Props { interviewLength: number; @@ -161,27 +162,16 @@ export default function Schedule({ return (

-
- - - -
- Valgfritt - Legg til tider du  - IKKE er ledig for - intervju. Flere ledige tider øker sjansen for automatisk tildeling av - intervjutider! -
-
+ + Legg inn tider du IKKE +  er ledig for intervju. Flere ledige tider øker sjansen for + automatisk tildeling av intervjutider! + + } + />
From 138566a36efa22d6aca3fb5f77d2bda7513524da Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 20:38:54 +0200 Subject: [PATCH 29/80] Created AvailabilityIndicator component --- components/committee/Schedule.tsx | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/components/committee/Schedule.tsx b/components/committee/Schedule.tsx index 23d4f491..0be52b6c 100644 --- a/components/committee/Schedule.tsx +++ b/components/committee/Schedule.tsx @@ -182,17 +182,9 @@ export default function Schedule({ intervjutider!
-
-
-
- Jeg er ledig -
-
-
-
- Jeg er IKKE ledig -
-
+
+ +
@@ -218,3 +210,18 @@ export default function Schedule({
); } + +const AvailabilityIndicator = ({ isAvailable }: { isAvailable?: boolean }) => { + return ( +
+
+
+ Jeg er {!isAvailable && IKKE} ledig +
+
+ ); +}; From e6329a4504de7f8cd14ab62814e05cc1fbc2250e Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 21:38:19 +0200 Subject: [PATCH 30/80] Removed unused packages --- package-lock.json | 2699 +++------------------------------------------ package.json | 20 - 2 files changed, 145 insertions(+), 2574 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e154af6..79c8d9e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,39 +14,20 @@ "@fullcalendar/react": "^6.1.11", "@fullcalendar/timegrid": "^6.1.11", "@heroicons/react": "^2.1.3", - "@prisma/client": "^4.16.2", - "@reduxjs/toolkit": "^1.9.7", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "github:tailwindcss/typography", - "@tanstack/react-query": "^4.36.1", "@types/mongodb": "^4.0.7", - "axios": "^0.28.0", - "bcrypt": "^5.1.0", - "cookie-parser": "^1.4.6", - "dotenv": "^16.3.1", - "eslint-config-prettier": "^8.5.0", - "express": "^4.18.2", - "js-cookie": "^3.0.5", "mongodb": "^6.1.0", - "mongoose": "^7.5.4", "next": "^12.3.4", "next-auth": "^4.24.5", - "next-cookies": "^2.0.3", - "node-fetch": "^3.3.2", - "prisma-generate": "^0.0.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0", "react-loading-skeleton": "^3.4.0", - "react-markdown": "^8.0.3", - "react-redux": "^8.1.3", - "styled-components": "^6.1.11", "validator": "^13.11.0" }, "devDependencies": { - "@types/bcrypt": "^5.0.0", - "@types/js-cookie": "^3.0.6", "@types/node": "18.7.21", "@types/react": "18.0.21", "@types/react-dom": "18.0.6", @@ -56,7 +37,6 @@ "eslint-config-next": "12.3.1", "postcss": "^8.4.16", "prettier": "3.0.3", - "prisma": "^4.16.2", "tailwindcss": "^3.1.8", "typescript": "4.8.3" } @@ -705,28 +685,11 @@ "node": ">=6.9.0" } }, - "node_modules/@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", - "dependencies": { - "@emotion/memoize": "^0.8.1" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" - }, - "node_modules/@emotion/unitless": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", - "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" - }, "node_modules/@eslint/eslintrc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -803,6 +766,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", "deprecated": "Use @eslint/config-array instead", + "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -816,6 +780,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" @@ -825,6 +790,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, "engines": { "node": ">=12.22" }, @@ -837,7 +803,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "deprecated": "Use @eslint/object-schema instead" + "deprecated": "Use @eslint/object-schema instead", + "dev": true }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -939,63 +906,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/@mongodb-js/saslprep": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz", @@ -1262,61 +1172,6 @@ "node": ">=14" } }, - "node_modules/@prisma/client": { - "version": "4.16.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", - "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", - "hasInstallScript": true, - "dependencies": { - "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" - }, - "engines": { - "node": ">=14.17" - }, - "peerDependencies": { - "prisma": "*" - }, - "peerDependenciesMeta": { - "prisma": { - "optional": true - } - } - }, - "node_modules/@prisma/engines": { - "version": "4.16.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.16.2.tgz", - "integrity": "sha512-vx1nxVvN4QeT/cepQce68deh/Turxy5Mr+4L4zClFuK1GlxN3+ivxfuv+ej/gvidWn1cE1uAhW7ALLNlYbRUAw==", - "devOptional": true, - "hasInstallScript": true - }, - "node_modules/@prisma/engines-version": { - "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", - "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" - }, - "node_modules/@reduxjs/toolkit": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", - "integrity": "sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==", - "dependencies": { - "immer": "^9.0.21", - "redux": "^4.2.1", - "redux-thunk": "^2.4.2", - "reselect": "^4.1.8" - }, - "peerDependencies": { - "react": "^16.9.0 || ^17.0.0 || ^18", - "react-redux": "^7.2.1 || ^8.0.2" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-redux": { - "optional": true - } - } - }, "node_modules/@rushstack/eslint-patch": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz", @@ -1879,100 +1734,12 @@ "tailwindcss": ">=3.0.0 || insiders" } }, - "node_modules/@tanstack/query-core": { - "version": "4.36.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.36.1.tgz", - "integrity": "sha512-DJSilV5+ytBP1FbFcEJovv4rnnm/CokuVvrBEtW/Va9DvuJ3HksbXUJEpI0aV1KtuL4ZoO9AVE6PyNLzF7tLeA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-query": { - "version": "4.36.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.36.1.tgz", - "integrity": "sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==", - "dependencies": { - "@tanstack/query-core": "4.36.1", - "use-sync-external-store": "^1.2.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-native": "*" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, - "node_modules/@types/bcrypt": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.2.tgz", - "integrity": "sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/cookie": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.3.3.tgz", - "integrity": "sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==" - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/hast": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", - "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", - "dependencies": { - "@types/unist": "^2" - } - }, - "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", - "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", - "dependencies": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, - "node_modules/@types/js-cookie": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz", - "integrity": "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==", - "dev": true - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/mdast": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", - "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", - "dependencies": { - "@types/unist": "^2" - } - }, "node_modules/@types/mongodb": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-4.0.7.tgz", @@ -1982,25 +1749,23 @@ "mongodb": "*" } }, - "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" - }, "node_modules/@types/node": { "version": "18.7.21", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.21.tgz", - "integrity": "sha512-rLFzK5bhM0YPyCoTC8bolBjMk7bwnZ8qeZUBslBfjZQou2ssJdWslx9CZ8DGM+Dx7QXQiiTVZ/6QO6kwtHkZCA==" + "integrity": "sha512-rLFzK5bhM0YPyCoTC8bolBjMk7bwnZ8qeZUBslBfjZQou2ssJdWslx9CZ8DGM+Dx7QXQiiTVZ/6QO6kwtHkZCA==", + "dev": true }, "node_modules/@types/prop-types": { "version": "15.7.12", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "dev": true }, "node_modules/@types/react": { "version": "18.0.21", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz", "integrity": "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==", + "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -2011,7 +1776,7 @@ "version": "18.0.6", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", - "devOptional": true, + "dev": true, "dependencies": { "@types/react": "*" } @@ -2019,22 +1784,8 @@ "node_modules/@types/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==" - }, - "node_modules/@types/stylis": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", - "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==" - }, - "node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" - }, - "node_modules/@types/use-sync-external-store": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", - "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==", + "dev": true }, "node_modules/@types/validator": { "version": "13.12.0", @@ -2156,27 +1907,11 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -2188,25 +1923,16 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -2257,24 +1983,6 @@ "node": ">= 8" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "deprecated": "This package is no longer supported.", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -2283,7 +1991,8 @@ "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==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/aria-query": { "version": "5.1.3", @@ -2310,11 +2019,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, "node_modules/array-includes": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", @@ -2339,6 +2043,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, "engines": { "node": ">=8" } @@ -2475,11 +2180,6 @@ "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, "node_modules/autoprefixer": { "version": "10.4.19", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", @@ -2541,16 +2241,6 @@ "node": ">=4" } }, - "node_modules/axios": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.28.1.tgz", - "integrity": "sha512-iUcGA5a7p0mVb4Gm/sy+FSECNkPFT4y7wt6OM/CDpO/OnNCvSs3PoMG8ibrC9jRoGYU0gUK5pXVC4NPXq6lHRQ==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, "node_modules/axobject-query": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.1.1.tgz", @@ -2560,33 +2250,11 @@ "deep-equal": "^2.0.5" } }, - "node_modules/bail": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", - "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/bcrypt": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz", - "integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==", - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.11", - "node-addon-api": "^5.0.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -2598,42 +2266,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", @@ -2643,6 +2275,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2699,18 +2332,11 @@ "node": ">=16.20.1" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -2729,6 +2355,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -2741,14 +2368,6 @@ "node": ">= 6" } }, - "node_modules/camelize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", - "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001642", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", @@ -2772,6 +2391,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2783,15 +2403,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -2826,14 +2437,6 @@ "node": ">= 6" } }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2850,34 +2453,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -2889,56 +2464,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", - "dependencies": { - "cookie": "0.4.1", - "cookie-signature": "1.0.6" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -2953,24 +2480,6 @@ "node": ">= 8" } }, - "node_modules/css-color-keywords": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", - "engines": { - "node": ">=4" - } - }, - "node_modules/css-to-react-native": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", - "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", - "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^4.0.2" - } - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -2993,14 +2502,6 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -3056,6 +2557,7 @@ "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -3068,18 +2570,6 @@ } } }, - "node_modules/decode-named-character-reference": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", - "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", - "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/deep-equal": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", @@ -3115,12 +2605,14 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -3150,69 +2642,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "engines": { - "node": ">=8" - } - }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, "dependencies": { "path-type": "^4.0.0" }, @@ -3229,6 +2668,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -3236,27 +2676,11 @@ "node": ">=6.0.0" } }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, "node_modules/electron-to-chromium": { "version": "1.4.828", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.828.tgz", @@ -3268,14 +2692,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/es-abstract": { "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", @@ -3340,6 +2756,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -3351,6 +2768,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -3461,15 +2879,11 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { "node": ">=10" }, @@ -3481,6 +2895,7 @@ "version": "8.24.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.2", "@humanwhocodes/config-array": "^0.10.5", @@ -3558,17 +2973,6 @@ } } }, - "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, "node_modules/eslint-import-resolver-node": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", @@ -3834,6 +3238,7 @@ "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -3849,6 +3254,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -3866,6 +3272,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, "engines": { "node": ">=10" } @@ -3874,6 +3281,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3885,6 +3293,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -3901,6 +3310,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -3912,6 +3322,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -3923,6 +3334,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { "node": ">=4.0" } @@ -3931,89 +3343,16 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.2", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.6.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-glob": { "version": "3.3.2", @@ -4044,12 +3383,14 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, "node_modules/fast-xml-parser": { "version": "4.2.5", @@ -4080,32 +3421,11 @@ "reusify": "^1.0.4" } }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -4124,40 +3444,11 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -4173,6 +3464,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -4185,26 +3477,8 @@ "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true }, "node_modules/for-each": { "version": "0.3.3", @@ -4241,38 +3515,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -4286,40 +3528,11 @@ "url": "https://github.com/sponsors/rawify" } }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -4369,30 +3582,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "deprecated": "This package is no longer supported.", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -4429,6 +3623,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4459,6 +3654,7 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -4489,6 +3685,7 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -4516,6 +3713,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -4526,7 +3724,8 @@ "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true }, "node_modules/has-bigints": { "version": "1.0.2", @@ -4541,6 +3740,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -4549,6 +3749,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -4560,6 +3761,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -4571,6 +3773,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -4593,11 +3796,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -4609,82 +3807,20 @@ "node": ">= 0.4" } }, - "node_modules/hast-util-whitespace": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", - "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, "engines": { "node": ">= 4" } }, - "node_modules/immer": { - "version": "9.0.21", - "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", - "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -4700,6 +3836,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, "engines": { "node": ">=0.8.19" } @@ -4709,6 +3846,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4717,12 +3855,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/inline-style-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", - "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/internal-slot": { "version": "1.0.7", @@ -4742,6 +3876,8 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "optional": true, + "peer": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -4750,14 +3886,6 @@ "node": ">= 12" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -4844,28 +3972,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -5023,17 +4129,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -5216,18 +4311,11 @@ "url": "https://github.com/sponsors/panva" } }, - "node_modules/js-cookie": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", - "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", - "engines": { - "node": ">=14" - } - }, "node_modules/js-sdsl": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/js-sdsl" @@ -5242,6 +4330,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -5252,22 +4341,27 @@ "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "optional": true, + "peer": true }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json5": { "version": "1.0.2", @@ -5296,30 +4390,15 @@ "node": ">=4.0" } }, - "node_modules/kareem": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", - "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "dependencies": { "json-buffer": "3.0.1" } }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" - } - }, "node_modules/language-subtag-registry": { "version": "0.3.23", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", @@ -5342,6 +4421,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -5367,6 +4447,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -5414,591 +4495,29 @@ "node": ">=10" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/mdast-util-definitions": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", - "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "unist-util-visit": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-from-markdown": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", - "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "mdast-util-to-string": "^3.1.0", - "micromark": "^3.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-decode-string": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "unist-util-stringify-position": "^3.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-hast": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", - "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", - "dependencies": { - "@types/hast": "^2.0.0", - "@types/mdast": "^3.0.0", - "mdast-util-definitions": "^5.0.0", - "micromark-util-sanitize-uri": "^1.1.0", - "trim-lines": "^3.0.0", - "unist-util-generated": "^2.0.0", - "unist-util-position": "^4.0.0", - "unist-util-visit": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", - "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", - "dependencies": { - "@types/mdast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromark": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", - "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "micromark-core-commonmark": "^1.0.1", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-core-commonmark": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", - "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-factory-destination": "^1.0.0", - "micromark-factory-label": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-factory-title": "^1.0.0", - "micromark-factory-whitespace": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-html-tag-name": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-factory-destination": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", - "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-label": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", - "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-factory-space": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz", - "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-title": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", - "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-whitespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", - "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-character": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz", - "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-chunked": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", - "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-classify-character": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", - "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-combine-extensions": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", - "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", - "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-decode-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", - "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", - "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-html-tag-name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", - "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-normalize-identifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", - "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-resolve-all": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", - "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", - "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-subtokenize": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", - "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz", - "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", - "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" + "node": ">= 8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dependencies": { - "mime-db": "1.52.0" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { - "node": ">= 0.6" + "node": ">=8.6" } }, "node_modules/mini-svg-data-uri": { @@ -6013,6 +4532,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6037,40 +4557,6 @@ "node": ">=8" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mongodb": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.8.0.tgz", @@ -6125,152 +4611,11 @@ "whatwg-url": "^13.0.0" } }, - "node_modules/mongoose": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.7.0.tgz", - "integrity": "sha512-+HcoN/hmkB5IjAqWYA2ZAQeExGD8FNMe6L/eTYB04gqp9S2ZEngVivGkdtGrA4BYRf0suH+3rMNFW2JPOqC4Mg==", - "dependencies": { - "bson": "^5.5.0", - "kareem": "2.5.1", - "mongodb": "5.9.2", - "mpath": "0.9.0", - "mquery": "5.0.0", - "ms": "2.1.3", - "sift": "16.0.1" - }, - "engines": { - "node": ">=14.20.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mongoose" - } - }, - "node_modules/mongoose/node_modules/@types/whatwg-url": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", - "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", - "dependencies": { - "@types/node": "*", - "@types/webidl-conversions": "*" - } - }, - "node_modules/mongoose/node_modules/bson": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz", - "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==", - "engines": { - "node": ">=14.20.1" - } - }, - "node_modules/mongoose/node_modules/mongodb": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.2.tgz", - "integrity": "sha512-H60HecKO4Bc+7dhOv4sJlgvenK4fQNqqUIlXxZYQNbfEWSALGAwGoyJd/0Qwk4TttFXUOHJ2ZJQe/52ScaUwtQ==", - "dependencies": { - "bson": "^5.5.0", - "mongodb-connection-string-url": "^2.6.0", - "socks": "^2.7.1" - }, - "engines": { - "node": ">=14.20.1" - }, - "optionalDependencies": { - "@mongodb-js/saslprep": "^1.1.0" - }, - "peerDependencies": { - "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.0.0", - "kerberos": "^1.0.0 || ^2.0.0", - "mongodb-client-encryption": ">=2.3.0 <3", - "snappy": "^7.2.2" - }, - "peerDependenciesMeta": { - "@aws-sdk/credential-providers": { - "optional": true - }, - "@mongodb-js/zstd": { - "optional": true - }, - "kerberos": { - "optional": true - }, - "mongodb-client-encryption": { - "optional": true - }, - "snappy": { - "optional": true - } - } - }, - "node_modules/mongoose/node_modules/mongodb-connection-string-url": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", - "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", - "dependencies": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^11.0.0" - } - }, - "node_modules/mongoose/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/mongoose/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/mongoose/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/mpath": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", - "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mquery": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", - "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", - "dependencies": { - "debug": "4.x" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "engines": { - "node": ">=4" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/mz": { "version": "2.7.0", @@ -6302,15 +4647,8 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" - } + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/next": { "version": "12.3.4", @@ -6407,14 +4745,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/next-cookies": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/next-cookies/-/next-cookies-2.0.3.tgz", - "integrity": "sha512-YVCQzwZx+sz+KqLO4y9niHH9jjz6jajlEQbAKfsYVT6DOfngb/0k5l6vFK4rmpExVug96pGag8OBsdSRL9FZhQ==", - "dependencies": { - "universal-cookie": "^4.0.2" - } - }, "node_modules/next/node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -6446,66 +4776,12 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6523,18 +4799,6 @@ "node": ">=0.10.0" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "deprecated": "This package is no longer supported.", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, "node_modules/oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -6560,6 +4824,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -6681,21 +4946,11 @@ "node": "^10.13.0 || >=12.0.0" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } @@ -6718,6 +4973,7 @@ "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -6734,6 +4990,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6748,6 +5005,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -6767,6 +5025,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -6774,18 +5033,11 @@ "node": ">=6" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -6794,6 +5046,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -6831,15 +5084,11 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, "engines": { "node": ">=8" } @@ -7062,6 +5311,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "engines": { "node": ">= 0.8.0" } @@ -7086,64 +5336,17 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" }, - "node_modules/prisma": { - "version": "4.16.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.16.2.tgz", - "integrity": "sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g==", - "devOptional": true, - "hasInstallScript": true, - "dependencies": { - "@prisma/engines": "4.16.2" - }, - "bin": { - "prisma": "build/index.js", - "prisma2": "build/index.js" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/prisma-generate": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prisma-generate/-/prisma-generate-0.0.0.tgz", - "integrity": "sha512-XzJ5qAWp+ZX6Ler/24Shfr/1DyCzyLnWvK04ceTyDxTClKb7F02AJ5aQ51Dxet331YiWgVDTW9FDftZI+HC4hg==" - }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, - "node_modules/property-information": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", - "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -7152,20 +5355,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7185,28 +5374,6 @@ } ] }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -7256,7 +5423,8 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "node_modules/react-loading-skeleton": { "version": "3.4.0", @@ -7266,84 +5434,6 @@ "react": ">=16.8.0" } }, - "node_modules/react-markdown": { - "version": "8.0.7", - "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.7.tgz", - "integrity": "sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==", - "dependencies": { - "@types/hast": "^2.0.0", - "@types/prop-types": "^15.0.0", - "@types/unist": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^2.0.0", - "prop-types": "^15.0.0", - "property-information": "^6.0.0", - "react-is": "^18.0.0", - "remark-parse": "^10.0.0", - "remark-rehype": "^10.0.0", - "space-separated-tokens": "^2.0.0", - "style-to-object": "^0.4.0", - "unified": "^10.0.0", - "unist-util-visit": "^4.0.0", - "vfile": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - }, - "peerDependencies": { - "@types/react": ">=16", - "react": ">=16" - } - }, - "node_modules/react-markdown/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, - "node_modules/react-redux": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", - "integrity": "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==", - "dependencies": { - "@babel/runtime": "^7.12.1", - "@types/hoist-non-react-statics": "^3.3.1", - "@types/use-sync-external-store": "^0.0.3", - "hoist-non-react-statics": "^3.3.2", - "react-is": "^18.0.0", - "use-sync-external-store": "^1.0.0" - }, - "peerDependencies": { - "@types/react": "^16.8 || ^17.0 || ^18.0", - "@types/react-dom": "^16.8 || ^17.0 || ^18.0", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0", - "react-native": ">=0.59", - "redux": "^4 || ^5.0.0-beta.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - }, - "redux": { - "optional": true - } - } - }, - "node_modules/react-redux/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -7352,44 +5442,15 @@ "pify": "^2.3.0" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dependencies": { "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "dependencies": { - "@babel/runtime": "^7.9.2" - } - }, - "node_modules/redux-thunk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.2.tgz", - "integrity": "sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q==", - "peerDependencies": { - "redux": "^4" + }, + "engines": { + "node": ">=8.10.0" } }, "node_modules/reflect.getprototypeof": { @@ -7440,6 +5501,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, "engines": { "node": ">=8" }, @@ -7447,40 +5509,6 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/remark-parse": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz", - "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-from-markdown": "^1.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-rehype": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-10.1.0.tgz", - "integrity": "sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==", - "dependencies": { - "@types/hast": "^2.0.0", - "@types/mdast": "^3.0.0", - "mdast-util-to-hast": "^12.1.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -7501,6 +5529,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "engines": { "node": ">=4" } @@ -7519,6 +5548,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -7551,17 +5581,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "dependencies": { - "mri": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -7580,25 +5599,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", @@ -7616,11 +5616,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -7633,6 +5628,7 @@ "version": "7.6.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, "bin": { "semver": "bin/semver.js" }, @@ -7640,70 +5636,11 @@ "node": ">=10" } }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -7731,16 +5668,6 @@ "node": ">= 0.4" } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7764,6 +5691,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -7777,20 +5705,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/sift": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", - "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, "engines": { "node": ">=8" } @@ -7799,6 +5718,8 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "optional": true, + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -7808,6 +5729,8 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "optional": true, + "peer": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -7825,15 +5748,6 @@ "node": ">=0.10.0" } }, - "node_modules/space-separated-tokens": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", - "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/sparse-bitfield": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", @@ -7845,15 +5759,9 @@ "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "optional": true, + "peer": true }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", @@ -7867,14 +5775,6 @@ "node": ">= 0.4" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -8043,6 +5943,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, "engines": { "node": ">=8" }, @@ -8055,73 +5956,6 @@ "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" }, - "node_modules/style-to-object": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz", - "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==", - "dependencies": { - "inline-style-parser": "0.1.1" - } - }, - "node_modules/styled-components": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.11.tgz", - "integrity": "sha512-Ui0jXPzbp1phYij90h12ksljKGqF8ncGx+pjrNPsSPhbUUjWT2tD1FwGo2LF6USCnbrsIhNngDfodhxbegfEOA==", - "dependencies": { - "@emotion/is-prop-valid": "1.2.2", - "@emotion/unitless": "0.8.1", - "@types/stylis": "4.2.5", - "css-to-react-native": "3.2.0", - "csstype": "3.1.3", - "postcss": "8.4.38", - "shallowequal": "1.1.0", - "stylis": "4.3.2", - "tslib": "2.6.2" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/styled-components" - }, - "peerDependencies": { - "react": ">= 16.8.0", - "react-dom": ">= 16.8.0" - } - }, - "node_modules/styled-components/node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/styled-components/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/styled-jsx": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", @@ -8141,11 +5975,6 @@ } } }, - "node_modules/stylis": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", - "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" - }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", @@ -8220,6 +6049,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -8294,26 +6124,11 @@ "node": ">=4" } }, - "node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true }, "node_modules/thenify": { "version": "3.3.1", @@ -8345,14 +6160,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, "node_modules/tr46": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", @@ -8364,24 +6171,6 @@ "node": ">=14" } }, - "node_modules/trim-lines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", - "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/trough": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", - "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -8429,6 +6218,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -8440,6 +6230,7 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, "engines": { "node": ">=10" }, @@ -8447,18 +6238,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", @@ -8560,113 +6339,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/unified": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", - "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", - "dependencies": { - "@types/unist": "^2.0.0", - "bail": "^2.0.0", - "extend": "^3.0.0", - "is-buffer": "^2.0.0", - "is-plain-obj": "^4.0.0", - "trough": "^2.0.0", - "vfile": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-generated": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", - "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-is": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", - "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-position": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", - "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-stringify-position": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", - "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", - "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0", - "unist-util-visit-parents": "^5.1.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", - "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/universal-cookie": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-4.0.4.tgz", - "integrity": "sha512-lbRVHoOMtItjWbM7TwDLdl8wug7izB0tq3/YVKhT/ahB4VDvWMyvnADfnJI8y6fSvsjh51Ix7lTGC6Tn4rMPhw==", - "dependencies": { - "@types/cookie": "^0.3.3", - "cookie": "^0.4.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/update-browserslist-db": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", @@ -8701,31 +6373,16 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } }, - "node_modules/use-sync-external-store": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", - "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -8738,23 +6395,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/uvu": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", - "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", - "dependencies": { - "dequal": "^2.0.0", - "diff": "^5.0.0", - "kleur": "^4.0.3", - "sade": "^1.7.3" - }, - "bin": { - "uvu": "bin.js" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/validator": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", @@ -8763,50 +6403,6 @@ "node": ">= 0.10" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vfile": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", - "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", - "dependencies": { - "@types/unist": "^2.0.0", - "is-buffer": "^2.0.0", - "unist-util-stringify-position": "^3.0.0", - "vfile-message": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", - "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-stringify-position": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "engines": { - "node": ">= 8" - } - }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -8920,18 +6516,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -9024,7 +6613,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/yallist": { "version": "4.0.0", @@ -9046,6 +6636,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index f5bf422e..693f5999 100644 --- a/package.json +++ b/package.json @@ -17,39 +17,20 @@ "@fullcalendar/react": "^6.1.11", "@fullcalendar/timegrid": "^6.1.11", "@heroicons/react": "^2.1.3", - "@prisma/client": "^4.16.2", - "@reduxjs/toolkit": "^1.9.7", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "github:tailwindcss/typography", - "@tanstack/react-query": "^4.36.1", "@types/mongodb": "^4.0.7", - "axios": "^0.28.0", - "bcrypt": "^5.1.0", - "cookie-parser": "^1.4.6", - "dotenv": "^16.3.1", - "eslint-config-prettier": "^8.5.0", - "express": "^4.18.2", - "js-cookie": "^3.0.5", "mongodb": "^6.1.0", - "mongoose": "^7.5.4", "next": "^12.3.4", "next-auth": "^4.24.5", - "next-cookies": "^2.0.3", - "node-fetch": "^3.3.2", - "prisma-generate": "^0.0.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0", "react-loading-skeleton": "^3.4.0", - "react-markdown": "^8.0.3", - "react-redux": "^8.1.3", - "styled-components": "^6.1.11", "validator": "^13.11.0" }, "devDependencies": { - "@types/bcrypt": "^5.0.0", - "@types/js-cookie": "^3.0.6", "@types/node": "18.7.21", "@types/react": "18.0.21", "@types/react-dom": "18.0.6", @@ -59,7 +40,6 @@ "eslint-config-next": "12.3.1", "postcss": "^8.4.16", "prettier": "3.0.3", - "prisma": "^4.16.2", "tailwindcss": "^3.1.8", "typescript": "4.8.3" } From d65e37613cd647cdec25262eb7017322f9f764e9 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sun, 21 Jul 2024 21:43:54 +0200 Subject: [PATCH 31/80] add room attribute --- lib/types/types.ts | 1 + pages/committee/[period-id]/[committee]/index.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/types/types.ts b/lib/types/types.ts index f1e28104..0091aad3 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -85,6 +85,7 @@ export type periodType = { export type AvailableTime = { start: string; end: string; + room: string; }; export type committeeInterviewType = { diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index f12571ec..0cfc9f23 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -54,7 +54,7 @@ const CommitteeApplicantOverView: NextPage = () => { if (!session || !periodId || !committee) return; const fetchCommitteeInterviewTimes = async () => { - if (!session) { + if (!session.user?.committees?.includes(committee)) { return; } if (period?._id === undefined) return; From fd57128b2b481d9aab7d49a5ff33601eb67d0d94 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 21:52:21 +0200 Subject: [PATCH 32/80] only use application_description --- lib/types/types.ts | 1 + pages/api/periods/ow-committees.ts | 1 + pages/index.tsx | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/types/types.ts b/lib/types/types.ts index 08354d09..625b76e9 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -102,5 +102,6 @@ export type owCommitteeType = { email?: string; description_long?: string; description_short?: string; + application_description?: string; image?: { xs: string }; }; diff --git a/pages/api/periods/ow-committees.ts b/pages/api/periods/ow-committees.ts index 4adee1fa..acf67720 100644 --- a/pages/api/periods/ow-committees.ts +++ b/pages/api/periods/ow-committees.ts @@ -71,6 +71,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { description_short: group.description_short, description_long: group.description_long, image: group?.image, + application_description : group.application_description, })); return res.status(200).json(groups); } catch (error) { diff --git a/pages/index.tsx b/pages/index.tsx index 935255f3..4ff307ed 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -41,7 +41,7 @@ const Home = () => { href="/apply" />
From 5798d78688fc12d1456fb2304e4183fc99c2c009 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 21:52:25 +0200 Subject: [PATCH 33/80] wops --- components/CommitteeAboutCard.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index 9078a068..e4d2ffed 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -1,4 +1,3 @@ -import { useState } from "react"; import { owCommitteeType } from "../lib/types/types"; const CommitteeAboutCard = ({ @@ -6,11 +5,8 @@ const CommitteeAboutCard = ({ name_long, name_short, email, - description_short, - description_long, + application_description, }: owCommitteeType) => { - const [showMore, setShowMore] = useState(false); - return (
@@ -25,17 +21,8 @@ const CommitteeAboutCard = ({

{email}

- {(showMore ? description_long : description_short) || - "Ingen beskrivelse :("} + {application_description || "Ingen opptaksbeskrivelse :("}

- {description_long && description_long != description_short && ( - - )}
); }; From 8b6b3c78875128458befeb95c641d5cd8d8799ce Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 21:55:01 +0200 Subject: [PATCH 34/80] removed preparation --- pages/committee/index.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pages/committee/index.tsx b/pages/committee/index.tsx index 651aaf93..0f88306b 100644 --- a/pages/committee/index.tsx +++ b/pages/committee/index.tsx @@ -51,10 +51,6 @@ const Committee: NextPage = () => { return { name: period.name, - preparation: - formatDate(period.preparationPeriod.start) + - " til " + - formatDate(period.preparationPeriod.end), application: formatDate(period.applicationPeriod.start) + " til " + @@ -81,7 +77,6 @@ const Committee: NextPage = () => { const periodsColumns = [ { label: "Navn", field: "name" }, - { label: "Forberedelse", field: "preparation" }, { label: "Søknad", field: "application" }, { label: "Intervju", field: "interview" }, ]; From baf10d6867b822cdac9fde18517b1e3c849e96e2 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 22:06:19 +0200 Subject: [PATCH 35/80] Rewrote some of the content on about page --- .../applicantoverview/ApplicantCard.tsx | 2 +- pages/about.tsx | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/applicantoverview/ApplicantCard.tsx b/components/applicantoverview/ApplicantCard.tsx index c78f419d..0f7de84c 100644 --- a/components/applicantoverview/ApplicantCard.tsx +++ b/components/applicantoverview/ApplicantCard.tsx @@ -44,7 +44,7 @@ const ApplicantCard = ({ applicant, includePreferences }: Props) => { }`} >

Kontakt:

-

Epost: {applicant?.email}

+

E-post: {applicant?.email}

Telefon: {applicant?.phone}

{includePreferences && ( diff --git a/pages/about.tsx b/pages/about.tsx index 02b8aca5..3464794d 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -5,39 +5,39 @@ const info = [ { icon: , color: "red", - title: "Søkere", + title: "Søker", content: [ "Velg riktig opptaksperiode.", "Fyll inn søknad for opptaket og velg når du kan intervjues.", - "Send inn søknad og motta bekreftelse på epost.", - "Motta epost om innkalling til intervjuer når søknadsfristen er over.", + "Send inn søknad og motta bekreftelse på e-post.", + "Motta e-post om innkalling til intervjuer når søknadsfristen er over.", ], }, { icon: , color: "blue", - title: "Komiteer", + title: "Komitémedlem", content: [ "Velg riktig opptaksperiode.", "Legg inn intervjutider for komiteen din innen søknadsfristen.", - "Motta epost om intervjutider for komiteen når søknadsfristen er over.", + "Motta e-post om intervjutider for komiteen når søknadsfristen er over.", ], }, { - icon: , - color: "green", - title: "Admins", + icon: , + color: "yellow", + title: "Administrator", content: [ - "Opprett opptaksperiode ved å velge datoer og komiteer for opptaket", + "Opprett opptaksperiode ved å velge datoer og komiteer for opptaket.", ], }, ]; const About = () => { return ( -
+
-

+

Hvordan fungerer opptak.online?

@@ -56,8 +56,8 @@ const About = () => { ? "bg-red-100" : item.color === "blue" ? "bg-blue-100" - : item.color === "green" - ? "bg-green-100" + : item.color === "yellow" + ? "bg-yellow-100" : "" } rounded w-min h-min`} > From 7def9c95506d95a2d89121d0cbfdb3e917797def Mon Sep 17 00:00:00 2001 From: fredrir Date: Sun, 21 Jul 2024 22:22:29 +0200 Subject: [PATCH 36/80] room name is now added in committee interview times --- .../committee/CommitteeInterviewTimes.tsx | 75 ++++++++++++++++--- lib/types/types.ts | 2 +- .../[period-id]/[committee]/index.tsx | 1 + 3 files changed, 65 insertions(+), 13 deletions(-) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index d08b0d04..65b0033e 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -11,6 +11,7 @@ import Button from "../Button"; import ImportantNote from "../ImportantNote"; interface Interview { + title: string; start: string; end: string; } @@ -41,6 +42,10 @@ const CommitteeInterviewTimes = ({ useState(false); const [countdown, setCountdown] = useState(""); + const [isModalOpen, setIsModalOpen] = useState(false); + const [currentSelection, setCurrentSelection] = useState(null); + const [roomInput, setRoomInput] = useState(""); + useEffect(() => { if (period) { setVisibleRange({ @@ -65,6 +70,7 @@ const CommitteeInterviewTimes = ({ setHasAlreadySubmitted(true); const events = committeeInterviewTimes.availabletimes.map( (at: any) => ({ + title: at.room, start: new Date(at.start).toISOString(), end: new Date(at.end).toISOString(), }) @@ -80,17 +86,32 @@ const CommitteeInterviewTimes = ({ } }, [committeeInterviewTimes]); - const createInterval = (selectionInfo: any) => { + const handleDateSelect = (selectionInfo: any) => { + setCurrentSelection(selectionInfo); + setIsModalOpen(true); + }; + + const handleRoomSubmit = () => { + if (!roomInput) { + toast.error("Vennligst skriv inn et romnavn"); + return; + } + const event = { - title: "", - start: selectionInfo.start, - end: selectionInfo.end, + title: roomInput, + start: currentSelection.start, + end: currentSelection.end, }; - selectionInfo.view.calendar.addEvent(event); + + currentSelection.view.calendar.addEvent(event); addCell([ - selectionInfo.start.toISOString(), - selectionInfo.end.toISOString(), + roomInput, + currentSelection.start.toISOString(), + currentSelection.end.toISOString(), ]); + + setRoomInput(""); + setIsModalOpen(false); }; const submit = async (e: BaseSyntheticEvent) => { @@ -141,7 +162,10 @@ const CommitteeInterviewTimes = ({ }; const addCell = (cell: string[]) => { - setMarkedCells([...markedCells, { start: cell[0], end: cell[1] }]); + setMarkedCells([ + ...markedCells, + { title: cell[0], start: cell[1], end: cell[2] }, + ]); }; const updateInterviewInterval = (e: BaseSyntheticEvent) => { @@ -150,8 +174,10 @@ const CommitteeInterviewTimes = ({ const renderEventContent = (eventContent: any) => { return ( -
- {eventContent.timeText} +
+

+ {eventContent.event.title} +

{!hasAlreadySubmitted && ( )} @@ -186,6 +212,7 @@ const CommitteeInterviewTimes = ({ const startDateTime = new Date(startDateTimeString); const endDateTime = new Date(endDatetimeString); return { + room: event.title, start: startDateTime.toISOString(), end: endDateTime.toISOString(), }; @@ -332,7 +359,7 @@ const CommitteeInterviewTimes = ({ selectable={!hasAlreadySubmitted} selectMirror={true} height="auto" - select={createInterval} + select={handleDateSelect} slotDuration={`00:${interviewInterval}`} businessHours={{ startTime: "08:00", endTime: "18:00" }} weekends={false} @@ -378,6 +405,30 @@ const CommitteeInterviewTimes = ({ />
+ + {isModalOpen && ( +
+
+

+ Skriv inn navn på rom: +

+ setRoomInput(e.target.value)} + /> +
+
+
+
+ )}
); }; diff --git a/lib/types/types.ts b/lib/types/types.ts index 0091aad3..c918a9b4 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -83,9 +83,9 @@ export type periodType = { }; export type AvailableTime = { + room: string; start: string; end: string; - room: string; }; export type committeeInterviewType = { diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index 0cfc9f23..5d140c74 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -64,6 +64,7 @@ const CommitteeApplicantOverView: NextPage = () => { `/api/committees/times/${period?._id}/${committee}` ); const data = await response.json(); + if (response.ok) { setCommitteeInterviewTimes(data.committees[0]); } else { From 75e5debae720448419b36e24430aa81ad7583317 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 22:22:51 +0200 Subject: [PATCH 37/80] Better titles in committee page --- .../committee/CommitteeInterviewTimes.tsx | 4 ++-- .../[period-id]/[committee]/index.tsx | 22 +++++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index d08b0d04..6fce5d77 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -290,7 +290,7 @@ const CommitteeInterviewTimes = ({

Velg ledige tider ved å trykke på eller dra over flere celler. -

Intervjuene vil bli satt opp etter hverandre fra første ledige +
Intervjuene vil bli satt opp etter hverandre fra første ledige tid.

@@ -320,7 +320,7 @@ const CommitteeInterviewTimes = ({ )}
{ new Date().getTime() ) { return ( -
+

Opptaket er ferdig!


Du kan ikke lenger se søkere eller planlegge intervjuer.

- {" "} Har det skjedd noe feil eller trenger du tilgang til informasjonen? Ta kontakt med{" "} { href="mailto:appkom@online.ntnu.no" > Appkom - {" "} +

); @@ -152,17 +151,12 @@ const CommitteeApplicantOverView: NextPage = () => { return (
- -

- - {` --> `} - -

-
+
+
+

Opptaksperiode: {period?.name}

+

Komité: {changeDisplayName(committee)}

+
+
{ From 83685b728bf0807882a973d435a307fde0c67681 Mon Sep 17 00:00:00 2001 From: fredrir Date: Sun, 21 Jul 2024 22:32:50 +0200 Subject: [PATCH 38/80] responsivnes --- components/committee/CommitteeInterviewTimes.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/committee/CommitteeInterviewTimes.tsx b/components/committee/CommitteeInterviewTimes.tsx index 65b0033e..69e07692 100644 --- a/components/committee/CommitteeInterviewTimes.tsx +++ b/components/committee/CommitteeInterviewTimes.tsx @@ -174,13 +174,10 @@ const CommitteeInterviewTimes = ({ const renderEventContent = (eventContent: any) => { return ( -
-

- {eventContent.event.title} -

+
{!hasAlreadySubmitted && ( )} +

+ {eventContent.event.title} +

); }; From dfd18628ebb3b80404450579dcffec123207c9ea Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 22:50:32 +0200 Subject: [PATCH 39/80] New component PageTitle --- components/PageTitle.tsx | 32 +++++++++++++++++++ pages/application/[period-id].tsx | 8 ++--- .../[period-id]/[committee]/index.tsx | 8 ++--- 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 components/PageTitle.tsx diff --git a/components/PageTitle.tsx b/components/PageTitle.tsx new file mode 100644 index 00000000..2fbe1ebd --- /dev/null +++ b/components/PageTitle.tsx @@ -0,0 +1,32 @@ +import React from 'react'; + +const PageTitle = ({ + mainTitle, + boldMainTitle, + subTitle, + boldSubTitle, +}: { + mainTitle?: string; + boldMainTitle?: string; + subTitle?: string; + boldSubTitle?: string; +}) => { + return ( +
+
+

+ {boldMainTitle && {boldMainTitle}{boldMainTitle && mainTitle && ":"} } + {mainTitle} +

+ {subTitle && ( +

+ {boldSubTitle && {boldSubTitle}{boldSubTitle && subTitle && ":"} } + {subTitle} +

+ )} +
+
+ ); +}; + +export default PageTitle; \ No newline at end of file diff --git a/pages/application/[period-id].tsx b/pages/application/[period-id].tsx index 07772c8d..3c253c48 100644 --- a/pages/application/[period-id].tsx +++ b/pages/application/[period-id].tsx @@ -15,6 +15,7 @@ import { validateApplication } from "../../lib/utils/validateApplication"; import ApplicantCard from "../../components/applicantoverview/ApplicantCard"; import LoadingPage from "../../components/LoadingPage"; import { formatDateNorwegian } from "../../lib/utils/dateUtils"; +import PageTitle from "../../components/PageTitle"; interface FetchedApplicationData { exists: boolean; @@ -238,12 +239,7 @@ const Application: NextPage = () => { return (
- {periodExists && period && ( -

- {period?.name} -

- )} - + { const { data: session } = useSession(); @@ -151,12 +152,7 @@ const CommitteeApplicantOverView: NextPage = () => { return (
-
-
-

Opptaksperiode: {period?.name}

-

Komité: {changeDisplayName(committee)}

-
-
+ { From ffccd4bc19806920625cb5633bde81ce8313cc94 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 21 Jul 2024 22:50:44 +0200 Subject: [PATCH 40/80] =?UTF-8?q?S=C3=B8knadsperiode=20->=20Opptaksperiode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/PeriodValidator.ts | 2 +- pages/admin/new-period.tsx | 4 ++-- pages/apply.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/utils/PeriodValidator.ts b/lib/utils/PeriodValidator.ts index 2f343b90..3db78e4f 100644 --- a/lib/utils/PeriodValidator.ts +++ b/lib/utils/PeriodValidator.ts @@ -18,7 +18,7 @@ export const validatePeriod = ( } if (appEnd > intStart) { - toast.error("Søknadsperioden må slutte før intervju perioden starter."); + toast.error("Søknadsperioden må slutte før intervjuperioden starter."); return false; } diff --git a/pages/admin/new-period.tsx b/pages/admin/new-period.tsx index b465b8b7..94f1d0d7 100644 --- a/pages/admin/new-period.tsx +++ b/pages/admin/new-period.tsx @@ -124,7 +124,7 @@ const NewPeriod = () => { <>

- Ny søknadsperiode + Ny opptaksperiode

@@ -205,7 +205,7 @@ const NewPeriod = () => { onClick={handlePreviewPeriod} />
diff --git a/components/PeriodCard.tsx b/components/PeriodCard.tsx index 53712ac1..b679235e 100644 --- a/components/PeriodCard.tsx +++ b/components/PeriodCard.tsx @@ -33,10 +33,6 @@ const PeriodCard = ({ period }: Props) => { } }, [period._id, session?.user?.owId]); - const handleButtonOnClick = () => { - router.push(`/application/${period._id}`); - }; - return (
@@ -65,10 +61,10 @@ const PeriodCard = ({ period }: Props) => { )}
diff --git a/components/TableCard.tsx b/components/TableCard.tsx index 97e53d07..c0e9d1fb 100644 --- a/components/TableCard.tsx +++ b/components/TableCard.tsx @@ -1,8 +1,4 @@ -import { useRouter } from "next/router"; -import { formatDateNorwegian } from "../lib/utils/dateUtils"; import Button from "./Button"; -import { periodType } from "../lib/types/types"; -import { on } from "events"; import { FaTrash } from "react-icons/fa"; interface Props { @@ -10,54 +6,47 @@ interface Props { onDelete?: (id: string, name: string) => void; } -const TableCard = ({ period, onDelete }: Props) => { - const router = useRouter(); - const handleButtonOnClick = () => { - router.push(period.link); - }; - - return ( -
-
-
-
-

- {period.name} -

- {onDelete && ( - - )} -
- -

- {period.description} -

-

- Søknadsperiode: {period.application} -

-

- Intervjuperiode: {period.interview} -

-
-
- + )}
+ +

+ {period.description} +

+

+ Søknadsperiode: {period.application} +

+

+ Intervjuperiode: {period.interview} +

+
+
+
- ); -}; +
+); export default TableCard; diff --git a/components/committee/CommitteeCard.tsx b/components/committee/CommitteeCard.tsx index 222c3aab..85b691f6 100644 --- a/components/committee/CommitteeCard.tsx +++ b/components/committee/CommitteeCard.tsx @@ -1,6 +1,7 @@ import router from "next/router"; import React from "react"; import Button from "../Button"; +import Link from "next/link"; interface Props { committee: string; @@ -9,16 +10,15 @@ interface Props { const CommitteeCard = ({ committee, link }: Props) => { return ( - + + +
+

+ {committee} +

+
+
+ ); }; diff --git a/pages/admin/index.tsx b/pages/admin/index.tsx index 8d5160e5..16f69a00 100644 --- a/pages/admin/index.tsx +++ b/pages/admin/index.tsx @@ -81,7 +81,7 @@ const Admin = () => {
From c7d61bc056dbfc4be7c3dda2a642b6580d68fbcc Mon Sep 17 00:00:00 2001 From: Julian Date: Mon, 22 Jul 2024 21:50:19 +0200 Subject: [PATCH 48/80] refactored dropdown menu --- components/DropdownMenu.tsx | 82 ++++++++++++++----------------------- components/Navbar.tsx | 1 - 2 files changed, 31 insertions(+), 52 deletions(-) diff --git a/components/DropdownMenu.tsx b/components/DropdownMenu.tsx index 7b16fd0c..2e0035e8 100644 --- a/components/DropdownMenu.tsx +++ b/components/DropdownMenu.tsx @@ -1,72 +1,52 @@ +import React from 'react'; import ThemeToggle from "./ThemeToggle"; +import Link from 'next/link'; + +interface User { + name: string; + role?: string; + isCommittee?: boolean; +} + +interface Session { + user?: User; +} type Props = { - session: any; + session: Session | null; handleLogin: () => void; handleLogout: () => void; - router: any; toggleDropdown: () => void; }; -const DropdownMenu = (props: Props) => { +const DropdownMenu = ({ session, handleLogin, handleLogout, toggleDropdown }: Props) => { + const RenderLink = ({ path, label }: { path: string; label: string }) => ( + + + {label} + + + ); + return (
- {!props.session ? ( -
+ {!session?.user ? ( + <> - + Logg inn -
+ ) : ( <>
- Logget inn som{" "} - {props.session.user?.name} + Logget inn som {session?.user.name}
- { - props.router.push("/"); - props.toggleDropdown(); - }} - className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700" - > - Hjem - - {props.session.user?.role === "admin" && ( - { - props.router.push("/admin"); - props.toggleDropdown(); - }} - className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700" - > - Admin - - )} - - {props.session.user?.isCommitee && ( - { - props.router.push("/committee"); - props.toggleDropdown(); - }} - className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700" - > - For komiteer - - )} + + {session?.user.role === "admin" && } + {session?.user.isCommittee && } - { - props.handleLogout(); - props.toggleDropdown(); - }} - className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700" - > + { handleLogout(); toggleDropdown(); }} className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700"> Logg ut diff --git a/components/Navbar.tsx b/components/Navbar.tsx index a300c80b..661d11bf 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -142,7 +142,6 @@ const Navbar = () => { session={session} handleLogin={handleLogin} handleLogout={handleLogout} - router={router} toggleDropdown={toggleDropdown} /> )} From 11a08885ba6610208e09fe491a77ebcb045e807c Mon Sep 17 00:00:00 2001 From: fredrir Date: Mon, 22 Jul 2024 22:11:02 +0200 Subject: [PATCH 49/80] Exclude certain committees --- components/CommitteeAboutCard.tsx | 2 +- pages/committees.tsx | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index f94ad873..524e10e4 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -21,7 +21,7 @@ const CommitteeAboutCard = ({

{email}

- {application_description || "Ingen opptaksbeskrivelse :("} + {application_description || "Ingen opptaksbeskrivelse"}

); diff --git a/pages/committees.tsx b/pages/committees.tsx index 18108573..97f60b81 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -7,22 +7,39 @@ const Committees = () => { const [isLoading, setIsLoading] = useState(true); const [committees, setCommittees] = useState([]); + const excludedCommittees = [ + "Jubkom", + "Velkom", + "Output", + "Ekskom", + "Faddere", + "Debug", + ]; + + const filterCommittees = (committees: owCommitteeType[]) => { + return committees.filter( + (committee) => !excludedCommittees.includes(committee.name_short) + ); + }; + const fetchCommittees = async () => { try { const response = await fetch("/api/periods/ow-committees"); const data = await response.json(); + const filteredData = filterCommittees(data); + const cachedData = JSON.parse( localStorage.getItem("committeesCache") || "[]" ); - if (JSON.stringify(data) !== JSON.stringify(cachedData)) { - localStorage.setItem("committeesCache", JSON.stringify(data)); - setCommittees(data); + if (JSON.stringify(filteredData) !== JSON.stringify(cachedData)) { + localStorage.setItem("committeesCache", JSON.stringify(filteredData)); + setCommittees(filteredData); } else { setCommittees(cachedData); } - console.log(data); + console.log(filteredData); } catch (error) { console.error("Failed to fetch committees:", error); const cachedData = JSON.parse( From b269d13346f11dd61cd33b1e4d870a474f98d599 Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 18:22:21 +0200 Subject: [PATCH 50/80] methods to fetch applicants, periods and committee times --- .env.local.template | 4 +- algorithm/requirements.txt | Bin 208 -> 282 bytes algorithm/src/mip_matching/.env.template | 2 + algorithm/src/mip_matching/Applicant.py | 4 +- .../fetch-applicants-and-committees.py | 76 ++++++++++++++++++ 5 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 algorithm/src/mip_matching/.env.template create mode 100644 algorithm/src/mip_matching/fetch-applicants-and-committees.py diff --git a/.env.local.template b/.env.local.template index b9f5a791..52a9086e 100644 --- a/.env.local.template +++ b/.env.local.template @@ -11,4 +11,6 @@ AUTH0_CLIENT_SECRET=#client secret AUTH0_ISSUER=#issuer base url, example: example.us.auth0.com AWS_SECRET_ACCESS_KEY=#aws secret access key -AWS_ACCESS_KEY_ID=#aws access key id \ No newline at end of file +AWS_ACCESS_KEY_ID=#aws access key id + +ALGORITHM_SECRET=#algorithm secret \ No newline at end of file diff --git a/algorithm/requirements.txt b/algorithm/requirements.txt index 6a0b6cf32162297694a54be67d1b9294b0ba825f..5f6def75d5188db2b854f4a5217c11af99396233 100644 GIT binary patch delta 81 zcmcb>IE!h*1+M~zN`_p9e1<%RbRcO9ghmW{3}!%V$iU0M#Q>5oVaNch&}B#g(j^S3 PK-FbHm4-l725^-C!2=FR delta 6 NcmbQmbb)cg1po-&0?q&c diff --git a/algorithm/src/mip_matching/.env.template b/algorithm/src/mip_matching/.env.template new file mode 100644 index 00000000..5c76b2b7 --- /dev/null +++ b/algorithm/src/mip_matching/.env.template @@ -0,0 +1,2 @@ +MONGODB_URI=#url to mongodb database +DB_NAME=#name of db \ No newline at end of file diff --git a/algorithm/src/mip_matching/Applicant.py b/algorithm/src/mip_matching/Applicant.py index 5d78429d..d769ebc7 100644 --- a/algorithm/src/mip_matching/Applicant.py +++ b/algorithm/src/mip_matching/Applicant.py @@ -3,8 +3,8 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: # Unngår cyclic import - from Committee import Committee - from TimeInterval import TimeInterval + from mip_matching.Committee import Committee + from mip_matching.TimeInterval import TimeInterval import itertools diff --git a/algorithm/src/mip_matching/fetch-applicants-and-committees.py b/algorithm/src/mip_matching/fetch-applicants-and-committees.py new file mode 100644 index 00000000..911c3812 --- /dev/null +++ b/algorithm/src/mip_matching/fetch-applicants-and-committees.py @@ -0,0 +1,76 @@ +from pymongo import MongoClient +from dotenv import load_dotenv +from datetime import datetime, timezone +import os + +def main(): + periods = fetch_periods() + + + #Sjekker om perioden er før intervjutiden og etter søknadstiden, og returnerer søkere og komitétider dersom det er tilfelle + for period in periods: + periodId = period["_id"] + interview_start = datetime.fromisoformat(period["interviewPeriod"]["start"].replace("Z", "+00:00")) + application_end = datetime.fromisoformat(period["applicationPeriod"]["end"].replace("Z", "+00:00")) + + now = datetime.now(timezone.utc) + + if interview_start < now and application_end > now: + applicants = fetch_applicants(periodId) + committee_times = fetch_committee_times(periodId) + # print(applicants) + # print(committee_times) + + return applicants, committee_times + + +def connect_to_db(collection_name): + load_dotenv() + + mongo_uri = os.getenv("MONGODB_URI") + db_name = os.getenv("DB_NAME") + + client = MongoClient(mongo_uri) + + db = client[db_name] # type: ignore + + collection = db[collection_name] + + return collection, client + +def fetch_periods(): + collection, client = connect_to_db("period") + + periods = collection.find() + + periods = list(periods) + + client.close() + + return periods + +def fetch_applicants(periodId): + collection, client = connect_to_db("applicants") + + applicants = collection.find({"periodId": periodId}) + + applicants = list(applicants) + + client.close() + + return applicants + +def fetch_committee_times(periodId): + collection, client = connect_to_db("committee") + + committee_times = collection.find({"periodId": periodId}) + + committee_times = list(committee_times) + + client.close() + + return committee_times + + + + From e940415bca13f3e890273d5be252624e75c96eaa Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 18:22:50 +0200 Subject: [PATCH 51/80] remove unsused variable --- .env.local.template | 2 -- 1 file changed, 2 deletions(-) diff --git a/.env.local.template b/.env.local.template index 52a9086e..3e58d9e5 100644 --- a/.env.local.template +++ b/.env.local.template @@ -12,5 +12,3 @@ AUTH0_ISSUER=#issuer base url, example: example.us.auth0.com AWS_SECRET_ACCESS_KEY=#aws secret access key AWS_ACCESS_KEY_ID=#aws access key id - -ALGORITHM_SECRET=#algorithm secret \ No newline at end of file From 41fdaf226eded461c477a06353fe12c707543f21 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 18:57:29 +0200 Subject: [PATCH 52/80] Installed tanstack query and used it in admin/periodId --- .../applicantoverview/ApplicantsOverview.tsx | 4 +- lib/api/periodApi.ts | 8 ++++ package-lock.json | 25 ++++++++++ package.json | 1 + pages/_app.tsx | 23 +++++++--- pages/admin/[period-id]/index.tsx | 46 ++++++++----------- 6 files changed, 71 insertions(+), 36 deletions(-) create mode 100644 lib/api/periodApi.ts diff --git a/components/applicantoverview/ApplicantsOverview.tsx b/components/applicantoverview/ApplicantsOverview.tsx index a93689f0..5647d3b1 100644 --- a/components/applicantoverview/ApplicantsOverview.tsx +++ b/components/applicantoverview/ApplicantsOverview.tsx @@ -10,8 +10,8 @@ import ApplicantTable from "./ApplicantTable"; import ApplicantOverviewSkeleton from "./ApplicantOverviewSkeleton"; interface Props { - period: periodType | null; - committees?: string[] | null; + period?: periodType; + committees?: string[]; committee?: string; includePreferences: boolean; } diff --git a/lib/api/periodApi.ts b/lib/api/periodApi.ts new file mode 100644 index 00000000..18a347a1 --- /dev/null +++ b/lib/api/periodApi.ts @@ -0,0 +1,8 @@ +import { QueryFunctionContext } from '@tanstack/react-query'; + +export const fetchPeriodById = async (context: QueryFunctionContext) => { + const id = context.queryKey[1]; + return fetch(`/api/periods/${id}`).then(res => + res.json() + ); +} diff --git a/package-lock.json b/package-lock.json index 79c8d9e9..899cebb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@heroicons/react": "^2.1.3", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "github:tailwindcss/typography", + "@tanstack/react-query": "^5.51.11", "@types/mongodb": "^4.0.7", "mongodb": "^6.1.0", "next": "^12.3.4", @@ -1734,6 +1735,30 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@tanstack/query-core": { + "version": "5.51.9", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.51.9.tgz", + "integrity": "sha512-HsAwaY5J19MD18ykZDS3aVVh+bAt0i7m6uQlFC2b77DLV9djo+xEN7MWQAQQTR8IM+7r/zbozTQ7P0xr0bHuew==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.51.11", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.51.11.tgz", + "integrity": "sha512-4Kq2x0XpDlpvSnaLG+8pHNH60zEc3mBvb3B2tOMDjcPCi/o+Du3p/9qpPLwJOTliVxxPJAP27fuIhLrsRdCr7A==", + "dependencies": { + "@tanstack/query-core": "5.51.9" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", diff --git a/package.json b/package.json index 693f5999..e69364f2 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@heroicons/react": "^2.1.3", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "github:tailwindcss/typography", + "@tanstack/react-query": "^5.51.11", "@types/mongodb": "^4.0.7", "mongodb": "^6.1.0", "next": "^12.3.4", diff --git a/pages/_app.tsx b/pages/_app.tsx index b3015108..65ef4fe1 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -8,6 +8,15 @@ import Navbar from "../components/Navbar"; import Footer from "../components/Footer"; import LoadingPage from "../components/LoadingPage"; import Signature from "../lib/utils/Signature"; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; + +const queryClient = new QueryClient({ + defaultOptions: { // TODO: go over default options + queries: { + staleTime: 1000 * 60 * 10, + }, + }, +}); const SessionHandler: React.FC<{ children: React.ReactNode }> = ({ children, @@ -70,12 +79,14 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: any) {
- - -
- -
-
+ + + +
+ +
+
+
diff --git a/pages/admin/[period-id]/index.tsx b/pages/admin/[period-id]/index.tsx index 63901159..7d2e91f1 100644 --- a/pages/admin/[period-id]/index.tsx +++ b/pages/admin/[period-id]/index.tsx @@ -1,44 +1,34 @@ import { useSession } from "next-auth/react"; import { useEffect, useState } from "react"; import router from "next/router"; -import { applicantType, periodType } from "../../../lib/types/types"; +import { periodType } from "../../../lib/types/types"; import NotFound from "../../404"; import ApplicantsOverview from "../../../components/applicantoverview/ApplicantsOverview"; +import { useQuery } from '@tanstack/react-query'; +import { fetchPeriodById } from "../../../lib/api/periodApi"; +import LoadingPage from "../../../components/LoadingPage"; +import ErrorPage from "../../../components/ErrorPage"; const Admin = () => { const { data: session } = useSession(); const periodId = router.query["period-id"]; - const [period, setPeriod] = useState(null); - const [committees, setCommittees] = useState(null); - useEffect(() => { - const fetchPeriod = async () => { - if (!session || session.user?.role !== "admin") { - return; - } - if (periodId === undefined) return; + const [period, setPeriod] = useState(); + const [committees, setCommittees] = useState(); - try { - const response = await fetch(`/api/periods/${periodId}`); - const data = await response.json(); - if (response.ok) { - setPeriod(data.period); - setCommittees(data.period.committees); - } else { - throw new Error(data.error || "Unknown error"); - } - } catch (error) { - console.error("Error checking period:", error); - } finally { - } - }; + const { data, isError, isLoading } = useQuery({ + queryKey: ['periods', periodId], + queryFn: fetchPeriodById, + }); - fetchPeriod(); - }, [session?.user?.owId, periodId]); + useEffect(() => { + setPeriod(data?.period) + setCommittees(data?.period.committees) + }, [data, session?.user?.owId]); - if (!session || session.user?.role !== "admin") { - return ; - } + if (!session || session.user?.role !== "admin") return ; + if (isLoading) return ; + if (isError) return ; return ( Date: Tue, 23 Jul 2024 18:57:37 +0200 Subject: [PATCH 53/80] added error page component --- components/ErrorPage.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 components/ErrorPage.tsx diff --git a/components/ErrorPage.tsx b/components/ErrorPage.tsx new file mode 100644 index 00000000..786cef3a --- /dev/null +++ b/components/ErrorPage.tsx @@ -0,0 +1,23 @@ +import Image from "next/image"; +import { useTheme } from "../lib/hooks/useTheme"; + +const ErrorPage = () => { + const theme = useTheme(); + + const onlineLogoSrc = + theme === "dark" ? "/Online_hvit.svg" : "/Online_bla.svg"; + + return ( +
+ +
Det har skjedd en feil :(
+
+ ); +}; + +export default ErrorPage; From e0d672bbf67ee301c0a5eff0784f86bd4ba7996e Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:14:58 +0200 Subject: [PATCH 54/80] Use tanstack fetching in committee selection page --- pages/admin/[period-id]/index.tsx | 2 +- pages/committee/[period-id]/index.tsx | 64 ++++++++++++--------------- 2 files changed, 29 insertions(+), 37 deletions(-) diff --git a/pages/admin/[period-id]/index.tsx b/pages/admin/[period-id]/index.tsx index 7d2e91f1..3d299f3c 100644 --- a/pages/admin/[period-id]/index.tsx +++ b/pages/admin/[period-id]/index.tsx @@ -26,7 +26,7 @@ const Admin = () => { setCommittees(data?.period.committees) }, [data, session?.user?.owId]); - if (!session || session.user?.role !== "admin") return ; + if (session?.user?.role !== "admin") return ; if (isLoading) return ; if (isError) return ; diff --git a/pages/committee/[period-id]/index.tsx b/pages/committee/[period-id]/index.tsx index 73637161..2f5abea9 100644 --- a/pages/committee/[period-id]/index.tsx +++ b/pages/committee/[period-id]/index.tsx @@ -3,51 +3,43 @@ import { useEffect, useState } from "react"; import { useSession } from "next-auth/react"; import LoadingPage from "../../../components/LoadingPage"; import CommitteeCard from "../../../components/committee/CommitteeCard"; +import { useQuery } from "@tanstack/react-query"; +import { fetchPeriodById } from "../../../lib/api/periodApi"; +import ErrorPage from "../../../components/ErrorPage"; +import NotFound from "../../404"; const ChooseCommittee = () => { const { data: session } = useSession(); const router = useRouter(); const periodId = router.query["period-id"]; - const [committees, setCommittees] = useState(null); - const [loading, setLoading] = useState(true); + + const [committees, setCommittees] = useState(); + + const { data, isError, isLoading } = useQuery({ + queryKey: ['periods', periodId], + queryFn: fetchPeriodById, + }); useEffect(() => { - const fetchPeriod = async () => { - if (!session || !periodId) return; - - try { - const res = await fetch(`/api/periods/${periodId}`); - const data = await res.json(); - - if (data.period) { - const userCommittees = session!.user!.committees; - const periodCommittees = data.period.committees; - - if (data.period.optionalCommittees != null) { - periodCommittees.push(...data.period.optionalCommittees); - } - - const filteredCommittees = periodCommittees.filter( - (committee: string) => - userCommittees?.includes(committee.toLowerCase()) - ); - setCommittees(filteredCommittees); - } - } catch (error) { - console.error("Failed to fetch interview periods:", error); - } finally { - setLoading(false); - } - }; - fetchPeriod(); - }, [periodId, session]); - - if (loading) { - return ; - } + if(!data) return; + + const userCommittees = session!.user!.committees; + const periodCommittees = [...data.period?.committees, ...data.period?.optionalCommittees]; + + const matchingCommittees = periodCommittees.filter( + (committee: string) => + userCommittees?.includes(committee.toLowerCase()) + ); + setCommittees(matchingCommittees); + + }, [data, session]) + + if (session?.user?.committees?.length === 0) return ; + if (isLoading) return ; + if (isError) return ; return ( -
+

Velg komite

{committees?.map((committee) => CommitteeCard({ From a0ea2b536c3cacf67650ca36a3d804dc5fcef8d2 Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 19:16:20 +0200 Subject: [PATCH 55/80] added Har Opptak! --- components/CommitteeAboutCard.tsx | 27 +++++++++++++----- pages/committees.tsx | 47 ++++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index 524e10e4..01c028a5 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -1,21 +1,34 @@ import { owCommitteeType } from "../lib/types/types"; +interface CommitteeAboutCardProps { + committee: owCommitteeType; + hasPeriod: boolean; +} + const CommitteeAboutCard = ({ - image, - name_long, - name_short, - email, - application_description, -}: owCommitteeType) => { + committee, + hasPeriod, +}: CommitteeAboutCardProps) => { + const { image, name_long, name_short, email, application_description } = + committee; + return (
-
+
{name_long} + {hasPeriod && ( +

+ + Har opptak! + +

+ )}
+

{name_long} {name_long !== name_short && `(${name_short})`}

diff --git a/pages/committees.tsx b/pages/committees.tsx index 97f60b81..8554d9fa 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -1,20 +1,14 @@ import { useEffect, useState } from "react"; import LoadingPage from "../components/LoadingPage"; -import { owCommitteeType } from "../lib/types/types"; +import { owCommitteeType, periodType } from "../lib/types/types"; import CommitteeAboutCard from "../components/CommitteeAboutCard"; const Committees = () => { const [isLoading, setIsLoading] = useState(true); const [committees, setCommittees] = useState([]); + const [periods, setPeriods] = useState([]); - const excludedCommittees = [ - "Jubkom", - "Velkom", - "Output", - "Ekskom", - "Faddere", - "Debug", - ]; + const excludedCommittees = ["Jubkom", "Output", "Faddere"]; const filterCommittees = (committees: owCommitteeType[]) => { return committees.filter( @@ -22,6 +16,16 @@ const Committees = () => { ); }; + const fetchPeriods = async () => { + try { + const response = await fetch("/api/periods"); + const data = await response.json(); + setPeriods(data.periods); + } catch (error) { + console.error("Failed to fetch periods:", error); + } + }; + const fetchCommittees = async () => { try { const response = await fetch("/api/periods/ow-committees"); @@ -59,9 +63,26 @@ const Committees = () => { setCommittees(cachedData); setIsLoading(false); } + fetchPeriods(); fetchCommittees(); }, []); + const hasPeriod = (committee: any) => { + if (!Array.isArray(periods)) { + return false; + } + + if (periods.length > 0 && committee.name_short === "Bankom") { + return true; + } + + return periods.some( + (period) => + period.committees.includes(committee.name_short) || + period.optionalCommittees.includes(committee.name_short) + ); + }; + if (isLoading) return ; return ( @@ -78,7 +99,13 @@ const Committees = () => {
{committees?.map((committee, index) => { - return ; + return ( + + ); })}
From 647ecfec410e00ed9424ce7edf95c7a387b8f24f Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:18:17 +0200 Subject: [PATCH 56/80] revert removal of null type. will remove this later --- components/applicantoverview/ApplicantsOverview.tsx | 4 ++-- pages/admin/[period-id]/index.tsx | 4 ++-- pages/committee/[period-id]/index.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/applicantoverview/ApplicantsOverview.tsx b/components/applicantoverview/ApplicantsOverview.tsx index 5647d3b1..1c40ef39 100644 --- a/components/applicantoverview/ApplicantsOverview.tsx +++ b/components/applicantoverview/ApplicantsOverview.tsx @@ -10,8 +10,8 @@ import ApplicantTable from "./ApplicantTable"; import ApplicantOverviewSkeleton from "./ApplicantOverviewSkeleton"; interface Props { - period?: periodType; - committees?: string[]; + period?: periodType | null; + committees?: string[] | null; committee?: string; includePreferences: boolean; } diff --git a/pages/admin/[period-id]/index.tsx b/pages/admin/[period-id]/index.tsx index 3d299f3c..c06d9923 100644 --- a/pages/admin/[period-id]/index.tsx +++ b/pages/admin/[period-id]/index.tsx @@ -13,8 +13,8 @@ const Admin = () => { const { data: session } = useSession(); const periodId = router.query["period-id"]; - const [period, setPeriod] = useState(); - const [committees, setCommittees] = useState(); + const [period, setPeriod] = useState(null); + const [committees, setCommittees] = useState(null); const { data, isError, isLoading } = useQuery({ queryKey: ['periods', periodId], diff --git a/pages/committee/[period-id]/index.tsx b/pages/committee/[period-id]/index.tsx index 2f5abea9..4f4cf4df 100644 --- a/pages/committee/[period-id]/index.tsx +++ b/pages/committee/[period-id]/index.tsx @@ -13,7 +13,7 @@ const ChooseCommittee = () => { const router = useRouter(); const periodId = router.query["period-id"]; - const [committees, setCommittees] = useState(); + const [committees, setCommittees] = useState(null); const { data, isError, isLoading } = useQuery({ queryKey: ['periods', periodId], From b27bcce0df75b90a1f62ace4fb11ddc09effb1e4 Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 19:21:04 +0200 Subject: [PATCH 57/80] hasPeriod must be within application period --- pages/committees.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index 8554d9fa..f06fa854 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -76,11 +76,18 @@ const Committees = () => { return true; } - return periods.some( - (period) => - period.committees.includes(committee.name_short) || - period.optionalCommittees.includes(committee.name_short) - ); + const today = new Date(); + return periods.some((period) => { + const applicationStart = new Date(period.applicationPeriod.start); + const applicationEnd = new Date(period.applicationPeriod.end); + + return ( + applicationStart <= today && + applicationEnd >= today && + (period.committees.includes(committee.name_short) || + period.optionalCommittees.includes(committee.name_short)) + ); + }); }; if (isLoading) return ; From ed4d446067f306bde7fb15d94b5b569518000b8c Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 19:23:11 +0200 Subject: [PATCH 58/80] fix bankom edge case --- pages/committees.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pages/committees.tsx b/pages/committees.tsx index f06fa854..0ab4a6b4 100644 --- a/pages/committees.tsx +++ b/pages/committees.tsx @@ -8,7 +8,7 @@ const Committees = () => { const [committees, setCommittees] = useState([]); const [periods, setPeriods] = useState([]); - const excludedCommittees = ["Jubkom", "Output", "Faddere"]; + const excludedCommittees = ["Faddere"]; const filterCommittees = (committees: owCommitteeType[]) => { return committees.filter( @@ -72,11 +72,16 @@ const Committees = () => { return false; } - if (periods.length > 0 && committee.name_short === "Bankom") { - return true; + const today = new Date(); + + if (committee.name_short === "Bankom") { + return periods.some((period) => { + const applicationStart = new Date(period.applicationPeriod.start); + const applicationEnd = new Date(period.applicationPeriod.end); + return applicationStart <= today && applicationEnd >= today; + }); } - const today = new Date(); return periods.some((period) => { const applicationStart = new Date(period.applicationPeriod.start); const applicationEnd = new Date(period.applicationPeriod.end); From c453217c4b7dd073073038f31aaafd2f13dc1e9c Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:32:19 +0200 Subject: [PATCH 59/80] added queryfunction for getting applicant --- lib/api/applicantApi.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/api/applicantApi.ts diff --git a/lib/api/applicantApi.ts b/lib/api/applicantApi.ts new file mode 100644 index 00000000..d15f34f8 --- /dev/null +++ b/lib/api/applicantApi.ts @@ -0,0 +1,9 @@ +import { QueryFunctionContext } from '@tanstack/react-query'; + +export const fetchApplicantByPeriodAndId = async (context: QueryFunctionContext) => { + const periodId = context.queryKey[1]; + const applicantId = context.queryKey[2]; + return fetch(`/api/applicants/${periodId}/${applicantId}`).then(res => + res.json() + ); +} From 3cc169f31e8d14c5dc28cc03b750ace4050d1191 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:32:37 +0200 Subject: [PATCH 60/80] refactored fetching of period and applicant on application page --- pages/application/[period-id].tsx | 98 +++++++++---------------------- 1 file changed, 27 insertions(+), 71 deletions(-) diff --git a/pages/application/[period-id].tsx b/pages/application/[period-id].tsx index 9a469f51..3e60d47e 100644 --- a/pages/application/[period-id].tsx +++ b/pages/application/[period-id].tsx @@ -16,6 +16,10 @@ import ApplicantCard from "../../components/applicantoverview/ApplicantCard"; import LoadingPage from "../../components/LoadingPage"; import { formatDateNorwegian } from "../../lib/utils/dateUtils"; import PageTitle from "../../components/PageTitle"; +import { useQuery } from "@tanstack/react-query"; +import { fetchPeriodById } from "../../lib/api/periodApi"; +import { fetchApplicantByPeriodAndId } from "../../lib/api/applicantApi"; +import ErrorPage from "../../components/ErrorPage"; interface FetchedApplicationData { exists: boolean; @@ -26,14 +30,12 @@ const Application: NextPage = () => { const { data: session } = useSession(); const router = useRouter(); const periodId = router.query["period-id"] as string; + const applicantId = session?.user?.owId; const [hasAlreadySubmitted, setHasAlreadySubmitted] = useState(true); const [periodExists, setPeriodExists] = useState(false); - const [fetchedApplicationData, setFetchedApplicationData] = - useState(null); const [activeTab, setActiveTab] = useState(0); - const [isLoading, setIsLoading] = useState(true); const [applicationData, setApplicationData] = useState< DeepPartial >({ @@ -53,53 +55,31 @@ const Application: NextPage = () => { const [period, setPeriod] = useState(); const [isApplicationPeriodOver, setIsApplicationPeriodOver] = useState(false); + const { data: periodData, isError: periodIsError, isLoading: periodIsLoading } = useQuery({ + queryKey: ['periods', periodId], + queryFn: fetchPeriodById, + }); + + const { data: applicantData, isError: applicantIsError, isLoading: applicantIsLoading } = useQuery({ + queryKey: ['applicants', periodId, applicantId], + queryFn: fetchApplicantByPeriodAndId, + }); + useEffect(() => { - if (!period) { - return; - } + if (!periodData) return; + + setPeriod(periodData.period); + setPeriodExists(periodData.exists); const currentDate = new Date().toISOString(); - if (new Date(period.applicationPeriod.end) < new Date(currentDate)) { + if (new Date(periodData.period.applicationPeriod.end) < new Date(currentDate)) { setIsApplicationPeriodOver(true); } - }, [period]); + }, [periodData]); useEffect(() => { - const checkPeriodAndApplicationStatus = async () => { - if (!periodId || !session?.user?.owId) return; - - try { - const periodResponse = await fetch(`/api/periods/${periodId}`); - const periodData = await periodResponse.json(); - if (periodResponse.ok) { - setPeriod(periodData.period); - setPeriodExists(periodData.exists); - fetchApplicationData(); - } else { - throw new Error(periodData.error || "Unknown error"); - } - } catch (error) { - console.error("Error checking period:", error); - } - - try { - const applicationResponse = await fetch( - `/api/applicants/${periodId}/${session.user.owId}` - ); - const applicationData = await applicationResponse.json(); - - if (!applicationResponse.ok) { - throw new Error(applicationData.error || "Unknown error"); - } - } catch (error) { - console.error("Error checking application status:", error); - } finally { - setIsLoading(false); - } - }; - - checkPeriodAndApplicationStatus(); - }, [session?.user?.owId, periodId]); + setHasAlreadySubmitted(applicantData?.exists); + }, [applicantData]); const handleSubmitApplication = async () => { if (!validateApplication(applicationData)) return; @@ -135,31 +115,6 @@ const Application: NextPage = () => { } else { toast.error("Det skjedde en feil, vennligst prøv igjen"); } - } finally { - fetchApplicationData(); - } - }; - - const fetchApplicationData = async () => { - if (!session?.user?.owId || !periodId) return; - - try { - const response = await fetch( - `/api/applicants/${periodId}/${session.user.owId}` - ); - const data = await response.json(); - if (!data.exists) { - setHasAlreadySubmitted(false); - } else { - setFetchedApplicationData(data); - } - - if (!response.ok) { - throw new Error(data.error || "Unknown error"); - } - } catch (error) { - console.error("Error fetching application data:", error); - toast.error("Failed to fetch application data."); } }; @@ -190,7 +145,8 @@ const Application: NextPage = () => { } }; - if (isLoading) return ; + if (periodIsLoading || applicantIsLoading) return ; + if (periodIsError || applicantIsError) return ; if (!periodExists) { return ( @@ -224,10 +180,10 @@ const Application: NextPage = () => { onClick={handleDeleteApplication} /> )} - {fetchedApplicationData && ( + {applicantData && (
From 04b42ed80866fc709247d840069401542bed1cbb Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:36:59 +0200 Subject: [PATCH 61/80] refactored periodfetching in committee/periodId/committee --- .../[period-id]/[committee]/index.tsx | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/pages/committee/[period-id]/[committee]/index.tsx b/pages/committee/[period-id]/[committee]/index.tsx index 60b74059..56b51831 100644 --- a/pages/committee/[period-id]/[committee]/index.tsx +++ b/pages/committee/[period-id]/[committee]/index.tsx @@ -20,6 +20,9 @@ import { changeDisplayName } from "../../../../lib/utils/toString"; import Custom404 from "../../../404"; import PageTitle from "../../../../components/PageTitle"; import Link from "next/link"; +import { useQuery } from "@tanstack/react-query"; +import { fetchPeriodById } from "../../../../lib/api/periodApi"; +import ErrorPage from "../../../../components/ErrorPage"; const CommitteeApplicantOverView: NextPage = () => { const { data: session } = useSession(); @@ -38,21 +41,14 @@ const CommitteeApplicantOverView: NextPage = () => { const [singleCommitteeInPeriod, setSingleCommitteeInPeriod] = useState(true); - useEffect(() => { - if (!session || !periodId) return; - - const fetchPeriod = async () => { - try { - const res = await fetch(`/api/periods/${periodId}`); - const data = await res.json(); - setPeriod(data.period); - } catch (error) { - console.error("Failed to fetch interview periods:", error); - } - }; + const { data: periodData, isError: periodIsError, isLoading: periodIsLoading } = useQuery({ + queryKey: ['periods', periodId], + queryFn: fetchPeriodById, + }); - fetchPeriod(); - }, [periodId]); + useEffect(() => { + setPeriod(periodData?.period); + }, [periodData]); useEffect(() => { const userCommittees = session?.user?.committees?.map(c => c.toLowerCase()) || []; @@ -120,13 +116,9 @@ const CommitteeApplicantOverView: NextPage = () => { checkAccess(); }, [period]); - if (loading) { - return ; - } - - if (!session || !hasAccess) { - return ; - } + if (loading || periodIsLoading) return ; + if (!hasAccess) return ; + if (periodIsError) return ; const interviewPeriodEnd = period?.interviewPeriod.end ? new Date(period.interviewPeriod.end) From 365e87ddef45470706ddc85a2c304a503de95d48 Mon Sep 17 00:00:00 2001 From: fredrir Date: Tue, 23 Jul 2024 19:40:48 +0200 Subject: [PATCH 62/80] add hasSentInterviewTimes --- lib/types/types.ts | 1 + pages/admin/new-period.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/types/types.ts b/lib/types/types.ts index 79807105..6575ad70 100644 --- a/lib/types/types.ts +++ b/lib/types/types.ts @@ -76,6 +76,7 @@ export type periodType = { }; committees: string[]; optionalCommittees: string[]; + hasSentInterviewTimes: boolean; }; export type AvailableTime = { diff --git a/pages/admin/new-period.tsx b/pages/admin/new-period.tsx index 94f1d0d7..dc9a027a 100644 --- a/pages/admin/new-period.tsx +++ b/pages/admin/new-period.tsx @@ -28,6 +28,7 @@ const NewPeriod = () => { }, committees: [], optionalCommittees: [], + hasSentInterviewTimes: false, }); const updateApplicationPeriodDates = ({ From 5d815607bc640b8be8f38f59aa4c205d78420bff Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:51:10 +0200 Subject: [PATCH 63/80] updated badge styling --- components/CommitteeAboutCard.tsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index 01c028a5..680be497 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -18,20 +18,18 @@ const CommitteeAboutCard = ({ {name_long} - {hasPeriod && ( -

- - Har opptak! - -

- )}
-

- {name_long} {name_long !== name_short && `(${name_short})`} -

+
+

+ {name_long} {name_long !== name_short && `(${name_short})`} +

+ {hasPeriod && ( + Har opptak! + )} +

{email}

{application_description || "Ingen opptaksbeskrivelse"} From 4d88c4a69de5a4592514d03bd2b25608fdede505 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 19:53:43 +0200 Subject: [PATCH 64/80] shorten code --- components/CommitteeAboutCard.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/components/CommitteeAboutCard.tsx b/components/CommitteeAboutCard.tsx index 680be497..502719b3 100644 --- a/components/CommitteeAboutCard.tsx +++ b/components/CommitteeAboutCard.tsx @@ -14,13 +14,11 @@ const CommitteeAboutCard = ({ return (

-
- {name_long} -
+ {name_long}

From cfc0cedfb3d56d5bc00fd5eb782c3fadced645cb Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 20:12:39 +0200 Subject: [PATCH 65/80] fix svg errors --- components/icons/illustrations/FestivitiesIllustration.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/icons/illustrations/FestivitiesIllustration.tsx b/components/icons/illustrations/FestivitiesIllustration.tsx index 9cbfd3a4..ea94ee7b 100644 --- a/components/icons/illustrations/FestivitiesIllustration.tsx +++ b/components/icons/illustrations/FestivitiesIllustration.tsx @@ -16,9 +16,9 @@ const FestivitiesIllustration = ({ className }: { className: string }) => { y2="677.2" gradientUnits="userSpaceOnUse" > - - - + + + Date: Tue, 23 Jul 2024 20:18:49 +0200 Subject: [PATCH 66/80] fix error where div cannot be in p tag --- components/PageTitle.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/PageTitle.tsx b/components/PageTitle.tsx index 121e864b..b9774f4e 100644 --- a/components/PageTitle.tsx +++ b/components/PageTitle.tsx @@ -19,10 +19,10 @@ const PageTitle = ({ {mainTitle}

{subTitle && ( -

+

{boldSubTitle && {boldSubTitle}{boldSubTitle && subTitle && ":"} } {subTitle} -

+
)}
From cfe5ae55af71e47032f4a1db0ab1f7d1cb992d20 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 20:19:15 +0200 Subject: [PATCH 67/80] div cannot be in th tag --- components/Table.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Table.tsx b/components/Table.tsx index 90a9a4e4..f22d2256 100644 --- a/components/Table.tsx +++ b/components/Table.tsx @@ -24,8 +24,8 @@ const Table = ({ rows, columns, onDelete }: TableProps) => { const router = useRouter(); return ( -
-
+ <> +
@@ -36,7 +36,7 @@ const Table = ({ rows, columns, onDelete }: TableProps) => { {column.label} ) : ( -
+ )} ))} @@ -83,7 +83,7 @@ const Table = ({ rows, columns, onDelete }: TableProps) => { ))} - + ); }; From b2b9bc34ce701edab9a08b00a4557b4a74188511 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 23 Jul 2024 20:19:51 +0200 Subject: [PATCH 68/80] fixed table errors --- components/Table.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/Table.tsx b/components/Table.tsx index f22d2256..78039b12 100644 --- a/components/Table.tsx +++ b/components/Table.tsx @@ -43,9 +43,9 @@ const Table = ({ rows, columns, onDelete }: TableProps) => { - {rows.map((row) => ( + {rows.map((row, index) => ( row.link && router.push(row.link)} > @@ -78,9 +78,9 @@ const Table = ({ rows, columns, onDelete }: TableProps) => {
-
- {rows.map((row) => ( - +
+ {rows.map((row, index) => ( + ))}
From 29841ccb4687037b5d9c062618fab8ae8a5af460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Galdal?= Date: Tue, 23 Jul 2024 23:25:05 +0200 Subject: [PATCH 69/80] update requirements --- algorithm/requirements.txt | Bin 282 -> 286 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/algorithm/requirements.txt b/algorithm/requirements.txt index 5f6def75d5188db2b854f4a5217c11af99396233..45c7880b90a947297f03ef0a809f6721dbdd8069 100644 GIT binary patch delta 38 mcmbQmG>>V*BW_~`JqAMtBOqxo@wK9WEsz6bf(3aQxEKJcc?Qb> delta 34 kcmbQoG>d7%BTgd*Jq9x%Hk|lYk Date: Tue, 23 Jul 2024 23:25:51 +0200 Subject: [PATCH 70/80] fix: specify certificate --- algorithm/requirements.txt | Bin 286 -> 320 bytes ...es.py => fetch_applicants_and_committees.py} | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) rename algorithm/src/mip_matching/{fetch-applicants-and-committees.py => fetch_applicants_and_committees.py} (94%) diff --git a/algorithm/requirements.txt b/algorithm/requirements.txt index 45c7880b90a947297f03ef0a809f6721dbdd8069..6b8206b471469006a2a265f7bd5c72831bdfdf80 100644 GIT binary patch delta 42 rcmbQobbx7t9HUY)Ln=cNLkUABLmCj<0-+Iu0T7!o=rNcBu?YhJ#1IEV delta 7 OcmX@WG>>V693ub now: applicants = fetch_applicants(periodId) committee_times = fetch_committee_times(periodId) @@ -30,7 +30,7 @@ def connect_to_db(collection_name): mongo_uri = os.getenv("MONGODB_URI") db_name = os.getenv("DB_NAME") - client = MongoClient(mongo_uri) + client = MongoClient(mongo_uri, tlsCAFile=certifi.where()) db = client[db_name] # type: ignore @@ -71,6 +71,5 @@ def fetch_committee_times(periodId): return committee_times - - - +if __name__ == "__main__": + main() \ No newline at end of file From bbc65d9fb42e193dcfc0ecfcdd9718cd9a065ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Galdal?= Date: Tue, 23 Jul 2024 23:37:30 +0200 Subject: [PATCH 71/80] fix: use string for id and correct collection name --- algorithm/src/mip_matching/fetch_applicants_and_committees.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algorithm/src/mip_matching/fetch_applicants_and_committees.py b/algorithm/src/mip_matching/fetch_applicants_and_committees.py index 751bdd4a..2a483696 100644 --- a/algorithm/src/mip_matching/fetch_applicants_and_committees.py +++ b/algorithm/src/mip_matching/fetch_applicants_and_committees.py @@ -9,7 +9,7 @@ def main(): #Sjekker om perioden er før intervjutiden og etter søknadstiden, og returnerer søkere og komitétider dersom det er tilfelle for period in periods: - periodId = period["_id"] + periodId = str(period["_id"]) interview_start = datetime.fromisoformat(period["interviewPeriod"]["start"].replace("Z", "+00:00")) application_end = datetime.fromisoformat(period["applicationPeriod"]["end"].replace("Z", "+00:00")) @@ -50,7 +50,7 @@ def fetch_periods(): return periods def fetch_applicants(periodId): - collection, client = connect_to_db("applicants") + collection, client = connect_to_db("applicant") applicants = collection.find({"periodId": periodId}) From 86d5a92b27678d6e4820b9d6052543810386426c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Galdal?= Date: Tue, 23 Jul 2024 23:40:40 +0200 Subject: [PATCH 72/80] refactor: move non-package scripts --- algorithm/{src/mip_matching => bridge}/.env.template | 0 .../mip_matching => bridge}/fetch_applicants_and_committees.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename algorithm/{src/mip_matching => bridge}/.env.template (100%) rename algorithm/{src/mip_matching => bridge}/fetch_applicants_and_committees.py (100%) diff --git a/algorithm/src/mip_matching/.env.template b/algorithm/bridge/.env.template similarity index 100% rename from algorithm/src/mip_matching/.env.template rename to algorithm/bridge/.env.template diff --git a/algorithm/src/mip_matching/fetch_applicants_and_committees.py b/algorithm/bridge/fetch_applicants_and_committees.py similarity index 100% rename from algorithm/src/mip_matching/fetch_applicants_and_committees.py rename to algorithm/bridge/fetch_applicants_and_committees.py From 06b8992bca909c329422bffbed0c503619952948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Galdal?= Date: Tue, 23 Jul 2024 23:49:52 +0200 Subject: [PATCH 73/80] Update README.md --- algorithm/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/algorithm/README.md b/algorithm/README.md index a7d5f291..f40a55b8 100644 --- a/algorithm/README.md +++ b/algorithm/README.md @@ -9,11 +9,10 @@ cd algorithm python -m venv ".venv" ``` -Lag så en fil i `.\.venv\Lib\site-packages` som slutter på `.pth` og inneholder den absolutte filstien til `mip_matching`-mappen. - ``` .\.venv\Scripts\activate -python -m pip install -r requirements.txt +pip install -e . +pip install -r requirements.txt ``` ## TODOs From e72974b8adc208adcb562477a91e53f7e275d912 Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 11:33:10 +0200 Subject: [PATCH 74/80] add key to committee overview --- pages/committee/[period-id]/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/committee/[period-id]/index.tsx b/pages/committee/[period-id]/index.tsx index 73637161..2a7809ab 100644 --- a/pages/committee/[period-id]/index.tsx +++ b/pages/committee/[period-id]/index.tsx @@ -49,12 +49,13 @@ const ChooseCommittee = () => { return (

Velg komite

- {committees?.map((committee) => - CommitteeCard({ - committee, - link: `${periodId}/${committee.toLowerCase()}`, - }) - )} + {committees?.map((committee) => ( + + ))}
); }; From 8d46349ac3bf869e8392dd3685af2e089746b46d Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 11:34:39 +0200 Subject: [PATCH 75/80] remove DOM console warning for CheckIcon --- components/icons/icons/CheckIcon.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/icons/icons/CheckIcon.tsx b/components/icons/icons/CheckIcon.tsx index 2acb0bc3..6118d4f4 100644 --- a/components/icons/icons/CheckIcon.tsx +++ b/components/icons/icons/CheckIcon.tsx @@ -8,9 +8,9 @@ const CheckIcon = ({ className }: { className: string }) => ( > From 5d89564d9322ff6695110470fd1a9448f7cc0c1c Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 11:36:11 +0200 Subject: [PATCH 76/80] add priority to Online logo --- components/Navbar.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 661d11bf..851556af 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -36,13 +36,12 @@ const Navbar = () => {
From 6f53f5054e7113791b30283dcc8b0d08d1e46643 Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 12:01:46 +0200 Subject: [PATCH 77/80] add warning for ntnu emails --- components/form/ApplicationForm.tsx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/components/form/ApplicationForm.tsx b/components/form/ApplicationForm.tsx index 388a77dd..ebf2738f 100644 --- a/components/form/ApplicationForm.tsx +++ b/components/form/ApplicationForm.tsx @@ -5,7 +5,8 @@ import SelectInput from "./SelectInput"; import Line from "./Line"; import { DeepPartial, applicantType } from "../../lib/types/types"; import { changeDisplayName } from "../../lib/utils/toString"; -import { useState } from "react"; +import { useEffect, useState } from "react"; +import toast from "react-hot-toast"; interface Props { applicationData: DeepPartial; @@ -15,6 +16,7 @@ interface Props { } export const ApplicationForm = (props: Props) => { + const [isNtnuEmail, setIsNtnuEmail] = useState(false); const availableCommittees = [["Ingen", ""]]; const [selectedOptionalCommittees, setSelectedOptionalCommittees] = useState< string[] @@ -48,9 +50,31 @@ export const ApplicationForm = (props: Props) => { }); }; + useEffect(() => { + if ( + props.applicationData.email && + props.applicationData.email.includes("ntnu.no") + ) { + setIsNtnuEmail(true); + // toast.error( + // "Vi har problemer med å sende e-post til ntnu.no-adresser. Vennligst bruk en annen e-postadresse." + // ); + } else { + setIsNtnuEmail(false); + } + }, [props.applicationData.email]); + return (
+ {isNtnuEmail && ( +
+

+ Vi har problemer med å sende e-post til NTNU e-poster. Vennligst + bruk en annen e-postadresse. +

+
+ )} Date: Wed, 24 Jul 2024 12:03:19 +0200 Subject: [PATCH 78/80] add frontend validation for ntnu emails --- lib/utils/validateApplication.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/utils/validateApplication.ts b/lib/utils/validateApplication.ts index 547c88de..c748c43c 100644 --- a/lib/utils/validateApplication.ts +++ b/lib/utils/validateApplication.ts @@ -8,6 +8,14 @@ export const validateApplication = (applicationData: any) => { return false; } + // Check if ntnu email is used + if (applicationData.email.includes("ntnu.no")) { + toast.error( + "Vi har problemer med å sende e-post til ntnu.no-adresser. Vennligst bruk en annen e-postadresse." + ); + return false; + } + // Check if phone number is valid if (!validator.isMobilePhone(applicationData.phone, "nb-NO")) { toast.error("Fyll inn et gyldig mobilnummer"); From 87afb481703d4cdc3d16166af643f8158530b7ae Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 12:04:36 +0200 Subject: [PATCH 79/80] tweak warning --- lib/utils/validateApplication.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/validateApplication.ts b/lib/utils/validateApplication.ts index c748c43c..514ba6bf 100644 --- a/lib/utils/validateApplication.ts +++ b/lib/utils/validateApplication.ts @@ -11,7 +11,7 @@ export const validateApplication = (applicationData: any) => { // Check if ntnu email is used if (applicationData.email.includes("ntnu.no")) { toast.error( - "Vi har problemer med å sende e-post til ntnu.no-adresser. Vennligst bruk en annen e-postadresse." + "Vi har problemer med å sende e-post til NTNU e-poster. Vennligst bruk en annen e-postadresse." ); return false; } From 792dd4cda562a0c1ad9a1b21a212b28b043b8ca5 Mon Sep 17 00:00:00 2001 From: fredrir Date: Wed, 24 Jul 2024 13:16:41 +0200 Subject: [PATCH 80/80] update requirements for main() --- algorithm/bridge/fetch_applicants_and_committees.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/algorithm/bridge/fetch_applicants_and_committees.py b/algorithm/bridge/fetch_applicants_and_committees.py index 2a483696..b01cf645 100644 --- a/algorithm/bridge/fetch_applicants_and_committees.py +++ b/algorithm/bridge/fetch_applicants_and_committees.py @@ -7,19 +7,20 @@ def main(): periods = fetch_periods() - #Sjekker om perioden er før intervjutiden og etter søknadstiden, og returnerer søkere og komitétider dersom det er tilfelle + #Sjekker om perioden er etter søknadstiden og før intervjuslutt og hasSentInterviewtimes er false, og returnerer søkere og komitétider dersom det er tilfelle for period in periods: periodId = str(period["_id"]) - interview_start = datetime.fromisoformat(period["interviewPeriod"]["start"].replace("Z", "+00:00")) + interview_end = datetime.fromisoformat(period["interviewPeriod"]["end"].replace("Z", "+00:00")) application_end = datetime.fromisoformat(period["applicationPeriod"]["end"].replace("Z", "+00:00")) + now = datetime.now(timezone.utc) - if interview_start < now and application_end > now: + if application_end > now and period["hasSentInterviewTimes"] == False and interview_end < now: applicants = fetch_applicants(periodId) committee_times = fetch_committee_times(periodId) - # print(applicants) - # print(committee_times) + print(applicants) + print(committee_times) return applicants, committee_times