diff --git a/.env.example b/.env.example index 9f27c8b..0418d68 100644 --- a/.env.example +++ b/.env.example @@ -2,18 +2,18 @@ APP_NAME="Help Desk" APP_ENV=local APP_KEY=base64:l6QSYbX2+PeHu73W376Ijo2QbyeMIIOa6/vg60A7uGY= APP_DEBUG=true -APP_URL=http://localhost +APP_URL=172.0.0.1 LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mysql +DB_HOST=localhost DB_PORT=3306 DB_DATABASE=help_desk -DB_USERNAME=sail -DB_PASSWORD=password +DB_USERNAME=root +DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file @@ -29,13 +29,13 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS="hello@example.com" -MAIL_FROM_NAME="${APP_NAME}" +MAIL_HOST=mail.myipo.gov.my +MAIL_PORT=587 +MAIL_USERNAME=ict@myipo.gov.my +MAIL_PASSWORD=MyIPO@@2024 +MAIL_ENCRYPTION=tls +MAIL_FROM_ADDRESS="ict@myipo.gov.my" +MAIL_FROM_NAME="Helpdesk MyIPO" AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= diff --git a/app/Class/SendDigestNotifications.php b/app/Class/SendDigestNotifications.php new file mode 100644 index 0000000..bacccb3 --- /dev/null +++ b/app/Class/SendDigestNotifications.php @@ -0,0 +1,56 @@ +unreadNotifications; // Get unread notifications + $temp = $notifications; + // Aggregate notifications based on your criteria + $groupedNotifications = $notifications->groupBy(function ($notification) { + return $notification->type; + }); + + foreach ($groupedNotifications as $type => $temp) { + if($temp->first()->type == "App\\Notifications\\SummaryNotification"){ + continue; + } + // // Create a summary notification for each group + $summary = $this->createSummary($temp); + + // // // Send the summary notification + $user->notify(new SummaryNotification($summary)); + + // // // Mark the individual notifications as read + } + foreach ($user->unreadNotifications as $notification) { + if($notification->type != "App\\Notifications\\SummaryNotification"){ + $notification->delete(); + } + } + } + + } + + protected function createSummary($notifications) + { + // Logic to create a summary from a group of notifications + $summary = [ + 'count' => $notifications->count(), + 'type' => $notifications->first()->type, + 'messages' => $notifications->pluck('data')->toArray(), // Assuming 'message' is an attribute in notification data + ]; + + return $summary; + } +} \ No newline at end of file diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d8bc1d2..b8359ed 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -4,6 +4,7 @@ use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use App\Class\SendDigestNotifications; class Kernel extends ConsoleKernel { @@ -15,7 +16,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire')->hourly(); + $schedule->call(new SendDigestNotifications)->everyFiveMinute(); } /** @@ -29,4 +30,14 @@ protected function commands() require base_path('routes/console.php'); } + + /** + * Get the timezone that should be used by default for scheduled events. + * + * @return \DateTimeZone|string|null + */ + protected function scheduleTimezone() + { + return 'Asia/Kuala_Lumpur'; + } } diff --git a/app/Core/LogsActivity.php b/app/Core/LogsActivity.php index 09a2af1..44df36e 100644 --- a/app/Core/LogsActivity.php +++ b/app/Core/LogsActivity.php @@ -5,6 +5,7 @@ use Illuminate\Support\HtmlString; use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity as BaseLogsActivity; +use App\Models\User; trait LogsActivity { @@ -20,7 +21,45 @@ public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->logOnly($this->getFillable()) - ->setDescriptionForEvent(fn(string $eventName) => new HtmlString( + ->setDescriptionForEvent(function(string $eventName) { + + + // Define attributes to exclude from the change log + $excludedAttributes = ['updated_at', 'created_at', 'deleted_at']; + + + // Get changes and original values + $changes = array_diff_key($this->getDirty(), array_flip($excludedAttributes)); + $originals = array_diff_key($this->getOriginal(), array_flip($excludedAttributes)); + + + // Generate changes description + $changesDescription = ''; + foreach ($changes as $key => $value) { + $originalValue = $originals[$key] ?? 'null'; + if($key=="responsible_id") + { + // Fetch the responsible user based on the current responsible_id + $responsibleUserOld = User::withTrashed()->find($originalValue); + + // Get the responsible user's name if available + $responsibleUserNameOld = $responsibleUserOld ? $responsibleUserOld->name : 'None'; + + // Fetch the responsible user based on the current responsible_id + $responsibleUserNew = User::withTrashed()->find($value); + + // Get the responsible user's name if available + $responsibleUserNameNew = $responsibleUserNew ? $responsibleUserNew->name : 'Unknown User'; + $changesDescription .= "Responsible: {$responsibleUserNameOld} to {$responsibleUserNameNew} "; + continue; + } + $changesDescription .= "{$key}: '{$originalValue}' => '{$value}' "; + } + if($eventName == "created"){ + $changesDescription = "" ; + } + // Generate the description + return new HtmlString( '
' . (auth()->user()->name ?? '') . " " @@ -29,13 +68,16 @@ public function getActivitylogOptions(): LogOptions . $this->fromCamelCase((new \ReflectionClass($this))->getShortName()) . " " . $this + . "
" + . $changesDescription . ' ' . __('See details') . '' . '
' - )); + ); + }); } /** diff --git a/app/Http/Controllers/TicketNumberController.php b/app/Http/Controllers/TicketNumberController.php index 55a8f7e..151b05f 100644 --- a/app/Http/Controllers/TicketNumberController.php +++ b/app/Http/Controllers/TicketNumberController.php @@ -20,7 +20,6 @@ public function __invoke(string $number) $ticketPrefix = substr($number, 0, 4); $ticketNumber = str_replace($ticketPrefix, "", $number); $ticket = Ticket::where('number', $ticketNumber) - ->whereHas('project', fn($query) => $query->where('ticket_prefix', $ticketPrefix)) ->first(); if ($ticket) { return redirect()->route('tickets.details', [ diff --git a/app/Http/Livewire/Administration/Companies.php b/app/Http/Livewire/Administration/Companies.php deleted file mode 100644 index 78120ac..0000000 --- a/app/Http/Livewire/Administration/Companies.php +++ /dev/null @@ -1,224 +0,0 @@ -user()->can('View own companies') && !auth()->user()->can('View all companies')) { - $query->where('responsible_id', auth()->user()->id); - } elseif (!auth()->user()->can('View all companies')) { - // Get empty list - $query->whereNull('id'); - } - return $query; - } - - /** - * Table definition - * - * @return array - */ - protected function getTableColumns(): array - { - return [ - ImageColumn::make('logo') - ->label(__('Logo')) - ->height(30), - - TextColumn::make('name') - ->label(__('Company name')) - ->searchable() - ->sortable(), - - UserColumn::make('responsible') - ->label(__('Responsible')) - ->searchable() - ->sortable(), - - BooleanColumn::make('is_disabled') - ->label(__('Company activated')) - ->trueIcon('heroicon-o-x-circle') - ->falseIcon('heroicon-o-check-circle') - ->trueColor('danger') - ->falseColor('success') - ->searchable() - ->sortable(), - - TagsColumn::make('users.name') - ->label(__('Company users')) - ->limit(1) - ->searchable() - ->sortable(), - - TextColumn::make('created_at') - ->label(__('Created at')) - ->sortable() - ->searchable() - ->dateTime(), - ]; - } - - /** - * Table actions definition - * - * @return array - */ - protected function getTableActions(): array - { - return [ - Action::make('edit') - ->icon('heroicon-o-pencil') - ->link() - ->label(__('Edit company')) - ->visible(fn () => auth()->user()->can('Update companies')) - ->action(fn(Company $record) => $this->updateCompany($record->id)) - ]; - } - - /** - * Table header actions definition - * - * @return array - */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('companies-export') - ->withColumns([ - Column::make('name') - ->heading(__('Company name')), - Column::make('responsible.name') - ->heading(__('Responsible')), - Column::make('is_disabled') - ->heading(__('Company activated')) - ->formatStateUsing(fn (bool $state) => $state ? __('No') : __('Yes')), - Column::make('users') - ->heading(__('Company users')) - ->formatStateUsing(fn (Company $record) => $record->users->pluck('name')->join(', ')), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn (Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } - - /** - * Table default sort column definition - * - * @return string|null - */ - protected function getDefaultTableSortColumn(): ?string - { - return 'created_at'; - } - - /** - * Table default sort direction definition - * - * @return string|null - */ - protected function getDefaultTableSortDirection(): ?string - { - return 'desc'; - } - - /** - * Show update company dialog - * - * @param $id - * @return void - */ - public function updateCompany($id) - { - $this->selectedCompany = Company::find($id); - $this->dispatchBrowserEvent('toggleCompanyModal'); - } - - /** - * Show create company dialog - * - * @return void - */ - public function createCompany() - { - $this->selectedCompany = new Company(); - $this->dispatchBrowserEvent('toggleCompanyModal'); - } - - /** - * Cancel and close company create / update dialog - * - * @return void - */ - public function cancelCompany() - { - $this->selectedCompany = null; - $this->dispatchBrowserEvent('toggleCompanyModal'); - } - - /** - * Event launched after a company is created / updated - * - * @return void - */ - public function companySaved() - { - $this->cancelCompany(); - } - - /** - * Event launched after a company is deleted - * - * @return void - */ - public function companyDeleted() - { - $this->companySaved(); - } -} diff --git a/app/Http/Livewire/Administration/CompaniesDialog.php b/app/Http/Livewire/Administration/CompaniesDialog.php deleted file mode 100644 index 8636659..0000000 --- a/app/Http/Livewire/Administration/CompaniesDialog.php +++ /dev/null @@ -1,208 +0,0 @@ -form->fill([ - 'name' => $this->company->name, - 'logo' => $this->company->logo, - 'description' => $this->company->description, - 'is_disabled' => $this->company->is_disabled, - 'responsible_id' => $this->company->responsible_id, - 'users' => $this->company->users->pluck('id')->toArray() - ]); - } - - - public function render() - { - return view('livewire.administration.companies-dialog'); - } - - /** - * Form schema definition - * - * @return array - */ - protected function getFormSchema(): array - { - return [ - - Grid::make(5) - ->schema([ - - Grid::make(1) - ->columnSpan(2) - ->schema([ - FileUpload::make('logo') - ->image() - ->maxSize(10240) - ->label(__('Logo')), - ]), - - Grid::make(1) - ->columnSpan(3) - ->schema([ - - TextInput::make('name') - ->label(__('Company name')) - ->maxLength(255) - ->unique( - table: Company::class, - column: 'name', - ignorable: fn() => $this->company, - callback: fn (Unique $rule) => $rule->withoutTrashed() - ) - ->required(), - - Select::make('responsible_id') - ->label(__('Responsible')) - ->searchable() - ->required() - ->options(User::all()->pluck('name', 'id')->toArray()), - ]), - - ]), - - RichEditor::make('description') - ->label(__('Description')) - ->fileAttachmentsDisk(config('filesystems.default')) - ->fileAttachmentsDirectory('companies') - ->fileAttachmentsVisibility('private'), - - Toggle::make('is_disabled') - ->label(__('Disable access to this company')), - - MultiSelect::make('users') - ->label(__('Company users')) - ->options(User::all()->pluck('name', 'id')->toArray()) - ]; - } - - /** - * Create / Update the company - * - * @return void - */ - public function save(): void - { - $data = $this->form->getState(); - if (!$this->company?->id) { - $company = Company::create([ - 'name' => $data['name'], - 'logo' => $data['logo'] ?? null, - 'description' => $data['description'] ?? null, - 'is_disabled' => $data['is_disabled'] ?? false, - 'responsible_id' => $data['responsible_id'], - ]); - foreach ($data['users'] as $user) { - CompanyUser::create([ - 'company_id' => $company->id, - 'user_id' => $user - ]); - } - Notification::make() - ->success() - ->title(__('Company created')) - ->body(__('The company has been created')) - ->send(); - } else { - $this->company->name = $data['name']; - $this->company->description = $data['description']; - $this->company->logo = $data['logo']; - $this->company->is_disabled = $data['is_disabled']; - $this->company->responsible_id = $data['responsible_id']; - $this->company->save(); - CompanyUser::where('company_id', $this->company->id)->delete(); - foreach ($data['users'] as $user) { - CompanyUser::create([ - 'company_id' => $this->company->id, - 'user_id' => $user - ]); - } - Notification::make() - ->success() - ->title(__('Company updated')) - ->body(__("The company's details has been updated")) - ->send(); - } - $this->emit('companySaved'); - } - - /** - * Delete an existing company - * - * @return void - */ - public function doDeleteCompany(): void - { - $this->company->delete(); - $this->deleteConfirmationOpened = false; - $this->emit('companyDeleted'); - Notification::make() - ->success() - ->title(__('Company deleted')) - ->body(__('The company has been deleted')) - ->send(); - } - - /** - * Cancel the deletion of a company - * - * @return void - */ - public function cancelDeleteCompany(): void - { - $this->deleteConfirmationOpened = false; - } - - /** - * Show the delete company confirmation dialog - * - * @return void - * @throws \Exception - */ - public function deleteCompany(): void - { - $this->deleteConfirmation( - __('Company deletion'), - __('Are you sure you want to delete this company?'), - 'doDeleteCompany', - 'cancelDeleteCompany' - ); - } -} diff --git a/app/Http/Livewire/Administration/Roles.php b/app/Http/Livewire/Administration/Roles.php index 9bc4d92..c64d4a7 100644 --- a/app/Http/Livewire/Administration/Roles.php +++ b/app/Http/Livewire/Administration/Roles.php @@ -86,32 +86,32 @@ protected function getTableActions(): array * * @return array */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('user-roles-export') - ->withColumns([ - Column::make('name') - ->heading(__('Role name')), - Column::make('permissions') - ->heading(__('Permissions')) - ->formatStateUsing( - fn (Role $record) => $record->permissions->pluck('name')->join(', ') - ), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn (Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('user-roles-export') + // ->withColumns([ + // Column::make('name') + // ->heading(__('Role name')), + // Column::make('permissions') + // ->heading(__('Permissions')) + // ->formatStateUsing( + // fn (Role $record) => $record->permissions->pluck('name')->join(', ') + // ), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn (Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } /** * Table default sort column definition diff --git a/app/Http/Livewire/Administration/TicketCategories.php b/app/Http/Livewire/Administration/TicketCategories.php new file mode 100644 index 0000000..61a40f9 --- /dev/null +++ b/app/Http/Livewire/Administration/TicketCategories.php @@ -0,0 +1,207 @@ +whereNull('parent_id')->toQuery(); + } + + /** + * Table definition + * + * @return array + */ + protected function getTableColumns(): array + { + return [ + TextColumn::make('title') + ->label(__('Category')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => new HtmlString(' + + ' . $record->title . ' + + ')), + + // TextColumn::make('parent_id') + // ->label(__('Subcategories')) + // ->searchable() + // ->sortable() + // ->formatStateUsing(fn(TicketCategory $record) => new HtmlString(' + // + // ' . $record->where('parent_id',$record->id)->pluck('title')->implode(', ') . ' + // + // ')), + + TextColumn::make('created_at') + ->label(__('Created at')) + ->sortable() + ->searchable() + ->dateTime(), + ]; + } + + /** + * Table actions definition + * + * @return array + */ + protected function getTableActions(): array + { + return [ + Action::make('edit') + ->icon('heroicon-o-pencil') + ->link() + ->label(__('Edit category')) + ->action(fn(TicketCategory $record) => $this->updateCategory($record->id)) + ]; + } + + /** + * Table header actions definition + * + * @return array + */ + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-categories-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } + + /** + * Table default sort column definition + * + * @return string|null + */ + protected function getDefaultTableSortColumn(): ?string + { + return 'created_at'; + } + + /** + * Table default sort direction definition + * + * @return string|null + */ + protected function getDefaultTableSortDirection(): ?string + { + return 'desc'; + } + + /** + * Show update category dialog + * + * @param $id + * @return void + */ + public function updateCategory($id) + { + $this->selectedCategory = TicketCategory::find($id); + $this->dispatchBrowserEvent('toggleCategoryModal'); + } + + /** + * Show create category dialog + * + * @return void + */ + public function createCategory() + { + $this->selectedCategory = new TicketCategory(); + $this->dispatchBrowserEvent('toggleCategoryModal'); + } + + /** + * Cancel and close category create / update dialog + * + * @return void + */ + public function cancelCategory() + { + $this->selectedCategory = null; + $this->dispatchBrowserEvent('toggleCategoryModal'); + } + + /** + * Event launched after a category is created / updated + * + * @return void + */ + public function categorySaved() + { + $this->cancelCategory(); + } + + /** + * Event launched after a category is deleted + * + * @return void + */ + public function categoryDeleted() + { + $this->selectedCategory->delete(); + + } +} diff --git a/app/Http/Livewire/Administration/TicketCategoriesDialog.php b/app/Http/Livewire/Administration/TicketCategoriesDialog.php new file mode 100644 index 0000000..ff3476e --- /dev/null +++ b/app/Http/Livewire/Administration/TicketCategoriesDialog.php @@ -0,0 +1,194 @@ +form->fill([ + 'title' => $this->category->title, + 'parent_id' => $this->category->parent_id, + 'text_color' => $this->category->text_color, + 'bg_color' => $this->category->bg_color, + ]); + } + + public function render() + { + return view('livewire.administration.ticket-categories-dialog'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + + Select::make('parent_id') + ->label(__('Note: Select Category only when creating Subcategory')) + ->searchable() + ->options(categories_list('id')), + TextInput::make('title') + ->label(__('Category / Subcategory name')) + ->maxLength(255) + ->unique( + table: TicketCategory::class, + column: 'title', + ignorable: fn () => $this->category, + callback: function (Unique $rule) + { + return $rule->withoutTrashed(); + } + ) + ->required(), + ColorPicker::make('text_color') + ->label(__('Text color')) + ->required(), + + ColorPicker::make('bg_color') + ->label(__('Background color')) + ->required(), + ]; + } + + /** + * Create / Update the category + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + if (!$this->category?->id) { + if(!$data['parent_id']) { + TicketCategory::create([ + 'title' => $data['title'], + 'parent_id' => null, + 'text_color' => $data['text_color'], + 'bg_color' => $data['bg_color'], + 'slug' => Str::slug($data['title'], '_'), + 'level' => 'category' + ]); + Notification::make() + ->success() + ->title(__('Category created')) + ->body(__('The category has been created')) + ->send(); + + }else{ + $parent = $data['parent_id']; + TicketCategory::create([ + 'title' => $data['title'], + 'parent_id' => $data['parent_id'], + 'text_color' => TicketCategory::where('id',$parent)->pluck('text_color')->first(), + 'bg_color' => TicketCategory::where('id',$parent)->pluck('bg_color')->first(), + 'slug' => Str::slug($data['title'], '_'), + 'level' => 'subcategory' + ]); + Notification::make() + ->success() + ->title(__('Subcategory created')) + ->body(__('The subcategory has been created')) + ->send(); + } + } else { + $this->category->title = $data['title']; + $this->category->parent_id = $data['parent_id']; + $this->category->text_color = $data['text_color']; + $this->category->bg_color = $data['bg_color']; + $this->category->save(); + + // Fetch the ticket subcategories in a single query + $category_id = TicketCategory::where('slug', Str::slug($data['title'], '_'))->pluck('id')->first(); + $subcategories = TicketCategory::where('parent_id', $category_id)->get(); + + foreach ($subcategories as $subcategory) { + // Apply the value to the subcategory (e.g., updating a specific field) + $subcategory->update([ + 'text_color' => $data['text_color'], + 'bg_color' => $data['bg_color'], + ]); + } + + Notification::make() + ->success() + ->title(__('Category updated')) + ->body(__('The category\'s details has been updated')) + ->send(); + } + $this->emit('categorySaved'); + } + + /** + * Delete an existing category + * + * @return void + */ + public function doDeleteCategory(): void + { + $this->category->delete(); + $this->deleteConfirmationOpened = false; + + $this->dispatchBrowserEvent('toggleCategoryModal'); + redirect()->to('/administration/ticket-categories'); + + Notification::make() + ->success() + ->title(__('Category deleted')) + ->body(__('The category has been deleted')) + ->send(); + } + + /** + * Cancel the deletion of a category + * + * @return void + */ + public function cancelDeleteCategory(): void + { + $this->deleteConfirmationOpened = false; + } + + /** + * Show the delete category confirmation dialog + * + * @return void + * @throws \Exception + */ + public function deleteCategory(): void + { + $this->deleteConfirmation( + __('Category deletion'), + __('Are you sure you want to delete this category?'), + 'doDeleteCategory', + 'cancelDeleteCategory' + ); + } +} diff --git a/app/Http/Livewire/Administration/TicketIssues.php b/app/Http/Livewire/Administration/TicketIssues.php new file mode 100644 index 0000000..44e23bf --- /dev/null +++ b/app/Http/Livewire/Administration/TicketIssues.php @@ -0,0 +1,219 @@ +where('level', 'issue')->toQuery(); + } + + /** + * Table definition + * + * @return array + */ + protected function getTableColumns(): array + { + return [ + TextColumn::make('title') + ->label(__('Issues')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => new HtmlString(' + + ' . $record->title . ' + + ')), + TextColumn::make('parent_id') + ->label(__('Subcategory')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => + new HtmlString(' + + ' . $record->where('id', $record->parent_id)->pluck('title')->implode(', ') . ' + + ') + ), + TextColumn::make('type') + ->label(__('Type')) + ->sortable() + ->searchable() + ->formatStateUsing(function (TicketCategory $record) { + return new HtmlString(' + + ' . (TicketType::where('slug',$record->type)->first()->title ?? 'N/A') . ' + + '); + }), + TextColumn::make('created_at') + ->label(__('Created at')) + ->sortable() + ->searchable() + ->dateTime(), + ]; + } + + /** + * Table actions definition + * + * @return array + */ + protected function getTableActions(): array + { + return [ + Action::make('edit') + ->icon('heroicon-o-pencil') + ->link() + ->label(__('Edit category')) + ->action(fn(TicketCategory $record) => $this->updateIssue($record->id)) + ]; + } + + /** + * Table header actions definition + * + * @return array + */ + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-subcategories-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } + + /** + * Table default sort column definition + * + * @return string|null + */ + protected function getDefaultTableSortColumn(): ?string + { + return 'created_at'; + } + + /** + * Table default sort direction definition + * + * @return string|null + */ + protected function getDefaultTableSortDirection(): ?string + { + return 'desc'; + } + + /** + * Show update issue dialog + * + * @param $id + * @return void + */ + public function updateIssue($id) + { + $this->selectedIssue = TicketCategory::find($id); + $this->dispatchBrowserEvent('toggleIssueModal'); + } + + /** + * Show create issue dialog + * + * @return void + */ + public function createIssue() + { + $this->selectedIssue = new TicketCategory(); + $this->dispatchBrowserEvent('toggleIssueModal'); + } + + /** + * Cancel and close issue create / update dialog + * + * @return void + */ + public function cancelIssue() + { + $this->selectedIssue = null; + $this->dispatchBrowserEvent('toggleIssueModal'); + } + + /** + * Event launched after a issue is created / updated + * + * @return void + */ + public function issueSaved() + { + $this->cancelIssue(); + } + + /** + * Event launched after a issue is deleted + * + * @return void + */ + public function issueDeleted() + { + $this->issueSaved(); + } +} diff --git a/app/Http/Livewire/Administration/TicketIssuesDialog.php b/app/Http/Livewire/Administration/TicketIssuesDialog.php new file mode 100644 index 0000000..c135cf8 --- /dev/null +++ b/app/Http/Livewire/Administration/TicketIssuesDialog.php @@ -0,0 +1,163 @@ +form->fill([ + 'title' => $this->issue->title, + 'parent_id' => TicketCategory::getCategoriesByParentId($this->issue->parent_id), + 'text_color' => $this->issue->text_color, + 'bg_color' => $this->issue->bg_color, + 'type' => $this->issue->type, + ]); + } + + public function render() + { + return view('livewire.administration.ticket-issues-dialog'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + Select::make('parent_id') + ->label(__('Subcategory')) + ->required() + ->searchable() + ->options(fn () => TicketCategory::where('level','subcategory')->pluck('title','id')->toArray()), + TextInput::make('title') + ->label(__('Issue name')) + ->maxLength(255) + ->unique( + table: TicketCategory::class, + column: 'title', + ignorable: fn () => $this->issue, + callback: function (Unique $rule) + { + return $rule->withoutTrashed(); + } + ) + ->required(), + Select::make('type') + ->label(__('Type')) + ->options(fn () => TicketType::pluck('title','slug')->toArray()) + ->required(), + ]; + } + + /** + * Create / Update the category + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + $parent = $data['parent_id']; + if (!$this->issue?->id) { + TicketCategory::create([ + 'title' => $data['title'], + 'parent_id' => $data['parent_id'], + 'text_color' => TicketCategory::where('id',$parent)->pluck('text_color')->first(), + 'bg_color' => TicketCategory::where('id',$parent)->pluck('bg_color')->first(), + 'slug' => Str::slug($data['title'], '_'), + 'type' => $data['type'], + 'level' => 'issue' + ]); + Notification::make() + ->success() + ->title(__('Issue created')) + ->body(__('The issue has been created')) + ->send(); + } else { + $this->issue->title = $data['title']; + $this->issue->parent_id = $data['parent_id']; + $this->issue->text_color = TicketCategory::where('id',$parent)->pluck('text_color')->first(); + $this->issue->bg_color = TicketCategory::where('id',$parent)->pluck('bg_color')->first(); + $this->issue->type = $data['type']; + $this->issue->save(); + Notification::make() + ->success() + ->title(__('Category updated')) + ->body(__('The category\'s details has been updated')) + ->send(); + } + $this->emit('issueSaved'); + } + + /** + * Delete an existing issue + * + * @return void + */ + public function doDeleteIssue(): void + { + $this->issue->delete(); + $this->deleteConfirmationOpened = false; + $this->dispatchBrowserEvent('toggleIssueModal'); + redirect()->to('/administration/ticket-issues'); + Notification::make() + ->success() + ->title(__('Issue deleted')) + ->body(__('The issue has been deleted')) + ->send(); + } + + /** + * Cancel the deletion of a issue + * + * @return void + */ + public function cancelDeleteIssue(): void + { + $this->deleteConfirmationOpened = false; + } + + /** + * Show the delete issue confirmation dialog + * + * @return void + * @throws \Exception + */ + public function deleteIssue(): void + { + $this->deleteConfirmation( + __('Issue deletion'), + __('Are you sure you want to delete this issue?'), + 'doDeleteIssue', + 'cancelDeleteIssue' + ); + } +} diff --git a/app/Http/Livewire/Administration/TicketPriorities.php b/app/Http/Livewire/Administration/TicketPriorities.php index 24110b4..0b9f9b3 100644 --- a/app/Http/Livewire/Administration/TicketPriorities.php +++ b/app/Http/Livewire/Administration/TicketPriorities.php @@ -3,7 +3,6 @@ namespace App\Http\Livewire\Administration; use App\Models\TicketPriority; -use App\Models\User; use Carbon\Carbon; use Filament\Tables\Actions\Action; use Filament\Tables\Columns\TextColumn; @@ -90,27 +89,27 @@ protected function getTableActions(): array * * @return array */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('ticket-priorities-export') - ->withColumns([ - Column::make('title') - ->heading(__('Title')), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-priorities-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } /** * Table default sort column definition diff --git a/app/Http/Livewire/Administration/TicketStatuses.php b/app/Http/Livewire/Administration/TicketStatuses.php index 9f15a63..c8d1006 100644 --- a/app/Http/Livewire/Administration/TicketStatuses.php +++ b/app/Http/Livewire/Administration/TicketStatuses.php @@ -93,27 +93,27 @@ protected function getTableActions(): array * * @return array */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('ticket-statuses-export') - ->withColumns([ - Column::make('title') - ->heading(__('Title')), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-statuses-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } /** * Table default sort column definition diff --git a/app/Http/Livewire/Administration/TicketSubcategories.php b/app/Http/Livewire/Administration/TicketSubcategories.php new file mode 100644 index 0000000..3b19110 --- /dev/null +++ b/app/Http/Livewire/Administration/TicketSubcategories.php @@ -0,0 +1,218 @@ +where('level', 'subcategory')->toQuery(); + } + + /** + * Table definition + * + * @return array + */ + protected function getTableColumns(): array + { + return [ + TextColumn::make('title') + ->label(__('Subcategory')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => new HtmlString(' + + ' . $record->title . ' + + ')), + TextColumn::make('parent_id') + ->label(__('Category')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => + new HtmlString(' + + ' . $record->where('id', $record->parent_id)->pluck('title')->implode(', ') . ' + + ') + ), + + TextColumn::make('issue') + ->label(__('Issues')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(TicketCategory $record) => new HtmlString(' + + ' . $record->where('parent_id',$record->id)->pluck('title')->implode(', ') . ' + + ')), + + TextColumn::make('created_at') + ->label(__('Created at')) + ->sortable() + ->searchable() + ->dateTime(), + ]; + } + + /** + * Table actions definition + * + * @return array + */ + protected function getTableActions(): array + { + return [ + Action::make('edit') + ->icon('heroicon-o-pencil') + ->link() + ->label(__('Edit category')) + ->action(fn(TicketCategory $record) => $this->updateSubcategory($record->id)) + ]; + } + + /** + * Table header actions definition + * + * @return array + */ + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-subcategories-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } + + /** + * Table default sort column definition + * + * @return string|null + */ + protected function getDefaultTableSortColumn(): ?string + { + return 'created_at'; + } + + /** + * Table default sort direction definition + * + * @return string|null + */ + protected function getDefaultTableSortDirection(): ?string + { + return 'desc'; + } + + /** + * Show update subcategory dialog + * + * @param $id + * @return void + */ + public function updateSubcategory($id) + { + $this->selectedSubcategory = TicketCategory::find($id); + $this->dispatchBrowserEvent('toggleSubcategoryModal'); + } + + /** + * Show create subcategory dialog + * + * @return void + */ + public function createSubcategory() + { + $this->selectedSubcategory = new TicketCategory(); + $this->dispatchBrowserEvent('toggleSubcategoryModal'); + } + + /** + * Cancel and close subcategory create / update dialog + * + * @return void + */ + public function cancelSubcategory() + { + $this->selectedSubcategory = null; + $this->dispatchBrowserEvent('toggleSubcategoryModal'); + } + + /** + * Event launched after a subcategory is created / updated + * + * @return void + */ + public function subcategorySaved() + { + $this->cancelSubcategory(); + } + + /** + * Event launched after a subcategory is deleted + * + * @return void + */ + public function subcategoryDeleted() + { + $this->subcategorySaved(); + } +} diff --git a/app/Http/Livewire/Administration/TicketSubcategoriesDialog.php b/app/Http/Livewire/Administration/TicketSubcategoriesDialog.php new file mode 100644 index 0000000..e8c46f1 --- /dev/null +++ b/app/Http/Livewire/Administration/TicketSubcategoriesDialog.php @@ -0,0 +1,156 @@ +form->fill([ + 'title' => $this->subcategory->title, + 'parent_id' => TicketCategory::getCategoriesByParentId($this->subcategory->parent_id), + 'text_color' => $this->subcategory->text_color, + 'bg_color' => $this->subcategory->bg_color, + ]); + } + + public function render() + { + return view('livewire.administration.ticket-subcategories-dialog'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + Select::make('parent_id') + ->label(__('Category')) + ->required() + ->searchable() + ->options(fn () => TicketCategory::whereNull('parent_id')->pluck('title','id')->toArray()), + TextInput::make('title') + ->label(__('Subcategory name')) + ->maxLength(255) + ->unique( + table: TicketCategory::class, + column: 'title', + ignorable: fn () => $this->subcategory, + callback: function (Unique $rule) + { + return $rule->withoutTrashed(); + } + ) + ->required(), + + ]; + } + + /** + * Create / Update the category + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + $parent = $data['parent_id']; + if (!$this->subcategory?->id) { + TicketCategory::create([ + 'title' => $data['title'], + 'parent_id' => $data['parent_id'], + 'text_color' => TicketCategory::where('id',$parent)->pluck('text_color')->first(), + 'bg_color' => TicketCategory::where('id',$parent)->pluck('bg_color')->first(), + 'slug' => Str::slug($data['title'], '_'), + 'level' => 'subcategory' + ]); + Notification::make() + ->success() + ->title(__('Subcategory created')) + ->body(__('The subcategory has been created')) + ->send(); + } else { + $this->subcategory->title = $data['title']; + $this->subcategory->parent_id = $data['parent_id']; + $this->subcategory->text_color = TicketCategory::where('id',$parent)->pluck('text_color')->first(); + $this->subcategory->bg_color = TicketCategory::where('id',$parent)->pluck('bg_color')->first(); + $this->subcategory->save(); + Notification::make() + ->success() + ->title(__('Category updated')) + ->body(__('The category\'s details has been updated')) + ->send(); + } + $this->emit('subcategorySaved'); + } + + /** + * Delete an existing category + * + * @return void + */ + public function doDeleteSubcategory(): void + { + $this->subcategory->delete(); + $this->deleteConfirmationOpened = false; + $this->dispatchBrowserEvent('toggleSubcategoryModal'); + redirect()->to('/administration/ticket-subcategories'); + Notification::make() + ->success() + ->title(__('Subcategory deleted')) + ->body(__('The subcategory has been deleted')) + ->send(); + } + + /** + * Cancel the deletion of a subcategory + * + * @return void + */ + public function cancelDeleteSubcategory(): void + { + $this->deleteConfirmationOpened = false; + } + + /** + * Show the delete subcategory confirmation dialog + * + * @return void + * @throws \Exception + */ + public function deleteSubcategory(): void + { + $this->deleteConfirmation( + __('Subcategory deletion'), + __('Are you sure you want to delete this subcategory?'), + 'doDeleteSubcategory', + 'cancelDeleteSubcategory' + ); + } +} diff --git a/app/Http/Livewire/Administration/TicketTypes.php b/app/Http/Livewire/Administration/TicketTypes.php index 6050661..a2babb9 100644 --- a/app/Http/Livewire/Administration/TicketTypes.php +++ b/app/Http/Livewire/Administration/TicketTypes.php @@ -89,27 +89,27 @@ protected function getTableActions(): array * * @return array */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('ticket-types-export') - ->withColumns([ - Column::make('title') - ->heading(__('Title')), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('ticket-types-export') + // ->withColumns([ + // Column::make('title') + // ->heading(__('Title')), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } /** * Table default sort column definition diff --git a/app/Http/Livewire/Administration/Users.php b/app/Http/Livewire/Administration/Users.php index 3351d59..0ecf154 100644 --- a/app/Http/Livewire/Administration/Users.php +++ b/app/Http/Livewire/Administration/Users.php @@ -24,7 +24,7 @@ class Users extends Component implements HasTable { use InteractsWithTable; - public $selectedUser; + public $selectedUser; protected $listeners = ['userSaved', 'userDeleted']; @@ -79,12 +79,6 @@ protected function getTableColumns(): array ->searchable() ->sortable(), - TagsColumn::make('companies.name') - ->label(__('Companies')) - ->limit(1) - ->searchable() - ->sortable(), - TextColumn::make('created_at') ->label(__('Created at')) ->sortable() @@ -123,37 +117,37 @@ protected function getTableActions(): array * * @return array */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('users-export') - ->withColumns([ - Column::make('name') - ->heading(__('Full name')), - Column::make('companies') - ->heading(__('Companies')) - ->formatStateUsing( - fn(User $record) => $record->companies->pluck('name')->join(', ') - ), - Column::make('roles') - ->heading(__('User roles')) - ->formatStateUsing( - fn(User $record) => $record->roles->pluck('name')->join(', ') - ), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } + // protected function getTableHeaderActions(): array + // { + // return [ + // ExportAction::make() + // ->label(__('Export')) + // ->color('success') + // ->icon('heroicon-o-document-download') + // ->exports([ + // ExcelExport::make() + // ->askForWriterType() + // ->withFilename('users-export') + // ->withColumns([ + // Column::make('name') + // ->heading(__('Full name')), + // Column::make('companies') + // ->heading(__('Companies')) + // ->formatStateUsing( + // fn(User $record) => $record->companies->pluck('name')->join(', ') + // ), + // Column::make('roles') + // ->heading(__('User roles')) + // ->formatStateUsing( + // fn(User $record) => $record->roles->pluck('name')->join(', ') + // ), + // Column::make('created_at') + // ->heading(__('Created at')) + // ->formatStateUsing(fn(Carbon $state) => $state->format(__('Y-m-d g:i A'))), + // ]) + // ]) + // ]; + // } /** * Table default sort column definition diff --git a/app/Http/Livewire/Administration/UsersDialog.php b/app/Http/Livewire/Administration/UsersDialog.php index b91cb5c..f6e4318 100644 --- a/app/Http/Livewire/Administration/UsersDialog.php +++ b/app/Http/Livewire/Administration/UsersDialog.php @@ -3,7 +3,6 @@ namespace App\Http\Livewire\Administration; use App\Core\CrudDialogHelper; -use App\Models\CompanyUser; use App\Models\User; use App\Notifications\UserCreatedNotification; use Closure; diff --git a/app/Http/Livewire/Analytics.php b/app/Http/Livewire/Analytics.php index b7f2260..0769b71 100644 --- a/app/Http/Livewire/Analytics.php +++ b/app/Http/Livewire/Analytics.php @@ -2,24 +2,27 @@ namespace App\Http\Livewire; -use App\Models\Project; use App\Models\Ticket; use App\Models\TicketStatus; use Livewire\Component; class Analytics extends Component { + + public $assignedTickets; public $notAssignedTickets; - public $ticketsAssignments; - public $ticketsByStatuses; + + public $startDate; + public $endDate; public function mount(): void { + $this->startDate = now()->startOfMonth()->toDateString(); + $this->endDate = now()->endOfMonth()->toDateString(); + $this->loadAssignedTickets(); $this->loadNotAssignedTickets(); - $this->loadTicketsAssignments(); - $this->loadTicketsByStatuses(); } public function render() @@ -47,51 +50,7 @@ private function loadNotAssignedTickets(): void $this->notAssignedTickets = Ticket::whereNull('responsible_id')->get(); } - /** - * Load tickets assignements - * - * @return void - */ - private function loadTicketsAssignments(): void - { - $query = Ticket::query(); - if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { - $query->where(function ($query) { - $query->where('owner_id', auth()->user()->id) - ->orWhere('responsible_id', auth()->user()->id); - }); - } - $tickets = $query->get()->groupBy('responsible_id')->sort(function ($a, $b) { - return ($a->first()->responsible_id ?? 0) > ($b->first()->responsibe_id ?? 0); - }); - $this->ticketsAssignments = []; - foreach ($tickets as $ticket) { - $this->ticketsAssignments[$ticket->first()->responsible?->name ?? __('Unassigned')] = $ticket->count(); - } - } + - /** - * Load tickets by statuses - * - * @return void - */ - private function loadTicketsByStatuses(): void - { - $query = Ticket::query(); - if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { - $query->where(function ($query) { - $query->where('owner_id', auth()->user()->id) - ->orWhere('responsible_id', auth()->user()->id); - }); - } - $tickets = $query->get()->groupBy('status'); - $this->ticketsByStatuses = []; - $statuses = TicketStatus::all(); - foreach ($tickets as $ticket) { - $status = $statuses->where('slug', $ticket->first()->status)->first(); - if ($status) { - $this->ticketsByStatuses[$status->title] = $ticket->count(); - } - } - } + } diff --git a/app/Http/Livewire/Analytics/DatePicker.php b/app/Http/Livewire/Analytics/DatePicker.php new file mode 100644 index 0000000..3ec668e --- /dev/null +++ b/app/Http/Livewire/Analytics/DatePicker.php @@ -0,0 +1,63 @@ +startDate = Carbon::now()->startOfMonth()->format('Y-m-d'); + $this->endDate = Carbon::now()->endOfMonth()->format('Y-m-d'); + $this->loadChartData(); + } + + public function mount() + { + // Set default date range (e.g., the past 30 days) + // $this->startDate = Carbon::now()->subDays(30)->format('Y-m-d'); + $this->startDate = Carbon::now()->startOfMonth()->format('Y-m-d'); + $this->endDate = Carbon::now()->endOfMonth()->format('Y-m-d'); + $this->loadChartData(); + } + + public function render() + { + return view('livewire.analytics.date-picker'); + } + + public function loadChartData() + { + $tickets = Ticket::whereBetween('created_at', [$this->startDate, $this->endDate]) + ->selectRaw('DATE(created_at) as date, COUNT(*) as count') + ->groupBy('date') + ->orderBy('date', 'ASC') + ->get() + ->toArray(); + + // $this->chartData = [ + // 'labels' => $tickets->pluck('date')->toArray(), + // 'data' => $tickets->pluck('count')->toArray(), + // ]; + + $this->chartData = array_map(function ($ticket) { + return (array) $ticket; + }, $tickets); + + $this->emit('chartDataUpdated', $this->chartData); + } + + public function updated($propertyName) + { + // Re-load chart data when the date range is updated + if ($propertyName === 'startDate' || $propertyName === 'endDate') { + $this->loadChartData(); + } + } +} diff --git a/app/Http/Livewire/Analytics/NoAssignedTickets.php b/app/Http/Livewire/Analytics/NoAssignedTickets.php new file mode 100644 index 0000000..c54c4b2 --- /dev/null +++ b/app/Http/Livewire/Analytics/NoAssignedTickets.php @@ -0,0 +1,31 @@ +loadNotAssignedTickets(); + } + + public function render() + { + return view('livewire.analytics.no-assigned-tickets'); + } + + /** + * Load not assigned tickets + * + * @return void + */ + private function loadNotAssignedTickets(): void + { + $this->notAssignedTickets = Ticket::whereNull('responsible_id')->get(); + } +} diff --git a/app/Http/Livewire/Analytics/TicketAssignments.php b/app/Http/Livewire/Analytics/TicketAssignments.php new file mode 100644 index 0000000..775382b --- /dev/null +++ b/app/Http/Livewire/Analytics/TicketAssignments.php @@ -0,0 +1,68 @@ +startDateAssignment = Carbon::now()->startOfYear()->format('Y-m-d'); + $this->endDateAssignment = Carbon::now()->month(4)->endOfMonth()->format('Y-m-d'); + $this->loadTicketsAssignments(); + } + + public function updated($property) + { + if (in_array($property, ['startDateAssignment', 'endDateAssignment'])) { + $this->loadTicketsAssignments(); + } + } + + public function loadTicketsAssignments(): void + { + $query = Ticket::query(); + + if ($this->startDateAssignment && $this->endDateAssignment) { + $query->whereBetween('created_at', [$this->startDateAssignment, $this->endDateAssignment]); + } + + if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { + $query->where(function ($query) { + $query->where('owner_id', auth()->user()->id) + ->orWhere('responsible_id', auth()->user()->id); + }); + } + + + $tickets = $query->get()->groupBy('responsible_id')->sort(function ($a, $b) { + return ($a->first()->responsible_id ?? 0) > ($b->first()->responsibe_id ?? 0); + }); + + $this->ticketsAssignments = []; + + foreach ($tickets as $ticket) { + $this->ticketsAssignments[$ticket->first()->responsible?->name ?? __('Unassigned')] = $ticket->count(); + } + + + $this->labelAssignment = array_keys($this->ticketsAssignments); + $this->dataAssignment = array_values($this->ticketsAssignments); + + $this->emit('updateChart', $this->labelAssignment, $this->dataAssignment); + } + + public function render() + { + return view('livewire.analytics.ticket-assignments'); + } +} diff --git a/app/Http/Livewire/Analytics/TicketMyAssignedTickets.php b/app/Http/Livewire/Analytics/TicketMyAssignedTickets.php new file mode 100644 index 0000000..53cb233 --- /dev/null +++ b/app/Http/Livewire/Analytics/TicketMyAssignedTickets.php @@ -0,0 +1,43 @@ +loadNotAssignedTickets(); + $this->loadAssignedTickets(); + } + + public function render() + { + return view('livewire.analytics.ticket-my-assigned-tickets'); + } + + /** + * Load authenticated user assigned tickets + * + * @return void + */ + private function loadAssignedTickets(): void + { + $this->assignedTickets = Ticket::where('responsible_id', auth()->user()->id)->get(); + } + + /** + * Load not assigned tickets + * + * @return void + */ + private function loadNotAssignedTickets(): void + { + $this->notAssignedTickets = Ticket::whereNull('responsible_id')->get(); + } +} diff --git a/app/Http/Livewire/Analytics/TicketStatuses.php b/app/Http/Livewire/Analytics/TicketStatuses.php new file mode 100644 index 0000000..3544afd --- /dev/null +++ b/app/Http/Livewire/Analytics/TicketStatuses.php @@ -0,0 +1,71 @@ +selectedMonth = Carbon::now()->format('Y-m'); + $this->loadTicketsByStatuses(); + } + + public function render() + { + return view('livewire.analytics.ticket-statuses', [ + 'ticketsByStatuses' => $this->ticketsByStatuses, + 'statusColors' => $this->statusColors, + 'selectedMonth' => $this->selectedMonth, + ]); + } + + public function updatedSelectedMonth(): void + { + $this->loadTicketsByStatuses(); + } + + /** + * Load tickets by statuses + * + * @return void + */ + private function loadTicketsByStatuses(): void + { + $query = Ticket::query(); + if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { + $query->where(function ($query) { + $query->where('owner_id', auth()->user()->id) + ->orWhere('responsible_id', auth()->user()->id); + }); + } + + // Filter by the selected month + $query->whereYear('created_at', Carbon::parse($this->selectedMonth)->year) + ->whereMonth('created_at', Carbon::parse($this->selectedMonth)->month); + + $tickets = $query->get()->groupBy('status'); + $this->ticketsByStatuses = []; + $statuses = TicketStatus::all(); + + foreach ($statuses as $status) { + if($status->title != 'Open'){ + $this->ticketsByStatuses[$status->title] = $tickets->get($status->slug, collect())->count(); + $this->statusColors[$status->title] = $status->bg_color ?? 'rgba(0, 0, 0, 0.1)'; // Default color if not found + }else{ + $this->ticketsByStatuses[$status->title] = $query->count(); + $this->statusColors[$status->title] = $status->bg_color ?? 'rgba(0, 0, 0, 0.1)'; // Default color if not found + } + } + + } +} diff --git a/app/Http/Livewire/Analytics/TicketTrend.php b/app/Http/Livewire/Analytics/TicketTrend.php new file mode 100644 index 0000000..3b8919e --- /dev/null +++ b/app/Http/Livewire/Analytics/TicketTrend.php @@ -0,0 +1,138 @@ +startDate = Carbon::now()->day(1)->month($month)->format('Y-m-d'); + $this->endDate = Carbon::now()->day(1)->month($month)->endOfMonth()->format('Y-m-d'); + $this->fetchData(); + } + + public function mount() + { + // Set default dates + $this->startDate = Carbon::now()->startOfMonth()->format('Y-m-d'); + $this->endDate = Carbon::now()->endOfMonth()->format('Y-m-d'); + $this->fetchData(); + } + + public function updated($property) + { + if (in_array($property, ['startDate', 'endDate'])) { + $this->fetchData(); + } + } + + public function fetchData() + { + $tickets = Ticket::select('created_at', 'inprogress_at', 'closed_at') + ->whereBetween('created_at', [$this->startDate, $this->endDate]) + ->get(); + + $this->ticketCreationData = []; + $this->pendingTicketData = []; + $this->closedTicketData = []; + $this->labels = []; + + $startDate = Carbon::parse($this->startDate); + $endDate = Carbon::parse($this->endDate); + + for ($date = $startDate; $date->lte($endDate); $date->addDay()) { + $dateString = $date->format('Y-m-d'); + $this->labels[] = $dateString; + + $this->ticketCreationData[] = $tickets->filter(function($ticket) use ($dateString) { + return Carbon::parse($ticket->created_at)->format('Y-m-d') == $dateString; + })->count(); + + // $this->pendingTicketData[] = $tickets->filter(function($ticket) use ($dateString) { + // $createdDate = Carbon::parse($ticket->created_at); + // $closedDate = $ticket->closed_at ? Carbon::parse($ticket->closed_at) : null; + // return $createdDate->lte($dateString) && (!$closedDate || $closedDate->gt($dateString)); + // })->count(); + + //pendingTicketData is counted on the same day the ticket is created and reduces one day after the ticket is closed. + $this->pendingTicketData[] = $tickets->filter(function($ticket) use ($dateString) { + $createdDate = Carbon::parse($ticket->created_at)->format('Y-m-d'); + $closedDate = $ticket->closed_at ? Carbon::parse($ticket->closed_at)->addDay()->format('Y-m-d') : null; + return $createdDate <= $dateString && (!$closedDate || $dateString < $closedDate); + })->count(); + + $this->closedTicketData[] = $tickets->filter(function($ticket) use ($dateString) { + return $ticket->closed_at && Carbon::parse($ticket->closed_at)->format('Y-m-d') == $dateString; + })->count(); + + } + + // Ensure arrays are sorted by date + ksort($this->ticketCreationData); + ksort($this->pendingTicketData); + ksort($this->closedTicketData); + $this->ticketCreationData = array_values($this->ticketCreationData); + $this->pendingTicketData = array_values($this->pendingTicketData); + $this->closedTicketData = array_values($this->closedTicketData); + + // Calculate totals + $this->calculateTotals(); + } + + public function calculateTotals() + { + // Convert date strings to DateTime objects + $startDate = new \DateTime($this->startDate); + $endDate = new \DateTime($this->endDate); + + // Initialize totals + $totalCreated = 0; + $totalClosed = 0; + + // Iterate through data to calculate totals + foreach ($this->labels as $index => $label) { + $date = new \DateTime($label); + + // Check if the date is within the selected range + if ($date >= $startDate && $date <= $endDate) { + $totalCreated += $this->ticketCreationData[$index]; + $totalClosed += $this->closedTicketData[$index]; + } + } + + // Calculate pending tickets + $totalPending = $totalCreated - $totalClosed; + + // Pass totals to the view + $this->totalCreated = $totalCreated; + $this->totalClosed = $totalClosed; + $this->totalPending = $totalPending; + } + + public function render() + { + return view('livewire.analytics.ticket-trend', [ + 'ticketCreationData' => $this->ticketCreationData, + 'pendingTicketData' => $this->pendingTicketData, + 'closedTicketData' => $this->closedTicketData, + 'labels' => $this->labels, + 'totalCreated' => $this->totalCreated, + 'totalClosed' => $this->totalClosed, + 'totalPending' => $this->totalPending, + ]); + } +} diff --git a/app/Http/Livewire/Announcements.php b/app/Http/Livewire/Announcements.php new file mode 100644 index 0000000..2e01182 --- /dev/null +++ b/app/Http/Livewire/Announcements.php @@ -0,0 +1,110 @@ +check() && !auth()->user()->can('Manage notice banners')) { + // Filter for regular users to see only enabled notices + $query->where('status', true); + } + + return $query; + } + + /** + * Table definition + * + * @return array + */ + protected function getTableColumns(): array + { + return [ + TextColumn::make('content') + ->label(__('Content')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(Notice $record) => new HtmlString(' + + ' . $record->content . ' + + ')), + + TextColumn::make('created_at') + ->label(__('Created since')) + ->sortable() + ->searchable() + ->dateTime() + ->formatStateUsing(fn(Notice $record) => new HtmlString(' +
+ + ' . Carbon::parse($record->created_at)->diffForHumans() . ' +
+ ' . $record->created_at . ' +
+
+
+ ')), + ]; + } + + + /** + * Table default sort column definition + * + * @return string|null + */ + protected function getDefaultTableSortColumn(): ?string + { + return 'created_at'; + } + + /** + * Table default sort direction definition + * + * @return string|null + */ + protected function getDefaultTableSortDirection(): ?string + { + return 'desc'; + } + +} \ No newline at end of file diff --git a/app/Http/Livewire/Auth/Login.php b/app/Http/Livewire/Auth/Login.php index 13df67b..fa7470b 100644 --- a/app/Http/Livewire/Auth/Login.php +++ b/app/Http/Livewire/Auth/Login.php @@ -96,7 +96,25 @@ public function login(): void } session()->put('locale', auth()->user()->locale); - redirect()->to(route('home')); - + $role = Auth::user()->getRoleNames()->first(); + switch ($role) { + case 'administrator': + redirect()->to(route('analytics')); + break; + case 'Head of Department': + redirect()->to(route('tickets')); + break; + case 'technician': + redirect()->to(route('tickets')); + break; + case 'Human Resources': + redirect()->to(route('tickets')); + break; + case 'user': + redirect()->to(route('tickets')); + break; + case null: + redirect()->to(route('home')); + } } } diff --git a/app/Http/Livewire/Components/AnalyticSidebar.php b/app/Http/Livewire/Components/AnalyticSidebar.php new file mode 100644 index 0000000..ef45a14 --- /dev/null +++ b/app/Http/Livewire/Components/AnalyticSidebar.php @@ -0,0 +1,13 @@ +withCount('comments'); - if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { - $query->where(function ($query) { - $query->where('owner_id', auth()->user()->id) - ->orWhere('responsible_id', auth()->user()->id) - ->orWhereHas('project', function ($query) { - $query->whereHas('company', function ($query) { - $query->whereIn('companies.id', auth()->user()->ownCompanies->pluck('id')->toArray()); - }); - }); - }); - } + return $query->get() ->map(function (Ticket $ticket) { $priority = TicketPriority::where('slug', $ticket->priority)->withTrashed()->first(); diff --git a/app/Http/Livewire/MyProfile.php b/app/Http/Livewire/MyProfile.php index 4444928..d324045 100644 --- a/app/Http/Livewire/MyProfile.php +++ b/app/Http/Livewire/MyProfile.php @@ -63,60 +63,60 @@ private function initProfile(): void protected function getFormSchema(): array { return [ - TextInput::make('name') - ->label(__('Full name')) - ->maxLength(255) - ->required(), + // TextInput::make('name') + // ->label(__('Full name')) + // ->maxLength(255) + // ->required(), - TextInput::make('email') - ->label(__('Email address')) - ->email() - ->unique(table: User::class, column: 'email', ignorable: fn() => $this->user->id ? $this->user : null) - ->required(), + // TextInput::make('email') + // ->label(__('Email address')) + // ->email() + // ->unique(table: User::class, column: 'email', ignorable: fn() => $this->user->id ? $this->user : null) + // ->required(), - Password::make('current_password') - ->label(__('Current password')) - ->required(), + // Password::make('current_password') + // ->label(__('Current password')) + // ->required(), - Grid::make() - ->schema([ - Password::make('new_password') - ->label(__('New password')) - ->rule('confirmed'), + // Grid::make() + // ->schema([ + // Password::make('new_password') + // ->label(__('New password')) + // ->rule('confirmed'), - Password::make('new_password_confirmation') - ->label(__('Password confirmation')) - ->dehydrated(false), - ]), + // Password::make('new_password_confirmation') + // ->label(__('Password confirmation')) + // ->dehydrated(false), + // ]), - Grid::make(1) - ->schema([ - Radio::make('locale') - ->label(__('Default language')) - ->options(locales()) - ->required() - ]), + // Grid::make(1) + // ->schema([ + // Radio::make('locale') + // ->label(__('Default language')) + // ->options(locales()) + // ->required() + // ]), ]; } public function save(): void { - $data = $this->form->getState(); - if (Hash::check($data['current_password'], $this->user->password)) { - $this->user->name = $data['name']; - $this->user->email = $data['email']; - $this->user->locale = $data['locale']; - if ($data['new_password']) { - $this->user->password = bcrypt($data['new_password']); - } - $this->user->save(); - session()->put('locale', $this->user->locale); - session()->flash('profile_updated', true); - redirect()->to(route('my-profile')); - } else { - throw ValidationException::withMessages([ - 'current_password' => __('The password entered is incorrect.') - ]); - } + // $data = $this->form->getState(); + // if (Hash::check($data['current_password'], $this->user->password)) { + // $this->user->name = $data['name']; + // $this->user->email = $data['email']; + // $this->user->locale = $data['locale']; + // if ($data['new_password']) { + // $this->user->password = bcrypt($data['new_password']); + // } + // $this->user->save(); + // session()->put('locale', $this->user->locale); + // session()->flash('profile_updated', true); + // redirect()->to(route('my-profile')); + // } else { + // throw ValidationException::withMessages([ + // 'current_password' => __('The password entered is incorrect.') + // ]); + // } } } diff --git a/app/Http/Livewire/NoticeBanners.php b/app/Http/Livewire/NoticeBanners.php new file mode 100644 index 0000000..0c774d8 --- /dev/null +++ b/app/Http/Livewire/NoticeBanners.php @@ -0,0 +1,184 @@ +label(__('Content')) + ->searchable() + ->sortable() + ->formatStateUsing(fn(Notice $record) => new HtmlString(' + + ' . $record->content . ' + + ')), + + TextColumn::make('created_at') + ->label(__('Created since')) + ->sortable() + ->searchable() + ->dateTime() + ->formatStateUsing(fn(Notice $record) => new HtmlString(' +
+ + ' . Carbon::parse($record->created_at)->diffForHumans() . ' +
+ ' . $record->created_at . ' +
+
+
+ ')), + // ToggleColumn::make('status') + // ->label('Active'), + + IconColumn::make('status') + ->boolean() + ->toggle(), + ]; + } + + /** + * Table actions definition + * + * @return array + */ + protected function getTableActions(): array + { + if(auth()->user()->can('Manage notice banners')) + return [ + Action::make('edit') + ->icon('heroicon-o-pencil') + ->link() + ->label(__('Edit type')) + ->action(fn(Notice $record) => $this->updateNotice($record->id)) + ]; + else return []; + } + + /** + * Table default sort column definition + * + * @return string|null + */ + protected function getDefaultTableSortColumn(): ?string + { + return 'created_at'; + } + + /** + * Table default sort direction definition + * + * @return string|null + */ + protected function getDefaultTableSortDirection(): ?string + { + return 'desc'; + } + + /** + * Show update notice dialog + * + * @param $id + * @return void + */ + public function updateNotice($id) + { + $this->selectedNotice = Notice::find($id); + $this->dispatchBrowserEvent('toggleNoticeModal'); + } + + /** + * Show create notice dialog + * + * @return void + */ + public function createNotice() + { + $this->selectedNotice = new Notice(); + $this->dispatchBrowserEvent('toggleNoticeModal'); + } + + /** + * Cancel and close notice create / update dialog + * + * @return void + */ + public function cancelNotice() + { + $this->selectedNotice = null; + $this->dispatchBrowserEvent('toggleNoticeModal'); + } + + /** + * Event launched after a notice is created / updated + * + * @return void + */ + public function noticeSaved() + { + $this->cancelNotice(); + } + + /** + * Event launched after a notice is deleted + * + * @return void + */ + public function noticeDeleted() + { + $this->noticeSaved(); + } +} diff --git a/app/Http/Livewire/NoticeBannersDialog.php b/app/Http/Livewire/NoticeBannersDialog.php new file mode 100644 index 0000000..f787dd8 --- /dev/null +++ b/app/Http/Livewire/NoticeBannersDialog.php @@ -0,0 +1,187 @@ +form->fill([ + 'title' => $this->notice->title, + 'content' => $this->notice->content, + 'category' => $this->notice->category, + 'status' => $this->notice->status, + ]); + } + + public function render() + { + return view('livewire.notice-banners-dialog'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + if (!$this->notice?->id) { + return [ + TextInput::make('title') + ->label(__('Title')) + ->maxLength(255) + ->unique( + table: Notice::class, + column: 'title', + ignorable: fn() => $this->notice, + callback: function (Unique $rule) { + return $rule->withoutTrashed(); + } + ) + ->required(), + TextInput::make('content') + ->label(__('Content')) + ->maxLength(255) + ->required(), + TextInput::make('category') + ->label(__('Category')) + ->maxLength(255) + ->required(), + ]; + } else { + return [ + TextInput::make('title') + ->label(__('Title')) + ->maxLength(255) + ->unique( + table: Notice::class, + column: 'title', + ignorable: fn() => $this->notice, + callback: function (Unique $rule) { + return $rule->withoutTrashed(); + } + ) + ->required(), + TextInput::make('content') + ->label(__('Content')) + ->maxLength(255) + ->required(), + TextInput::make('category') + ->label(__('Category')) + ->maxLength(255) + ->required(), + TextInput::make('status') + ->label(__('Status')) + ->maxLength(255) + ->required(), + ]; + } + } + + /** + * Create / Update the notice + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + if (!$this->notice?->id) { + $notice = Notice::create([ + 'title' => $data['title'], + 'content' => $data['content'], + 'category' => $data['category'], + 'status' => true, + 'slug' => Str::slug($data['title'], '_') + ]); + Notification::make() + ->success() + ->title(__('Notice created')) + ->body(__('The notice has been created')) + ->send(); + // if ($notice->status) { + // Notice::where('id', '<>', $notice->id)->update(['status' => false]); + // } + } else { + $this->notice->title = $data['title']; + $this->notice->content = $data['content']; + $this->notice->category = $data['category']; + $this->notice->status = $data['status']; + $this->notice->save(); + Notification::make() + ->success() + ->title(__('Notice updated')) + ->body(__('The notice\'s details has been updated')) + ->send(); + //Notice::where('id', '<>', $this->notice->id)->update(['status' => false]); + } + if (Notice::where('status', true)->count() === 0) { + $first = Notice::first(); + $first->status = true; + $first->save(); + } + $this->emit('noticeSaved'); + } + + /** + * Delete an existing notice + * + * @return void + */ + public function doDeleteNotice(): void + { + $this->notice->delete(); + $this->deleteConfirmationOpened = false; + $this->emit('notice'); + Notification::make() + ->success() + ->title(__('Notice deleted')) + ->body(__('The notice has been deleted')) + ->send(); + } + + /** + * Cancel the deletion of a notice + * + * @return void + */ + public function cancelDeleteNotice(): void + { + $this->deleteConfirmationOpened = false; + } + + /** + * Show the delete notice confirmation dialog + * + * @return void + * @throws \Exception + */ + public function deleteNotice(): void + { + $this->deleteConfirmation( + __('Notice deletion'), + __('Are you sure you want to delete this notice?'), + 'doDeleteNotice', + 'cancelDeleteNotice' + ); + } +} diff --git a/app/Http/Livewire/Projects.php b/app/Http/Livewire/Projects.php deleted file mode 100644 index caca99a..0000000 --- a/app/Http/Livewire/Projects.php +++ /dev/null @@ -1,268 +0,0 @@ -withCount('tickets'); - if (auth()->user()->can('View own projects') && !auth()->user()->can('View all projects')) { - $query->where(function ($query) { - $query->where('owner_id', auth()->user()->id) - ->orWhereHas('tickets', function ($query) { - $query->where('responsible_id', auth()->user()->id); - }); - }); - } - return $query; - } - - /** - * Table definition - * - * @return array - */ - protected function getTableColumns(): array - { - return [ - TextColumn::make('make_favorite') - ->label('') - ->formatStateUsing(function (Project $record) { - $btnClass = $record->favoriteUsers() - ->where('user_id', auth()->user()->id) - ->count() ? 'text-warning-500' : 'text-gray-500'; - $iconClass = $record->favoriteUsers() - ->where('user_id', auth()->user()->id) - ->count() ? 'fa-star' : 'fa-star-o'; - return new HtmlString(' - - '); - }), - - TextColumn::make('name') - ->label(__('Project name')) - ->searchable() - ->sortable(), - - TextColumn::make('description') - ->label(__('Description')) - ->searchable() - ->sortable() - ->formatStateUsing( - fn(string|null $state) => Str::limit(htmlspecialchars(strip_tags($state ?? '')), 50) - ), - - UserColumn::make('owner') - ->label(__('Owner')), - - TextColumn::make('company.name') - ->label(__('Company')) - ->sortable() - ->searchable(), - - TextColumn::make('tickets_count') - ->label(__('Tickets')) - ->sortable(), - - TextColumn::make('created_at') - ->label(__('Created at')) - ->sortable() - ->searchable() - ->dateTime(), - ]; - } - - /** - * Table actions definition - * - * @return array - * @throws Exception - */ - protected function getTableActions(): array - { - return [ - Action::make('edit') - ->icon('heroicon-o-pencil') - ->link() - ->label(__('Edit project')) - ->action(fn(Project $record) => $this->updateProject($record->id)) - ]; - } - - /** - * Table header actions definition - * - * @return array - */ - protected function getTableHeaderActions(): array - { - return [ - ExportAction::make() - ->label(__('Export')) - ->color('success') - ->icon('heroicon-o-document-download') - ->exports([ - ExcelExport::make() - ->askForWriterType() - ->withFilename('projects-export') - ->withColumns([ - Column::make('name') - ->heading(__('Project name')), - Column::make('owner.name') - ->heading(__('Owner')), - Column::make('company.name') - ->heading(__('Company')), - Column::make('created_at') - ->heading(__('Created at')) - ->formatStateUsing(fn (Carbon $state) => $state->format(__('Y-m-d g:i A'))), - ]) - ]) - ]; - } - - /** - * Table default sort column definition - * - * @return string|null - */ - protected function getDefaultTableSortColumn(): ?string - { - return 'created_at'; - } - - /** - * Table default sort direction definition - * - * @return string|null - */ - protected function getDefaultTableSortDirection(): ?string - { - return 'desc'; - } - - /** - * Show update project dialog - * - * @param $id - * @return void - */ - public function updateProject($id) - { - $this->selectedProject = Project::find($id); - $this->dispatchBrowserEvent('toggleProjectModal'); - } - - /** - * Show create project dialog - * - * @return void - */ - public function createProject() - { - $this->selectedProject = new Project(); - $this->dispatchBrowserEvent('toggleProjectModal'); - } - - /** - * Cancel and close project create / update dialog - * - * @return void - */ - public function cancelProject() - { - $this->selectedProject = null; - $this->dispatchBrowserEvent('toggleProjectModal'); - } - - /** - * Event launched after a project is created / updated - * - * @return void - */ - public function projectSaved() - { - $this->cancelProject(); - } - - /** - * Event launched after a project is deleted - * - * @return void - */ - public function projectDeleted() - { - $this->projectSaved(); - } - - /** - * Add / Remove project from authenticated user favorite projects - * - * @param int $projectId - * @return void - */ - public function toggleFavoriteProject(int $projectId) - { - $project = Project::find($projectId); - if (FavoriteProject::where('user_id', auth()->user()->id)->where('project_id', $project->id)->count()) { - FavoriteProject::where('user_id', auth()->user()->id)->where('project_id', $project->id)->delete(); - Notification::make() - ->success() - ->title(__('Favorite removed')) - ->body(__('The project has been successfully remove from your favorite projects')) - ->send(); - } else { - FavoriteProject::create([ - 'user_id' => auth()->user()->id, - 'project_id' => $project->id - ]); - Notification::make() - ->success() - ->title(__('Favorite added')) - ->body(__('The project has been successfully added to your favorite projects')) - ->send(); - } - } -} diff --git a/app/Http/Livewire/ProjectsDialog.php b/app/Http/Livewire/ProjectsDialog.php deleted file mode 100644 index e6fbec5..0000000 --- a/app/Http/Livewire/ProjectsDialog.php +++ /dev/null @@ -1,192 +0,0 @@ -form->fill([ - 'name' => $this->project->name, - 'ticket_prefix' => $this->project->ticket_prefix, - 'description' => $this->project->description, - 'owner_id' => $this->project->owner_id ?? auth()->user()->id, - 'company_id' => $this->project->company_id - ]); - } - - public function render() - { - return view('livewire.projects-dialog'); - } - - /** - * Form schema definition - * - * @return array - */ - protected function getFormSchema(): array - { - return [ - Grid::make() - ->schema([ - Select::make('owner_id') - ->label(__('Owner')) - ->required() - ->searchable() - ->reactive() - ->options(function () { - $query = User::query(); - if (auth()->user()->can('View company users') && !auth()->user()->can('View all users')) { - $query->whereHas( - 'companies', - fn($query) => $query->whereIn( - 'companies.id', - auth()->user()->ownCompanies->pluck('id')->toArray() - ) - )->orWhere('id', auth()->user()->id); - } - return $query->get()->pluck('name', 'id')->toArray(); - }), - - Select::make('company_id') - ->label(__('Company')) - ->searchable() - ->options(function (Closure $get) { - $query = Company::query(); - if ($get('owner_id')) { - $query->where('responsible_id', $get('owner_id')); - } elseif (auth()->user()->can('View own companies')) { - $query->where('responsible_id', auth()->user()->id); - } - return $query->get()->pluck('name', 'id')->toArray(); - }), - ]), - - Grid::make(3) - ->schema([ - TextInput::make('ticket_prefix') - ->label(__('Ticket prefix')) - ->minLength(4) - ->maxLength(4) - ->columnSpan(1) - ->helperText(__('Used to generate tickets numbers')) - ->required(), - - TextInput::make('name') - ->label(__('Full name')) - ->maxLength(255) - ->columnSpan(2) - ->required(), - ]), - - RichEditor::make('description') - ->label(__('Description')) - ->fileAttachmentsDisk(config('filesystems.default')) - ->fileAttachmentsDirectory('projects') - ->fileAttachmentsVisibility('private'), - ]; - } - - /** - * Create / Update the project - * - * @return void - */ - public function save(): void - { - $data = $this->form->getState(); - if (!$this->project?->id) { - Project::create([ - 'name' => $data['name'], - 'description' => $data['description'], - 'owner_id' => $data['owner_id'], - 'ticket_prefix' => $data['ticket_prefix'], - 'company_id' => $data['company_id'], - ]); - Notification::make() - ->success() - ->title(__('Project created')) - ->body(__('The project has been successfully created')) - ->send(); - } else { - $this->project->name = $data['name']; - $this->project->description = $data['description']; - $this->project->owner_id = $data['owner_id']; - $this->project->company_id = $data['company_id']; - $this->project->ticket_prefix = $data['ticket_prefix']; - $this->project->save(); - Notification::make() - ->success() - ->title(__('Project updated')) - ->body(__('The project\'s details has been updated')) - ->send(); - } - $this->emit('projectSaved'); - } - - /** - * Delete an existing project - * - * @return void - */ - public function doDeleteProject(): void - { - $this->project->delete(); - $this->deleteConfirmationOpened = false; - $this->emit('projectDeleted'); - Notification::make() - ->success() - ->title(__('Project deleted')) - ->body(__('The project has been deleted')) - ->send(); - } - - /** - * Cancel the deletion of a project - * - * @return void - */ - public function cancelDeleteProject(): void - { - $this->deleteConfirmationOpened = false; - } - - /** - * Show the delete project confirmation dialog - * - * @return void - * @throws \Exception - */ - public function deleteProject(): void - { - $this->deleteConfirmation( - __('Project deletion'), - __('Are you sure you want to delete this project?'), - 'doDeleteProject', - 'cancelDeleteProject' - ); - } -} diff --git a/app/Http/Livewire/ScrollingBanner.php b/app/Http/Livewire/ScrollingBanner.php new file mode 100644 index 0000000..ae4afda --- /dev/null +++ b/app/Http/Livewire/ScrollingBanner.php @@ -0,0 +1,35 @@ +count++; + // } + + public function render() + { + return view('livewire.scrolling-banner', [ + 'notices' => Notice::all(), + ]); + } + + /*Example of render + public function render() + { + return view(‘livewire.mystore’, [ + ‘part’ => Mypart::where(‘status’, ‘done’)->get(), + ‘orders’ => Order::where(‘delivered’, false)->get(), + ‘products’ => SoldProducts::latest()->take(50)->get() + ]); + } +*/ + +} diff --git a/app/Http/Livewire/TicketDetails.php b/app/Http/Livewire/TicketDetails.php index 7b2c83a..ae7606a 100644 --- a/app/Http/Livewire/TicketDetails.php +++ b/app/Http/Livewire/TicketDetails.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire; +use App\Jobs\TicketUpdatedJob; use App\Models\Ticket; use Filament\Notifications\Notification; use Livewire\Component; @@ -70,4 +71,88 @@ public function copyTicketUrl(int $ticketId): void ]) ]); } + + /** + * Close ticket + * + * @return void + */ + public function closeTicket(): void + { + $before = $this->ticket->status ?? '-'; + $this->ticket->status = 'closed'; + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Status updated')) + ->body(__('The ticket has been successfully closed. Thank you for enquiring with us!')) + ->send(); + + $this->ticket = $this->ticket->refresh(); + $this->emit('ticketSaved'); + $this->emit('refreshStatusForm'); // Emit event to refresh status form + TicketUpdatedJob::dispatch( + $this->ticket, + __('Status'), + $before, + ($this->ticket->status ?? '-'), + auth()->user() + ); + } + + /** + * Approves ticket + * + * @return void + */ + public function approveTicket(): void + { + $before = $this->ticket->status ?? '-'; + $this->ticket->status = 'approved'; + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Status updated')) + ->body(__('The ticket has been successfully approved.')) + ->send(); + + $this->ticket = $this->ticket->refresh(); + $this->emit('ticketSaved'); + $this->emit('refreshStatusForm'); // Emit event to refresh status form + TicketUpdatedJob::dispatch( + $this->ticket, + __('Status'), + $before, + ($this->ticket->status ?? '-'), + auth()->user() + ); + } + + /** + * Disapproves ticket + * + * @return void + */ + public function disapproveTicket(): void + { + $before = $this->ticket->status ?? '-'; + $this->ticket->status = 'closed'; + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Status updated')) + ->body(__('The ticket has been successfully disapproved.')) + ->send(); + + $this->ticket = $this->ticket->refresh(); + $this->emit('ticketSaved'); + $this->emit('refreshStatusForm'); // Emit event to refresh status form + TicketUpdatedJob::dispatch( + $this->ticket, + __('Status'), + $before, + ($this->ticket->status ?? '-'), + auth()->user() + ); + } } diff --git a/app/Http/Livewire/TicketDetails/Category.php b/app/Http/Livewire/TicketDetails/Category.php new file mode 100644 index 0000000..cf18c37 --- /dev/null +++ b/app/Http/Livewire/TicketDetails/Category.php @@ -0,0 +1,111 @@ +form->fill([ + 'category' => $this->ticket->category + ]); + + } + + public function refreshForm(): void + { + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'category' => $this->ticket->category + ]); + $this->updating = false; + } + + public function render() + { + return view('livewire.ticket-details.category'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + Select::make('category') + ->label(__('Category')) + ->required() + ->searchable() + ->disableLabel() + ->placeholder(__('Category')) + ->options(function($state){ + $categories = categories_list(); + return $categories; + }) + ]; + } + + /** + * Enable updating + * + * @return void + */ + public function update(): void + { + $this->updating = true; + } + + /** + * Save main function + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + $before = $this->ticket->category ?? '-'; + $this->ticket->category = $data['category']; + $this->ticket->subcategory = 'Select new subcategory'; + $this->ticket->issue = 'Select new issue'; + $this->ticket->type = 'Select new type'; + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Category updated')) + ->body(__('The ticket category has been successfully updated')) + ->send(); + $this->form->fill([ + 'category' => $this->ticket->category + ]); + $this->updating = false; + $this->ticket = $this->ticket->refresh(); + $this->emit('ticketSaved'); + $this->emit('refreshForm'); // Emit event to refresh ticket details form + + TicketUpdatedJob::dispatch( + $this->ticket, + __('Category'), + $before, + ($this->ticket->category ?? '-'), + auth()->user() + ); + } +} diff --git a/app/Http/Livewire/TicketDetails/Issue.php b/app/Http/Livewire/TicketDetails/Issue.php new file mode 100644 index 0000000..1250e6b --- /dev/null +++ b/app/Http/Livewire/TicketDetails/Issue.php @@ -0,0 +1,114 @@ +form->fill([ + 'issue' => $this->ticket->issue + ]); + } + + public function refreshForm(): void + { + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'issue' => $this->ticket->issue + ]); + $this->updating = false; + } + + public function render() + { + return view('livewire.ticket-details.issue'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + Select::make('issue') + ->label(__('Issue')) + ->required() + ->searchable() + ->disableLabel() + ->placeholder(__('Issue')) + ->options(function ($get): array { + if($this->ticket->subcategory != "Select new subcategory" && $this->ticket->category != null) + $arrayIssues = TicketCategory::getIssues($this->ticket->subcategory); + elseif($this->ticket->subcategory == "Select new subcategory") + { + $arrayIssues = TicketCategory::getIssuesByCategory($this->ticket->category); + } + + return $arrayIssues; + }) + ]; + } + + /** + * Enable updating + * + * @return void + */ + public function update(): void + { + $this->updating = true; + } + + /** + * Save main function + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + $before = $this->ticket->issue ?? '-'; + $this->ticket->issue = $data['issue']; + $this->ticket->subcategory = TicketCategory::getChosenCategory($data['issue']); + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Issue updated')) + ->body(__('The ticket issue has been successfully updated')) + ->send(); + $this->form->fill([ + 'issue' => $this->ticket->issue + ]); + $this->updating = false; + $this->ticket = $this->ticket->refresh(); + $this->emit('ticketSaved'); + $this->emit('refreshForm'); // Emit event to refresh ticket details form + TicketUpdatedJob::dispatch( + $this->ticket, + __('Issue'), + $before, + ($this->ticket->issue ?? '-'), + auth()->user() + ); + } +} diff --git a/app/Http/Livewire/TicketDetails/Priority.php b/app/Http/Livewire/TicketDetails/Priority.php index 946dc3b..5ff9fbe 100644 --- a/app/Http/Livewire/TicketDetails/Priority.php +++ b/app/Http/Livewire/TicketDetails/Priority.php @@ -44,7 +44,11 @@ protected function getFormSchema(): array ->searchable() ->disableLabel() ->placeholder(__('Priority')) - ->options(priorities_list()), + ->options(function($state){ + $priorities = priorities_list(); + unset($priorities[$state]); + return $priorities; + }) ]; } @@ -66,7 +70,7 @@ public function update(): void public function save(): void { $data = $this->form->getState(); - $before = __(config('system.priorities.' . $this->ticket->priority . '.title')) ?? '-'; + $before = $this->ticket->priority ?? '-'; $this->ticket->priority = $data['priority']; $this->ticket->save(); Notification::make() @@ -83,7 +87,7 @@ public function save(): void $this->ticket, __('Priority'), $before, - __(config('system.priorities.' . $this->ticket->priority . '.title') ?? '-'), + ($this->ticket->priority ?? '-'), auth()->user() ); } diff --git a/app/Http/Livewire/TicketDetails/Responsible.php b/app/Http/Livewire/TicketDetails/Responsible.php index 2378ead..e9a25b3 100644 --- a/app/Http/Livewire/TicketDetails/Responsible.php +++ b/app/Http/Livewire/TicketDetails/Responsible.php @@ -43,7 +43,7 @@ protected function getFormSchema(): array ->label(__('Responsible')) ->disableLabel() ->placeholder(__('Responsible')) - ->options(User::all()->pluck('name', 'id')->toArray()) + ->options(User::role('technician')->pluck('name', 'id')->toArray()) ->required() ]; } @@ -68,6 +68,9 @@ public function save(): void $data = $this->form->getState(); $before = $this->ticket->responsible?->name ?? '-'; $this->ticket->responsible_id = $data['responsible_id']; + if($this->ticket->status == "open"){ + $this->ticket->status = "pending"; + } $this->ticket->save(); Notification::make() ->success() @@ -80,6 +83,7 @@ public function save(): void $this->updating = false; $this->ticket = $this->ticket->refresh(); $this->emit('ticketSaved'); + $this->emit('refreshStatusForm'); // Emit event to refresh status form TicketUpdatedJob::dispatch( $this->ticket, __('Responsible'), diff --git a/app/Http/Livewire/TicketDetails/Status.php b/app/Http/Livewire/TicketDetails/Status.php index 73571fa..efa0b4b 100644 --- a/app/Http/Livewire/TicketDetails/Status.php +++ b/app/Http/Livewire/TicketDetails/Status.php @@ -17,6 +17,8 @@ class Status extends Component implements HasForms public Ticket $ticket; public bool $updating = false; + protected $listeners = ['refreshStatusForm' => 'refreshForm']; + public function mount(): void { $this->form->fill([ @@ -24,6 +26,14 @@ public function mount(): void ]); } + public function refreshForm(): void + { + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'status' => $this->ticket->status + ]); + } + public function render() { return view('livewire.ticket-details.status'); @@ -43,7 +53,18 @@ protected function getFormSchema(): array ->placeholder(__('Status')) ->required() ->searchable() - ->options(statuses_list()), + ->options(function($state) { + $statuses = statuses_list(); + + if (auth()->user()->hasRole('technician')) { + $statuses = array_intersect_key($statuses, array_flip(['inprogress', 'resolved'])); + } elseif (auth()->user()->hasRole('user') ) { + $statuses = array_intersect_key($statuses, array_flip(['closed'])); + } + + unset($statuses[$state]); + return $statuses; + }), ]; } @@ -65,7 +86,7 @@ public function update(): void public function save(): void { $data = $this->form->getState(); - $before = __(config('system.statuses.' . $this->ticket->status . '.title')) ?? '-'; + $before = $this->ticket->status ?? '-'; $this->ticket->status = $data['status']; $this->ticket->save(); Notification::make() @@ -82,7 +103,7 @@ public function save(): void $this->ticket, __('Status'), $before, - __(config('system.statuses.' . $this->ticket->status . '.title') ?? '-'), + ($this->ticket->status ?? '-'), auth()->user() ); } diff --git a/app/Http/Livewire/TicketDetails/Subcategory.php b/app/Http/Livewire/TicketDetails/Subcategory.php new file mode 100644 index 0000000..0124876 --- /dev/null +++ b/app/Http/Livewire/TicketDetails/Subcategory.php @@ -0,0 +1,107 @@ +form->fill([ + 'subcategory' => $this->ticket->subcategory + ]); + + } + + public function refreshForm(): void + { + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'subcategory' => $this->ticket->subcategory + ]); + $this->updating = false; + } + + public function render() + { + return view('livewire.ticket-details.subcategory'); + } + + /** + * Form schema definition + * + * @return array + */ + protected function getFormSchema(): array + { + return [ + Select::make('subcategory') + ->label(__('Subcategory')) + ->required() + ->searchable() + ->disableLabel() + ->placeholder(__('Subcategory')) + ->options(fn ($get): array => TicketCategory::getSubCategories($this->ticket->category)) + ]; + } + + /** + * Enable updating + * + * @return void + */ + public function update(): void + { + $this->updating = true; + } + + /** + * Save main function + * + * @return void + */ + public function save(): void + { + $data = $this->form->getState(); + $before = $this->ticket->subcategory ?? '-'; + $this->ticket->subcategory = $data['subcategory']; + $this->ticket->issue = 'Select new issue'; + $this->ticket->type = 'Select new type'; + $this->ticket->save(); + Notification::make() + ->success() + ->title(__('Subcategory updated')) + ->body(__('The ticket subcategory has been successfully updated')) + ->send(); + $this->form->fill([ + 'subcategory' => $this->ticket->subcategory + ]); + $this->updating = false; + $this->emit('ticketSaved'); + $this->emit('refreshForm'); // Emit event to refresh ticket details form + TicketUpdatedJob::dispatch( + $this->ticket, + __('Subcategory'), + $before, + ($this->ticket->subcategory ?? '-'), + auth()->user() + ); + } +} diff --git a/app/Http/Livewire/TicketDetails/Type.php b/app/Http/Livewire/TicketDetails/Type.php index 9cdc85e..049509b 100644 --- a/app/Http/Livewire/TicketDetails/Type.php +++ b/app/Http/Livewire/TicketDetails/Type.php @@ -4,6 +4,8 @@ use App\Jobs\TicketUpdatedJob; use App\Models\Ticket; +use App\Models\TicketCategory; +use App\Models\TicketType; use Filament\Forms\Components\Select; use Filament\Forms\Concerns\InteractsWithForms; use Filament\Forms\Contracts\HasForms; @@ -17,6 +19,8 @@ class Type extends Component implements HasForms public Ticket $ticket; public bool $updating = false; + protected $listeners = ['refreshForm']; + public function mount(): void { $this->form->fill([ @@ -24,6 +28,25 @@ public function mount(): void ]); } + public function refreshForm(): void + { + $issue = $this->ticket->issue; + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'type' => $this->ticket->type + ]); + if($issue != "Select new issue"){ + $type = TicketCategory::where('slug',$issue)->pluck('type')->first(); + $this->ticket->type = $type; + $this->ticket->save(); + $this->ticket = $this->ticket->refresh(); + $this->form->fill([ + 'type' => $type + ]); + } + $this->updating = false; + } + public function render() { return view('livewire.ticket-details.type'); @@ -43,7 +66,10 @@ protected function getFormSchema(): array ->placeholder(__('Type')) ->required() ->searchable() - ->options(types_list()), + ->options(function($state){ + $types = types_list(); + return $types; + }), ]; } @@ -65,8 +91,8 @@ public function update(): void public function save(): void { $data = $this->form->getState(); - $before = __(config('system.types.' . $this->ticket->type . '.title')) ?? '-'; - $this->ticket->type = $data['type']; + $before = $this->ticket->type ?? '-'; + $this->ticket->type = $data['type']; //remove title / name $this->ticket->save(); Notification::make() ->success() @@ -82,7 +108,7 @@ public function save(): void $this->ticket, __('Type'), $before, - __(config('system.types.' . $this->ticket->type . '.title') ?? '-'), + ($this->ticket->type ?? '-'), auth()->user() ); } diff --git a/app/Http/Livewire/Tickets.php b/app/Http/Livewire/Tickets.php index 62b47ec..907d021 100644 --- a/app/Http/Livewire/Tickets.php +++ b/app/Http/Livewire/Tickets.php @@ -2,7 +2,6 @@ namespace App\Http\Livewire; -use App\Models\Project; use App\Models\Ticket; use App\Models\User; use Filament\Forms\Components\Grid; @@ -20,7 +19,6 @@ class Tickets extends Component implements HasForms public $menu; public $activeMenu; public $search; - public $projects; public $priorities; public $statuses; public $types; @@ -31,17 +29,32 @@ class Tickets extends Component implements HasForms public function mount() { - $this->menu = [ - 'All tickets', - 'Unassigned', - 'Assigned to me', - 'Created by me', - ]; + if(auth()->user()->hasRole('administrator')){ + $this->menu = [ + 'All tickets', + 'Unassigned', + 'Assigned to me', + 'Created by me', + ]; + }else if(auth()->user()->hasRole('Head of Department')){ + $this->menu = [ + 'Network Access Right Requests', + 'Created by me', + ]; + + }else if(auth()->user()->hasRole('technician')){ + $this->menu = [ + 'Assigned to me', + 'Created by me', + ]; + }else if(auth()->user()->hasRole('user') || auth()->user()->hasRole('Human Resources')){ + $this->menu = [ + 'Created by me', + ]; + } + $this->activeMenu = $this->menu[0]; $data = []; - if (request()->get('project')) { - $data['projects'] = [request()->get('project')]; - } $this->form->fill($data); } @@ -49,17 +62,7 @@ public function render() { $query = Ticket::query(); $query->withCount('comments'); - if (auth()->user()->can('View own tickets') && !auth()->user()->can('View all tickets')) { - $query->where(function ($query) { - $query->where('owner_id', auth()->user()->id) - ->orWhere('responsible_id', auth()->user()->id) - ->orWhereHas('project', function ($query) { - $query->whereHas('company', function ($query) { - $query->whereIn('companies.id', auth()->user()->ownCompanies->pluck('id')->toArray()); - }); - }); - }); - } + if ($this->activeMenu === 'Unassigned') { $query->whereNull('responsible_id'); } @@ -69,15 +72,15 @@ public function render() if ($this->activeMenu === 'Created by me') { $query->where('owner_id', auth()->user()->id); } + if ($this->activeMenu === 'Network Access Right Requests') { + $query->where('subcategory', 'networkaccessright'); + } if ($this->search) { $query->where(function ($query) { $query->where('title', 'like', '%' . $this->search . '%') ->orWhere('content', 'like', '%' . $this->search . '%'); }); } - if ($this->projects && sizeof($this->projects)) { - $query->whereIn('project_id', $this->projects); - } if ($this->priorities && sizeof($this->priorities)) { $query->whereIn('priority', $this->priorities); } @@ -87,9 +90,9 @@ public function render() if ($this->types && sizeof($this->types)) { $query->whereIn('type', $this->types); } - if ($this->statuses && sizeof($this->responsible)) { - $query->whereIn('responsible_id', $this->responsible); - } + // if ($this->statuses && sizeof($this->responsible)) { + // $query->whereIn('responsible_id', $this->responsible); + // } $tickets = $query->paginate(); return view('livewire.tickets', compact('tickets')); } @@ -114,27 +117,15 @@ public function selectMenu($item) protected function getFormSchema(): array { return [ + Grid::make(6) ->schema([ - MultiSelect::make('projects') - ->label(__('Project')) - ->disableLabel() - ->searchable() - ->placeholder(__('Project')) - ->options(function () { - $query = Project::query(); - if (auth()->user()->can('View own projects') && !auth()->user()->can('View all projects')) { - $query->where('owner_id', auth()->user()->id); - } - return $query->get()->pluck('name', 'id'); - }), - - MultiSelect::make('priorities') - ->label(__('Priorities')) - ->disableLabel() - ->searchable() - ->placeholder(__('Priorities')) - ->options(priorities_list()), + // MultiSelect::make('priorities') + // ->label(__('Priorities')) + // ->disableLabel() + // ->searchable() + // ->placeholder(__('Priorities')) + // ->options(priorities_list()), MultiSelect::make('statuses') ->label(__('Statuses')) @@ -143,19 +134,19 @@ protected function getFormSchema(): array ->placeholder(__('Statuses')) ->options(statuses_list()), - MultiSelect::make('types') - ->label(__('Types')) - ->disableLabel() - ->searchable() - ->placeholder(__('Types')) - ->options(types_list()), + // MultiSelect::make('types') + // ->label(__('Types')) + // ->disableLabel() + // ->searchable() + // ->placeholder(__('Types')) + // ->options(types_list()), - MultiSelect::make('responsible') - ->label(__('Responsible')) - ->disableLabel() - ->searchable() - ->placeholder(__('Responsible')) - ->options(User::all()->pluck('name', 'id')), + // MultiSelect::make('responsible') + // ->label(__('Responsible')) + // ->disableLabel() + // ->searchable() + // ->placeholder(__('Responsible')) + // ->options(User::all()->pluck('name', 'id')), TextInput::make('search') ->label(__('Search for tickets')) @@ -175,21 +166,19 @@ public function search(): void { $data = $this->form->getState(); $this->search = $data['search'] ?? null; - $this->projects = $data['projects'] ?? null; - $this->priorities = $data['priorities'] ?? null; + // $this->priorities = $data['priorities'] ?? null; $this->statuses = $data['statuses'] ?? null; - $this->types = $data['types'] ?? null; - $this->responsible = $data['responsible'] ?? null; + // $this->types = $data['types'] ?? null; + // $this->responsible = $data['responsible'] ?? null; } public function resetFilters(): void { $this->search = null; - $this->projects = null; - $this->priorities = null; + // $this->priorities = null; $this->statuses = null; - $this->types = null; - $this->responsible = null; + // $this->types = null; + // $this->responsible = null; } /** diff --git a/app/Http/Livewire/TicketsDialog.php b/app/Http/Livewire/TicketsDialog.php index b6e8ac0..d57817f 100644 --- a/app/Http/Livewire/TicketsDialog.php +++ b/app/Http/Livewire/TicketsDialog.php @@ -3,8 +3,10 @@ namespace App\Http\Livewire; use App\Jobs\TicketCreatedJob; -use App\Models\Project; use App\Models\Ticket; +use App\Models\TicketCategory; +use App\Models\TicketType; +use Filament\Forms\Components\Section; use Filament\Forms\Components\Grid; use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\Select; @@ -13,14 +15,20 @@ use Filament\Forms\Contracts\HasForms; use Filament\Notifications\Actions\Action; use Filament\Notifications\Notification; +use Filament\Forms\Set; use Illuminate\Support\Str; use Livewire\Component; +use Illuminate\Support\HtmlString; class TicketsDialog extends Component implements HasForms { use InteractsWithForms; public Ticket $ticket; + public $category; + public $content; + public $subcategory; + public $issueValue; public function mount(): void { @@ -28,7 +36,6 @@ public function mount(): void 'title' => $this->ticket->title, 'content' => $this->ticket->content, 'priority' => $this->ticket->priority, - 'project_id' => $this->ticket->project_id, ]); } @@ -37,6 +44,11 @@ public function render() return view('livewire.tickets-dialog'); } + public function setIssueValue($value) + { + $this->issueValue = $value; + } + /** * Form schema definition * @@ -46,34 +58,222 @@ protected function getFormSchema(): array { return [ - Select::make('project_id') - ->label(__('Project')) - ->required() - ->searchable() - ->options(function () { - $query = Project::query(); - if (auth()->user()->can('View own projects') && !auth()->user()->can('View all projects')) { - $query->where('owner_id', auth()->user()->id); - } - return $query->get()->pluck('name', 'id'); - }), - Grid::make() ->schema([ - - Select::make('type') - ->label(__('Type')) - ->required() - ->searchable() - ->options(types_list()), - Select::make('priority') ->label(__('Priority')) + ->visible(fn ($get) => auth()->user()->hasRole('administrator')) ->required() ->searchable() ->options(priorities_list()), + Select::make('category') + ->label(__('Category')) + ->required() + ->searchable() + ->options(categories_list('slug')) + ->reactive() // Ensures Livewire updates subcategory options when category changes + ->afterStateUpdated(function (callable $set, $get, $state) { //get gives slug + $set('subcategory', null); // Reset subcategory when category changes + $set('issue', null); // Reset issue when category changes + }), + Select::make('subcategory') + ->label(__('Subcategory')) + ->required() + ->searchable() + ->reactive() + ->options(function ($get): array { + // Get all subcategories for the selected category + $subcategories = TicketCategory::getSubCategories($get('category')); + // Filter subcategories based on the user's role + if (!auth()->user()->hasRole('Human Resources')) { + // Remove 'createaccount' and 'userlocation' for non-HR users + $subcategories = array_filter($subcategories, function ($subcategory) { + return !in_array($subcategory, ['createaccount', 'userlocation']); + },ARRAY_FILTER_USE_KEY); + } + + return $subcategories; + }) + ->afterStateUpdated(function (callable $set, $get, $state) { //state gives slug + if($get('subcategory') != null){ + $set('category', TicketCategory::getChosenCategory($state)); + } + $set('issue', null); + if($state == ('networkaccessright' || 'createaccount' || 'userlocation')){ + $this->setIssueValue($state); + } + }), // Set category when categories changes + Select::make('issue') + ->label(__('Issue')) + ->required(function ($get): bool { + $subcategory = $get('subcategory'); + return !in_array($subcategory, ['networkaccessright', 'createaccount','userlocation']); + }) + ->hidden(function ($get): bool { + $subcategory = $get('subcategory'); + return in_array($subcategory, ['networkaccessright', 'createaccount','userlocation']); + }) + ->searchable() + ->reactive() + ->options(function ($get): array { + if($get('category') != null && $get('subcategory') == null) + $arrayIssues = TicketCategory::getIssuesByCategory($get('category')); + else + $arrayIssues = TicketCategory::getIssues($get('subcategory')); + + return $arrayIssues; + }) + ->afterStateUpdated(function (callable $set, $get, $state) { //state gives slug + if($get('issue') != null){ + $set('subcategory', TicketCategory::getChosenCategory($state)); + $set('category', TicketCategory::getChosenCategory($get('subcategory'))); + $this->setIssueValue(null); + } + }), ]), + Section::make('Network Access Right') + ->description(fn () => new HtmlString('Need approval from HOD department
Detail User:'), 'above') + ->schema([ + Grid::make() + ->schema([ + TextInput::make('department') + ->label(__('Department (With Floor):')) + ->required(fn ($get) => $get('subcategory') === 'networkaccessright') + ->maxLength(255) + ->required(), + + TextInput::make('requestforaccess') + ->label(__('Reason? (Social Media, Streaming Services & etc):')) + ->required(fn ($get) => $get('subcategory') === 'networkaccessright') + ->maxLength(255) + ->required(), + ]), + ]) + ->collapsible() + ->visible((fn ($get) => $get('subcategory') === 'networkaccessright')), + + Section::make('Create New Account & Computer Installation') + ->schema([ + Grid::make() + ->schema([ + TextInput::make('name') + ->label(__('Name:')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + + TextInput::make('staffid') + ->label(__('Staff ID:')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + + TextInput::make('mykad') + ->label(__('MyKad:')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + + TextInput::make('position') + ->label(__('Position / Gred:')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + + TextInput::make('department') + ->label(__('Department:')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + + TextInput::make('pcinstallationlocation') + ->label(__('PC Installation Location (With Department & Floor):')) + ->required(fn ($get) => $get('subcategory') === 'createaccount') + ->maxLength(255) + ->required(), + ]), + ]) + ->collapsible() + ->visible((fn ($get) => $get('subcategory') === 'createaccount')), + + + Section::make('Previous User & Location Details') + ->schema([ + Grid::make() + ->schema([ + TextInput::make('previousname') + ->label(__('Name:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('previousstaffid') + ->label(__('Staff ID:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('previousmykad') + ->label(__('MyKad:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('previousposition') + ->label(__('Position / Gred:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('previousdepartment') + ->label(__('Department & Floor:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + ]), + ]) + ->collapsible() + ->visible((fn ($get) => $get('subcategory') === 'userlocation')), + Section::make('Current User Details') + ->schema([ + Grid::make() + ->schema([ + TextInput::make('currentstaffid') + ->label(__('Staff ID:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('currentposition') + ->label(__('Position / Gred:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + + TextInput::make('currentdepartment') + ->label(__('Department & Floor:')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + ]), + ]) + ->collapsible() + ->visible((fn ($get) => $get('subcategory') === 'userlocation')), + + Section::make('New Location Details (Computer Installation)') + ->schema([ + Grid::make() + ->schema([ + TextInput::make('installationlocation') + ->label(__('Installation Location (with Department & Floor):')) + ->required(fn ($get) => $get('subcategory') === 'userlocation') + ->maxLength(255) + ->required(), + ]), + ]) + ->collapsible() + ->visible((fn ($get) => $get('subcategory') === 'userlocation')), TextInput::make('title') ->label(__('Ticket title')) @@ -82,7 +282,6 @@ protected function getFormSchema(): array RichEditor::make('content') ->label(__('Content')) - ->required() ->fileAttachmentsDisk(config('filesystems.default')) ->fileAttachmentsDirectory('tickets') ->fileAttachmentsVisibility('private'), @@ -97,15 +296,67 @@ protected function getFormSchema(): array public function save(): void { $data = $this->form->getState(); + $content = ""; + if($data['subcategory'] == 'networkaccessright'){ + $department = $data['department' ?? null]; + $requestforaccess = $data['requestforaccess' ?? null]; + $content = "Detail User
Department (With Floor): $department
Request for Access? (Social Media, Streaming Services & etc): $requestforaccess"; + } + if($data['subcategory'] == 'createaccount'){ + $name = $data['name'] ?? null; + $staffid = $data['staffid' ?? null]; + $mykad = $data['mykad' ?? null]; + $position = $data['position' ?? null]; + $department = $data['department' ?? null]; + $pcinstallationlocation = $data['pcinstallationlocation' ?? null]; + $content = "Name: $name
Staff ID: $staffid
MyKad: $mykad
Position / Gred: $position
Department: $department
PC Installation Location (With Department & Floor): $pcinstallationlocation"; + } + if($data['subcategory'] == 'userlocation'){ + $content .= "Previous User & Location Details
"; + $previousname = $data['previousname'] ?? null; + $previousstaffid = $data['previousstaffid' ?? null]; + $previousmykad = $data['previousmykad' ?? null]; + $previousposition = $data['previousposition' ?? null]; + $previousdepartment = $data['previousdepartment' ?? null]; + $content = "Name: $previousname
Staff ID: $previousstaffid
MyKad: $previousmykad
Position / Gred: $previousposition
Department & Floor: $previousdepartment
"; + + $content .= "Current User Details
"; + $currentstaffid = $data['currentstaffid'] ?? null; + $currentposition = $data['currentposition' ?? null]; + $currentdepartment = $data['currentdepartment' ?? null]; + $content = "Staff ID: $currentstaffid
Position / Gred: $currentposition
Department & Floor: $currentdepartment
"; + + $content .= "New Location Details (Computer Installation)
"; + $installationlocation = $data['installationlocation' ?? null]; + $content .= "Installation Location (with Department & Floor): $installationlocation"; + + } + $content .= $data['content']; + if($this->issueValue == null){ $ticket = Ticket::create([ - 'project_id' => $data['project_id'], 'title' => $data['title'], - 'content' => $data['content'], + 'content' => $content, 'owner_id' => auth()->user()->id, - 'priority' => $data['priority'], - 'type' => $data['type'], + 'priority' => $data['priority'] ?? null, + 'category' => $data['category'], + 'subcategory' => $data['subcategory'], + 'issue' => $data['issue'], + 'type' => TicketCategory::where('slug',$data['issue'] ?? $data['subcategory'])->pluck('type')->first(), 'status' => default_ticket_status() ]); + }else{ + $ticket = Ticket::create([ + 'title' => $data['title'], + 'content' => $content, + 'owner_id' => auth()->user()->id, + 'priority' => $data['priority'] ?? null, + 'category' => $data['category'], + 'subcategory' => $data['subcategory'], + 'issue' => $this->issueValue, + 'type' => TicketCategory::where('slug',$data['issue'] ?? $data['subcategory'])->pluck('type')->first(), + 'status' => default_ticket_status() + ]); + } Notification::make() ->success() ->title(__('Ticket created')) diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index a2813a0..f0ab0e7 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -20,10 +20,27 @@ class RedirectIfAuthenticated public function handle(Request $request, Closure $next, ...$guards) { $guards = empty($guards) ? [null] : $guards; - + foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { - return redirect(RouteServiceProvider::HOME); + $role = Auth::user()->role; + switch ($role) { + case 'administrator': + return redirect('/analytics'); + break; + case 'Head of Department': + return redirect('/tickets'); + break; + case 'technician': + return redirect('/tickets'); + break; + case 'Human Resources': + return redirect('/tickets'); + break; + case 'user': + return redirect('/tickets'); + break; + } } } diff --git a/app/Jobs/CommentCreatedJob.php b/app/Jobs/CommentCreatedJob.php index 10d4704..7cc3274 100644 --- a/app/Jobs/CommentCreatedJob.php +++ b/app/Jobs/CommentCreatedJob.php @@ -2,6 +2,7 @@ namespace App\Jobs; +use Illuminate\Support\Facades\Auth; use App\Models\Comment; use App\Models\User; use App\Notifications\CommentCreateNotification; @@ -37,20 +38,31 @@ public function __construct(Comment $comment) public function handle() { $users = User::whereNull('register_token')->get(); - foreach ($users as $user) { - if ( - (auth()->user()->can('View all tickets') && $this->comment->owner_id !== $user->id) - || - ( - auth()->user()->can('View own tickets') - && ( - $this->comment->ticket->owner_id === $user->id - || $this->comment->ticket->responsible_id === $user->id - ) - && $this->comment->owner_id !== $user->id) - ) { - $user->notify(new CommentCreateNotification($this->comment, $user)); - } + foreach ($users as $u) { + if (( + auth()->user()->id !== $u->id //exclude notification to current user + ) + &&( + ( + auth()->user()->can('View all tickets') + && ($this->comment->ticket->owner_id === $u->id + || $this->comment->ticket->responsible_id === $u->id) + ) + || + ( + auth()->user()->can('View own tickets') + && ( + $this->comment->ticket->owner_id === $u->id + || $this->comment->ticket->responsible_id === $u->id + ) + && $this->comment->ticket->owner_id !== $u->id + ) + ) + ) { + $u->notify(new CommentCreateNotification($this->comment, $u)); } + } + + } } diff --git a/app/Jobs/TicketCreatedJob.php b/app/Jobs/TicketCreatedJob.php index 3c1525d..cca8105 100644 --- a/app/Jobs/TicketCreatedJob.php +++ b/app/Jobs/TicketCreatedJob.php @@ -2,6 +2,7 @@ namespace App\Jobs; +use Illuminate\Support\Facades\Auth; use App\Models\Ticket; use App\Models\User; use App\Notifications\TicketCreatedNotification; @@ -37,7 +38,7 @@ public function handle() { $users = User::whereNull('register_token')->get(); foreach ($users as $user) { - if (auth()->user()->can('View all tickets') && $this->ticket->owner_id !== $user->id) { + if ($user->can('View all tickets') && auth()->user()->hasRole('administrator') == 'administrator') { $user->notify(new TicketCreatedNotification($this->ticket, $user)); } } diff --git a/app/Jobs/TicketUpdatedJob.php b/app/Jobs/TicketUpdatedJob.php index e09aec1..c9bbada 100644 --- a/app/Jobs/TicketUpdatedJob.php +++ b/app/Jobs/TicketUpdatedJob.php @@ -51,24 +51,31 @@ public function __construct( */ public function handle() { + if ($this->before !== $this->after) { $users = User::whereNull('register_token')->where('id', '<>', $this->user->id)->get(); foreach ($users as $u) { - if ( - ( - auth()->user()->can('View all tickets') - && $this->ticket->owner_id !== $u->id + if(( + auth()->user()->id !== $u->id //exclude notification to current user + ) + &&( + ( + auth()->user()->can('View all tickets') + && ($this->ticket->owner_id === $u->id + || $this->ticket->responsible_id === $u->id) + ) + || + ( + auth()->user()->can('View own tickets') + && ( + $this->ticket->owner_id === $u->id + || $this->ticket->responsible_id === $u->id ) - || - ( - auth()->user()->can('View own tickets') - && ( - $this->ticket->owner_id === $u->id - || $this->ticket->responsible_id === $u->id - ) - && $this->ticket->owner_id !== $u->id - ) - ) { + && $this->ticket->owner_id !== $u->id + ) + ) + ) + { $u->notify( new TicketUpdatedNotification( $this->ticket, diff --git a/app/Models/Comment.php b/app/Models/Comment.php index c72ef31..1263740 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\SoftDeletes; +use Illuminate\Support\Str; class Comment extends Model implements HasLogsActivity { @@ -45,6 +46,7 @@ public function __toString(): string public function activityLogLink(): string { - return route('tickets.number', $this->ticket->ticket_number); + $ticket = Ticket::find($this->ticket_id); + return route('tickets.details', [$ticket->id,'slug' => Str::slug($ticket->title)]); } } diff --git a/app/Models/Company.php b/app/Models/Company.php deleted file mode 100644 index 87d93c9..0000000 --- a/app/Models/Company.php +++ /dev/null @@ -1,32 +0,0 @@ -belongsTo(User::class, 'responsible_id'); - } - - public function users(): BelongsToMany - { - return $this->belongsToMany(User::class, 'company_users', 'company_id', 'user_id'); - } -} diff --git a/app/Models/CompanyUser.php b/app/Models/CompanyUser.php deleted file mode 100644 index d828e3d..0000000 --- a/app/Models/CompanyUser.php +++ /dev/null @@ -1,27 +0,0 @@ -belongsTo(User::class); - } - - public function company(): BelongsTo - { - return $this->belongsTo(Company::class); - } -} diff --git a/app/Models/FavoriteProject.php b/app/Models/FavoriteProject.php deleted file mode 100644 index 3a28359..0000000 --- a/app/Models/FavoriteProject.php +++ /dev/null @@ -1,27 +0,0 @@ -belongsTo(User::class); - } - - public function project(): BelongsTo - { - return $this->belongsTo(Project::class); - } -} diff --git a/app/Models/Notice.php b/app/Models/Notice.php new file mode 100644 index 0000000..352a3a3 --- /dev/null +++ b/app/Models/Notice.php @@ -0,0 +1,27 @@ +title; + } + + +} \ No newline at end of file diff --git a/app/Models/Project.php b/app/Models/Project.php deleted file mode 100644 index ae089a2..0000000 --- a/app/Models/Project.php +++ /dev/null @@ -1,68 +0,0 @@ -orderBy('created_at', 'desc'); - }); - } - - public function owner(): BelongsTo - { - return $this->belongsTo(User::class, 'owner_id')->withTrashed(); - } - - public function company(): BelongsTo - { - return $this->belongsTo(Company::class); - } - - public function tickets(): HasMany - { - return $this->hasMany(Ticket::class); - } - - public function favoriteUsers(): BelongsToMany - { - $query = $this->belongsToMany(User::class, 'favorite_projects', 'project_id', 'user_id'); - if (auth()->user()->can('View own projects') && !auth()->user()->can('View all projects')) { - $query->where('user_id', auth()->user()->id); - } - return $query; - } - - public function __toString(): string - { - return $this->name; - } - - public function activityLogLink(): string - { - return route('home'); - } -} diff --git a/app/Models/Ticket.php b/app/Models/Ticket.php index 4d9e2ac..e93bf71 100644 --- a/app/Models/Ticket.php +++ b/app/Models/Ticket.php @@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\SoftDeletes; +use Illuminate\Support\Str; class Ticket extends Model implements HasLogsActivity { @@ -22,11 +23,15 @@ class Ticket extends Model implements HasLogsActivity 'content', 'status', 'priority', + 'category', + 'subcategory', + 'issue', 'type', 'owner_id', 'responsible_id', - 'project_id', 'number', + 'inprogress_at', + 'closed_at', ]; protected $appends = [ @@ -41,9 +46,7 @@ protected static function boot() }); static::creating(function (Ticket $ticket) { $ticket->number = str_pad( - Ticket::where('project_id', $ticket->project_id) - ->withTrashed() - ->count() + 1, + Ticket::count(), 4, '0', STR_PAD_LEFT @@ -61,11 +64,6 @@ public function responsible(): BelongsTo return $this->belongsTo(User::class, 'responsible_id')->withTrashed(); } - public function project(): BelongsTo - { - return $this->belongsTo(Project::class)->withTrashed(); - } - public function comments(): HasMany { return $this->hasMany(Comment::class); @@ -85,7 +83,8 @@ public function __toString(): string public function activityLogLink(): string { - return route('tickets.number', $this->ticket_number); + + return route('tickets.details', [$this->id,'slug' => Str::slug($this->title)]); } public function chat(): HasOne diff --git a/app/Models/TicketCategory.php b/app/Models/TicketCategory.php new file mode 100644 index 0000000..a051ac9 --- /dev/null +++ b/app/Models/TicketCategory.php @@ -0,0 +1,102 @@ +belongsTo(Category::class, 'parent_id'); + } + + public function children() + { + return $this->hasMany(Category::class, 'parent_id'); + } + + public function subCategories(): HasMany + { + return $this->hasMany(Category::class, 'parent_id') + ->where('level', 'subcategory') + ->select('parent_id', 'title'); + } + + public function issues(): HasMany + { + return $this->hasMany(Category::class, 'parent_id') + ->where('level', 'issue') + ->select('parent_id', 'title'); + } + + + public static function getSubCategories($slug) + { + if ($slug){ + $category_id = self::where('slug', $slug)->pluck('id')->first(); + return self::where('parent_id', $category_id)->pluck('title', 'slug')->toArray(); + } + return subcategories_list(); + } + + public static function getIssues($slug) + { + if ($slug){ + $subcategory_id = self::where('slug', $slug)->pluck('id')->first(); + return self::where('parent_id', $subcategory_id)->pluck('title', 'slug')->toArray(); + } + return issues_list(); + } + + public static function getIssuesByCategory($slug) + { + if ($slug){ + $category_id = self::where('slug', $slug)->pluck('id')->first(); + $subcategory_ids = self::where('parent_id', $category_id)->pluck('id')->toArray(); + + $issues = []; + + foreach ($subcategory_ids as $subcategory_id) { + $issues = array_merge($issues, self::where('parent_id', $subcategory_id)->pluck('title', 'slug')->toArray()); + } + + return $issues; + } + + return self::issues_list(); + } + + public static function getChosenCategory($slug) + { + if ($slug){ + $parent_id = self::where('slug', $slug)->pluck('parent_id')->first(); + return self::where('id', $parent_id)->pluck('slug')->first(); + } + } + + public static function getCategoriesByParentId($id) + { + if ($id){ + return self::where('id', $id)->pluck('id')->first(); + } + } +} diff --git a/app/Models/User.php b/app/Models/User.php index e0d72a6..50b6871 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -61,11 +61,6 @@ protected static function boot() }); } - public function projects(): HasMany - { - return $this->hasMany(Project::class, 'owner_id'); - } - public function tickets(): HasMany { return $this->hasMany(Ticket::class, 'owner_id'); @@ -76,14 +71,6 @@ public function assignedTickets(): HasMany return $this->hasMany(Ticket::class, 'responsible_id'); } - public function favoriteProjects(): BelongsToMany - { - $query = $this->belongsToMany(Project::class, 'favorite_projects', 'user_id', 'project_id'); - if (auth()->user()->can('View own projects') && !auth()->user()->can('View all projects')) { - $query->where('user_id', auth()->user()->id); - } - return $query; - } public function comments(): HasMany { @@ -107,13 +94,4 @@ public function isAccountActivated(): Attribute ); } - public function ownCompanies(): HasMany - { - return $this->hasMany(Company::class, 'responsible_id'); - } - - public function companies(): BelongsToMany - { - return $this->belongsToMany(Company::class, 'company_users', 'user_id', 'company_id'); - } } diff --git a/app/Notifications/SummaryNotification.php b/app/Notifications/SummaryNotification.php new file mode 100644 index 0000000..0a005cc --- /dev/null +++ b/app/Notifications/SummaryNotification.php @@ -0,0 +1,63 @@ +summary = $summary; + } + + /** + * Get the notification's delivery channels. + * + * @param mixed $notifiable + * @return array + */ + public function via($notifiable) + { + return ['mail','database']; + } + + /** + * Get the mail representation of the notification. + * + * @param mixed $notifiable + * @return \Illuminate\Notifications\Messages\MailMessage + */ + public function toMail($notifiable) + { + return (new MailMessage) + ->line('The introduction to the notification.') + ->action('Notification Action', url('/')) + ->line('Thank you for using our application!'); + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return [ + 'summary' => $this->summary, + ]; + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 78631fa..f70552c 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -4,6 +4,8 @@ use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; +use Filament\Facades\Filament; +use Filament\Tables\Columns\IconColumn; class AppServiceProvider extends ServiceProvider { @@ -24,7 +26,16 @@ public function register() */ public function boot() { - + IconColumn::macro('toggle', function() { + $this->action(function($record, $column) { + $name = $column->getName(); + $record->update([ + $name => !$record->$name + ]); + }); + return $this; + }); + if (env('FORCE_SSL', false)) { URL::forceScheme('https'); } diff --git a/app/View/Components/CategorySpan.php b/app/View/Components/CategorySpan.php new file mode 100644 index 0000000..7c14c89 --- /dev/null +++ b/app/View/Components/CategorySpan.php @@ -0,0 +1,31 @@ +category = TicketCategory::where('slug', $category)->first(); + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|\Closure|string + */ + public function render() + { + return view('components.category-span'); + } +} \ No newline at end of file diff --git a/app/View/Components/IssueSpan.php b/app/View/Components/IssueSpan.php new file mode 100644 index 0000000..59113d4 --- /dev/null +++ b/app/View/Components/IssueSpan.php @@ -0,0 +1,34 @@ +issue = TicketCategory::where('slug', $issue)->first(); + if($issue == "Select new issue"){ + $this->issue = "Select new issue"; + } + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|\Closure|string + */ + public function render() + { + return view('components.issue-span'); + } +} \ No newline at end of file diff --git a/app/View/Components/NoticeSpan.php b/app/View/Components/NoticeSpan.php new file mode 100644 index 0000000..9d64c02 --- /dev/null +++ b/app/View/Components/NoticeSpan.php @@ -0,0 +1,31 @@ +notice = Notice::where('slug', $notice)->first(); + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|\Closure|string + */ + public function render() + { + return view('components.notice-span'); + } +} \ No newline at end of file diff --git a/app/View/Components/SubcategorySpan.php b/app/View/Components/SubcategorySpan.php new file mode 100644 index 0000000..bd2cea4 --- /dev/null +++ b/app/View/Components/SubcategorySpan.php @@ -0,0 +1,34 @@ +subcategory = TicketCategory::where('slug', $subcategory)->first(); + if($subcategory == "Select new subcategory"){ + $this->subcategory = "Select new subcategory"; + } + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|\Closure|string + */ + public function render() + { + return view('components.subcategory-span'); + } +} \ No newline at end of file diff --git a/app/View/Components/TypeSpan.php b/app/View/Components/TypeSpan.php index 9287763..135cf2e 100644 --- a/app/View/Components/TypeSpan.php +++ b/app/View/Components/TypeSpan.php @@ -19,6 +19,9 @@ public function __construct($type, $min = false) { $this->type = TicketType::where('slug', $type)->first(); $this->min = $min; + if($type == "Select new type"){ + $this->type = "Select new type"; + } } /** diff --git a/app/helpers.php b/app/helpers.php index 84922c6..cd63458 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -3,8 +3,65 @@ use App\Models\TicketPriority; use App\Models\TicketStatus; use App\Models\TicketType; +use App\Models\TicketCategory; +use Illuminate\Support\Str; use App\Models\User; use Illuminate\Contracts\Auth\Authenticatable; +use PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean; + +if (!function_exists('categories_list')) { + /** + * Return statuses list as an array of KEY (status id) => VALUE (status title) + * + * @return array + */ + function categories_list(string $key = 'slug'): array + { + $validKeys = ['id', 'slug']; + + if (!in_array($key, $validKeys)) { + throw new InvalidArgumentException("Invalid key. Allowed keys are 'id' or 'slug'."); + } + + return TicketCategory::whereNull('parent_id')->pluck('title',$key)->toArray(); + } +} + +if (!function_exists('subcategories_list')) { + /** + * Return statuses list as an array of KEY (status id) => VALUE (status title) + * + * @return array + */ + function subcategories_list(): array + { + return TicketCategory::whereNotNull('parent_id')->where('level','subcategory')->pluck('title','slug')->toArray(); + } +} + +if (!function_exists('issues_list')) { + /** + * Return statuses list as an array of KEY (status id) => VALUE (status title) + * + * @return array + */ + function issues_list(): array + { + return TicketCategory::whereNotNull('parent_id')->where('level','issue')->pluck('title','slug')->toArray(); + } +} + +if (!function_exists('search_all_categories')) { + /** + * Return statuses list as an array of KEY (status id) => VALUE (status title) + * + * + */ + function search_all_categories($category = null) + { + return TicketCategory::where('slug', $category)->pluck('title', 'slug')->toArray(); + } +} if (!function_exists('statuses_list')) { /** @@ -89,3 +146,23 @@ function locales(): array return $locales; } } + +if (!function_exists('can')) { + /** + * Return statuses list as an array of KEY (status id) => VALUE (status title) + * + * @return array + */ + function can($permission) + { + + } +} + +function debug_to_console($data) { + $output = $data; + if (is_array($output)) + $output = implode(',', $output); + + echo ""; +} diff --git a/composer.lock b/composer.lock index 0786c71..2adbf9c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,32 +4,33 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "087c671b687a6b7b51717d95e36f1b99", + "content-hash": "5f5187bdf06c8981f8d0f50ea53f3d51", "packages": [ { "name": "akaunting/laravel-money", - "version": "3.1.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/akaunting/laravel-money.git", - "reference": "cbc66d1dc457c169f6081e0ae6c661b499dad301" + "reference": "df99d0f5d415490ef7e79362c3b694e8cc8af903" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/laravel-money/zipball/cbc66d1dc457c169f6081e0ae6c661b499dad301", - "reference": "cbc66d1dc457c169f6081e0ae6c661b499dad301", + "url": "https://api.github.com/repos/akaunting/laravel-money/zipball/df99d0f5d415490ef7e79362c3b694e8cc8af903", + "reference": "df99d0f5d415490ef7e79362c3b694e8cc8af903", "shasum": "" }, "require": { - "illuminate/contracts": "^8.67|^9.0", - "illuminate/support": "^8.67|^9.0", - "illuminate/view": "^8.67|^9.0", + "illuminate/contracts": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "illuminate/validation": "^9.0|^10.0", + "illuminate/view": "^9.0|^10.0", "php": "^8.0", "vlucas/phpdotenv": "^5.4.1" }, "require-dev": { - "orchestra/testbench": "^6.23|^7.4", - "phpunit/phpunit": "^9.5", + "orchestra/testbench": "^7.4|^8.0", + "phpunit/phpunit": "^9.5|^10.0", "vimeo/psalm": "^4.23" }, "type": "library", @@ -70,32 +71,98 @@ ], "support": { "issues": "https://github.com/akaunting/laravel-money/issues", - "source": "https://github.com/akaunting/laravel-money/tree/3.1.2" + "source": "https://github.com/akaunting/laravel-money/tree/4.0.1" + }, + "time": "2023-03-16T14:39:27+00:00" + }, + { + "name": "anourvalar/eloquent-serialize", + "version": "1.2.22", + "source": { + "type": "git", + "url": "https://github.com/AnourValar/eloquent-serialize.git", + "reference": "6e91093c10940859c4b0549b6a90f18d8db45998" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/6e91093c10940859c4b0549b6a90f18d8db45998", + "reference": "6e91093c10940859c4b0549b6a90f18d8db45998", + "shasum": "" + }, + "require": { + "laravel/framework": "^8.0|^9.0|^10.0|^11.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.26", + "laravel/legacy-factories": "^1.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5|^10.5", + "psalm/plugin-laravel": "^2.8", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "EloquentSerialize": "AnourValar\\EloquentSerialize\\Facades\\EloquentSerializeFacade" + } + } + }, + "autoload": { + "psr-4": { + "AnourValar\\EloquentSerialize\\": "src/" + } }, - "time": "2022-07-27T08:16:36+00:00" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Laravel Query Builder (Eloquent) serialization", + "homepage": "https://github.com/AnourValar/eloquent-serialize", + "keywords": [ + "anourvalar", + "builder", + "copy", + "eloquent", + "job", + "laravel", + "query", + "querybuilder", + "queue", + "serializable", + "serialization", + "serialize" + ], + "support": { + "issues": "https://github.com/AnourValar/eloquent-serialize/issues", + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.22" + }, + "time": "2024-03-22T12:56:46+00:00" }, { "name": "blade-ui-kit/blade-heroicons", - "version": "1.3.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-heroicons.git", - "reference": "a2749abc7b8eb6149ff643ffa99a3d33a2de7961" + "reference": "53d149fb163b4df4829ce2c89442cf2424704c25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a2749abc7b8eb6149ff643ffa99a3d33a2de7961", - "reference": "a2749abc7b8eb6149ff643ffa99a3d33a2de7961", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/53d149fb163b4df4829ce2c89442cf2424704c25", + "reference": "53d149fb163b4df4829ce2c89442cf2424704c25", "shasum": "" }, "require": { "blade-ui-kit/blade-icons": "^1.1", - "illuminate/support": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", "php": "^7.4|^8.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0", - "phpunit/phpunit": "^9.0" + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.0|^11.0" }, "type": "library", "extra": { @@ -129,9 +196,13 @@ ], "support": { "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/1.3.1" + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/1.5.0" }, "funding": [ + { + "url": "https://www.paypal.me/driesvints", + "type": "custom" + }, { "url": "https://github.com/caneco", "type": "github" @@ -141,35 +212,35 @@ "type": "github" } ], - "time": "2022-03-02T11:50:13+00:00" + "time": "2024-05-23T08:16:22+00:00" }, { "name": "blade-ui-kit/blade-icons", - "version": "1.3.2", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/blade-ui-kit/blade-icons.git", - "reference": "88eda22d90138c854ddad856de0ddf581d2f0d79" + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/88eda22d90138c854ddad856de0ddf581d2f0d79", - "reference": "88eda22d90138c854ddad856de0ddf581d2f0d79", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/89660d93f9897d231e9113ba203cd17f4c5efade", + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade", "shasum": "" }, "require": { - "illuminate/contracts": "^8.0|^9.0", - "illuminate/filesystem": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "illuminate/view": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "illuminate/view": "^8.0|^9.0|^10.0|^11.0", "php": "^7.4|^8.0", - "symfony/console": "^5.3|^6.0", - "symfony/finder": "^5.3|^6.0" + "symfony/console": "^5.3|^6.0|^7.0", + "symfony/finder": "^5.3|^6.0|^7.0" }, "require-dev": { - "mockery/mockery": "^1.3", - "orchestra/testbench": "^6.0|^7.0", - "phpunit/phpunit": "^9.0" + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" }, "bin": [ "bin/blade-icons-generate" @@ -214,38 +285,37 @@ }, "funding": [ { - "url": "https://github.com/caneco", + "url": "https://github.com/sponsors/driesvints", "type": "github" }, { - "url": "https://github.com/driesvints", - "type": "github" + "url": "https://www.paypal.com/paypalme/driesvints", + "type": "paypal" } ], - "time": "2022-09-21T11:34:49+00:00" + "time": "2024-02-07T16:09:20+00:00" }, { "name": "brick/math", - "version": "0.10.2", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" + "php": "^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^9.0", - "vimeo/psalm": "4.25.0" + "vimeo/psalm": "5.0.0" }, "type": "library", "autoload": { @@ -270,7 +340,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.10.2" + "source": "https://github.com/brick/math/tree/0.11.0" }, "funding": [ { @@ -278,20 +348,170 @@ "type": "github" } ], - "time": "2022-08-10T22:54:19+00:00" + "time": "2023-01-15T23:15:59+00:00" + }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-12-11T17:09:12+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" }, { "name": "danharrin/date-format-converter", - "version": "v0.2.0", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/danharrin/date-format-converter.git", - "reference": "ee448ab0cbe2ea36edb886a01670fc760e388f19" + "reference": "42b6ddc52059d4ba228a67c15adaaa0c039e75f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danharrin/date-format-converter/zipball/ee448ab0cbe2ea36edb886a01670fc760e388f19", - "reference": "ee448ab0cbe2ea36edb886a01670fc760e388f19", + "url": "https://api.github.com/repos/danharrin/date-format-converter/zipball/42b6ddc52059d4ba228a67c15adaaa0c039e75f2", + "reference": "42b6ddc52059d4ba228a67c15adaaa0c039e75f2", "shasum": "" }, "require": { @@ -329,31 +549,31 @@ "type": "github" } ], - "time": "2021-02-10T23:58:47+00:00" + "time": "2022-09-29T07:48:20+00:00" }, { "name": "danharrin/livewire-rate-limiting", - "version": "v1.0.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/danharrin/livewire-rate-limiting.git", - "reference": "b99facf5b607fb0cde92a6f254f437295339f7de" + "reference": "1a1b299e20de61f88ed6e94ea0bbcfc33aab1ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danharrin/livewire-rate-limiting/zipball/b99facf5b607fb0cde92a6f254f437295339f7de", - "reference": "b99facf5b607fb0cde92a6f254f437295339f7de", + "url": "https://api.github.com/repos/danharrin/livewire-rate-limiting/zipball/1a1b299e20de61f88ed6e94ea0bbcfc33aab1ddb", + "reference": "1a1b299e20de61f88ed6e94ea0bbcfc33aab1ddb", "shasum": "" }, "require": { - "illuminate/support": "^8.0|^9.0", + "illuminate/support": "^9.0|^10.0|^11.0", "php": "^8.0" }, "require-dev": { - "livewire/livewire": "^2.3", - "orchestra/testbench": "^6.2|^7.0", - "phpunit/phpunit": "^9.4", - "symplify/monorepo-builder": "^9.0" + "livewire/livewire": "^3.0", + "livewire/volt": "^1.3", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.0" }, "type": "library", "autoload": { @@ -383,7 +603,7 @@ "type": "github" } ], - "time": "2022-01-21T11:26:58+00:00" + "time": "2024-05-06T09:10:03+00:00" }, { "name": "devaslanphp/filament-avatar", @@ -442,16 +662,16 @@ }, { "name": "dflydev/dot-access-data", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "0992cc19268b259a39e86f296da5f0677841f42c" + "reference": "f41715465d65213d644d3141a6a93081be5d3549" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c", - "reference": "0992cc19268b259a39e86f296da5f0677841f42c", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", "shasum": "" }, "require": { @@ -462,7 +682,7 @@ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", "scrutinizer/ocular": "1.6.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^3.14" + "vimeo/psalm": "^4.0.0" }, "type": "library", "extra": { @@ -511,34 +731,81 @@ ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", - "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1" + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + }, + "time": "2022-10-27T11:44:00+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2021-08-13T13:06:58+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.5", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^11.0", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25" + "vimeo/psalm": "^4.25 || ^5.4" }, "type": "library", "autoload": { @@ -588,7 +855,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.5" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -604,35 +871,37 @@ "type": "tidelift" } ], - "time": "2022-09-07T09:01:28+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", + "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^12", "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.21" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -664,7 +933,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.1" }, "funding": [ { @@ -680,20 +949,20 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2024-02-05T11:35:39+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", - "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", "shasum": "" }, "require": { @@ -733,7 +1002,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -741,29 +1010,28 @@ "type": "github" } ], - "time": "2022-09-10T18:51:20+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { "name": "egulias/email-validator", - "version": "3.2.1", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715" + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f88dcf4b14af14a98ad96b14b2b317969eab6715", - "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", "shasum": "" }, "require": { - "doctrine/lexer": "^1.2", + "doctrine/lexer": "^1.2|^2", "php": ">=7.2", "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^8.5.8|^9.3.3", "vimeo/psalm": "^4" }, @@ -801,7 +1069,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.2.1" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.6" }, "funding": [ { @@ -809,24 +1077,24 @@ "type": "github" } ], - "time": "2022-06-18T20:57:19+00:00" + "time": "2023-06-01T07:04:22+00:00" }, { "name": "ezyang/htmlpurifier", - "version": "v4.16.0", + "version": "v4.17.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", - "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", "shasum": "" }, "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { "cerdic/css-tidy": "^1.7 || ^2.0", @@ -868,22 +1136,22 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" }, - "time": "2022-09-18T07:06:19+00:00" + "time": "2023-11-17T15:01:25+00:00" }, { "name": "filament/filament", - "version": "v2.16.14", + "version": "v2.17.56", "source": { "type": "git", - "url": "https://github.com/filamentphp/admin.git", - "reference": "1e1c937094e30d16d3f29e924b0c18ec5d49d902" + "url": "https://github.com/filamentphp/panels.git", + "reference": "1031f83465b06ba3cf8587ad136b8f2a45115dd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/admin/zipball/1e1c937094e30d16d3f29e924b0c18ec5d49d902", - "reference": "1e1c937094e30d16d3f29e924b0c18ec5d49d902", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/1031f83465b06ba3cf8587ad136b8f2a45115dd9", + "reference": "1031f83465b06ba3cf8587ad136b8f2a45115dd9", "shasum": "" }, "require": { @@ -892,19 +1160,18 @@ "filament/notifications": "self.version", "filament/support": "self.version", "filament/tables": "self.version", - "illuminate/auth": "^8.6|^9.0", - "illuminate/console": "^8.6|^9.0", - "illuminate/contracts": "^8.6|^9.0", - "illuminate/cookie": "^8.6|^9.0", - "illuminate/database": "^8.6|^9.0", - "illuminate/http": "^8.6|^9.0", - "illuminate/routing": "^8.6|^9.0", - "illuminate/session": "^8.6|^9.0", - "illuminate/support": "^8.6|^9.0", - "illuminate/view": "^8.6|^9.0", + "illuminate/auth": "^8.6|^9.0|^10.0", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/cookie": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/http": "^8.6|^9.0|^10.0", + "illuminate/routing": "^8.6|^9.0|^10.0", + "illuminate/session": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", "livewire/livewire": "^2.10.7", "php": "^8.0", - "ryangjchandler/blade-capture-directive": "^0.2", "spatie/laravel-package-tools": "^1.9" }, "type": "library", @@ -933,34 +1200,34 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-23T11:39:36+00:00" + "time": "2024-05-13T12:47:12+00:00" }, { "name": "filament/forms", - "version": "v2.16.14", + "version": "v2.17.56", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "037ef411663c4925c490b92bc4ebe6b948d57296" + "reference": "0a2444d9f66177fcc014ff13bd2cdf437ed4c61c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/037ef411663c4925c490b92bc4ebe6b948d57296", - "reference": "037ef411663c4925c490b92bc4ebe6b948d57296", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/0a2444d9f66177fcc014ff13bd2cdf437ed4c61c", + "reference": "0a2444d9f66177fcc014ff13bd2cdf437ed4c61c", "shasum": "" }, "require": { "blade-ui-kit/blade-heroicons": "^1.2", - "danharrin/date-format-converter": "^0.2", + "danharrin/date-format-converter": "^0.3", "filament/notifications": "self.version", "filament/support": "self.version", - "illuminate/console": "^8.6|^9.0", - "illuminate/contracts": "^8.6|^9.0", - "illuminate/database": "^8.6|^9.0", - "illuminate/filesystem": "^8.6|^9.0", - "illuminate/support": "^8.6|^9.0", - "illuminate/validation": "^8.6|^9.0", - "illuminate/view": "^8.6|^9.0", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/validation": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", "livewire/livewire": "^2.10.7", "php": "^8.0", "spatie/laravel-package-tools": "^1.9" @@ -991,29 +1258,29 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-23T11:39:40+00:00" + "time": "2023-10-27T11:46:27+00:00" }, { "name": "filament/notifications", - "version": "v2.16.14", + "version": "v2.17.56", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "559c821e44887058c168e7e883b23267df841e70" + "reference": "d28fd12dbb4602f24f94d88730128d28f0f565db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/559c821e44887058c168e7e883b23267df841e70", - "reference": "559c821e44887058c168e7e883b23267df841e70", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/d28fd12dbb4602f24f94d88730128d28f0f565db", + "reference": "d28fd12dbb4602f24f94d88730128d28f0f565db", "shasum": "" }, "require": { "blade-ui-kit/blade-heroicons": "^1.2", "filament/support": "self.version", - "illuminate/contracts": "^8.6|^9.0", - "illuminate/filesystem": "^8.6|^9.0", - "illuminate/notifications": "^8.6|^9.0", - "illuminate/support": "^8.6|^9.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/notifications": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", "livewire/livewire": "^2.10.7", "php": "^8.0", "spatie/laravel-package-tools": "^1.9" @@ -1027,6 +1294,9 @@ } }, "autoload": { + "files": [ + "src/Testing/Autoload.php" + ], "psr-4": { "Filament\\Notifications\\": "src" } @@ -1041,27 +1311,28 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-23T10:20:40+00:00" + "time": "2023-07-03T09:23:01+00:00" }, { "name": "filament/support", - "version": "v2.16.14", + "version": "v2.17.56", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "c0cc59bd50d926b9f60cf1ea0762982ffd71cb06" + "reference": "9982a88704efc58b710c4e6b5000d85a6f4daf56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/c0cc59bd50d926b9f60cf1ea0762982ffd71cb06", - "reference": "c0cc59bd50d926b9f60cf1ea0762982ffd71cb06", + "url": "https://api.github.com/repos/filamentphp/support/zipball/9982a88704efc58b710c4e6b5000d85a6f4daf56", + "reference": "9982a88704efc58b710c4e6b5000d85a6f4daf56", "shasum": "" }, "require": { - "illuminate/contracts": "^8.6|^9.0", - "illuminate/support": "^8.6|^9.0", - "illuminate/view": "^8.6|^9.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", "php": "^8.0", + "ryangjchandler/blade-capture-directive": "^0.2|^0.3", "spatie/laravel-package-tools": "^1.9", "tgalopin/html-sanitizer": "^1.5" }, @@ -1091,34 +1362,34 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-22T19:57:32+00:00" + "time": "2023-07-03T09:23:04+00:00" }, { "name": "filament/tables", - "version": "v2.16.14", + "version": "v2.17.56", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "9690836dfcf378e907167ab2e9dd19dc483fed8f" + "reference": "6bfa4d001e45a9b2d3d02a4d756a06b0171cb064" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/9690836dfcf378e907167ab2e9dd19dc483fed8f", - "reference": "9690836dfcf378e907167ab2e9dd19dc483fed8f", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/6bfa4d001e45a9b2d3d02a4d756a06b0171cb064", + "reference": "6bfa4d001e45a9b2d3d02a4d756a06b0171cb064", "shasum": "" }, "require": { - "akaunting/laravel-money": "^1.2|^2.0|^3.0", + "akaunting/laravel-money": "^1.2|^2.0|^3.0|^4.0", "blade-ui-kit/blade-heroicons": "^1.2", "filament/forms": "self.version", "filament/notifications": "self.version", "filament/support": "self.version", - "illuminate/console": "^8.6|^9.0", - "illuminate/contracts": "^8.6|^9.0", - "illuminate/database": "^8.6|^9.0", - "illuminate/filesystem": "^8.6|^9.0", - "illuminate/support": "^8.6|^9.0", - "illuminate/view": "^8.6|^9.0", + "illuminate/console": "^8.6|^9.0|^10.0", + "illuminate/contracts": "^8.6|^9.0|^10.0", + "illuminate/database": "^8.6|^9.0|^10.0", + "illuminate/filesystem": "^8.6|^9.0|^10.0", + "illuminate/support": "^8.6|^9.0|^10.0", + "illuminate/view": "^8.6|^9.0|^10.0", "livewire/livewire": "^2.10.7", "php": "^8.0", "spatie/invade": "^1.0", @@ -1147,25 +1418,25 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2022-09-23T11:39:54+00:00" + "time": "2024-05-13T12:47:29+00:00" }, { "name": "fruitcake/php-cors", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/fruitcake/php-cors.git", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", - "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "symfony/http-foundation": "^4.4|^5.4|^6" + "symfony/http-foundation": "^4.4|^5.4|^6|^7" }, "require-dev": { "phpstan/phpstan": "^1.4", @@ -1175,7 +1446,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -1206,7 +1477,7 @@ ], "support": { "issues": "https://github.com/fruitcake/php-cors/issues", - "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" + "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0" }, "funding": [ { @@ -1218,28 +1489,28 @@ "type": "github" } ], - "time": "2022-02-20T15:07:15+00:00" + "time": "2023-10-12T05:21:21+00:00" }, { "name": "graham-campbell/result-type", - "version": "v1.1.0", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", - "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -1268,7 +1539,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -1280,26 +1551,26 @@ "type": "tidelift" } ], - "time": "2022-07-30T15:56:11+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.5.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1308,10 +1579,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1324,9 +1596,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -1392,7 +1661,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -1408,38 +1677,37 @@ "type": "tidelift" } ], - "time": "2022-08-28T15:39:27+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1476,7 +1744,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -1492,26 +1760,26 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -1519,9 +1787,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1531,9 +1799,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "2.4-dev" } }, "autoload": { @@ -1595,7 +1860,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -1611,7 +1876,93 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2023-12-03T20:05:35+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2023-12-03T19:50:20+00:00" }, { "name": "invaders-xx/filament-kanban-board", @@ -1757,37 +2108,44 @@ }, { "name": "laravel/framework", - "version": "v9.31.0", + "version": "v9.52.16", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "75013d4fffe3b24748d313fbbea53206351214f7" + "reference": "082345d76fc6a55b649572efe10b11b03e279d24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/75013d4fffe3b24748d313fbbea53206351214f7", - "reference": "75013d4fffe3b24748d313fbbea53206351214f7", + "url": "https://api.github.com/repos/laravel/framework/zipball/082345d76fc6a55b649572efe10b11b03e279d24", + "reference": "082345d76fc6a55b649572efe10b11b03e279d24", "shasum": "" }, "require": { - "doctrine/inflector": "^2.0", - "dragonmantank/cron-expression": "^3.1", - "egulias/email-validator": "^3.1", + "brick/math": "^0.9.3|^0.10.2|^0.11", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.3.2", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", "ext-mbstring": "*", "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", "fruitcake/php-cors": "^1.2", - "laravel/serializable-closure": "^1.0", - "league/commonmark": "^2.2", - "league/flysystem": "^3.0.16", + "guzzlehttp/uri-template": "^1.0", + "laravel/serializable-closure": "^1.2.2", + "league/commonmark": "^2.2.1", + "league/flysystem": "^3.8.0", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.53.1", + "nesbot/carbon": "^2.62.1", "nunomaduro/termwind": "^1.13", "php": "^8.0.2", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", - "ramsey/uuid": "^4.2.2", - "symfony/console": "^6.0.3", + "ramsey/uuid": "^4.7", + "symfony/console": "^6.0.9", "symfony/error-handler": "^6.0", "symfony/finder": "^6.0", "symfony/http-foundation": "^6.0", @@ -1798,7 +2156,7 @@ "symfony/routing": "^6.0", "symfony/uid": "^6.0", "symfony/var-dumper": "^6.0", - "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", "voku/portable-ascii": "^2.0" }, @@ -1845,49 +2203,54 @@ }, "require-dev": { "ably/ably-php": "^1.0", - "aws/aws-sdk-php": "^3.198.1", + "aws/aws-sdk-php": "^3.235.5", "doctrine/dbal": "^2.13.3|^3.1.4", - "fakerphp/faker": "^1.9.2", - "guzzlehttp/guzzle": "^7.2", + "ext-gmp": "*", + "fakerphp/faker": "^1.21", + "guzzlehttp/guzzle": "^7.5", "league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-ftp": "^3.0", "league/flysystem-path-prefixing": "^3.3", "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^7.1", + "mockery/mockery": "^1.5.1", + "orchestra/testbench-core": "^7.24", "pda/pheanstalk": "^4.0", + "phpstan/phpdoc-parser": "^1.15", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^9.5.8", - "predis/predis": "^1.1.9|^2.0", - "symfony/cache": "^6.0" + "predis/predis": "^1.1.9|^2.0.2", + "symfony/cache": "^6.0", + "symfony/http-client": "^6.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", "brianium/paratest": "Required to run tests in parallel (^6.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", - "ext-bcmath": "Required to use the multiple_of validation rule.", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", - "ext-pcntl": "Required to use all features of the queue worker.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", "league/flysystem-read-only": "Required to use read-only disks (^3.3)", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "mockery/mockery": "Required to use mocking (^1.4.4).", + "mockery/mockery": "Required to use mocking (^1.5.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", - "predis/predis": "Required to use the predis connector (^1.1.9|^2.0).", + "predis/predis": "Required to use the predis connector (^1.1.9|^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", @@ -1939,34 +2302,35 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-09-20T13:32:50+00:00" + "time": "2023-10-03T13:02:30+00:00" }, { "name": "laravel/sanctum", - "version": "v3.0.1", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "b71e80a3a8e8029e2ec8c1aa814b999609ce16dc" + "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/b71e80a3a8e8029e2ec8c1aa814b999609ce16dc", - "reference": "b71e80a3a8e8029e2ec8c1aa814b999609ce16dc", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5", + "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/console": "^9.21", - "illuminate/contracts": "^9.21", - "illuminate/database": "^9.21", - "illuminate/support": "^9.21", + "illuminate/console": "^9.21|^10.0", + "illuminate/contracts": "^9.21|^10.0", + "illuminate/database": "^9.21|^10.0", + "illuminate/support": "^9.21|^10.0", "php": "^8.0.2" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^7.0", - "phpunit/phpunit": "^9.3" + "orchestra/testbench": "^7.28.2|^8.8.3", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6" }, "type": "library", "extra": { @@ -2004,20 +2368,20 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2022-07-29T21:33:30+00:00" + "time": "2023-12-19T18:44:48+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.2.2", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", "shasum": "" }, "require": { @@ -2064,42 +2428,40 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-09-08T13:45:54+00:00" + "time": "2023-11-08T14:08:06+00:00" }, { "name": "laravel/tinker", - "version": "v2.7.2", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "dff39b661e827dae6e092412f976658df82dbac5" + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", - "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -2130,22 +2492,22 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.2" + "source": "https://github.com/laravel/tinker/tree/v2.9.0" }, - "time": "2022-03-23T12:38:24+00:00" + "time": "2024-01-04T16:10:04+00:00" }, { "name": "league/commonmark", - "version": "2.3.5", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257" + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/84d74485fdb7074f4f9dd6f02ab957b1de513257", - "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", "shasum": "" }, "require": { @@ -2158,22 +2520,22 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.0", + "commonmark/cmark": "0.30.3", "commonmark/commonmark.js": "0.30.0", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "^1.4", + "michelf/php-markdown": "^1.4 || ^2.0", "nyholm/psr7": "^1.5", "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.21", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "symfony/finder": "^5.3 | ^6.0 || ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", "unleashedtech/php-coding-standard": "^3.1.1", - "vimeo/psalm": "^4.24.0" + "vimeo/psalm": "^4.24.0 || ^5.0.0" }, "suggest": { "symfony/yaml": "v2.3+ required if using the Front Matter extension" @@ -2181,7 +2543,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" } }, "autoload": { @@ -2238,20 +2600,20 @@ "type": "tidelift" } ], - "time": "2022-07-29T10:59:45+00:00" + "time": "2024-02-02T11:59:32+00:00" }, { "name": "league/config", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/thephpleague/config.git", - "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e" + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/config/zipball/a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", - "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", "shasum": "" }, "require": { @@ -2260,7 +2622,7 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.5", "scrutinizer/ocular": "^1.8.1", "unleashedtech/php-coding-standard": "^3.1", @@ -2320,27 +2682,30 @@ "type": "github" } ], - "time": "2021-08-14T12:15:32+00:00" + "time": "2022-12-11T20:36:23+00:00" }, { "name": "league/flysystem", - "version": "3.5.2", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "c73c4eb31f2e883b3897ab5591aa2dbc48112433" + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c73c4eb31f2e883b3897ab5591aa2dbc48112433", - "reference": "c73c4eb31f2e883b3897ab5591aa2dbc48112433", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", "shasum": "" }, "require": { + "league/flysystem-local": "^3.0.0", "league/mime-type-detection": "^1.0.0", "php": "^8.0.2" }, "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", "aws/aws-sdk-php": "3.209.31 || 3.210.0", "guzzlehttp/guzzle": "<7.0", "guzzlehttp/ringphp": "<1.1.1", @@ -2348,20 +2713,23 @@ "symfony/http-client": "<5.2" }, "require-dev": { - "async-aws/s3": "^1.5", - "async-aws/simple-s3": "^1.0", - "aws/aws-sdk-php": "^3.198.1", + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", - "phpseclib/phpseclib": "^3.0.14", - "phpstan/phpstan": "^0.12.26", - "phpunit/phpunit": "^9.5.11", - "sabre/dav": "^4.3.1" + "mongodb/mongodb": "^1.2", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" }, "type": "library", "autoload": { @@ -2395,46 +2763,81 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.5.2" + "source": "https://github.com/thephpleague/flysystem/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, + "time": "2024-05-22T10:09:12+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.28.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" } ], - "time": "2022-09-23T18:59:16+00:00" + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0" + }, + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -2455,7 +2858,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -2467,7 +2870,7 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2024-01-28T23:22:08+00:00" }, { "name": "league/uri-parser", @@ -2536,36 +2939,37 @@ "issues": "https://github.com/thephpleague/uri-parser/issues", "source": "https://github.com/thephpleague/uri-parser/tree/master" }, + "abandoned": true, "time": "2018-11-22T07:55:51+00:00" }, { "name": "livewire/livewire", - "version": "v2.10.7", + "version": "v2.12.6", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "fa0441bf82f1674beecb3a8ad8a4ae428736ed18" + "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/fa0441bf82f1674beecb3a8ad8a4ae428736ed18", - "reference": "fa0441bf82f1674beecb3a8ad8a4ae428736ed18", + "url": "https://api.github.com/repos/livewire/livewire/zipball/7d3a57b3193299cf1a0639a3935c696f4da2cf92", + "reference": "7d3a57b3193299cf1a0639a3935c696f4da2cf92", "shasum": "" }, "require": { - "illuminate/database": "^7.0|^8.0|^9.0", - "illuminate/support": "^7.0|^8.0|^9.0", - "illuminate/validation": "^7.0|^8.0|^9.0", + "illuminate/database": "^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "^7.0|^8.0|^9.0|^10.0", + "illuminate/validation": "^7.0|^8.0|^9.0|^10.0", "league/mime-type-detection": "^1.9", "php": "^7.2.5|^8.0", "symfony/http-kernel": "^5.0|^6.0" }, "require-dev": { "calebporzio/sushi": "^2.1", - "laravel/framework": "^7.0|^8.0|^9.0", + "laravel/framework": "^7.0|^8.0|^9.0|^10.0", "mockery/mockery": "^1.3.1", - "orchestra/testbench": "^5.0|^6.0|^7.0", - "orchestra/testbench-dusk": "^5.2|^6.0|^7.0", + "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", + "orchestra/testbench-dusk": "^5.2|^6.0|^7.0|^8.0", "phpunit/phpunit": "^8.4|^9.0", "psy/psysh": "@stable" }, @@ -2601,7 +3005,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.10.7" + "source": "https://github.com/livewire/livewire/tree/v2.12.6" }, "funding": [ { @@ -2609,30 +3013,33 @@ "type": "github" } ], - "time": "2022-08-08T13:52:53+00:00" + "time": "2023-08-11T04:02:34+00:00" }, { "name": "maatwebsite/excel", - "version": "3.1.40", + "version": "3.1.55", "source": { "type": "git", "url": "https://github.com/SpartnerNL/Laravel-Excel.git", - "reference": "8a54972e3d616c74687c3cbff15765555761885c" + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/8a54972e3d616c74687c3cbff15765555761885c", - "reference": "8a54972e3d616c74687c3cbff15765555761885c", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", "shasum": "" }, "require": { + "composer/semver": "^3.3", "ext-json": "*", - "illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0", - "php": "^7.0|^8.0", - "phpoffice/phpspreadsheet": "^1.18" + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0", + "php": "^7.0||^8.0", + "phpoffice/phpspreadsheet": "^1.18", + "psr/simple-cache": "^1.0||^2.0||^3.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0", + "laravel/scout": "^7.0||^8.0||^9.0||^10.0", + "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0", "predis/predis": "^1.1" }, "type": "library", @@ -2675,7 +3082,7 @@ ], "support": { "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", - "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.40" + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.55" }, "funding": [ { @@ -2687,35 +3094,36 @@ "type": "github" } ], - "time": "2022-05-02T13:50:01+00:00" + "time": "2024-02-20T08:27:10+00:00" }, { "name": "maennchen/zipstream-php", - "version": "2.2.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "211e9ba1530ea5260b45d90c9ea252f56ec52729" + "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/211e9ba1530ea5260b45d90c9ea252f56ec52729", - "reference": "211e9ba1530ea5260b45d90c9ea252f56ec52729", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", + "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", "shasum": "" }, "require": { + "ext-mbstring": "*", "myclabs/php-enum": "^1.5", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0", - "symfony/polyfill-mbstring": "^1.0" + "php": "^8.0", + "psr/http-message": "^1.0" }, "require-dev": { "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.9", "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0", "mikey179/vfsstream": "^1.6", "php-coveralls/php-coveralls": "^2.4", "phpunit/phpunit": "^8.5.8 || ^9.4.2", - "vimeo/psalm": "^4.1" + "vimeo/psalm": "^5.0" }, "type": "library", "autoload": { @@ -2752,38 +3160,42 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.2.1" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.4.0" }, "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, { "url": "https://opencollective.com/zipstream", "type": "open_collective" } ], - "time": "2022-05-18T15:52:06+00:00" + "time": "2022-12-08T12:29:14+00:00" }, { "name": "markbaker/complex", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22" + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/ab8bc271e404909db09ff2d5ffa1e538085c0f22", - "reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", - "squizlabs/php_codesniffer": "^3.4" + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { @@ -2809,36 +3221,36 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPComplex/issues", - "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.1" + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" }, - "time": "2021-06-29T15:32:53+00:00" + "time": "2022-12-06T16:21:08+00:00" }, { "name": "markbaker/matrix", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "c66aefcafb4f6c269510e9ac46b82619a904c576" + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/c66aefcafb4f6c269510e9ac46b82619a904c576", - "reference": "c66aefcafb4f6c269510e9ac46b82619a904c576", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "phpcompatibility/php-compatibility": "^9.0", + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "2.*", "phploc/phploc": "^4.0", "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "sebastian/phpcpd": "^4.0", - "squizlabs/php_codesniffer": "^3.4" + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", "autoload": { @@ -2865,32 +3277,30 @@ ], "support": { "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.0" + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" }, - "time": "2021-07-01T19:01:15+00:00" + "time": "2022-12-02T22:17:43+00:00" }, { "name": "masterminds/html5", - "version": "2.7.6", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947" + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", - "ext-libxml": "*", "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" }, "type": "library", "extra": { @@ -2934,22 +3344,22 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" }, - "time": "2022-08-18T16:18:26+00:00" + "time": "2024-03-31T07:05:07+00:00" }, { "name": "monolog/monolog", - "version": "2.8.0", + "version": "2.9.3", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", "shasum": "" }, "require": { @@ -2964,14 +3374,14 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", @@ -3026,7 +3436,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.8.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.3" }, "funding": [ { @@ -3038,7 +3448,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T11:55:47+00:00" + "time": "2024-04-12T20:52:51+00:00" }, { "name": "myclabs/php-enum", @@ -3105,28 +3515,33 @@ }, { "name": "nesbot/carbon", - "version": "2.62.1", + "version": "2.72.5", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -3143,8 +3558,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -3203,29 +3618,29 @@ "type": "tidelift" } ], - "time": "2022-09-02T07:48:13+00:00" + "time": "2024-06-03T19:18:41+00:00" }, { "name": "nette/schema", - "version": "v1.2.2", + "version": "v1.2.5", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", - "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", + "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a", "shasum": "" }, "require": { "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", - "php": ">=7.1 <8.2" + "php": "7.1 - 8.3" }, "require-dev": { "nette/tester": "^2.3 || ^2.4", - "phpstan/phpstan-nette": "^0.12", + "phpstan/phpstan-nette": "^1.0", "tracy/tracy": "^2.7" }, "type": "library", @@ -3263,34 +3678,36 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.2" + "source": "https://github.com/nette/schema/tree/v1.2.5" }, - "time": "2021-10-15T11:40:02+00:00" + "time": "2023-10-05T20:37:59+00:00" }, { "name": "nette/utils", - "version": "v3.2.8", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", - "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "shasum": "" }, "require": { - "php": ">=7.2 <8.3" + "php": ">=8.0 <8.4" }, "conflict": { - "nette/di": "<3.0.6" + "nette/finder": "<3", + "nette/schema": "<1.2.2" }, "require-dev": { - "nette/tester": "~2.0", + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.5", "phpstan/phpstan": "^1.0", - "tracy/tracy": "^2.3" + "tracy/tracy": "^2.9" }, "suggest": { "ext-gd": "to use Image", @@ -3298,13 +3715,12 @@ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3348,31 +3764,33 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.8" + "source": "https://github.com/nette/utils/tree/v4.0.4" }, - "time": "2022-09-12T23:36:20+00:00" + "time": "2024-01-17T16:50:36+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -3380,7 +3798,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3404,22 +3822,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2022-09-04T07:30:47+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { "name": "nunomaduro/termwind", - "version": "v1.14.0", + "version": "v1.15.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "10065367baccf13b6e30f5e9246fa4f63a79eb1d" + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/10065367baccf13b6e30f5e9246fa4f63a79eb1d", - "reference": "10065367baccf13b6e30f5e9246fa4f63a79eb1d", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", "shasum": "" }, "require": { @@ -3476,7 +3894,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.14.0" + "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" }, "funding": [ { @@ -3492,20 +3910,20 @@ "type": "github" } ], - "time": "2022-08-01T11:03:24+00:00" + "time": "2023-02-08T01:06:31+00:00" }, { "name": "phpoffice/phpspreadsheet", - "version": "1.25.2", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5" + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a317a09e7def49852400a4b3eca4a4b0790ceeb5", - "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", "shasum": "" }, "require": { @@ -3523,26 +3941,26 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "10.2.4", - "mpdf/mpdf": "8.1.1", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", - "tecnickcom/tcpdf": "6.5" + "tecnickcom/tcpdf": "^6.5" }, "suggest": { "dompdf/dompdf": "Option for rendering PDF with PDF Writer", @@ -3595,30 +4013,30 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.25.2" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" }, - "time": "2022-09-25T17:21:01+00:00" + "time": "2023-06-14T22:48:31+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.0", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", - "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "phpunit/phpunit": "^8.5.28 || ^9.5.21" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -3660,7 +4078,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -3672,24 +4090,24 @@ "type": "tidelift" } ], - "time": "2022-07-30T15:51:26+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "phpsa/filament-password-reveal", - "version": "v1.1.2", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/phpsa/filament-password-reveal.git", - "reference": "8e238a498864fdd0227f15fbf6b62d93832c1b18" + "reference": "e3e3300901b455241c514f1e0083c13161dffecd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpsa/filament-password-reveal/zipball/8e238a498864fdd0227f15fbf6b62d93832c1b18", - "reference": "8e238a498864fdd0227f15fbf6b62d93832c1b18", + "url": "https://api.github.com/repos/phpsa/filament-password-reveal/zipball/e3e3300901b455241c514f1e0083c13161dffecd", + "reference": "e3e3300901b455241c514f1e0083c13161dffecd", "shasum": "" }, "require": { - "filament/filament": "^2.9", + "filament/forms": "^2.9", "php": "^8.0", "spatie/laravel-package-tools": "^1.10" }, @@ -3716,7 +4134,7 @@ "email": "vxdhost@gmail.com" } ], - "description": "Password Input with optino to show", + "description": "Password Input with option to show", "homepage": "https://cgs4k.nz", "keywords": [ "cli", @@ -3730,7 +4148,7 @@ ], "support": { "issues": "https://github.com/phpsa/filament-password-reveal/issues", - "source": "https://github.com/phpsa/filament-password-reveal/tree/v1.1.2" + "source": "https://github.com/phpsa/filament-password-reveal/tree/v1.1.4" }, "funding": [ { @@ -3738,7 +4156,55 @@ "type": "github" } ], - "time": "2022-08-21T21:16:06+00:00" + "time": "2023-02-22T21:39:18+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" }, { "name": "psr/container", @@ -3845,21 +4311,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -3879,7 +4345,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -3891,27 +4357,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -3931,10 +4397,10 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3946,31 +4412,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -3999,9 +4465,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/log", @@ -4106,25 +4572,25 @@ }, { "name": "psy/psysh", - "version": "v0.11.8", + "version": "v0.12.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "f455acf3645262ae389b10e9beba0c358aa6994e" + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/f455acf3645262ae389b10e9beba0c358aa6994e", - "reference": "f455acf3645262ae389b10e9beba0c358aa6994e", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2fd717afa05341b4f8152547f142cd2f130f6818", + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" @@ -4135,8 +4601,7 @@ "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, "bin": [ "bin/psysh" @@ -4144,7 +4609,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.11.x-dev" + "dev-main": "0.12.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false } }, "autoload": { @@ -4176,31 +4645,32 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.8" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.4" }, - "time": "2022-07-28T14:25:11+00:00" + "time": "2024-06-10T01:18:23+00:00" }, { "name": "pxlrbt/filament-excel", - "version": "v1.1.4", + "version": "v1.1.13", "source": { "type": "git", "url": "https://github.com/pxlrbt/filament-excel.git", - "reference": "4247ec794d5823645346707b8887d60a5045deca" + "reference": "771952cfb26a79fc3da0cf78c916188ccf893dcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pxlrbt/filament-excel/zipball/4247ec794d5823645346707b8887d60a5045deca", - "reference": "4247ec794d5823645346707b8887d60a5045deca", + "url": "https://api.github.com/repos/pxlrbt/filament-excel/zipball/771952cfb26a79fc3da0cf78c916188ccf893dcd", + "reference": "771952cfb26a79fc3da0cf78c916188ccf893dcd", "shasum": "" }, "require": { - "filament/filament": "^2.0", + "anourvalar/eloquent-serialize": "^1.2", + "filament/filament": "^2.13.24|^3.0", "maatwebsite/excel": "^3.1", "php": "^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.6" + "laravel/pint": "^1.10" }, "type": "library", "extra": { @@ -4236,9 +4706,15 @@ ], "support": { "issues": "https://github.com/pxlrbt/filament-excel/issues", - "source": "https://github.com/pxlrbt/filament-excel/tree/v1.1.4" + "source": "https://github.com/pxlrbt/filament-excel/tree/v1.1.13" }, - "time": "2022-09-21T10:40:10+00:00" + "funding": [ + { + "url": "https://github.com/pxlrbt", + "type": "github" + } + ], + "time": "2023-07-05T19:06:22+00:00" }, { "name": "ralouphie/getallheaders", @@ -4286,42 +4762,53 @@ }, { "name": "ramsey/collection", - "version": "1.2.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", "shasum": "" }, "require": { - "php": "^7.3 || ^8", + "php": "^7.4 || ^8.0", "symfony/polyfill-php81": "^1.23" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -4349,7 +4836,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/1.3.0" }, "funding": [ { @@ -4361,28 +4848,27 @@ "type": "tidelift" } ], - "time": "2021-10-10T03:01:02+00:00" + "time": "2022-12-27T19:12:24+00:00" }, { "name": "ramsey/uuid", - "version": "4.5.1", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/a161a26d917604dc6d3aa25100fddf2556e9f35d", - "reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10", - "ext-ctype": "*", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", - "ramsey/collection": "^1.0" + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4411,7 +4897,6 @@ }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -4443,7 +4928,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.5.1" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -4455,31 +4940,31 @@ "type": "tidelift" } ], - "time": "2022-09-16T03:22:46+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "ryangjchandler/blade-capture-directive", - "version": "v0.2.2", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/ryangjchandler/blade-capture-directive.git", - "reference": "be41afbd86057989d84f1aaea8d00f3b1e5c50e1" + "reference": "62fd2ecb50b938a46025093bcb64fcaddd531f89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ryangjchandler/blade-capture-directive/zipball/be41afbd86057989d84f1aaea8d00f3b1e5c50e1", - "reference": "be41afbd86057989d84f1aaea8d00f3b1e5c50e1", + "url": "https://api.github.com/repos/ryangjchandler/blade-capture-directive/zipball/62fd2ecb50b938a46025093bcb64fcaddd531f89", + "reference": "62fd2ecb50b938a46025093bcb64fcaddd531f89", "shasum": "" }, "require": { - "illuminate/contracts": "^8.0|^9.0", + "illuminate/contracts": "^9.0|^10.0", "php": "^8.0", "spatie/laravel-package-tools": "^1.9.2" }, "require-dev": { - "nunomaduro/collision": "^5.0|^6.0", - "nunomaduro/larastan": "^1.0", - "orchestra/testbench": "^6.23|^7.0", + "nunomaduro/collision": "^6.0|^7.0", + "nunomaduro/larastan": "^2.0", + "orchestra/testbench": "^7.22|^8.0", "pestphp/pest": "^1.21", "pestphp/pest-plugin-laravel": "^1.1", "phpstan/extension-installer": "^1.1", @@ -4525,7 +5010,7 @@ ], "support": { "issues": "https://github.com/ryangjchandler/blade-capture-directive/issues", - "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v0.2.2" + "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v0.3.0" }, "funding": [ { @@ -4533,7 +5018,7 @@ "type": "github" } ], - "time": "2022-09-02T11:04:28+00:00" + "time": "2023-02-14T16:54:54+00:00" }, { "name": "spatie/invade", @@ -4603,28 +5088,28 @@ }, { "name": "spatie/laravel-activitylog", - "version": "4.6.0", + "version": "4.7.3", "source": { "type": "git", "url": "https://github.com/spatie/laravel-activitylog.git", - "reference": "7c08e6bd8fbd1cd2b57c0f6acf3708bcafc3f7e1" + "reference": "ec65a478a909b8df1b4f0c3c45de2592ca7639e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/7c08e6bd8fbd1cd2b57c0f6acf3708bcafc3f7e1", - "reference": "7c08e6bd8fbd1cd2b57c0f6acf3708bcafc3f7e1", + "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/ec65a478a909b8df1b4f0c3c45de2592ca7639e5", + "reference": "ec65a478a909b8df1b4f0c3c45de2592ca7639e5", "shasum": "" }, "require": { - "illuminate/config": "^8.0 || ^9.0", - "illuminate/database": "^8.53 || ^9.0", - "illuminate/support": "^8.0 || ^9.0", + "illuminate/config": "^8.0 || ^9.0 || ^10.0", + "illuminate/database": "^8.69 || ^9.27 || ^10.0", + "illuminate/support": "^8.0 || ^9.0 || ^10.0", "php": "^8.0", "spatie/laravel-package-tools": "^1.6.3" }, "require-dev": { "ext-json": "*", - "orchestra/testbench": "^6.23 || ^7.0", + "orchestra/testbench": "^6.23 || ^7.0 || ^8.0", "pestphp/pest": "^1.20" }, "type": "library", @@ -4678,7 +5163,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-activitylog/issues", - "source": "https://github.com/spatie/laravel-activitylog/tree/4.6.0" + "source": "https://github.com/spatie/laravel-activitylog/tree/4.7.3" }, "funding": [ { @@ -4690,31 +5175,32 @@ "type": "github" } ], - "time": "2022-09-22T09:31:29+00:00" + "time": "2023-01-25T17:04:51+00:00" }, { "name": "spatie/laravel-package-tools", - "version": "1.13.5", + "version": "1.16.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "163ee3bc6c0a987535d8a99722a7dbcc5471a140" + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/163ee3bc6c0a987535d8a99722a7dbcc5471a140", - "reference": "163ee3bc6c0a987535d8a99722a7dbcc5471a140", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", "shasum": "" }, "require": { - "illuminate/contracts": "^9.28", + "illuminate/contracts": "^9.28|^10.0|^11.0", "php": "^8.0" }, "require-dev": { "mockery/mockery": "^1.5", - "orchestra/testbench": "^7.7", + "orchestra/testbench": "^7.7|^8.0", + "pestphp/pest": "^1.22", "phpunit/phpunit": "^9.5.24", - "spatie/test-time": "^1.3" + "spatie/pest-plugin-test-time": "^1.1" }, "type": "library", "autoload": { @@ -4741,7 +5227,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.13.5" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.4" }, "funding": [ { @@ -4749,44 +5235,44 @@ "type": "github" } ], - "time": "2022-09-07T14:31:31+00:00" + "time": "2024-03-20T07:29:11+00:00" }, { "name": "spatie/laravel-permission", - "version": "5.5.5", + "version": "5.11.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-permission.git", - "reference": "f2303a70be60919811ca8afc313e8244fda00974" + "reference": "7090824cca57e693b880ce3aaf7ef78362e28bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/f2303a70be60919811ca8afc313e8244fda00974", - "reference": "f2303a70be60919811ca8afc313e8244fda00974", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/7090824cca57e693b880ce3aaf7ef78362e28bbd", + "reference": "7090824cca57e693b880ce3aaf7ef78362e28bbd", "shasum": "" }, "require": { - "illuminate/auth": "^7.0|^8.0|^9.0", - "illuminate/container": "^7.0|^8.0|^9.0", - "illuminate/contracts": "^7.0|^8.0|^9.0", - "illuminate/database": "^7.0|^8.0|^9.0", - "php": "^7.3|^8.0|^8.1" + "illuminate/auth": "^7.0|^8.0|^9.0|^10.0", + "illuminate/container": "^7.0|^8.0|^9.0|^10.0", + "illuminate/contracts": "^7.0|^8.0|^9.0|^10.0", + "illuminate/database": "^7.0|^8.0|^9.0|^10.0", + "php": "^7.3|^8.0" }, "require-dev": { - "orchestra/testbench": "^5.0|^6.0|^7.0", + "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", "phpunit/phpunit": "^9.4", "predis/predis": "^1.1" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "5.x-dev", + "dev-master": "5.x-dev" + }, "laravel": { "providers": [ "Spatie\\Permission\\PermissionServiceProvider" ] - }, - "branch-alias": { - "dev-main": "5.x-dev", - "dev-master": "5.x-dev" } }, "autoload": { @@ -4823,7 +5309,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-permission/issues", - "source": "https://github.com/spatie/laravel-permission/tree/5.5.5" + "source": "https://github.com/spatie/laravel-permission/tree/5.11.1" }, "funding": [ { @@ -4831,25 +5317,24 @@ "type": "github" } ], - "time": "2022-06-29T23:11:42+00:00" + "time": "2023-10-25T05:12:01+00:00" }, { "name": "symfony/console", - "version": "v6.1.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "7fccea8728aa2d431a6725b02b3ce759049fc84d" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7fccea8728aa2d431a6725b02b3ce759049fc84d", - "reference": "7fccea8728aa2d431a6725b02b3ce759049fc84d", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" @@ -4911,7 +5396,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.1.4" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -4927,24 +5412,24 @@ "type": "tidelift" } ], - "time": "2022-08-26T10:32:31+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/css-selector", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "0dd5e36b80e1de97f8f74ed7023ac2b837a36443" + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/0dd5e36b80e1de97f8f74ed7023ac2b837a36443", - "reference": "0dd5e36b80e1de97f8f74ed7023ac2b837a36443", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f1d00bddb83a4cb2138564b2150001cb6ce272b1", + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4976,7 +5461,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.1.3" + "source": "https://github.com/symfony/css-selector/tree/v6.0.19" }, "funding": [ { @@ -4992,29 +5477,29 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:24:16+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.1.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5043,7 +5528,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -5059,24 +5544,24 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/error-handler", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "736e42db3fd586d91820355988698e434e1d8419" + "reference": "c7df52182f43a68522756ac31a532dd5b1e6db67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/736e42db3fd586d91820355988698e434e1d8419", - "reference": "736e42db3fd586d91820355988698e434e1d8419", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/c7df52182f43a68522756ac31a532dd5b1e6db67", + "reference": "c7df52182f43a68522756ac31a532dd5b1e6db67", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/log": "^1|^2|^3", "symfony/var-dumper": "^5.4|^6.0" }, @@ -5114,7 +5599,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.1.3" + "source": "https://github.com/symfony/error-handler/tree/v6.0.19" }, "funding": [ { @@ -5130,24 +5615,24 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:42:06+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.1.0", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347", - "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { @@ -5197,7 +5682,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -5213,24 +5698,24 @@ "type": "tidelift" } ], - "time": "2022-05-05T16:51:07+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.1.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", - "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -5239,7 +5724,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -5276,7 +5761,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -5292,27 +5777,24 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/finder", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/39696bff2c2970b3779a5cac7bf9f0b88fc2b709", - "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -5340,7 +5822,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.1.3" + "source": "https://github.com/symfony/finder/tree/v6.0.19" }, "funding": [ { @@ -5356,24 +5838,24 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:42:06+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.1.4", + "version": "v6.0.20", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "18e0f106a32887bcebef757e5b39c88e39a08f20" + "reference": "e16b2676a4b3b1fa12378a20b29c364feda2a8d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/18e0f106a32887bcebef757e5b39c88e39a08f20", - "reference": "18e0f106a32887bcebef757e5b39c88e39a08f20", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e16b2676a4b3b1fa12378a20b29c364feda2a8d6", + "reference": "e16b2676a4b3b1fa12378a20b29c364feda2a8d6", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.1" }, @@ -5415,7 +5897,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.1.4" + "source": "https://github.com/symfony/http-foundation/tree/v6.0.20" }, "funding": [ { @@ -5431,26 +5913,26 @@ "type": "tidelift" } ], - "time": "2022-08-19T14:27:04+00:00" + "time": "2023-01-30T15:41:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.1.4", + "version": "v6.0.20", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2144c53a278254af57fa1e6f71427be656fab6f4" + "reference": "6dc70833fd0ef5e861e17c7854c12d7d86679349" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2144c53a278254af57fa1e6f71427be656fab6f4", - "reference": "2144c53a278254af57fa1e6f71427be656fab6f4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6dc70833fd0ef5e861e17c7854c12d7d86679349", + "reference": "6dc70833fd0ef5e861e17c7854c12d7d86679349", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/log": "^1|^2|^3", - "symfony/error-handler": "^6.1", + "symfony/error-handler": "^5.4|^6.0", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", "symfony/polyfill-ctype": "^1.8" @@ -5458,9 +5940,9 @@ "conflict": { "symfony/browser-kit": "<5.4", "symfony/cache": "<5.4", - "symfony/config": "<6.1", + "symfony/config": "<5.4", "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.1", + "symfony/dependency-injection": "<5.4", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", @@ -5477,10 +5959,10 @@ "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^6.1", + "symfony/config": "^5.4|^6.0", "symfony/console": "^5.4|^6.0", "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.1", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/dom-crawler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", @@ -5490,7 +5972,6 @@ "symfony/stopwatch": "^5.4|^6.0", "symfony/translation": "^5.4|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", - "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -5525,7 +6006,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.1.4" + "source": "https://github.com/symfony/http-kernel/tree/v6.0.20" }, "funding": [ { @@ -5541,25 +6022,25 @@ "type": "tidelift" } ], - "time": "2022-08-26T14:50:30+00:00" + "time": "2023-02-01T08:22:55+00:00" }, { "name": "symfony/mailer", - "version": "v6.1.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "55a7cb8f8518d35e2a039daaec6e1ee20509510e" + "reference": "cd60799210c488f545ddde2444dc1aa548322872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/55a7cb8f8518d35e2a039daaec6e1ee20509510e", - "reference": "55a7cb8f8518d35e2a039daaec6e1ee20509510e", + "url": "https://api.github.com/repos/symfony/mailer/zipball/cd60799210c488f545ddde2444dc1aa548322872", + "reference": "cd60799210c488f545ddde2444dc1aa548322872", "shasum": "" }, "require": { - "egulias/email-validator": "^2.1.10|^3", - "php": ">=8.1", + "egulias/email-validator": "^2.1.10|^3|^4", + "php": ">=8.0.2", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^5.4|^6.0", @@ -5599,7 +6080,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.1.4" + "source": "https://github.com/symfony/mailer/tree/v6.0.19" }, "funding": [ { @@ -5615,24 +6096,24 @@ "type": "tidelift" } ], - "time": "2022-08-03T05:16:05+00:00" + "time": "2023-01-11T11:50:03+00:00" }, { "name": "symfony/mime", - "version": "v6.1.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "5d1de2d3c52f8ca469c488f4b9e007e9e9cee0b3" + "reference": "d7052547a0070cbeadd474e172b527a00d657301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/5d1de2d3c52f8ca469c488f4b9e007e9e9cee0b3", - "reference": "5d1de2d3c52f8ca469c488f4b9e007e9e9cee0b3", + "url": "https://api.github.com/repos/symfony/mime/zipball/d7052547a0070cbeadd474e172b527a00d657301", + "reference": "d7052547a0070cbeadd474e172b527a00d657301", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -5640,15 +6121,16 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4" + "symfony/mailer": "<5.4", + "symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" }, "type": "library", "autoload": { @@ -5680,7 +6162,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.1.4" + "source": "https://github.com/symfony/mime/tree/v6.0.19" }, "funding": [ { @@ -5696,20 +6178,20 @@ "type": "tidelift" } ], - "time": "2022-08-19T14:27:04+00:00" + "time": "2023-01-11T11:50:03+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -5723,9 +6205,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5762,7 +6241,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -5778,20 +6257,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -5802,9 +6281,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5843,7 +6319,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -5859,20 +6335,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -5885,9 +6361,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5930,7 +6403,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -5946,20 +6419,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -5970,9 +6443,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6014,7 +6484,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -6030,20 +6500,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -6057,9 +6527,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6097,7 +6564,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -6113,20 +6580,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -6134,9 +6601,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6173,7 +6637,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -6189,20 +6653,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -6210,9 +6674,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6256,7 +6717,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -6272,20 +6733,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -6293,9 +6754,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6335,7 +6793,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -6351,20 +6809,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23" + "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/a41886c1c81dc075a09c71fe6db5b9d68c79de23", - "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853", "shasum": "" }, "require": { @@ -6378,9 +6836,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6417,7 +6872,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0" }, "funding": [ { @@ -6433,24 +6888,24 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a6506e99cfad7059b1ab5cab395854a0a0c21292", - "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -6478,7 +6933,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.1.3" + "source": "https://github.com/symfony/process/tree/v6.0.19" }, "funding": [ { @@ -6494,24 +6949,24 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:24:16+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/routing", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ef9108b3a88045b7546e808fb404ddb073dd35ea" + "reference": "e56ca9b41c1ec447193474cd86ad7c0b547755ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ef9108b3a88045b7546e808fb404ddb073dd35ea", - "reference": "ef9108b3a88045b7546e808fb404ddb073dd35ea", + "url": "https://api.github.com/repos/symfony/routing/zipball/e56ca9b41c1ec447193474cd86ad7c0b547755ac", + "reference": "e56ca9b41c1ec447193474cd86ad7c0b547755ac", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "conflict": { "doctrine/annotations": "<1.12", @@ -6520,7 +6975,7 @@ "symfony/yaml": "<5.4" }, "require-dev": { - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", "symfony/config": "^5.4|^6.0", "symfony/dependency-injection": "^5.4|^6.0", @@ -6566,7 +7021,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.1.3" + "source": "https://github.com/symfony/routing/tree/v6.0.19" }, "funding": [ { @@ -6582,24 +7037,24 @@ "type": "tidelift" } ], - "time": "2022-07-20T15:00:40+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.1.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239", - "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "psr/container": "^2.0" }, "conflict": { @@ -6611,7 +7066,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -6621,10 +7076,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6651,7 +7103,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, "funding": [ { @@ -6667,24 +7119,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:18:58+00:00" + "time": "2022-05-30T19:17:58+00:00" }, { "name": "symfony/string", - "version": "v6.1.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "290972cad7b364e3befaa74ba0ec729800fb161c" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/290972cad7b364e3befaa74ba0ec729800fb161c", - "reference": "290972cad7b364e3befaa74ba0ec729800fb161c", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -6736,7 +7188,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.1.4" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -6752,24 +7204,24 @@ "type": "tidelift" } ], - "time": "2022-08-12T18:05:43+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation", - "version": "v6.1.4", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "45d0f5bb8df7255651ca91c122fab604e776af03" + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/45d0f5bb8df7255651ca91c122fab604e776af03", - "reference": "45d0f5bb8df7255651ca91c122fab604e776af03", + "url": "https://api.github.com/repos/symfony/translation/zipball/9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.3|^3.0" }, @@ -6794,7 +7246,6 @@ "symfony/http-kernel": "^5.4|^6.0", "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0", "symfony/service-contracts": "^1.1.2|^2|^3", "symfony/yaml": "^5.4|^6.0" }, @@ -6832,7 +7283,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.1.4" + "source": "https://github.com/symfony/translation/tree/v6.0.19" }, "funding": [ { @@ -6848,24 +7299,24 @@ "type": "tidelift" } ], - "time": "2022-08-02T16:17:38+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.1.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "606be0f48e05116baef052f7f3abdb345c8e02cc" + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/606be0f48e05116baef052f7f3abdb345c8e02cc", - "reference": "606be0f48e05116baef052f7f3abdb345c8e02cc", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.0.2" }, "suggest": { "symfony/translation-implementation": "" @@ -6873,7 +7324,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -6883,10 +7334,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6913,7 +7361,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" }, "funding": [ { @@ -6929,24 +7377,24 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:24:16+00:00" + "time": "2022-06-27T17:10:44+00:00" }, { "name": "symfony/uid", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "ea2ccf0fdb88c83e626105b68e5bab5c132d812b" + "reference": "6499e28b0ac9f2aa3151e11845bdb5cd21e6bb9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/ea2ccf0fdb88c83e626105b68e5bab5c132d812b", - "reference": "ea2ccf0fdb88c83e626105b68e5bab5c132d812b", + "url": "https://api.github.com/repos/symfony/uid/zipball/6499e28b0ac9f2aa3151e11845bdb5cd21e6bb9d", + "reference": "6499e28b0ac9f2aa3151e11845bdb5cd21e6bb9d", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-uuid": "^1.15" }, "require-dev": { @@ -6987,7 +7435,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.1.3" + "source": "https://github.com/symfony/uid/tree/v6.0.19" }, "funding": [ { @@ -7003,24 +7451,24 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:46:29+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.1.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d5a5e44a2260c5eb5e746bf4f1fbd12ee6ceb427" + "reference": "eb980457fa6899840fe1687e8627a03a7d8a3d52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d5a5e44a2260c5eb5e746bf4f1fbd12ee6ceb427", - "reference": "d5a5e44a2260c5eb5e746bf4f1fbd12ee6ceb427", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb980457fa6899840fe1687e8627a03a7d8a3d52", + "reference": "eb980457fa6899840fe1687e8627a03a7d8a3d52", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -7075,7 +7523,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.1.3" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.19" }, "funding": [ { @@ -7091,7 +7539,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:46:29+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "tgalopin/html-sanitizer", @@ -7144,23 +7592,23 @@ }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.5", + "version": "v2.2.7", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19" + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/4348a3a06651827a27d989ad1d13efec6bb49b19", - "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" @@ -7191,45 +7639,49 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.5" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" }, - "time": "2022-09-12T13:28:28+00:00" + "time": "2023-12-08T13:03:43+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.4.1", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -7261,7 +7713,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -7273,7 +7725,7 @@ "type": "tidelift" } ], - "time": "2021-12-12T23:22:04+00:00" + "time": "2023-11-12T22:43:29+00:00" }, { "name": "voku/portable-ascii", @@ -7411,30 +7863,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -7461,7 +7913,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -7477,24 +7929,24 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "fakerphp/faker", - "version": "v1.20.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -7505,7 +7957,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -7515,11 +7968,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.20-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -7542,22 +7990,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2022-07-20T13:12:54+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "filp/whoops", - "version": "2.14.5", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -7607,7 +8055,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.5" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -7615,7 +8063,7 @@ "type": "github" } ], - "time": "2022-01-07T12:00:00+00:00" + "time": "2023-11-03T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7670,29 +8118,29 @@ }, { "name": "kkomelin/laravel-translatable-string-exporter", - "version": "1.17.0", + "version": "1.22.0", "source": { "type": "git", "url": "https://github.com/kkomelin/laravel-translatable-string-exporter.git", - "reference": "0425f2c3add32df852c002b11bffe72c9c67ec89" + "reference": "0c6dbec4694a7e702830ecfc005d131cd5ffe402" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/0425f2c3add32df852c002b11bffe72c9c67ec89", - "reference": "0425f2c3add32df852c002b11bffe72c9c67ec89", + "url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/0c6dbec4694a7e702830ecfc005d131cd5ffe402", + "reference": "0c6dbec4694a7e702830ecfc005d131cd5ffe402", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/support": "^5.4|^6|^7|^8|^9", - "illuminate/translation": "^5.4|^6|^7|^8|^9", - "php": "^7.2|^8.0", - "symfony/finder": "^3.2|^4|^5|^6" + "illuminate/support": "^8|^9|^10.0|^11.0", + "illuminate/translation": "^8|^9|^10.0|^11.0", + "php": "^8.0", + "symfony/finder": "^5|^6|^7.0" }, "require-dev": { "nunomaduro/larastan": "^1.0|^2.0", - "orchestra/testbench": "^3.4|^4.0|^5.0|^6.0|^7.0", - "phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0" + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5" }, "type": "library", "extra": { @@ -7729,22 +8177,22 @@ ], "support": { "issues": "https://github.com/kkomelin/laravel-translatable-string-exporter/issues", - "source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.17.0" + "source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.22.0" }, - "time": "2022-06-13T07:13:55+00:00" + "time": "2024-03-13T13:44:41+00:00" }, { "name": "laravel/pint", - "version": "v1.2.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "1d276e4c803397a26cc337df908f55c2a4e90d86" + "reference": "e0a8cef58b74662f27355be9cdea0e726bbac362" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/1d276e4c803397a26cc337df908f55c2a4e90d86", - "reference": "1d276e4c803397a26cc337df908f55c2a4e90d86", + "url": "https://api.github.com/repos/laravel/pint/zipball/e0a8cef58b74662f27355be9cdea0e726bbac362", + "reference": "e0a8cef58b74662f27355be9cdea0e726bbac362", "shasum": "" }, "require": { @@ -7755,13 +8203,13 @@ "php": "^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.11.0", - "illuminate/view": "^9.27", - "laravel-zero/framework": "^9.1.3", - "mockery/mockery": "^1.5.0", - "nunomaduro/larastan": "^2.2", - "nunomaduro/termwind": "^1.14.0", - "pestphp/pest": "^1.22.1" + "friendsofphp/php-cs-fixer": "^3.14.4", + "illuminate/view": "^9.51.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.4.0", + "nunomaduro/termwind": "^1.15.1", + "pestphp/pest": "^1.22.4" }, "bin": [ "builds/pint" @@ -7797,36 +8245,39 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2022-09-13T15:07:15+00:00" + "time": "2023-02-14T16:31:02+00:00" }, { "name": "laravel/sail", - "version": "v1.16.0", + "version": "v1.29.2", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "73030c18b769f27e6f6aacf7848d024fa9a55560" + "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/73030c18b769f27e6f6aacf7848d024fa9a55560", - "reference": "73030c18b769f27e6f6aacf7848d024fa9a55560", + "url": "https://api.github.com/repos/laravel/sail/zipball/a8e4e749735ba2f091856eafeb3f99db8cd6b621", + "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621", "shasum": "" }, "require": { - "illuminate/console": "^8.0|^9.0", - "illuminate/contracts": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "php": "^7.3|^8.0" + "illuminate/console": "^9.52.16|^10.0|^11.0", + "illuminate/contracts": "^9.52.16|^10.0|^11.0", + "illuminate/support": "^9.52.16|^10.0|^11.0", + "php": "^8.0", + "symfony/console": "^6.0|^7.0", + "symfony/yaml": "^6.0|^7.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpstan/phpstan": "^1.10" }, "bin": [ "bin/sail" ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, "laravel": { "providers": [ "Laravel\\Sail\\SailServiceProvider" @@ -7857,42 +8308,42 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-08-31T16:38:14+00:00" + "time": "2024-05-16T21:39:11+00:00" }, { "name": "mockery/mockery", - "version": "1.5.1", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", - "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -7903,12 +8354,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -7926,23 +8385,26 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.1" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2022-09-07T15:32:08+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -7980,7 +8442,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -7988,20 +8450,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nunomaduro/collision", - "version": "v6.3.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "17f600e2e8872856ff2846243efb74ad4b6da531" + "reference": "f05978827b9343cba381ca05b8c7deee346b6015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/17f600e2e8872856ff2846243efb74ad4b6da531", - "reference": "17f600e2e8872856ff2846243efb74ad4b6da531", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f05978827b9343cba381ca05b8c7deee346b6015", + "reference": "f05978827b9343cba381ca05b8c7deee346b6015", "shasum": "" }, "require": { @@ -8076,24 +8538,25 @@ "type": "patreon" } ], - "time": "2022-08-29T09:11:20+00:00" + "time": "2023-01-03T12:54:54+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -8134,9 +8597,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -8191,23 +8660,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.17", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -8222,8 +8691,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -8256,7 +8725,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -8264,7 +8734,7 @@ "type": "github" } ], - "time": "2022-08-30T12:24:04+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8509,20 +8979,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.24", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -8533,26 +9003,26 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.1", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -8560,7 +9030,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -8591,7 +9061,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -8601,22 +9072,26 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-08-30T07:42:16+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -8651,7 +9126,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -8659,7 +9134,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -8848,20 +9323,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -8893,7 +9368,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -8901,20 +9376,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -8959,7 +9434,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -8967,20 +9442,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -9022,7 +9497,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -9030,20 +9505,20 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -9099,7 +9574,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -9107,20 +9582,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -9163,7 +9638,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -9171,24 +9646,24 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -9220,7 +9695,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -9228,7 +9703,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -9344,16 +9819,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -9392,10 +9867,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -9403,20 +9878,20 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -9428,7 +9903,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -9449,8 +9924,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -9458,20 +9932,20 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -9506,7 +9980,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -9514,7 +9988,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -9571,16 +10045,16 @@ }, { "name": "spatie/backtrace", - "version": "1.2.1", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", - "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23", + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23", "shasum": "" }, "require": { @@ -9588,7 +10062,9 @@ }, "require-dev": { "ext-json": "*", + "laravel/serializable-closure": "^1.3", "phpunit/phpunit": "^9.3", + "spatie/phpunit-snapshot-assertions": "^4.2", "symfony/var-dumper": "^5.1" }, "type": "library", @@ -9616,8 +10092,7 @@ "spatie" ], "support": { - "issues": "https://github.com/spatie/backtrace/issues", - "source": "https://github.com/spatie/backtrace/tree/1.2.1" + "source": "https://github.com/spatie/backtrace/tree/1.6.1" }, "funding": [ { @@ -9629,43 +10104,43 @@ "type": "other" } ], - "time": "2021-11-09T10:57:15+00:00" + "time": "2024-04-24T13:22:11+00:00" }, { "name": "spatie/flare-client-php", - "version": "1.3.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "b1b974348750925b717fa8c8b97a0db0d1aa40ca" + "reference": "220a7c8745e9fa427d54099f47147c4b97fe6462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/b1b974348750925b717fa8c8b97a0db0d1aa40ca", - "reference": "b1b974348750925b717fa8c8b97a0db0d1aa40ca", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/220a7c8745e9fa427d54099f47147c4b97fe6462", + "reference": "220a7c8745e9fa427d54099f47147c4b97fe6462", "shasum": "" }, "require": { - "illuminate/pipeline": "^8.0|^9.0", + "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0", "php": "^8.0", - "spatie/backtrace": "^1.2", - "symfony/http-foundation": "^5.0|^6.0", - "symfony/mime": "^5.2|^6.0", - "symfony/process": "^5.2|^6.0", - "symfony/var-dumper": "^5.2|^6.0" + "spatie/backtrace": "^1.5.2", + "symfony/http-foundation": "^5.2|^6.0|^7.0", + "symfony/mime": "^5.2|^6.0|^7.0", + "symfony/process": "^5.2|^6.0|^7.0", + "symfony/var-dumper": "^5.2|^6.0|^7.0" }, "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.3.0", - "pestphp/pest": "^1.20", + "dms/phpunit-arraysubset-asserts": "^0.5.0", + "pestphp/pest": "^1.20|^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "spatie/phpunit-snapshot-assertions": "^4.0" + "spatie/phpunit-snapshot-assertions": "^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1.x-dev" + "dev-main": "1.3.x-dev" } }, "autoload": { @@ -9690,7 +10165,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.3.0" + "source": "https://github.com/spatie/flare-client-php/tree/1.6.0" }, "funding": [ { @@ -9698,43 +10173,51 @@ "type": "github" } ], - "time": "2022-08-08T10:10:20+00:00" + "time": "2024-05-22T09:45:39+00:00" }, { "name": "spatie/ignition", - "version": "1.4.1", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1" + "reference": "5e11c11f675bb5251f061491a493e04a1a571532" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/dd3d456779108d7078baf4e43f8c2b937d9794a1", - "reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1", + "url": "https://api.github.com/repos/spatie/ignition/zipball/5e11c11f675bb5251f061491a493e04a1a571532", + "reference": "5e11c11f675bb5251f061491a493e04a1a571532", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "monolog/monolog": "^2.0", "php": "^8.0", - "spatie/flare-client-php": "^1.1", - "symfony/console": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "spatie/backtrace": "^1.5.3", + "spatie/flare-client-php": "^1.4.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "require-dev": { + "illuminate/cache": "^9.52|^10.0|^11.0", "mockery/mockery": "^1.4", - "pestphp/pest": "^1.20", + "pestphp/pest": "^1.20|^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "symfony/process": "^5.4|^6.0" + "psr/simple-cache-implementation": "*", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "vlucas/phpdotenv": "^5.5" + }, + "suggest": { + "openai-php/client": "Require get solutions from OpenAI", + "simple-cache-implementation": "To cache solutions from OpenAI" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.2.x-dev" + "dev-main": "1.5.x-dev" } }, "autoload": { @@ -9773,20 +10256,20 @@ "type": "github" } ], - "time": "2022-08-26T11:51:15+00:00" + "time": "2024-05-29T08:10:20+00:00" }, { "name": "spatie/laravel-ignition", - "version": "1.5.0", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "192962f4d84526f6868c512530c00633e3165749" + "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/192962f4d84526f6868c512530c00633e3165749", - "reference": "192962f4d84526f6868c512530c00633e3165749", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", + "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", "shasum": "" }, "require": { @@ -9863,20 +10346,94 @@ "type": "github" } ], - "time": "2022-09-16T13:45:54+00:00" + "time": "2023-01-03T19:28:04+00:00" + }, + { + "name": "symfony/yaml", + "version": "v6.0.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "deec3a812a0305a50db8ae689b183f43d915c884" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/deec3a812a0305a50db8ae689b183f43d915c884", + "reference": "deec3a812a0305a50db8ae689b183f43d915c884", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v6.0.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-11T11:50:03+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -9905,7 +10462,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -9913,7 +10470,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -9925,5 +10482,5 @@ "php": "^8.0.2" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.6.0" } diff --git a/config/database.php b/config/database.php index 137ad18..469391d 100644 --- a/config/database.php +++ b/config/database.php @@ -46,17 +46,17 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), + 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', '1234'), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, - 'strict' => true, + 'strict' => false, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), diff --git a/config/mail.php b/config/mail.php index 534395a..7f4a431 100644 --- a/config/mail.php +++ b/config/mail.php @@ -36,13 +36,14 @@ 'mailers' => [ 'smtp' => [ 'transport' => 'smtp', - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'host' => env('MAIL_HOST', 'mail.myipo.gov.my'), 'port' => env('MAIL_PORT', 587), 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), + 'auth_mode' => null, + 'verify_peer' => false, ], 'ses' => [ diff --git a/config/system.php b/config/system.php index a949461..81cf428 100644 --- a/config/system.php +++ b/config/system.php @@ -60,20 +60,28 @@ */ 'main_menu' => [ [ - 'title' => 'Overview', - 'route' => 'home', + 'title' => 'Dashboard', + 'route' => 'analytics', 'icon' => 'fa-table-columns', - 'always_shown' => true, + 'always_shown' => false, 'show_notification_indicator' => false, - 'permissions' => [''] + 'permissions' => ['Can view Analytics page'] ], [ - 'title' => 'Analytics', - 'route' => 'analytics', - 'icon' => 'fa-chart-bar', + 'title' => 'Manage notice banners', + 'route' => 'notice-banners', + 'icon' => 'fa-bullhorn', 'always_shown' => false, 'show_notification_indicator' => false, - 'permissions' => ['Can view Analytics page'] + 'permissions' => ['Manage notice banners'] + ], + [ + 'title' => 'View Announcements', + 'route' => 'announcements', + 'icon' => 'fa-bullhorn', + 'always_shown' => false, + 'show_notification_indicator' => false, + 'permissions' => ['Can view Announcement page'] ], [ 'title' => 'Tickets', @@ -98,27 +106,19 @@ 'always_shown' => false, 'show_notification_indicator' => false, 'permissions' => [ - 'View all users', 'View company users', - 'View all companies', 'View own companies', + 'View all users', 'Manage ticket statuses', 'Manage ticket types', 'Manage ticket priorities', - 'View activity log' + 'View activity log', ], 'children' => [ - [ - 'title' => 'Manage companies', - 'route' => 'administration.companies', - 'icon' => 'fa-building', - 'always_shown' => false, - 'permissions' => ['View all companies', 'View own companies'] - ], [ 'title' => 'Manage users', 'route' => 'administration.users', 'icon' => 'fa-users', 'always_shown' => false, - 'permissions' => ['View all users', 'View company users'] + 'permissions' => ['View all users'] ], [ 'title' => 'Manage user roles', @@ -141,6 +141,27 @@ 'always_shown' => false, 'permissions' => ['Manage ticket types'] ], + [ + 'title' => 'Manage categories', + 'route' => 'administration.ticket-categories', + 'icon' => 'fa-copy', + 'always_shown' => false, + 'permissions' => ['Manage ticket categories'] + ], + [ + 'title' => 'Manage subcategories', + 'route' => 'administration.ticket-subcategories', + 'icon' => 'fa-copy', + 'always_shown' => false, + 'permissions' => ['Manage ticket categories'] + ], + [ + 'title' => 'Manage issues', + 'route' => 'administration.ticket-issues', + 'icon' => 'fa-copy', + 'always_shown' => false, + 'permissions' => ['Manage ticket categories'] + ], [ 'title' => 'Manage priorities', 'route' => 'administration.ticket-priorities', diff --git a/database/migrations/2022_09_09_220749_create_tickets_table.php b/database/migrations/2022_09_09_220749_create_tickets_table.php index 49b08a2..68d61c7 100644 --- a/database/migrations/2022_09_09_220749_create_tickets_table.php +++ b/database/migrations/2022_09_09_220749_create_tickets_table.php @@ -16,11 +16,13 @@ public function up() Schema::create('tickets', function (Blueprint $table) { $table->id(); $table->string('title'); - $table->longText('content'); + $table->longText('content')->nullable(); $table->string('status'); - $table->string('priority'); + $table->string('priority')->nullable(); $table->foreignId('owner_id')->constrained('users'); $table->foreignId('responsible_id')->nullable()->constrained('users'); + $table->date('inprogress_at')->nullable(); + $table->date('closed_at')->nullable(); $table->softDeletes(); $table->timestamps(); }); diff --git a/database/migrations/2022_09_10_205032_create_projects_table.php b/database/migrations/2022_09_10_205032_create_projects_table.php deleted file mode 100644 index 78b9a8a..0000000 --- a/database/migrations/2022_09_10_205032_create_projects_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->string('name'); - $table->longText('description')->nullable(); - $table->foreignId('owner_id')->constrained('users'); - $table->softDeletes(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('projects'); - } -}; diff --git a/database/migrations/2022_09_19_122821_add_slug_to_ticket_types.php b/database/migrations/2022_09_19_122821_add_slug_to_ticket_types.php index 766b258..03f0216 100644 --- a/database/migrations/2022_09_19_122821_add_slug_to_ticket_types.php +++ b/database/migrations/2022_09_19_122821_add_slug_to_ticket_types.php @@ -14,7 +14,7 @@ public function up() { Schema::table('ticket_types', function (Blueprint $table) { - $table->string('slug', 500); + $table->string('slug', 500)->unique(); }); } diff --git a/database/migrations/2022_09_19_181611_drop_user_projects.php b/database/migrations/2022_09_19_181611_drop_user_projects.php deleted file mode 100644 index c6346f2..0000000 --- a/database/migrations/2022_09_19_181611_drop_user_projects.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignId('user_id')->constrained('users'); - $table->foreignId('project_id')->constrained('projects'); - $table->string('role'); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2022_09_24_230950_create_companies_table.php b/database/migrations/2022_09_24_230950_create_companies_table.php deleted file mode 100644 index 3633255..0000000 --- a/database/migrations/2022_09_24_230950_create_companies_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - $table->string('name'); - $table->string('logo')->nullable(); - $table->longText('description')->nullable(); - $table->boolean('is_disabled')->default(false); - $table->foreignId('responsible_id')->constrained('users'); - $table->softDeletes(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('companies'); - } -}; diff --git a/database/migrations/2022_09_30_133603_add_company_id_to_projects.php b/database/migrations/2022_09_30_133603_add_company_id_to_projects.php deleted file mode 100644 index 3813886..0000000 --- a/database/migrations/2022_09_30_133603_add_company_id_to_projects.php +++ /dev/null @@ -1,32 +0,0 @@ -foreignId('company_id')->nullable()->constrained('companies'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('projects', function (Blueprint $table) { - $table->dropForeign(['company_id']); - $table->dropColumn('company_id'); - }); - } -}; diff --git a/database/migrations/2022_09_10_205612_create_user_projects_table.php b/database/migrations/2024_03_19_075636_create_notices_table.php similarity index 61% rename from database/migrations/2022_09_10_205612_create_user_projects_table.php rename to database/migrations/2024_03_19_075636_create_notices_table.php index 9269e2d..fb3e287 100644 --- a/database/migrations/2022_09_10_205612_create_user_projects_table.php +++ b/database/migrations/2024_03_19_075636_create_notices_table.php @@ -13,11 +13,13 @@ */ public function up() { - Schema::create('user_projects', function (Blueprint $table) { + Schema::create('notices', function (Blueprint $table) { $table->id(); - $table->foreignId('user_id')->constrained('users'); - $table->foreignId('project_id')->constrained('projects'); - $table->string('role'); + $table->string('title'); + $table->string('content'); + $table->string('category'); + $table->string('status'); + $table->softDeletes(); $table->timestamps(); }); } @@ -29,6 +31,6 @@ public function up() */ public function down() { - Schema::dropIfExists('user_projects'); + Schema::dropIfExists('notices'); } }; diff --git a/database/migrations/2022_09_19_143232_add_ticket_prefix_to_projects.php b/database/migrations/2024_03_20_024250_add_slug_to_notice_banners.php similarity index 59% rename from database/migrations/2022_09_19_143232_add_ticket_prefix_to_projects.php rename to database/migrations/2024_03_20_024250_add_slug_to_notice_banners.php index 440a327..eaf459f 100644 --- a/database/migrations/2022_09_19_143232_add_ticket_prefix_to_projects.php +++ b/database/migrations/2024_03_20_024250_add_slug_to_notice_banners.php @@ -4,7 +4,8 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { +return new class extends Migration +{ /** * Run the migrations. * @@ -12,8 +13,8 @@ */ public function up() { - Schema::table('projects', function (Blueprint $table) { - $table->string('ticket_prefix', 4); + Schema::table('notices', function (Blueprint $table) { + $table->string('slug', 500); }); } @@ -24,8 +25,8 @@ public function up() */ public function down() { - Schema::table('projects', function (Blueprint $table) { - $table->dropColumn('ticket_prefix'); + Schema::table('notices', function (Blueprint $table) { + $table->dropColumn('slug'); }); } }; diff --git a/database/migrations/2022_09_10_205915_add_project_to_tickets.php b/database/migrations/2024_04_02_062847_add_category_to_tickets.php similarity index 76% rename from database/migrations/2022_09_10_205915_add_project_to_tickets.php rename to database/migrations/2024_04_02_062847_add_category_to_tickets.php index 2473125..71fcbdd 100644 --- a/database/migrations/2022_09_10_205915_add_project_to_tickets.php +++ b/database/migrations/2024_04_02_062847_add_category_to_tickets.php @@ -14,7 +14,7 @@ public function up() { Schema::table('tickets', function (Blueprint $table) { - $table->foreignId('project_id')->constrained('projects'); + $table->string('category'); }); } @@ -26,8 +26,7 @@ public function up() public function down() { Schema::table('tickets', function (Blueprint $table) { - $table->dropForeign(['project_id']); - $table->dropColumn('project_id'); + $table->dropColumn('category'); }); } }; diff --git a/database/migrations/2024_04_02_062921_create_ticket_categories_table.php b/database/migrations/2024_04_02_062921_create_ticket_categories_table.php new file mode 100644 index 0000000..67a121d --- /dev/null +++ b/database/migrations/2024_04_02_062921_create_ticket_categories_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('title')->unique(); + $table->foreignId('parent_id')->nullable()->constrained('ticket_categories'); + $table->string('level'); // New column to distinguish between category, subcategory, and issue + $table->string('text_color'); + $table->string('bg_color'); + $table->string('type')->nullable(); + $table->foreign('type')->references('slug')->on('ticket_types')->onDelete('set null'); + $table->string('slug',500); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('ticket_categories'); + } +}; diff --git a/database/migrations/2022_09_25_165452_create_company_users_table.php b/database/migrations/2024_05_20_023214_add_subcategory_to_tickets.php similarity index 56% rename from database/migrations/2022_09_25_165452_create_company_users_table.php rename to database/migrations/2024_05_20_023214_add_subcategory_to_tickets.php index 77f712a..400cd99 100644 --- a/database/migrations/2022_09_25_165452_create_company_users_table.php +++ b/database/migrations/2024_05_20_023214_add_subcategory_to_tickets.php @@ -13,11 +13,8 @@ */ public function up() { - Schema::create('company_users', function (Blueprint $table) { - $table->id(); - $table->foreignId('user_id')->constrained('users'); - $table->foreignId('company_id')->constrained('companies'); - $table->timestamps(); + Schema::table('tickets', function (Blueprint $table) { + $table->string('subcategory'); }); } @@ -28,6 +25,8 @@ public function up() */ public function down() { - Schema::dropIfExists('company_users'); + Schema::table('tickets', function (Blueprint $table) { + $table->dropColumn('subcategory'); + }); } }; diff --git a/database/migrations/2022_09_11_163751_create_favorite_projects_table.php b/database/migrations/2024_07_09_074240_add_issue_to_tickets.php similarity index 56% rename from database/migrations/2022_09_11_163751_create_favorite_projects_table.php rename to database/migrations/2024_07_09_074240_add_issue_to_tickets.php index a5e7872..d26a087 100644 --- a/database/migrations/2022_09_11_163751_create_favorite_projects_table.php +++ b/database/migrations/2024_07_09_074240_add_issue_to_tickets.php @@ -13,11 +13,8 @@ */ public function up() { - Schema::create('favorite_projects', function (Blueprint $table) { - $table->id(); - $table->foreignId('user_id')->constrained('users'); - $table->foreignId('project_id')->constrained('projects'); - $table->timestamps(); + Schema::table('tickets', function (Blueprint $table) { + $table->string('issue')->nullable(); }); } @@ -28,6 +25,8 @@ public function up() */ public function down() { - Schema::dropIfExists('favorite_projects'); + Schema::table('tickets', function (Blueprint $table) { + $table->dropColumn('issue'); + }); } }; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index ac58745..336d23d 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,6 +15,9 @@ class DatabaseSeeder extends Seeder public function run() { $this->call(FontAwesomeFreeSeeder::class); + $this->call(UserSeeder::class); + $this->call(TicketDetailsSeeder::class); + $this->call(TicketSeeder::class); $this->call(PermissionsSeeder::class); } } diff --git a/database/seeders/FontAwesomeFreeSeeder.php b/database/seeders/FontAwesomeFreeSeeder.php index 451d2fa..a70c534 100644 --- a/database/seeders/FontAwesomeFreeSeeder.php +++ b/database/seeders/FontAwesomeFreeSeeder.php @@ -1466,6 +1466,7 @@ class FontAwesomeFreeSeeder extends Seeder 1455 => 'fa-youtube', 1456 => 'fa-youtube-square', 1457 => 'fa-zhihu', + 1458 => 'fa-solid fa-g', ); /** diff --git a/database/seeders/ModelPermission.php b/database/seeders/ModelPermission.php new file mode 100644 index 0000000..f720678 --- /dev/null +++ b/database/seeders/ModelPermission.php @@ -0,0 +1,22 @@ +givePermissionTo('Can view Kanban page'); + } +} diff --git a/database/seeders/PermissionsSeeder.php b/database/seeders/PermissionsSeeder.php index 3b8a705..2564ff1 100644 --- a/database/seeders/PermissionsSeeder.php +++ b/database/seeders/PermissionsSeeder.php @@ -3,22 +3,18 @@ namespace Database\Seeders; use Illuminate\Database\Console\Seeds\WithoutModelEvents; +use App\Models\User; use Illuminate\Database\Seeder; +use Spatie\Permission\Models\Role; use Spatie\Permission\Models\Permission; class PermissionsSeeder extends Seeder { const permissions = [ - 'View all projects', - 'Update all projects', - 'Delete all projects', - 'Create projects', - 'View own projects', - 'Update own projects', - 'Delete own projects', 'View all tickets', 'Update all tickets', 'Delete all tickets', + 'Update some tickets', 'Create tickets', 'View own tickets', 'Update own tickets', @@ -28,25 +24,26 @@ class PermissionsSeeder extends Seeder 'Can view Analytics page', 'Can view Tickets page', 'Can view Kanban page', + 'Can view Dashboard', + 'Can view Announcement page', 'View all users', - 'View company users', 'Create users', 'Update users', 'Delete users', 'Assign permissions', - 'View all companies', - 'View own companies', - 'Create companies', - 'Update companies', - 'Delete companies', + 'Manage notice banners', 'Manage ticket statuses', 'Manage ticket priorities', 'Manage ticket types', + 'Manage ticket categories', 'View activity log', 'Manage user roles', 'Create user roles', 'Update user roles', 'Delete user roles', + + + ]; /** @@ -61,5 +58,94 @@ public function run() Permission::create(['name' => $permission]); } } + + Role::create(["name" => "administrator"]) + ->givePermissionTo([ + 'View all tickets', + 'Update all tickets', + 'Delete all tickets', + 'Create tickets', + 'View own tickets', + 'Update own tickets', + 'Delete own tickets', + 'Assign tickets', + 'Change status tickets', + 'Can view Analytics page', + 'Can view Tickets page', + 'Can view Kanban page', + 'Can view Dashboard', + 'View all users', + 'Create users', + 'Update users', + 'Delete users', + 'Assign permissions', + 'Manage ticket statuses', + 'Manage ticket priorities', + 'Manage ticket types', + 'Manage ticket categories', + 'Manage notice banners', + 'View activity log', + 'Manage user roles', + 'Create user roles', + 'Update user roles', + 'Delete user roles' + ]); + + Role::create(["name" => "Head of Department"]) + ->givePermissionTo([ + 'View all tickets', + 'Update all tickets', + 'Create tickets', + 'View own tickets', + 'Update own tickets', + 'Delete own tickets', + 'Can view Tickets page', + 'Can view Dashboard', + ]); + + Role::create(["name" => "technician"]) + ->givePermissionTo([ + 'View all tickets', + 'Update some tickets', + 'Change status tickets', + 'Create tickets', + 'View own tickets', + 'Update own tickets', + 'Delete own tickets', + 'Can view Tickets page' + ]); + + Role::create(["name" => "Human Resources"]) + ->givePermissionTo([ + 'View own tickets', + 'Create tickets', + 'Update own tickets', + 'Delete own tickets', + 'Can view Tickets page', + 'Can view Announcement page', + ]); + + Role::create(["name" => "user"]) + ->givePermissionTo([ + 'View own tickets', + 'Create tickets', + 'Update own tickets', + 'Delete own tickets', + 'Can view Tickets page', + 'Can view Announcement page', + + + ]); + + User::find(1)->assignRole('administrator'); + User::find(2)->assignRole('Head of Department'); + User::find(3)->assignRole('technician'); + User::find(4)->assignRole('technician'); + User::find(5)->assignRole('Human Resources'); + User::find(6)->assignRole('user'); + User::find(7)->assignRole('user'); + User::find(8)->assignRole('user'); + User::find(9)->assignRole('user'); + } } diff --git a/database/seeders/TicketDetailsSeeder.php b/database/seeders/TicketDetailsSeeder.php new file mode 100644 index 0000000..3d3ffac --- /dev/null +++ b/database/seeders/TicketDetailsSeeder.php @@ -0,0 +1,776 @@ +insert( + array( + 'title' => 'Low', + 'text_color' => '#000000', + 'bg_color' => '#d4edda', + 'icon' => 'fa-1 ', + 'slug' => 'low', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_priorities')->insert( + array( + 'title' => 'Medium', + 'text_color' => '#000000', + 'bg_color' => '#fff3cd', + 'icon' => 'fa-2', + 'slug' => 'medium', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_priorities')->insert( + array( + 'title' => 'High', + 'text_color' => '#ffffff', + 'bg_color' => '#fd7e14', + 'icon' => 'fa-3', + 'slug' => 'high', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_priorities')->insert( + array( + 'title' => 'Critical', + 'text_color' => '#ffffff', + 'bg_color' => '#721c24', + 'icon' => 'fa-exclamation', + 'slug' => 'critical', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + //Ticket statuses + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Open', + 'text_color' => '#ffffff', + 'bg_color' => '#c2c9c7', + 'default' => 1, + 'slug' => 'open', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + //Ticket statuses + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Pending', + 'text_color' => '#ffffff', + 'bg_color' => '#ff3342', + 'default' => 0, + 'slug' => 'pending', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_statuses')->insert( + array( + 'title' => 'In Progress', + 'text_color' => '#ffffff', + 'bg_color' => '#ffd133', + 'default' => 0, + 'slug' => 'inprogress', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Resolved', + 'text_color' => '#ffffff', + 'bg_color' => '#33ff7a', + 'default' => 0, + 'slug' => 'resolved', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Closed', + 'text_color' => '#ffffff', + 'bg_color' => '#343a40', + 'default' => 0, + 'slug' => 'closed', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Approved', + 'text_color' => '#ffffff', + 'bg_color' => '#1589D1', + 'default' => 0, + 'slug' => 'approved', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_statuses')->insert( + array( + 'title' => 'Disapproved', + 'text_color' => '#ffffff', + 'bg_color' => '#E86A22', + 'default' => 0, + 'slug' => 'disapproved', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + //Ticket types + DB::table('ticket_types')->insert( + array( + 'title' => 'Incident', + 'text_color' => '#ffffff', + 'bg_color' => '#dc3545', + 'icon' => 'fa-exclamation', + 'slug' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_types')->insert( + array( + 'title' => 'Service Request', + 'text_color' => '#ffffff', + 'bg_color' => '#007bff', + 'icon' => 'fa-solid fa-screwdriver-wrench', + 'slug' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_types')->insert( + array( + 'title' => 'Change Request', + 'text_color' => '#ffffff', + 'bg_color' => '#fd7e14', + 'icon' => 'fa-solid fa-arrows-rotate', + 'slug' => 'changerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 1 + array( + 'title' => 'Hardware', + 'parent_id' => null, + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'slug' => 'hardware', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 2 + array( + 'title' => 'SFF / AIO / Laptop', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 1, + 'slug' => 'pc', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 3 + array( + 'title' => 'PC Repair or Replacement', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 2, + 'slug' => 'repairpc', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 4 + array( + 'title' => 'Peripheral Issues (Keyboard, Mouse, Monitor)', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 2, + 'slug' => 'peripheral', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 5 + array( + 'title' => 'Printers and Scanners', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 1, + 'slug' => 'printer', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 6 + array( + 'title' => 'Setup or Configuration', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 5, + 'slug' => 'setupprinter', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 7 + array( + 'title' => 'Printer/Scanner Repair or Replacement', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 5, + 'slug' => 'repairprinter', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 8 + array( + 'title' => 'Connectivity Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 5, + 'slug' => 'printerconnectivity', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 9 + array( + 'title' => 'Printing Quality Problems', + 'text_color' => '#ffffff', + 'bg_color' => '#28a745', + 'parent_id' => 5, + 'slug' => 'printerquality', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 10 + array( + 'title' => 'Software', + 'parent_id' => null, + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'slug' => 'software', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 11 + array( + 'title' => 'Operating Systems', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 10, + 'slug' => 'os', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 12 + array( + 'title' => 'OS Installation or Upgrade', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 11, + 'slug' => 'installos', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 13 + array( + 'title' => 'OS Performance Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 11, + 'slug' => 'osperformance', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + + DB::table('ticket_categories')->insert(// 14 + array( + 'title' => 'Applications', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 10, + 'slug' => 'apps', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 15 + array( + 'title' => 'Application Installation or Upgrade', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 14, + 'slug' => 'appinstall', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 16 + array( + 'title' => 'Licensing Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 14, + 'slug' => 'applicense', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 17 + array( + 'title' => 'Functionality Problems', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 14, + 'slug' => 'appfunction', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 18 + array( + 'title' => 'Email', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 10, + 'slug' => 'email', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 19 + array( + 'title' => 'Mailbox Quotas', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 18, + 'slug' => 'emailquota', + 'level' => 'issue', + 'type' => 'changerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 20 + array( + 'title' => 'Email Performance Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 18, + 'slug' => 'emailperformance', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 21 + array( + 'title' => 'Connectivity Problems', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 18, + 'slug' => 'emailconnectivity', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 22 + array( + 'title' => 'Setup Account Mobile', + 'text_color' => '#ffffff', + 'bg_color' => '#aaa233', + 'parent_id' => 18, + 'slug' => 'emailsetup', + 'level' => 'issue', + 'type' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 23 + array( + 'title' => 'Network', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => null, + 'slug' => 'network', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 24 + array( + 'title' => 'Connectivity', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 23, + 'slug' => 'connectivity', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 25 + array( + 'title' => 'Wired/Wireless Access Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 24, + 'slug' => 'networkaccess', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 26 + array( + 'title' => 'VPN Connectivity Problems', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 24, + 'slug' => 'vpnconnectivity', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 27 + array( + 'title' => 'VPN - Request Configuration', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 24, + 'slug' => 'vpnconfigure', + 'level' => 'issue', + 'type' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 28 + array( + 'title' => 'Network Performance', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 24, + 'slug' => 'networkperformance', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + + DB::table('ticket_categories')->insert(// 29 + array( + 'title' => 'Security', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 23, + 'slug' => 'security', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 30 + array( + 'title' => 'Firewall Issues', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 29, + 'slug' => 'firewall', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 31 + array( + 'title' => 'Virus Attack', + 'text_color' => '#ffffff', + 'bg_color' => '#ccc233', + 'parent_id' => 29, + 'slug' => 'virus', + 'level' => 'issue', + 'type' => 'incident', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 32 + array( + 'title' => 'Accounts and Access', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => null, + 'slug' => 'accountaccess', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 33 + array( + 'title' => 'User Accounts', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => 32, + 'slug' => 'useraccount', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 34 + array( + 'title' => 'Password Resets', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => 33, + 'slug' => 'passwordreset', + 'level' => 'issue', + 'type' => 'changerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 35 + array( + 'title' => 'e-Cloud MyIPO', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => 32, + 'slug' => 'ecloud', + 'level' => 'subcategory', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 36 + array( + 'title' => 'Unblock Account', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => 35, + 'slug' => 'unblockaccount', + 'level' => 'issue', + 'type' => 'changerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 37 + array( + 'title' => 'Network Access Right', + 'text_color' => '#ffffff', + 'bg_color' => '#bbb444', + 'parent_id' => 32, + 'slug' => 'networkaccessright', + 'level' => 'subcategory', + 'type' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 38 + array( + 'title' => 'New User Account & Computer Installation', + 'text_color' => '#ffffff', + 'bg_color' => '#abc123', + 'parent_id' => null, + 'slug' => 'newuser', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 39 + array( + 'title' => 'Create New Account & Computer Installation', + 'text_color' => '#ffffff', + 'bg_color' => '#abc123', + 'parent_id' => 38, + 'slug' => 'createaccount', + 'level' => 'subcategory', + 'type' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 40 + array( + 'title' => 'User Re-Placement', + 'text_color' => '#ffffff', + 'bg_color' => '#cba321', + 'parent_id' => null, + 'slug' => 'userreplacement', + 'level' => 'category', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('ticket_categories')->insert(// 41 + array( + 'title' => 'User & Location', + 'text_color' => '#ffffff', + 'bg_color' => '#cba321', + 'parent_id' => 40, + 'slug' => 'userlocation', + 'level' => 'subcategory', + 'type' => 'servicerequest', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('notices')->insert( + array( + 'title' => 'System Maintenance', + 'content' => 'ICT System Maintenance Scheduled for March 16, 2024. Expect Temporary Service Disruptions.', + 'category' => 'System', + 'status' => 1, + 'slug' => 'maintenance', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('notices')->insert( + array( + 'title' => 'Test', + 'content' => 'test', + 'category' => 'test', + 'status' => 1, + 'slug' => 'test', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + } +} diff --git a/database/seeders/TicketSeeder.php b/database/seeders/TicketSeeder.php new file mode 100644 index 0000000..797d05b --- /dev/null +++ b/database/seeders/TicketSeeder.php @@ -0,0 +1,152 @@ + [ + 'pc' => ['repairpc' => 'incident' ,'peripheral' => 'incident'], + 'printer' => ['setupprinter' => 'incident','repairprinter' => 'incident','printerconnectivity' => 'incident','printerquality' => 'incident'] + ], + 'software' => [ + 'os' => ['installos' => 'incident','osperformance' => 'incident'], + 'apps' => ['appinstall' => 'incident','applicense' => 'incident','appfunction' => 'incident'], + 'email' => ['emailquota' => 'changerequest','emailperformance' => 'incident','emailconnectivity' => 'incident','emailsetup' => 'servicerequest'] + ], + 'network' => [ + 'connectivity' => ['networkaccess' => 'incident','vpnconnectivity' => 'incident','vpnconfigure' => 'servicerequest','networkperformance' => 'incident'], + 'security' => ['firewall' => 'incident','virus' => 'incident'] + ], + 'accountaccess' => [ + 'useraccount' => ['passwordreset' => 'changerequest'], + 'ecloud' => ['unblockaccount' => 'changerequest'], + 'networkaccessright' => 'servicerequest' + ], + 'newuser' => ['createaccount' => 'servicerequest'], + 'userreplacement' => ['userlocation' => 'servicerequest'], + ]; + $status = ['pending', 'inprogress', 'resolved', 'closed']; + $priority = ['low', 'medium', 'high', 'critical']; + $type = ['incident', 'servicerequest', 'changerequest']; + $owner_id = [4,5,6,7,8]; + $responsible_id = [3,4]; + $number_strings = []; + + // Define the start and end dates + $startDate = new DateTime('2024-01-01'); + $endDate = new DateTime('2024-6-31'); + + // Get the timestamps for the start and end dates + $startTimestamp = $startDate->getTimestamp(); + $endTimestamp = $endDate->getTimestamp(); + + // Seed the tickets + for ($i = 0; $i < 50; $i++) { + // Generate a random timestamp between the start and end dates + $randomTimestamp = mt_rand($startTimestamp, $endTimestamp); + + // Create a DateTime object from the random timestamp + $randomDate = (new DateTime())->setTimestamp($randomTimestamp); + // Format the dates to use in the database + $formattedCreatedDate = $randomDate->format('Y-m-d H:i:s'); + + // Generate a random number of days between 0 and 10 + $randomDays = mt_rand(0, 3); + $updatedDate = $randomDate->modify("+{$randomDays} days"); + $formattedUpdatedDate = $updatedDate->format('Y-m-d H:i:s'); + + $randomDays = mt_rand(0, 3); + $closedDate = $updatedDate->modify("+{$randomDays} days"); + $formattedClosedDate = $closedDate->format('Y-m-d H:i:s'); + + $randomStatus = $status[array_rand($status)]; + $randompriority = $priority[array_rand($priority)]; + $randomType = $type[array_rand($type)]; + $randomOwner_id = $owner_id[array_rand($owner_id)]; + $randomResponsible_id = $responsible_id[array_rand($responsible_id)]; + + $number_strings[] = str_pad($i, 4, '0', STR_PAD_LEFT); + + // Randomly select a category +$randomCategoryKey = array_rand($category); +$randomCategory = $category[$randomCategoryKey]; + +// Randomly select a subcategory within the chosen category +$randomSubcategoryKey = array_rand($randomCategory); +$randomSubcategory = $randomCategory[$randomSubcategoryKey]; + +// Initialize variables for issue and type +$randomIssue = null; +$randomType = null; + +// Check if the subcategory has issues +if (is_array($randomSubcategory)) { + // Randomly select an issue within the chosen subcategory + $randomIssueKey = array_rand($randomSubcategory); + $randomIssue = $randomIssueKey; + $randomType = $randomSubcategory[$randomIssueKey]; +} else { + // Subcategory directly provides the type + $randomType = $randomSubcategory; +} + + DB::table('tickets')->insert( + array( + 'title' => $faker->sentence(3), + 'content' => '

'.$faker->paragraph(2).'

', + 'status' => $randomStatus, + 'priority' => $randompriority, + 'owner_id' => $randomOwner_id, + 'responsible_id' => $randomResponsible_id, + 'type' => $randomType, + 'number' => $number_strings[$i], + 'category' => $randomCategoryKey, + 'subcategory' => $randomSubcategoryKey, + 'issue' => $randomIssue, + 'created_at' => $formattedCreatedDate, + 'inprogress_at' => $formattedUpdatedDate, + 'closed_at' => $formattedClosedDate, + 'updated_at' => new \DateTime, + ) + ); + } + + + // Select a random string value + + + // DB::table('tickets')->insert( + // array( + // 'title' => 'Mouse rosak', + // 'content' => '

Tikus ni asyik lari je

', + // 'status' => 'resolved', + // 'priority' => 'low', + // 'owner_id' => 4, + // 'responsible_id' => 2, + // 'type' => 'Service Request', + // 'number' => '0000', + // 'category' => 'hardware', + // 'subcategory' => 'pc', + // 'created_at' => $formattedDate1, + // 'updated_at' => new \DateTime, + // ) + // ); + + } +} diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php new file mode 100644 index 0000000..5daf522 --- /dev/null +++ b/database/seeders/UserSeeder.php @@ -0,0 +1,109 @@ +insert( + array( + 'name' => 'administrator', + 'email' => 'admin@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Head of Department', + 'email' => 'hod@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'technician', + 'email' => 'tech@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'technician 2', + 'email' => 'tech2@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Asraf', + 'email' => 'asraf.educ.it@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Syariff Ghani', + 'email' => 'syariffghani@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Nurul Khaliesah', + 'email' => 'khaliesah@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Haikal Handali', + 'email' => 'haikal@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + + DB::table('users')->insert( + array( + 'name' => 'Hazmie Khalid', + 'email' => 'hazmie@gmail.com', + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', + 'created_at' => new \DateTime, + 'updated_at' => new \DateTime, + ) + ); + } +} diff --git a/docs/_media/favicon.ico b/docs/_media/favicon.ico index 87f78d0..014d296 100644 Binary files a/docs/_media/favicon.ico and b/docs/_media/favicon.ico differ diff --git a/package-lock.json b/package-lock.json index 2bf6f1b..1166f1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,8 +4,10 @@ "requires": true, "packages": { "": { + "name": "help-desk", "dependencies": { "@fortawesome/fontawesome-free": "^6.2.0", + "chart.js": "^4.4.3", "flowbite": "^1.5.3", "jquery": "^3.6.1", "magnific-popup": "^1.1.0", @@ -87,6 +89,11 @@ "node": ">=6" } }, + "node_modules/@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -290,11 +297,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -353,6 +360,17 @@ } ] }, + "node_modules/chart.js": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.3.tgz", + "integrity": "sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -851,9 +869,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -880,9 +898,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -1142,10 +1160,16 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -1192,9 +1216,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/picomatch": { @@ -1218,9 +1242,9 @@ } }, "node_modules/postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "funding": [ { @@ -1230,12 +1254,16 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -1424,9 +1452,9 @@ } }, "node_modules/rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -1478,9 +1506,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -1607,15 +1635,15 @@ "dev": true }, "node_modules/vite": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", - "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.10.tgz", + "integrity": "sha512-Dx3olBo/ODNiMVk/cA5Yft9Ws+snLOXrhLtrI3F4XLt4syz2Yg8fayZMWScPKoz12v5BUv7VEmQHnsfpY80fYw==", "dev": true, "dependencies": { - "esbuild": "^0.15.6", - "postcss": "^8.4.16", + "esbuild": "^0.15.9", + "postcss": "^8.4.18", "resolve": "^1.22.1", - "rollup": "~2.78.0" + "rollup": "^2.79.1" }, "bin": { "vite": "bin/vite.js" @@ -1627,12 +1655,17 @@ "fsevents": "~2.3.2" }, "peerDependencies": { + "@types/node": ">= 14", "less": "*", "sass": "*", "stylus": "*", + "sugarss": "*", "terser": "^5.4.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "less": { "optional": true }, @@ -1642,6 +1675,9 @@ "stylus": { "optional": true }, + "sugarss": { + "optional": true + }, "terser": { "optional": true } @@ -1714,6 +1750,11 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.2.0.tgz", "integrity": "sha512-CNR7qRIfCwWHNN7FnKUniva94edPdyQzil/zCwk3v6k4R6rR2Fr8i4s3PM7n/lyfPA6Zfko9z5WDzFxG9SW1uQ==" }, + "@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1864,11 +1905,11 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -1895,6 +1936,14 @@ "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", "dev": true }, + "chart.js": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.3.tgz", + "integrity": "sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw==", + "requires": { + "@kurkle/color": "^0.3.0" + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -2171,9 +2220,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } @@ -2197,9 +2246,9 @@ } }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "form-data": { @@ -2380,9 +2429,9 @@ "dev": true }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true }, "node-releases": { @@ -2415,9 +2464,9 @@ "dev": true }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "picomatch": { @@ -2432,14 +2481,14 @@ "dev": true }, "postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" } }, "postcss-import": { @@ -2544,9 +2593,9 @@ "dev": true }, "rollup": { - "version": "2.78.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", - "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -2572,9 +2621,9 @@ } }, "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==" }, "supports-preserve-symlinks-flag": { "version": "1.0.0", @@ -2662,16 +2711,16 @@ "dev": true }, "vite": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz", - "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==", + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.10.tgz", + "integrity": "sha512-Dx3olBo/ODNiMVk/cA5Yft9Ws+snLOXrhLtrI3F4XLt4syz2Yg8fayZMWScPKoz12v5BUv7VEmQHnsfpY80fYw==", "dev": true, "requires": { - "esbuild": "^0.15.6", + "esbuild": "^0.15.9", "fsevents": "~2.3.2", - "postcss": "^8.4.16", + "postcss": "^8.4.18", "resolve": "^1.22.1", - "rollup": "~2.78.0" + "rollup": "^2.79.1" } }, "vite-plugin-full-reload": { diff --git a/package.json b/package.json index 8e28e30..9f9a790 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^6.2.0", + "chart.js": "^4.4.3", "flowbite": "^1.5.3", "jquery": "^3.6.1", "magnific-popup": "^1.1.0", diff --git a/public/favicon.ico b/public/favicon.ico index 87f78d0..014d296 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/images/logo.png b/public/images/logo.png deleted file mode 100644 index dcd3117..0000000 Binary files a/public/images/logo.png and /dev/null differ diff --git a/public/images/logos.png b/public/images/logos.png new file mode 100644 index 0000000..9b7ae6b Binary files /dev/null and b/public/images/logos.png differ diff --git a/public/js/chart.min.js b/public/js/chart.min.js index 8f69759..707583f 100644 --- a/public/js/chart.min.js +++ b/public/js/chart.min.js @@ -1,13 +1,14 @@ +/** + * Minified by jsDelivr using Terser v5.19.2. + * Original file: /npm/chart.js@4.4.3/dist/chart.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ /*! - * Chart.js v3.9.1 + * Chart.js v4.4.3 * https://www.chartjs.org - * (c) 2022 Chart.js Contributors + * (c) 2024 Chart.js Contributors * Released under the MIT License */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";function t(){}const e=function(){let t=0;return function(){return t++}}();function i(t){return null==t}function s(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function n(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const o=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function a(t,e){return o(t)?t:e}function r(t,e){return void 0===t?e:t}const l=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function c(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function d(t,e,i,o){let a,r,l;if(s(t))if(r=t.length,o)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;at,x:t=>t.x,y:t=>t.y};function y(t,e){const i=_[e]||(_[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const M=t=>void 0!==t,k=t=>"function"==typeof t,S=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function P(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const D=Math.PI,O=2*D,C=O+D,A=Number.POSITIVE_INFINITY,T=D/180,L=D/2,E=D/4,R=2*D/3,I=Math.log10,z=Math.sign;function F(t){const e=Math.round(t);t=N(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(I(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function V(t){const e=[],i=Math.sqrt(t);let s;for(s=1;st-e)).pop(),e}function B(t){return!isNaN(parseFloat(t))&&isFinite(t)}function N(t,e,i){return Math.abs(t-e)=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;sl&&h=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function tt(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const et=(t,e,i,s)=>tt(t,i,s?s=>t[s][e]<=i:s=>t[s][e]tt(t,i,(s=>t[s][e]>=i));function st(t,e,i){let s=0,n=t.length;for(;ss&&t[n-1]>i;)n--;return s>0||n{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function at(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(nt.forEach((e=>{delete t[e]})),delete t._chartjs)}function rt(t){const e=new Set;let i,s;for(i=0,s=t.length;iArray.prototype.slice.call(t));let n=!1,o=[];return function(...i){o=s(i),n||(n=!0,lt.call(window,(()=>{n=!1,t.apply(e,o)})))}}function ct(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const dt=t=>"start"===t?"left":"end"===t?"right":"center",ut=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,ft=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function gt(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Z(Math.min(et(r,a.axis,h).lo,i?s:et(e,l,a.getPixelForValue(h)).lo),0,s-1)),o=u?Z(Math.max(et(r,a.axis,c,!0).hi+1,i?0:et(e,l,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function pt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}var mt=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=lt.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}; -/*! - * @kurkle/color v0.2.1 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */function bt(t){return t+.5|0}const xt=(t,e,i)=>Math.max(Math.min(t,i),e);function _t(t){return xt(bt(2.55*t),0,255)}function yt(t){return xt(bt(255*t),0,255)}function vt(t){return xt(bt(t/2.55)/100,0,1)}function wt(t){return xt(bt(100*t),0,100)}const Mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},kt=[..."0123456789ABCDEF"],St=t=>kt[15&t],Pt=t=>kt[(240&t)>>4]+kt[15&t],Dt=t=>(240&t)>>4==(15&t);function Ot(t){var e=(t=>Dt(t.r)&&Dt(t.g)&&Dt(t.b)&&Dt(t.a))(t)?St:Pt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Ct=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function At(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Tt(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Lt(t,e,i){const s=At(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function Et(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const jt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Ht=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,$t=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Yt(t,e,i){if(t){let s=Et(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=It(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function Ut(t,e){return t?Object.assign(e||{},t):t}function Xt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=yt(t[3]))):(e=Ut(t,{r:0,g:0,b:0,a:1})).a=yt(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=jt.exec(t);let i,s,n,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?_t(t):xt(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?_t(i):xt(i,0,255)),s=255&(e[4]?_t(s):xt(s,0,255)),n=255&(e[6]?_t(n):xt(n,0,255)),{r:i,g:s,b:n,a:o}}}(t):Ft(t)}class Kt{constructor(t){if(t instanceof Kt)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=Xt(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*Mt[s[1]],g:255&17*Mt[s[2]],b:255&17*Mt[s[3]],a:5===o?17*Mt[s[4]]:255}:7!==o&&9!==o||(n={r:Mt[s[1]]<<4|Mt[s[2]],g:Mt[s[3]]<<4|Mt[s[4]],b:Mt[s[5]]<<4|Mt[s[6]],a:9===o?Mt[s[7]]<<4|Mt[s[8]]:255})),i=n||Wt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Ut(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=Xt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Ot(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Et(t),i=e[0],s=wt(e[1]),n=wt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${vt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=$t(vt(t.r)),n=$t(vt(t.g)),o=$t(vt(t.b));return{r:yt(Ht(s+i*($t(vt(e.r))-s))),g:yt(Ht(n+i*($t(vt(e.g))-n))),b:yt(Ht(o+i*($t(vt(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Kt(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=bt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Yt(this._rgb,2,t),this}darken(t){return Yt(this._rgb,2,-t),this}saturate(t){return Yt(this._rgb,1,t),this}desaturate(t){return Yt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Et(t);i[0]=zt(i[0]+e),i=It(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Gt(t){return new Kt(t)}function Zt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Jt(t){return Zt(t)?t:Gt(t)}function Qt(t){return Zt(t)?t:Gt(t).saturate(.5).darken(.1).hexString()}const te=Object.create(null),ee=Object.create(null);function ie(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Qt(e.borderColor),this.hoverColor=(t,e)=>Qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return se(this,t,e)}get(t){return ie(this,t)}describe(t,e){return se(ee,t,e)}override(t,e){return se(te,t,e)}route(t,e,i,s){const o=ie(this,t),a=ie(this,i),l="_"+e;Object.defineProperties(o,{[l]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[l],e=a[s];return n(t)?Object.assign({},e,t):r(t,e)},set(t){this[l]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function oe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ae(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function re(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const le=t=>window.getComputedStyle(t,null);function he(t,e){return le(t).getPropertyValue(e)}const ce=["top","right","bottom","left"];function de(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=ce[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function ue(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=le(i),o="border-box"===n.boxSizing,a=de(n,"padding"),r=de(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/s),y:Math.round((h-u)/g*i.height/s)}}const fe=t=>Math.round(10*t)/10;function ge(t,e,i,s){const n=le(t),o=de(n,"margin"),a=re(n.maxWidth,t,"clientWidth")||A,r=re(n.maxHeight,t,"clientHeight")||A,l=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=ae(t);if(o){const t=o.getBoundingClientRect(),a=le(o),r=de(a,"border","width"),l=de(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=re(a.maxWidth,o,"clientWidth"),n=re(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||A,maxHeight:n||A}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=de(n,"border","width"),e=de(n,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,s?Math.floor(h/s):c-o.height),h=fe(Math.min(h,a,l.maxWidth)),c=fe(Math.min(c,r,l.maxHeight)),h&&!c&&(c=fe(h/2)),{width:h,height:c}}function pe(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=n/s,t.width=o/s;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const me=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function be(t,e){const i=he(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function xe(t){return!t||i(t.size)||i(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function _e(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function ye(t,e,i,n){let o=(n=n||{}).data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},a=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const l=i.length;let h,c,d,u,f;for(h=0;hi.length){for(h=0;h0&&t.stroke()}}function Se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==r.strokeColor;let c,d;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);i(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),c=0;ct[0])){M(s)||(s=$e("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:n=>Ee([n,...t],e,i,s)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Ve(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=$e(ze(o,t),i),M(n))return Fe(t,n)?je(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ye(t).includes(e),ownKeys:t=>Ye(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Re(t,e,i,o){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ie(t,o),setContext:e=>Re(t,e,i,o),override:s=>Re(t.override(s),e,i,o)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ve(t,e,(()=>function(t,e,i){const{_proxy:o,_context:a,_subProxy:r,_descriptors:l}=t;let h=o[e];k(h)&&l.isScriptable(e)&&(h=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(o,a||s),r.delete(t),Fe(t,e)&&(e=je(n._scopes,n,t,e));return e}(e,h,t,i));s(h)&&h.length&&(h=function(t,e,i,s){const{_proxy:o,_context:a,_subProxy:r,_descriptors:l}=i;if(M(a.index)&&s(t))e=e[a.index%e.length];else if(n(e[0])){const i=e,s=o._scopes.filter((t=>t!==i));e=[];for(const n of i){const i=je(s,o,t,n);e.push(Re(i,a,r&&r[t],l))}}return e}(e,h,t,l.isIndexable));Fe(e,h)&&(h=Re(h,a,r&&r[e],l));return h}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Ie(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:k(i)?i:()=>i,isIndexable:k(s)?s:()=>s}}const ze=(t,e)=>t?t+w(e):e,Fe=(t,e)=>n(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ve(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function Be(t,e,i){return k(t)?t(e,i):t}const Ne=(t,e)=>!0===t?e:"string"==typeof t?y(e,t):void 0;function We(t,e,i,s,n){for(const o of e){const e=Ne(i,o);if(e){t.add(e);const o=Be(e._fallback,i,n);if(M(o)&&o!==i&&o!==s)return o}else if(!1===e&&M(s)&&i!==s)return null}return!1}function je(t,e,i,o){const a=e._rootScopes,r=Be(e._fallback,i,o),l=[...t,...a],h=new Set;h.add(o);let c=He(h,l,i,r||i,o);return null!==c&&((!M(r)||r===i||(c=He(h,l,r,c,o),null!==c))&&Ee(Array.from(h),[""],a,r,(()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const a=o[e];if(s(a)&&n(i))return i;return a}(e,i,o))))}function He(t,e,i,s,n){for(;i;)i=We(t,e,i,s,n);return i}function $e(t,e){for(const i of e){if(!i)continue;const e=i[t];if(M(e))return e}}function Ye(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Ue(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,l,h,c;for(r=0,l=s;re"x"===t?"y":"x";function Ge(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=X(o,n),l=X(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ze(t,e="x"){const i=Ke(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,l,h=qe(t,0);for(a=0;a!t.skip))),"monotone"===e.cubicInterpolationMode)Ze(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;o0===t||1===t,ei=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*O/i),ii=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*O/i)+1,si={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*L),easeOutSine:t=>Math.sin(t*L),easeInOutSine:t=>-.5*(Math.cos(D*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ti(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ti(t)?t:ei(t,.075,.3),easeOutElastic:t=>ti(t)?t:ii(t,.075,.3),easeInOutElastic(t){const e=.1125;return ti(t)?t:t<.5?.5*ei(2*t,e,.45):.5+.5*ii(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-si.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*si.easeInBounce(2*t):.5*si.easeOutBounce(2*t-1)+.5};function ni(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function oi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function ai(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=ni(t,n,i),r=ni(n,o,i),l=ni(o,e,i),h=ni(a,r,i),c=ni(r,l,i);return ni(h,c,i)}const ri=new Map;function li(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=ri.get(i);return s||(s=new Intl.NumberFormat(t,e),ri.set(i,s)),s}(e,i).format(t)}const hi=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ci=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function di(t,e){const i=(""+t).match(hi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function ui(t,e){const i={},s=n(e),o=s?Object.keys(e):e,a=n(t)?s?i=>r(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+a(t)||0;return i}function fi(t){return ui(t,{top:"y",right:"x",bottom:"y",left:"x"})}function gi(t){return ui(t,["topLeft","topRight","bottomLeft","bottomRight"])}function pi(t){const e=fi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function mi(t,e){t=t||{},e=e||ne.font;let i=r(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=r(t.style,e.style);s&&!(""+s).match(ci)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:r(t.family,e.family),lineHeight:di(r(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:r(t.weight,e.weight),string:""};return n.string=xe(n),n}function bi(t,e,i,n){let o,a,r,l=!0;for(o=0,a=t.length;oi&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function _i(t,e){return Object.assign(Object.create(t),e)}function yi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function vi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function wi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Mi(t){return"angle"===t?{between:G,compare:q,normalize:K}:{between:Q,compare:(t,e)=>t-e,normalize:t=>t}}function ki({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function Si(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:l,normalize:h}=Mi(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=Mi(s),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;hx||l(n,b,p)&&0!==r(n,b),v=()=>!x||0===r(o,p)||l(o,b,p);for(let t=c,i=c;t<=d;++t)m=e[t%a],m.skip||(p=h(m[s]),p!==b&&(x=l(p,n,o),null===_&&y()&&(_=0===r(p,n)?t:i),null!==_&&v()&&(g.push(ki({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,b=p));return null!==_&&g.push(ki({start:_,end:d,loop:u,count:a,style:f})),g}function Pi(t,e){const i=[],s=t.segments;for(let n=0;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);if(!0===s)return Oi(t,[{start:a,end:r,loop:o}],i,e);return Oi(t,function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var Vi={evaluateInteractionItems:Ei,modes:{index(t,e,i,s){const n=ue(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Ri(t,n,o,s,a):zi(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=ue(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Ri(t,n,o,s,a):zi(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tRi(t,ue(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ue(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return zi(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>Fi(t,ue(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Fi(t,ue(e,t),"y",i.intersect,s)}};const Bi=["left","top","right","bottom"];function Ni(t,e){return t.filter((t=>t.pos===e))}function Wi(t,e){return t.filter((t=>-1===Bi.indexOf(t.pos)&&t.box.axis===e))}function ji(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Hi(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Bi.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function qi(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),s=ji(Ni(e,"left"),!0),n=ji(Ni(e,"right")),o=ji(Ni(e,"top"),!0),a=ji(Ni(e,"bottom")),r=Wi(e,"x"),l=Wi(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ni(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;d(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),f=Object.assign({},n);Yi(f,pi(s));const g=Object.assign({maxPadding:f,w:o,h:a,x:n.left,y:n.top},n),p=Hi(l.concat(h),u);qi(r.fullSize,g,u,p),qi(l,g,u,p),qi(h,g,u,p)&&qi(l,g,u,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),Gi(r.leftAndTop,g,u,p),g.x+=g.w,g.y+=g.h,Gi(r.rightAndBottom,g,u,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},d(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class Ji{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Qi extends Ji{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ts={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},es=t=>null===t||""===t;const is=!!me&&{passive:!0};function ss(t,e,i){t.canvas.removeEventListener(e,i,is)}function ns(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function os(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ns(i.addedNodes,s),e=e&&!ns(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function as(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ns(i.removedNodes,s),e=e&&!ns(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const rs=new Map;let ls=0;function hs(){const t=window.devicePixelRatio;t!==ls&&(ls=t,rs.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function cs(t,e,i){const s=t.canvas,n=s&&ae(s);if(!n)return;const o=ht(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){rs.size||window.addEventListener("resize",hs),rs.set(t,e)}(t,o),a}function ds(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){rs.delete(t),rs.size||window.removeEventListener("resize",hs)}(t)}function us(t,e,i){const s=t.canvas,n=ht((e=>{null!==t.ctx&&i(function(t,e){const i=ts[t.type]||t.type,{x:s,y:n}=ue(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,is)}(s,e,n),n}class fs extends Ji{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",es(n)){const e=be(t,"width");void 0!==e&&(t.width=e)}if(es(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=be(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const s=e.$chartjs.initial;["height","width"].forEach((t=>{const n=s[t];i(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=s.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:os,detach:as,resize:cs}[e]||us;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:ds,detach:ds,resize:ds}[e]||ss)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return ge(t,e,i,s)}isAttached(t){const e=ae(t);return!(!e||!e.isConnected)}}function gs(t){return!oe()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Qi:fs}var ps=Object.freeze({__proto__:null,_detectPlatform:gs,BasePlatform:Ji,BasicPlatform:Qi,DomPlatform:fs});const ms="transparent",bs={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Jt(t||ms),n=s.valid&&Jt(e||ms);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class xs{constructor(t,e,i,s){const n=e[i];s=bi([t.to,s,n,t.from]);const o=bi([t.from,n,s]);this._active=!0,this._fn=t.fn||bs[t.type||typeof o],this._easing=si[t.easing]||si.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=bi([t.to,e,s,t.from]),this._from=bi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ne.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ne.describe("animations",{_fallback:"animation"}),ne.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class ys{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!n(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const o=t[i];if(!n(o))return;const a={};for(const t of _s)a[t]=o[t];(s(o.properties)&&o.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,a)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new xs(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(mt.add(this._chart,i),!0):void 0}}function vs(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function ws(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function Ds(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Cs(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const As=t=>"reset"===t||"none"===t,Ts=(t,e)=>e?t:Object.assign({},t);class Ls{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ks(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Cs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=r(i.xAxisID,Os(t,"x")),o=e.yAxisID=r(i.yAxisID,Os(t,"y")),a=e.rAxisID=r(i.rAxisID,Os(t,"r")),l=e.indexAxis,h=e.iAxisID=s(l,n,o,a),c=e.vAxisID=s(l,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&at(this._data,this),t._stacked&&Cs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(n(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,o;for(s=0,n=e.length;s0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,d=o;else{d=s(o[t])?this.parseArrayData(i,o,t,e):n(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const a=()=>null===c[l]||f&&c[l]t&&!e.hidden&&e._stacked&&{keys:ws(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let u,f;function g(){f=s[u];const e=f[r.axis];return!o(f[t.axis])||c>e||d=0;--u)if(!g()){this.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,a;for(s=0,n=e.length;s=0&&tthis.getContext(i,s)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Ts(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new ys(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||As(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){As(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!As(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;a{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}Es.defaults={},Es.defaultRoutes=void 0;const Rs={values:t=>s(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=I(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),li(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(I(t)));return 1===s||2===s||5===s?Rs.numeric.call(this,t,e,i):""}};var Is={formatters:Rs};function zs(t,e){const s=t.options.ticks,n=s.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),o=s.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;in)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nn)return e}return Math.max(n,1)}(o,e,n);if(a>0){let t,s;const n=a>1?Math.round((l-r)/(a-1)):null;for(Fs(e,h,c,i(n)?0:r-n,r),t=0,s=a-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Is.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ne.route("scale.ticks","color","","color"),ne.route("scale.grid","color","","borderColor"),ne.route("scale.grid","borderColor","","borderColor"),ne.route("scale.title","color","","color"),ne.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ne.describe("scales",{_fallback:"scale"}),ne.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Vs=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Bs(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return h}function Ws(t){return t.drawTicks?t.tickLength:0}function js(t,e){if(!t.display)return 0;const i=mi(t.font,e),n=pi(t.padding);return(s(t.text)?t.text.length:1)*i.lineHeight+n.height}function Hs(t,e,i){let s=dt(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class $s extends Es{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=a(t,Number.POSITIVE_INFINITY),e=a(e,Number.NEGATIVE_INFINITY),i=a(i,Number.POSITIVE_INFINITY),s=a(s,Number.NEGATIVE_INFINITY),{min:a(t,i),max:a(e,s),minDefined:o(t),maxDefined:o(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;as?s:i,s=n&&i>s?i:s,{min:a(i,a(s,i)),max:a(s,a(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){c(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xi(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Z(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-Ws(t.grid)-e.padding-js(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=$(Math.min(Math.asin(Z((h.highest.height+6)/o,-1,1)),Math.asin(Z(a/r,-1,1))-Math.asin(Z(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){c(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){c(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=js(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ws(n)+o):(t.height=this.maxHeight,t.width=Ws(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=H(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){c(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,s=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:a[t]||0,height:r[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(M),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return J(this._alignToPixels?ve(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:o,position:a}=s,l=o.offset,h=this.isHorizontal(),c=this.ticks.length+(l?1:0),d=Ws(o),u=[],f=o.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,p=g/2,m=function(t){return ve(i,t,g)};let b,x,_,y,v,w,M,k,S,P,D,O;if("top"===a)b=m(this.bottom),w=this.bottom-d,k=b-p,P=m(t.top)+p,O=t.bottom;else if("bottom"===a)b=m(this.top),P=t.top,O=m(t.bottom)-p,w=b+p,k=this.top+d;else if("left"===a)b=m(this.right),v=this.right-d,M=b-p,S=m(t.left)+p,D=t.right;else if("right"===a)b=m(this.left),S=t.left,D=m(t.right)-p,v=b+p,M=this.left+d;else if("x"===e){if("center"===a)b=m((t.top+t.bottom)/2+.5);else if(n(a)){const t=Object.keys(a)[0],e=a[t];b=m(this.chart.scales[t].getPixelForValue(e))}P=t.top,O=t.bottom,w=b+p,k=w+d}else if("y"===e){if("center"===a)b=m((t.left+t.right)/2);else if(n(a)){const t=Object.keys(a)[0],e=a[t];b=m(this.chart.scales[t].getPixelForValue(e))}v=b-p,M=v-d,S=t.left,D=t.right}const C=r(s.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/C));for(x=0;xe.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ne.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&ne.describe(e,t.descriptors)}(t,o,i),this.override&&ne.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ne[s]&&(delete ne[s][i],this.override&&delete te[i])}}var Us=new class{constructor(){this.controllers=new Ys(Ls,"datasets",!0),this.elements=new Ys(Es,"elements"),this.plugins=new Ys(Object,"plugins"),this.scales=new Ys($s,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):d(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=w(t);c(i["before"+s],[],i),e[t](i),c(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function qs(t,e){return e||!1!==t?!0===t?{}:t:null}function Ks(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Gs(t,e){const i=ne.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Zs(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Js(t){const e=t.options||(t.options={});e.plugins=r(e.plugins,{}),e.scales=function(t,e){const i=te[t.type]||{scales:{}},s=e.scales||{},o=Gs(t.type,e),a=Object.create(null),r=Object.create(null);return Object.keys(s).forEach((t=>{const e=s[t];if(!n(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const l=Zs(t,e),h=function(t,e){return t===e?"_index_":"_value_"}(l,o),c=i.scales||{};a[l]=a[l]||t,r[t]=b(Object.create(null),[{axis:l},e,c[l],c[h]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,o=i.indexAxis||Gs(n,e),l=(te[n]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),n=i[e+"AxisID"]||a[e]||e;r[n]=r[n]||Object.create(null),b(r[n],[{axis:e},s[n],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];b(e,[ne.scales[e.type],ne.scale])})),r}(t,e)}function Qs(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const tn=new Map,en=new Set;function sn(t,e){let i=tn.get(t);return i||(i=e(),tn.set(t,i),en.add(i)),i}const nn=(t,e,i)=>{const s=y(e,i);void 0!==s&&t.add(s)};class on{constructor(t){this._config=function(t){return(t=t||{}).data=Qs(t.data),Js(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Qs(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Js(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return sn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return sn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return sn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return sn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>nn(r,t,e)))),e.forEach((t=>nn(r,s,t))),e.forEach((t=>nn(r,te[n]||{},t))),e.forEach((t=>nn(r,ne,t))),e.forEach((t=>nn(r,ee,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),en.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,te[e]||{},ne.datasets[e]||{},{type:e},ne,ee]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=an(this._resolverCache,t,n);let l=a;if(function(t,e){const{isScriptable:i,isIndexable:n}=Ie(t);for(const o of e){const e=i(o),a=n(o),r=(a||e)&&t[o];if(e&&(k(r)||rn(r))||a&&s(r))return!0}return!1}(a,e)){o.$shared=!1;l=Re(a,i=k(i)?i():i,this.createResolver(t,i,r))}for(const t of e)o[t]=l[t];return o}createResolver(t,e,i=[""],s){const{resolver:o}=an(this._resolverCache,t,i);return n(e)?Re(o,e,void 0,s):o}}function an(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Ee(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const rn=t=>n(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||k(t[i])),!1);const ln=["top","bottom","left","right","chartArea"];function hn(t,e){return"top"===t||"bottom"===t||-1===ln.indexOf(t)&&"x"===e}function cn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function dn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),c(i&&i.onComplete,[t],e)}function un(t){const e=t.chart,i=e.options.animation;c(i&&i.onProgress,[t],e)}function fn(t){return oe()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const gn={},pn=t=>{const e=fn(t);return Object.values(gn).filter((t=>t.canvas===e)).pop()};function mn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}class bn{constructor(t,i){const s=this.config=new on(i),n=fn(t),o=pn(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||gs(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,c=l&&l.width;this.id=e(),this.ctx=r,this.canvas=l,this.width=c,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Xs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ct((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],gn[this.id]=this,r&&l?(mt.listen(this,"complete",dn),mt.listen(this,"progress",un),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return i(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return we(this.canvas,this.ctx),this}stop(){return mt.stop(this),this}resize(t,e){mt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,pe(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),c(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){d(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=Zs(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),d(n,(e=>{const n=e.options,o=n.id,a=Zs(o,n),l=r(n.type,e.dtype);void 0!==n.position&&hn(n.position,a)===hn(e.dposition)||(n.position=e.dposition),s[o]=!0;let h=null;if(o in i&&i[o].type===l)h=i[o];else{h=new(Us.getScale(l))({id:o,type:l,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(n,t)})),d(s,((t,e)=>{t||delete i[e]})),d(i,(t=>{Zi.configure(this,t,t.options),Zi.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(cn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){d(this.scales,(t=>{Zi.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);S(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){mn(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Zi.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],d(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&Pe(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&De(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Se(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Vi.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=_i(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);M(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),mt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};d(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){d(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},d(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!u(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=P(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,c(n.onHover,[t,a,this],this),r&&c(n.onClick,[t,a,this],this));const h=!u(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}const xn=()=>d(bn.instances,(t=>t._plugins.invalidate())),_n=!0;function yn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(bn,{defaults:{enumerable:_n,value:ne},instances:{enumerable:_n,value:gn},overrides:{enumerable:_n,value:te},registry:{enumerable:_n,value:Us},version:{enumerable:_n,value:"3.9.1"},getChart:{enumerable:_n,value:pn},register:{enumerable:_n,value:(...t)=>{Us.add(...t),xn()}},unregister:{enumerable:_n,value:(...t)=>{Us.remove(...t),xn()}}});class vn{constructor(t){this.options=t||{}}init(t){}formats(){return yn()}parse(t,e){return yn()}format(t,e){return yn()}add(t,e,i){return yn()}diff(t,e,i){return yn()}startOf(t,e,i){return yn()}endOf(t,e){return yn()}}vn.override=function(t){Object.assign(vn.prototype,t)};var wn={_date:vn};function Mn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;et-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(M(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Sn(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;ht.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),o=s.options.stacked,a=[],r=t=>{const s=t.controller.getParsed(e),n=s&&s[t.vScale.axis];if(i(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===o||-1===a.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(d,e,a)*o,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),n=Math.max(t,i);m=Math.max(Math.min(m,n),s),c=m+d}if(m===e.getPixelForValue(a)){const t=z(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,a=r(n.maxBarThickness,1/0);let l,h;if(e.grouped){const s=o?this._getStackCount(t):e.stackCount,r="flex"===n.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),a=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+o+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d""}}}};class En extends Ls{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let o,a,r=t=>+i[t];if(n(i[t])){const{key:t="value"}=this._parsing;r=e=>+y(i[e],t)}for(o=t,a=t+e;oG(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>G(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,h,d),m=f(L,c,u),b=g(D,h,d),x=g(D+L,c,u);s=(p-b)/2,n=(m-x)/2,o=-(p+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),b=(i.width-o)/f,x=(i.height-o)/g,_=Math.max(Math.min(b,x)/2,0),y=h(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/O)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?O*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=li(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s"spacing"!==t,_indexable:t=>"spacing"!==t},En.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return s(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Rn extends Ls{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=gt(e,s,o);this._drawStart=a,this._drawCount=r,pt(e)&&(a=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,a,r,t)}updateElements(t,e,s,n){const o="reset"===n,{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=B(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let x=e>0&&this.getParsed(e-1);for(let g=e;g0&&Math.abs(s[u]-x[u])>m,p&&(_.parsed=s,_.raw=h.data[g]),d&&(_.options=c||this.resolveDataElementOptions(g,e.active?"active":n)),b||this.updateElement(e,g,_,n),x=s}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Rn.id="line",Rn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Rn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class In extends Ls{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=li(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return Ue.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*D;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?H(this.resolveDataElementOptions(t,e).angle||i):0}}In.id="polarArea",In.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},In.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class zn extends En{}zn.id="pie",zn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Fn extends Ls{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return Ue.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a0&&this.getParsed(e-1);for(let c=e;c0&&Math.abs(s[f]-_[f])>b,m&&(p.parsed=s,p.raw=h.data[c]),u&&(p.options=d||this.resolveDataElementOptions(c,e.active?"active":n)),x||this.updateElement(e,c,p,n),_=s}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}Vn.id="scatter",Vn.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Vn.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Bn=Object.freeze({__proto__:null,BarController:Tn,BubbleController:Ln,DoughnutController:En,LineController:Rn,PolarAreaController:In,PieController:zn,RadarController:Fn,ScatterController:Vn});function Nn(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=e;let h=n/r;t.beginPath(),t.arc(o,a,r,s-h,i+h),l>n?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+L,s-L),t.closePath(),t.clip()}function Wn(t,e,i,s){const n=ui(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Z(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Z(n.innerStart,0,a),innerEnd:Z(n.innerEnd,0,a)}}function jn(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Hn(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const g=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/D)/d)/2,m=l+p+f,b=n-p-f,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=Wn(e,u,d,b-m),w=d-x,M=d-_,k=m+x/w,S=b-_/M,P=u+y,O=u+v,C=m+y/P,A=b-v/O;if(t.beginPath(),o){if(t.arc(a,r,d,k,S),_>0){const e=jn(M,S,a,r);t.arc(e.x,e.y,_,S,b+L)}const e=jn(O,b,a,r);if(t.lineTo(e.x,e.y),v>0){const e=jn(O,A,a,r);t.arc(e.x,e.y,v,b+L,A+Math.PI)}if(t.arc(a,r,u,b-v/u,m+y/u,!0),y>0){const e=jn(P,C,a,r);t.arc(e.x,e.y,y,C+Math.PI,m-L)}const i=jn(w,m,a,r);if(t.lineTo(i.x,i.y),x>0){const e=jn(w,k,a,r);t.arc(e.x,e.y,x,m-L,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function $n(t,e,i,s,n,o){const{options:a}=e,{borderWidth:r,borderJoinStyle:l}=a,h="inner"===a.borderAlign;r&&(h?(t.lineWidth=2*r,t.lineJoin=l||"round"):(t.lineWidth=r,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:s,y:n,startAngle:o,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),h=e.innerRadius+a;let c;for(i&&Nn(t,e,o+O),t.beginPath(),t.arc(s,n,h,o+O,o,!0),c=0;c=O||G(n,a,l),g=Q(o,h+u,c+u);return f&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>O?Math.floor(i/O):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(s){a=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*a,Math.sin(e)*a),this.circumference>=D&&(a=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){Hn(t,e,i,s,a+O,n);for(let e=0;er&&o>r;return{count:s,start:l,loop:e.loop,ilen:h(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=n[x(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[x(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),u=s,b=0,f=g=i),p=i}_()}function Zn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Gn:Kn}Yn.id="arc",Yn.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Yn.defaultRoutes={backgroundColor:"backgroundColor"};const Jn="function"==typeof Path2D;function Qn(t,e,i,s){Jn&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Un(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=Zn(e);for(const r of n)Un(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class to extends Es{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Qe(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Di(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,o=Pi(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],r=function(t){return t.stepped?oi:t.tension||"monotone"===t.cubicInterpolationMode?ai:ni}(i);let l,h;for(l=0,h=o.length;l"borderDash"!==t&&"fill"!==t};class io extends Es{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2){uo(t)}))}var go={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,s)=>{if(!s.enabled)return void fo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:a,indexAxis:r}=e,l=t.getDatasetMeta(o),h=a||e.data;if("y"===bi([r,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:u}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=Z(et(e,o.axis,a).lo,0,i-1)),s=h?Z(et(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(l,h);if(u<=(s.threshold||4*n))return void uo(e);let f;switch(i(a)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),s.algorithm){case"lttb":f=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,g,p=e;for(a[l++]=t[p],c=0;cu&&(u=f,d=t[s],g=s);a[l++]=d,p=g}return a[l++]=t[h],a}(h,d,u,n,s);break;case"min-max":f=function(t,e,s,n){let o,a,r,l,h,c,d,u,f,g,p=0,m=0;const b=[],x=e+s-1,_=t[e].x,y=t[x].x-_;for(o=e;og&&(g=l,d=o),p=(m*p+a.x)/++m;else{const s=o-1;if(!i(c)&&!i(d)){const e=Math.min(c,d),i=Math.max(c,d);e!==u&&e!==s&&b.push({...t[e],x:p}),i!==u&&i!==s&&b.push({...t[i],x:p})}o>0&&s!==u&&b.push(t[s]),b.push(a),h=e,m=0,f=g=l,c=d=u=o}}return b}(h,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${s.algorithm}'`)}e._decimated=f}))},destroy(t){fo(t)}};function po(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=K(n),o=K(o)),{property:t,start:n,end:o}}function mo(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function bo(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function xo(t,e){let i=[],n=!1;return s(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=mo(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new to({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function _o(t){return t&&!1!==t.fill}function yo(t,e,i){let s=t[e].fill;const n=[e];let a;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!o(s))return s;if(a=t[s],!a)return!1;if(a.visible)return s;n.push(s),s=a.fill}return!1}function vo(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=r(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(n(s))return!isNaN(s.value)&&s;let a=parseFloat(s);return o(a)&&Math.floor(a)===a?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,a,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function wo(t,e,i){const s=[];for(let n=0;n=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&Po(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;_o(i)&&Po(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;_o(s)&&"beforeDatasetDraw"===i.drawTime&&Po(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Lo=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class Eo extends Es{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=c(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=mi(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=Lo(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,n,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:s},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const p=i+e/2+n.measureText(t.text).width;o>0&&u+s+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:s},d=Math.max(d,p),u+=s+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=yi(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=ut(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=ut(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=ut(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=ut(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Pe(t,this),this._draw(),De(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ne.color,l=yi(t.rtl,this.left,this.width),h=mi(o.font),{color:c,padding:d}=o,u=h.size,f=u/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=Lo(o,u),x=this.isHorizontal(),_=this._computeTitleHeight();g=x?{x:ut(n,this.left+d,this.right-i[0]),y:this.top+d+_,line:0}:{x:this.left+d,y:ut(n,this.top+_+d,this.bottom-e[0].height),line:0},vi(this.ctx,t.textDirection);const y=b+d;this.legendItems.forEach(((v,w)=>{s.strokeStyle=v.fontColor||c,s.fillStyle=v.fontColor||c;const M=s.measureText(v.text).width,k=l.textAlign(v.textAlign||(v.textAlign=o.textAlign)),S=p+f+M;let P=g.x,D=g.y;l.setWidth(this.width),x?w>0&&P+S+d>this.right&&(D=g.y+=y,g.line++,P=g.x=ut(n,this.left+d,this.right-i[g.line])):w>0&&D+y>this.bottom&&(P=g.x=P+e[g.line].width+d,g.line++,D=g.y=ut(n,this.top+_+d,this.bottom-e[g.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const n=r(i.lineWidth,1);if(s.fillStyle=r(i.fillStyle,a),s.lineCap=r(i.lineCap,"butt"),s.lineDashOffset=r(i.lineDashOffset,0),s.lineJoin=r(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=r(i.strokeStyle,a),s.setLineDash(r(i.lineDash,[])),o.usePointStyle){const a={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},r=l.xPlus(t,p/2);ke(s,a,r,e+f,o.pointStyleWidth&&p)}else{const o=e+Math.max((u-m)/2,0),a=l.leftForLtr(t,p),r=gi(i.borderRadius);s.beginPath(),Object.values(r).some((t=>0!==t))?Le(s,{x:a,y:o,w:p,h:m,radius:r}):s.rect(a,o,p,m),s.fill(),0!==n&&s.stroke()}s.restore()}(l.x(P),D,v),P=ft(k,P+p+f,x?P+S:this.right,t.rtl),function(t,e,i){Ae(s,i.text,t,e+b/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(P),D,v),x?g.x+=S+d:g.y+=y})),wi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=mi(e.font),s=pi(e.padding);if(!e.display)return;const n=yi(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=ut(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+ut(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ut(a,c,c+d);o.textAlign=n.textAlign(dt(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ae(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=mi(t.font),i=pi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Q(t,this.left,this.right)&&Q(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=pi(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Io extends Es{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=s(i.text)?i.text.length:1;this._padding=pi(i.padding);const o=n*mi(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=ut(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=ut(a,s,e),c=-.5*D):(l=n-t,h=ut(a,e,s),c=.5*D),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=mi(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);Ae(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:dt(e.align),textBaseline:"middle",translation:[n,o]})}}var zo={id:"title",_element:Io,start(t,e,i){!function(t,e){const i=new Io({ctx:t.ctx,options:e,chart:t});Zi.configure(t,i,e),Zi.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Zi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;Zi.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Fo=new WeakMap;var Vo={id:"subtitle",start(t,e,i){const s=new Io({ctx:t.ctx,options:i,chart:t});Zi.configure(t,s,i),Zi.addBox(t,s),Fo.set(t,s)},stop(t){Zi.removeBox(t,Fo.get(t)),Fo.delete(t)},beforeUpdate(t,e,i){const s=Fo.get(t);Zi.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Bo={average(t){if(!t.length)return!1;let e,i,s=0,n=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function jo(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ho(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=mi(e.bodyFont),h=mi(e.titleFont),c=mi(e.footerFont),u=o.length,f=n.length,g=s.length,p=pi(e.padding);let m=p.height,b=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x){m+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){b=Math.max(b,i.measureText(t).width+_)};return i.save(),i.font=h.string,d(t.title,y),i.font=l.string,d(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?a+2+e.boxPadding:0,d(s,(t=>{d(t.before,y),d(t.lines,y),d(t.after,y)})),_=0,i.font=c.string,d(t.footer,y),i.restore(),b+=p.width,{width:b,height:m}}function $o(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function Yo(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||$o(t,e,i,s),yAlign:s}}function Uo(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=gi(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Z(g,0,s.width-e.width),y:Z(p,0,s.height-e.height)}}function Xo(t,e,i){const s=pi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function qo(t){return No([],Wo(t))}function Ko(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Go extends Es{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new ys(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,_i(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let a=[];return a=No(a,Wo(s)),a=No(a,Wo(n)),a=No(a,Wo(o)),a}getBeforeBody(t,e){return qo(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return d(t,(t=>{const e={before:[],lines:[],after:[]},n=Ko(i,t);No(e.before,Wo(n.beforeLabel.call(this,t))),No(e.lines,n.label.call(this,t)),No(e.after,Wo(n.afterLabel.call(this,t))),s.push(e)})),s}getAfterBody(t,e){return qo(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let a=[];return a=No(a,Wo(s)),a=No(a,Wo(n)),a=No(a,Wo(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),d(l,(e=>{const i=Ko(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=Bo[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Ho(this,i),a=Object.assign({},t,e),r=Yo(this.chart,i,a),l=Uo(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=gi(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,b,x,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,x=_+o,y=_-o):(p=d+f,m=p+o,x=_-o,y=_+o),b=p):(m="left"===s?d+Math.max(r,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(x=u,_=x-o,p=m-o,b=m+o):(x=u+g,_=x+o,p=m+o,b=m-o),y=x),{x1:p,x2:m,x3:b,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=yi(i.rtl,this.x,this.width);for(t.x=Xo(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=mi(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Le(t,{x:e,y:p,w:h,h:l,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Le(t,{x:i,y:p+1,w:h-2,h:l-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,h,l),t.strokeRect(e,p,h,l),t.fillStyle=a.backgroundColor,t.fillRect(i,p+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=mi(i.bodyFont);let u=c.lineHeight,f=0;const g=yi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+u/2),t.y+=u+n},m=g.textAlign(o);let b,x,_,y,v,w,M;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Xo(this,m,i),e.fillStyle=i.bodyColor,d(this.beforeBody,p),f=a&&"right"!==m?"center"===o?l/2+h:l+2+h:0,y=0,w=s.length;y0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=Bo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Ho(this,t),a=Object.assign({},i,this._size),r=Yo(e,t,a),l=Uo(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=pi(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),vi(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),wi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!u(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!u(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=Bo[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}Go.positioners=Bo;var Zo={id:"tooltip",_element:Go,positioners:Bo,afterInit(t,e,i){i&&(t.tooltip=new Go({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:t,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Jo=Object.freeze({__proto__:null,Decimation:go,Filler:To,Legend:Ro,SubTitle:Vo,Title:zo,Tooltip:Zo});function Qo(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}class ta extends $s{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(i(t))return null;const s=this.getLabels();return((t,e)=>null===t?null:Z(Math.round(t),0,e))(e=isFinite(e)&&s[e]===t?e:Qo(s,t,r(e,t),this._addedLabels),s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ea(t,e,{horizontal:i,minRotation:s}){const n=H(s),o=(i?Math.sin(n):Math.cos(n))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}ta.id="category",ta.defaults={ticks:{callback:ta.prototype.getLabelForValue}};class ia extends $s{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return i(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const o=t=>s=e?s:t,a=t=>n=i?n:t;if(t){const t=z(s),e=z(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n=function(t,e){const s=[],{bounds:n,step:o,min:a,max:r,precision:l,count:h,maxTicks:c,maxDigits:d,includeBounds:u}=t,f=o||1,g=c-1,{min:p,max:m}=e,b=!i(a),x=!i(r),_=!i(h),y=(m-p)/(d+1);let v,w,M,k,S=F((m-p)/g/f)*f;if(S<1e-14&&!b&&!x)return[{value:p},{value:m}];k=Math.ceil(m/S)-Math.floor(p/S),k>g&&(S=F(k*S/g/f)*f),i(l)||(v=Math.pow(10,l),S=Math.ceil(S*v)/v),"ticks"===n?(w=Math.floor(p/S)*S,M=Math.ceil(m/S)*S):(w=p,M=m),b&&x&&o&&W((r-a)/o,S/1e3)?(k=Math.round(Math.min((r-a)/S,c)),S=(r-a)/k,w=a,M=r):_?(w=b?a:w,M=x?r:M,k=h-1,S=(M-w)/k):(k=(M-w)/S,k=N(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const P=Math.max(Y(S),Y(w));v=Math.pow(10,i(l)?P:l),w=Math.round(w*v)/v,M=Math.round(M*v)/v;let D=0;for(b&&(u&&w!==a?(s.push({value:a}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=o(t)?Math.max(0,t):null,this.max=o(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t,a=(t,e)=>Math.pow(10,Math.floor(I(t))+e);i===s&&(i<=0?(n(1),o(10)):(n(a(i,-1)),o(a(s,1)))),i<=0&&n(a(s,-1)),s<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&n(a(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(I(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=a(t.min,Math.pow(10,Math.floor(I(e.min)))),r=Math.floor(I(o)),l=Math.floor(o/Math.pow(10,r)),h=r<0?Math.pow(10,Math.abs(r)):1;do{n.push({value:o,major:na(o)}),++l,10===l&&(l=1,++r,h=r>=0?1:h),o=Math.round(l*Math.pow(10,r)*h)/h}while(rn?{start:e-i,end:e}:{start:e,end:e+i}}function la(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?D/a:0;for(let u=0;ue.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function ca(t){return 0===t||180===t?"center":t<180?"left":"right"}function da(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ua(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function fa(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,O);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o{const i=c(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?la(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return K(t*(O/(this._pointLabels.length||1))+H(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(i(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(i(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;o--){const e=n.setContext(t.getPointLabelContext(o)),a=mi(e.font),{x:r,y:l,textAlign:h,left:c,top:d,right:u,bottom:f}=t._pointLabelItems[o],{backdropColor:g}=e;if(!i(g)){const t=gi(e.borderRadius),i=pi(e.backdropPadding);s.fillStyle=g;const n=c-i.left,o=d-i.top,a=u-c+i.width,r=f-d+i.height;Object.values(t).some((t=>0!==t))?(s.beginPath(),Le(s,{x:n,y:o,w:a,h:r,radius:t}),s.fill()):s.fillRect(n,o,a,r)}Ae(s,t._pointLabels[o],r,l+a.lineHeight/2,a,{color:e.color,textAlign:h,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){r=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,s){const n=t.ctx,o=e.circular,{color:a,lineWidth:r}=e;!o&&!s||!a||!r||i<0||(n.save(),n.strokeStyle=a,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),fa(t,i,o,s),n.closePath(),n.stroke(),n.restore())}(this,n.setContext(this.getContext(e-1)),r,o)}})),s.display){for(t.save(),a=o-1;a>=0;a--){const i=s.setContext(this.getPointLabelContext(a)),{color:n,lineWidth:o}=i;o&&n&&(t.lineWidth=o,t.strokeStyle=n,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=mi(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=pi(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}Ae(t,s.label,0,-n,l,{color:r.color})})),t.restore()}drawTitle(){}}ga.id="radialLinear",ga.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Is.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},ga.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ga.descriptors={angleLines:{_fallback:"grid"}};const pa={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ma=Object.keys(pa);function ba(t,e){return t-e}function xa(t,e){if(i(e))return null;const s=t._adapter,{parser:n,round:a,isoWeekday:r}=t._parseOpts;let l=e;return"function"==typeof n&&(l=n(l)),o(l)||(l="string"==typeof n?s.parse(l,n):s.parse(l)),null===l?null:(a&&(l="week"!==a||!B(r)&&!0!==r?s.startOf(l,a):s.startOf(l,"isoWeek",r)),+l)}function _a(t,e,i,s){const n=ma.length;for(let o=ma.indexOf(t);o=e?i[s]:i[n]]=!0}}else t[e]=!0}function va(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,s,n,i):s}class wa extends $s{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),s=this._adapter=new wn._date(t.adapters.date);s.init(e),b(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:xa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:a,maxDefined:r}=this.getUserBounds();function l(t){a||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}a&&r||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),s=o(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=o(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=st(s,n,this.max);return this._unit=e.unit||(i.autoSkip?_a(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,s,n){for(let o=ma.length-1;o>=ma.indexOf(i);o--){const i=ma[o];if(pa[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return ma[i?ma.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=ma.indexOf(t)+1,i=ma.length;e+t.value)))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=Z(s,0,o),n=Z(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||_a(n.minUnit,e,i,this._getLabelCapacity(e)),a=r(n.stepSize,1),l="week"===o&&n.isoWeekday,h=B(l)||!0===l,c={};let d,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,h?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const g="data"===s.ticks.source&&this.getDataTimestamps();for(d=f,u=0;dt-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.time.displayFormats,a=this._unit,r=this._majorUnit,l=a&&o[a],h=r&&o[r],d=i[e],u=r&&h&&d&&d.major,f=this._adapter.format(t,s||(u?h:l)),g=n.ticks.callback;return g?c(g,[f,e,i],this):f}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=et(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=et(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}wa.id="time",wa.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ka extends wa{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ma(e,this.min),this._tableRange=Ma(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)})))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const a=i.items;let n,o=a.length-1,r=!1;for(;o>=0;--o)n=a[o],n._active?(n._total>i.duration&&(i.duration=n._total),n.tick(t),r=!0):(a[o]=a[a.length-1],a.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),a.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=a.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=color(t||transparent),a=s.valid&&color(e||transparent);return a&&a.valid?a.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Animation{constructor(t,e,i,s){const a=e[i];s=resolve([t.to,s,a,t.from]);const n=resolve([t.from,a,s]);this._active=!0,this._fn=t.fn||interpolators[t.type||typeof n],this._easing=effects[t.easing]||effects.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],a=i-this._start,n=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=resolve([t.to,e,s,t.from]),this._from=resolve([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,a=this._from,n=this._loop,o=this._to;let r;if(this._active=a!==o&&(n||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(a,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const a=t[s];if(!isObject(a))return;const n={};for(const t of e)n[t]=a[t];(isArray(a.properties)&&a.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,s=resolveTargetOptions(t,i);if(!s)return[];const a=this._createAnimations(s,i);return i.$shared&&awaitAll(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),a}_createAnimations(t,e){const i=this._properties,s=[],a=t.$animations||(t.$animations={}),n=Object.keys(e),o=Date.now();let r;for(r=n.length-1;r>=0;--r){const l=n[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=a[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,o);continue}c.cancel()}d&&d.duration?(a[l]=c=new Animation(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(animator.add(this._chart,i),!0):void 0}}function awaitAll(t,e){const i=[],s=Object.keys(e);for(let e=0;e0||!i&&e<0)return a.index}return null}function updateStacks(t,e){const{chart:i,_cachedMeta:s}=t,a=i._stacks||(i._stacks={}),{iScale:n,vScale:o,index:r}=s,l=n.axis,h=o.axis,c=getStackKey(n,o,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function createDatasetContext(t,e){return createContext(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function createDataContext(t,e,i){return createContext(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function clearStacks(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const isDirectUpdateMode=t=>"reset"===t||"none"===t,cloneIfNotShared=(t,e)=>e?t:Object.assign({},t),createStack=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=isStacked(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&clearStacks(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,a=e.xAxisID=valueOrDefault(i.xAxisID,getFirstScaleId(t,"x")),n=e.yAxisID=valueOrDefault(i.yAxisID,getFirstScaleId(t,"y")),o=e.rAxisID=valueOrDefault(i.rAxisID,getFirstScaleId(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,a,n,o),h=e.vAxisID=s(r,n,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),t._stacked&&clearStacks(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(isObject(e)){const t=this._cachedMeta;this._data=convertObjectDataToArray(e,t)}else if(i!==e){if(i){unlistenArrayEvents(i,this);const t=this._cachedMeta;clearStacks(t),t._parsed=[]}e&&Object.isExtensible(e)&&listenArrayEvents(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const a=e._stacked;e._stacked=isStacked(e.vScale,e),e.stack!==i.stack&&(s=!0,clearStacks(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&updateStacks(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:n}=i,o=a.axis;let r,l,h,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=isArray(s[t])?this.parseArrayData(i,s,t,e):isObject(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const a=()=>null===l[o]||d&&l[o]e||c=0;--d)if(!g()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,a,n;for(s=0,a=e.length;s=0&&tthis.getContext(i,s,e)),c);return g.$shared&&(g.$shared=r,a[n]=Object.freeze(cloneIfNotShared(g,r))),g}_resolveAnimations(t,e,i){const s=this.chart,a=this._cachedDataOpts,n=`animation-${e}`,o=a[n];if(o)return o;let r;if(!1!==s.options.animation){const s=this.chart.config,a=s.datasetAnimationScopeKeys(this._type,e),n=s.getOptionScopes(this.getDataset(),a);r=s.createResolver(n,this.getContext(t,i,e))}const l=new Animations(s,r&&r.animations);return r&&r._cacheable&&(a[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||isDirectUpdateMode(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),n=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:n}}updateElement(t,e,i,s){isDirectUpdateMode(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!isDirectUpdateMode(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,a=e.length,n=Math.min(a,s);n&&this.parse(0,n),a>s?this._insertElements(s,a-s,t):a{for(t.length+=e,o=t.length-1;o>=n;o--)t[o]=t[o-e]};for(r(a),o=t;ot-e)))}return t._cache.$bar}function computeMinSampleSize(t){const e=t.iScale,i=getAllScaleValues(e,t.type);let s,a,n,o,r=e._length;const l=()=>{32767!==n&&-32768!==n&&(defined(o)&&(r=Math.min(r,Math.abs(n-o)||r)),o=n)};for(s=0,a=i.length;s0?a[t-1]:null,r=tMath.abs(r)&&(l=r,h=o),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:n,min:o,max:r}}function parseValue(t,e,i,s){return isArray(t)?parseFloatBar(t,e,i,s):e[i.axis]=i.parse(t,s),e}function parseArrayOrPrimitive(t,e,i,s){const a=t.iScale,n=t.vScale,o=a.getLabels(),r=a===n,l=[];let h,c,d,u;for(h=i,c=i+s;h=i?1:-1)}function borderProps(t){let e,i,s,a,n;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),a=i.options.stacked,n=[],o=t=>{const i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if(isNullOrUndef(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!o(i))&&((!1===a||-1===n.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&n.push(i.stack),i.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return-1===a?s.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let a,n;for(a=0,n=e.data.length;a=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),o=s.getLabelForValue(n.x),r=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+o+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const a="reset"===s,{iScale:n,vScale:o}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=n.axis,c=o.axis;for(let d=e;d_angleBetween(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),p=(t,e,s)=>_angleBetween(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),f=g(0,h,d),m=g(HALF_PI,c,u),x=p(PI,h,d),b=p(PI+HALF_PI,c,u);s=(f-x)/2,a=(m-b)/2,n=-(f+x)/2,o=-(m+b)/2}return{ratioX:s,ratioY:a,offsetX:n,offsetY:o}}class DoughnutController extends DatasetController{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,a)=>{const n=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,fontColor:s,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let a,n,o=t=>+i[t];if(isObject(i[t])){const{key:t="value"}=this._parsing;o=e=>+resolveObjectKey(i[e],t)}for(a=t,n=t+e;a0&&!isNaN(t)?TAU*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=formatNumber(e._parsed[t],i.options.locale);return{label:s[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,a,n,o,r;if(!t)for(s=0,a=i.data.datasets.length;s0&&this.getParsed(e-1);for(let i=0;i=x){b.skip=!0;continue}const y=this.getParsed(i),v=isNullOrUndef(y[u]),k=b[d]=n.getPixelForValue(y[d],i),S=b[u]=a||v?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,y,r):y[u],i);b.skip=isNaN(k)||isNaN(S)||v,b.stop=i>0&&Math.abs(y[d]-_[d])>f,p&&(b.parsed=y,b.raw=l.data[i]),c&&(b.options=h||this.resolveDataElementOptions(i,g.active?"active":s)),m||this.updateElement(g,i,b,s),_=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const a=s[0].size(this.resolveDataElementOptions(0)),n=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,n)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class PolarAreaController extends DatasetController{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,a)=>{const n=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,fontColor:s,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=formatNumber(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:a}}parseObjectData(t,e,i,s){return _parseObjectDataRadialScale.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(s/2,0),n=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(t,e,i,s){const a="reset"===s,n=this.chart,o=n.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*PI;let d,u=c;const g=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?toRadians(this.resolveDataElementOptions(t,e).angle||i):0}}class PieController extends DoughnutController{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class RadarController extends DatasetController{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return _parseObjectDataRadialScale.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const n={_loop:!0,_fullLoop:a.length===s.length,options:e};this.updateElement(i,void 0,n,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const a=this._cachedMeta.rScale,n="reset"===s;for(let o=e;o0&&this.getParsed(e-1);for(let h=e;h0&&Math.abs(i[u]-b[u])>m,f&&(p.parsed=i,p.raw=l.data[h]),d&&(p.options=c||this.resolveDataElementOptions(h,e.active?"active":s)),x||this.updateElement(e,h,p,s),b=i}this.updateSharedOptions(c,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const a=e[0].size(this.resolveDataElementOptions(0)),n=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,a,n)/2}}var controllers=Object.freeze({__proto__:null,BarController:BarController,BubbleController:BubbleController,DoughnutController:DoughnutController,LineController:LineController,PieController:PieController,PolarAreaController:PolarAreaController,RadarController:RadarController,ScatterController:ScatterController});function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(t){Object.assign(DateAdapterBase.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(t,e,i,s){const{controller:a,data:n,_sorted:o}=t,r=a._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&o&&n.length){const t=r._reversePixels?_rlookupByKey:_lookupByKey;if(!s)return t(n,e,i);if(a._sharedOptions){const s=n[0],a="function"==typeof s.getRange&&s.getRange(e);if(a){const s=t(n,e,i-a),o=t(n,e,i+a);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:n.length-1}}function evaluateInteractionItems(t,e,i,s,a){const n=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=n.length;t{t[o](e[i],a)&&(n.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,a))})),s&&!r?[]:n}var Interaction={evaluateInteractionItems:evaluateInteractionItems,modes:{index(t,e,i,s){const a=getRelativePosition(e,t),n=i.axis||"x",o=i.includeInvisible||!1,r=i.intersect?getIntersectItems(t,a,n,s,o):getNearestItems(t,a,n,!1,s,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const a=getRelativePosition(e,t),n=i.axis||"xy",o=i.includeInvisible||!1;let r=i.intersect?getIntersectItems(t,a,n,s,o):getNearestItems(t,a,n,!1,s,o);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tgetIntersectItems(t,getRelativePosition(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const a=getRelativePosition(e,t),n=i.axis||"xy",o=i.includeInvisible||!1;return getNearestItems(t,a,n,i.intersect,s,o)},x:(t,e,i,s)=>getAxisItems(t,getRelativePosition(e,t),"x",i.intersect,s),y:(t,e,i,s)=>getAxisItems(t,getRelativePosition(e,t),"y",i.intersect,s)}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(t,e){return t.filter((t=>t.pos===e))}function filterDynamicPositionByAxis(t,e){return t.filter((t=>-1===STATIC_POSITIONS.indexOf(t.pos)&&t.box.axis===e))}function sortByWeight(t,e){return t.sort(((t,i)=>{const s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight}))}function wrapBoxes(t){const e=[];let i,s,a,n,o,r;for(i=0,s=(t||[]).length;it.box.fullSize)),!0),s=sortByWeight(filterByPosition(e,"left"),!0),a=sortByWeight(filterByPosition(e,"right")),n=sortByWeight(filterByPosition(e,"top"),!0),o=sortByWeight(filterByPosition(e,"bottom")),r=filterDynamicPositionByAxis(e,"x"),l=filterDynamicPositionByAxis(e,"y");return{fullSize:i,leftAndTop:s.concat(n),rightAndBottom:a.concat(l).concat(o).concat(r),chartArea:filterByPosition(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:n.concat(o).concat(r)}}function getCombinedMax(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function updateMaxPadding(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function updateDims(t,e,i,s){const{pos:a,box:n}=i,o=t.maxPadding;if(!isObject(a)){i.size&&(t[a]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?n.height:n.width),i.size=e.size/e.count,t[a]+=i.size}n.getPadding&&updateMaxPadding(o,n.getPadding());const r=Math.max(0,e.outerWidth-getCombinedMax(o,t,"left","right")),l=Math.max(0,e.outerHeight-getCombinedMax(o,t,"top","bottom")),h=r!==t.w,c=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function handleMaxPadding(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}function getMargins(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function fitBoxes(t,e,i,s){const a=[];let n,o,r,l,h,c;for(n=0,o=t.length,h=0;n{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:n,availableHeight:o,vBoxMaxWidth:n/2/c,hBoxMaxHeight:o/2}),u=Object.assign({},a);updateMaxPadding(u,toPadding(s));const g=Object.assign({maxPadding:u,w:n,h:o,x:a.left,y:a.top},a),p=setLayoutDims(l.concat(h),d);fitBoxes(r.fullSize,g,d,p),fitBoxes(l,g,d,p),fitBoxes(h,g,d,p)&&fitBoxes(l,g,d,p),handleMaxPadding(g),placeBoxes(r.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,placeBoxes(r.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},each(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class BasePlatform{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class BasicPlatform extends BasePlatform{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=t=>null===t||""===t;function initCanvas(t,e){const i=t.style,s=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(a)){const e=readUsedSize(t,"width");void 0!==e&&(t.width=e)}if(isNullOrEmpty(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=readUsedSize(t,"height");void 0!==e&&(t.height=e)}return t}const eventListenerOptions=!!supportsEventListenerOptions&&{passive:!0};function addListener(t,e,i){t&&t.addEventListener(e,i,eventListenerOptions)}function removeListener(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,eventListenerOptions)}function fromNativeEvent(t,e){const i=EVENT_TYPES[t.type]||t.type,{x:s,y:a}=getRelativePosition(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==a?a:null}}function nodeListContains(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function createAttachObserver(t,e,i){const s=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||nodeListContains(i.addedNodes,s),e=e&&!nodeListContains(i.removedNodes,s);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}function createDetachObserver(t,e,i){const s=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||nodeListContains(i.removedNodes,s),e=e&&!nodeListContains(i.addedNodes,s);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const t=window.devicePixelRatio;t!==oldDevicePixelRatio&&(oldDevicePixelRatio=t,drpListeningCharts.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function listenDevicePixelRatioChanges(t,e){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(t,e)}function unlistenDevicePixelRatioChanges(t){drpListeningCharts.delete(t),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(t,e,i){const s=t.canvas,a=s&&_getParentNode(s);if(!a)return;const n=throttled(((t,e)=>{const s=a.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||n(i,s)}));return o.observe(a),listenDevicePixelRatioChanges(t,n),o}function releaseObserver(t,e,i){i&&i.disconnect(),"resize"===e&&unlistenDevicePixelRatioChanges(t)}function createProxyAndListen(t,e,i){const s=t.canvas,a=throttled((e=>{null!==t.ctx&&i(fromNativeEvent(e,t))}),t);return addListener(s,e,a),a}class DomPlatform extends BasePlatform{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(initCanvas(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const s=i[t];isNullOrUndef(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[e]||createProxyAndListen;s[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[e]||removeListener)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return getMaximumSize(t,e,i,s)}isAttached(t){const e=t&&_getParentNode(t);return!(!e||!e.isConnected)}}function _detectPlatform(t){return!_isDomSupported()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function autoSkip(t,e){const i=t.options.ticks,s=determineMaxTicks(t),a=Math.min(i.maxTicksLimit||s,s),n=i.major.enabled?getMajorIndices(e):[],o=n.length,r=n[0],l=n[o-1],h=[];if(o>a)return skipMajors(e,h,n,o/a),h;const c=calculateSpacing(n,e,a);if(o>0){let t,i;const s=o>1?Math.round((l-r)/(o-1)):null;for(skip(e,h,c,isNullOrUndef(s)?0:r-s,r),t=0,i=o-1;ta)return e}return Math.max(a,1)}function getMajorIndices(t){const e=[];let i,s;for(i=0,s=t.length;i"left"===t?"right":"right"===t?"left":t,offsetFromEdge=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,getTicksLimit=(t,e)=>Math.min(e||t,t);function sample(t,e){const i=[],s=t.length/e,a=t.length;let n=0;for(;no+r)))return h}function garbageCollect(t,e){each(t,(t=>{const i=t.gc,s=i.length/2;let a;if(s>e){for(a=0;as?s:i,s=a&&i>s?i:s,{min:finiteOrDefault(i,finiteOrDefault(s,i)),max:finiteOrDefault(s,finiteOrDefault(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:a,ticks:n}=this.options,o=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o=a||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=_limitValue(this.chart.width-c,0,this.maxWidth);n=t.offset?this.maxWidth/i:u/(i-1),c+6>n&&(n=u/(i-(t.offset?.5:1)),o=this.maxHeight-getTickMarkLength(t.grid)-e.padding-getTitleHeight(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=toDegrees(Math.min(Math.asin(_limitValue((h.highest.height+6)/n,-1,1)),Math.asin(_limitValue(o/r,-1,1))-Math.asin(_limitValue(d/r,-1,1)))),l=Math.max(s,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:a}}=this,n=this._isVisible(),o=this.isHorizontal();if(n){const n=getTitleHeight(s,e.options.font);if(o?(t.width=this.maxWidth,t.height=getTickMarkLength(a)+n):(t.height=this.maxHeight,t.width=getTickMarkLength(a)+n),i.display&&this.ticks.length){const{first:e,last:s,widest:a,highest:n}=this._getLabelSizes(),r=2*i.padding,l=toRadians(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(o){const e=i.mirror?0:c*a.width+h*n.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*a.width+c*n.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:a,padding:n},position:o}=this.options,r=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===a?d=e.width:"end"===a?c=t.width:"inner"!==a&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-o+n)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-h+n)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===a?(i=0,s=t.height):"end"===a&&(i=e.height,s=0),this.paddingTop=i+n,this.paddingBottom=s+n}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e({width:n[t]||0,height:o[t]||0});return{first:S(0),last:S(e-1),widest:S(v),highest:S(k),widths:n,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&to*s?o/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:a,position:n,border:o}=s,r=a.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),c=getTickMarkLength(a),d=[],u=o.setContext(this.getContext()),g=u.display?u.width:0,p=g/2,f=function(t){return _alignPixel(i,t,g)};let m,x,b,_,y,v,k,S,D,M,P,w;if("top"===n)m=f(this.bottom),v=this.bottom-c,S=m-p,M=f(t.top)+p,w=t.bottom;else if("bottom"===n)m=f(this.top),M=t.top,w=f(t.bottom)-p,v=m+p,S=this.top+c;else if("left"===n)m=f(this.right),y=this.right-c,k=m-p,D=f(t.left)+p,P=t.right;else if("right"===n)m=f(this.left),D=t.left,P=f(t.right)-p,y=m+p,k=this.left+c;else if("x"===e){if("center"===n)m=f((t.top+t.bottom)/2+.5);else if(isObject(n)){const t=Object.keys(n)[0],e=n[t];m=f(this.chart.scales[t].getPixelForValue(e))}M=t.top,w=t.bottom,v=m+p,S=v+c}else if("y"===e){if("center"===n)m=f((t.left+t.right)/2);else if(isObject(n)){const t=Object.keys(n)[0],e=n[t];m=f(this.chart.scales[t].getPixelForValue(e))}y=m-p,k=y-c,D=t.left,P=t.right}const C=valueOrDefault(s.ticks.maxTicksLimit,h),A=Math.max(1,Math.ceil(h/C));for(x=0;x0&&(n-=s/2)}d={left:n,top:a,width:s+e.width,height:i+e.height,color:t.backdropColor}}f.push({label:_,font:D,textOffset:w,options:{rotation:p,color:i,strokeColor:r,strokeWidth:h,textAlign:u,textBaseline:C,translation:[y,v],backdrop:d}})}return f}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-toRadians(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,n=t+a,o=this._getLabelSizes().widest.width;let r,l;return"left"===e?s?(l=this.right+a,"near"===i?r="left":"center"===i?(r="center",l+=o/2):(r="right",l+=o)):(l=this.right-n,"near"===i?r="right":"center"===i?(r="center",l-=o/2):(r="left",l=this.left)):"right"===e?s?(l=this.left+a,"near"===i?r="right":"center"===i?(r="center",l-=o/2):(r="left",l-=o)):(l=this.left+n,"near"===i?r="left":"center"===i?(r="center",l+=o/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,n),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,n;const o=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,n=s.length;a{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let a,n;for(a=0,n=e.length;a{const s=i.split("."),a=s.pop(),n=[t].concat(s).join("."),o=e[i].split("."),r=o.pop(),l=o.join(".");defaults.route(n,a,l,r)}))}function isIChartComponent(t){return"id"in t&&"defaults"in t}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):each(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=_capitalize(t);callback(i["before"+s],[],i),e[t](i),callback(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function allPlugins(t){const e={},i=[],s=Object.keys(registry.plugins.items);for(let t=0;t1&&idMatchesAxis(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function retrieveAxisFromDatasets(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return getAxisFromDataset(t,"x",i[0])||getAxisFromDataset(t,"y",i[0])}return{}}function mergeScaleConfig(t,e){const i=overrides[t.type]||{scales:{}},s=e.scales||{},a=getIndexAxis(t.type,e),n=Object.create(null);return Object.keys(s).forEach((e=>{const o=s[e];if(!isObject(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=determineAxis(e,o,retrieveAxisFromDatasets(e,t),defaults.scales[o.type]),l=getDefaultScaleIDFromAxis(r,a),h=i.scales||{};n[e]=mergeIf(Object.create(null),[{axis:r},o,h[r],h[l]])})),t.data.datasets.forEach((i=>{const a=i.type||t.type,o=i.indexAxis||getIndexAxis(a,e),r=(overrides[a]||{}).scales||{};Object.keys(r).forEach((t=>{const e=getAxisFromDefaultScaleID(t,o),a=i[e+"AxisID"]||e;n[a]=n[a]||Object.create(null),mergeIf(n[a],[{axis:e},s[a],r[t]])}))})),Object.keys(n).forEach((t=>{const e=n[t];mergeIf(e,[defaults.scales[e.type],defaults.scale])})),n}function initOptions(t){const e=t.options||(t.options={});e.plugins=valueOrDefault(e.plugins,{}),e.scales=mergeScaleConfig(t,e)}function initData(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}function initConfig(t){return(t=t||{}).data=initData(t.data),initOptions(t),t}const keyCache=new Map,keysCached=new Set;function cachedKeys(t,e){let i=keyCache.get(t);return i||(i=e(),keyCache.set(t,i),keysCached.add(i)),i}const addIfFound=(t,e,i)=>{const s=resolveObjectKey(e,i);void 0!==s&&t.add(s)};class Config{constructor(t){this._config=initConfig(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=initData(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),initOptions(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return cachedKeys(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return cachedKeys(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return cachedKeys(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return cachedKeys(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:a}=this,n=this._cachedScopes(t,i),o=n.get(e);if(o)return o;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>addIfFound(r,t,e)))),e.forEach((t=>addIfFound(r,s,t))),e.forEach((t=>addIfFound(r,overrides[a]||{},t))),e.forEach((t=>addIfFound(r,defaults,t))),e.forEach((t=>addIfFound(r,descriptors,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),keysCached.has(e)&&n.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,overrides[e]||{},defaults.datasets[e]||{},{type:e},defaults,descriptors]}resolveNamedOptions(t,e,i,s=[""]){const a={$shared:!0},{resolver:n,subPrefixes:o}=getResolver(this._resolverCache,t,s);let r=n;if(needContext(n,e)){a.$shared=!1,i=isFunction(i)?i():i;const e=this.createResolver(t,i,o);r=_attachContext(n,i,e)}for(const t of e)a[t]=r[t];return a}createResolver(t,e,i=[""],s){const{resolver:a}=getResolver(this._resolverCache,t,i);return isObject(e)?_attachContext(a,e,void 0,s):a}}function getResolver(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const a=i.join();let n=s.get(a);if(!n){n={resolver:_createResolver(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(a,n)}return n}const hasFunction=t=>isObject(t)&&Object.getOwnPropertyNames(t).some((e=>isFunction(t[e])));function needContext(t,e){const{isScriptable:i,isIndexable:s}=_descriptors(t);for(const a of e){const e=i(a),n=s(a),o=(n||e)&&t[a];if(e&&(isFunction(o)||hasFunction(o))||n&&isArray(o))return!0}return!1}var version="4.4.3";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(t,e){return"top"===t||"bottom"===t||-1===KNOWN_POSITIONS.indexOf(t)&&"x"===e}function compare2Level(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function onAnimationsComplete(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),callback(i&&i.onComplete,[t],e)}function onAnimationProgress(t){const e=t.chart,i=e.options.animation;callback(i&&i.onProgress,[t],e)}function getCanvas(t){return _isDomSupported()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const instances={},getChart=t=>{const e=getCanvas(t);return Object.values(instances).filter((t=>t.canvas===e)).pop()};function moveNumericKeys(t,e,i){const s=Object.keys(t);for(const a of s){const s=+a;if(s>=e){const n=t[a];delete t[a],(i>0||s>e)&&(t[s+i]=n)}}}function determineLastEvent(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}function getSizeForArea(t,e,i){return t.options.clip?t[i]:e[i]}function getDatasetArea(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:getSizeForArea(i,e,"left"),right:getSizeForArea(i,e,"right"),top:getSizeForArea(s,e,"top"),bottom:getSizeForArea(s,e,"bottom")}:e}class Chart{static defaults=defaults;static instances=instances;static overrides=overrides;static registry=registry;static version=version;static getChart=getChart;static register(...t){registry.add(...t),invalidatePlugins()}static unregister(...t){registry.remove(...t),invalidatePlugins()}constructor(t,e){const i=this.config=new Config(e),s=getCanvas(t),a=getChart(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_detectPlatform(s)),this.platform.updateConfig(i);const o=this.platform.acquireContext(s,n.aspectRatio),r=o&&o.canvas,l=r&&r.height,h=r&&r.width;this.id=uid(),this.ctx=o,this.canvas=r,this.width=h,this.height=l,this._options=n,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce((t=>this.update(t)),n.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,o&&r?(animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:a}=this;return isNullOrUndef(t)?e&&a?a:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(t,e){animator.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(s,t,e,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,retinaScale(this,o,!0)&&(this.notifyPlugins("resize",{size:n}),callback(i.onResize,[this,n],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};each(t,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let a=[];e&&(a=a.concat(Object.keys(e).map((t=>{const i=e[t],s=determineAxis(t,i),a="r"===s,n="x"===s;return{options:i,dposition:a?"chartArea":n?"bottom":"left",dtype:a?"radialLinear":n?"category":"linear"}})))),each(a,(e=>{const a=e.options,n=a.id,o=determineAxis(n,a),r=valueOrDefault(a.type,e.dtype);void 0!==a.position&&positionIsHorizontal(a.position,o)===positionIsHorizontal(e.dposition)||(a.position=e.dposition),s[n]=!0;let l=null;if(n in i&&i[n].type===r)l=i[n];else{l=new(registry.getScale(r))({id:n,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(a,t)})),each(s,((t,e)=>{t||delete i[e]})),each(i,(t=>{layouts.configure(this,t,t.options),layouts.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(compare2Level("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){each(this.scales,(t=>{layouts.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);setsEqual(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:a}of e){moveNumericKeys(t,s,"_removeElements"===i?-a:a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;layouts.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],each(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,a=getDatasetArea(t,this.chartArea),n={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(s&&clipArea(e,{left:!1===i.left?0:a.left-i.left,right:!1===i.right?this.width:a.right+i.right,top:!1===i.top?0:a.top-i.top,bottom:!1===i.bottom?this.height:a.bottom+i.bottom}),t.controller.draw(),s&&unclipArea(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return _isPointInArea(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const a=Interaction.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",a=this.getDatasetMeta(t),n=a.controller._resolveAnimations(void 0,s);defined(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(a,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),animator.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};each(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let n;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",n)};n=()=>{this.attached=!1,s("resize",a),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():n()}unbindEvents(){each(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},each(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let a,n,o,r;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+s+"DatasetHoverStyle"]()),o=0,r=t.length;o{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!_elementsEqual(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,a=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),n=a(e,t),o=i?t:a(t,e);n.length&&this.updateHoverStyle(n,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:a}=this,n=e,o=this._getActiveElements(t,s,i,n),r=_isClickEvent(t),l=determineLastEvent(t,this._lastEvent,i,r);i&&(this._lastEvent=null,callback(a.onHover,[t,o,this],this),r&&callback(a.onClick,[t,o,this],this));const h=!_elementsEqual(o,s);return(h||e)&&(this._active=o,this._updateHoverStyles(o,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}function invalidatePlugins(){return each(Chart.instances,(t=>t._plugins.invalidate()))}function clipArc(t,e,i){const{startAngle:s,pixelMargin:a,x:n,y:o,outerRadius:r,innerRadius:l}=e;let h=a/r;t.beginPath(),t.arc(n,o,r,s-h,i+h),l>a?(h=a/l,t.arc(n,o,l,i+h,s-h,!0)):t.arc(n,o,a,i+HALF_PI,s-HALF_PI),t.closePath(),t.clip()}function toRadiusCorners(t){return _readValueToProps(t,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(t,e,i,s){const a=toRadiusCorners(t.options.borderRadius),n=(i-e)/2,o=Math.min(n,s*e/2),r=t=>{const e=(i-Math.min(n,t))*s/2;return _limitValue(t,0,Math.min(n,e))};return{outerStart:r(a.outerStart),outerEnd:r(a.outerEnd),innerStart:_limitValue(a.innerStart,0,o),innerEnd:_limitValue(a.innerEnd,0,o)}}function rThetaToXY(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function pathArc(t,e,i,s,a,n){const{x:o,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let g=0;const p=a-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;g=(p-(0!==t?p*t/(t+s):p))/2}const f=(p-Math.max(.001,p*d-i/PI)/d)/2,m=l+f+g,x=a-f-g,{outerStart:b,outerEnd:_,innerStart:y,innerEnd:v}=parseBorderRadius$1(e,u,d,x-m),k=d-b,S=d-_,D=m+b/k,M=x-_/S,P=u+y,w=u+v,C=m+y/P,A=x-v/w;if(t.beginPath(),n){const e=(D+M)/2;if(t.arc(o,r,d,D,e),t.arc(o,r,d,e,M),_>0){const e=rThetaToXY(S,M,o,r);t.arc(e.x,e.y,_,M,x+HALF_PI)}const i=rThetaToXY(w,x,o,r);if(t.lineTo(i.x,i.y),v>0){const e=rThetaToXY(w,A,o,r);t.arc(e.x,e.y,v,x+HALF_PI,A+Math.PI)}const s=(x-v/u+(m+y/u))/2;if(t.arc(o,r,u,x-v/u,s,!0),t.arc(o,r,u,s,m+y/u,!0),y>0){const e=rThetaToXY(P,C,o,r);t.arc(e.x,e.y,y,C+Math.PI,m-HALF_PI)}const a=rThetaToXY(k,m,o,r);if(t.lineTo(a.x,a.y),b>0){const e=rThetaToXY(k,D,o,r);t.arc(e.x,e.y,b,m-HALF_PI,D)}}else{t.moveTo(o,r);const e=Math.cos(D)*d+o,i=Math.sin(D)*d+r;t.lineTo(e,i);const s=Math.cos(M)*d+o,a=Math.sin(M)*d+r;t.lineTo(s,a)}t.closePath()}function drawArc(t,e,i,s,a){const{fullCircles:n,startAngle:o,circumference:r}=e;let l=e.endAngle;if(n){pathArc(t,e,i,s,l,a);for(let e=0;e"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:a,distance:n}=getAngleFromPoint(s,{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=valueOrDefault(c,r-o)>=TAU||_angleBetween(a,o,r),g=_isBetween(n,l+d,h+d);return u&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:a,innerRadius:n,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,h=(s+a)/2,c=(n+o+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,a=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>TAU?Math.floor(i/TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*s,Math.sin(o)*s);const r=s*(1-Math.sin(Math.min(PI,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,drawArc(t,this,r,a,n),drawBorder(t,this,r,a,n),t.restore()}}function setStyle(t,e,i=e){t.lineCap=valueOrDefault(i.borderCapStyle,e.borderCapStyle),t.setLineDash(valueOrDefault(i.borderDash,e.borderDash)),t.lineDashOffset=valueOrDefault(i.borderDashOffset,e.borderDashOffset),t.lineJoin=valueOrDefault(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=valueOrDefault(i.borderWidth,e.borderWidth),t.strokeStyle=valueOrDefault(i.borderColor,e.borderColor)}function lineTo(t,e,i){t.lineTo(i.x,i.y)}function getLineMethod(t){return t.stepped?_steppedLineTo:t.tension||"monotone"===t.cubicInterpolationMode?_bezierCurveTo:lineTo}function pathVars(t,e,i={}){const s=t.length,{start:a=0,end:n=s-1}=i,{start:o,end:r}=e,l=Math.max(a,o),h=Math.min(n,r),c=ar&&n>r;return{count:s,start:l,loop:e.loop,ilen:h(o+(h?r-t:t))%n,_=()=>{g!==p&&(t.lineTo(m,p),t.lineTo(m,g),t.lineTo(m,f))};for(l&&(d=a[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=a[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ip&&(p=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=s,x=0,g=p=i),f=i}_()}function _getSegmentMethod(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?fastPathSegment:pathSegment}function _getInterpolationMethod(t){return t.stepped?_steppedInterpolation:t.tension||"monotone"===t.cubicInterpolationMode?_bezierInterpolation:_pointInLine}function strokePathWithCache(t,e,i,s){let a=e._path;a||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),setStyle(t,e.options),t.stroke(a)}function strokePathDirect(t,e,i,s){const{segments:a,options:n}=e,o=_getSegmentMethod(e);for(const r of a)setStyle(t,n,r.style),t.beginPath(),o(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}const usePath2D="function"==typeof Path2D;function draw(t,e,i,s){usePath2D&&!e.options.segment?strokePathWithCache(t,e,i,s):strokePathDirect(t,e,i,s)}class LineElement extends Element{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;_updateBezierControlPoints(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_computeSegments(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],a=this.points,n=_boundSegments(this,{property:e,start:s,end:s});if(!n.length)return;const o=[],r=_getInterpolationMethod(i);let l,h;for(l=0,h=n.length;lt.replace("rgb(","rgba(").replace(")",", 0.5)")));function getBorderColor(t){return BORDER_COLORS[t%BORDER_COLORS.length]}function getBackgroundColor(t){return BACKGROUND_COLORS[t%BACKGROUND_COLORS.length]}function colorizeDefaultDataset(t,e){return t.borderColor=getBorderColor(e),t.backgroundColor=getBackgroundColor(e),++e}function colorizeDoughnutDataset(t,e){return t.backgroundColor=t.data.map((()=>getBorderColor(e++))),e}function colorizePolarAreaDataset(t,e){return t.backgroundColor=t.data.map((()=>getBackgroundColor(e++))),e}function getColorizer(t){let e=0;return(i,s)=>{const a=t.getDatasetMeta(s).controller;a instanceof DoughnutController?e=colorizeDoughnutDataset(i,e):a instanceof PolarAreaController?e=colorizePolarAreaDataset(i,e):a&&(e=colorizeDefaultDataset(i,e))}}function containsColorsDefinitions(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function containsColorsDefinition(t){return t&&(t.borderColor||t.backgroundColor)}var plugin_colors={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:a}=t.config,{elements:n}=a;if(!i.forceOverride&&(containsColorsDefinitions(s)||containsColorsDefinition(a)||n&&containsColorsDefinitions(n)))return;const o=getColorizer(t);s.forEach(o)}};function lttbDecimation(t,e,i,s,a){const n=a.samples||s;if(n>=i)return t.slice(e,e+i);const o=[],r=(i-2)/(n-2);let l=0;const h=e+i-1;let c,d,u,g,p,f=e;for(o[l++]=t[f],c=0;cu&&(u=g,d=t[s],p=s);o[l++]=d,f=p}return o[l++]=t[h],o}function minMaxDecimation(t,e,i,s){let a,n,o,r,l,h,c,d,u,g,p=0,f=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(a=e;ag&&(g=r,c=a),p=(f*p+n.x)/++f;else{const i=a-1;if(!isNullOrUndef(h)&&!isNullOrUndef(c)){const e=Math.min(h,c),s=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:p}),s!==d&&s!==i&&m.push({...t[s],x:p})}a>0&&i!==d&&m.push(t[i]),m.push(n),l=e,f=0,u=g=r,h=c=d=a}}return m}function cleanDecimatedDataset(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function cleanDecimatedData(t){t.data.datasets.forEach((t=>{cleanDecimatedDataset(t)}))}function getStartAndCountOfVisiblePointsSimplified(t,e){const i=e.length;let s,a=0;const{iScale:n}=t,{min:o,max:r,minDefined:l,maxDefined:h}=n.getUserBounds();return l&&(a=_limitValue(_lookupByKey(e,n.axis,o).lo,0,i-1)),s=h?_limitValue(_lookupByKey(e,n.axis,r).hi+1,a,i)-a:i-a,{start:a,count:s}}var plugin_decimation={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void cleanDecimatedData(t);const s=t.width;t.data.datasets.forEach(((e,a)=>{const{_data:n,indexAxis:o}=e,r=t.getDatasetMeta(a),l=n||e.data;if("y"===resolve([o,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const h=t.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=getStartAndCountOfVisiblePointsSimplified(r,l);if(d<=(i.threshold||4*s))return void cleanDecimatedDataset(e);let u;switch(isNullOrUndef(n)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=lttbDecimation(l,c,d,s,i);break;case"min-max":u=minMaxDecimation(l,c,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){cleanDecimatedData(t)}};function _segments(t,e,i){const s=t.segments,a=t.points,n=e.points,o=[];for(const t of s){let{start:s,end:r}=t;r=_findSegmentEnd(s,r,a);const l=_getBounds(i,a[s],a[r],t.loop);if(!e.segments){o.push({source:t,target:l,start:a[s],end:a[r]});continue}const h=_boundSegments(e,l);for(const e of h){const s=_getBounds(i,n[e.start],n[e.end],e.loop),r=_boundSegment(t,a,s);for(const t of r)o.push({source:t,target:e,start:{[i]:_getEdge(l,s,"start",Math.max)},end:{[i]:_getEdge(l,s,"end",Math.min)}})}}return o}function _getBounds(t,e,i,s){if(s)return;let a=e[t],n=i[t];return"angle"===t&&(a=_normalizeAngle(a),n=_normalizeAngle(n)),{property:t,start:a,end:n}}function _pointsFromSegments(t,e){const{x:i=null,y:s=null}=t||{},a=e.points,n=[];return e.segments.forEach((({start:t,end:e})=>{e=_findSegmentEnd(t,e,a);const o=a[t],r=a[e];null!==s?(n.push({x:o.x,y:s}),n.push({x:r.x,y:s})):null!==i&&(n.push({x:i,y:o.y}),n.push({x:i,y:r.y}))})),n}function _findSegmentEnd(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function _getEdge(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function _createBoundaryLine(t,e){let i=[],s=!1;return isArray(t)?(s=!0,i=t):i=_pointsFromSegments(t,e),i.length?new LineElement({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function _shouldApplyFill(t){return t&&!1!==t.fill}function _resolveTarget(t,e,i){let s=t[e].fill;const a=[e];let n;if(!i)return s;for(;!1!==s&&-1===a.indexOf(s);){if(!isNumberFinite(s))return s;if(n=t[s],!n)return!1;if(n.visible)return s;a.push(s),s=n.fill}return!1}function _decodeFill(t,e,i){const s=parseFillOption(t);if(isObject(s))return!isNaN(s.value)&&s;let a=parseFloat(s);return isNumberFinite(a)&&Math.floor(a)===a?decodeTargetIndex(s[0],e,a,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function decodeTargetIndex(t,e,i,s){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=s)&&i}function _getTargetPixel(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:isObject(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}function _getTargetValue(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:isObject(t)?t.value:e.getBaseValue(),s}function parseFillOption(t){const e=t.options,i=e.fill;let s=valueOrDefault(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}function _buildStackLine(t){const{scale:e,index:i,line:s}=t,a=[],n=s.segments,o=s.points,r=getLinesBelow(e,i);r.push(_createBoundaryLine({x:null,y:e.bottom},s));for(let t=0;t=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(n,i.axis),s&&i.fill&&_drawfill(t.ctx,i,n))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;_shouldApplyFill(i)&&_drawfill(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;_shouldApplyFill(s)&&"beforeDatasetDraw"===i.drawTime&&_drawfill(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const getBoxSize=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},itemsEqual=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Legend extends Element{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=callback(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=toFont(i.font),a=s.size,n=this._computeTitleHeight(),{boxWidth:o,itemHeight:r}=getBoxSize(i,a);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(n,a,o,r)+10):(h=this.maxHeight,l=this._fitCols(n,s,o,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:a,maxWidth:n,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+o;let c=t;a.textAlign="left",a.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,g)=>{const p=i+e/2+a.measureText(t.text).width;(0===g||l[l.length-1]+p+2*o>n)&&(c+=h,l[l.length-(g>0?0:1)]=0,u+=h,d++),r[g]={left:0,top:u,row:d,width:p,height:s},l[l.length-1]+=p+o})),c}_fitCols(t,e,i,s){const{ctx:a,maxHeight:n,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=n-t;let c=o,d=0,u=0,g=0,p=0;return this.legendItems.forEach(((t,n)=>{const{itemWidth:f,itemHeight:m}=calculateItemSize(i,e,a,t,s);n>0&&u+m+2*o>h&&(c+=d+o,l.push({width:d,height:u}),g+=d+o,p++,d=u=0),r[n]={left:g,top:u,col:p,width:f,height:m},d=Math.max(d,f),u+=m+o})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:a}}=this,n=getRtlAdapter(a,this.left,this.width);if(this.isHorizontal()){let a=0,o=_alignStartEnd(i,this.left+s,this.right-this.lineWidths[a]);for(const r of e)a!==r.row&&(a=r.row,o=_alignStartEnd(i,this.left+s,this.right-this.lineWidths[a])),r.top+=this.top+t+s,r.left=n.leftForLtr(n.x(o),r.width),o+=r.width+s}else{let a=0,o=_alignStartEnd(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const r of e)r.col!==a&&(a=r.col,o=_alignStartEnd(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),r.top=o,r.left+=this.left+s,r.left=n.leftForLtr(n.x(r.left),r.width),o+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;clipArea(t,this),this._draw(),unclipArea(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:a,labels:n}=t,o=defaults.color,r=getRtlAdapter(t.rtl,this.left,this.width),l=toFont(n.font),{padding:h}=n,c=l.size,d=c/2;let u;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:g,boxHeight:p,itemHeight:f}=getBoxSize(n,c),m=this.isHorizontal(),x=this._computeTitleHeight();u=m?{x:_alignStartEnd(a,this.left+h,this.right-i[0]),y:this.top+h+x,line:0}:{x:this.left+h,y:_alignStartEnd(a,this.top+x+h,this.bottom-e[0].height),line:0},overrideTextDirection(this.ctx,t.textDirection);const b=f+h;this.legendItems.forEach(((_,y)=>{s.strokeStyle=_.fontColor,s.fillStyle=_.fontColor;const v=s.measureText(_.text).width,k=r.textAlign(_.textAlign||(_.textAlign=n.textAlign)),S=g+d+v;let D=u.x,M=u.y;r.setWidth(this.width),m?y>0&&D+S+h>this.right&&(M=u.y+=b,u.line++,D=u.x=_alignStartEnd(a,this.left+h,this.right-i[u.line])):y>0&&M+b>this.bottom&&(D=u.x=D+e[u.line].width+h,u.line++,M=u.y=_alignStartEnd(a,this.top+x+h,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const a=valueOrDefault(i.lineWidth,1);if(s.fillStyle=valueOrDefault(i.fillStyle,o),s.lineCap=valueOrDefault(i.lineCap,"butt"),s.lineDashOffset=valueOrDefault(i.lineDashOffset,0),s.lineJoin=valueOrDefault(i.lineJoin,"miter"),s.lineWidth=a,s.strokeStyle=valueOrDefault(i.strokeStyle,o),s.setLineDash(valueOrDefault(i.lineDash,[])),n.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},l=r.xPlus(t,g/2);drawPointLegend(s,o,l,e+d,n.pointStyleWidth&&g)}else{const n=e+Math.max((c-p)/2,0),o=r.leftForLtr(t,g),l=toTRBLCorners(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?addRoundedRectPath(s,{x:o,y:n,w:g,h:p,radius:l}):s.rect(o,n,g,p),s.fill(),0!==a&&s.stroke()}s.restore()}(r.x(D),M,_),D=_textX(k,D+g+d,m?D+S:this.right,t.rtl),function(t,e,i){renderText(s,i.text,t,e+f/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(D),M,_),m)u.x+=S+h;else if("string"!=typeof _.text){const t=l.lineHeight;u.y+=calculateLegendItemHeight(_,t)+h}else u.y+=b})),restoreTextDirection(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=toFont(e.font),s=toPadding(e.padding);if(!e.display)return;const a=getRtlAdapter(t.rtl,this.left,this.width),n=this.ctx,o=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=_alignStartEnd(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+_alignStartEnd(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=_alignStartEnd(o,c,c+d);n.textAlign=a.textAlign(_toLeftRightCenter(o)),n.textBaseline="middle",n.strokeStyle=e.color,n.fillStyle=e.color,n.font=i.string,renderText(n,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=toFont(t.font),i=toPadding(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,a;if(_isBetween(t,this.left,this.right)&&_isBetween(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;it.length>e.length?t:e))),e+i.size/2+s.measureText(a).width}function calculateItemHeight(t,e,i){let s=t;return"string"!=typeof e.text&&(s=calculateLegendItemHeight(e,i)),s}function calculateLegendItemHeight(t,e){return e*(t.text?t.text.length:0)}function isListened(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}var plugin_legend={id:"legend",_element:Legend,start(t,e,i){const s=t.legend=new Legend({ctx:t.ctx,options:i,chart:t});layouts.configure(t,s,i),layouts.addBox(t,s)},stop(t){layouts.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;layouts.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:a,color:n,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),h=toPadding(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:a||l.textAlign,borderRadius:o&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Title extends Element{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=isArray(i.text)?i.text.length:1;this._padding=toPadding(i.padding);const a=s*toFont(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:a,options:n}=this,o=n.align;let r,l,h,c=0;return this.isHorizontal()?(l=_alignStartEnd(o,i,a),h=e+t,r=a-i):("left"===n.position?(l=i+t,h=_alignStartEnd(o,s,e),c=-.5*PI):(l=a-t,h=_alignStartEnd(o,e,s),c=.5*PI),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=toFont(e.font),s=i.lineHeight/2+this._padding.top,{titleX:a,titleY:n,maxWidth:o,rotation:r}=this._drawArgs(s);renderText(t,e.text,0,0,i,{color:e.color,maxWidth:o,rotation:r,textAlign:_toLeftRightCenter(e.align),textBaseline:"middle",translation:[a,n]})}}function createTitle(t,e){const i=new Title({ctx:t.ctx,options:e,chart:t});layouts.configure(t,i,e),layouts.addBox(t,i),t.titleBlock=i}var plugin_title={id:"title",_element:Title,start(t,e,i){createTitle(t,i)},stop(t){const e=t.titleBlock;layouts.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;layouts.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const map=new WeakMap;var plugin_subtitle={id:"subtitle",start(t,e,i){const s=new Title({ctx:t.ctx,options:i,chart:t});layouts.configure(t,s,i),layouts.addBox(t,s),map.set(t,s)},stop(t){layouts.removeBox(t,map.get(t)),map.delete(t)},beforeUpdate(t,e,i){const s=map.get(t);layouts.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const positioners={average(t){if(!t.length)return!1;let e,i,s=new Set,a=0,n=0;for(e=0,i=t.length;et+e))/s.size,y:a/n}},nearest(t,e){if(!t.length)return!1;let i,s,a,n=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i-1?t.split("\n"):t}function createTooltipItem(t,e){const{element:i,datasetIndex:s,index:a}=e,n=t.getDatasetMeta(s).controller,{label:o,value:r}=n.getLabelAndValue(a);return{chart:t,label:o,parsed:n.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:r,dataset:n.getDataset(),dataIndex:a,datasetIndex:s,element:i}}function getTooltipSize(t,e){const i=t.chart.ctx,{body:s,footer:a,title:n}=t,{boxWidth:o,boxHeight:r}=e,l=toFont(e.bodyFont),h=toFont(e.titleFont),c=toFont(e.footerFont),d=n.length,u=a.length,g=s.length,p=toPadding(e.padding);let f=p.height,m=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(f+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){f+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing}u&&(f+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=h.string,each(t.title,_),i.font=l.string,each(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?o+2+e.boxPadding:0,each(s,(t=>{each(t.before,_),each(t.lines,_),each(t.after,_)})),b=0,i.font=c.string,each(t.footer,_),i.restore(),m+=p.width,{width:m,height:f}}function determineYAlign(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}function doesNotFitWithAlign(t,e,i,s){const{x:a,width:n}=s,o=i.caretSize+i.caretPadding;return"left"===t&&a+n+o>e.width||("right"===t&&a-n-o<0||void 0)}function determineXAlign(t,e,i,s){const{x:a,width:n}=i,{width:o,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=a<=(r+l)/2?"left":"right":a<=n/2?h="left":a>=o-n/2&&(h="right"),doesNotFitWithAlign(h,t,e,i)&&(h="center"),h}function determineAlignment(t,e,i){const s=i.yAlign||e.yAlign||determineYAlign(t,i);return{xAlign:i.xAlign||e.xAlign||determineXAlign(t,e,i,s),yAlign:s}}function alignX(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}function alignY(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:s-="bottom"===e?a+i:a/2,s}function getBackgroundPoint(t,e,i,s){const{caretSize:a,caretPadding:n,cornerRadius:o}=t,{xAlign:r,yAlign:l}=i,h=a+n,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:g}=toTRBLCorners(o);let p=alignX(e,r);const f=alignY(e,l,h);return"center"===l?"left"===r?p+=h:"right"===r&&(p-=h):"left"===r?p-=Math.max(c,u)+a:"right"===r&&(p+=Math.max(d,g)+a),{x:_limitValue(p,0,s.width-e.width),y:_limitValue(f,0,s.height-e.height)}}function getAlignedX(t,e,i){const s=toPadding(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function getBeforeAfterBodyLines(t){return pushOrConcat([],splitNewlines(t))}function createTooltipContext(t,e,i){return createContext(t,{tooltip:e,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const defaultCallbacks={beforeTitle:noop,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex{const e={before:[],lines:[],after:[]},a=overrideCallbacks(i,t);pushOrConcat(e.before,splitNewlines(invokeCallbackWithFallback(a,"beforeLabel",this,t))),pushOrConcat(e.lines,invokeCallbackWithFallback(a,"label",this,t)),pushOrConcat(e.after,splitNewlines(invokeCallbackWithFallback(a,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return getBeforeAfterBodyLines(invokeCallbackWithFallback(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=invokeCallbackWithFallback(i,"beforeFooter",this,t),a=invokeCallbackWithFallback(i,"footer",this,t),n=invokeCallbackWithFallback(i,"afterFooter",this,t);let o=[];return o=pushOrConcat(o,splitNewlines(s)),o=pushOrConcat(o,splitNewlines(a)),o=pushOrConcat(o,splitNewlines(n)),o}_createItems(t){const e=this._active,i=this.chart.data,s=[],a=[],n=[];let o,r,l=[];for(o=0,r=e.length;ot.filter(e,s,a,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),each(l,(e=>{const i=overrideCallbacks(t.callbacks,e);s.push(invokeCallbackWithFallback(i,"labelColor",this,e)),a.push(invokeCallbackWithFallback(i,"labelPointStyle",this,e)),n.push(invokeCallbackWithFallback(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=n,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let a,n=[];if(s.length){const t=positioners[i.position].call(this,s,this._eventPosition);n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i);const e=this._size=getTooltipSize(this,i),o=Object.assign({},t,e),r=determineAlignment(this.chart,i,o),l=getBackgroundPoint(i,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=n,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:a}=this,{caretSize:n,cornerRadius:o}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=toTRBLCorners(o),{x:d,y:u}=t,{width:g,height:p}=e;let f,m,x,b,_,y;return"center"===a?(_=u+p/2,"left"===s?(f=d,m=f-n,b=_+n,y=_-n):(f=d+g,m=f+n,b=_-n,y=_+n),x=f):(m="left"===s?d+Math.max(r,h)+n:"right"===s?d+g-Math.max(l,c)-n:this.caretX,"top"===a?(b=u,_=b-n,f=m-n,x=m+n):(b=u+p,_=b+n,f=m+n,x=m-n),y=b),{x1:f,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,a=s.length;let n,o,r;if(a){const l=getRtlAdapter(i.rtl,this.x,this.width);for(t.x=getAlignedX(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=toFont(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=a.multiKeyBackground,addRoundedRectPath(t,{x:e,y:g,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),addRoundedRectPath(t,{x:i,y:g+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,g,l,r),t.strokeRect(e,g,l,r),t.fillStyle=n.backgroundColor,t.fillRect(i,g+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:a,bodyAlign:n,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=toFont(i.bodyFont);let d=c.lineHeight,u=0;const g=getRtlAdapter(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+u),t.y+d/2),t.y+=d+a},f=g.textAlign(n);let m,x,b,_,y,v,k;for(e.textAlign=n,e.textBaseline="middle",e.font=c.string,t.x=getAlignedX(this,f,i),e.fillStyle=i.bodyColor,each(this.beforeBody,p),u=o&&"right"!==f?"center"===n?l/2+h:l+2+h:0,_=0,v=s.length;_0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const i=positioners[t.position].call(this,this._active,this._eventPosition);if(!i)return;const n=this._size=getTooltipSize(this,t),o=Object.assign({},i,this._size),r=determineAlignment(e,t,o),l=getBackgroundPoint(t,o,r,e);s._to===l.x&&a._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=n.width,this.height=n.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const n=toPadding(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,s,e),overrideTextDirection(t,e.textDirection),a.y+=n.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),restoreTextDirection(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),a=!_elementsEqual(i,s),n=this._positionChanged(s,e);(a||n)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],n=this._getActiveElements(t,a,e,i),o=this._positionChanged(n,t),r=e||!_elementsEqual(n,a)||o;return r&&(this._active=n,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const a=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){const{caretX:i,caretY:s,options:a}=this,n=positioners[a.position].call(this,t,e);return!1!==n&&(i!==n.x||s!==n.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners,afterInit(t,e,i){i&&(t.tooltip=new Tooltip({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},plugins=Object.freeze({__proto__:null,Colors:plugin_colors,Decimation:plugin_decimation,Filler:index,Legend:plugin_legend,SubTitle:plugin_subtitle,Title:plugin_title,Tooltip:plugin_tooltip});const addIfString=(t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function findOrAddLabel(t,e,i,s){const a=t.indexOf(e);if(-1===a)return addIfString(t,e,i,s);return a!==t.lastIndexOf(e)?i:a}const validIndex=(t,e)=>null===t?null:_limitValue(Math.round(t),0,e);function _getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(t,e){const i=[],{bounds:s,step:a,min:n,max:o,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=a||1,g=h-1,{min:p,max:f}=e,m=!isNullOrUndef(n),x=!isNullOrUndef(o),b=!isNullOrUndef(l),_=(f-p)/(c+1);let y,v,k,S,D=niceNum((f-p)/g/u)*u;if(D<1e-14&&!m&&!x)return[{value:p},{value:f}];S=Math.ceil(f/D)-Math.floor(p/D),S>g&&(D=niceNum(S*D/g/u)*u),isNullOrUndef(r)||(y=Math.pow(10,r),D=Math.ceil(D*y)/y),"ticks"===s?(v=Math.floor(p/D)*D,k=Math.ceil(f/D)*D):(v=p,k=f),m&&x&&a&&almostWhole((o-n)/a,D/1e3)?(S=Math.round(Math.min((o-n)/D,h)),D=(o-n)/S,v=n,k=o):b?(v=m?n:v,k=x?o:k,S=l-1,D=(k-v)/S):(S=(k-v)/D,S=almostEquals(S,Math.round(S),D/1e3)?Math.round(S):Math.ceil(S));const M=Math.max(_decimalPlaces(D),_decimalPlaces(v));y=Math.pow(10,isNullOrUndef(r)?M:r),v=Math.round(v*y)/y,k=Math.round(k*y)/y;let P=0;for(m&&(d&&v!==n?(i.push({value:n}),vo)break;i.push({value:t})}return x&&d&&k!==o?i.length&&almostEquals(i[i.length-1].value,o,relativeLabelSize(o,_,t))?i[i.length-1].value=o:i.push({value:o}):x&&k!==o||i.push({value:k}),i}function relativeLabelSize(t,e,{horizontal:i,minRotation:s}){const a=toRadians(s),n=(i?Math.sin(a):Math.cos(a))||.001,o=.75*e*(""+t).length;return Math.min(e/n,o)}class LinearScaleBase extends Scale{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return isNullOrUndef(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const n=t=>s=e?s:t,o=t=>a=i?a:t;if(t){const t=sign(s),e=sign(a);t<0&&e<0?o(0):t>0&&e>0&&n(0)}if(s===a){let e=0===a?1:Math.abs(.05*a);o(a+e),t||n(s-e)}this.min=s,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=generateTicks$1({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&_setMinAndMaxByKey(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return formatNumber(t,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=isNumberFinite(t)?t:0,this.max=isNumberFinite(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=toRadians(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const log10Floor=t=>Math.floor(log10(t)),changeExponent=(t,e)=>Math.pow(10,log10Floor(t)+e);function isMajor(t){return 1===t/Math.pow(10,log10Floor(t))}function steps(t,e,i){const s=Math.pow(10,i),a=Math.floor(t/s);return Math.ceil(e/s)-a}function startExp(t,e){let i=log10Floor(e-t);for(;steps(t,e,i)>10;)i++;for(;steps(t,e,i)<10;)i--;return Math.min(i,log10Floor(t))}function generateTicks(t,{min:e,max:i}){e=finiteOrDefault(t.min,e);const s=[],a=log10Floor(e);let n=startExp(e,i),o=n<0?Math.pow(10,Math.abs(n)):1;const r=Math.pow(10,n),l=a>n?Math.pow(10,a):0,h=Math.round((e-l)*o)/o,c=Math.floor((e-l)/r/10)*r*10;let d=Math.floor((h-c)/Math.pow(10,n)),u=finiteOrDefault(t.min,Math.round((l+c+d*Math.pow(10,n))*o)/o);for(;u=10?d=d<15?15:20:d++,d>=20&&(n++,d=2,o=n>=0?1:o),u=Math.round((l+c+d*Math.pow(10,n))*o)/o;const g=finiteOrDefault(t.max,u);return s.push({value:g,major:isMajor(g),significand:d}),s}class LogarithmicScale extends Scale{static id="logarithmic";static defaults={ticks:{callback:Ticks.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=LinearScaleBase.prototype.parse.apply(this,[t,e]);if(0!==i)return isNumberFinite(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=isNumberFinite(t)?Math.max(0,t):null,this.max=isNumberFinite(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!isNumberFinite(this._userMin)&&(this.min=t===changeExponent(this.min,0)?changeExponent(this.min,-1):changeExponent(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const a=e=>i=t?i:e,n=t=>s=e?s:t;i===s&&(i<=0?(a(1),n(10)):(a(changeExponent(i,-1)),n(changeExponent(s,1)))),i<=0&&a(changeExponent(s,-1)),s<=0&&n(changeExponent(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=generateTicks({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&_setMinAndMaxByKey(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":formatNumber(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=log10(t),this._valueRange=log10(this.max)-log10(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(log10(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function getTickBackdropHeight(t){const e=t.ticks;if(e.display&&t.display){const t=toPadding(e.backdropPadding);return valueOrDefault(e.font&&e.font.size,defaults.font.size)+t.height}return 0}function measureLabelSize(t,e,i){return i=isArray(i)?i:[i],{w:_longestText(t,e.string,i),h:i.length*e.lineHeight}}function determineLimits(t,e,i,s,a){return t===s||t===a?{start:e-i/2,end:e+i/2}:ta?{start:e-i,end:e}:{start:e,end:e+i}}function fitWithPointLabels(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],a=[],n=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?PI/n:0;for(let l=0;le.r&&(r=(s.end-e.r)/n,t.r=Math.max(t.r,e.r+r)),a.starte.b&&(l=(a.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function createPointLabelItem(t,e,i){const s=t.drawingArea,{extra:a,additionalAngle:n,padding:o,size:r}=i,l=t.getPointPosition(e,s+a+o,n),h=Math.round(toDegrees(_normalizeAngle(l.angle+HALF_PI))),c=yForAngle(l.y,r.h,h),d=getTextAlignForAngle(h),u=leftForTextAlign(l.x,r.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+r.w,bottom:c+r.h}}function isNotOverlapped(t,e){if(!e)return!0;const{left:i,top:s,right:a,bottom:n}=t;return!(_isPointInArea({x:i,y:s},e)||_isPointInArea({x:i,y:n},e)||_isPointInArea({x:a,y:s},e)||_isPointInArea({x:a,y:n},e))}function buildPointLabelItems(t,e,i){const s=[],a=t._pointLabels.length,n=t.options,{centerPointLabels:o,display:r}=n.pointLabels,l={extra:getTickBackdropHeight(n)/2,additionalAngle:o?PI/a:0};let h;for(let n=0;n270||i<90)&&(t-=e),t}function drawPointLabelBox(t,e,i){const{left:s,top:a,right:n,bottom:o}=i,{backdropColor:r}=e;if(!isNullOrUndef(r)){const i=toTRBLCorners(e.borderRadius),l=toPadding(e.backdropPadding);t.fillStyle=r;const h=s-l.left,c=a-l.top,d=n-s+l.width,u=o-a+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),addRoundedRectPath(t,{x:h,y:c,w:d,h:u,radius:i}),t.fill()):t.fillRect(h,c,d,u)}}function drawPointLabels(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let a=e-1;a>=0;a--){const e=t._pointLabelItems[a];if(!e.visible)continue;const n=s.setContext(t.getPointLabelContext(a));drawPointLabelBox(i,n,e);const o=toFont(n.font),{x:r,y:l,textAlign:h}=e;renderText(i,t._pointLabels[a],r,l+o.lineHeight/2,o,{color:n.color,textAlign:h,textBaseline:"middle"})}}function pathRadiusLine(t,e,i,s){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,TAU);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let n=1;nt,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=toPadding(getTickBackdropHeight(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=isNumberFinite(t)&&!isNaN(t)?t:0,this.max=isNumberFinite(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/getTickBackdropHeight(this.options))}generateTickLabels(t){LinearScaleBase.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=callback(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?fitWithPointLabels(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=TAU/(this._pointLabels.length||1),i=this.options.startAngle||0;return _normalizeAngle(t*e+toRadians(i))}getDistanceFromCenterForValue(t){if(isNullOrUndef(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(isNullOrUndef(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),o=s.setContext(i),l=a.setContext(i);drawRadiusLine(this,o,r,n,l)}})),i.display){for(t.save(),o=n-1;o>=0;o--){const s=i.setContext(this.getPointLabelContext(o)),{color:a,lineWidth:n}=s;n&&a&&(t.lineWidth=n,t.strokeStyle=a,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,n;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,o)=>{if(0===o&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(o)),l=toFont(r.font);if(a=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=l.string,n=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=toPadding(r.backdropPadding);t.fillRect(-n/2-e.left,-a-l.size/2-e.top,n+e.width,l.size+e.height)}renderText(t,s.label,0,-a,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const INTERVALS={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},UNITS=Object.keys(INTERVALS);function sorter(t,e){return t-e}function parse(t,e){if(isNullOrUndef(e))return null;const i=t._adapter,{parser:s,round:a,isoWeekday:n}=t._parseOpts;let o=e;return"function"==typeof s&&(o=s(o)),isNumberFinite(o)||(o="string"==typeof s?i.parse(o,s):i.parse(o)),null===o?null:(a&&(o="week"!==a||!isNumber(n)&&!0!==n?i.startOf(o,a):i.startOf(o,"isoWeek",n)),+o)}function determineUnitForAutoTicks(t,e,i,s){const a=UNITS.length;for(let n=UNITS.indexOf(t);n=UNITS.indexOf(i);n--){const i=UNITS[n];if(INTERVALS[i].common&&t._adapter.diff(a,s,i)>=e-1)return i}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(t){for(let e=UNITS.indexOf(t)+1,i=UNITS.length;e=e?i[s]:i[a]]=!0}}else t[e]=!0}function setMajorTicks(t,e,i,s){const a=t._adapter,n=+a.startOf(e[0].value,s),o=e[e.length-1].value;let r,l;for(r=n;r<=o;r=+a.add(r,1,s))l=i[r],l>=0&&(e[l].major=!0);return e}function ticksFromTimestamps(t,e,i){const s=[],a={},n=e.length;let o,r;for(o=0;o+t.value)))}initOffsets(t=[]){let e,i,s=0,a=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const n=t.length<3?.5:.25;s=_limitValue(s,0,n),a=_limitValue(a,0,n),this._offsets={start:s,end:a,factor:1/(s+1+a)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,a=s.time,n=a.unit||determineUnitForAutoTicks(a.minUnit,e,i,this._getLabelCapacity(e)),o=valueOrDefault(s.ticks.stepSize,1),r="week"===n&&a.isoWeekday,l=isNumber(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":n),t.diff(i,e,n)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+n);const g="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,a=e||i[s];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){const a=this.options,n=a.ticks.callback;if(n)return callback(n,[t,e,i],this);const o=a.time.displayFormats,r=this._unit,l=this._majorUnit,h=r&&o[r],c=l&&o[l],d=i[e],u=l&&c&&d&&d.major;return this._adapter.format(t,s||(u?c:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=_lookupByKey(t,"pos",e)),({pos:s,time:n}=t[r]),({pos:a,time:o}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=_lookupByKey(t,"time",e)),({time:s,pos:n}=t[r]),({time:a,pos:o}=t[l]));const h=a-s;return h?n+(o-n)*(e-s)/h:n}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=interpolate(e,this.min),this._tableRange=interpolate(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],a=[];let n,o,r,l,h;for(n=0,o=t.length;n=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,o=s.length;nt-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(interpolate(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return interpolate(this._table,i*this._tableRange+this._minPos,!0)}}var scales=Object.freeze({__proto__:null,CategoryScale:CategoryScale,LinearScale:LinearScale,LogarithmicScale:LogarithmicScale,RadialLinearScale:RadialLinearScale,TimeScale:TimeScale,TimeSeriesScale:TimeSeriesScale});const registerables=[controllers,elements,plugins,scales];export{Animation,Animations,ArcElement,BarController,BarElement,BasePlatform,BasicPlatform,BubbleController,CategoryScale,Chart,plugin_colors as Colors,DatasetController,plugin_decimation as Decimation,DomPlatform,DoughnutController,Element,index as Filler,Interaction,plugin_legend as Legend,LineController,LineElement,LinearScale,LogarithmicScale,PieController,PointElement,PolarAreaController,RadarController,RadialLinearScale,Scale,ScatterController,plugin_subtitle as SubTitle,Ticks,TimeScale,TimeSeriesScale,plugin_title as Title,plugin_tooltip as Tooltip,adapters as _adapters,_detectPlatform,animator,controllers,defaults,elements,layouts,plugins,registerables,registry,scales}; +//# sourceMappingURL=/sm/f4f53460492c47bf093d168396dda53cf00153d512527c26afe1b52e64622b57.map \ No newline at end of file diff --git a/resources/css/app.scss b/resources/css/app.scss index 6315e79..9d18679 100644 --- a/resources/css/app.scss +++ b/resources/css/app.scss @@ -2,9 +2,15 @@ @import '../../vendor/filament/forms/dist/module.esm.css'; -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss/base'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; + +@layer utilities { + .pause { + animation-play-state: paused; + } +} .main-menu { @apply transition-all relative z-40; @@ -90,4 +96,4 @@ table { @apply w-full overflow-y-auto max-h-screen p-5; max-height: calc(100vh - 200px); -} +} \ No newline at end of file diff --git a/resources/js/app.js b/resources/js/app.js index dfc3adc..b21ed01 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -16,6 +16,7 @@ import 'magnific-popup/dist/magnific-popup.css'; import 'magnific-popup/dist/jquery.magnific-popup.min'; import Alpine from 'alpinejs' +import focus from '@alpinejs/focus' import FormsAlpinePlugin from './../../vendor/filament/forms/dist/module.esm' import NotificationsAlpinePlugin from './../../vendor/filament/notifications/dist/module.esm' @@ -23,6 +24,7 @@ window.$ = jQuery; Alpine.plugin(FormsAlpinePlugin) Alpine.plugin(NotificationsAlpinePlugin) +Alpine.plugin(focus) window.Alpine = Alpine diff --git a/resources/views/administration/companies.blade.php b/resources/views/administration/companies.blade.php deleted file mode 100644 index 9e0c231..0000000 --- a/resources/views/administration/companies.blade.php +++ /dev/null @@ -1,7 +0,0 @@ - - - Administration - Companies - - @livewire('administration.companies') - - diff --git a/resources/views/administration/notice-banners.blade.php b/resources/views/administration/notice-banners.blade.php new file mode 100644 index 0000000..c120ab2 --- /dev/null +++ b/resources/views/administration/notice-banners.blade.php @@ -0,0 +1,6 @@ + + + Administration - Notice banners + + @livewire('administration.notice-banners') + diff --git a/resources/views/administration/ticket-categories.blade.php b/resources/views/administration/ticket-categories.blade.php new file mode 100644 index 0000000..9c54462 --- /dev/null +++ b/resources/views/administration/ticket-categories.blade.php @@ -0,0 +1,7 @@ + + + Administration - Tickets categories + + @livewire('administration.ticket-categories') + + diff --git a/resources/views/administration/ticket-issues.blade.php b/resources/views/administration/ticket-issues.blade.php new file mode 100644 index 0000000..e3448da --- /dev/null +++ b/resources/views/administration/ticket-issues.blade.php @@ -0,0 +1,7 @@ + + + Administration - Tickets issues + + @livewire('administration.ticket-issues') + + \ No newline at end of file diff --git a/resources/views/administration/ticket-subcategories.blade.php b/resources/views/administration/ticket-subcategories.blade.php new file mode 100644 index 0000000..e2dae16 --- /dev/null +++ b/resources/views/administration/ticket-subcategories.blade.php @@ -0,0 +1,7 @@ + + + Administration - Tickets subcategories + + @livewire('administration.ticket-subcategories') + + \ No newline at end of file diff --git a/resources/views/analytics.blade.php b/resources/views/analytics.blade.php index da811c6..14a0fd7 100644 --- a/resources/views/analytics.blade.php +++ b/resources/views/analytics.blade.php @@ -1,7 +1,26 @@ Analytics +
+
+
+
+ + @lang('Analytics') + + + @lang('Below is the dashboard containing all analytics related to tickets configured in :app', [ + 'app' => config('app.name') + ]) + +
+
+ @livewire('analytics') + + - @livewire('analytics') - + + +
+
diff --git a/resources/views/announcements.blade.php b/resources/views/announcements.blade.php new file mode 100644 index 0000000..b73c959 --- /dev/null +++ b/resources/views/announcements.blade.php @@ -0,0 +1,6 @@ + + + Announcements + @livewire('announcements') + + \ No newline at end of file diff --git a/resources/views/components/base-layout.blade.php b/resources/views/components/base-layout.blade.php index f11b11f..fe52375 100644 --- a/resources/views/components/base-layout.blade.php +++ b/resources/views/components/base-layout.blade.php @@ -8,7 +8,7 @@ {{ config('app.name') }} {{ isset($title) ? (' - ' . $title) : '' }} - + @vite(['resources/css/app.scss', 'resources/js/app.js']) @livewireStyles @@ -18,8 +18,13 @@ {{$slot}} + + + + + + - @stack('scripts') @livewire('notifications') diff --git a/resources/views/components/category-span.blade.php b/resources/views/components/category-span.blade.php new file mode 100644 index 0000000..5e446dd --- /dev/null +++ b/resources/views/components/category-span.blade.php @@ -0,0 +1,7 @@ +@if($category) + + {{ $category->title }} + +@endif \ No newline at end of file diff --git a/resources/views/components/guest-layout.blade.php b/resources/views/components/guest-layout.blade.php index b930d2d..8962c99 100644 --- a/resources/views/components/guest-layout.blade.php +++ b/resources/views/components/guest-layout.blade.php @@ -11,11 +11,15 @@ class="absolute lg:w-1/2 md:w-1/3 lg:flex md:flex hidden flex-col justify-start bg-left-bottom bg-opacity-90" style="background-image: url('{{ asset('images/help-desk.png') }}'); background-size: 80%"> +
- {{ config('app.name') }} + {{ config('app.name') }} {{$slot}}
diff --git a/resources/views/components/issue-span.blade.php b/resources/views/components/issue-span.blade.php new file mode 100644 index 0000000..ec725ee --- /dev/null +++ b/resources/views/components/issue-span.blade.php @@ -0,0 +1,11 @@ +@if($issue || $issue == "Select new issue") +@props(['issue', 'disableStyles' => false]) +@if (!$disableStyles) + " + style="color: {{ $issue->text_color ?? '#ffffff'}}; background-color: {{$issue->bg_color ?? '#000000'}};" + > + @endif + {{ $issue->title ?? "Select new issue"}} + + +@endif \ No newline at end of file diff --git a/resources/views/components/main-menu.blade.php b/resources/views/components/main-menu.blade.php index d958b03..2c10a4c 100644 --- a/resources/views/components/main-menu.blade.php +++ b/resources/views/components/main-menu.blade.php @@ -4,7 +4,7 @@ class="bg-white px-2 sm:px-4 py-2.5 dark:bg-gray-900 fixed w-full z-20 top-0 >
- {{ config('app.name') }} + {{ config('app.name') }}
- @if($company->id && auth()->user()->can('Delete companies')) - - @endif -
- diff --git a/resources/views/livewire/administration/companies.blade.php b/resources/views/livewire/administration/companies.blade.php deleted file mode 100644 index 5375819..0000000 --- a/resources/views/livewire/administration/companies.blade.php +++ /dev/null @@ -1,80 +0,0 @@ -
-
-
- - @lang('Companies') - - - @lang('Below is the list of configured companies in :app', [ - 'app' => config('app.name') - ]) - -
- @can('Create companies') - - @endcan -
-
-
-
- {{ $this->table }} -
-
- - -
- - - - @push('scripts') - - @endpush -
diff --git a/resources/views/livewire/administration/roles.blade.php b/resources/views/livewire/administration/roles.blade.php index 4422bd9..c6b2d64 100644 --- a/resources/views/livewire/administration/roles.blade.php +++ b/resources/views/livewire/administration/roles.blade.php @@ -26,7 +26,7 @@ class="bg-primary-700 text-white hover:bg-primary-800 px-4 py-2 rounded-lg
- - - - -