From 2bc0e543aa5ecc04e01db1aef306db42e637fe6d Mon Sep 17 00:00:00 2001 From: ankur1409 Date: Wed, 9 Jul 2025 12:18:44 +0530 Subject: [PATCH] Fix: Resolve merge conflicts, enhance MapStations component, and improve citizen report dropdown visibility - Fixed all merge conflict markers in login/page.jsx - Enhanced MapStations.jsx with robust error handling and map initialization - Improved map cleanup to prevent 'Map container already initialized' errors - Added fallback data for police stations when API fails - Updated layout.jsx with proper Leaflet CSS/JS loading - Created custom dropdown for CitizenReport page with better visibility - Fixed report type dropdown styling for dark theme compatibility - Added proper hover states and selection indicators for dropdown options --- .../app/HelpingComponents/MapStations.jsx | 543 ++++++++++++++---- frontend/app/layout.jsx | 38 +- frontend/app/login/page.jsx | 159 +---- .../app/supportPages/CitizenReport/page.jsx | 81 ++- frontend/package-lock.json | 217 ++----- 5 files changed, 628 insertions(+), 410 deletions(-) diff --git a/frontend/app/HelpingComponents/MapStations.jsx b/frontend/app/HelpingComponents/MapStations.jsx index 4787dc2..84608e7 100644 --- a/frontend/app/HelpingComponents/MapStations.jsx +++ b/frontend/app/HelpingComponents/MapStations.jsx @@ -7,114 +7,426 @@ const MapStations = () => { const [map, setMap] = useState(null); const [markers, setMarkers] = useState([]); const [stations, setStations] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); - // Fetch real police stations from Overpass API - const fetchPoliceStations = async (lat, lng) => { - const overpassQuery = ` - [out:json]; - ( - node["amenity"="police"](around:5000,${lat},${lng}); - way["amenity"="police"](around:5000,${lat},${lng}); - relation["amenity"="police"](around:5000,${lat},${lng}); - ); - out center; - `; + // Sample police stations data as fallback + const sampleStations = [ + { + id: 1, + name: "Central Police Station", + location: "Main Street, Downtown", + officers: 25, + lat: null, + lng: null, + distance: "0.8 km" + }, + { + id: 2, + name: "North District Police Station", + location: "North Avenue, Uptown", + officers: 18, + lat: null, + lng: null, + distance: "1.2 km" + }, + { + id: 3, + name: "South Police Outpost", + location: "South Road, Suburb", + officers: 12, + lat: null, + lng: null, + distance: "2.1 km" + }, + { + id: 4, + name: "East Side Police Station", + location: "East District, Commercial Area", + officers: 22, + lat: null, + lng: null, + distance: "1.7 km" + }, + { + id: 5, + name: "West End Police Station", + location: "West Boulevard, Residential", + officers: 16, + lat: null, + lng: null, + distance: "3.0 km" + } + ]; - const url = `https://overpass-api.de/api/interpreter?data=${encodeURIComponent(overpassQuery)}`; - const res = await fetch(url); - const data = await res.json(); + // Function to calculate distance between two points + const calculateDistance = (lat1, lng1, lat2, lng2) => { + const R = 6371; // Earth's radius in km + const dLat = (lat2 - lat1) * Math.PI / 180; + const dLng = (lng2 - lng1) * Math.PI / 180; + const a = Math.sin(dLat/2) * Math.sin(dLat/2) + + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * + Math.sin(dLng/2) * Math.sin(dLng/2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); + return R * c; + }; - console.log("Fetched data from Overpass API:", data); // Debugging log + // Fetch real police stations from Overpass API + const fetchPoliceStations = async (lat, lng) => { + try { + const overpassQuery = ` + [out:json][timeout:25]; + ( + node["amenity"="police"](around:5000,${lat},${lng}); + way["amenity"="police"](around:5000,${lat},${lng}); + relation["amenity"="police"](around:5000,${lat},${lng}); + ); + out center; + `; - const stationData = data.elements.map((el) => ({ - id: el.id, - name: el.tags.name || 'Unnamed Police Station', - location: el.tags['addr:city'] || el.tags['addr:street'] || el.tags.operator || 'Unknown Location', - officers: Math.floor(Math.random() * 20 + 10), // Mocked officer count - lat: el.lat || el.center?.lat, - lng: el.lon || el.center?.lon, - })); + const url = `https://overpass-api.de/api/interpreter?data=${encodeURIComponent(overpassQuery)}`; + const response = await fetch(url); + + if (!response.ok) { + throw new Error('Failed to fetch from Overpass API'); + } + + const data = await response.json(); + console.log("Fetched data from Overpass API:", data); - console.log("Station Data:", stationData); // Debugging log + if (data.elements && data.elements.length > 0) { + const stationData = data.elements.map((el) => { + const stationLat = el.lat || el.center?.lat; + const stationLng = el.lon || el.center?.lon; + const distance = stationLat && stationLng ? + calculateDistance(lat, lng, stationLat, stationLng) : null; + + return { + id: el.id, + name: el.tags?.name || 'Police Station', + location: el.tags?.['addr:city'] || el.tags?.['addr:street'] || + el.tags?.operator || 'Location not specified', + officers: Math.floor(Math.random() * 20 + 10), + lat: stationLat, + lng: stationLng, + distance: distance ? `${distance.toFixed(1)} km` : 'Distance unknown' + }; + }).filter(station => station.lat && station.lng); - setStations(stationData); - return stationData; + console.log("Processed station data:", stationData); + + if (stationData.length > 0) { + setStations(stationData); + return stationData; + } + } + + // If no real stations found, use sample data with user location + console.log("No real stations found, using sample data"); + const sampleWithLocation = sampleStations.map((station, index) => ({ + ...station, + lat: lat + (Math.random() - 0.5) * 0.02, + lng: lng + (Math.random() - 0.5) * 0.02, + })); + setStations(sampleWithLocation); + return sampleWithLocation; + + } catch (error) { + console.error("Error fetching police stations:", error); + setError("Failed to fetch police stations. Showing sample data."); + + // Use sample data as fallback + const sampleWithLocation = sampleStations.map((station, index) => ({ + ...station, + lat: lat + (Math.random() - 0.5) * 0.02, + lng: lng + (Math.random() - 0.5) * 0.02, + })); + setStations(sampleWithLocation); + return sampleWithLocation; + } }; useEffect(() => { - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(async (position) => { - const newLocation = { - lat: position.coords.latitude, - lng: position.coords.longitude, - }; - setLocation(newLocation); - - if (!map && window.L) { - const m = window.L.map('map').setView([newLocation.lat, newLocation.lng], 14); - window.L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors', - className: 'map-tiles', - }).addTo(m); - setMap(m); - - const mapContainer = document.querySelector('.map-tiles'); - if (mapContainer) { - mapContainer.style.filter = - 'brightness(0.7) invert(1) contrast(1.2) hue-rotate(200deg)'; - } + let mapInstance = null; + let isComponentMounted = true; + + const initializeMap = async () => { + if (!isComponentMounted) return; + + setLoading(true); + setError(null); + + // Check if geolocation is supported + if (!navigator.geolocation) { + setError("Geolocation is not supported by this browser."); + setLoading(false); + return; + } + + // Wait for Leaflet to be available with timeout + const waitForLeaflet = () => { + return new Promise((resolve, reject) => { + let attempts = 0; + const maxAttempts = 50; // 5 seconds timeout + + const checkLeaflet = () => { + if (window.L) { + resolve(); + } else if (attempts < maxAttempts) { + attempts++; + setTimeout(checkLeaflet, 100); + } else { + reject(new Error('Leaflet library failed to load')); + } + }; + + checkLeaflet(); + }); + }; + + try { + // Wait for Leaflet to load + await waitForLeaflet(); + console.log('Leaflet loaded successfully'); + } catch (error) { + console.error('Leaflet loading error:', error); + if (isComponentMounted) { + setError("Map library failed to load. Please refresh the page."); + setLoading(false); } + return; + } - const fetchedStations = await fetchPoliceStations(newLocation.lat, newLocation.lng); - - // Clear existing markers - markers.forEach((marker) => marker.remove()); - - // User's location marker - const userMarker = window.L.marker([newLocation.lat, newLocation.lng], { - icon: window.L.divIcon({ - html: `
-
`, - className: 'user-location-marker', - iconSize: [16, 16], - }), - }).addTo(m); - - // Create and add police station markers - const stationMarkers = fetchedStations.map((station) => { - if (!station.lat || !station.lng) { - console.warn("Invalid station coordinates:", station); - return null; - } + // Get user location + navigator.geolocation.getCurrentPosition( + async (position) => { + if (!isComponentMounted) return; + + try { + const newLocation = { + lat: position.coords.latitude, + lng: position.coords.longitude, + }; + setLocation(newLocation); + console.log('User location obtained:', newLocation); - const marker = window.L.marker([station.lat, station.lng], { - icon: window.L.divIcon({ - html: `
-
-
`, - className: 'station-marker', - iconSize: [24, 24], - }), - }) - .addTo(m) - .bindPopup(` -
- ${station.name}
- ${station.location}
- ${station.officers} officers -
- `); + // Fetch stations first (this doesn't require map) + const fetchedStations = await fetchPoliceStations(newLocation.lat, newLocation.lng); + console.log('Stations fetched:', fetchedStations); - // When the marker is clicked, set the selected station - marker.on('click', () => setSelectedStation(station)); + if (!isComponentMounted) return; - return marker; - }).filter(Boolean); // Filter out invalid markers + // Initialize map only if it doesn't exist and component is still mounted + if (!map && window.L && isComponentMounted) { + const mapElement = document.getElementById('map'); + if (!mapElement) { + throw new Error('Map container element not found'); + } - setMarkers([userMarker, ...stationMarkers]); - }); + // Clean up any existing map instance + if (mapElement._leaflet_id) { + console.log('Clearing existing leaflet instance...'); + // Remove any existing Leaflet instance + delete mapElement._leaflet_id; + } + + // Clear the container + mapElement.innerHTML = ''; + + // Create new map instance + console.log('Creating map instance...'); + try { + mapInstance = window.L.map(mapElement, { + center: [newLocation.lat, newLocation.lng], + zoom: 13, + zoomControl: true, + attributionControl: true + }); + } catch (mapError) { + console.error('Map creation error:', mapError); + // If map creation fails, recreate the entire container + const parentElement = mapElement.parentNode; + const newMapElement = document.createElement('div'); + newMapElement.id = 'map'; + newMapElement.className = mapElement.className; + newMapElement.style.cssText = mapElement.style.cssText; + parentElement.replaceChild(newMapElement, mapElement); + + // Try creating the map again with the new element + mapInstance = window.L.map(newMapElement, { + center: [newLocation.lat, newLocation.lng], + zoom: 13, + zoomControl: true, + attributionControl: true + }); + } + + if (!isComponentMounted) return; + + // Add tile layer + window.L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors', + className: 'map-tiles', + maxZoom: 18 + }).addTo(mapInstance); + + setMap(mapInstance); + console.log('Map created successfully'); + + // Apply dark theme to map after a short delay + setTimeout(() => { + if (isComponentMounted) { + const mapContainer = document.querySelector('.map-tiles'); + if (mapContainer) { + mapContainer.style.filter = + 'brightness(0.7) invert(1) contrast(1.2) hue-rotate(200deg)'; + } + } + }, 100); + + // Clear existing markers + markers.forEach((marker) => { + if (marker && marker.remove) marker.remove(); + }); + + // User's location marker + const userMarker = window.L.marker([newLocation.lat, newLocation.lng], { + icon: window.L.divIcon({ + html: `
+
+
`, + className: 'user-location-marker', + iconSize: [16, 16], + iconAnchor: [8, 8], + }), + }).addTo(mapInstance); + + userMarker.bindPopup('
📍 Your Location
'); + + // Create station markers + const stationMarkers = fetchedStations.map((station) => { + if (!station.lat || !station.lng) { + console.warn("Invalid station coordinates:", station); + return null; + } + + const marker = window.L.marker([station.lat, station.lng], { + icon: window.L.divIcon({ + html: `
+
+
`, + className: 'station-marker', + iconSize: [24, 24], + iconAnchor: [12, 12], + }), + }) + .addTo(mapInstance) + .bindPopup(` +
+ 🚓 ${station.name}
+ 📍 ${station.location}
+ 👮 ${station.officers} officers
+ 📏 Distance: ${station.distance} +
+ `); + + marker.on('click', () => setSelectedStation(station)); + return marker; + }).filter(Boolean); + + setMarkers([userMarker, ...stationMarkers]); + console.log('Markers added successfully'); + } + } catch (error) { + console.error("Error initializing map:", error); + if (isComponentMounted) { + setError(`Failed to initialize map: ${error.message}`); + } + } finally { + if (isComponentMounted) { + setLoading(false); + } + } + }, + (error) => { + console.error("Geolocation error:", error); + if (isComponentMounted) { + let errorMessage = "Unable to access your location. "; + switch (error.code) { + case error.PERMISSION_DENIED: + errorMessage += "Please enable location services and refresh the page."; + break; + case error.POSITION_UNAVAILABLE: + errorMessage += "Location information is unavailable."; + break; + case error.TIMEOUT: + errorMessage += "Location request timed out."; + break; + default: + errorMessage += "An unknown error occurred."; + break; + } + setError(errorMessage); + setLoading(false); + } + }, + { + enableHighAccuracy: true, + timeout: 10000, + maximumAge: 300000 + } + ); + }; + + // Only initialize if we haven't already + if (!map) { + initializeMap(); } - }, []); + + // Cleanup function to remove map when component unmounts + return () => { + isComponentMounted = false; + console.log('Cleaning up map component...'); + + // Clean up markers first + markers.forEach((marker) => { + if (marker && marker.remove) { + try { + marker.remove(); + } catch (e) { + console.warn('Error removing marker:', e); + } + } + }); + + // Clean up map instance + if (mapInstance && mapInstance.remove) { + try { + console.log('Removing map instance...'); + mapInstance.remove(); + } catch (e) { + console.warn('Error removing map instance:', e); + } + } + + // Clean up state map + if (map && map.remove) { + try { + console.log('Removing state map...'); + map.remove(); + } catch (e) { + console.warn('Error removing state map:', e); + } + } + + // Clear the map container + const mapElement = document.getElementById('map'); + if (mapElement) { + mapElement.innerHTML = ''; + delete mapElement._leaflet_id; + } + }; + }, []); // Remove map dependency to prevent infinite loops return (
@@ -123,14 +435,53 @@ const MapStations = () => {
-

Police Stations Near You

+
+

Police Stations Near You

+ {loading &&

Loading stations...

} + {error &&

{error}

} +
-
+
+ {loading && ( +
+
+
+

Loading map and stations...

+
+
+ )} + {error && !loading && ( +
+
+
⚠️ Map Error
+

{error}

+ +
+
+ )}
+ {stations.length === 0 && !loading && ( +
+

No police stations found in your area.

+
+ )} {stations.map((station) => (
{ onClick={() => setSelectedStation(station)} >
-
+

{station.name}

{station.location}
- approx. + {station.distance}

{station.officers} officers diff --git a/frontend/app/layout.jsx b/frontend/app/layout.jsx index ad9172c..55eaf08 100644 --- a/frontend/app/layout.jsx +++ b/frontend/app/layout.jsx @@ -15,11 +15,39 @@ export default function RootLayout({ children }) { return ( - - + + + { phone: "", badgeNumber: "", adminId: "", + email: "", password: "", }); const [error, setError] = useState(""); @@ -48,29 +48,29 @@ const Login = () => { const endpoint = isSignup ? "http://localhost:5001/api/users/register" : "http://localhost:5001/api/users/login"; - const payload = { ...credentials, role }; try { const response = await fetch(endpoint, { method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(payload), + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + role, + ...credentials, + }), }); const data = await response.json(); -<<<<<<< HEAD console.log("API Response:", data); if (!response.ok) { throw new Error(data.message || "Something went wrong"); } -======= - if (!response.ok) throw new Error(data.message || "Something went wrong"); ->>>>>>> bd4cc6b545b67df56b95f554d722b0185fab6322 if (data.token) { sessionStorage.setItem("token", data.token); - sessionStorage.setItem("role", role); + sessionStorage.setItem("loggedIn", role); sessionStorage.setItem("data", JSON.stringify(data)); router.push(`/dashboard/${role}Dashboard`); } else { @@ -83,9 +83,8 @@ const Login = () => { } }; -<<<<<<< HEAD const capitalizedRole = role?.charAt(0).toUpperCase() + role?.slice(1); -======= + const getImageSrc = () => { const imageMap = { police: "/policeBg.jpg", @@ -94,25 +93,22 @@ const Login = () => { }; return imageMap[role] || "/defaultBg.jpg"; }; ->>>>>>> bd4cc6b545b67df56b95f554d722b0185fab6322 return ( <> {role !== "anonymous" && ( -<<<<<<< HEAD -

-
-

- {isSignup ? "Sign Up" : "Login"} as {capitalizedRole} +
+ {/* Left: Form Section */} +
+

+ {isSignup ? "Sign Up" : "Login"} as{" "} + {capitalizedRole}

-
- {error && ( -

{error}

- )} + {error &&

{error}

} -
+ {role === "police" && ( <> { )} + {/* Common email input for all roles */} + + {/* Common password input for all except anonymous */} {

-
- - {/* Right Section: Role-specific background image */} -
- Login Background - {/* Left: Form Section */} -
-

- {isSignup ? "Sign Up" : "Login"} as{" "} - {role?.charAt(0).toUpperCase() + role?.slice(1)} -

- - {error &&

{error}

} - - - {role === "police" && ( - <> - - - - )} - {role === "citizen" && ( - <> - - - - )} - {role === "community" && ( - <> - - - - )} - - - - -

- {isSignup ? "Already have an account?" : "Don't have an account?"}{" "} - -

-
{/* Right: Image Section */}
@@ -317,7 +217,6 @@ const Login = () => { src={getImageSrc()} alt="Login Background" className="rounded-2xl w-full h-auto object-cover shadow-lg" ->>>>>>> bd4cc6b545b67df56b95f554d722b0185fab6322 />
diff --git a/frontend/app/supportPages/CitizenReport/page.jsx b/frontend/app/supportPages/CitizenReport/page.jsx index 597d811..1341cca 100644 --- a/frontend/app/supportPages/CitizenReport/page.jsx +++ b/frontend/app/supportPages/CitizenReport/page.jsx @@ -1,5 +1,5 @@ "use client"; -import { FileText, MapPin } from "lucide-react"; +import { FileText, MapPin, ChevronDown } from "lucide-react"; import { useState, useEffect } from "react"; import { io } from "socket.io-client"; import { jwtDecode } from "jwt-decode"; // Correct import @@ -16,6 +16,15 @@ const FileReportPage = () => { }); const [message, setMessage] = useState(null); + const [isDropdownOpen, setIsDropdownOpen] = useState(false); + + const reportTypes = [ + { value: "", label: "Select Type" }, + { value: "Accident", label: "Accident" }, + { value: "Crime", label: "Crime" }, + { value: "Suspicious Activity", label: "Suspicious Activity" }, + { value: "Emergency", label: "Emergency" }, + ]; useEffect(() => { // Get user info from JWT token in sessionStorage @@ -50,6 +59,18 @@ const FileReportPage = () => { return () => socket.off("new_complaint"); // Cleanup on unmount }, []); + // Close dropdown when clicking outside + useEffect(() => { + const handleClickOutside = (event) => { + if (isDropdownOpen && !event.target.closest('.relative')) { + setIsDropdownOpen(false); + } + }; + + document.addEventListener('mousedown', handleClickOutside); + return () => document.removeEventListener('mousedown', handleClickOutside); + }, [isDropdownOpen]); + const handleChange = (e) => { const { name, value } = e.target; setReportData((prevState) => ({ @@ -58,6 +79,14 @@ const FileReportPage = () => { })); }; + const handleReportTypeSelect = (value) => { + setReportData((prevState) => ({ + ...prevState, + type: value, + })); + setIsDropdownOpen(false); + }; + const handleSubmit = async (e) => { e.preventDefault(); @@ -141,23 +170,45 @@ const FileReportPage = () => {
{/* Report Type */} -
+
- +
+ + + {isDropdownOpen && ( +
+ {reportTypes.map((type) => ( + + ))} +
+ )} +
{/* Description */} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 4126c30..8134200 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8319,6 +8319,29 @@ "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" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/fflate": { "version": "0.8.2", "license": "MIT" @@ -8457,99 +8480,14 @@ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dependencies": { -<<<<<<< HEAD "es-errors": "^1.3.0", + "fetch-blob": "^3.1.2", "function-bind": "^1.1.2" -======= - "fetch-blob": "^3.1.2" }, "engines": { "node": ">=12.20.0" } }, - "node_modules/framer-motion": { - "version": "12.18.1", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.18.1.tgz", - "integrity": "sha512-6o4EDuRPLk4LSZ1kRnnEOurbQ86MklVk+Y1rFBUKiF+d2pCdvMjWVu0ZkyMVCTwl5UyTH2n/zJEJx+jvTYuxow==", - "license": "MIT", - "dependencies": { - "motion-dom": "^12.18.1", - "motion-utils": "^12.18.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "@emotion/is-prop-valid": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/is-prop-valid": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - } - }, - "node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" ->>>>>>> bd4cc6b545b67df56b95f554d722b0185fab6322 - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/form-data/node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -9831,11 +9769,6 @@ "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/jiti": { - "dev": true, - "optional": true, - "peer": true - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -10163,31 +10096,7 @@ "version": "12.18.1", "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.18.1.tgz", "integrity": "sha512-dR/4EYT23Snd+eUSLrde63Ws3oXQtJNw/krgautvTfwrN/2cHfCZMdu6CeTxVfRRWREW3Fy1f5vobRDiBb/q+w==", -<<<<<<< HEAD -======= - "license": "MIT", - "dependencies": { - "motion-utils": "^12.18.1" - } - }, - "node_modules/motion-utils": { - "version": "12.18.1", - "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.18.1.tgz", - "integrity": "sha512-az26YDU4WoDP0ueAkUtABLk2BIxe28d8NH1qWT8jPGhPyf44XTdDUh8pDk9OPphaSrR9McgpcJlgwSOIw/sfkA==", - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", "license": "MIT", ->>>>>>> bd4cc6b545b67df56b95f554d722b0185fab6322 "dependencies": { "motion-utils": "^12.18.1" } @@ -10313,6 +10222,26 @@ "node": "^10 || ^12 || >=14" } }, + "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==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "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", @@ -10330,28 +10259,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/node-fetch/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/node-fetch/node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -10363,33 +10270,6 @@ "node": ">=12.20.0" } }, - "node_modules/node-fetch/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==", - "deprecated": "Use your platform's native DOMException instead", - "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/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/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", @@ -16765,6 +16645,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/which-boxed-primitive": { "version": "1.1.1", "dev": true,