- Added a helper function `constrainCropData` to ensure crop dimensions remain within image boundaries and maintain a 1:1 aspect ratio.
- Updated image loading and cropping logic to utilize the new helper function for better validation of crop data.
- Improved mouse event handling for cropping to ensure accurate resizing and positioning of the crop area.
- Adjusted crop style calculations to account for the actual display size of the image within its container.
These changes aim to provide a more robust and user-friendly experience when uploading and cropping avatars.
Signed-off-by: Innei <tukon479@gmail.com>