diff --git a/app/Auth/NexusWebGuard.php b/app/Auth/NexusWebGuard.php new file mode 100644 index 00000000..db33162a --- /dev/null +++ b/app/Auth/NexusWebGuard.php @@ -0,0 +1,81 @@ +request = $request; + $this->provider = $provider; + } + + /** + * Get the currently authenticated user. + * + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function user() + { + if (! is_null($this->user)) { + return $this->user; + } + return $this->user = $this->provider->retrieveByCredentials($this->request->cookie()); + } + + + /** + * Validate a user's credentials. + * + * @param array $credentials + * @return bool + */ + public function validate(array $credentials = []) + { + $required = ['c_secure_pass', 'c_secure_uid', 'c_secure_login']; + foreach ($required as $value) { + if (empty($credentials[$value])) { + return false; + } + } + $b_id = base64($credentials["c_secure_uid"],false); + $id = intval($b_id ?? 0); + if (!$id || !is_valid_id($id) || strlen($credentials["c_secure_pass"]) != 32) { + return false; + } + if ($this->provider->retrieveById($id)) { + return true; + } + return false; + } + + public function logout() + { + logoutcookie(); + return nexus_redirect('login.php'); + } + + +} diff --git a/app/Auth/NexusWebUserProvider.php b/app/Auth/NexusWebUserProvider.php new file mode 100644 index 00000000..b6ff9721 --- /dev/null +++ b/app/Auth/NexusWebUserProvider.php @@ -0,0 +1,91 @@ +query = User::query(); + } + /** + * Retrieve a user by their unique identifier. + * + * @param mixed $identifier + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveById($identifier) + { + return $this->query->find($identifier); + } + + + /** + * Retrieve a user by their unique identifier and "remember me" token. + * + * @param mixed $identifier + * @param string $token + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByToken($identifier, $token) + { + + } + + /** + * Update the "remember me" token for the given user in storage. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $token + * @return void + */ + public function updateRememberToken(Authenticatable $user, $token) + { + + } + + + /** + * Retrieve a user by the given credentials. + * + * @param array $credentials + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByCredentials(array $credentials) + { + if (!empty($credentials['c_secure_uid'])) { + $b_id = base64($credentials["c_secure_uid"],false); + return $this->query->find($b_id); + } + } + + /** + * Validate a user against the given credentials. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param array $credentials + * @return bool + */ + public function validateCredentials(Authenticatable $user, array $credentials) + { + if ($credentials["c_secure_login"] == base64("yeah")) { + if ($credentials["c_secure_pass"] != md5($user->passhash . $_SERVER["REMOTE_ADDR"])) { + return false; + } + } else { + if ($credentials["c_secure_pass"] !== md5($user->passhash)) { + return false; + } + } + return true; + } + +} diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 304f2568..68862e20 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -78,13 +78,10 @@ class Test extends Command */ public function handle() { - $a = 2; - $b = 2; - if ($a != 1 && $b == 2) { - echo "OK"; - } else { - echo 'Bad'; - } + $r = 'MTAwNDI%3D'; + $r = 'MTAwNDI%3D'; + $r = 'MTAwMDM%3D'; + dd(base64_decode($r)); } diff --git a/app/Filament/NexusOptionsTrait.php b/app/Filament/NexusOptionsTrait.php new file mode 100644 index 00000000..90fb71a0 --- /dev/null +++ b/app/Filament/NexusOptionsTrait.php @@ -0,0 +1,10 @@ + 'dec', 'hex' => 'hex']; + + private static array $yesOrNo = ['yes' => 'yes', 'no' => 'no']; +} diff --git a/app/Filament/PageList.php b/app/Filament/PageList.php new file mode 100644 index 00000000..a1507d1c --- /dev/null +++ b/app/Filament/PageList.php @@ -0,0 +1,18 @@ +schema([ + Forms\Components\TextInput::make('family')->required(), + Forms\Components\TextInput::make('start_name')->required(), + Forms\Components\TextInput::make('peer_id_start')->required(), + Forms\Components\TextInput::make('peer_id_pattern')->required(), + Forms\Components\Radio::make('peer_id_matchtype')->options(self::$matchTypes)->required(), + Forms\Components\TextInput::make('peer_id_match_num')->integer()->required(), + Forms\Components\TextInput::make('agent_start')->required(), + Forms\Components\TextInput::make('agent_pattern')->required(), + Forms\Components\Radio::make('agent_matchtype')->options(self::$matchTypes)->required(), + Forms\Components\TextInput::make('agent_match_num')->required(), + Forms\Components\Radio::make('exception')->options(self::$yesOrNo)->required(), + Forms\Components\Radio::make('allowhttps')->options(self::$yesOrNo)->required(), + + Forms\Components\Textarea::make('comment'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('family')->searchable(), + Tables\Columns\TextColumn::make('start_name')->searchable(), + Tables\Columns\TextColumn::make('peer_id_start'), + Tables\Columns\TextColumn::make('agent_start'), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + RelationManagers\DeniesRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListAgentAllows::route('/'), + 'create' => Pages\CreateAgentAllow::route('/create'), + 'edit' => Pages\EditAgentAllow::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/System/AgentAllowResource/Pages/CreateAgentAllow.php b/app/Filament/Resources/System/AgentAllowResource/Pages/CreateAgentAllow.php new file mode 100644 index 00000000..a811f76b --- /dev/null +++ b/app/Filament/Resources/System/AgentAllowResource/Pages/CreateAgentAllow.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('name')->required()->maxLength(255), + Forms\Components\TextInput::make('peer_id')->required()->maxLength(255), + Forms\Components\TextInput::make('agent')->required()->maxLength(255), + Forms\Components\Textarea::make('comment'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name'), + Tables\Columns\TextColumn::make('peer_id'), + Tables\Columns\TextColumn::make('agent'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/System/AgentDenyResource.php b/app/Filament/Resources/System/AgentDenyResource.php new file mode 100644 index 00000000..9b0518f1 --- /dev/null +++ b/app/Filament/Resources/System/AgentDenyResource.php @@ -0,0 +1,78 @@ +schema([ + Forms\Components\Select::make('family_id')->label('Allow family') + ->relationship('family', 'family')->required(), + Forms\Components\TextInput::make('name')->required(), + Forms\Components\TextInput::make('peer_id')->required(), + Forms\Components\TextInput::make('agent')->required(), + Forms\Components\Textarea::make('comment'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('family.family')->label('Family'), + Tables\Columns\TextColumn::make('name')->searchable(), + Tables\Columns\TextColumn::make('peer_id')->searchable(), + Tables\Columns\TextColumn::make('agent')->searchable(), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListAgentDenies::route('/'), + 'create' => Pages\CreateAgentDeny::route('/create'), + 'edit' => Pages\EditAgentDeny::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/System/AgentDenyResource/Pages/CreateAgentDeny.php b/app/Filament/Resources/System/AgentDenyResource/Pages/CreateAgentDeny.php new file mode 100644 index 00000000..052bc9b0 --- /dev/null +++ b/app/Filament/Resources/System/AgentDenyResource/Pages/CreateAgentDeny.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Section::make('Base info')->schema([ + Forms\Components\TextInput::make('name')->required()->columnSpan(['sm' => 2]), + Forms\Components\TextInput::make('priority')->columnSpan(['sm' => 2])->helperText('The higher the value, the higher the priority, and when multiple exam match the same user, the one with the highest priority is assigned.'), + Forms\Components\Radio::make('status')->options(['0' => 'Enabled', '1' => 'Disabled'])->inline()->columnSpan(['sm' => 2]), + Forms\Components\Radio::make('is_discovered')->options(['0' => 'No', '1' => 'Yes'])->label('Discovered')->inline()->columnSpan(['sm' => 2]), + ])->columns(2), + + Forms\Components\Section::make('Time')->schema([ + Forms\Components\DateTimePicker::make('begin'), + Forms\Components\DateTimePicker::make('end'), + Forms\Components\TextInput::make('duration')->integer()->columnSpan(['sm' => 2]) + ->helperText('Unit: days. When assign to user, begin and end are used if they are specified. Otherwise begin time is the time at assignment, and the end time is the time at assignment plus the duration.'), + ])->columns(2), + + Forms\Components\Section::make('Select user')->schema([ + Forms\Components\CheckboxList::make('filters.classes')->options($userRep->listClass())->columnSpan(['sm' => 2])->columns(4)->label('Classes'), + Forms\Components\DateTimePicker::make('filters.register_time_range.0')->label('Register time begin'), + Forms\Components\DateTimePicker::make('filters.register_time_range.1')->label('Register time end'), + Forms\Components\Toggle::make('filters.donate_status')->label('Donated'), + ])->columns(2), + + + Forms\Components\Textarea::make('description')->columnSpan(['sm' => 2]), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('name'), + Tables\Columns\TextColumn::make('indexFormatted')->label('Indexes')->html(), + Tables\Columns\TextColumn::make('begin'), + Tables\Columns\TextColumn::make('end'), + Tables\Columns\TextColumn::make('durationText')->label('Duration'), + Tables\Columns\TextColumn::make('filterFormatted')->label('Target users')->html(), + Tables\Columns\BooleanColumn::make('is_discovered')->label('Discovered'), + Tables\Columns\TextColumn::make('priority')->label('Priority'), + Tables\Columns\TextColumn::make('statusText')->label('Status'), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListExams::route('/'), + 'create' => Pages\CreateExam::route('/create'), + 'edit' => Pages\EditExam::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/System/ExamResource/Pages/CreateExam.php b/app/Filament/Resources/System/ExamResource/Pages/CreateExam.php new file mode 100644 index 00000000..62e47d91 --- /dev/null +++ b/app/Filament/Resources/System/ExamResource/Pages/CreateExam.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('name')->required(), + Forms\Components\TextInput::make('price')->required()->integer(), + Forms\Components\TextInput::make('image_large')->required(), + Forms\Components\TextInput::make('image_small')->required(), + Forms\Components\Radio::make('get_type')->options(Medal::listGetTypes(true))->inline()->columnSpan(['sm' => 2])->required(), + Forms\Components\TextInput::make('duration')->integer()->columnSpan(['sm' => 2])->helperText('Unit: day, if empty, belongs to user forever.'), + Forms\Components\Textarea::make('description')->columnSpan(['sm' => 2]), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('name'), + Tables\Columns\ImageColumn::make('image_large')->height(120), + Tables\Columns\ImageColumn::make('image_small')->height(120), + Tables\Columns\TextColumn::make('getTypeText')->label('Get type'), + Tables\Columns\TextColumn::make('price'), + Tables\Columns\TextColumn::make('duration'), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListMedals::route('/'), + 'create' => Pages\CreateMedal::route('/create'), + 'edit' => Pages\EditMedal::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/System/MedalResource/Pages/CreateMedal.php b/app/Filament/Resources/System/MedalResource/Pages/CreateMedal.php new file mode 100644 index 00000000..f927f58b --- /dev/null +++ b/app/Filament/Resources/System/MedalResource/Pages/CreateMedal.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('name')->required()->disabled()->columnSpan(['sm' => 2]), + Forms\Components\Textarea::make('value')->required()->columnSpan(['sm' => 2]) + ->afterStateHydrated(function (Forms\Components\Textarea $component, $state) { + $arr = json_decode($state, true); + if (is_array($arr)) { + $component->disabled(); + } + }) + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('name')->searchable(), + Tables\Columns\TextColumn::make('value')->limit(), + Tables\Columns\BadgeColumn::make('autoload')->colors(['success' => 'yes', 'warning' => 'no']), + Tables\Columns\TextColumn::make('updated_at'), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('autoload')->options(self::$yesOrNo), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ +// Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListSettings::route('/'), +// 'create' => Pages\CreateSetting::route('/create'), + 'edit' => Pages\EditSetting::route('/{record}/edit'), + 'hit-and-run' => Pages\EditHitAndRun::route('/hit-and-run'), + ]; + } +} diff --git a/app/Filament/Resources/System/SettingResource/Pages/CreateSetting.php b/app/Filament/Resources/System/SettingResource/Pages/CreateSetting.php new file mode 100644 index 00000000..dab69c17 --- /dev/null +++ b/app/Filament/Resources/System/SettingResource/Pages/CreateSetting.php @@ -0,0 +1,12 @@ +getResource()::getUrl('index'); + } + + protected function mutateFormDataBeforeSave(array $data): array + { + $arr = json_decode($data['value'], true); + if (is_array($arr)) { + throw new \LogicException("Not support edit this !"); + } + return $data; + } +} diff --git a/app/Filament/Resources/System/SettingResource/Pages/ListSettings.php b/app/Filament/Resources/System/SettingResource/Pages/ListSettings.php new file mode 100644 index 00000000..42ca10ff --- /dev/null +++ b/app/Filament/Resources/System/SettingResource/Pages/ListSettings.php @@ -0,0 +1,20 @@ +schema([ + Forms\Components\TextInput::make('name')->required(), + Forms\Components\TextInput::make('color')->required()->label('Background color'), + Forms\Components\TextInput::make('font_color')->required(), + Forms\Components\TextInput::make('font_size')->required(), + Forms\Components\TextInput::make('margin')->required(), + Forms\Components\TextInput::make('padding')->required(), + Forms\Components\TextInput::make('border_radius')->required(), + Forms\Components\TextInput::make('priority')->integer(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('name'), + Tables\Columns\TextColumn::make('color')->label('Background color'), + Tables\Columns\TextColumn::make('font_color'), + Tables\Columns\TextColumn::make('font_size'), + Tables\Columns\TextColumn::make('margin'), + Tables\Columns\TextColumn::make('padding'), + Tables\Columns\TextColumn::make('border_radius'), + Tables\Columns\TextColumn::make('priority'), + Tables\Columns\TextColumn::make('updated_at')->dateTime('Y-m-d H:i'), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListTags::route('/'), + 'create' => Pages\CreateTag::route('/create'), + 'edit' => Pages\EditTag::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/Torrent/TagResource/Pages/CreateTag.php b/app/Filament/Resources/Torrent/TagResource/Pages/CreateTag.php new file mode 100644 index 00000000..ff583cc6 --- /dev/null +++ b/app/Filament/Resources/Torrent/TagResource/Pages/CreateTag.php @@ -0,0 +1,13 @@ +getResource()::getUrl('index'); + } +} diff --git a/app/Filament/Resources/Torrent/TagResource/Pages/ListTags.php b/app/Filament/Resources/Torrent/TagResource/Pages/ListTags.php new file mode 100644 index 00000000..1e4814aa --- /dev/null +++ b/app/Filament/Resources/Torrent/TagResource/Pages/ListTags.php @@ -0,0 +1,20 @@ +schema([ + + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('user.username')->label('User')->searchable(), + Tables\Columns\TextColumn::make('exam.name')->label('Exam'), + Tables\Columns\BooleanColumn::make('is_done')->label('Is done'), + Tables\Columns\TextColumn::make('statusText')->label('Status'), + Tables\Columns\TextColumn::make('created_at')->dateTime('Y-m-d H:i'), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('status')->options(ExamUser::listStatus(true)), + Tables\Filters\SelectFilter::make('is_done')->options(['0' => 'No', '1' => 'yes']), + ]) + ->actions([ +// Tables\Actions\ViewAction::make(), + ]) + ->prependBulkActions([ + Tables\Actions\BulkAction::make('Avoid')->action(function (Collection $records) { + $idArr = $records->pluck('id')->toArray(); + $rep = new ExamRepository(); + $rep->avoidExamUserBulk(['id' => $idArr], Auth::user()); + }) + ->deselectRecordsAfterCompletion() + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListExamUsers::route('/'), + 'create' => Pages\CreateExamUser::route('/create'), + 'edit' => Pages\EditExamUser::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/User/ExamUserResource/Pages/CreateExamUser.php b/app/Filament/Resources/User/ExamUserResource/Pages/CreateExamUser.php new file mode 100644 index 00000000..b5e755a8 --- /dev/null +++ b/app/Filament/Resources/User/ExamUserResource/Pages/CreateExamUser.php @@ -0,0 +1,12 @@ +schema(Forms\Components\Card::make()->schema([ +// Forms\Components\Select::make('user')->relationship('user', 'username')->required(), +// Forms\Components\Select::make('torrent_id')->relationship('torrent', 'name')->required(), + Forms\Components\Radio::make('status')->options(HitAndRun::listStatus(true))->inline()->required(), +// Forms\Components\Select::make('snatch_id')->relationship('snatch', 'uploaded'), + Forms\Components\Textarea::make('comment'), + Forms\Components\DateTimePicker::make('created_at')->displayFormat('Y-m-d H:i:s'), + ])); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('user.username')->searchable(), + Tables\Columns\TextColumn::make('torrent.name')->limit(50), + Tables\Columns\TextColumn::make('snatch.uploadText')->label('Uploaded'), + Tables\Columns\TextColumn::make('snatch.downloadText')->label('Downloaded'), + Tables\Columns\TextColumn::make('snatch.shareRatio')->label('Ratio'), + Tables\Columns\TextColumn::make('seedTimeRequired'), + Tables\Columns\TextColumn::make('inspectTimeLeft'), + Tables\Columns\TextColumn::make('statusText')->label('Status'), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('status')->options(HitAndRun::listStatus(true)), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + ]) + ->prependBulkActions([ + Tables\Actions\BulkAction::make('Pardon')->action(function (Collection $records) { + $idArr = $records->pluck('id')->toArray(); + $rep = new HitAndRunRepository(); + $rep->bulkPardon(['id' => $idArr], Auth::user()); + }) + ->deselectRecordsAfterCompletion() + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListHitAndRuns::route('/'), +// 'create' => Pages\CreateHitAndRun::route('/create'), +// 'edit' => Pages\EditHitAndRun::route('/{record}/edit'), + 'view' => Pages\ViewHitAndRun::route('/{record}'), + ]; + } +} diff --git a/app/Filament/Resources/User/HitAndRunResource/Pages/CreateHitAndRun.php b/app/Filament/Resources/User/HitAndRunResource/Pages/CreateHitAndRun.php new file mode 100644 index 00000000..25e46ad1 --- /dev/null +++ b/app/Filament/Resources/User/HitAndRunResource/Pages/CreateHitAndRun.php @@ -0,0 +1,12 @@ +options(HitAndRun::listStatus(true))->inline(), + Forms\Components\Textarea::make('comment'), + Forms\Components\DateTimePicker::make('created_at'), + ]; + } + +} diff --git a/app/Filament/Resources/User/UserResource.php b/app/Filament/Resources/User/UserResource.php new file mode 100644 index 00000000..5303cd19 --- /dev/null +++ b/app/Filament/Resources/User/UserResource.php @@ -0,0 +1,96 @@ +schema(Forms\Components\Card::make()->schema([ + Forms\Components\TextInput::make('username')->required(), + Forms\Components\TextInput::make('email')->required(), + Forms\Components\TextInput::make('password')->password()->required(), + Forms\Components\TextInput::make('password_confirmation')->password()->required()->same('password'), + Forms\Components\TextInput::make('id')->integer(), + Forms\Components\Select::make('class')->options(array_column(User::$classes, 'text')), + ])); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id')->sortable(), + Tables\Columns\TextColumn::make('username')->searchable(), + Tables\Columns\TextColumn::make('email')->searchable(), + Tables\Columns\TextColumn::make('class')->label('Class') + ->formatStateUsing(fn(Tables\Columns\Column $column) => $column->getRecord()->classText) + ->sortable(), + Tables\Columns\TextColumn::make('uploaded')->label('Uploaded') + ->formatStateUsing(fn(Tables\Columns\Column $column) => $column->getRecord()->uploadedText) + ->sortable(), + Tables\Columns\TextColumn::make('downloaded')->label('Downloaded') + ->formatStateUsing(fn(Tables\Columns\Column $column) => $column->getRecord()->downloadedText) + ->sortable(), + Tables\Columns\BadgeColumn::make('status')->colors(['success' => 'confirmed', 'warning' => 'pending']), + Tables\Columns\BadgeColumn::make('enabled')->colors(['success' => 'yes', 'danger' => 'no']), + Tables\Columns\TextColumn::make('added')->sortable()->dateTime('Y-m-d H:i'), + Tables\Columns\TextColumn::make('last_access')->dateTime('Y-m-d H:i'), + ]) + ->defaultSort('added', 'desc') + ->filters([ + Tables\Filters\SelectFilter::make('class')->options(array_column(User::$classes, 'text')), + Tables\Filters\SelectFilter::make('status')->options(['confirmed' => 'confirmed', 'pending' => 'pending']), + Tables\Filters\SelectFilter::make('enabled')->options(['enabled' => 'enabled', 'disabled' => 'disabled']), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + ]) + ->bulkActions([ +// Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListUsers::route('/'), + 'create' => Pages\CreateUser::route('/create'), +// 'edit' => Pages\EditUser::route('/{record}/edit'), + ]; + } + +} diff --git a/app/Filament/Resources/User/UserResource/Pages/CreateUser.php b/app/Filament/Resources/User/UserResource/Pages/CreateUser.php new file mode 100644 index 00000000..6b0e193a --- /dev/null +++ b/app/Filament/Resources/User/UserResource/Pages/CreateUser.php @@ -0,0 +1,33 @@ +form->getState(); + try { + $this->record = $userRep->store($data); + $this->notify( + 'success ', + $this->getCreatedNotificationMessage(), + ); + $this->redirect($this->getRedirectUrl()); + } catch (\Exception $exception) { + $this->notify( + 'danger', + $exception->getMessage(), + ); + } + } +} diff --git a/app/Filament/Resources/User/UserResource/Pages/EditUser.php b/app/Filament/Resources/User/UserResource/Pages/EditUser.php new file mode 100644 index 00000000..ab49d4fd --- /dev/null +++ b/app/Filament/Resources/User/UserResource/Pages/EditUser.php @@ -0,0 +1,19 @@ +orderBy('id', 'desc')->limit(5); + } + + protected function getTableColumns(): array + { + return [ + Tables\Columns\TextColumn::make('name')->limit(40), + Tables\Columns\TextColumn::make('user.username'), + Tables\Columns\TextColumn::make('size')->formatStateUsing(fn ($state) => mksize($state)), + Tables\Columns\TextColumn::make('added')->dateTime(), + ]; + } +} diff --git a/app/Filament/Widgets/LatestUsers.php b/app/Filament/Widgets/LatestUsers.php new file mode 100644 index 00000000..15e896fb --- /dev/null +++ b/app/Filament/Widgets/LatestUsers.php @@ -0,0 +1,39 @@ +orderBy('id', 'desc')->limit(5); + } + + protected function getTableColumns(): array + { + return [ + Tables\Columns\TextColumn::make('username'), + Tables\Columns\TextColumn::make('email'), + Tables\Columns\BadgeColumn::make('status')->colors(['success' => 'confirmed', 'danger' => 'pending']), + Tables\Columns\TextColumn::make('added')->dateTime(), + ]; + } +} diff --git a/app/Filament/Widgets/TorrentTrend.php b/app/Filament/Widgets/TorrentTrend.php new file mode 100644 index 00000000..13210548 --- /dev/null +++ b/app/Filament/Widgets/TorrentTrend.php @@ -0,0 +1,41 @@ +dateColumn('added') + ->between( + start: now()->subDays(30), + end: now(), + ) + ->perDay() + ->count(); + + return [ + 'datasets' => [ + [ + 'label' => 'Torrent', + 'data' => $data->map(fn (TrendValue $value) => $value->aggregate), + ], + ], + 'labels' => $data->map(fn (TrendValue $value) => Carbon::parse($value->date)->format('m-d')), + ]; + } +} diff --git a/app/Filament/Widgets/UserTrend.php b/app/Filament/Widgets/UserTrend.php new file mode 100644 index 00000000..00a1b80d --- /dev/null +++ b/app/Filament/Widgets/UserTrend.php @@ -0,0 +1,43 @@ +dateColumn('added') + ->between( + start: now()->subDays(30), + end: now(), + ) + ->perDay() + ->count(); + + return [ + 'datasets' => [ + [ + 'label' => 'User', + 'data' => $data->map(fn (TrendValue $value) => $value->aggregate), + ], + ], + 'labels' => $data->map(fn (TrendValue $value) => Carbon::parse($value->date)->format('m-d')), + ]; + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c0a84b56..478fab94 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -58,6 +58,7 @@ class Kernel extends HttpKernel 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.nexus' => \App\Http\Middleware\NexusAuth::class, + 'auth.filament' => \Filament\Http\Middleware\Authenticate::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 033136ad..b3e748d8 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -12,6 +12,11 @@ class EncryptCookies extends Middleware * @var array */ protected $except = [ - // + 'c_secure_pass', + 'c_secure_uid', + 'c_secure_login', + 'c_secure_ssl', + 'c_secure_tracker_ssl', + ]; } diff --git a/app/Http/Middleware/Filament.php b/app/Http/Middleware/Filament.php new file mode 100644 index 00000000..8af4ecd5 --- /dev/null +++ b/app/Http/Middleware/Filament.php @@ -0,0 +1,19 @@ +user(); - $language = $user->language; - $locale = self::$languageMaps[$language->site_lang_folder] ?? 'en'; - do_log("user: {$user->id}, language: {$language->id}, set locale: $locale"); - App::setLocale($locale); - Carbon::setLocale($locale); - + if ($user) { + $language = $user->language; + $locale = self::$languageMaps[$language->site_lang_folder] ?? 'en'; + do_log("user: {$user->id}, language: {$language->id}, set locale: $locale"); + App::setLocale($locale); + Carbon::setLocale($locale); + } /** @var Response $response */ $response = $next($request); - $response->header('Request-Id', nexus()->getRequestId())->header('Running-In-Octane', RUNNING_IN_OCTANE ? 1 : 0); + if ($response instanceof Response || $response instanceof JsonResponse) { + $response->header('Request-Id', nexus()->getRequestId())->header('Running-In-Octane', RUNNING_IN_OCTANE ? 1 : 0); + } return $response; } diff --git a/app/Http/Resources/ExamResource.php b/app/Http/Resources/ExamResource.php index be558098..89cf64db 100644 --- a/app/Http/Resources/ExamResource.php +++ b/app/Http/Resources/ExamResource.php @@ -26,9 +26,9 @@ class ExamResource extends JsonResource 'duration' => $this->duration ?: '', 'duration_text' => $this->duration_text, 'filters' => $this->normalizeFilters($this->resource), - 'filters_formatted' => $this->formatFilters($this->resource), + 'filters_formatted' => $this->filterFormatted, 'indexes' => $this->indexes, - 'indexes_formatted' => $this->formatIndexes($this->resource), + 'indexes_formatted' => $this->indexFormatted, 'status' => $this->status, 'status_text' => $this->statusText, 'is_discovered' => $this->is_discovered, @@ -48,50 +48,4 @@ class ExamResource extends JsonResource return $filters; } - private function formatFilters(Exam $exam) - { - $currentFilters = $exam->filters; - $arr = []; - $filter = Exam::FILTER_USER_CLASS; - if (!empty($currentFilters->{$filter})) { - $classes = collect(User::$classes)->only($currentFilters->{$filter}); - $arr[] = sprintf('%s: %s', Exam::$filters[$filter]['name'], $classes->pluck('text')->implode(', ')); - } - - $filter = Exam::FILTER_USER_REGISTER_TIME_RANGE; - if (!empty($currentFilters->{$filter})) { - $range = $currentFilters->{$filter}; - $arr[] = sprintf( - "%s: \n%s ~ %s", - Exam::$filters[$filter]['name'], - $range[0] ? Carbon::parse($range[0])->toDateTimeString() : '-', - $range[1] ? Carbon::parse($range[1])->toDateTimeString() : '-' - ); - } - - $filter = Exam::FILTER_USER_DONATE; - if (!empty($currentFilters->{$filter})) { - $donateStatus = $classes = collect(User::$donateStatus)->only($currentFilters->{$filter}); - $arr[] = sprintf('%s: %s', Exam::$filters[$filter]['name'], $donateStatus->pluck('text')->implode(', ')); - } - - return implode("\n", $arr); - } - - private function formatIndexes(Exam $exam) - { - $indexes = $exam->indexes; - $arr = []; - foreach ($indexes as $index) { - if (isset($index['checked']) && $index['checked']) { - $arr[] = sprintf( - '%s: %s %s', - Exam::$indexes[$index['index']]['name'] ?? '', - $index['require_value'], - Exam::$indexes[$index['index']]['unit'] ?? '' - ); - } - } - return implode("\n", $arr); - } } diff --git a/app/Models/Exam.php b/app/Models/Exam.php index 1d65a47c..f5b78536 100644 --- a/app/Models/Exam.php +++ b/app/Models/Exam.php @@ -2,6 +2,7 @@ namespace App\Models; +use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; class Exam extends NexusModel @@ -78,4 +79,51 @@ class Exam extends NexusModel return ''; } + public function getIndexFormattedAttribute(): string + { + $indexes = $this->indexes; + $arr = []; + foreach ($indexes as $index) { + if (isset($index['checked']) && $index['checked']) { + $arr[] = sprintf( + '%s: %s %s', + self::$indexes[$index['index']]['name'] ?? '', + $index['require_value'], + self::$indexes[$index['index']]['unit'] ?? '' + ); + } + } + return implode("
", $arr); + } + + public function getFilterFormattedAttribute(): string + { + $currentFilters = $this->filters; + $arr = []; + $filter = self::FILTER_USER_CLASS; + if (!empty($currentFilters->{$filter})) { + $classes = collect(User::$classes)->only($currentFilters->{$filter}); + $arr[] = sprintf('%s: %s', self::$filters[$filter]['name'], $classes->pluck('text')->implode(', ')); + } + + $filter = self::FILTER_USER_REGISTER_TIME_RANGE; + if (!empty($currentFilters->{$filter})) { + $range = $currentFilters->{$filter}; + $arr[] = sprintf( + "%s: \n%s ~ %s", + self::$filters[$filter]['name'], + $range[0] ? Carbon::parse($range[0])->toDateTimeString() : '-', + $range[1] ? Carbon::parse($range[1])->toDateTimeString() : '-' + ); + } + + $filter = self::FILTER_USER_DONATE; + if (!empty($currentFilters->{$filter})) { + $donateStatus = $classes = collect(User::$donateStatus)->only($currentFilters->{$filter}); + $arr[] = sprintf('%s: %s', self::$filters[$filter]['name'], $donateStatus->pluck('text')->implode(', ')); + } + + return implode("
", $arr); + } + } diff --git a/app/Models/ExamUser.php b/app/Models/ExamUser.php index d983c160..61a7a4e1 100644 --- a/app/Models/ExamUser.php +++ b/app/Models/ExamUser.php @@ -41,6 +41,21 @@ class ExamUser extends NexusModel return self::$isDoneInfo[$this->is_done]['text'] ?? ''; } + public static function listStatus($onlyKeyValue = false): array + { + $result = self::$status; + $keyValues = []; + foreach ($result as $key => &$value) { + $text = nexus_trans('exam-user.status.' . $key); + $value['text'] = $text; + $keyValues[$key] = $text; + } + if ($onlyKeyValue) { + return $keyValues; + } + return $result; + } + public function getBeginAttribute() { $begin = $this->getRawOriginal('begin'); diff --git a/app/Models/HitAndRun.php b/app/Models/HitAndRun.php index db1f753d..80901f84 100644 --- a/app/Models/HitAndRun.php +++ b/app/Models/HitAndRun.php @@ -55,11 +55,17 @@ class HitAndRun extends NexusModel return nexus_trans('hr.status_' . $this->status); } - public static function listStatus(): array + public static function listStatus($onlyKeyValue = false): array { $result = self::$status; + $keyValues = []; foreach ($result as $key => &$value) { - $value['text'] = nexus_trans('hr.status_' . $key); + $text = nexus_trans('hr.status_' . $key); + $value['text'] = $text; + $keyValues[$key] = $text; + } + if ($onlyKeyValue) { + return $keyValues; } return $result; } diff --git a/app/Models/Medal.php b/app/Models/Medal.php index be7dde27..797b580e 100644 --- a/app/Models/Medal.php +++ b/app/Models/Medal.php @@ -10,7 +10,7 @@ class Medal extends NexusModel const GET_TYPE_GRANT = 2; - public static $getTypeText = [ + public static array $getTypeText = [ self::GET_TYPE_EXCHANGE => ['text' => 'Exchange'], self::GET_TYPE_GRANT => ['text' => 'Grant'], ]; @@ -19,6 +19,21 @@ class Medal extends NexusModel public $timestamps = true; + public static function listGetTypes($onlyKeyValues = false): array + { + $results = self::$getTypeText; + $keyValues = []; + foreach ($results as $type => &$info) { + $text = nexus_trans("medal.get_types.$type"); + $keyValues[$type] = $text; + $info['text'] = $text; + } + if ($onlyKeyValues) { + return $keyValues; + } + return $results; + } + public function getGetTypeTextAttribute($value): string { return self::$getTypeText[$this->get_type]['text'] ?? ''; diff --git a/app/Models/NexusModel.php b/app/Models/NexusModel.php index 7390e18d..5a9d24f3 100644 --- a/app/Models/NexusModel.php +++ b/app/Models/NexusModel.php @@ -23,7 +23,7 @@ class NexusModel extends Model */ protected function serializeDate(\DateTimeInterface $date) { - return $date->format($this->dateFormat ?: 'Y-m-d H:i:s'); + return $date->format($this->dateFormat ?: 'Y-m-d H:i'); } /** diff --git a/app/Models/User.php b/app/Models/User.php index 2d53c5cc..ada79bd4 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,6 +6,7 @@ use App\Http\Middleware\Locale; use App\Repositories\ExamRepository; use Carbon\Carbon; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; @@ -13,8 +14,10 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Laravel\Sanctum\HasApiTokens; use Nexus\Database\NexusDB; +use Filament\Models\Contracts\FilamentUser; +use Filament\Models\Contracts\HasName; -class User extends Authenticatable +class User extends Authenticatable implements FilamentUser, HasName { use HasFactory, Notifiable, HasApiTokens; @@ -99,6 +102,17 @@ class User extends Authenticatable return $classText; } + public function canAccessFilament(): bool + { + return true; +// return str_ends_with($this->email, '@yourdomain.com') && $this->hasVerifiedEmail(); + } + + public function getFilamentName(): string + { + return $this->username; + } + /** * @see ExamRepository::isExamMatchUser() * @@ -120,7 +134,7 @@ class User extends Authenticatable */ protected function serializeDate(\DateTimeInterface $date): string { - return $date->format($this->dateFormat ?: 'Y-m-d H:i:s'); + return $date->format($this->dateFormat ?: 'Y-m-d H:i'); } /** @@ -244,6 +258,20 @@ class User extends Authenticatable return 'en'; } + protected function uploadedText(): Attribute + { + return new Attribute( + get: fn($value, $attributes) => mksize($attributes['uploaded']) + ); + } + + protected function downloadedText(): Attribute + { + return new Attribute( + get: fn($value, $attributes) => mksize($attributes['downloaded']) + ); + } + public static function getMinSeedPoints($class) { $setting = Setting::get("account.{$class}_min_seed_points"); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index e99aa584..724e8548 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,11 +2,13 @@ namespace App\Providers; +use Carbon\Carbon; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\DB; use Illuminate\Support\ServiceProvider; use Illuminate\Http\Resources\Json\JsonResource; use Nexus\Nexus; +use Filament\Facades\Filament; class AppServiceProvider extends ServiceProvider { @@ -30,5 +32,13 @@ class AppServiceProvider extends ServiceProvider // JsonResource::withoutWrapping(); DB::connection(config('database.default'))->enableQueryLog(); + Filament::serving(function () { + Filament::registerNavigationGroups([ + 'User', + 'Torrent', + 'System', + ]); + }); + } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 1e41d5a2..8b71f750 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,6 +2,8 @@ namespace App\Providers; +use App\Auth\NexusWebGuard; +use App\Auth\NexusWebUserProvider; use App\Models\User; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Http\Request; @@ -31,6 +33,11 @@ class AuthServiceProvider extends ServiceProvider Auth::viaRequest('nexus-cookie', function (Request $request) { return $this->getUserByCookie($request->cookie()); }); + + Auth::extend('nexus-web', function ($app, $name, array $config) { + // 返回 Illuminate\Contracts\Auth\Guard 的实例 ... + return new NexusWebGuard($app->make('request'), new NexusWebUserProvider()); + }); } private function getUserByCookie($cookie) diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index 70c61d2b..da62764c 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -115,7 +115,7 @@ class UserRepository extends BaseRepository 'class' => $class ]; $user = new User($data); - if ($params['id']) { + if (!empty($params['id'])) { if (User::query()->where('id', $params['id'])->exists()) { throw new \InvalidArgumentException("uid: {$params['id']} already exists."); } diff --git a/composer.json b/composer.json index 0529fcb0..f806f5d8 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "require": { "php": "^8.0", "ext-bcmath": "*", + "ext-curl": "*", "ext-gd": "*", "ext-json": "*", "ext-mbstring": "*", @@ -32,6 +33,8 @@ "ext-xml": "*", "doctrine/dbal": "^3.1", "elasticsearch/elasticsearch": "^7.16", + "filament/filament": "^2.0", + "flowframe/laravel-trend": "^0.1.1", "fruitcake/laravel-cors": "^2.0", "geoip2/geoip2": "~2.0", "hashids/hashids": "^4.1", diff --git a/composer.lock b/composer.lock index d3eceb65..89de1b16 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,82 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3387b3f52798b9a38c8eb3c895498916", + "content-hash": "3f8e2bfc2d866abff6ef37466f43be7c", "packages": [ + { + "name": "akaunting/laravel-money", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/akaunting/laravel-money.git", + "reference": "22336631239eb008e26d322faa208cbc50757a38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/akaunting/laravel-money/zipball/22336631239eb008e26d322faa208cbc50757a38", + "reference": "22336631239eb008e26d322faa208cbc50757a38", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^8.67|^9.0", + "illuminate/support": "^8.67|^9.0", + "illuminate/view": "^8.67|^9.0", + "php": "^8.0", + "vlucas/phpdotenv": "^5.4.1" + }, + "require-dev": { + "orchestra/testbench": "^6.23|^7.4", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.23" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Akaunting\\Money\\Provider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Akaunting\\Money\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Denis Duliçi", + "email": "info@akaunting.com", + "homepage": "https://akaunting.com", + "role": "Developer" + } + ], + "description": "Currency formatting and conversion package for Laravel", + "keywords": [ + "convert", + "currency", + "format", + "laravel", + "money" + ], + "support": { + "issues": "https://github.com/akaunting/laravel-money/issues", + "source": "https://github.com/akaunting/laravel-money/tree/3.0.1" + }, + "time": "2022-05-11T06:34:38+00:00" + }, { "name": "asm89/stack-cors", "version": "v2.1.1", @@ -68,6 +142,168 @@ }, "time": "2022-01-18T09:12:03+00:00" }, + { + "name": "blade-ui-kit/blade-heroicons", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-heroicons.git", + "reference": "a2749abc7b8eb6149ff643ffa99a3d33a2de7961" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a2749abc7b8eb6149ff643ffa99a3d33a2de7961", + "reference": "a2749abc7b8eb6149ff643ffa99a3d33a2de7961", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "blade-ui-kit/blade-icons": "^1.1", + "illuminate/support": "^8.0|^9.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0", + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Heroicons\\BladeHeroiconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BladeUI\\Heroicons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of Heroicons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-heroicons", + "keywords": [ + "Heroicons", + "blade", + "laravel" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/caneco", + "type": "github" + }, + { + "url": "https://github.com/driesvints", + "type": "github" + } + ], + "time": "2022-03-02T11:50:13+00:00" + }, + { + "name": "blade-ui-kit/blade-icons", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-icons.git", + "reference": "012496d145bf4ea7fffd0beed9b9acbf434cc7c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/012496d145bf4ea7fffd0beed9b9acbf434cc7c8", + "reference": "012496d145bf4ea7fffd0beed9b9acbf434cc7c8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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", + "php": "^7.4|^8.0", + "symfony/console": "^5.3|^6.0", + "symfony/finder": "^5.3|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "orchestra/testbench": "^6.0|^7.0", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/blade-icons-generate" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Icons\\BladeIconsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "BladeUI\\Icons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of icons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-icons", + "keywords": [ + "blade", + "icons", + "laravel", + "svg" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-icons/issues", + "source": "https://github.com/blade-ui-kit/blade-icons" + }, + "funding": [ + { + "url": "https://github.com/caneco", + "type": "github" + }, + { + "url": "https://github.com/driesvints", + "type": "github" + } + ], + "time": "2022-02-28T21:03:33+00:00" + }, { "name": "brick/math", "version": "0.9.3", @@ -303,6 +539,123 @@ ], "time": "2022-03-16T11:22:07+00:00" }, + { + "name": "danharrin/date-format-converter", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/danharrin/date-format-converter.git", + "reference": "ee448ab0cbe2ea36edb886a01670fc760e388f19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/date-format-converter/zipball/ee448ab0cbe2ea36edb886a01670fc760e388f19", + "reference": "ee448ab0cbe2ea36edb886a01670fc760e388f19", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php", + "src/standards.php" + ], + "psr-4": { + "DanHarrin\\DateFormatConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Convert token-based date formats between standards.", + "homepage": "https://github.com/danharrin/date-format-converter", + "support": { + "issues": "https://github.com/danharrin/date-format-converter/issues", + "source": "https://github.com/danharrin/date-format-converter" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2021-02-10T23:58:47+00:00" + }, + { + "name": "danharrin/livewire-rate-limiting", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/danharrin/livewire-rate-limiting.git", + "reference": "b99facf5b607fb0cde92a6f254f437295339f7de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/livewire-rate-limiting/zipball/b99facf5b607fb0cde92a6f254f437295339f7de", + "reference": "b99facf5b607fb0cde92a6f254f437295339f7de", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/support": "^8.0|^9.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" + }, + "type": "library", + "autoload": { + "psr-4": { + "DanHarrin\\LivewireRateLimiting\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Apply rate limiters to Laravel Livewire actions.", + "homepage": "https://github.com/danharrin/livewire-rate-limiting", + "support": { + "issues": "https://github.com/danharrin/livewire-rate-limiting/issues", + "source": "https://github.com/danharrin/livewire-rate-limiting" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2022-01-21T11:26:58+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.1", @@ -1270,6 +1623,251 @@ }, "time": "2021-11-16T11:51:30+00:00" }, + { + "name": "filament/filament", + "version": "v2.13.10", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/admin.git", + "reference": "443de38677284820b1dc53f309495e75f22bdc01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/admin/zipball/443de38677284820b1dc53f309495e75f22bdc01", + "reference": "443de38677284820b1dc53f309495e75f22bdc01", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "danharrin/livewire-rate-limiting": "^0.3|^1.0", + "filament/forms": "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", + "livewire/livewire": "^2.6", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\FilamentServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered admin panels.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2022-06-24T10:38:51+00:00" + }, + { + "name": "filament/forms", + "version": "v2.13.10", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/forms.git", + "reference": "98ea2eb252dc4174fd8ecd438708ac05229eb2a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/98ea2eb252dc4174fd8ecd438708ac05229eb2a8", + "reference": "98ea2eb252dc4174fd8ecd438708ac05229eb2a8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "blade-ui-kit/blade-heroicons": "^1.2", + "danharrin/date-format-converter": "^0.2", + "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", + "livewire/livewire": "^2.6", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Forms\\FormsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\Forms\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered forms.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2022-06-24T10:38:46+00:00" + }, + { + "name": "filament/support", + "version": "v2.13.10", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/support.git", + "reference": "0ceb543182469cabae1796b3d680d2c3eb98a8cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/support/zipball/0ceb543182469cabae1796b3d680d2c3eb98a8cf", + "reference": "0ceb543182469cabae1796b3d680d2c3eb98a8cf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^8.6|^9.0", + "illuminate/support": "^8.6|^9.0", + "illuminate/view": "^8.6|^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Support\\SupportServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\Support\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Associated helper methods and foundation code for Filament packages.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2022-06-24T10:38:48+00:00" + }, + { + "name": "filament/tables", + "version": "v2.13.10", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/tables.git", + "reference": "f6284bdaff160f577d081084675af62bc79cb348" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/f6284bdaff160f577d081084675af62bc79cb348", + "reference": "f6284bdaff160f577d081084675af62bc79cb348", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "akaunting/laravel-money": "^1.2|^2.0|^3.0", + "blade-ui-kit/blade-heroicons": "^1.2", + "filament/forms": "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", + "livewire/livewire": "^2.6", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Tables\\TablesServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\Tables\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Effortlessly build TALL-powered tables.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2022-06-24T10:38:39+00:00" + }, { "name": "firebase/php-jwt", "version": "v5.5.1", @@ -1333,6 +1931,86 @@ }, "time": "2021-11-08T20:18:51+00:00" }, + { + "name": "flowframe/laravel-trend", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/Flowframe/laravel-trend.git", + "reference": "10f80dad8225caca58d286b580ebd27c2a0bf3fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Flowframe/laravel-trend/zipball/10f80dad8225caca58d286b580ebd27c2a0bf3fa", + "reference": "10f80dad8225caca58d286b580ebd27c2a0bf3fa", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^8.37|^9", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.4.3" + }, + "require-dev": { + "nunomaduro/collision": "^5.3|^6.1", + "orchestra/testbench": "^6.15|^7.0", + "pestphp/pest": "^1.18", + "pestphp/pest-plugin-laravel": "^1.1", + "spatie/laravel-ray": "^1.23", + "vimeo/psalm": "^4.8" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Flowframe\\Trend\\TrendServiceProvider" + ], + "aliases": { + "Trend": "Flowframe\\Trend\\TrendFacade" + } + } + }, + "autoload": { + "psr-4": { + "Flowframe\\Trend\\": "src", + "Flowframe\\Trend\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Klopstra", + "email": "lars@flowframe.nl", + "role": "Developer" + } + ], + "description": "Easily generate model trends", + "homepage": "https://github.com/flowframe/laravel-trend", + "keywords": [ + "Flowframe", + "laravel", + "laravel-trend" + ], + "support": { + "issues": "https://github.com/Flowframe/laravel-trend/issues", + "source": "https://github.com/Flowframe/laravel-trend/tree/v0.1.1" + }, + "funding": [ + { + "url": "https://github.com/larsklopstra", + "type": "github" + } + ], + "time": "2022-02-25T13:52:24+00:00" + }, { "name": "fruitcake/laravel-cors", "version": "v2.2.0", @@ -3363,6 +4041,85 @@ ], "time": "2021-11-21T11:48:40+00:00" }, + { + "name": "livewire/livewire", + "version": "v2.10.5", + "source": { + "type": "git", + "url": "https://github.com/livewire/livewire.git", + "reference": "9ea6237760f627b3b6a05d15137880780ac843b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/livewire/livewire/zipball/9ea6237760f627b3b6a05d15137880780ac843b5", + "reference": "9ea6237760f627b3b6a05d15137880780ac843b5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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", + "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", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^5.0|^6.0|^7.0", + "orchestra/testbench-dusk": "^5.2|^6.0|^7.0", + "phpunit/phpunit": "^8.4|^9.0", + "psy/psysh": "@stable" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Livewire\\LivewireServiceProvider" + ], + "aliases": { + "Livewire": "Livewire\\Livewire" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A front-end framework for Laravel.", + "support": { + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v2.10.5" + }, + "funding": [ + { + "url": "https://github.com/livewire", + "type": "github" + } + ], + "time": "2022-04-07T21:38:12+00:00" + }, { "name": "masbug/flysystem-google-drive-ext", "version": "v2.1.0", @@ -5352,6 +6109,71 @@ }, "time": "2022-03-29T11:33:16+00:00" }, + { + "name": "spatie/laravel-package-tools", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "9e6c0382553f1317c02f1ae0ee71c64821eb5af0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9e6c0382553f1317c02f1ae0ee71c64821eb5af0", + "reference": "9e6c0382553f1317c02f1ae0ee71c64821eb5af0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^7.0|^8.0|^9.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "orchestra/testbench": "^5.0|^6.23|^7.0", + "phpunit/phpunit": "^9.4", + "spatie/test-time": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.12.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-06-19T20:01:24+00:00" + }, { "name": "spiral/goridge", "version": "v3.1.2", @@ -11918,6 +12740,7 @@ "platform": { "php": "^8.0", "ext-bcmath": "*", + "ext-curl": "*", "ext-gd": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/config/auth.php b/config/auth.php index 1999fc4c..265b5be9 100644 --- a/config/auth.php +++ b/config/auth.php @@ -49,6 +49,9 @@ return [ 'nexus' => [ 'driver' => 'nexus-cookie', ], + 'nexus-web' => [ + 'driver' => 'nexus-web', + ], ], /* diff --git a/config/database.php b/config/database.php index 27c926df..f545a3fa 100644 --- a/config/database.php +++ b/config/database.php @@ -142,6 +142,14 @@ return [ 'database' => (int)env('REDIS_CACHE_DB', '1'), ], + 'session' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => (int)env('REDIS_PORT', '6379'), + 'database' => 10, + ], + ], ]; diff --git a/config/filament.php b/config/filament.php new file mode 100644 index 00000000..10d5c0b0 --- /dev/null +++ b/config/filament.php @@ -0,0 +1,293 @@ + env('FILAMENT_PATH', 'filament'), + + + /* + |-------------------------------------------------------------------------- + | Filament Core Path + |-------------------------------------------------------------------------- + | + | This is the path which Filament will use to load it's core routes and assets. + | You may change it if it conflicts with your other routes. + | + */ + + 'core_path' => env('FILAMENT_CORE_PATH', 'filament'), + + + /* + |-------------------------------------------------------------------------- + | Filament Domain + |-------------------------------------------------------------------------- + | + | You may change the domain where Filament should be active. If the domain + | is empty, all domains will be valid. + | + */ + + 'domain' => env('FILAMENT_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | Homepage URL + |-------------------------------------------------------------------------- + | + | This is the URL that Filament will redirect the user to when they click + | on the sidebar's header. + | + */ + + 'home_url' => '/', + + /* + |-------------------------------------------------------------------------- + | Brand Name + |-------------------------------------------------------------------------- + | + | This will be displayed on the login page and in the sidebar's header. + | + */ + + 'brand' => 'NexusPHP', + + /* + |-------------------------------------------------------------------------- + | Auth + |-------------------------------------------------------------------------- + | + | This is the configuration that Filament will use to handle authentication + | into the admin panel. + | + */ + + 'auth' => [ +// 'guard' => env('FILAMENT_AUTH_GUARD', 'web'), + 'guard' => env('FILAMENT_AUTH_GUARD', 'nexus-web'), + 'pages' => [ + 'login' => \Filament\Http\Livewire\Auth\Login::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Pages + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register pages from. You may also register pages here. + | + */ + + 'pages' => [ + 'namespace' => 'App\\Filament\\Pages', + 'path' => app_path('Filament/Pages'), + 'register' => [ +// Pages\Dashboard::class, + \App\Filament\Pages\Dashboard::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Resources + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register resources from. You may also register resources here. + | + */ + + 'resources' => [ + 'namespace' => 'App\\Filament\\Resources', + 'path' => app_path('Filament/Resources'), + 'register' => [], + ], + + /* + |-------------------------------------------------------------------------- + | Widgets + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register dashboard widgets from. You may also register widgets here. + | + */ + + 'widgets' => [ + 'namespace' => 'App\\Filament\\Widgets', + 'path' => app_path('Filament/Widgets'), + 'register' => [ +// Widgets\AccountWidget::class, +// Widgets\FilamentInfoWidget::class, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Livewire + |-------------------------------------------------------------------------- + | + | This is the namespace and directory that Filament will automatically + | register Livewire components inside. + | + */ + + 'livewire' => [ + 'namespace' => 'App\\Filament', + 'path' => app_path('Filament'), + ], + + /* + |-------------------------------------------------------------------------- + | Dark mode + |-------------------------------------------------------------------------- + | + | By enabling this feature, your users are able to select between a light + | and dark appearance for the admin panel, or let their system decide. + | + */ + + 'dark_mode' => false, + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | + | This is the configuration for the general layout of the admin panel. + | + | You may configure the max content width from `xl` to `7xl`, or `full` + | for no max width. + | + */ + + 'layout' => [ + 'forms' => [ + 'actions' => [ + 'alignment' => 'left', + ], + 'have_inline_labels' => false, + ], + 'footer' => [ + 'should_show_logo' => false, + ], + 'max_content_width' => null, + 'notifications' => [ + 'vertical_alignment' => 'center', + 'alignment' => 'center', + ], + 'sidebar' => [ + 'is_collapsible_on_desktop' => true, + 'groups' => [ + 'are_collapsible' => true, + ], + 'width' => null, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Favicon + |-------------------------------------------------------------------------- + | + | This is the path to the favicon used for pages in the admin panel. + | + */ + + 'favicon' => null, + + /* + |-------------------------------------------------------------------------- + | Default Avatar Provider + |-------------------------------------------------------------------------- + | + | This is the service that will be used to retrieve default avatars if one + | has not been uploaded. + | + */ + + 'default_avatar_provider' => \Filament\AvatarProviders\UiAvatarsProvider::class, + + /* + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | This is the storage disk Filament will use to put media. You may use any + | of the disks defined in the `config/filesystems.php`. + | + */ + + 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'), + + /* + |-------------------------------------------------------------------------- + | Google Fonts + |-------------------------------------------------------------------------- + | + | This is the URL for Google Fonts that should be loaded. You may use any + | font, or set to `null` to prevent any Google Fonts from loading. + | + | When using a custom font, you should also set the font family in your + | custom theme's `tailwind.config.js` file. + | + */ + + 'google_fonts' => 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap', + + /* + |-------------------------------------------------------------------------- + | Middleware + |-------------------------------------------------------------------------- + | + | You may customise the middleware stack that Filament uses to handle + | requests. + | + */ + + 'middleware' => [ + 'auth' => [ + \App\Http\Middleware\Filament::class, + ], + 'base' => [ +// EncryptCookies::class, + \App\Http\Middleware\EncryptCookies::class, + AddQueuedCookiesToResponse::class, + StartSession::class, +// AuthenticateSession::class, + ShareErrorsFromSession::class, + VerifyCsrfToken::class, + SubstituteBindings::class, + DispatchServingFilamentEvent::class, + MirrorConfigToSubpackages::class, + \App\Http\Middleware\Locale::class, + ], + ], + +]; diff --git a/config/forms.php b/config/forms.php new file mode 100644 index 00000000..dfeb5579 --- /dev/null +++ b/config/forms.php @@ -0,0 +1,68 @@ + [ + + 'actions' => [ + + 'modal' => [ + + 'actions' => [ + 'alignment' => 'left', + ], + + ], + + ], + + 'date_time_picker' => [ + 'first_day_of_week' => 1, // 0 to 7 are accepted values, with Monday as 1 and Sunday as 7 or 0. + 'display_formats' => [ + 'date' => 'Y-m-d', + 'date_time' => 'Y-m-d H:i:s', + 'date_time_with_seconds' => 'Y-m-d H:i:s', + 'time' => 'H:i', + 'time_with_seconds' => 'H:i:s', + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | This is the storage disk Filament will use to put media. You may use any + | of the disks defined in the `config/filesystems.php`. + | + */ + + 'default_filesystem_disk' => env('FORMS_FILESYSTEM_DRIVER', 'public'), + + /* + |-------------------------------------------------------------------------- + | Dark mode + |-------------------------------------------------------------------------- + | + | By enabling this feature, your users are able to select between a light + | and dark appearance for forms, via Tailwind's Dark Mode feature. + | + | https://tailwindcss.com/docs/dark-mode + | + */ + + 'dark_mode' => false, + +]; diff --git a/config/livewire.php b/config/livewire.php new file mode 100644 index 00000000..c5bfd70b --- /dev/null +++ b/config/livewire.php @@ -0,0 +1,159 @@ + 'App\\Http\\Livewire', + + /* + |-------------------------------------------------------------------------- + | View Path + |-------------------------------------------------------------------------- + | + | This value sets the path for Livewire component views. This affects + | file manipulation helper commands like `artisan make:livewire`. + | + */ + + 'view_path' => resource_path('views/livewire'), + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | The default layout view that will be used when rendering a component via + | Route::get('/some-endpoint', SomeComponent::class);. In this case the + | the view returned by SomeComponent will be wrapped in "layouts.app" + | + */ + + 'layout' => 'layouts.app', + + /* + |-------------------------------------------------------------------------- + | Livewire Assets URL + |-------------------------------------------------------------------------- + | + | This value sets the path to Livewire JavaScript assets, for cases where + | your app's domain root is not the correct path. By default, Livewire + | will load its JavaScript assets from the app's "relative root". + | + | Examples: "/assets", "myurl.com/app". + | + */ + + 'asset_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire App URL + |-------------------------------------------------------------------------- + | + | This value should be used if livewire assets are served from CDN. + | Livewire will communicate with an app through this url. + | + | Examples: "https://my-app.com", "myurl.com/app". + | + */ + + 'app_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire Endpoint Middleware Group + |-------------------------------------------------------------------------- + | + | This value sets the middleware group that will be applied to the main + | Livewire "message" endpoint (the endpoint that gets hit everytime + | a Livewire component updates). It is set to "web" by default. + | + */ + + 'middleware_group' => 'auth.filament', +// 'middleware_group' => 'web', + + /* + |-------------------------------------------------------------------------- + | Livewire Temporary File Uploads Endpoint Configuration + |-------------------------------------------------------------------------- + | + | Livewire handles file uploads by storing uploads in a temporary directory + | before the file is validated and stored permanently. All file uploads + | are directed to a global endpoint for temporary storage. The config + | items below are used for customizing the way the endpoint works. + | + */ + + 'temporary_file_upload' => [ + 'disk' => null, // Example: 'local', 's3' Default: 'default' + 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) + 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' + 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' + 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. + 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', + 'mov', 'avi', 'wmv', 'mp3', 'm4a', + 'jpg', 'jpeg', 'mpga', 'webp', 'wma', + ], + 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. + ], + + /* + |-------------------------------------------------------------------------- + | Manifest File Path + |-------------------------------------------------------------------------- + | + | This value sets the path to the Livewire manifest file. + | The default should work for most cases (which is + | "/bootstrap/cache/livewire-components.php"), but for specific + | cases like when hosting on Laravel Vapor, it could be set to a different value. + | + | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". + | + */ + + 'manifest_path' => null, + + /* + |-------------------------------------------------------------------------- + | Back Button Cache + |-------------------------------------------------------------------------- + | + | This value determines whether the back button cache will be used on pages + | that contain Livewire. By disabling back button cache, it ensures that + | the back button shows the correct state of components, instead of + | potentially stale, cached data. + | + | Setting it to "false" (default) will disable back button cache. + | + */ + + 'back_button_cache' => false, + + /* + |-------------------------------------------------------------------------- + | Render On Redirect + |-------------------------------------------------------------------------- + | + | This value determines whether Livewire will render before it's redirected + | or not. Setting it to "false" (default) will mean the render method is + | skipped when redirecting. And "true" will mean the render method is + | run before redirecting. Browsers bfcache can store a potentially + | stale view if render is skipped on redirect. + | + */ + + 'render_on_redirect' => false, + +]; diff --git a/config/session.php b/config/session.php index 4e0f66cd..a37f62ce 100644 --- a/config/session.php +++ b/config/session.php @@ -18,7 +18,8 @@ return [ | */ - 'driver' => env('SESSION_DRIVER', 'file'), +// 'driver' => env('SESSION_DRIVER', 'file'), + 'driver' => 'redis', /* |-------------------------------------------------------------------------- @@ -72,7 +73,8 @@ return [ | */ - 'connection' => env('SESSION_CONNECTION', null), +// 'connection' => env('SESSION_CONNECTION', null), + 'connection' => 'session', /* |-------------------------------------------------------------------------- diff --git a/config/tables.php b/config/tables.php new file mode 100644 index 00000000..3e3727cb --- /dev/null +++ b/config/tables.php @@ -0,0 +1,80 @@ + 'Y-m-d', + 'date_time_format' => 'Y-m-d H:i', + 'time_format' => 'H:i:s', + + /* + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | This is the storage disk Filament will use to find media. You may use any + | of the disks defined in the `config/filesystems.php`. + | + */ + + 'default_filesystem_disk' => env('TABLES_FILESYSTEM_DRIVER', 'public'), + + /* + |-------------------------------------------------------------------------- + | Dark mode + |-------------------------------------------------------------------------- + | + | By enabling this feature, your users are able to select between a light + | and dark appearance for tables, via Tailwind's Dark Mode feature. + | + | https://tailwindcss.com/docs/dark-mode + | + */ + + 'dark_mode' => false, + + /* + |-------------------------------------------------------------------------- + | Pagination + |-------------------------------------------------------------------------- + | + | This is the configuration for the pagination of tables. + | + */ + + 'pagination' => [ + 'default_records_per_page' => 10, + ], + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | + | This is the configuration for the general layout of tables. + | + */ + + 'layout' => [ + 'actions' => [ + 'cell' => [ + 'alignment' => 'right', + ], + 'modal' => [ + 'actions' => [ + 'alignment' => 'left', + ], + ], + ], + ], + +]; diff --git a/include/constants.php b/include/constants.php index 9eb9835f..efcce419 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==arguments[0]?arguments[0]:"right";return this.modifiers.includes("up")?"up":this.modifiers.includes("down")?"down":this.modifiers.includes("left")?"left":this.modifiers.includes("right")?"right":fallback}}]),Directive}();function walk(root,callback){if(!1!==callback(root))for(var node=root.firstElementChild;node;)walk(node,callback),node=node.nextElementSibling}function dispatch(eventName){var event=document.createEvent("Events");return event.initEvent(eventName,!0,!0),document.dispatchEvent(event),event}function getCsrfToken(){var _window$livewire_toke,tokenTag=document.head.querySelector('meta[name="csrf-token"]');return tokenTag?tokenTag.content:null!==(_window$livewire_toke=window.livewire_token)&&void 0!==_window$livewire_toke?_window$livewire_toke:void 0}function kebabCase(subject){return subject.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()} +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */var isobject=function(val){return null!=val&&"object"==typeof val&&!1===Array.isArray(val)},getValue=function(target,path,options){if(isobject(options)||(options={default:options}),!isValidObject(target))return void 0!==options.default?options.default:target;"number"==typeof path&&(path=String(path));const isArray=Array.isArray(path),isString="string"==typeof path,splitChar=options.separator||".",joinChar=options.joinChar||("string"==typeof splitChar?splitChar:".");if(!isString&&!isArray)return target;if(isString&&path in target)return isValid(path,target,options)?target[path]:options.default;let segs=isArray?path:split$1(path,splitChar,options),len=segs.length,idx=0;do{let prop=segs[idx];for("number"==typeof prop&&(prop=String(prop));prop&&"\\"===prop.slice(-1);)prop=join([prop.slice(0,-1),segs[++idx]||""],joinChar,options);if(prop in target){if(!isValid(prop,target,options))return options.default;target=target[prop]}else{let hasProp=!1,n=idx+1;for(;n + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */function join(segs,joinChar,options){return"function"==typeof options.join?options.join(segs):segs[0]+joinChar+segs[1]}function split$1(path,splitChar,options){return"function"==typeof options.split?options.split(path):path.split(splitChar)}function isValid(key,target,options){return"function"!=typeof options.isValid||options.isValid(key,target)}function isValidObject(val){return isobject(val)||Array.isArray(val)||"function"==typeof val}var _default$6=function(){function _default(el){var skipWatcher=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_classCallCheck(this,_default),this.el=el,this.skipWatcher=skipWatcher,this.resolveCallback=function(){},this.rejectCallback=function(){},this.signature=(Math.random()+1).toString(36).substring(8)}return _createClass(_default,[{key:"toId",value:function(){return btoa(encodeURIComponent(this.el.outerHTML))}},{key:"onResolve",value:function(callback){this.resolveCallback=callback}},{key:"onReject",value:function(callback){this.rejectCallback=callback}},{key:"resolve",value:function(thing){this.resolveCallback(thing)}},{key:"reject",value:function(thing){this.rejectCallback(thing)}}]),_default}(),_default$5=function(_Action){_inherits(_default,_Action);var _super=_createSuper(_default);function _default(event,params,el){var _this;return _classCallCheck(this,_default),(_this=_super.call(this,el)).type="fireEvent",_this.payload={id:_this.signature,event:event,params:params},_this}return _createClass(_default,[{key:"toId",value:function(){return btoa(encodeURIComponent(this.type,this.payload.event,JSON.stringify(this.payload.params)))}}]),_default}(_default$6),MessageBus=function(){function MessageBus(){_classCallCheck(this,MessageBus),this.listeners={}}return _createClass(MessageBus,[{key:"register",value:function(name,callback){this.listeners[name]||(this.listeners[name]=[]),this.listeners[name].push(callback)}},{key:"call",value:function(name){for(var _len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(this.listeners[name]||[]).forEach((function(callback){callback.apply(void 0,params)}))}},{key:"has",value:function(name){return Object.keys(this.listeners).includes(name)}}]),MessageBus}(),HookManager={availableHooks:["component.initialized","element.initialized","element.updating","element.updated","element.removed","message.sent","message.failed","message.received","message.processed","interceptWireModelSetValue","interceptWireModelAttachListener","beforeReplaceState","beforePushState"],bus:new MessageBus,register:function(name,callback){if(!this.availableHooks.includes(name))throw"Livewire: Referencing unknown hook: [".concat(name,"]");this.bus.register(name,callback)},call:function(name){for(var _this$bus,_len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(_this$bus=this.bus).call.apply(_this$bus,[name].concat(params))}},DirectiveManager={directives:new MessageBus,register:function(name,callback){if(this.has(name))throw"Livewire: Directive already registered: [".concat(name,"]");this.directives.register(name,callback)},call:function(name,el,directive,component){this.directives.call(name,el,directive,component)},has:function(name){return this.directives.has(name)}},store$2={componentsById:{},listeners:new MessageBus,initialRenderIsFinished:!1,livewireIsInBackground:!1,livewireIsOffline:!1,sessionHasExpired:!1,sessionHasExpiredCallback:void 0,directives:DirectiveManager,hooks:HookManager,onErrorCallback:function(){},components:function(){var _this=this;return Object.keys(this.componentsById).map((function(key){return _this.componentsById[key]}))},addComponent:function(component){return this.componentsById[component.id]=component},findComponent:function(id){return this.componentsById[id]},getComponentsByName:function(name){return this.components().filter((function(component){return component.name===name}))},hasComponent:function(id){return!!this.componentsById[id]},tearDownComponents:function(){var _this2=this;this.components().forEach((function(component){_this2.removeComponent(component)}))},on:function(event,callback){this.listeners.register(event,callback)},emit:function(event){for(var _this$listeners,_len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(_this$listeners=this.listeners).call.apply(_this$listeners,[event].concat(params)),this.componentsListeningForEvent(event).forEach((function(component){return component.addAction(new _default$5(event,params))}))},emitUp:function(el,event){for(var _len2=arguments.length,params=new Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)params[_key2-2]=arguments[_key2];this.componentsListeningForEventThatAreTreeAncestors(el,event).forEach((function(component){return component.addAction(new _default$5(event,params))}))},emitSelf:function(componentId,event){var component=this.findComponent(componentId);if(component.listeners.includes(event)){for(var _len3=arguments.length,params=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++)params[_key3-2]=arguments[_key3];component.addAction(new _default$5(event,params))}},emitTo:function(componentName,event){for(var _len4=arguments.length,params=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++)params[_key4-2]=arguments[_key4];var components=this.getComponentsByName(componentName);components.forEach((function(component){component.listeners.includes(event)&&component.addAction(new _default$5(event,params))}))},componentsListeningForEventThatAreTreeAncestors:function(el,event){for(var parentIds=[],parent=el.parentElement.closest("[wire\\:id]");parent;)parentIds.push(parent.getAttribute("wire:id")),parent=parent.parentElement.closest("[wire\\:id]");return this.components().filter((function(component){return component.listeners.includes(event)&&parentIds.includes(component.id)}))},componentsListeningForEvent:function(event){return this.components().filter((function(component){return component.listeners.includes(event)}))},registerDirective:function(name,callback){this.directives.register(name,callback)},registerHook:function(name,callback){this.hooks.register(name,callback)},callHook:function(name){for(var _this$hooks,_len5=arguments.length,params=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++)params[_key5-1]=arguments[_key5];(_this$hooks=this.hooks).call.apply(_this$hooks,[name].concat(params))},changeComponentId:function(component,newId){var oldId=component.id;component.id=newId,component.fingerprint.id=newId,this.componentsById[newId]=component,delete this.componentsById[oldId],this.components().forEach((function(component){var children=component.serverMemo.children||{};Object.entries(children).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],_ref2$=_ref2[1],id=_ref2$.id;_ref2$.tagName,id===oldId&&(children[key].id=newId)}))}))},removeComponent:function(component){component.tearDown(),delete this.componentsById[component.id]},onError:function(callback){this.onErrorCallback=callback},getClosestParentId:function(childId,subsetOfParentIds){var _this3=this,distancesByParentId={};subsetOfParentIds.forEach((function(parentId){var distance=_this3.getDistanceToChild(parentId,childId);distance&&(distancesByParentId[parentId]=distance)}));var closestParentId,smallestDistance=Math.min.apply(Math,_toConsumableArray(Object.values(distancesByParentId)));return Object.entries(distancesByParentId).forEach((function(_ref3){var _ref4=_slicedToArray(_ref3,2),parentId=_ref4[0];_ref4[1]===smallestDistance&&(closestParentId=parentId)})),closestParentId},getDistanceToChild:function(parentId,childId){var distanceMemo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,parentComponent=this.findComponent(parentId);if(parentComponent){var childIds=parentComponent.childIds;if(childIds.includes(childId))return distanceMemo;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;null===node&&(node=document);var allEls=Array.from(node.querySelectorAll("[wire\\:initial-data]")),onlyChildEls=Array.from(node.querySelectorAll("[wire\\:initial-data] [wire\\:initial-data]"));return allEls.filter((function(el){return!onlyChildEls.includes(el)}))},allModelElementsInside:function(root){return Array.from(root.querySelectorAll("[wire\\:model]"))},getByAttributeAndValue:function(attribute,value){return document.querySelector("[wire\\:".concat(attribute,'="').concat(value,'"]'))},nextFrame:function(fn){var _this=this;requestAnimationFrame((function(){requestAnimationFrame(fn.bind(_this))}))},closestRoot:function(el){return this.closestByAttribute(el,"id")},closestByAttribute:function(el,attribute){var closestEl=el.closest("[wire\\:".concat(attribute,"]"));if(!closestEl)throw"\nLivewire Error:\n\nCannot find parent element in DOM tree containing attribute: [wire:".concat(attribute,"].\n\nUsually this is caused by Livewire's DOM-differ not being able to properly track changes.\n\nReference the following guide for common causes: https://laravel-livewire.com/docs/troubleshooting \n\nReferenced element:\n\n").concat(el.outerHTML,"\n");return closestEl},isComponentRootEl:function(el){return this.hasAttribute(el,"id")},hasAttribute:function(el,attribute){return el.hasAttribute("wire:".concat(attribute))},getAttribute:function(el,attribute){return el.getAttribute("wire:".concat(attribute))},removeAttribute:function(el,attribute){return el.removeAttribute("wire:".concat(attribute))},setAttribute:function(el,attribute,value){return el.setAttribute("wire:".concat(attribute),value)},hasFocus:function(el){return el===document.activeElement},isInput:function(el){return["INPUT","TEXTAREA","SELECT"].includes(el.tagName.toUpperCase())},isTextInput:function(el){return["INPUT","TEXTAREA"].includes(el.tagName.toUpperCase())&&!["checkbox","radio"].includes(el.type)},valueFromInput:function(el,component){if("checkbox"===el.type){var modelName=wireDirectives(el).get("model").value,modelValue=component.deferredActions[modelName]?component.deferredActions[modelName].payload.value:getValue(component.data,modelName);return Array.isArray(modelValue)?this.mergeCheckboxValueIntoArray(el,modelValue):!!el.checked&&(el.getAttribute("value")||!0)}return"SELECT"===el.tagName&&el.multiple?this.getSelectValues(el):el.value},mergeCheckboxValueIntoArray:function(el,arrayValue){return el.checked?arrayValue.includes(el.value)?arrayValue:arrayValue.concat(el.value):arrayValue.filter((function(item){return item!=el.value}))},setInputValueFromModel:function(el,component){var modelString=wireDirectives(el).get("model").value,modelValue=getValue(component.data,modelString);"input"===el.tagName.toLowerCase()&&"file"===el.type||this.setInputValue(el,modelValue)},setInputValue:function(el,value){if(store$2.callHook("interceptWireModelSetValue",value,el),"radio"===el.type)el.checked=el.value==value;else if("checkbox"===el.type)if(Array.isArray(value)){var valueFound=!1;value.forEach((function(val){val==el.value&&(valueFound=!0)})),el.checked=valueFound}else el.checked=!!value;else"SELECT"===el.tagName?this.updateSelect(el,value):(value=void 0===value?"":value,el.value=value)},getSelectValues:function(el){return Array.from(el.options).filter((function(option){return option.selected})).map((function(option){return option.value||option.text}))},updateSelect:function(el,value){var arrayWrappedValue=[].concat(value).map((function(value){return value+""}));Array.from(el.options).forEach((function(option){option.selected=arrayWrappedValue.includes(option.value)}))}},ceil=Math.ceil,floor=Math.floor,toInteger=function(argument){return isNaN(argument=+argument)?0:(argument>0?floor:ceil)(argument)},requireObjectCoercible=function(it){if(null==it)throw TypeError("Can't call method on "+it);return it},createMethod$3=function(CONVERT_TO_STRING){return function($this,pos){var first,second,S=String(requireObjectCoercible($this)),position=toInteger(pos),size=S.length;return position<0||position>=size?CONVERT_TO_STRING?"":void 0:(first=S.charCodeAt(position))<55296||first>56319||position+1===size||(second=S.charCodeAt(position+1))<56320||second>57343?CONVERT_TO_STRING?S.charAt(position):first:CONVERT_TO_STRING?S.slice(position,position+2):second-56320+(first-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(fn,basedir,module){return fn(module={path:basedir,exports:{},require:function(path,base){return commonjsRequire(path,null==base?module.path:base)}},module.exports),module.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var check=function(it){return it&&it.Math==Math&&it},global_1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),fails=function(exec){try{return!!exec()}catch(error){return!0}},descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(it){return"object"==typeof it?null!==it:"function"==typeof it},document$3=global_1.document,EXISTS=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(it){return EXISTS?document$3.createElement(it):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(it){if(!isObject(it))throw TypeError(String(it)+" is not an object");return it},toPrimitive=function(input,PREFERRED_STRING){if(!isObject(input))return input;var fn,val;if(PREFERRED_STRING&&"function"==typeof(fn=input.toString)&&!isObject(val=fn.call(input)))return val;if("function"==typeof(fn=input.valueOf)&&!isObject(val=fn.call(input)))return val;if(!PREFERRED_STRING&&"function"==typeof(fn=input.toString)&&!isObject(val=fn.call(input)))return val;throw TypeError("Can't convert object to primitive value")},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),ie8DomDefine)try{return $defineProperty(O,P,Attributes)}catch(error){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported");return"value"in Attributes&&(O[P]=Attributes.value),O},objectDefineProperty={f:f$5},createPropertyDescriptor=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}},createNonEnumerableProperty=descriptors?function(object,key,value){return objectDefineProperty.f(object,key,createPropertyDescriptor(1,value))}:function(object,key,value){return object[key]=value,object},setGlobal=function(key,value){try{createNonEnumerableProperty(global_1,key,value)}catch(error){global_1[key]=value}return value},SHARED="__core-js_shared__",store$1=global_1[SHARED]||setGlobal(SHARED,{}),sharedStore=store$1,functionToString=Function.toString;"function"!=typeof sharedStore.inspectSource&&(sharedStore.inspectSource=function(it){return functionToString.call(it)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global_1.WeakMap,nativeWeakMap="function"==typeof WeakMap$1&&/native code/.test(inspectSource(WeakMap$1)),toObject=function(argument){return Object(requireObjectCoercible(argument))},hasOwnProperty={}.hasOwnProperty,has$1=Object.hasOwn||function(it,key){return hasOwnProperty.call(toObject(it),key)},shared=createCommonjsModule((function(module){(module.exports=function(key,value){return sharedStore[key]||(sharedStore[key]=void 0!==value?value:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),id=0,postfix=Math.random(),uid=function(key){return"Symbol("+String(void 0===key?"":key)+")_"+(++id+postfix).toString(36)},keys=shared("keys"),sharedKey=function(key){return keys[key]||(keys[key]=uid(key))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap=global_1.WeakMap,set$1,get,has,enforce=function(it){return has(it)?get(it):set$1(it,{})},getterFor=function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError("Incompatible receiver, "+TYPE+" required");return state}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap),wmget=store.get,wmhas=store.has,wmset=store.set;set$1=function(it,metadata){if(wmhas.call(store,it))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,wmset.call(store,it,metadata),metadata},get=function(it){return wmget.call(store,it)||{}},has=function(it){return wmhas.call(store,it)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$1=function(it,metadata){if(has$1(it,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return has$1(it,STATE)?it[STATE]:{}},has=function(it){return has$1(it,STATE)}}var internalState={set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$3&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function(V){var descriptor=getOwnPropertyDescriptor$3(this,V);return!!descriptor&&descriptor.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},toString={}.toString,classofRaw=function(it){return toString.call(it).slice(8,-1)},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(it){return"String"==classofRaw(it)?split.call(it,""):Object(it)}:Object,toIndexedObject=function(it){return indexedObject(requireObjectCoercible(it))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function(O,P){if(O=toIndexedObject(O),P=toPrimitive(P,!0),ie8DomDefine)try{return $getOwnPropertyDescriptor(O,P)}catch(error){}if(has$1(O,P))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O,P),O[P])},objectGetOwnPropertyDescriptor={f:f$3},redefine=createCommonjsModule((function(module){var getInternalState=internalState.get,enforceInternalState=internalState.enforce,TEMPLATE=String(String).split("String");(module.exports=function(O,key,value,options){var state,unsafe=!!options&&!!options.unsafe,simple=!!options&&!!options.enumerable,noTargetGet=!!options&&!!options.noTargetGet;"function"==typeof value&&("string"!=typeof key||has$1(value,"name")||createNonEnumerableProperty(value,"name",key),(state=enforceInternalState(value)).source||(state.source=TEMPLATE.join("string"==typeof key?key:""))),O!==global_1?(unsafe?!noTargetGet&&O[key]&&(simple=!0):delete O[key],simple?O[key]=value:createNonEnumerableProperty(O,key,value)):simple?O[key]=value:setGlobal(key,value)})(Function.prototype,"toString",(function(){return"function"==typeof this&&getInternalState(this).source||inspectSource(this)}))})),path=global_1,aFunction$1=function(variable){return"function"==typeof variable?variable:void 0},getBuiltIn=function(namespace,method){return arguments.length<2?aFunction$1(path[namespace])||aFunction$1(global_1[namespace]):path[namespace]&&path[namespace][method]||global_1[namespace]&&global_1[namespace][method]},min$2=Math.min,toLength=function(argument){return argument>0?min$2(toInteger(argument),9007199254740991):0},max=Math.max,min$1=Math.min,toAbsoluteIndex=function(index,length){var integer=toInteger(index);return integer<0?max(integer+length,0):min$1(integer,length)},createMethod$2=function(IS_INCLUDES){return function($this,el,fromIndex){var value,O=toIndexedObject($this),length=toLength(O.length),index=toAbsoluteIndex(fromIndex,length);if(IS_INCLUDES&&el!=el){for(;length>index;)if((value=O[index++])!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(object,names){var key,O=toIndexedObject(object),i=0,result=[];for(key in O)!has$1(hiddenKeys$1,key)&&has$1(O,key)&&result.push(key);for(;names.length>i;)has$1(O,key=names[i++])&&(~indexOf(result,key)||result.push(key));return result},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function(O){return objectKeysInternal(O,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function(it){var keys=objectGetOwnPropertyNames.f(anObject(it)),getOwnPropertySymbols=objectGetOwnPropertySymbols.f;return getOwnPropertySymbols?keys.concat(getOwnPropertySymbols(it)):keys},copyConstructorProperties=function(target,source){for(var keys=ownKeys(source),defineProperty=objectDefineProperty.f,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,i=0;i=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var symbol=Symbol();return!String(symbol)||!(Object(symbol)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global_1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(name){return has$1(WellKnownSymbolsStore,name)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[name])||(nativeSymbol&&has$1(Symbol$1,name)?WellKnownSymbolsStore[name]=Symbol$1[name]:WellKnownSymbolsStore[name]=createWellKnownSymbol("Symbol."+name)),WellKnownSymbolsStore[name]},ITERATOR$5=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,returnThis$2=function(){return this},IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=null==IteratorPrototype$2||fails((function(){var test={};return IteratorPrototype$2[ITERATOR$5].call(test)!==test}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),has$1(IteratorPrototype$2,ITERATOR$5)||createNonEnumerableProperty(IteratorPrototype$2,ITERATOR$5,returnThis$2);var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},objectKeys=Object.keys||function(O){return objectKeysInternal(O,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function(O,Properties){anObject(O);for(var key,keys=objectKeys(Properties),length=keys.length,index=0;length>index;)objectDefineProperty.f(O,key=keys[index++],Properties[key]);return O},html=getBuiltIn("document","documentElement"),GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return LT+SCRIPT+GT+content+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(activeXDocument){activeXDocument.write(scriptTag("")),activeXDocument.close();var temp=activeXDocument.parentWindow.Object;return activeXDocument=null,temp},NullProtoObjectViaIFrame=function(){var iframeDocument,iframe=documentCreateElement("iframe"),JS="java"+SCRIPT+":";return iframe.style.display="none",html.appendChild(iframe),iframe.src=String(JS),(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write(scriptTag("document.F=Object")),iframeDocument.close(),iframeDocument.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=document.domain&&new ActiveXObject("htmlfile")}catch(error){}NullProtoObject=activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var length=enumBugKeys.length;length--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];return NullProtoObject()};hiddenKeys$1[IE_PROTO]=!0;var objectCreate=Object.create||function(O,Properties){var result;return null!==O?(EmptyConstructor[PROTOTYPE]=anObject(O),result=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,result[IE_PROTO]=O):result=NullProtoObject(),void 0===Properties?result:objectDefineProperties(result,Properties)},defineProperty$1=objectDefineProperty.f,TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),setToStringTag=function(it,TAG,STATIC){it&&!has$1(it=STATIC?it:it.prototype,TO_STRING_TAG$3)&&defineProperty$1(it,TO_STRING_TAG$3,{configurable:!0,value:TAG})},iterators={},IteratorPrototype$1=iteratorsCore.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(IteratorConstructor,NAME,next){var TO_STRING_TAG=NAME+" Iterator";return IteratorConstructor.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(1,next)}),setToStringTag(IteratorConstructor,TO_STRING_TAG,!1),iterators[TO_STRING_TAG]=returnThis$1,IteratorConstructor},aPossiblePrototype=function(it){if(!isObject(it)&&null!==it)throw TypeError("Can't set "+String(it)+" as a prototype");return it},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var setter,CORRECT_SETTER=!1,test={};try{(setter=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(test,[]),CORRECT_SETTER=test instanceof Array}catch(error){}return function(O,proto){return anObject(O),aPossiblePrototype(proto),CORRECT_SETTER?setter.call(O,proto):O.__proto__=proto,O}}():void 0),IteratorPrototype=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator=function(Iterable,NAME,IteratorConstructor,next,DEFAULT,IS_SET,FORCED){createIteratorConstructor(IteratorConstructor,NAME,next);var CurrentIteratorPrototype,methods,KEY,getIterationMethod=function(KIND){if(KIND===DEFAULT&&defaultIterator)return defaultIterator;if(!BUGGY_SAFARI_ITERATORS&&KIND in IterablePrototype)return IterablePrototype[KIND];switch(KIND){case KEYS:case VALUES:case ENTRIES:return function(){return new IteratorConstructor(this,KIND)}}return function(){return new IteratorConstructor(this)}},TO_STRING_TAG=NAME+" Iterator",INCORRECT_VALUES_NAME=!1,IterablePrototype=Iterable.prototype,nativeIterator=IterablePrototype[ITERATOR$4]||IterablePrototype["@@iterator"]||DEFAULT&&IterablePrototype[DEFAULT],defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT),anyNativeIterator="Array"==NAME&&IterablePrototype.entries||nativeIterator;if(anyNativeIterator&&(CurrentIteratorPrototype=objectGetPrototypeOf(anyNativeIterator.call(new Iterable)),IteratorPrototype!==Object.prototype&&CurrentIteratorPrototype.next&&(objectGetPrototypeOf(CurrentIteratorPrototype)!==IteratorPrototype&&(objectSetPrototypeOf?objectSetPrototypeOf(CurrentIteratorPrototype,IteratorPrototype):"function"!=typeof CurrentIteratorPrototype[ITERATOR$4]&&createNonEnumerableProperty(CurrentIteratorPrototype,ITERATOR$4,returnThis)),setToStringTag(CurrentIteratorPrototype,TO_STRING_TAG,!0))),DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES&&(INCORRECT_VALUES_NAME=!0,defaultIterator=function(){return nativeIterator.call(this)}),IterablePrototype[ITERATOR$4]!==defaultIterator&&createNonEnumerableProperty(IterablePrototype,ITERATOR$4,defaultIterator),iterators[NAME]=defaultIterator,DEFAULT)if(methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)},FORCED)for(KEY in methods)(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype))&&redefine(IterablePrototype,KEY,methods[KEY]);else _export({target:NAME,proto:!0,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);return methods},charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$2=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(iterated){setInternalState$2(this,{type:STRING_ITERATOR,string:String(iterated),index:0})}),(function(){var point,state=getInternalState$2(this),string=state.string,index=state.index;return index>=string.length?{value:void 0,done:!0}:(point=charAt(string,index),state.index+=point.length,{value:point,done:!1})}));var aFunction=function(it){if("function"!=typeof it)throw TypeError(String(it)+" is not a function");return it},functionBindContext=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 0:return function(){return fn.call(that)};case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}},iteratorClose=function(iterator){var returnMethod=iterator.return;if(void 0!==returnMethod)return anObject(returnMethod.call(iterator)).value},callWithSafeIterationClosing=function(iterator,fn,value,ENTRIES){try{return ENTRIES?fn(anObject(value)[0],value[1]):fn(value)}catch(error){throw iteratorClose(iterator),error}},ITERATOR$3=wellKnownSymbol("iterator"),ArrayPrototype$1=Array.prototype,isArrayIteratorMethod=function(it){return void 0!==it&&(iterators.Array===it||ArrayPrototype$1[ITERATOR$3]===it)},createProperty=function(object,key,value){var propertyKey=toPrimitive(key);propertyKey in object?objectDefineProperty.f(object,propertyKey,createPropertyDescriptor(0,value)):object[propertyKey]=value},TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$2]="z";var toStringTagSupport="[object z]"===String(test),TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(it,key){try{return it[key]}catch(error){}},classof=toStringTagSupport?classofRaw:function(it){var O,tag,result;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(tag=tryGet(O=Object(it),TO_STRING_TAG$1))?tag:CORRECT_ARGUMENTS?classofRaw(O):"Object"==(result=classofRaw(O))&&"function"==typeof O.callee?"Arguments":result},ITERATOR$2=wellKnownSymbol("iterator"),getIteratorMethod=function(it){if(null!=it)return it[ITERATOR$2]||it["@@iterator"]||iterators[classof(it)]},arrayFrom=function(arrayLike){var length,result,step,iterator,next,value,O=toObject(arrayLike),C="function"==typeof this?this:Array,argumentsLength=arguments.length,mapfn=argumentsLength>1?arguments[1]:void 0,mapping=void 0!==mapfn,iteratorMethod=getIteratorMethod(O),index=0;if(mapping&&(mapfn=functionBindContext(mapfn,argumentsLength>2?arguments[2]:void 0,2)),null==iteratorMethod||C==Array&&isArrayIteratorMethod(iteratorMethod))for(result=new C(length=toLength(O.length));length>index;index++)value=mapping?mapfn(O[index],index):O[index],createProperty(result,index,value);else for(next=(iterator=iteratorMethod.call(O)).next,result=new C;!(step=next.call(iterator)).done;index++)value=mapping?callWithSafeIterationClosing(iterator,mapfn,[step.value,index],!0):step.value,createProperty(result,index,value);return result.length=index,result},ITERATOR$1=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$1]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(error){}var checkCorrectnessOfIteration=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return!1;var ITERATION_SUPPORT=!1;try{var object={};object[ITERATOR$1]=function(){return{next:function(){return{done:ITERATION_SUPPORT=!0}}}},exec(object)}catch(error){}return ITERATION_SUPPORT},INCORRECT_ITERATION$1=!checkCorrectnessOfIteration((function(iterable){Array.from(iterable)}));_export({target:"Array",stat:!0,forced:INCORRECT_ITERATION$1},{from:arrayFrom}),path.Array.from;var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;null==ArrayPrototype[UNSCOPABLES]&&objectDefineProperty.f(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:objectCreate(null)});var addToUnscopables=function(key){ArrayPrototype[UNSCOPABLES][key]=!0},$includes=arrayIncludes.includes;_export({target:"Array",proto:!0},{includes:function(el){return $includes(this,el,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var call=Function.call,entryUnbind=function(CONSTRUCTOR,METHOD,length){return functionBindContext(call,global_1[CONSTRUCTOR].prototype[METHOD],length)};entryUnbind("Array","includes");var isArray=Array.isArray||function(arg){return"Array"==classofRaw(arg)},flattenIntoArray=function(target,original,source,sourceLen,start,depth,mapper,thisArg){for(var element,targetIndex=start,sourceIndex=0,mapFn=!!mapper&&functionBindContext(mapper,thisArg,3);sourceIndex0&&isArray(element))targetIndex=flattenIntoArray(target,original,element,toLength(element.length),targetIndex,depth-1)-1;else{if(targetIndex>=9007199254740991)throw TypeError("Exceed the acceptable array length");target[targetIndex]=element}targetIndex++}sourceIndex++}return targetIndex},flattenIntoArray_1=flattenIntoArray,SPECIES$3=wellKnownSymbol("species"),arraySpeciesCreate=function(originalArray,length){var C;return isArray(originalArray)&&("function"!=typeof(C=originalArray.constructor)||C!==Array&&!isArray(C.prototype)?isObject(C)&&null===(C=C[SPECIES$3])&&(C=void 0):C=void 0),new(void 0===C?Array:C)(0===length?0:length)};_export({target:"Array",proto:!0},{flat:function(){var depthArg=arguments.length?arguments[0]:void 0,O=toObject(this),sourceLen=toLength(O.length),A=arraySpeciesCreate(O,0);return A.length=flattenIntoArray_1(A,O,O,sourceLen,0,void 0===depthArg?1:toInteger(depthArg)),A}}),addToUnscopables("flat"),entryUnbind("Array","flat");var push=[].push,createMethod$1=function(TYPE){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,IS_FILTER_OUT=7==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var value,result,O=toObject($this),self=indexedObject(O),boundFunction=functionBindContext(callbackfn,that,3),length=toLength(self.length),index=0,create=specificCreate||arraySpeciesCreate,target=IS_MAP?create($this,length):IS_FILTER||IS_FILTER_OUT?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(result=boundFunction(value=self[index],index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push.call(target,value)}else switch(TYPE){case 4:return!1;case 7:push.call(target,value)}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}},arrayIteration={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6),filterOut:createMethod$1(7)},$find=arrayIteration.find,FIND="find",SKIPS_HOLES=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES=!1})),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(callbackfn){return $find(this,callbackfn,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND),entryUnbind("Array","find");var $assign=Object.assign,defineProperty=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty({},"a",{enumerable:!0,get:function(){defineProperty(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var A={},B={},symbol=Symbol();return A[symbol]=7,"abcdefghijklmnopqrst".split("").forEach((function(chr){B[chr]=chr})),7!=$assign({},A)[symbol]||"abcdefghijklmnopqrst"!=objectKeys($assign({},B)).join("")}))?function(target,source){for(var T=toObject(target),argumentsLength=arguments.length,index=1,getOwnPropertySymbols=objectGetOwnPropertySymbols.f,propertyIsEnumerable=objectPropertyIsEnumerable.f;argumentsLength>index;)for(var key,S=indexedObject(arguments[index++]),keys=getOwnPropertySymbols?objectKeys(S).concat(getOwnPropertySymbols(S)):objectKeys(S),length=keys.length,j=0;length>j;)key=keys[j++],descriptors&&!propertyIsEnumerable.call(S,key)||(T[key]=S[key]);return T}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign}),path.Object.assign;var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(TO_ENTRIES){return function(it){for(var key,O=toIndexedObject(it),keys=objectKeys(O),length=keys.length,i=0,result=[];length>i;)key=keys[i++],descriptors&&!propertyIsEnumerable.call(O,key)||result.push(TO_ENTRIES?[key,O[key]]:O[key]);return result}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function(O){return $entries(O)}}),path.Object.entries;var $values=objectToArray.values;_export({target:"Object",stat:!0},{values:function(O){return $values(O)}}),path.Object.values;var Result=function(stopped,result){this.stopped=stopped,this.result=result},iterate=function(iterable,unboundFunction,options){var iterator,iterFn,index,length,result,next,step,that=options&&options.that,AS_ENTRIES=!(!options||!options.AS_ENTRIES),IS_ITERATOR=!(!options||!options.IS_ITERATOR),INTERRUPTED=!(!options||!options.INTERRUPTED),fn=functionBindContext(unboundFunction,that,1+AS_ENTRIES+INTERRUPTED),stop=function(condition){return iterator&&iteratorClose(iterator),new Result(!0,condition)},callFn=function(value){return AS_ENTRIES?(anObject(value),INTERRUPTED?fn(value[0],value[1],stop):fn(value[0],value[1])):INTERRUPTED?fn(value,stop):fn(value)};if(IS_ITERATOR)iterator=iterable;else{if("function"!=typeof(iterFn=getIteratorMethod(iterable)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength(iterable.length);length>index;index++)if((result=callFn(iterable[index]))&&result instanceof Result)return result;return new Result(!1)}iterator=iterFn.call(iterable)}for(next=iterator.next;!(step=next.call(iterator)).done;){try{result=callFn(step.value)}catch(error){throw iteratorClose(iterator),error}if("object"==typeof result&&result&&result instanceof Result)return result}return new Result(!1)},$AggregateError=function(errors,message){var that=this;if(!(that instanceof $AggregateError))return new $AggregateError(errors,message);objectSetPrototypeOf&&(that=objectSetPrototypeOf(new Error(void 0),objectGetPrototypeOf(that))),void 0!==message&&createNonEnumerableProperty(that,"message",String(message));var errorsArray=[];return iterate(errors,errorsArray.push,{that:errorsArray}),createNonEnumerableProperty(that,"errors",errorsArray),that};$AggregateError.prototype=objectCreate(Error.prototype,{constructor:createPropertyDescriptor(5,$AggregateError),message:createPropertyDescriptor(5,""),name:createPropertyDescriptor(5,"AggregateError")}),_export({global:!0},{AggregateError:$AggregateError});var objectToString=toStringTagSupport?{}.toString:function(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var nativePromiseConstructor=global_1.Promise,redefineAll=function(target,src,options){for(var key in src)redefine(target,key,src[key],options);return target},SPECIES$2=wellKnownSymbol("species"),setSpecies=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn(CONSTRUCTOR_NAME),defineProperty=objectDefineProperty.f;descriptors&&Constructor&&!Constructor[SPECIES$2]&&defineProperty(Constructor,SPECIES$2,{configurable:!0,get:function(){return this}})},anInstance=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError("Incorrect "+(name?name+" ":"")+"invocation");return it},SPECIES$1=wellKnownSymbol("species"),speciesConstructor=function(O,defaultConstructor){var S,C=anObject(O).constructor;return void 0===C||null==(S=anObject(C)[SPECIES$1])?defaultConstructor:aFunction(S)},engineIsIos=/(?:iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global_1.process),location=global_1.location,set=global_1.setImmediate,clear=global_1.clearImmediate,process$2=global_1.process,MessageChannel=global_1.MessageChannel,Dispatch=global_1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port,run=function(id){if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id],fn()}},runner=function(id){return function(){run(id)}},listener=function(event){run(event.data)},post=function(id){global_1.postMessage(id+"",location.protocol+"//"+location.host)};set&&clear||(set=function(fn){for(var args=[],i=1;arguments.length>i;)args.push(arguments[i++]);return queue[++counter]=function(){("function"==typeof fn?fn:Function(fn)).apply(void 0,args)},defer(counter),counter},clear=function(id){delete queue[id]},engineIsNode?defer=function(id){process$2.nextTick(runner(id))}:Dispatch&&Dispatch.now?defer=function(id){Dispatch.now(runner(id))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global_1.addEventListener&&"function"==typeof postMessage&&!global_1.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global_1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(id){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(id)}}:function(id){setTimeout(runner(id),0)});var task$1={set:set,clear:clear},engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global_1.MutationObserver||global_1.WebKitMutationObserver,document$2=global_1.document,process$1=global_1.process,Promise$1=global_1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$1(global_1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var parent,fn;for(engineIsNode&&(parent=process$1.domain)&&parent.exit();head;){fn=head.fn,head=head.next;try{fn()}catch(error){throw head?notify$1():last=void 0,error}}last=void 0,parent&&parent.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global_1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(fn){var task={fn:fn,next:void 0};last&&(last.next=task),head||(head=task,notify$1()),last=task},PromiseCapability=function(C){var resolve,reject;this.promise=new C((function($$resolve,$$reject){if(void 0!==resolve||void 0!==reject)throw TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject})),this.resolve=aFunction(resolve),this.reject=aFunction(reject)},f=function(C){return new PromiseCapability(C)},newPromiseCapability$1={f:f},promiseResolve=function(C,x){if(anObject(C),isObject(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);return(0,promiseCapability.resolve)(x),promiseCapability.promise},hostReportErrors=function(a,b){var console=global_1.console;console&&console.error&&(1===arguments.length?console.error(a):console.error(a,b))},perform=function(exec){try{return{error:!1,value:exec()}}catch(error){return{error:!0,value:error}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$1=internalState.get,setInternalState$1=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global_1.TypeError,document$1=global_1.document,process=global_1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global_1.dispatchEvent),NATIVE_REJECTION_EVENT="function"==typeof PromiseRejectionEvent,UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED=isForced_1(PROMISE,(function(){var PROMISE_CONSTRUCTOR_SOURCE=inspectSource(PromiseConstructor),GLOBAL_CORE_JS_PROMISE=PROMISE_CONSTRUCTOR_SOURCE!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(PROMISE_CONSTRUCTOR_SOURCE))return!1;var promise=new PromiseConstructor((function(resolve){resolve(1)})),FakePromise=function(exec){exec((function(){}),(function(){}))};return(promise.constructor={})[SPECIES]=FakePromise,!(SUBCLASSING=promise.then((function(){}))instanceof FakePromise)||!GLOBAL_CORE_JS_PROMISE&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED||!checkCorrectnessOfIteration((function(iterable){PromiseConstructor.all(iterable).catch((function(){}))})),isThenable=function(it){var then;return!(!isObject(it)||"function"!=typeof(then=it.then))&&then},notify=function(state,isReject){if(!state.notified){state.notified=!0;var chain=state.reactions;microtask((function(){for(var value=state.value,ok=state.state==FULFILLED,index=0;chain.length>index;){var result,then,exited,reaction=chain[index++],handler=ok?reaction.ok:reaction.fail,resolve=reaction.resolve,reject=reaction.reject,domain=reaction.domain;try{handler?(ok||(state.rejection===UNHANDLED&&onHandleUnhandled(state),state.rejection=HANDLED),!0===handler?result=value:(domain&&domain.enter(),result=handler(value),domain&&(domain.exit(),exited=!0)),result===reaction.promise?reject(TypeError$1("Promise-chain cycle")):(then=isThenable(result))?then.call(result,resolve,reject):resolve(result)):reject(value)}catch(error){domain&&!exited&&domain.exit(),reject(error)}}state.reactions=[],state.notified=!1,isReject&&!state.rejection&&onUnhandled(state)}))}},dispatchEvent=function(name,promise,reason){var event,handler;DISPATCH_EVENT?((event=document$1.createEvent("Event")).promise=promise,event.reason=reason,event.initEvent(name,!1,!0),global_1.dispatchEvent(event)):event={promise:promise,reason:reason},!NATIVE_REJECTION_EVENT&&(handler=global_1["on"+name])?handler(event):name===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",reason)},onUnhandled=function(state){task.call(global_1,(function(){var result,promise=state.facade,value=state.value;if(isUnhandled(state)&&(result=perform((function(){engineIsNode?process.emit("unhandledRejection",value,promise):dispatchEvent(UNHANDLED_REJECTION,promise,value)})),state.rejection=engineIsNode||isUnhandled(state)?UNHANDLED:HANDLED,result.error))throw result.value}))},isUnhandled=function(state){return state.rejection!==HANDLED&&!state.parent},onHandleUnhandled=function(state){task.call(global_1,(function(){var promise=state.facade;engineIsNode?process.emit("rejectionHandled",promise):dispatchEvent(REJECTION_HANDLED,promise,state.value)}))},bind=function(fn,state,unwrap){return function(value){fn(state,value,unwrap)}},internalReject=function(state,value,unwrap){state.done||(state.done=!0,unwrap&&(state=unwrap),state.value=value,state.state=REJECTED,notify(state,!0))},internalResolve=function(state,value,unwrap){if(!state.done){state.done=!0,unwrap&&(state=unwrap);try{if(state.facade===value)throw TypeError$1("Promise can't be resolved itself");var then=isThenable(value);then?microtask((function(){var wrapper={done:!1};try{then.call(value,bind(internalResolve,wrapper,state),bind(internalReject,wrapper,state))}catch(error){internalReject(wrapper,error,state)}})):(state.value=value,state.state=FULFILLED,notify(state,!1))}catch(error){internalReject({done:!1},error,state)}}};if(FORCED&&(PromiseConstructor=function(executor){anInstance(this,PromiseConstructor,PROMISE),aFunction(executor),Internal.call(this);var state=getInternalState$1(this);try{executor(bind(internalResolve,state),bind(internalReject,state))}catch(error){internalReject(state,error)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function(executor){setInternalState$1(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function(onFulfilled,onRejected){var state=getInternalPromiseState(this),reaction=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return reaction.ok="function"!=typeof onFulfilled||onFulfilled,reaction.fail="function"==typeof onRejected&&onRejected,reaction.domain=engineIsNode?process.domain:void 0,state.parent=!0,state.reactions.push(reaction),state.state!=PENDING&¬ify(state,!1),reaction.promise},catch:function(onRejected){return this.then(void 0,onRejected)}}),OwnPromiseCapability=function(){var promise=new Internal,state=getInternalState$1(promise);this.promise=promise,this.resolve=bind(internalResolve,state),this.reject=bind(internalReject,state)},newPromiseCapability$1.f=newPromiseCapability=function(C){return C===PromiseConstructor||C===PromiseWrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C)},"function"==typeof nativePromiseConstructor&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function(onFulfilled,onRejected){var that=this;return new PromiseConstructor((function(resolve,reject){nativeThen.call(that,resolve,reject)})).then(onFulfilled,onRejected)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(error){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED},{reject:function(r){var capability=newPromiseCapability(this);return capability.reject.call(void 0,r),capability.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED},{resolve:function(x){return promiseResolve(this,x)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function(iterable){var C=this,capability=newPromiseCapability(C),resolve=capability.resolve,reject=capability.reject,result=perform((function(){var $promiseResolve=aFunction(C.resolve),values=[],counter=0,remaining=1;iterate(iterable,(function(promise){var index=counter++,alreadyCalled=!1;values.push(void 0),remaining++,$promiseResolve.call(C,promise).then((function(value){alreadyCalled||(alreadyCalled=!0,values[index]=value,--remaining||resolve(values))}),reject)})),--remaining||resolve(values)}));return result.error&&reject(result.value),capability.promise},race:function(iterable){var C=this,capability=newPromiseCapability(C),reject=capability.reject,result=perform((function(){var $promiseResolve=aFunction(C.resolve);iterate(iterable,(function(promise){$promiseResolve.call(C,promise).then(capability.resolve,reject)}))}));return result.error&&reject(result.value),capability.promise}}),_export({target:"Promise",stat:!0},{allSettled:function(iterable){var C=this,capability=newPromiseCapability$1.f(C),resolve=capability.resolve,reject=capability.reject,result=perform((function(){var promiseResolve=aFunction(C.resolve),values=[],counter=0,remaining=1;iterate(iterable,(function(promise){var index=counter++,alreadyCalled=!1;values.push(void 0),remaining++,promiseResolve.call(C,promise).then((function(value){alreadyCalled||(alreadyCalled=!0,values[index]={status:"fulfilled",value:value},--remaining||resolve(values))}),(function(error){alreadyCalled||(alreadyCalled=!0,values[index]={status:"rejected",reason:error},--remaining||resolve(values))}))})),--remaining||resolve(values)}));return result.error&&reject(result.value),capability.promise}});var PROMISE_ANY_ERROR="No one promise resolved";_export({target:"Promise",stat:!0},{any:function(iterable){var C=this,capability=newPromiseCapability$1.f(C),resolve=capability.resolve,reject=capability.reject,result=perform((function(){var promiseResolve=aFunction(C.resolve),errors=[],counter=0,remaining=1,alreadyResolved=!1;iterate(iterable,(function(promise){var index=counter++,alreadyRejected=!1;errors.push(void 0),remaining++,promiseResolve.call(C,promise).then((function(value){alreadyRejected||alreadyResolved||(alreadyResolved=!0,resolve(value))}),(function(error){alreadyRejected||alreadyResolved||(alreadyRejected=!0,errors[index]=error,--remaining||reject(new(getBuiltIn("AggregateError"))(errors,PROMISE_ANY_ERROR)))}))})),--remaining||reject(new(getBuiltIn("AggregateError"))(errors,PROMISE_ANY_ERROR))}));return result.error&&reject(result.value),capability.promise}});var NON_GENERIC=!!nativePromiseConstructor&&fails((function(){nativePromiseConstructor.prototype.finally.call({then:function(){}},(function(){}))}));if(_export({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(onFinally){var C=speciesConstructor(this,getBuiltIn("Promise")),isFunction="function"==typeof onFinally;return this.then(isFunction?function(x){return promiseResolve(C,onFinally()).then((function(){return x}))}:onFinally,isFunction?function(e){return promiseResolve(C,onFinally()).then((function(){throw e}))}:onFinally)}}),"function"==typeof nativePromiseConstructor){var method=getBuiltIn("Promise").prototype.finally;nativePromiseConstructor.prototype.finally!==method&&redefine(nativePromiseConstructor.prototype,"finally",method,{unsafe:!0})}var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ARRAY_ITERATOR="Array Iterator",setInternalState=internalState.set,getInternalState=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",(function(iterated,kind){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(iterated),index:0,kind:kind})}),(function(){var state=getInternalState(this),target=state.target,kind=state.kind,index=state.index++;return!target||index>=target.length?(state.target=void 0,{value:void 0,done:!0}):"keys"==kind?{value:index,done:!1}:"values"==kind?{value:target[index],done:!1}:{value:[index,target[index]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values;for(var COLLECTION_NAME in domIterables){var Collection=global_1[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch(error){CollectionPrototype[ITERATOR]=ArrayValues}if(CollectionPrototype[TO_STRING_TAG]||createNonEnumerableProperty(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),domIterables[COLLECTION_NAME])for(var METHOD_NAME in es_array_iterator)if(CollectionPrototype[METHOD_NAME]!==es_array_iterator[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,es_array_iterator[METHOD_NAME])}catch(error){CollectionPrototype[METHOD_NAME]=es_array_iterator[METHOD_NAME]}}}path.Promise,_export({target:"Promise",stat:!0},{try:function(callbackfn){var promiseCapability=newPromiseCapability$1.f(this),result=perform(callbackfn);return(result.error?promiseCapability.reject:promiseCapability.resolve)(result.value),promiseCapability.promise}});var MATCH$1=wellKnownSymbol("match"),isRegexp=function(it){var isRegExp;return isObject(it)&&(void 0!==(isRegExp=it[MATCH$1])?!!isRegExp:"RegExp"==classofRaw(it))},notARegexp=function(it){if(isRegexp(it))throw TypeError("The method doesn't accept regular expressions");return it},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(METHOD_NAME){var regexp=/./;try{"/./"[METHOD_NAME](regexp)}catch(error1){try{return regexp[MATCH]=!1,"/./"[METHOD_NAME](regexp)}catch(error2){}}return!1},getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function(searchString){var that=String(requireObjectCoercible(this));notARegexp(searchString);var index=toLength(min(arguments.length>1?arguments[1]:void 0,that.length)),search=String(searchString);return $startsWith?$startsWith.call(that,search,index):that.slice(index,index+search.length)===search}}),entryUnbind("String","startsWith");var global$1="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==global$1&&global$1,support={searchParams:"URLSearchParams"in global$1,iterable:"Symbol"in global$1&&"iterator"in Symbol,blob:"FileReader"in global$1&&"Blob"in global$1&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in global$1,arrayBuffer:"ArrayBuffer"in global$1};function isDataView(obj){return obj&&DataView.prototype.isPrototypeOf(obj)}if(support.arrayBuffer)var viewClasses=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],isArrayBufferView=ArrayBuffer.isView||function(obj){return obj&&viewClasses.indexOf(Object.prototype.toString.call(obj))>-1};function normalizeName(name){if("string"!=typeof name&&(name=String(name)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name)||""===name)throw new TypeError('Invalid character in header field name: "'+name+'"');return name.toLowerCase()}function normalizeValue(value){return"string"!=typeof value&&(value=String(value)),value}function iteratorFor(items){var iterator={next:function(){var value=items.shift();return{done:void 0===value,value:value}}};return support.iterable&&(iterator[Symbol.iterator]=function(){return iterator}),iterator}function Headers(headers){this.map={},headers instanceof Headers?headers.forEach((function(value,name){this.append(name,value)}),this):Array.isArray(headers)?headers.forEach((function(header){this.append(header[0],header[1])}),this):headers&&Object.getOwnPropertyNames(headers).forEach((function(name){this.append(name,headers[name])}),this)}function consumed(body){if(body.bodyUsed)return Promise.reject(new TypeError("Already read"));body.bodyUsed=!0}function fileReaderReady(reader){return new Promise((function(resolve,reject){reader.onload=function(){resolve(reader.result)},reader.onerror=function(){reject(reader.error)}}))}function readBlobAsArrayBuffer(blob){var reader=new FileReader,promise=fileReaderReady(reader);return reader.readAsArrayBuffer(blob),promise}function readBlobAsText(blob){var reader=new FileReader,promise=fileReaderReady(reader);return reader.readAsText(blob),promise}function readArrayBufferAsText(buf){for(var view=new Uint8Array(buf),chars=new Array(view.length),i=0;i-1?upcased:method}function Request(input,options){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var body=(options=options||{}).body;if(input instanceof Request){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,options.headers||(this.headers=new Headers(input.headers)),this.method=input.method,this.mode=input.mode,this.signal=input.signal,body||null==input._bodyInit||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=String(input);if(this.credentials=options.credentials||this.credentials||"same-origin",!options.headers&&this.headers||(this.headers=new Headers(options.headers)),this.method=normalizeMethod(options.method||this.method||"GET"),this.mode=options.mode||this.mode||null,this.signal=options.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(body),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==options.cache&&"no-cache"!==options.cache)){var reParamSearch=/([?&])_=[^&]*/;if(reParamSearch.test(this.url))this.url=this.url.replace(reParamSearch,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function decode(body){var form=new FormData;return body.trim().split("&").forEach((function(bytes){if(bytes){var split=bytes.split("="),name=split.shift().replace(/\+/g," "),value=split.join("=").replace(/\+/g," ");form.append(decodeURIComponent(name),decodeURIComponent(value))}})),form}function parseHeaders(rawHeaders){var headers=new Headers;return rawHeaders.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(header){return 0===header.indexOf("\n")?header.substr(1,header.length):header})).forEach((function(line){var parts=line.split(":"),key=parts.shift().trim();if(key){var value=parts.join(":").trim();headers.append(key,value)}})),headers}function Response(bodyInit,options){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');options||(options={}),this.type="default",this.status=void 0===options.status?200:options.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===options.statusText?"":""+options.statusText,this.headers=new Headers(options.headers),this.url=options.url||"",this._initBody(bodyInit)}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var response=new Response(null,{status:0,statusText:""});return response.type="error",response};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(-1===redirectStatuses.indexOf(status))throw new RangeError("Invalid status code");return new Response(null,{status:status,headers:{location:url}})};var DOMException=global$1.DOMException;try{new DOMException}catch(err){DOMException=function(message,name){this.message=message,this.name=name;var error=Error(message);this.stack=error.stack},DOMException.prototype=Object.create(Error.prototype),DOMException.prototype.constructor=DOMException}function fetch$1(input,init){return new Promise((function(resolve,reject){var request=new Request(input,init);if(request.signal&&request.signal.aborted)return reject(new DOMException("Aborted","AbortError"));var xhr=new XMLHttpRequest;function abortXhr(){xhr.abort()}xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||"")};options.url="responseURL"in xhr?xhr.responseURL:options.headers.get("X-Request-URL");var body="response"in xhr?xhr.response:xhr.responseText;setTimeout((function(){resolve(new Response(body,options))}),0)},xhr.onerror=function(){setTimeout((function(){reject(new TypeError("Network request failed"))}),0)},xhr.ontimeout=function(){setTimeout((function(){reject(new TypeError("Network request failed"))}),0)},xhr.onabort=function(){setTimeout((function(){reject(new DOMException("Aborted","AbortError"))}),0)},xhr.open(request.method,function(url){try{return""===url&&global$1.location.href?global$1.location.href:url}catch(e){return url}}(request.url),!0),"include"===request.credentials?xhr.withCredentials=!0:"omit"===request.credentials&&(xhr.withCredentials=!1),"responseType"in xhr&&(support.blob?xhr.responseType="blob":support.arrayBuffer&&request.headers.get("Content-Type")&&-1!==request.headers.get("Content-Type").indexOf("application/octet-stream")&&(xhr.responseType="arraybuffer")),!init||"object"!=typeof init.headers||init.headers instanceof Headers?request.headers.forEach((function(value,name){xhr.setRequestHeader(name,value)})):Object.getOwnPropertyNames(init.headers).forEach((function(name){xhr.setRequestHeader(name,normalizeValue(init.headers[name]))})),request.signal&&(request.signal.addEventListener("abort",abortXhr),xhr.onreadystatechange=function(){4===xhr.readyState&&request.signal.removeEventListener("abort",abortXhr)}),xhr.send(void 0===request._bodyInit?null:request._bodyInit)}))}fetch$1.polyfill=!0,global$1.fetch||(global$1.fetch=fetch$1,global$1.Headers=Headers,global$1.Request=Request,global$1.Response=Response),null==Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var attributes=this.attributes,length=attributes.length,result=new Array(length),i=0;i=0&&matches.item(i)!==this;);return i>-1}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(s){var el=this;do{if(el.matches(s))return el;el=el.parentElement||el.parentNode}while(null!==el&&1===el.nodeType);return null});var Connection=function(){function Connection(){_classCallCheck(this,Connection),this.headers={}}return _createClass(Connection,[{key:"onMessage",value:function(message,payload){message.component.receiveMessage(message,payload)}},{key:"onError",value:function(message,status,response){return message.component.messageSendFailed(),store$2.onErrorCallback(status,response)}},{key:"showExpiredMessage",value:function(response,message){store$2.sessionHasExpiredCallback?store$2.sessionHasExpiredCallback(response,message):confirm("This page has expired.\nWould you like to refresh the page?")&&window.location.reload()}},{key:"sendMessage",value:function(message){var _this=this,payload=message.payload(),csrfToken=getCsrfToken(),socketId=this.getSocketId();if(window.__testing_request_interceptor)return window.__testing_request_interceptor(payload,this);fetch("".concat(window.livewire_app_url,"/livewire/message/").concat(payload.fingerprint.name),{method:"POST",body:JSON.stringify(payload),credentials:"same-origin",headers:_objectSpread2(_objectSpread2(_objectSpread2({"Content-Type":"application/json",Accept:"text/html, application/xhtml+xml","X-Livewire":!0},this.headers),{},{Referer:window.location.href},csrfToken&&{"X-CSRF-TOKEN":csrfToken}),socketId&&{"X-Socket-ID":socketId})}).then((function(response){if(response.ok)response.text().then((function(response){_this.isOutputFromDump(response)?(_this.onError(message),_this.showHtmlModal(response)):_this.onMessage(message,JSON.parse(response))}));else{if(!1===_this.onError(message,response.status,response))return;if(419===response.status){if(store$2.sessionHasExpired)return;store$2.sessionHasExpired=!0,_this.showExpiredMessage(response,message)}else response.text().then((function(response){_this.showHtmlModal(response)}))}})).catch((function(){_this.onError(message)}))}},{key:"isOutputFromDump",value:function(output){return!!output.match(/