From e2289ce1e6652568ad9017f6009681eddc8bc1c1 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:55:42 +0100 Subject: [PATCH] Auto commit for release 'branch-v6.2' on 2024-12-14 --- app/Events/Security/UserAttemptedLogin.php | 3 +- app/Handlers/Events/UserEventHandler.php | 8 +- app/Handlers/Observer/AccountObserver.php | 1 + app/Http/Controllers/Auth/LoginController.php | 4 +- app/Http/Controllers/DebugController.php | 7 +- .../PiggyBank/AmountController.php | 11 +- .../Controllers/PiggyBank/EditController.php | 10 +- .../Controllers/PreferencesController.php | 56 +- app/Http/Requests/PiggyBankUpdateRequest.php | 4 +- app/Http/Requests/PreferencesRequest.php | 2 +- app/Models/PiggyBank.php | 1 + .../Admin/UnknownUserLoginAttempt.php | 6 +- app/Notifications/Admin/UserInvitation.php | 7 +- app/Notifications/Admin/UserRegistration.php | 7 +- .../Admin/VersionCheckResult.php | 14 +- .../Notifiables/OwnerNotifiable.php | 5 +- .../ReturnsAvailableChannels.php | 8 +- .../Security/DisabledMFANotification.php | 4 +- .../Security/EnabledMFANotification.php | 5 +- .../Security/MFABackupFewLeftNotification.php | 4 +- .../Security/MFABackupNoLeftNotification.php | 5 +- .../MFAManyFailedAttemptsNotification.php | 5 +- .../MFAUsedBackupCodeNotification.php | 4 +- .../Security/NewBackupCodesNotification.php | 4 +- .../Security/UserFailedLoginAttempt.php | 6 +- .../Test/OwnerTestNotificationEmail.php | 4 +- .../Test/OwnerTestNotificationNtfy.php | 3 +- .../Test/OwnerTestNotificationPushover.php | 4 +- .../Test/OwnerTestNotificationSlack.php | 1 - .../Test/UserTestNotificationEmail.php | 5 +- .../Test/UserTestNotificationNtfy.php | 1 - .../Test/UserTestNotificationPushover.php | 4 +- app/Notifications/User/BillReminder.php | 12 +- app/Notifications/User/NewAccessToken.php | 8 +- app/Notifications/User/RuleActionFailed.php | 15 +- .../User/TransactionCreation.php | 7 +- app/Notifications/User/UserLogin.php | 12 +- app/Notifications/User/UserNewPassword.php | 4 +- app/Notifications/User/UserRegistration.php | 4 +- app/Providers/EventServiceProvider.php | 70 +- .../PiggyBank/ModifiesPiggyBanks.php | 39 +- .../PiggyBank/PiggyBankRepository.php | 52 +- .../PiggyBankRepositoryInterface.php | 3 +- app/Support/Preferences.php | 1 + app/Support/Steam.php | 354 ++++---- .../Actions/UpdatePiggybank.php | 1 + app/Transformers/PiggyBankTransformer.php | 2 +- app/User.php | 62 +- config/firefly.php | 2 +- config/notifications.php | 4 +- package-lock.json | 761 +++++++++++------- resources/assets/v1/src/locales/es.json | 4 +- resources/lang/en_US/email.php | 2 +- resources/lang/en_US/firefly.php | 2 +- 54 files changed, 911 insertions(+), 723 deletions(-) diff --git a/app/Events/Security/UserAttemptedLogin.php b/app/Events/Security/UserAttemptedLogin.php index 55dc3af6a9..6313bcbc35 100644 --- a/app/Events/Security/UserAttemptedLogin.php +++ b/app/Events/Security/UserAttemptedLogin.php @@ -1,4 +1,5 @@ user = $user; diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 3eaa2dd6ea..df7c94b7bd 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -32,7 +32,6 @@ use FireflyIII\Events\DetectedNewIPAddress; use FireflyIII\Events\RegisteredUser; use FireflyIII\Events\RequestedNewPassword; use FireflyIII\Events\Security\UserAttemptedLogin; -use FireflyIII\Events\Test\OwnerTestNotificationChannel; use FireflyIII\Events\Test\UserTestNotificationChannel; use FireflyIII\Events\UserChangedEmail; use FireflyIII\Exceptions\FireflyException; @@ -44,10 +43,6 @@ use FireflyIII\Models\UserGroup; use FireflyIII\Models\UserRole; use FireflyIII\Notifications\Admin\UserRegistration as AdminRegistrationNotification; use FireflyIII\Notifications\Security\UserFailedLoginAttempt; -use FireflyIII\Notifications\Test\OwnerTestNotificationEmail; -use FireflyIII\Notifications\Test\OwnerTestNotificationNtfy; -use FireflyIII\Notifications\Test\OwnerTestNotificationPushover; -use FireflyIII\Notifications\Test\OwnerTestNotificationSlack; use FireflyIII\Notifications\Test\UserTestNotificationEmail; use FireflyIII\Notifications\Test\UserTestNotificationNtfy; use FireflyIII\Notifications\Test\UserTestNotificationPushover; @@ -437,7 +432,8 @@ class UserEventHandler } } - public function sendLoginAttemptNotification(UserAttemptedLogin $event): void { + public function sendLoginAttemptNotification(UserAttemptedLogin $event): void + { try { Notification::send($event->user, new UserFailedLoginAttempt($event->user)); } catch (\Exception $e) { // @phpstan-ignore-line diff --git a/app/Handlers/Observer/AccountObserver.php b/app/Handlers/Observer/AccountObserver.php index f140aaa84c..3e48547c8a 100644 --- a/app/Handlers/Observer/AccountObserver.php +++ b/app/Handlers/Observer/AccountObserver.php @@ -39,6 +39,7 @@ class AccountObserver { app('log')->debug('Observe "deleting" of an account.'); $account->accountMeta()->delete(); + /** @var PiggyBank $piggy */ foreach ($account->piggyBanks()->get() as $piggy) { $piggy->accounts()->detach($account); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 8ef53caf16..51f8443cd4 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -128,12 +128,12 @@ class LoginController extends Controller } app('log')->warning('Login attempt failed.'); $username = (string) $request->get($this->username()); - $user = $this->repository->findByEmail($username); + $user = $this->repository->findByEmail($username); if (null === $user) { // send event to owner. event(new UnknownUserAttemptedLogin($username)); } - if(null !== $user) { + if (null !== $user) { event(new UserAttemptedLogin($user)); } diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index 5f2f4338c1..5b082a1981 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -29,7 +29,6 @@ use Exception; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Models\AccountType; -use FireflyIII\Models\PiggyBank; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Support\Http\Controllers\GetConfigurationData; @@ -282,10 +281,10 @@ class DebugController extends Controller private function getUserFlags(): string { - $flags = []; + $flags = []; /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); // has liabilities if ($user->accounts()->accountTypeIn([AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE])->count() > 0) { @@ -301,7 +300,7 @@ class DebugController extends Controller } // has stored reconciliations - $type = TransactionType::whereType(TransactionType::RECONCILIATION)->first(); + $type = TransactionType::whereType(TransactionType::RECONCILIATION)->first(); if ($user->transactionJournals()->where('transaction_type_id', $type->id)->count() > 0) { $flags[] = ':ledger:'; } diff --git a/app/Http/Controllers/PiggyBank/AmountController.php b/app/Http/Controllers/PiggyBank/AmountController.php index 857d377c26..b9d4bc29a8 100644 --- a/app/Http/Controllers/PiggyBank/AmountController.php +++ b/app/Http/Controllers/PiggyBank/AmountController.php @@ -88,7 +88,7 @@ class AmountController extends Controller ]; $total = bcadd($total, $leftOnAccount); } - $total = (float) $total; // intentional float. + $total = (float) $total; // intentional float. return view('piggy-banks.add', compact('piggyBank', 'accounts', 'total')); } @@ -130,9 +130,10 @@ class AmountController extends Controller $amounts = $data['amount'] ?? []; $total = '0'; Log::debug('Start with loop.'); + /** @var Account $account */ foreach ($piggyBank->accounts as $account) { - $amount = (string) ($amounts[$account->id] ?? '0'); + $amount = (string) ($amounts[$account->id] ?? '0'); if ('' === $amount || 0 === bccomp($amount, '0')) { continue; } @@ -148,7 +149,7 @@ class AmountController extends Controller $amount = $leftToSave; } - $canAddAmount = $this->piggyRepos->canAddAmount($piggyBank, $account, $amount); + $canAddAmount = $this->piggyRepos->canAddAmount($piggyBank, $account, $amount); if ($canAddAmount) { $this->piggyRepos->addAmount($piggyBank, $account, $amount); $total = bcadd($total, $amount); @@ -182,7 +183,8 @@ class AmountController extends Controller if (!is_array($amounts)) { $amounts = []; } - $total = '0'; + $total = '0'; + /** @var Account $account */ foreach ($piggyBank->accounts as $account) { $amount = (string) ($amounts[$account->id] ?? '0'); @@ -235,6 +237,7 @@ class AmountController extends Controller 'saved_so_far' => $this->piggyRepos->getCurrentAmount($piggyBank, $account), ]; } + return view('piggy-banks.remove', compact('piggyBank', 'accounts')); } diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index 0a3d8a377b..2d73e95e09 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -81,15 +81,15 @@ class EditController extends Controller $startDate = $piggyBank->start_date?->format('Y-m-d'); $preFilled = [ - 'name' => $piggyBank->name, + 'name' => $piggyBank->name, 'target_amount' => app('steam')->bcround($piggyBank->target_amount, $piggyBank->transactionCurrency->decimal_places), 'target_date' => $targetDate, 'start_date' => $startDate, - 'accounts' => [], - 'object_group' => null !== $piggyBank->objectGroups->first() ? $piggyBank->objectGroups->first()->title : '', - 'notes' => null === $note ? '' : $note->text, + 'accounts' => [], + 'object_group' => null !== $piggyBank->objectGroups->first() ? $piggyBank->objectGroups->first()->title : '', + 'notes' => null === $note ? '' : $note->text, ]; - foreach($piggyBank->accounts as $account) { + foreach ($piggyBank->accounts as $account) { $preFilled['accounts'][] = $account->id; } if (0 === bccomp($piggyBank->target_amount, '0')) { diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index 3f8072d6d5..7c35414b8b 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -30,7 +30,6 @@ use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\Preference; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use FireflyIII\Support\Notifications\UrlValidator; use FireflyIII\User; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; @@ -69,9 +68,9 @@ class PreferencesController extends Controller */ public function index(AccountRepositoryInterface $repository) { - $accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]); - $isDocker = env('IS_DOCKER', false); - $groupedAccounts = []; + $accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]); + $isDocker = env('IS_DOCKER', false); + $groupedAccounts = []; /** @var Account $account */ foreach ($accounts as $account) { @@ -90,41 +89,41 @@ class PreferencesController extends Controller ksort($groupedAccounts); /** @var array $accountIds */ - $accountIds = $accounts->pluck('id')->toArray(); - $viewRange = app('navigation')->getViewRange(false); - $frontpageAccountsPref = app('preferences')->get('frontpageAccounts', $accountIds); - $frontpageAccounts = $frontpageAccountsPref->data; + $accountIds = $accounts->pluck('id')->toArray(); + $viewRange = app('navigation')->getViewRange(false); + $frontpageAccountsPref = app('preferences')->get('frontpageAccounts', $accountIds); + $frontpageAccounts = $frontpageAccountsPref->data; if (!is_array($frontpageAccounts)) { $frontpageAccounts = $accountIds; } - $language = app('steam')->getLanguage(); - $languages = config('firefly.languages'); - $locale = app('preferences')->get('locale', config('firefly.default_locale', 'equal'))->data; - $listPageSize = app('preferences')->get('listPageSize', 50)->data; - $darkMode = app('preferences')->get('darkMode', 'browser')->data; - $customFiscalYear = app('preferences')->get('customFiscalYear', 0)->data; - $fiscalYearStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data; + $language = app('steam')->getLanguage(); + $languages = config('firefly.languages'); + $locale = app('preferences')->get('locale', config('firefly.default_locale', 'equal'))->data; + $listPageSize = app('preferences')->get('listPageSize', 50)->data; + $darkMode = app('preferences')->get('darkMode', 'browser')->data; + $customFiscalYear = app('preferences')->get('customFiscalYear', 0)->data; + $fiscalYearStartStr = app('preferences')->get('fiscalYearStart', '01-01')->data; if (is_array($fiscalYearStartStr)) { $fiscalYearStartStr = '01-01'; } - $fiscalYearStart = sprintf('%s-%s', date('Y'), (string) $fiscalYearStartStr); - $tjOptionalFields = app('preferences')->get('transaction_journal_optional_fields', [])->data; - $availableDarkModes = config('firefly.available_dark_modes'); + $fiscalYearStart = sprintf('%s-%s', date('Y'), (string) $fiscalYearStartStr); + $tjOptionalFields = app('preferences')->get('transaction_journal_optional_fields', [])->data; + $availableDarkModes = config('firefly.available_dark_modes'); // notifications settings - $slackUrl = app('preferences')->getEncrypted('slack_webhook_url', '')->data; - $pushoverAppToken = (string) app('preferences')->getEncrypted('pushover_app_token', '')->data; - $pushoverUserToken = (string) app('preferences')->getEncrypted('pushover_user_token', '')->data; - $ntfyServer = app('preferences')->getEncrypted('ntfy_server', 'https://ntfy.sh')->data; - $ntfyTopic = (string) app('preferences')->getEncrypted('ntfy_topic', '')->data; - $ntfyAuth = app('preferences')->get('ntfy_auth', false)->data; - $ntfyUser = app('preferences')->getEncrypted('ntfy_user', '')->data; - $ntfyPass = (string) app('preferences')->getEncrypted('ntfy_pass', '')->data; + $slackUrl = app('preferences')->getEncrypted('slack_webhook_url', '')->data; + $pushoverAppToken = (string) app('preferences')->getEncrypted('pushover_app_token', '')->data; + $pushoverUserToken = (string) app('preferences')->getEncrypted('pushover_user_token', '')->data; + $ntfyServer = app('preferences')->getEncrypted('ntfy_server', 'https://ntfy.sh')->data; + $ntfyTopic = (string) app('preferences')->getEncrypted('ntfy_topic', '')->data; + $ntfyAuth = app('preferences')->get('ntfy_auth', false)->data; + $ntfyUser = app('preferences')->getEncrypted('ntfy_user', '')->data; + $ntfyPass = (string) app('preferences')->getEncrypted('ntfy_pass', '')->data; $channels = config('notifications.channels'); $forcedAvailability = []; // notification preferences - $notifications = []; + $notifications = []; foreach (config('notifications.notifications.user') as $key => $info) { if ($info['enabled']) { $notifications[$key] @@ -151,7 +150,7 @@ class PreferencesController extends Controller app('log')->error($e->getMessage()); $locales = []; } - $locales = ['equal' => (string) trans('firefly.equal_to_language')] + $locales; + $locales = ['equal' => (string) trans('firefly.equal_to_language')] + $locales; // an important fallback is that the frontPageAccount array gets refilled automatically // when it turns up empty. if (0 === count($frontpageAccounts)) { @@ -342,6 +341,7 @@ class PreferencesController extends Controller event(new UserTestNotificationChannel($channel, $user)); session()->flash('success', (string) trans('firefly.notification_test_executed', ['channel' => $channel])); } + return ''; } } diff --git a/app/Http/Requests/PiggyBankUpdateRequest.php b/app/Http/Requests/PiggyBankUpdateRequest.php index 5c2192ffdd..7a76ae0ca2 100644 --- a/app/Http/Requests/PiggyBankUpdateRequest.php +++ b/app/Http/Requests/PiggyBankUpdateRequest.php @@ -61,6 +61,7 @@ class PiggyBankUpdateRequest extends FormRequest foreach ($accounts as $item) { $data['accounts'][] = ['account_id' => (int) $item]; } + return $data; } @@ -106,7 +107,7 @@ class PiggyBankUpdateRequest extends FormRequest if ($accountCurrency->id !== $currency->id && 'true' !== $isMultiCurrency) { $validator->errors()->add('accounts', trans('validation.invalid_account_currency')); } - $type = $account->accountType->type; + $type = $account->accountType->type; if (!in_array($type, $types, true)) { $validator->errors()->add('accounts', trans('validation.invalid_account_type')); } @@ -121,6 +122,7 @@ class PiggyBankUpdateRequest extends FormRequest Log::channel('audit')->error(sprintf('Validation errors in %s', __CLASS__), $validator->errors()->toArray()); } } + private function getCurrencyFromData(array $data): TransactionCurrency { $currencyId = (int) ($data['transaction_currency_id'] ?? 0); diff --git a/app/Http/Requests/PreferencesRequest.php b/app/Http/Requests/PreferencesRequest.php index de4f0d174d..ca8236c464 100644 --- a/app/Http/Requests/PreferencesRequest.php +++ b/app/Http/Requests/PreferencesRequest.php @@ -1,4 +1,5 @@ belongsTo(TransactionCurrency::class); } + public function account(): BelongsTo { throw new FireflyException('This method is not available on PiggyBank.'); diff --git a/app/Notifications/Admin/UnknownUserLoginAttempt.php b/app/Notifications/Admin/UnknownUserLoginAttempt.php index e4eb4a678b..701a7fa91e 100644 --- a/app/Notifications/Admin/UnknownUserLoginAttempt.php +++ b/app/Notifications/Admin/UnknownUserLoginAttempt.php @@ -61,7 +61,8 @@ class UnknownUserLoginAttempt extends Notification { return new MailMessage() ->markdown('emails.owner.unknown-user', ['address' => $this->address]) - ->subject((string) trans('email.unknown_user_subject')); + ->subject((string) trans('email.unknown_user_subject')) + ; } /** @@ -84,7 +85,8 @@ class UnknownUserLoginAttempt extends Notification public function toPushover(OwnerNotifiable $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address])) - ->title((string) trans('email.unknown_user_subject')); + ->title((string) trans('email.unknown_user_subject')) + ; } /** diff --git a/app/Notifications/Admin/UserInvitation.php b/app/Notifications/Admin/UserInvitation.php index 7f9b90a0e0..67fbc8fb33 100644 --- a/app/Notifications/Admin/UserInvitation.php +++ b/app/Notifications/Admin/UserInvitation.php @@ -46,7 +46,6 @@ class UserInvitation extends Notification private InvitedUser $invitee; private OwnerNotifiable $owner; - public function __construct(OwnerNotifiable $owner, InvitedUser $invitee) { $this->invitee = $invitee; @@ -69,7 +68,8 @@ class UserInvitation extends Notification { return (new MailMessage()) ->markdown('emails.invitation-created', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email]) - ->subject((string) trans('email.invitation_created_subject')); + ->subject((string) trans('email.invitation_created_subject')) + ; } /** @@ -95,7 +95,8 @@ class UserInvitation extends Notification Log::debug('Now in toPushover() for UserInvitation'); return PushoverMessage::create((string) trans('email.invitation_created_body', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email])) - ->title((string) trans('email.invitation_created_subject')); + ->title((string) trans('email.invitation_created_subject')) + ; } /** diff --git a/app/Notifications/Admin/UserRegistration.php b/app/Notifications/Admin/UserRegistration.php index 5a6e505da0..4865a0e4f5 100644 --- a/app/Notifications/Admin/UserRegistration.php +++ b/app/Notifications/Admin/UserRegistration.php @@ -46,7 +46,6 @@ class UserRegistration extends Notification private OwnerNotifiable $owner; private User $user; - public function __construct(OwnerNotifiable $owner, User $user) { $this->user = $user; @@ -69,7 +68,8 @@ class UserRegistration extends Notification { return (new MailMessage()) ->markdown('emails.registered-admin', ['email' => $this->user->email, 'id' => $this->user->id]) - ->subject((string) trans('email.registered_subject_admin')); + ->subject((string) trans('email.registered_subject_admin')) + ; } /** @@ -95,7 +95,8 @@ class UserRegistration extends Notification Log::debug('Now in toPushover() for UserRegistration'); return PushoverMessage::create((string) trans('email.admin_new_user_registered', ['email' => $this->user->email, 'invitee' => $this->user->email])) - ->title((string) trans('email.registered_subject_admin')); + ->title((string) trans('email.registered_subject_admin')) + ; } /** diff --git a/app/Notifications/Admin/VersionCheckResult.php b/app/Notifications/Admin/VersionCheckResult.php index 809504a546..c4a4e783b9 100644 --- a/app/Notifications/Admin/VersionCheckResult.php +++ b/app/Notifications/Admin/VersionCheckResult.php @@ -44,7 +44,6 @@ class VersionCheckResult extends Notification private string $message; - public function __construct(string $message) { $this->message = $message; @@ -66,7 +65,8 @@ class VersionCheckResult extends Notification { return (new MailMessage()) ->markdown('emails.new-version', ['message' => $this->message]) - ->subject((string) trans('email.new_version_email_subject')); + ->subject((string) trans('email.new_version_email_subject')) + ; } /** @@ -92,7 +92,8 @@ class VersionCheckResult extends Notification Log::debug('Now in toPushover() for VersionCheckResult'); return PushoverMessage::create($this->message) - ->title((string) trans('email.new_version_email_subject')); + ->title((string) trans('email.new_version_email_subject')) + ; } /** @@ -101,9 +102,10 @@ class VersionCheckResult extends Notification public function toSlack(OwnerNotifiable $notifiable) { return new SlackMessage()->content($this->message) - ->attachment(static function ($attachment): void { - $attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases'); - }); + ->attachment(static function ($attachment): void { + $attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases'); + }) + ; } /** diff --git a/app/Notifications/Notifiables/OwnerNotifiable.php b/app/Notifications/Notifiables/OwnerNotifiable.php index 47abd5e0fd..300dd427fd 100644 --- a/app/Notifications/Notifiables/OwnerNotifiable.php +++ b/app/Notifications/Notifiables/OwnerNotifiable.php @@ -41,7 +41,7 @@ class OwnerNotifiable */ public function routeNotificationFor($driver, $notification = null) { - $method = 'routeNotificationFor' . Str::studly($driver); + $method = 'routeNotificationFor'.Str::studly($driver); if (method_exists($this, $method)) { Log::debug(sprintf('Redirect for settings to "%s".', $method)); @@ -62,7 +62,8 @@ class OwnerNotifiable $pushoverUserToken = (string) app('fireflyconfig')->getEncrypted('pushover_user_token', '')->data; return PushoverReceiver::withUserKey($pushoverUserToken) - ->withApplicationToken($pushoverAppToken); + ->withApplicationToken($pushoverAppToken) + ; } public function routeNotificationForSlack(): string diff --git a/app/Notifications/ReturnsAvailableChannels.php b/app/Notifications/ReturnsAvailableChannels.php index 0e35e1bd64..6844cad6e2 100644 --- a/app/Notifications/ReturnsAvailableChannels.php +++ b/app/Notifications/ReturnsAvailableChannels.php @@ -50,8 +50,8 @@ class ReturnsAvailableChannels private static function returnOwnerChannels(): array { - $channels = ['mail']; - $slackUrl = app('fireflyconfig')->getEncrypted('slack_webhook_url', '')->data; + $channels = ['mail']; + $slackUrl = app('fireflyconfig')->getEncrypted('slack_webhook_url', '')->data; if (UrlValidator::isValidWebhookURL($slackUrl)) { $channels[] = 'slack'; } @@ -83,8 +83,8 @@ class ReturnsAvailableChannels private static function returnUserChannels(User $user): array { - $channels = ['mail']; - $slackUrl = app('preferences')->getEncryptedForUser($user, 'slack_webhook_url', '')->data; + $channels = ['mail']; + $slackUrl = app('preferences')->getEncryptedForUser($user, 'slack_webhook_url', '')->data; if (UrlValidator::isValidWebhookURL($slackUrl)) { $channels[] = 'slack'; } diff --git a/app/Notifications/Security/DisabledMFANotification.php b/app/Notifications/Security/DisabledMFANotification.php index f870510ce5..55f2bfabc5 100644 --- a/app/Notifications/Security/DisabledMFANotification.php +++ b/app/Notifications/Security/DisabledMFANotification.php @@ -31,7 +31,6 @@ use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; -use Illuminate\Support\Facades\Log; use NotificationChannels\Pushover\PushoverMessage; use Ntfy\Message; @@ -82,7 +81,8 @@ class DisabledMFANotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.disabled_mfa_slack', ['email' => $this->user->email])) - ->title((string) trans('email.disabled_mfa_subject')); + ->title((string) trans('email.disabled_mfa_subject')) + ; } /** diff --git a/app/Notifications/Security/EnabledMFANotification.php b/app/Notifications/Security/EnabledMFANotification.php index 2bc1c9858d..b72cf1f45c 100644 --- a/app/Notifications/Security/EnabledMFANotification.php +++ b/app/Notifications/Security/EnabledMFANotification.php @@ -40,7 +40,6 @@ class EnabledMFANotification extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -82,7 +81,8 @@ class EnabledMFANotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.enabled_mfa_slack', ['email' => $this->user->email])) - ->title((string) trans('email.enabled_mfa_subject')); + ->title((string) trans('email.enabled_mfa_subject')) + ; } /** @@ -95,7 +95,6 @@ class EnabledMFANotification extends Notification return new SlackMessage()->content($message); } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/app/Notifications/Security/MFABackupFewLeftNotification.php b/app/Notifications/Security/MFABackupFewLeftNotification.php index cad845ed69..7f6b9a207b 100644 --- a/app/Notifications/Security/MFABackupFewLeftNotification.php +++ b/app/Notifications/Security/MFABackupFewLeftNotification.php @@ -93,10 +93,10 @@ class MFABackupFewLeftNotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.mfa_few_backups_left_slack', ['email' => $this->user->email, 'count' => $this->count])) - ->title((string) trans('email.mfa_few_backups_left_subject')); + ->title((string) trans('email.mfa_few_backups_left_subject')) + ; } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/app/Notifications/Security/MFABackupNoLeftNotification.php b/app/Notifications/Security/MFABackupNoLeftNotification.php index a9389977bc..58498206fc 100644 --- a/app/Notifications/Security/MFABackupNoLeftNotification.php +++ b/app/Notifications/Security/MFABackupNoLeftNotification.php @@ -40,7 +40,6 @@ class MFABackupNoLeftNotification extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -92,10 +91,10 @@ class MFABackupNoLeftNotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.mfa_few_backups_left_slack', ['email' => $this->user->email])) - ->title((string) trans('email.mfa_no_backups_left_slack')); + ->title((string) trans('email.mfa_no_backups_left_slack')) + ; } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/app/Notifications/Security/MFAManyFailedAttemptsNotification.php b/app/Notifications/Security/MFAManyFailedAttemptsNotification.php index 54f3e5a9ad..f5446f4519 100644 --- a/app/Notifications/Security/MFAManyFailedAttemptsNotification.php +++ b/app/Notifications/Security/MFAManyFailedAttemptsNotification.php @@ -47,7 +47,6 @@ class MFAManyFailedAttemptsNotification extends Notification $this->count = $count; } - public function toArray(User $notifiable) { return [ @@ -91,10 +90,10 @@ class MFAManyFailedAttemptsNotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.mfa_many_failed_slack', ['email' => $this->user->email, 'count' => $this->count])) - ->title((string) trans('email.mfa_many_failed_subject')); + ->title((string) trans('email.mfa_many_failed_subject')) + ; } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/app/Notifications/Security/MFAUsedBackupCodeNotification.php b/app/Notifications/Security/MFAUsedBackupCodeNotification.php index f0680e72d5..56e61f9e98 100644 --- a/app/Notifications/Security/MFAUsedBackupCodeNotification.php +++ b/app/Notifications/Security/MFAUsedBackupCodeNotification.php @@ -40,7 +40,6 @@ class MFAUsedBackupCodeNotification extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -92,7 +91,8 @@ class MFAUsedBackupCodeNotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.used_backup_code_slack', ['email' => $this->user->email])) - ->title((string) trans('email.used_backup_code_subject')); + ->title((string) trans('email.used_backup_code_subject')) + ; } /** diff --git a/app/Notifications/Security/NewBackupCodesNotification.php b/app/Notifications/Security/NewBackupCodesNotification.php index 196c577b74..82719558da 100644 --- a/app/Notifications/Security/NewBackupCodesNotification.php +++ b/app/Notifications/Security/NewBackupCodesNotification.php @@ -40,7 +40,6 @@ class NewBackupCodesNotification extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -92,7 +91,8 @@ class NewBackupCodesNotification extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.new_backup_codes_slack', ['email' => $this->user->email])) - ->title((string) trans('email.new_backup_codes_subject')); + ->title((string) trans('email.new_backup_codes_subject')) + ; } /** diff --git a/app/Notifications/Security/UserFailedLoginAttempt.php b/app/Notifications/Security/UserFailedLoginAttempt.php index c3827e45fd..adb6b4f99f 100644 --- a/app/Notifications/Security/UserFailedLoginAttempt.php +++ b/app/Notifications/Security/UserFailedLoginAttempt.php @@ -1,4 +1,5 @@ user = $user; } - public function toArray(User $notifiable) { return [ @@ -89,7 +88,8 @@ class UserFailedLoginAttempt extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.failed_login_message', ['email' => $this->user->email])) - ->title((string) trans('email.failed_login_subject')); + ->title((string) trans('email.failed_login_subject')) + ; } /** diff --git a/app/Notifications/Test/OwnerTestNotificationEmail.php b/app/Notifications/Test/OwnerTestNotificationEmail.php index 60d6911a83..72b1c85443 100644 --- a/app/Notifications/Test/OwnerTestNotificationEmail.php +++ b/app/Notifications/Test/OwnerTestNotificationEmail.php @@ -38,7 +38,6 @@ class OwnerTestNotificationEmail extends Notification private OwnerNotifiable $owner; - public function __construct(OwnerNotifiable $owner) { $this->owner = $owner; @@ -62,7 +61,8 @@ class OwnerTestNotificationEmail extends Notification return (new MailMessage()) ->markdown('emails.admin-test', ['email' => $address]) - ->subject((string) trans('email.admin_test_subject')); + ->subject((string) trans('email.admin_test_subject')) + ; } /** diff --git a/app/Notifications/Test/OwnerTestNotificationNtfy.php b/app/Notifications/Test/OwnerTestNotificationNtfy.php index a343a49c5a..36ea816bf9 100644 --- a/app/Notifications/Test/OwnerTestNotificationNtfy.php +++ b/app/Notifications/Test/OwnerTestNotificationNtfy.php @@ -42,7 +42,6 @@ class OwnerTestNotificationNtfy extends Notification public OwnerNotifiable $owner; - public function __construct(OwnerNotifiable $owner) { $this->owner = $owner; @@ -50,6 +49,8 @@ class OwnerTestNotificationNtfy extends Notification /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @param mixed $notifiable */ public function toArray($notifiable) { diff --git a/app/Notifications/Test/OwnerTestNotificationPushover.php b/app/Notifications/Test/OwnerTestNotificationPushover.php index bbb25a50b2..876d81f038 100644 --- a/app/Notifications/Test/OwnerTestNotificationPushover.php +++ b/app/Notifications/Test/OwnerTestNotificationPushover.php @@ -42,7 +42,6 @@ class OwnerTestNotificationPushover extends Notification private OwnerNotifiable $owner; - public function __construct(OwnerNotifiable $owner) { $this->owner = $owner; @@ -65,7 +64,8 @@ class OwnerTestNotificationPushover extends Notification Log::debug('Now in toPushover()'); return PushoverMessage::create((string) trans('email.admin_test_message', ['channel' => 'Pushover'])) - ->title((string) trans('email.admin_test_subject')); + ->title((string) trans('email.admin_test_subject')) + ; } /** diff --git a/app/Notifications/Test/OwnerTestNotificationSlack.php b/app/Notifications/Test/OwnerTestNotificationSlack.php index ee32e870f1..a8dab9aa0e 100644 --- a/app/Notifications/Test/OwnerTestNotificationSlack.php +++ b/app/Notifications/Test/OwnerTestNotificationSlack.php @@ -40,7 +40,6 @@ class OwnerTestNotificationSlack extends Notification private OwnerNotifiable $owner; - public function __construct(OwnerNotifiable $owner) { $this->owner = $owner; diff --git a/app/Notifications/Test/UserTestNotificationEmail.php b/app/Notifications/Test/UserTestNotificationEmail.php index f3ab78154a..6001bcb69c 100644 --- a/app/Notifications/Test/UserTestNotificationEmail.php +++ b/app/Notifications/Test/UserTestNotificationEmail.php @@ -38,7 +38,6 @@ class UserTestNotificationEmail extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -53,14 +52,14 @@ class UserTestNotificationEmail extends Notification ]; } - public function toMail(User $notifiable) { $address = (string) $notifiable->email; return (new MailMessage()) ->markdown('emails.admin-test', ['email' => $address]) - ->subject((string) trans('email.admin_test_subject')); + ->subject((string) trans('email.admin_test_subject')) + ; } /** diff --git a/app/Notifications/Test/UserTestNotificationNtfy.php b/app/Notifications/Test/UserTestNotificationNtfy.php index cbacae16f6..0305c40775 100644 --- a/app/Notifications/Test/UserTestNotificationNtfy.php +++ b/app/Notifications/Test/UserTestNotificationNtfy.php @@ -42,7 +42,6 @@ class UserTestNotificationNtfy extends Notification public User $user; - public function __construct(User $user) { $this->user = $user; diff --git a/app/Notifications/Test/UserTestNotificationPushover.php b/app/Notifications/Test/UserTestNotificationPushover.php index e2828ed7f8..d4da811e72 100644 --- a/app/Notifications/Test/UserTestNotificationPushover.php +++ b/app/Notifications/Test/UserTestNotificationPushover.php @@ -42,7 +42,6 @@ class UserTestNotificationPushover extends Notification private User $user; - public function __construct(User $user) { $this->user = $user; @@ -65,7 +64,8 @@ class UserTestNotificationPushover extends Notification Log::debug('Now in (user) toPushover()'); return PushoverMessage::create((string) trans('email.admin_test_message', ['channel' => 'Pushover'])) - ->title((string) trans('email.admin_test_subject')); + ->title((string) trans('email.admin_test_subject')) + ; } /** diff --git a/app/Notifications/User/BillReminder.php b/app/Notifications/User/BillReminder.php index 8c41751137..94d2988b8f 100644 --- a/app/Notifications/User/BillReminder.php +++ b/app/Notifications/User/BillReminder.php @@ -46,7 +46,6 @@ class BillReminder extends Notification private int $diff; private string $field; - public function __construct(Bill $bill, string $field, int $diff) { $this->bill = $bill; @@ -54,7 +53,6 @@ class BillReminder extends Notification $this->diff = $diff; } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -71,7 +69,8 @@ class BillReminder extends Notification { return (new MailMessage()) ->markdown('emails.bill-warning', ['field' => $this->field, 'diff' => $this->diff, 'bill' => $this->bill]) - ->subject($this->getSubject()); + ->subject($this->getSubject()) + ; } /** @@ -87,7 +86,8 @@ class BillReminder extends Notification ->attachment(static function ($attachment) use ($bill, $url): void { $attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url); }) - ->content($this->getSubject()); + ->content($this->getSubject()) + ; } public function toNtfy(User $notifiable): Message @@ -107,7 +107,8 @@ class BillReminder extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.bill_warning_please_action')) - ->title($this->getSubject()); + ->title($this->getSubject()) + ; } private function getSubject(): string @@ -116,6 +117,7 @@ class BillReminder extends Notification if (0 === $this->diff) { $message = (string) trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]); } + return $message; } diff --git a/app/Notifications/User/NewAccessToken.php b/app/Notifications/User/NewAccessToken.php index 65269d02a5..4853ca760f 100644 --- a/app/Notifications/User/NewAccessToken.php +++ b/app/Notifications/User/NewAccessToken.php @@ -41,10 +41,8 @@ class NewAccessToken extends Notification { use Queueable; - public function __construct() {} - public function toArray(User $notifiable) { return [ @@ -58,7 +56,8 @@ class NewAccessToken extends Notification { return (new MailMessage()) ->markdown('emails.token-created') - ->subject((string) trans('email.access_token_created_subject')); + ->subject((string) trans('email.access_token_created_subject')) + ; } /** @@ -86,7 +85,8 @@ class NewAccessToken extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.access_token_created_body')) - ->title((string) trans('email.access_token_created_subject')); + ->title((string) trans('email.access_token_created_subject')) + ; } /** diff --git a/app/Notifications/User/RuleActionFailed.php b/app/Notifications/User/RuleActionFailed.php index 60f3016e90..253847cbfd 100644 --- a/app/Notifications/User/RuleActionFailed.php +++ b/app/Notifications/User/RuleActionFailed.php @@ -46,15 +46,14 @@ class RuleActionFailed extends Notification private string $ruleLink; private string $ruleTitle; - public function __construct(array $params) { [$mainMessage, $groupTitle, $groupLink, $ruleTitle, $ruleLink] = $params; - $this->message = $mainMessage; - $this->groupTitle = $groupTitle; - $this->groupLink = $groupLink; - $this->ruleTitle = $ruleTitle; - $this->ruleLink = $ruleLink; + $this->message = $mainMessage; + $this->groupTitle = $groupTitle; + $this->groupLink = $groupLink; + $this->ruleTitle = $ruleTitle; + $this->ruleLink = $ruleLink; } /** @@ -83,7 +82,6 @@ class RuleActionFailed extends Notification }); } - public function toNtfy(User $notifiable): Message { $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable); @@ -108,9 +106,10 @@ class RuleActionFailed extends Notification public function via(User $notifiable) { $channels = ReturnsAvailableChannels::returnChannels('user', $notifiable); - if (($key = array_search('mail', $channels)) !== false) { + if (($key = array_search('mail', $channels, true)) !== false) { unset($channels[$key]); } + return $channels; } } diff --git a/app/Notifications/User/TransactionCreation.php b/app/Notifications/User/TransactionCreation.php index 9d1ac6e198..034ffc39c8 100644 --- a/app/Notifications/User/TransactionCreation.php +++ b/app/Notifications/User/TransactionCreation.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace FireflyIII\Notifications\User; -use FireflyIII\Notifications\ReturnsAvailableChannels; use FireflyIII\User; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; @@ -39,7 +38,6 @@ class TransactionCreation extends Notification private array $collection; - public function __construct(array $collection) { $this->collection = $collection; @@ -57,15 +55,14 @@ class TransactionCreation extends Notification /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function toMail(User $notifiable) { return (new MailMessage()) ->markdown('emails.report-new-journals', ['transformed' => $this->collection]) - ->subject(trans_choice('email.new_journals_subject', count($this->collection))); + ->subject(trans_choice('email.new_journals_subject', count($this->collection))) + ; } - /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/app/Notifications/User/UserLogin.php b/app/Notifications/User/UserLogin.php index bfa803fe30..11ecf67618 100644 --- a/app/Notifications/User/UserLogin.php +++ b/app/Notifications/User/UserLogin.php @@ -44,13 +44,11 @@ class UserLogin extends Notification private string $ip; - public function __construct(string $ip) { $this->ip = $ip; } - public function toArray(User $notifiable) { return [ @@ -66,7 +64,8 @@ class UserLogin extends Notification return (new MailMessage()) ->markdown('emails.new-ip', ['time' => $time, 'ipAddress' => $this->ip, 'host' => $this->getHost()]) - ->subject((string) trans('email.login_from_new_ip')); + ->subject((string) trans('email.login_from_new_ip')) + ; } public function toNtfy(User $notifiable): Message @@ -86,7 +85,8 @@ class UserLogin extends Notification public function toPushover(User $notifiable): PushoverMessage { return PushoverMessage::create((string) trans('email.slack_login_from_new_ip', ['host' => $this->getHost(), 'ip' => $this->ip])) - ->title((string) trans('email.login_from_new_ip')); + ->title((string) trans('email.login_from_new_ip')) + ; } /** @@ -105,7 +105,8 @@ class UserLogin extends Notification return ReturnsAvailableChannels::returnChannels('user', $notifiable); } - private function getHost(): string { + private function getHost(): string + { $host = ''; try { @@ -117,6 +118,7 @@ class UserLogin extends Notification if ($hostName !== $this->ip) { $host = $hostName; } + return $host; } } diff --git a/app/Notifications/User/UserNewPassword.php b/app/Notifications/User/UserNewPassword.php index 3b2cc285d0..4cb0ad7cad 100644 --- a/app/Notifications/User/UserNewPassword.php +++ b/app/Notifications/User/UserNewPassword.php @@ -43,7 +43,6 @@ class UserNewPassword extends Notification private string $url; - public function __construct(string $url) { $this->url = $url; @@ -65,7 +64,8 @@ class UserNewPassword extends Notification { return (new MailMessage()) ->markdown('emails.password', ['url' => $this->url]) - ->subject((string) trans('email.reset_pw_subject')); + ->subject((string) trans('email.reset_pw_subject')) + ; } /** diff --git a/app/Notifications/User/UserRegistration.php b/app/Notifications/User/UserRegistration.php index d839797b13..2d7c32a07c 100644 --- a/app/Notifications/User/UserRegistration.php +++ b/app/Notifications/User/UserRegistration.php @@ -36,7 +36,6 @@ class UserRegistration extends Notification { use Queueable; - public function __construct() {} /** @@ -55,7 +54,8 @@ class UserRegistration extends Notification { return (new MailMessage()) ->markdown('emails.registered', ['address' => route('index')]) - ->subject((string) trans('email.registered_subject')); + ->subject((string) trans('email.registered_subject')) + ; } /** diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 9ce9cef6b0..74eb677e5d 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -103,43 +103,43 @@ class EventServiceProvider extends ServiceProvider protected $listen = [ // is a User related event. - RegisteredUser::class => [ + RegisteredUser::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationMail', 'FireflyIII\Handlers\Events\UserEventHandler@sendAdminRegistrationNotification', 'FireflyIII\Handlers\Events\UserEventHandler@attachUserRole', 'FireflyIII\Handlers\Events\UserEventHandler@createGroupMembership', 'FireflyIII\Handlers\Events\UserEventHandler@createExchangeRates', ], - UserAttemptedLogin::class => [ + UserAttemptedLogin::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@sendLoginAttemptNotification', ], // is a User related event. - Login::class => [ + Login::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@checkSingleUserIsAdmin', 'FireflyIII\Handlers\Events\UserEventHandler@demoUserBackToEnglish', ], - ActuallyLoggedIn::class => [ + ActuallyLoggedIn::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@storeUserIPAddress', ], - DetectedNewIPAddress::class => [ + DetectedNewIPAddress::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@notifyNewIPAddress', ], - RequestedVersionCheckStatus::class => [ + RequestedVersionCheckStatus::class => [ 'FireflyIII\Handlers\Events\VersionCheckEventHandler@checkForUpdates', ], - RequestedReportOnJournals::class => [ + RequestedReportOnJournals::class => [ 'FireflyIII\Handlers\Events\AutomationHandler@reportJournals', ], // is a User related event. - RequestedNewPassword::class => [ + RequestedNewPassword::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@sendNewPassword', ], - UserTestNotificationChannel::class => [ + UserTestNotificationChannel::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@sendTestNotification', ], // is a User related event. - UserChangedEmail::class => [ + UserChangedEmail::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeConfirmMail', 'FireflyIII\Handlers\Events\UserEventHandler@sendEmailChangeUndoMail', ], @@ -147,104 +147,104 @@ class EventServiceProvider extends ServiceProvider OwnerTestNotificationChannel::class => [ 'FireflyIII\Handlers\Events\AdminEventHandler@sendTestNotification', ], - NewVersionAvailable::class => [ + NewVersionAvailable::class => [ 'FireflyIII\Handlers\Events\AdminEventHandler@sendNewVersion', ], - InvitationCreated::class => [ + InvitationCreated::class => [ 'FireflyIII\Handlers\Events\AdminEventHandler@sendInvitationNotification', 'FireflyIII\Handlers\Events\UserEventHandler@sendRegistrationInvite', ], - UnknownUserAttemptedLogin::class => [ + UnknownUserAttemptedLogin::class => [ 'FireflyIII\Handlers\Events\AdminEventHandler@sendLoginAttemptNotification', ], // is a Transaction Journal related event. - StoredTransactionGroup::class => [ + StoredTransactionGroup::class => [ 'FireflyIII\Handlers\Events\StoredGroupEventHandler@processRules', 'FireflyIII\Handlers\Events\StoredGroupEventHandler@recalculateCredit', 'FireflyIII\Handlers\Events\StoredGroupEventHandler@triggerWebhooks', ], // is a Transaction Journal related event. - UpdatedTransactionGroup::class => [ + UpdatedTransactionGroup::class => [ 'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@unifyAccounts', 'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@processRules', 'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@recalculateCredit', 'FireflyIII\Handlers\Events\UpdatedGroupEventHandler@triggerWebhooks', ], - DestroyedTransactionGroup::class => [ + DestroyedTransactionGroup::class => [ 'FireflyIII\Handlers\Events\DestroyedGroupEventHandler@triggerWebhooks', ], // API related events: - AccessTokenCreated::class => [ + AccessTokenCreated::class => [ 'FireflyIII\Handlers\Events\APIEventHandler@accessTokenCreated', ], // Webhook related event: - RequestedSendWebhookMessages::class => [ + RequestedSendWebhookMessages::class => [ 'FireflyIII\Handlers\Events\WebhookEventHandler@sendWebhookMessages', ], // account related events: - StoredAccount::class => [ + StoredAccount::class => [ 'FireflyIII\Handlers\Events\StoredAccountEventHandler@recalculateCredit', ], - UpdatedAccount::class => [ + UpdatedAccount::class => [ 'FireflyIII\Handlers\Events\UpdatedAccountEventHandler@recalculateCredit', ], // bill related events: - WarnUserAboutBill::class => [ + WarnUserAboutBill::class => [ 'FireflyIII\Handlers\Events\BillEventHandler@warnAboutBill', ], // audit log events: - TriggeredAuditLog::class => [ + TriggeredAuditLog::class => [ 'FireflyIII\Handlers\Events\AuditEventHandler@storeAuditEvent', ], // piggy bank related events: - ChangedAmount::class => [ + ChangedAmount::class => [ 'FireflyIII\Handlers\Events\Model\PiggyBankEventHandler@changePiggyAmount', ], // budget related events: CRUD budget limit - Created::class => [ + Created::class => [ 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@created', ], - Updated::class => [ + Updated::class => [ 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@updated', ], - Deleted::class => [ + Deleted::class => [ 'FireflyIII\Handlers\Events\Model\BudgetLimitHandler@deleted', ], // rule actions - RuleActionFailedOnArray::class => [ + RuleActionFailedOnArray::class => [ 'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnArray', ], - RuleActionFailedOnObject::class => [ + RuleActionFailedOnObject::class => [ 'FireflyIII\Handlers\Events\Model\RuleHandler@ruleActionFailedOnObject', ], // security related - EnabledMFA::class => [ + EnabledMFA::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAEnabledMail', ], - DisabledMFA::class => [ + DisabledMFA::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFADisabledMail', ], - MFANewBackupCodes::class => [ + MFANewBackupCodes::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendNewMFABackupCodesMail', ], - MFAUsedBackupCode::class => [ + MFAUsedBackupCode::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendUsedBackupCodeMail', ], - MFABackupFewLeft::class => [ + MFABackupFewLeft::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupFewLeftMail', ], - MFABackupNoLeft::class => [ + MFABackupNoLeft::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendBackupNoLeftMail', ], - MFAManyFailedAttempts::class => [ + MFAManyFailedAttempts::class => [ 'FireflyIII\Handlers\Events\Security\MFAHandler@sendMFAFailedAttemptsMail', ], ]; diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index 8fb38370c2..b8475e5937 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -57,10 +57,10 @@ trait ModifiesPiggyBanks } } - public function removeAmount(PiggyBank $piggyBank,Account $account, string $amount, ?TransactionJournal $journal = null): bool + public function removeAmount(PiggyBank $piggyBank, Account $account, string $amount, ?TransactionJournal $journal = null): bool { - $currentAmount = $this->getCurrentAmount($piggyBank, $account); - $pivot = $piggyBank->accounts()->where('accounts.id', $account->id)->first()->pivot; + $currentAmount = $this->getCurrentAmount($piggyBank, $account); + $pivot = $piggyBank->accounts()->where('accounts.id', $account->id)->first()->pivot; $pivot->current_amount = bcsub($currentAmount, $amount); $pivot->save(); @@ -72,11 +72,12 @@ trait ModifiesPiggyBanks public function removeAmountFromAll(PiggyBank $piggyBank, string $amount): void { - foreach($piggyBank->accounts as $account) { + foreach ($piggyBank->accounts as $account) { $current = $account->pivot->current_amount; // if this account contains more than the amount, remove the amount and return. if (1 === bccomp($current, $amount)) { $this->removeAmount($piggyBank, $account, $amount); + return; } // if this account contains less than the amount, remove the current amount, update the amount and continue. @@ -89,8 +90,8 @@ trait ModifiesPiggyBanks public function addAmount(PiggyBank $piggyBank, Account $account, string $amount, ?TransactionJournal $journal = null): bool { - $currentAmount = $this->getCurrentAmount($piggyBank, $account); - $pivot = $piggyBank->accounts()->where('accounts.id', $account->id)->first()->pivot; + $currentAmount = $this->getCurrentAmount($piggyBank, $account); + $pivot = $piggyBank->accounts()->where('accounts.id', $account->id)->first()->pivot; $pivot->current_amount = bcadd($currentAmount, $amount); $pivot->save(); @@ -205,11 +206,12 @@ trait ModifiesPiggyBanks // app('log')->debug(sprintf('Will move piggy bank #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); if ($newOrder > $oldOrder) { PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) - ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->decrement('piggy_banks.order'); + ->where('piggy_banks.id', '!=', $piggyBank->id) + ->distinct()->decrement('piggy_banks.order') + ; $piggyBank->order = $newOrder; app('log')->debug(sprintf('[1] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); @@ -218,11 +220,12 @@ trait ModifiesPiggyBanks return true; } PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->increment('piggy_banks.order'); + ->distinct()->increment('piggy_banks.order') + ; $piggyBank->order = $newOrder; app('log')->debug(sprintf('[2] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); @@ -250,20 +253,20 @@ trait ModifiesPiggyBanks public function update(PiggyBank $piggyBank, array $data): PiggyBank { - $piggyBank = $this->updateProperties($piggyBank, $data); + $piggyBank = $this->updateProperties($piggyBank, $data); if (array_key_exists('notes', $data)) { $this->updateNote($piggyBank, (string)$data['notes']); } // update the order of the piggy bank: - $oldOrder = $piggyBank->order; - $newOrder = (int)($data['order'] ?? $oldOrder); + $oldOrder = $piggyBank->order; + $newOrder = (int)($data['order'] ?? $oldOrder); if ($oldOrder !== $newOrder) { $this->setOrder($piggyBank, $newOrder); } // update the accounts - $factory = new PiggyBankFactory(); + $factory = new PiggyBankFactory(); $factory->user = $this->user; $factory->linkToAccountIds($piggyBank, $data['accounts']); @@ -272,7 +275,7 @@ trait ModifiesPiggyBanks // remove money from the rep. $currentAmount = $this->getCurrentAmount($piggyBank); if (1 === bccomp($currentAmount, '100') && 0 !== bccomp($piggyBank->target_amount, '0')) { - $difference = bcsub($piggyBank->target_amount, $currentAmount); + $difference = bcsub($piggyBank->target_amount, $currentAmount); // an amount will be removed, create "negative" event: event(new ChangedAmount($piggyBank, $difference, null, null)); diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 62687ed4aa..a32b0c2211 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -96,7 +96,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface public function getAttachments(PiggyBank $piggyBank): Collection { - $set = $piggyBank->attachments()->get(); + $set = $piggyBank->attachments()->get(); /** @var \Storage $disk */ $disk = \Storage::disk('upload'); @@ -119,7 +119,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface { $sum = '0'; foreach ($piggyBank->accounts as $current) { - if(null !== $account && $account->id !== $current->id) { + if (null !== $account && $account->id !== $current->id) { continue; } $amount = (string) $current->pivot->current_amount; @@ -137,6 +137,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface throw new FireflyException('[b] Piggy bank repetitions are EOL.'); } Log::warning('Piggy bank repetitions are EOL.'); + return $piggyBank->piggyBankRepetitions()->first(); } @@ -155,15 +156,15 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface throw new FireflyException('[c] Piggy bank repetitions are EOL.'); app('log')->debug(sprintf('Now in getExactAmount(%d, %d, %d)', $piggyBank->id, $repetition->id, $journal->id)); - $operator = null; - $currency = null; + $operator = null; + $currency = null; /** @var JournalRepositoryInterface $journalRepost */ - $journalRepost = app(JournalRepositoryInterface::class); + $journalRepost = app(JournalRepositoryInterface::class); $journalRepost->setUser($this->user); /** @var AccountRepositoryInterface $accountRepos */ - $accountRepos = app(AccountRepositoryInterface::class); + $accountRepos = app(AccountRepositoryInterface::class); $accountRepos->setUser($this->user); $defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); @@ -172,10 +173,10 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface app('log')->debug(sprintf('Piggy bank #%d currency is %s', $piggyBank->id, $piggyBankCurrency->code)); /** @var Transaction $source */ - $source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first(); + $source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first(); /** @var Transaction $destination */ - $destination = $journal->transactions()->with(['account'])->where('amount', '>', 0)->first(); + $destination = $journal->transactions()->with(['account'])->where('amount', '>', 0)->first(); // matches source, which means amount will be removed from piggy: if ($source->account_id === $piggyBank->account_id) { @@ -197,7 +198,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface } // currency of the account + the piggy bank currency are almost the same. // which amount from the transaction matches? - $amount = null; + $amount = null; if ((int) $source->transaction_currency_id === $currency->id) { app('log')->debug('Use normal amount'); $amount = app('steam')->{$operator}($source->amount); // @phpstan-ignore-line @@ -213,8 +214,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface } app('log')->debug(sprintf('The currency is %s and the amount is %s', $currency->code, $amount)); - $room = bcsub($piggyBank->target_amount, $repetition->current_amount); - $compare = bcmul($repetition->current_amount, '-1'); + $room = bcsub($piggyBank->target_amount, $repetition->current_amount); + $compare = bcmul($repetition->current_amount, '-1'); if (0 === bccomp($piggyBank->target_amount, '0')) { // amount is zero? then the "room" is positive amount of we wish to add or remove. @@ -246,7 +247,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface return (string) $amount; } - public function setUser(null | Authenticatable | User $user): void + public function setUser(null|Authenticatable|User $user): void { if ($user instanceof User) { $this->user = $user; @@ -271,12 +272,12 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface { $currency = app('amount')->getDefaultCurrency(); - $set = $this->getPiggyBanks(); + $set = $this->getPiggyBanks(); /** @var PiggyBank $piggy */ foreach ($set as $piggy) { $currentAmount = $this->getRepetition($piggy)->current_amount ?? '0'; - $piggy->name = $piggy->name . ' (' . app('amount')->formatAnything($currency, $currentAmount, false) . ')'; + $piggy->name = $piggy->name.' ('.app('amount')->formatAnything($currency, $currentAmount, false).')'; } return $set; @@ -285,14 +286,15 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface public function getPiggyBanks(): Collection { return PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', auth()->user()->id) - ->with( - [ - 'objectGroups', - ] - ) - ->orderBy('piggy_banks.order', 'ASC')->distinct()->get(['piggy_banks.*']); + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', auth()->user()->id) + ->with( + [ + 'objectGroups', + ] + ) + ->orderBy('piggy_banks.order', 'ASC')->distinct()->get(['piggy_banks.*']) + ; } /** @@ -336,11 +338,12 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface /** @var PiggyBank $current */ foreach ($piggies as $current) { - $amount = $this->getCurrentAmount($current, $account); + $amount = $this->getCurrentAmount($current, $account); $balance = bcsub($balance, $amount); Log::debug(sprintf('Piggy bank: #%d with amount %s, balance is now %s', $current->id, $amount, $balance)); } Log::debug(sprintf('Final balance is: %s', $balance)); + return $balance; } @@ -351,7 +354,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface $search->whereLike('piggy_banks.name', sprintf('%%%s%%', $query)); } $search->orderBy('piggy_banks.order', 'ASC') - ->orderBy('piggy_banks.name', 'ASC'); + ->orderBy('piggy_banks.name', 'ASC') + ; return $search->take($limit)->get(); } diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 29338df6ee..fedc772ebe 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -111,9 +111,10 @@ interface PiggyBankRepositoryInterface /** * Get for piggy account what is left to put in piggies. */ - public function leftOnAccount(PiggyBank $piggyBank,Account $account, Carbon $date): string; + public function leftOnAccount(PiggyBank $piggyBank, Account $account, Carbon $date): string; public function removeAmount(PiggyBank $piggyBank, Account $account, string $amount, ?TransactionJournal $journal = null): bool; + public function removeAmountFromAll(PiggyBank $piggyBank, string $amount): void; public function removeObjectGroup(PiggyBank $piggyBank): PiggyBank; diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index d9cb791eb9..ab8c4ba5f1 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -105,6 +105,7 @@ class Preferences return $this->getForUser($user, $name, $default); } + public function getEncryptedForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference { $result = $this->getForUser($user, $name, $default); diff --git a/app/Support/Steam.php b/app/Support/Steam.php index fba143a4fb..da13ba52fb 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -45,39 +45,41 @@ class Steam public function balanceIgnoreVirtual(Account $account, Carbon $date): string { throw new FireflyException('Deprecated method balanceIgnoreVirtual.'); + /** @var AccountRepositoryInterface $repository */ - $repository = app(AccountRepositoryInterface::class); + $repository = app(AccountRepositoryInterface::class); $repository->setUser($account->user); - $currencyId = (int) $repository->getMetaValue($account, 'currency_id'); - $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $currencyId) - ->get(['transactions.amount'])->toArray(); - $nativeBalance = $this->sumTransactions($transactions, 'amount'); + $currencyId = (int) $repository->getMetaValue($account, 'currency_id'); + $transactions = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $currencyId) + ->get(['transactions.amount'])->toArray() + ; + $nativeBalance = $this->sumTransactions($transactions, 'amount'); // get all balances in foreign currency: - $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.foreign_currency_id', $currencyId) - ->where('transactions.transaction_currency_id', '!=', $currencyId) - ->get(['transactions.foreign_amount'])->toArray(); + $transactions = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.foreign_currency_id', $currencyId) + ->where('transactions.transaction_currency_id', '!=', $currencyId) + ->get(['transactions.foreign_amount'])->toArray() + ; $foreignBalance = $this->sumTransactions($transactions, 'foreign_amount'); return bcadd($nativeBalance, $foreignBalance); } - public function balanceConvertedIgnoreVirtual(Account $account, Carbon $date, TransactionCurrency $currency): string { - $balance = $this->balanceConverted($account, $date, $currency); - $virtual = null === $account->virtual_balance ? '0' : $account->virtual_balance; + $balance = $this->balanceConverted($account, $date, $currency); + $virtual = null === $account->virtual_balance ? '0' : $account->virtual_balance; // currency of account - $repository = app(AccountRepositoryInterface::class); + $repository = app(AccountRepositoryInterface::class); $repository->setUser($account->user); $accountCurrency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUserGroup($account->user->userGroup); if ($accountCurrency->id !== $currency->id && 0 !== bccomp($virtual, '0')) { @@ -114,7 +116,7 @@ class Steam public function balanceInRange(Account $account, Carbon $start, Carbon $end, ?TransactionCurrency $currency = null): array { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance-in-range'); $cache->addProperty(null !== $currency ? $currency->id : 0); @@ -126,41 +128,42 @@ class Steam $start->subDay(); $end->addDay(); - $balances = []; - $formatted = $start->format('Y-m-d'); - $startBalance = $this->balance($account, $start, $currency); + $balances = []; + $formatted = $start->format('Y-m-d'); + $startBalance = $this->balance($account, $start, $currency); $balances[$formatted] = $startBalance; if (null === $currency) { $repository = app(AccountRepositoryInterface::class); $repository->setUser($account->user); - $currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUserGroup($account->user->userGroup); + $currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUserGroup($account->user->userGroup); } - $currencyId = $currency->id; + $currencyId = $currency->id; $start->addDay(); // query! - $set = $account->transactions() - ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d 23:59:59')) - ->groupBy('transaction_journals.date') - ->groupBy('transactions.transaction_currency_id') - ->groupBy('transactions.foreign_currency_id') - ->orderBy('transaction_journals.date', 'ASC') - ->whereNull('transaction_journals.deleted_at') - ->get( - [ // @phpstan-ignore-line - 'transaction_journals.date', - 'transactions.transaction_currency_id', - \DB::raw('SUM(transactions.amount) AS modified'), - 'transactions.foreign_currency_id', - \DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'), - ] - ); + $set = $account->transactions() + ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d 23:59:59')) + ->groupBy('transaction_journals.date') + ->groupBy('transactions.transaction_currency_id') + ->groupBy('transactions.foreign_currency_id') + ->orderBy('transaction_journals.date', 'ASC') + ->whereNull('transaction_journals.deleted_at') + ->get( + [ // @phpstan-ignore-line + 'transaction_journals.date', + 'transactions.transaction_currency_id', + \DB::raw('SUM(transactions.amount) AS modified'), + 'transactions.foreign_currency_id', + \DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'), + ] + ) + ; - $currentBalance = $startBalance; + $currentBalance = $startBalance; /** @var Transaction $entry */ foreach ($set as $entry) { @@ -190,7 +193,7 @@ class Steam public function balanceByTransactions(Account $account, Carbon $date, ?TransactionCurrency $currency): array { - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance-by-transactions'); $cache->addProperty($date); @@ -199,12 +202,13 @@ class Steam return $cache->get(); } - $query = $account->transactions() - ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->orderBy('transaction_journals.date', 'desc') - ->orderBy('transaction_journals.order', 'asc') - ->orderBy('transaction_journals.description', 'desc') - ->orderBy('transactions.amount', 'desc'); + $query = $account->transactions() + ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->orderBy('transaction_journals.date', 'desc') + ->orderBy('transaction_journals.order', 'asc') + ->orderBy('transaction_journals.description', 'desc') + ->orderBy('transactions.amount', 'desc') + ; if (null !== $currency) { $query->where('transactions.transaction_currency_id', $currency->id); $query->limit(1); @@ -219,7 +223,7 @@ class Steam $return = []; $result = $query->get(['transactions.transaction_currency_id', 'transactions.balance_after']); foreach ($result as $entry) { - $key = (int) $entry->transaction_currency_id; + $key = (int) $entry->transaction_currency_id; if (array_key_exists($key, $return)) { continue; } @@ -238,7 +242,7 @@ class Steam { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); // abuse chart properties: - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance'); $cache->addProperty($date); @@ -248,24 +252,26 @@ class Steam } /** @var AccountRepositoryInterface $repository */ - $repository = app(AccountRepositoryInterface::class); + $repository = app(AccountRepositoryInterface::class); if (null === $currency) { $currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUserGroup($account->user->userGroup); } // first part: get all balances in own currency: - $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $currency->id) - ->get(['transactions.amount'])->toArray(); - $nativeBalance = $this->sumTransactions($transactions, 'amount'); + $transactions = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $currency->id) + ->get(['transactions.amount'])->toArray() + ; + $nativeBalance = $this->sumTransactions($transactions, 'amount'); // get all balances in foreign currency: $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.foreign_currency_id', $currency->id) - ->where('transactions.transaction_currency_id', '!=', $currency->id) - ->get(['transactions.foreign_amount'])->toArray(); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.foreign_currency_id', $currency->id) + ->where('transactions.transaction_currency_id', '!=', $currency->id) + ->get(['transactions.foreign_amount'])->toArray() + ; $foreignBalance = $this->sumTransactions($transactions, 'foreign_amount'); $balance = bcadd($nativeBalance, $foreignBalance); $virtual = null === $account->virtual_balance ? '0' : $account->virtual_balance; @@ -284,7 +290,7 @@ class Steam public function balanceInRangeConverted(Account $account, Carbon $start, Carbon $end, TransactionCurrency $native): array { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance-in-range-converted'); $cache->addProperty($native->id); @@ -304,34 +310,35 @@ class Steam Log::debug(sprintf('Start balance on %s is %s', $formatted, $startBalance)); Log::debug(sprintf('Created new ExchangeRateConverter in %s', __METHOD__)); - $converter = new ExchangeRateConverter(); + $converter = new ExchangeRateConverter(); // not sure why this is happening: $start->addDay(); // grab all transactions between start and end: - $set = $account->transactions() - ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d 23:59:59')) - ->orderBy('transaction_journals.date', 'ASC') - ->whereNull('transaction_journals.deleted_at') - ->get( - [ - 'transaction_journals.date', - 'transactions.transaction_currency_id', - 'transactions.amount', - 'transactions.foreign_currency_id', - 'transactions.foreign_amount', - ] - )->toArray(); + $set = $account->transactions() + ->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transaction_journals.date', '>=', $start->format('Y-m-d 00:00:00')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d 23:59:59')) + ->orderBy('transaction_journals.date', 'ASC') + ->whereNull('transaction_journals.deleted_at') + ->get( + [ + 'transaction_journals.date', + 'transactions.transaction_currency_id', + 'transactions.amount', + 'transactions.foreign_currency_id', + 'transactions.foreign_amount', + ] + )->toArray() + ; // loop the set and convert if necessary: - $currentBalance = $startBalance; + $currentBalance = $startBalance; /** @var Transaction $transaction */ foreach ($set as $transaction) { - $day = false; + $day = false; try { $day = Carbon::parse($transaction['date'], config('app.timezone')); @@ -341,7 +348,7 @@ class Steam if (false === $day) { $day = today(config('app.timezone')); } - $format = $day->format('Y-m-d'); + $format = $day->format('Y-m-d'); // if the transaction is in the expected currency, change nothing. if ((int) $transaction['transaction_currency_id'] === $native->id) { // change the current balance, set it to today, continue the loop. @@ -364,21 +371,21 @@ class Steam $currency = $currencies[$currencyId] ?? TransactionCurrency::find($currencyId); $currencies[$currencyId] = $currency; - $rate = $converter->getCurrencyRate($currency, $native, $day); - $convertedAmount = bcmul($transaction['amount'], $rate); - $currentBalance = bcadd($currentBalance, $convertedAmount); - $balances[$format] = $currentBalance; + $rate = $converter->getCurrencyRate($currency, $native, $day); + $convertedAmount = bcmul($transaction['amount'], $rate); + $currentBalance = bcadd($currentBalance, $convertedAmount); + $balances[$format] = $currentBalance; Log::debug(sprintf( - '%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s', - $format, - $currency->code, - $rate, - $currency->code, - $transaction['amount'], - $native->code, - $convertedAmount - )); + '%s: transaction in %s(!). Conversion rate is %s. %s %s = %s %s', + $format, + $currency->code, + $rate, + $currency->code, + $transaction['amount'], + $native->code, + $convertedAmount + )); } $cache->store($balances); @@ -410,7 +417,7 @@ class Steam { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); Log::debug(sprintf('Now in balanceConverted (%s) for account #%d, converting to %s', $date->format('Y-m-d'), $account->id, $native->code)); - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance'); $cache->addProperty($date); @@ -431,66 +438,72 @@ class Steam return $this->balance($account, $date); } - $new = []; - $existing = []; - $new[] = $account->transactions() // 1 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $currency->id) - ->whereNull('transactions.foreign_currency_id') - ->get(['transaction_journals.date', 'transactions.amount'])->toArray(); + $new = []; + $existing = []; + $new[] = $account->transactions() // 1 + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $currency->id) + ->whereNull('transactions.foreign_currency_id') + ->get(['transaction_journals.date', 'transactions.amount'])->toArray() + ; Log::debug(sprintf('%d transaction(s) in set #1', count($new[0]))); $existing[] = $account->transactions() // 2 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $native->id) - ->whereNull('transactions.foreign_currency_id') - ->get(['transactions.amount'])->toArray(); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $native->id) + ->whereNull('transactions.foreign_currency_id') + ->get(['transactions.amount'])->toArray() + ; Log::debug(sprintf('%d transaction(s) in set #2', count($existing[0]))); - $new[] = $account->transactions() // 3 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', '!=', $currency->id) - ->where('transactions.transaction_currency_id', '!=', $native->id) - ->whereNull('transactions.foreign_currency_id') - ->get(['transaction_journals.date', 'transactions.amount'])->toArray(); + $new[] = $account->transactions() // 3 + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', '!=', $currency->id) + ->where('transactions.transaction_currency_id', '!=', $native->id) + ->whereNull('transactions.foreign_currency_id') + ->get(['transaction_journals.date', 'transactions.amount'])->toArray() + ; Log::debug(sprintf('%d transactions in set #3', count($new[1]))); $existing[] = $account->transactions() // 4 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.foreign_currency_id', $native->id) - ->whereNotNull('transactions.foreign_amount') - ->get(['transactions.foreign_amount'])->toArray(); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.foreign_currency_id', $native->id) + ->whereNotNull('transactions.foreign_amount') + ->get(['transactions.foreign_amount'])->toArray() + ; Log::debug(sprintf('%d transactions in set #4', count($existing[1]))); - $new[] = $account->transactions()// 5 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $currency->id) - ->where('transactions.foreign_currency_id', '!=', $native->id) - ->whereNotNull('transactions.foreign_amount') - ->get(['transaction_journals.date', 'transactions.amount'])->toArray(); + $new[] = $account->transactions()// 5 + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $currency->id) + ->where('transactions.foreign_currency_id', '!=', $native->id) + ->whereNotNull('transactions.foreign_amount') + ->get(['transaction_journals.date', 'transactions.amount'])->toArray() + ; Log::debug(sprintf('%d transactions in set #5', count($new[2]))); - $new[] = $account->transactions()// 6 - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', '!=', $currency->id) - ->where('transactions.foreign_currency_id', '!=', $native->id) - ->whereNotNull('transactions.foreign_amount') - ->get(['transaction_journals.date', 'transactions.amount'])->toArray(); + $new[] = $account->transactions()// 6 + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', '!=', $currency->id) + ->where('transactions.foreign_currency_id', '!=', $native->id) + ->whereNotNull('transactions.foreign_amount') + ->get(['transaction_journals.date', 'transactions.amount'])->toArray() + ; Log::debug(sprintf('%d transactions in set #6', count($new[3]))); // process both sets of transactions. Of course, no need to convert set "existing". - $balance = $this->sumTransactions($existing[0], 'amount'); - $balance = bcadd($balance, $this->sumTransactions($existing[1], 'foreign_amount')); + $balance = $this->sumTransactions($existing[0], 'amount'); + $balance = bcadd($balance, $this->sumTransactions($existing[1], 'foreign_amount')); Log::debug(sprintf('Balance from set #2 and #4 is %f', $balance)); // need to convert the others. All sets use the "amount" value as their base (that's easy) // but we need to convert each transaction separately because the date difference may // incur huge currency changes. Log::debug(sprintf('Created new ExchangeRateConverter in %s', __METHOD__)); - $start = clone $date; - $end = clone $date; - $converter = new ExchangeRateConverter(); + $start = clone $date; + $end = clone $date; + $converter = new ExchangeRateConverter(); foreach ($new as $set) { foreach ($set as $transaction) { $currentDate = false; @@ -513,7 +526,7 @@ class Steam foreach ($new as $set) { foreach ($set as $transaction) { - $currentDate = false; + $currentDate = false; try { $currentDate = Carbon::parse($transaction['date'], config('app.timezone')); @@ -530,9 +543,9 @@ class Steam } // add virtual balance (also needs conversion) - $virtual = null === $account->virtual_balance ? '0' : $account->virtual_balance; - $virtual = $converter->convert($currency, $native, $account->created_at, $virtual); - $balance = bcadd($balance, $virtual); + $virtual = null === $account->virtual_balance ? '0' : $account->virtual_balance; + $virtual = $converter->convert($currency, $native, $account->created_at, $virtual); + $balance = bcadd($balance, $virtual); $converter->summarize(); $cache->store($balance); @@ -549,9 +562,9 @@ class Steam public function balancesByAccounts(Collection $accounts, Carbon $date): array { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); - $ids = $accounts->pluck('id')->toArray(); + $ids = $accounts->pluck('id')->toArray(); // cache this property. - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($ids); $cache->addProperty('balances'); $cache->addProperty($date); @@ -580,9 +593,9 @@ class Steam public function balancesByAccountsConverted(Collection $accounts, Carbon $date): array { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); - $ids = $accounts->pluck('id')->toArray(); + $ids = $accounts->pluck('id')->toArray(); // cache this property. - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($ids); $cache->addProperty('balances-converted'); $cache->addProperty($date); @@ -598,9 +611,9 @@ class Steam $default = app('amount')->getDefaultCurrencyByUserGroup($account->user->userGroup); $result[$account->id] = [ - 'balance' => $this->balance($account, $date), - 'native_balance' => $this->balanceConverted($account, $date, $default), - ]; + 'balance' => $this->balance($account, $date), + 'native_balance' => $this->balanceConverted($account, $date, $default), + ]; } $cache->store($result); @@ -614,9 +627,9 @@ class Steam public function balancesPerCurrencyByAccounts(Collection $accounts, Carbon $date): array { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); - $ids = $accounts->pluck('id')->toArray(); + $ids = $accounts->pluck('id')->toArray(); // cache this property. - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($ids); $cache->addProperty('balances-per-currency'); $cache->addProperty($date); @@ -641,7 +654,7 @@ class Steam { // Log::warning(sprintf('Deprecated method %s, do not use.', __METHOD__)); // abuse chart properties: - $cache = new CacheProperties(); + $cache = new CacheProperties(); $cache->addProperty($account->id); $cache->addProperty('balance-per-currency'); $cache->addProperty($date); @@ -649,9 +662,10 @@ class Steam return $cache->get(); } $query = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->groupBy('transactions.transaction_currency_id'); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->groupBy('transactions.transaction_currency_id') + ; $balances = $query->get(['transactions.transaction_currency_id', \DB::raw('SUM(transactions.amount) as sum_for_currency')]); // @phpstan-ignore-line $return = []; @@ -683,10 +697,10 @@ class Steam // Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision)); if (str_contains($number, '.')) { if ('-' !== $number[0]) { - return bcadd($number, '0.' . str_repeat('0', $precision) . '5', $precision); + return bcadd($number, '0.'.str_repeat('0', $precision).'5', $precision); } - return bcsub($number, '0.' . str_repeat('0', $precision) . '5', $precision); + return bcsub($number, '0.'.str_repeat('0', $precision).'5', $precision); } return $number; @@ -769,15 +783,15 @@ class Steam { $list = []; - $set = auth()->user()->transactions() - ->whereIn('transactions.account_id', $accounts) - ->groupBy(['transactions.account_id', 'transaction_journals.user_id']) - ->get(['transactions.account_id', \DB::raw('MAX(transaction_journals.date) AS max_date')]) // @phpstan-ignore-line + $set = auth()->user()->transactions() + ->whereIn('transactions.account_id', $accounts) + ->groupBy(['transactions.account_id', 'transaction_journals.user_id']) + ->get(['transactions.account_id', \DB::raw('MAX(transaction_journals.date) AS max_date')]) // @phpstan-ignore-line ; /** @var Transaction $entry */ foreach ($set as $entry) { - $date = new Carbon($entry->max_date, config('app.timezone')); + $date = new Carbon($entry->max_date, config('app.timezone')); $date->setTimezone(config('app.timezone')); $list[$entry->account_id] = $date; } @@ -852,9 +866,9 @@ class Steam public function getSafeUrl(string $unknownUrl, string $safeUrl): string { // Log::debug(sprintf('getSafeUrl(%s, %s)', $unknownUrl, $safeUrl)); - $returnUrl = $safeUrl; - $unknownHost = parse_url($unknownUrl, PHP_URL_HOST); - $safeHost = parse_url($safeUrl, PHP_URL_HOST); + $returnUrl = $safeUrl; + $unknownHost = parse_url($unknownUrl, PHP_URL_HOST); + $safeHost = parse_url($safeUrl, PHP_URL_HOST); if (null !== $unknownHost && $unknownHost === $safeHost) { $returnUrl = $unknownUrl; @@ -891,7 +905,7 @@ class Steam */ public function floatalize(string $value): string { - $value = strtoupper($value); + $value = strtoupper($value); if (!str_contains($value, 'E')) { return $value; } diff --git a/app/TransactionRules/Actions/UpdatePiggybank.php b/app/TransactionRules/Actions/UpdatePiggybank.php index c437318018..4cef91a8df 100644 --- a/app/TransactionRules/Actions/UpdatePiggybank.php +++ b/app/TransactionRules/Actions/UpdatePiggybank.php @@ -82,6 +82,7 @@ class UpdatePiggybank implements ActionInterface if ($source->account_id === $piggyBank->account_id) { app('log')->debug('Piggy bank account is linked to source, so remove amount from piggy bank.'); + throw new FireflyException('Reference the correct account here.'); $this->removeAmount($piggyBank, $journal, $journalObj, $destination->amount); diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php index 4a094dbfcc..6c76f73a7b 100644 --- a/app/Transformers/PiggyBankTransformer.php +++ b/app/Transformers/PiggyBankTransformer.php @@ -78,7 +78,7 @@ class PiggyBankTransformer extends AbstractTransformer // get currently saved amount: $currency = $piggyBank->transactionCurrency; - $currentAmount = $this->piggyRepos->getCurrentAmount($piggyBank); + $currentAmount = $this->piggyRepos->getCurrentAmount($piggyBank); // Amounts, depending on 0.0 state of target amount $percentage = null; diff --git a/app/User.php b/app/User.php index 9cf7a1b958..2d2c142129 100644 --- a/app/User.php +++ b/app/User.php @@ -36,7 +36,6 @@ use FireflyIII\Models\Category; use FireflyIII\Models\CurrencyExchangeRate; use FireflyIII\Models\GroupMembership; use FireflyIII\Models\ObjectGroup; -use FireflyIII\Models\PiggyBank; use FireflyIII\Models\Preference; use FireflyIII\Models\Recurrence; use FireflyIII\Models\Role; @@ -107,7 +106,8 @@ class User extends Authenticatable return $this->hasMany(Account::class); } - public function piggyBanks() { + public function piggyBanks(): void + { throw new FireflyException('Method no longer supported.'); } @@ -263,38 +263,38 @@ class User extends Authenticatable app('log')->debug(sprintf('in hasAnyRoleInGroup(%s)', implode(', ', $roles))); /** @var Collection $dbRoles */ - $dbRoles = UserRole::whereIn('title', $roles)->get(); + $dbRoles = UserRole::whereIn('title', $roles)->get(); if (0 === $dbRoles->count()) { app('log')->error(sprintf('Could not find role(s): %s. Probably migration mishap.', implode(', ', $roles))); return false; } - $dbRolesIds = $dbRoles->pluck('id')->toArray(); - $dbRolesTitles = $dbRoles->pluck('title')->toArray(); + $dbRolesIds = $dbRoles->pluck('id')->toArray(); + $dbRolesTitles = $dbRoles->pluck('title')->toArray(); /** @var Collection $groupMemberships */ $groupMemberships = $this->groupMemberships()->whereIn('user_role_id', $dbRolesIds)->where('user_group_id', $userGroup->id)->get(); if (0 === $groupMemberships->count()) { app('log')->error(sprintf( - 'User #%d "%s" does not have roles %s in user group #%d "%s"', - $this->id, - $this->email, - implode(', ', $roles), - $userGroup->id, - $userGroup->title - )); + 'User #%d "%s" does not have roles %s in user group #%d "%s"', + $this->id, + $this->email, + implode(', ', $roles), + $userGroup->id, + $userGroup->title + )); return false; } foreach ($groupMemberships as $membership) { app('log')->debug(sprintf( - 'User #%d "%s" has role "%s" in user group #%d "%s"', - $this->id, - $this->email, - $membership->userRole->title, - $userGroup->id, - $userGroup->title - )); + 'User #%d "%s" has role "%s" in user group #%d "%s"', + $this->id, + $this->email, + $membership->userRole->title, + $userGroup->id, + $userGroup->title + )); if (in_array($membership->userRole->title, $dbRolesTitles, true)) { app('log')->debug(sprintf('Return true, found role "%s"', $membership->userRole->title)); @@ -302,13 +302,13 @@ class User extends Authenticatable } } app('log')->error(sprintf( - 'User #%d "%s" does not have roles %s in user group #%d "%s"', - $this->id, - $this->email, - implode(', ', $roles), - $userGroup->id, - $userGroup->title - )); + 'User #%d "%s" does not have roles %s in user group #%d "%s"', + $this->id, + $this->email, + implode(', ', $roles), + $userGroup->id, + $userGroup->title + )); return false; } @@ -360,13 +360,13 @@ class User extends Authenticatable */ public function routeNotificationFor($driver, $notification = null) { - $method = 'routeNotificationFor' . Str::studly($driver); + $method = 'routeNotificationFor'.Str::studly($driver); if (method_exists($this, $method)) { return $this->{$method}($notification); // @phpstan-ignore-line } - $email = $this->email; + $email = $this->email; // see if user has alternative email address: - $pref = app('preferences')->getForUser($this, 'remote_guard_alt_email'); + $pref = app('preferences')->getForUser($this, 'remote_guard_alt_email'); if (null !== $pref) { $email = $pref->data; } @@ -411,11 +411,11 @@ class User extends Authenticatable public function routeNotificationForSlack(Notification $notification): ?string { // this check does not validate if the user is owner, Should be done by notification itself. - $res = app('fireflyconfig')->getEncrypted('slack_webhook_url', '')->data; + $res = app('fireflyconfig')->getEncrypted('slack_webhook_url', '')->data; if (is_array($res)) { $res = ''; } - $res = (string) $res; + $res = (string) $res; if (property_exists($notification, 'type') && 'owner' === $notification->type) { return $res; diff --git a/config/firefly.php b/config/firefly.php index 6363d68e6e..66c8ba2a1e 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -110,7 +110,7 @@ return [ 'running_balance_column' => env('USE_RUNNING_BALANCE', false), // see cer.php for exchange rates feature flag. ], - 'version' => 'develop/2024-11-25', + 'version' => 'branch-v6.2', 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 25, diff --git a/config/notifications.php b/config/notifications.php index 7e33c2b223..1bfd2988eb 100644 --- a/config/notifications.php +++ b/config/notifications.php @@ -28,8 +28,8 @@ return [ 'slack' => ['enabled' => true, 'ui_configurable' => 1], 'ntfy' => ['enabled' => true, 'ui_configurable' => 1], 'pushover' => ['enabled' => true, 'ui_configurable' => 1], -// 'gotify' => ['enabled' => false, 'ui_configurable' => 0], -// 'pushbullet' => ['enabled' => false, 'ui_configurable' => 0], + // 'gotify' => ['enabled' => false, 'ui_configurable' => 0], + // 'pushbullet' => ['enabled' => false, 'ui_configurable' => 0], ], 'notifications' => [ 'user' => [ diff --git a/package-lock.json b/package-lock.json index 8f07cbb54c..5e5cf80438 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,9 +79,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", - "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", + "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", "dev": true, "license": "MIT", "engines": { @@ -130,14 +130,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", - "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", + "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.2", - "@babel/types": "^7.26.0", + "@babel/parser": "^7.26.3", + "@babel/types": "^7.26.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -159,20 +159,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.9.tgz", - "integrity": "sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", @@ -233,14 +219,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.9.tgz", - "integrity": "sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", + "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", - "regexpu-core": "^6.1.1", + "regexpu-core": "^6.2.0", "semver": "^6.3.1" }, "engines": { @@ -382,20 +368,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz", - "integrity": "sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", @@ -470,13 +442,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", - "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.0" + "@babel/types": "^7.26.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -917,13 +889,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.9.tgz", - "integrity": "sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", + "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.9", "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { @@ -1066,15 +1037,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz", - "integrity": "sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-simple-access": "^7.25.9" + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1685,17 +1655,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", - "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", + "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/generator": "^7.25.9", - "@babel/parser": "^7.25.9", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.3", + "@babel/parser": "^7.26.3", "@babel/template": "^7.25.9", - "@babel/types": "^7.25.9", + "@babel/types": "^7.26.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1704,9 +1674,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", "dev": true, "license": "MIT", "dependencies": { @@ -2152,9 +2122,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "license": "MIT", "dependencies": { @@ -2587,9 +2557,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", - "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", + "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", "cpu": [ "arm" ], @@ -2601,9 +2571,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz", - "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", + "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", "cpu": [ "arm64" ], @@ -2615,9 +2585,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz", - "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", + "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", "cpu": [ "arm64" ], @@ -2629,9 +2599,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz", - "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", + "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", "cpu": [ "x64" ], @@ -2643,9 +2613,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz", - "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", + "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", "cpu": [ "arm64" ], @@ -2657,9 +2627,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz", - "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", + "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", "cpu": [ "x64" ], @@ -2671,9 +2641,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz", - "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", + "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", "cpu": [ "arm" ], @@ -2685,9 +2655,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz", - "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", + "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", "cpu": [ "arm" ], @@ -2699,9 +2669,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz", - "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", + "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", "cpu": [ "arm64" ], @@ -2713,9 +2683,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz", - "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", + "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", "cpu": [ "arm64" ], @@ -2726,10 +2696,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", + "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz", - "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", + "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", "cpu": [ "ppc64" ], @@ -2741,9 +2725,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz", - "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", + "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", "cpu": [ "riscv64" ], @@ -2755,9 +2739,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz", - "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", + "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", "cpu": [ "s390x" ], @@ -2769,9 +2753,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz", - "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", + "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", "cpu": [ "x64" ], @@ -2783,9 +2767,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz", - "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", + "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", "cpu": [ "x64" ], @@ -2797,9 +2781,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz", - "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", + "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", "cpu": [ "arm64" ], @@ -2811,9 +2795,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz", - "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", + "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", "cpu": [ "ia32" ], @@ -2825,9 +2809,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz", - "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", + "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", "cpu": [ "x64" ], @@ -3115,13 +3099,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/node-forge": { @@ -3701,9 +3685,9 @@ } }, "node_modules/alpinejs": { - "version": "3.14.3", - "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.14.3.tgz", - "integrity": "sha512-cL8JBEDAm4UeVjTN5QnFl8QgMGUwxFn1GvQvu3RtfAHUrAPRahGihrsWpKnEK9L0QMqsAPk/R8MylMWKHaK33A==", + "version": "3.14.7", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.14.7.tgz", + "integrity": "sha512-ScnbydNBcWVnCiVupD3wWUvoMPm8244xkvDNMxVCspgmap9m4QuJ7pjc+77UtByU+1+Ejg0wzYkP4mQaOMcvng==", "license": "MIT", "dependencies": { "@vue/reactivity": "~3.1.1" @@ -3882,9 +3866,9 @@ } }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dev": true, "license": "MIT", "dependencies": { @@ -4140,15 +4124,15 @@ "license": "MIT" }, "node_modules/bootstrap5-autocomplete": { - "version": "1.1.33", - "resolved": "https://registry.npmjs.org/bootstrap5-autocomplete/-/bootstrap5-autocomplete-1.1.33.tgz", - "integrity": "sha512-VgHSx2hCNEBThFzb57HziDA2BNuc0wT5+V9XqIbXsV6oKYXcyRE2ytFIJcHjTCEIYqTsNCFiCQILIXc3YANGPQ==", + "version": "1.1.34", + "resolved": "https://registry.npmjs.org/bootstrap5-autocomplete/-/bootstrap5-autocomplete-1.1.34.tgz", + "integrity": "sha512-Z7+ig9sL5e8PiApQ2JA7BizevVLcsdpTpJboEwcFELg1IBDEU+LdbH6YnYFA2dgRxFkclCttCR8UPC9CbBpZiQ==", "license": "MIT" }, "node_modules/bootstrap5-tags": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/bootstrap5-tags/-/bootstrap5-tags-1.7.5.tgz", - "integrity": "sha512-EqCpdjD/UdZVYdlgcWfQKU68x7AtUs3lSnl9/u1xW2kVc193nqE4QOyJ5fAvc4i4t365LerRG87kptMpsD1PlQ==", + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/bootstrap5-tags/-/bootstrap5-tags-1.7.6.tgz", + "integrity": "sha512-5bUMUN4I11n/MtrfmYOF41ebkMmy2s4AZZfp6C1oWm2dXZS3UUZqb7J9Qj9OJ1r053hix0pKtg3mNJcQvqa1EQ==", "license": "MIT" }, "node_modules/brace-expansion": { @@ -4270,9 +4254,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", + "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", "dev": true, "funding": [ { @@ -4290,9 +4274,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { @@ -4346,17 +4330,47 @@ } }, "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==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz", + "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "get-intrinsic": "^1.2.5" }, "engines": { "node": ">= 0.4" @@ -4400,9 +4414,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001684", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", - "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", + "version": "1.0.30001688", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz", + "integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==", "dev": true, "funding": [ { @@ -4448,9 +4462,9 @@ } }, "node_modules/chart.js": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz", - "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==", + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", + "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", "license": "MIT", "dependencies": { "@kurkle/color": "^0.3.0" @@ -4530,9 +4544,9 @@ } }, "node_modules/cipher-base": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.5.tgz", - "integrity": "sha512-xq7ICKB4TMHUx7Tz1L9O2SGKOhYMOTR32oir45Bq28/AQTpHogKgHcoYFSdRbMtddl+ozNXfXY9jWcgYKmde0w==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", "dev": true, "license": "MIT", "dependencies": { @@ -5248,9 +5262,9 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -5572,6 +5586,21 @@ "dev": true, "license": "BSD-2-Clause" }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -5580,9 +5609,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.64", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.64.tgz", - "integrity": "sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==", + "version": "1.5.73", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz", + "integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==", "dev": true, "license": "ISC" }, @@ -5687,14 +5716,11 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -5716,6 +5742,19 @@ "dev": true, "license": "MIT" }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -5899,9 +5938,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "license": "MIT", "dependencies": { @@ -5924,7 +5963,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -5939,6 +5978,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -6351,17 +6394,22 @@ } }, "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==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6456,13 +6504,13 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6512,23 +6560,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "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, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", "engines": { @@ -6859,9 +6894,9 @@ } }, "node_modules/i18next": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.0.0.tgz", - "integrity": "sha512-ORGCwMrXxpmB/AljFbGEe0UK/9Pz6umb9aZgLZ9qJGE+kjKhlnLj423WX2mt+N0MlEJ78pQXFMBmeMzrkLxriQ==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.1.0.tgz", + "integrity": "sha512-suKlX82AlptkMUO5YRfaAeH4FQyyKvR66jNaubTMiyPPMx7INU6PXAiy3PGULc0q6K+t9nxmDf/TRj9KjAivmw==", "funding": [ { "type": "individual", @@ -6876,6 +6911,7 @@ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" } ], + "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" }, @@ -6901,6 +6937,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-3.0.1.tgz", "integrity": "sha512-XT2lYSkbAtDE55c6m7CtKxxrsfuRQO3rUfHzj8ZyRtY9CkIX3aRGwXGTkUhpGWce+J8n7sfu3J0f2wTzo7Lw0A==", + "license": "MIT", "dependencies": { "cross-fetch": "4.0.0" } @@ -7144,9 +7181,9 @@ "license": "MIT" }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.0.tgz", + "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==", "dev": true, "license": "MIT", "dependencies": { @@ -7340,9 +7377,9 @@ "license": "MIT" }, "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -7593,9 +7630,9 @@ } }, "node_modules/laravel-vite-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.0.6.tgz", - "integrity": "sha512-B34OqmZc/rV1KvSjst8SsUm/LKHsuDusw8jiZCIhlnTHXbXnK89JUM9pTJuk6E/Vc/1DT2gX7qNfhipak1WS8w==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.1.1.tgz", + "integrity": "sha512-HMZXpoSs1OR+7Lw1+g4Iy/s3HF3Ldl8KxxYT2Ot8pEB4XB/QRuZeWgDYJdu552UN03YRSRNK84CLC9NzYRtncA==", "dev": true, "license": "MIT", "dependencies": { @@ -7606,10 +7643,10 @@ "clean-orphaned-assets": "bin/clean.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "peerDependencies": { - "vite": "^5.0.0" + "vite": "^5.0.0 || ^6.0.0" } }, "node_modules/launch-editor": { @@ -7733,9 +7770,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.13", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", - "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", + "version": "0.30.15", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.15.tgz", + "integrity": "sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==", "dev": true, "license": "MIT", "dependencies": { @@ -7768,6 +7805,16 @@ "semver": "bin/semver.js" } }, + "node_modules/math-intrinsics": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", + "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -8050,9 +8097,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -8193,9 +8240,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true, "license": "MIT" }, @@ -8660,9 +8707,9 @@ "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true, "license": "MIT" }, @@ -9038,9 +9085,9 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", - "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", "dev": true, "license": "MIT", "dependencies": { @@ -9699,6 +9746,19 @@ "regjsparser": "bin/parser" } }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -9747,13 +9807,13 @@ "license": "MIT" }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.9", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.9.tgz", + "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -9844,9 +9904,9 @@ } }, "node_modules/rollup": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", - "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", + "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", "dev": true, "license": "MIT", "dependencies": { @@ -9860,24 +9920,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.27.4", - "@rollup/rollup-android-arm64": "4.27.4", - "@rollup/rollup-darwin-arm64": "4.27.4", - "@rollup/rollup-darwin-x64": "4.27.4", - "@rollup/rollup-freebsd-arm64": "4.27.4", - "@rollup/rollup-freebsd-x64": "4.27.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.27.4", - "@rollup/rollup-linux-arm-musleabihf": "4.27.4", - "@rollup/rollup-linux-arm64-gnu": "4.27.4", - "@rollup/rollup-linux-arm64-musl": "4.27.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4", - "@rollup/rollup-linux-riscv64-gnu": "4.27.4", - "@rollup/rollup-linux-s390x-gnu": "4.27.4", - "@rollup/rollup-linux-x64-gnu": "4.27.4", - "@rollup/rollup-linux-x64-musl": "4.27.4", - "@rollup/rollup-win32-arm64-msvc": "4.27.4", - "@rollup/rollup-win32-ia32-msvc": "4.27.4", - "@rollup/rollup-win32-x64-msvc": "4.27.4", + "@rollup/rollup-android-arm-eabi": "4.28.1", + "@rollup/rollup-android-arm64": "4.28.1", + "@rollup/rollup-darwin-arm64": "4.28.1", + "@rollup/rollup-darwin-x64": "4.28.1", + "@rollup/rollup-freebsd-arm64": "4.28.1", + "@rollup/rollup-freebsd-x64": "4.28.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", + "@rollup/rollup-linux-arm-musleabihf": "4.28.1", + "@rollup/rollup-linux-arm64-gnu": "4.28.1", + "@rollup/rollup-linux-arm64-musl": "4.28.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", + "@rollup/rollup-linux-riscv64-gnu": "4.28.1", + "@rollup/rollup-linux-s390x-gnu": "4.28.1", + "@rollup/rollup-linux-x64-gnu": "4.28.1", + "@rollup/rollup-linux-x64-musl": "4.28.1", + "@rollup/rollup-win32-arm64-msvc": "4.28.1", + "@rollup/rollup-win32-ia32-msvc": "4.28.1", + "@rollup/rollup-win32-x64-msvc": "4.28.1", "fsevents": "~2.3.2" } }, @@ -9933,9 +9994,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", - "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", + "version": "1.83.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz", + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", "dev": true, "license": "MIT", "dependencies": { @@ -10283,11 +10344,14 @@ } }, "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz", + "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -10300,16 +10364,73 @@ "license": "MIT" }, "node_modules/side-channel": { - "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==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -10667,9 +10788,9 @@ } }, "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -10686,17 +10807,17 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "version": "5.3.11", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz", + "integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", + "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" }, "engines": { "node": ">= 10.13.0" @@ -10720,16 +10841,54 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", + "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" }, "engines": { "node": ">= 10.13.0" @@ -10858,9 +11017,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, "license": "MIT" }, @@ -11331,17 +11490,17 @@ "license": "BSD-2-Clause" }, "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", @@ -11487,9 +11646,9 @@ "license": "MIT" }, "node_modules/webpack-dev-middleware/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", + "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", "dev": true, "license": "MIT", "dependencies": { @@ -11499,7 +11658,7 @@ "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", @@ -11639,9 +11798,9 @@ } }, "node_modules/webpack-dev-server/node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", + "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", "dev": true, "license": "MIT", "dependencies": { @@ -11651,7 +11810,7 @@ "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", diff --git a/resources/assets/v1/src/locales/es.json b/resources/assets/v1/src/locales/es.json index f93deb7778..a48801ff0c 100644 --- a/resources/assets/v1/src/locales/es.json +++ b/resources/assets/v1/src/locales/es.json @@ -5,8 +5,8 @@ "flash_warning": "\u00a1Advertencia!", "flash_success": "\u00a1Operaci\u00f3n correcta!", "close": "Cerrar", - "select_dest_account": "Please select or type a valid destination account name", - "select_source_account": "Please select or type a valid source account name", + "select_dest_account": "Por favor, seleccione o escriba un nombre de cuenta de destino v\u00e1lido", + "select_source_account": "Por favor, seleccione o escriba un nombre de cuenta de origen v\u00e1lido", "split_transaction_title": "Descripci\u00f3n de la transacci\u00f3n dividida", "errors_submission": "Hubo un problema con su env\u00edo. Por favor, compruebe los siguientes errores.", "split": "Separar", diff --git a/resources/lang/en_US/email.php b/resources/lang/en_US/email.php index 9f07ac0a38..36712a4bbe 100644 --- a/resources/lang/en_US/email.php +++ b/resources/lang/en_US/email.php @@ -109,7 +109,7 @@ return [ // reset password 'reset_pw_subject' => 'Your password reset request', - 'reset_pw_message' => 'You have received password reset instructions in your email. If this was you, please follow the instructions.', + 'reset_pw_message' => 'You have received password reset instructions in your email. If this was you, please follow the instructions.', 'reset_pw_instructions' => 'Somebody tried to reset your password. If it was you, please follow the link below to do so.', 'reset_pw_warning' => '**PLEASE** verify that the link actually goes to the Firefly III you expect it to go!', diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 5a4aa01a2a..761cf37d07 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1290,7 +1290,7 @@ return [ 'create_recurring_from_transaction' => 'Create recurring transaction based on transaction', // preferences - 'test_notifications_buttons' => 'To test your configuration, use the buttons below. Please note that the buttons have no spam control.', + 'test_notifications_buttons' => 'To test your configuration, use the buttons below. Please note that the buttons have no spam control.', 'dark_mode_option_browser' => 'Let your browser decide', 'dark_mode_option_light' => 'Always light', 'dark_mode_option_dark' => 'Always dark',